From 5f45b6b3ad03c494f1f587de7fbd5008097cd00d Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 2 Mar 2023 23:22:47 +0000 Subject: [PATCH 1/4] feat: Import of Grafeas from Github PiperOrigin-RevId: 513603965 Source-Link: https://github.com/googleapis/googleapis/commit/7044962d31b872f7424bf3b320add0c4a3b186e8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/0ca25aa1245ce4057f3fbd88653e58970731f571 Copy-Tag: eyJwIjoiamF2YS1ncmFmZWFzLy5Pd2xCb3QueWFtbCIsImgiOiIwY2EyNWFhMTI0NWNlNDA1N2YzZmJkODg2NTNlNTg5NzA3MzFmNTcxIn0= --- .../main/java/io/grafeas/v1/AliasContext.java | 866 ++ .../io/grafeas/v1/AliasContextOrBuilder.java | 48 + .../main/java/io/grafeas/v1/Architecture.java | 150 + .../src/main/java/io/grafeas/v1/Artifact.java | 1047 +++ .../java/io/grafeas/v1/ArtifactOrBuilder.java | 110 + .../main/java/io/grafeas/v1/Attestation.java | 91 + .../java/io/grafeas/v1/AttestationNote.java | 1279 +++ .../grafeas/v1/AttestationNoteOrBuilder.java | 36 + .../io/grafeas/v1/AttestationOccurrence.java | 1658 ++++ .../v1/AttestationOccurrenceOrBuilder.java | 163 + .../grafeas/v1/BatchCreateNotesRequest.java | 910 ++ .../v1/BatchCreateNotesRequestOrBuilder.java | 85 + .../grafeas/v1/BatchCreateNotesResponse.java | 862 ++ .../v1/BatchCreateNotesResponseOrBuilder.java | 53 + .../v1/BatchCreateOccurrencesRequest.java | 1033 +++ ...atchCreateOccurrencesRequestOrBuilder.java | 75 + .../v1/BatchCreateOccurrencesResponse.java | 862 ++ ...tchCreateOccurrencesResponseOrBuilder.java | 53 + .../v1/src/main/java/io/grafeas/v1/Build.java | 74 + .../main/java/io/grafeas/v1/BuildNote.java | 582 ++ .../io/grafeas/v1/BuildNoteOrBuilder.java | 29 + .../java/io/grafeas/v1/BuildOccurrence.java | 1378 +++ .../grafeas/v1/BuildOccurrenceOrBuilder.java | 140 + .../java/io/grafeas/v1/BuildProvenance.java | 3554 +++++++ .../grafeas/v1/BuildProvenanceOrBuilder.java | 388 + .../java/io/grafeas/v1/BuilderConfig.java | 544 ++ .../io/grafeas/v1/BuilderConfigOrBuilder.java | 21 + .../v1/src/main/java/io/grafeas/v1/CVSS.java | 2394 +++++ .../java/io/grafeas/v1/CVSSOrBuilder.java | 142 + .../main/java/io/grafeas/v1/CVSSProto.java | 128 + .../main/java/io/grafeas/v1/CVSSVersion.java | 126 + .../src/main/java/io/grafeas/v1/CVSSv3.java | 2170 +++++ .../java/io/grafeas/v1/CVSSv3OrBuilder.java | 131 + .../io/grafeas/v1/CloudRepoSourceContext.java | 1186 +++ .../v1/CloudRepoSourceContextOrBuilder.java | 94 + .../src/main/java/io/grafeas/v1/Command.java | 1632 ++++ .../java/io/grafeas/v1/CommandOrBuilder.java | 198 + .../src/main/java/io/grafeas/v1/Common.java | 129 + .../main/java/io/grafeas/v1/Completeness.java | 679 ++ .../io/grafeas/v1/CompletenessOrBuilder.java | 42 + .../main/java/io/grafeas/v1/Compliance.java | 111 + .../java/io/grafeas/v1/ComplianceNote.java | 2467 +++++ .../grafeas/v1/ComplianceNoteOrBuilder.java | 160 + .../io/grafeas/v1/ComplianceOccurrence.java | 908 ++ .../v1/ComplianceOccurrenceOrBuilder.java | 45 + .../java/io/grafeas/v1/ComplianceVersion.java | 931 ++ .../v1/ComplianceVersionOrBuilder.java | 75 + .../java/io/grafeas/v1/CreateNoteRequest.java | 980 ++ .../v1/CreateNoteRequestOrBuilder.java | 78 + .../grafeas/v1/CreateOccurrenceRequest.java | 816 ++ .../v1/CreateOccurrenceRequestOrBuilder.java | 58 + .../io/grafeas/v1/DSSEAttestationNote.java | 1257 +++ .../v1/DSSEAttestationNoteOrBuilder.java | 36 + .../grafeas/v1/DSSEAttestationOccurrence.java | 941 ++ .../DSSEAttestationOccurrenceOrBuilder.java | 56 + .../java/io/grafeas/v1/DeleteNoteRequest.java | 587 ++ .../v1/DeleteNoteRequestOrBuilder.java | 31 + .../grafeas/v1/DeleteOccurrenceRequest.java | 587 ++ .../v1/DeleteOccurrenceRequestOrBuilder.java | 31 + .../main/java/io/grafeas/v1/Deployment.java | 72 + .../java/io/grafeas/v1/DeploymentNote.java | 653 ++ .../grafeas/v1/DeploymentNoteOrBuilder.java | 50 + .../io/grafeas/v1/DeploymentOccurrence.java | 1900 ++++ .../v1/DeploymentOccurrenceOrBuilder.java | 187 + .../src/main/java/io/grafeas/v1/Digest.java | 663 ++ .../java/io/grafeas/v1/DigestOrBuilder.java | 39 + .../main/java/io/grafeas/v1/Discovery.java | 107 + .../java/io/grafeas/v1/DiscoveryNote.java | 549 ++ .../io/grafeas/v1/DiscoveryNoteOrBuilder.java | 30 + .../io/grafeas/v1/DiscoveryOccurrence.java | 3178 +++++++ .../v1/DiscoveryOccurrenceOrBuilder.java | 218 + .../main/java/io/grafeas/v1/Distribution.java | 1439 +++ .../io/grafeas/v1/DistributionOrBuilder.java | 139 + .../java/io/grafeas/v1/DsseAttestation.java | 83 + .../src/main/java/io/grafeas/v1/Envelope.java | 977 ++ .../java/io/grafeas/v1/EnvelopeOrBuilder.java | 51 + .../java/io/grafeas/v1/EnvelopeSignature.java | 611 ++ .../v1/EnvelopeSignatureOrBuilder.java | 27 + .../main/java/io/grafeas/v1/FileHashes.java | 864 ++ .../io/grafeas/v1/FileHashesOrBuilder.java | 53 + .../main/java/io/grafeas/v1/FileLocation.java | 587 ++ .../io/grafeas/v1/FileLocationOrBuilder.java | 31 + .../main/java/io/grafeas/v1/Fingerprint.java | 1009 ++ .../io/grafeas/v1/FingerprintOrBuilder.java | 98 + .../io/grafeas/v1/GerritSourceContext.java | 1297 +++ .../v1/GerritSourceContextOrBuilder.java | 111 + .../java/io/grafeas/v1/GetNoteRequest.java | 587 ++ .../grafeas/v1/GetNoteRequestOrBuilder.java | 31 + .../grafeas/v1/GetOccurrenceNoteRequest.java | 587 ++ .../v1/GetOccurrenceNoteRequestOrBuilder.java | 31 + .../io/grafeas/v1/GetOccurrenceRequest.java | 587 ++ .../v1/GetOccurrenceRequestOrBuilder.java | 31 + .../java/io/grafeas/v1/GitSourceContext.java | 746 ++ .../grafeas/v1/GitSourceContextOrBuilder.java | 49 + .../java/io/grafeas/v1/GrafeasClient.java | 2264 +++++ .../main/java/io/grafeas/v1/GrafeasGrpc.java | 1491 +++ .../java/io/grafeas/v1/GrafeasOuterClass.java | 487 + .../java/io/grafeas/v1/GrafeasSettings.java | 340 + .../v1/src/main/java/io/grafeas/v1/Hash.java | 663 ++ .../java/io/grafeas/v1/HashOrBuilder.java | 39 + .../v1/src/main/java/io/grafeas/v1/Image.java | 90 + .../main/java/io/grafeas/v1/ImageNote.java | 824 ++ .../io/grafeas/v1/ImageNoteOrBuilder.java | 58 + .../java/io/grafeas/v1/ImageOccurrence.java | 1398 +++ .../grafeas/v1/ImageOccurrenceOrBuilder.java | 123 + .../java/io/grafeas/v1/InTotoProvenance.java | 1359 +++ .../grafeas/v1/InTotoProvenanceOrBuilder.java | 140 + .../io/grafeas/v1/InTotoProvenanceProto.java | 115 + .../java/io/grafeas/v1/InTotoStatement.java | 1802 ++++ .../grafeas/v1/InTotoStatementOrBuilder.java | 120 + .../io/grafeas/v1/InTotoStatementProto.java | 91 + .../v1/src/main/java/io/grafeas/v1/Jwt.java | 586 ++ .../main/java/io/grafeas/v1/JwtOrBuilder.java | 33 + .../v1/src/main/java/io/grafeas/v1/Layer.java | 751 ++ .../java/io/grafeas/v1/LayerOrBuilder.java | 51 + .../src/main/java/io/grafeas/v1/License.java | 772 ++ .../java/io/grafeas/v1/LicenseOrBuilder.java | 57 + .../v1/ListNoteOccurrencesRequest.java | 997 ++ .../ListNoteOccurrencesRequestOrBuilder.java | 81 + .../v1/ListNoteOccurrencesResponse.java | 1026 ++ .../ListNoteOccurrencesResponseOrBuilder.java | 73 + .../java/io/grafeas/v1/ListNotesRequest.java | 1001 ++ .../grafeas/v1/ListNotesRequestOrBuilder.java | 82 + .../java/io/grafeas/v1/ListNotesResponse.java | 1040 +++ .../v1/ListNotesResponseOrBuilder.java | 77 + .../io/grafeas/v1/ListOccurrencesRequest.java | 1001 ++ .../v1/ListOccurrencesRequestOrBuilder.java | 82 + .../grafeas/v1/ListOccurrencesResponse.java | 1040 +++ .../v1/ListOccurrencesResponseOrBuilder.java | 77 + .../src/main/java/io/grafeas/v1/Location.java | 994 ++ .../java/io/grafeas/v1/LocationOrBuilder.java | 81 + .../src/main/java/io/grafeas/v1/Metadata.java | 1380 +++ .../java/io/grafeas/v1/MetadataOrBuilder.java | 128 + .../java/io/grafeas/v1/NonCompliantFile.java | 908 ++ .../grafeas/v1/NonCompliantFileOrBuilder.java | 69 + .../v1/src/main/java/io/grafeas/v1/Note.java | 5068 ++++++++++ .../src/main/java/io/grafeas/v1/NoteKind.java | 286 + .../src/main/java/io/grafeas/v1/NoteName.java | 191 + .../java/io/grafeas/v1/NoteOrBuilder.java | 536 ++ .../main/java/io/grafeas/v1/Occurrence.java | 4569 +++++++++ .../java/io/grafeas/v1/OccurrenceName.java | 192 + .../io/grafeas/v1/OccurrenceOrBuilder.java | 476 + .../src/main/java/io/grafeas/v1/Package.java | 132 + .../main/java/io/grafeas/v1/PackageNote.java | 2942 ++++++ .../io/grafeas/v1/PackageNoteOrBuilder.java | 308 + .../java/io/grafeas/v1/PackageOccurrence.java | 1985 ++++ .../v1/PackageOccurrenceOrBuilder.java | 199 + .../main/java/io/grafeas/v1/ProjectName.java | 168 + .../java/io/grafeas/v1/ProjectRepoId.java | 746 ++ .../io/grafeas/v1/ProjectRepoIdOrBuilder.java | 49 + .../main/java/io/grafeas/v1/Provenance.java | 266 + .../src/main/java/io/grafeas/v1/Recipe.java | 1954 ++++ .../java/io/grafeas/v1/RecipeOrBuilder.java | 201 + .../main/java/io/grafeas/v1/RelatedUrl.java | 744 ++ .../io/grafeas/v1/RelatedUrlOrBuilder.java | 49 + .../src/main/java/io/grafeas/v1/RepoId.java | 955 ++ .../java/io/grafeas/v1/RepoIdOrBuilder.java | 67 + .../src/main/java/io/grafeas/v1/Severity.java | 201 + .../io/grafeas/v1/SeverityOuterClass.java | 40 + .../main/java/io/grafeas/v1/Signature.java | 812 ++ .../io/grafeas/v1/SignatureOrBuilder.java | 70 + .../java/io/grafeas/v1/SlsaProvenance.java | 6801 ++++++++++++++ .../grafeas/v1/SlsaProvenanceOrBuilder.java | 146 + .../io/grafeas/v1/SlsaProvenanceProto.java | 143 + .../io/grafeas/v1/SlsaProvenanceZeroTwo.java | 6962 ++++++++++++++ .../v1/SlsaProvenanceZeroTwoOrBuilder.java | 105 + .../v1/SlsaProvenanceZeroTwoProto.java | 174 + .../src/main/java/io/grafeas/v1/Source.java | 1709 ++++ .../java/io/grafeas/v1/SourceContext.java | 1583 ++++ .../io/grafeas/v1/SourceContextOrBuilder.java | 146 + .../java/io/grafeas/v1/SourceOrBuilder.java | 196 + .../src/main/java/io/grafeas/v1/Subject.java | 900 ++ .../java/io/grafeas/v1/SubjectOrBuilder.java | 90 + .../java/io/grafeas/v1/UpdateNoteRequest.java | 1045 +++ .../v1/UpdateNoteRequestOrBuilder.java | 85 + .../grafeas/v1/UpdateOccurrenceRequest.java | 1045 +++ .../v1/UpdateOccurrenceRequestOrBuilder.java | 85 + .../src/main/java/io/grafeas/v1/Upgrade.java | 130 + .../io/grafeas/v1/UpgradeDistribution.java | 1177 +++ .../v1/UpgradeDistributionOrBuilder.java | 118 + .../main/java/io/grafeas/v1/UpgradeNote.java | 1502 +++ .../io/grafeas/v1/UpgradeNoteOrBuilder.java | 130 + .../java/io/grafeas/v1/UpgradeOccurrence.java | 1311 +++ .../v1/UpgradeOccurrenceOrBuilder.java | 119 + .../src/main/java/io/grafeas/v1/Version.java | 1398 +++ .../java/io/grafeas/v1/VersionOrBuilder.java | 119 + .../java/io/grafeas/v1/Vulnerability.java | 171 + .../java/io/grafeas/v1/VulnerabilityNote.java | 8231 +++++++++++++++++ .../v1/VulnerabilityNoteOrBuilder.java | 248 + .../grafeas/v1/VulnerabilityOccurrence.java | 5542 +++++++++++ .../v1/VulnerabilityOccurrenceOrBuilder.java | 314 + .../java/io/grafeas/v1/WindowsUpdate.java | 3538 +++++++ .../io/grafeas/v1/WindowsUpdateOrBuilder.java | 212 + .../java/io/grafeas/v1/gapic_metadata.json | 60 + .../main/java/io/grafeas/v1/package-info.java | 54 + .../java/io/grafeas/v1/stub/GrafeasStub.java | 133 + .../grafeas/v1/stub/GrafeasStubSettings.java | 819 ++ .../v1/stub/GrpcGrafeasCallableFactory.java | 113 + .../io/grafeas/v1/stub/GrpcGrafeasStub.java | 607 ++ .../main/proto/grafeas/v1/attestation.proto | 90 + .../v1/src/main/proto/grafeas/v1/build.proto | 62 + .../v1/src/main/proto/grafeas/v1/common.proto | 150 + .../main/proto/grafeas/v1/compliance.proto | 82 + .../v1/src/main/proto/grafeas/v1/cvss.proto | 166 + .../main/proto/grafeas/v1/deployment.proto | 66 + .../src/main/proto/grafeas/v1/discovery.proto | 104 + .../proto/grafeas/v1/dsse_attestation.proto | 52 + .../src/main/proto/grafeas/v1/grafeas.proto | 544 ++ .../v1/src/main/proto/grafeas/v1/image.proto | 83 + .../proto/grafeas/v1/intoto_provenance.proto | 113 + .../proto/grafeas/v1/intoto_statement.proto | 52 + .../src/main/proto/grafeas/v1/package.proto | 192 + .../main/proto/grafeas/v1/provenance.proto | 265 + .../src/main/proto/grafeas/v1/severity.proto | 38 + .../proto/grafeas/v1/slsa_provenance.proto | 115 + .../grafeas/v1/slsa_provenance_zero_two.proto | 82 + .../src/main/proto/grafeas/v1/upgrade.proto | 114 + .../main/proto/grafeas/v1/vulnerability.proto | 257 + .../java/io/grafeas/v1/GrafeasClientTest.java | 1350 +++ .../test/java/io/grafeas/v1/MockGrafeas.java | 59 + .../java/io/grafeas/v1/MockGrafeasImpl.java | 353 + 221 files changed, 151616 insertions(+) create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java new file mode 100644 index 000000000000..12e573038b9c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java @@ -0,0 +1,866 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * An alias to a repo revision.
+ * 
+ * + * Protobuf type {@code grafeas.v1.AliasContext} + */ +public final class AliasContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.AliasContext) + AliasContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use AliasContext.newBuilder() to construct. + private AliasContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AliasContext() { + kind_ = 0; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AliasContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AliasContext.class, io.grafeas.v1.AliasContext.Builder.class); + } + + /** + *
+   * The type of an alias.
+   * 
+ * + * Protobuf enum {@code grafeas.v1.AliasContext.Kind} + */ + public enum Kind + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown.
+     * 
+ * + * KIND_UNSPECIFIED = 0; + */ + KIND_UNSPECIFIED(0), + /** + *
+     * Git tag.
+     * 
+ * + * FIXED = 1; + */ + FIXED(1), + /** + *
+     * Git branch.
+     * 
+ * + * MOVABLE = 2; + */ + MOVABLE(2), + /** + *
+     * Used to specify non-standard aliases. For example, if a Git repo has a
+     * ref named "refs/foo/bar".
+     * 
+ * + * OTHER = 4; + */ + OTHER(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unknown.
+     * 
+ * + * KIND_UNSPECIFIED = 0; + */ + public static final int KIND_UNSPECIFIED_VALUE = 0; + /** + *
+     * Git tag.
+     * 
+ * + * FIXED = 1; + */ + public static final int FIXED_VALUE = 1; + /** + *
+     * Git branch.
+     * 
+ * + * MOVABLE = 2; + */ + public static final int MOVABLE_VALUE = 2; + /** + *
+     * Used to specify non-standard aliases. For example, if a Git repo has a
+     * ref named "refs/foo/bar".
+     * 
+ * + * OTHER = 4; + */ + public static final int OTHER_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Kind valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Kind forNumber(int value) { + switch (value) { + case 0: return KIND_UNSPECIFIED; + case 1: return FIXED; + case 2: return MOVABLE; + case 4: return OTHER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Kind> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Kind findValueByNumber(int number) { + return Kind.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.AliasContext.getDescriptor().getEnumTypes().get(0); + } + + private static final Kind[] VALUES = values(); + + public static Kind valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Kind(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.AliasContext.Kind) + } + + public static final int KIND_FIELD_NUMBER = 1; + private int kind_ = 0; + /** + *
+   * The alias kind.
+   * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+   * The alias kind.
+   * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @return The kind. + */ + @java.lang.Override public io.grafeas.v1.AliasContext.Kind getKind() { + io.grafeas.v1.AliasContext.Kind result = io.grafeas.v1.AliasContext.Kind.forNumber(kind_); + return result == null ? io.grafeas.v1.AliasContext.Kind.UNRECOGNIZED : result; + } + + public static final int NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The alias name.
+   * 
+ * + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The alias name.
+   * 
+ * + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (kind_ != io.grafeas.v1.AliasContext.Kind.KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(1, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kind_ != io.grafeas.v1.AliasContext.Kind.KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.AliasContext)) { + return super.equals(obj); + } + io.grafeas.v1.AliasContext other = (io.grafeas.v1.AliasContext) obj; + + if (kind_ != other.kind_) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + kind_; + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.AliasContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AliasContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AliasContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AliasContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AliasContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AliasContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AliasContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AliasContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AliasContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.AliasContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AliasContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AliasContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.AliasContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An alias to a repo revision.
+   * 
+ * + * Protobuf type {@code grafeas.v1.AliasContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.AliasContext) + io.grafeas.v1.AliasContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AliasContext.class, io.grafeas.v1.AliasContext.Builder.class); + } + + // Construct using io.grafeas.v1.AliasContext.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kind_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.AliasContext getDefaultInstanceForType() { + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.AliasContext build() { + io.grafeas.v1.AliasContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.AliasContext buildPartial() { + io.grafeas.v1.AliasContext result = new io.grafeas.v1.AliasContext(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.AliasContext result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.AliasContext) { + return mergeFrom((io.grafeas.v1.AliasContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.AliasContext other) { + if (other == io.grafeas.v1.AliasContext.getDefaultInstance()) return this; + if (other.kind_ != 0) { + setKindValue(other.getKindValue()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + kind_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int kind_ = 0; + /** + *
+     * The alias kind.
+     * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+     * The alias kind.
+     * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @param value The enum numeric value on the wire for kind to set. + * @return This builder for chaining. + */ + public Builder setKindValue(int value) { + kind_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The alias kind.
+     * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @return The kind. + */ + @java.lang.Override + public io.grafeas.v1.AliasContext.Kind getKind() { + io.grafeas.v1.AliasContext.Kind result = io.grafeas.v1.AliasContext.Kind.forNumber(kind_); + return result == null ? io.grafeas.v1.AliasContext.Kind.UNRECOGNIZED : result; + } + /** + *
+     * The alias kind.
+     * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(io.grafeas.v1.AliasContext.Kind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The alias kind.
+     * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @return This builder for chaining. + */ + public Builder clearKind() { + bitField0_ = (bitField0_ & ~0x00000001); + kind_ = 0; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * The alias name.
+     * 
+ * + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The alias name.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The alias name.
+     * 
+ * + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The alias name.
+     * 
+ * + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The alias name.
+     * 
+ * + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.AliasContext) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.AliasContext) + private static final io.grafeas.v1.AliasContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.AliasContext(); + } + + public static io.grafeas.v1.AliasContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AliasContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.AliasContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java new file mode 100644 index 000000000000..18b16f1a420a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface AliasContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.AliasContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The alias kind.
+   * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @return The enum numeric value on the wire for kind. + */ + int getKindValue(); + /** + *
+   * The alias kind.
+   * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @return The kind. + */ + io.grafeas.v1.AliasContext.Kind getKind(); + + /** + *
+   * The alias name.
+   * 
+ * + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The alias name.
+   * 
+ * + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java new file mode 100644 index 000000000000..740aa9f3ebd0 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java @@ -0,0 +1,150 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +/** + *
+ * Instruction set architectures supported by various package managers.
+ * 
+ * + * Protobuf enum {@code grafeas.v1.Architecture} + */ +public enum Architecture + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unknown architecture.
+   * 
+ * + * ARCHITECTURE_UNSPECIFIED = 0; + */ + ARCHITECTURE_UNSPECIFIED(0), + /** + *
+   * X86 architecture.
+   * 
+ * + * X86 = 1; + */ + X86(1), + /** + *
+   * X64 architecture.
+   * 
+ * + * X64 = 2; + */ + X64(2), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unknown architecture.
+   * 
+ * + * ARCHITECTURE_UNSPECIFIED = 0; + */ + public static final int ARCHITECTURE_UNSPECIFIED_VALUE = 0; + /** + *
+   * X86 architecture.
+   * 
+ * + * X86 = 1; + */ + public static final int X86_VALUE = 1; + /** + *
+   * X64 architecture.
+   * 
+ * + * X64 = 2; + */ + public static final int X64_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Architecture valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Architecture forNumber(int value) { + switch (value) { + case 0: return ARCHITECTURE_UNSPECIFIED; + case 1: return X86; + case 2: return X64; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Architecture> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Architecture findValueByNumber(int number) { + return Architecture.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.Package.getDescriptor().getEnumTypes().get(0); + } + + private static final Architecture[] VALUES = values(); + + public static Architecture valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Architecture(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.Architecture) +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java new file mode 100644 index 000000000000..f1fec349b1e6 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java @@ -0,0 +1,1047 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Artifact describes a build product.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Artifact} + */ +public final class Artifact extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Artifact) + ArtifactOrBuilder { +private static final long serialVersionUID = 0L; + // Use Artifact.newBuilder() to construct. + private Artifact(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Artifact() { + checksum_ = ""; + id_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Artifact(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Artifact.class, io.grafeas.v1.Artifact.Builder.class); + } + + public static final int CHECKSUM_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object checksum_ = ""; + /** + *
+   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+   * container.
+   * 
+ * + * string checksum = 1; + * @return The checksum. + */ + @java.lang.Override + public java.lang.String getChecksum() { + java.lang.Object ref = checksum_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + checksum_ = s; + return s; + } + } + /** + *
+   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+   * container.
+   * 
+ * + * string checksum = 1; + * @return The bytes for checksum. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChecksumBytes() { + java.lang.Object ref = checksum_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + checksum_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * Artifact ID, if any; for container images, this will be a URL by digest
+   * like `gcr.io/projectID/imagename@sha256:123456`.
+   * 
+ * + * string id = 2; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * Artifact ID, if any; for container images, this will be a URL by digest
+   * like `gcr.io/projectID/imagename@sha256:123456`.
+   * 
+ * + * string id = 2; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAMES_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList names_; + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList + getNamesList() { + return names_; + } + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(checksum_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, checksum_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + for (int i = 0; i < names_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, names_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(checksum_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, checksum_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += computeStringSizeNoTag(names_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Artifact)) { + return super.equals(obj); + } + io.grafeas.v1.Artifact other = (io.grafeas.v1.Artifact) obj; + + if (!getChecksum() + .equals(other.getChecksum())) return false; + if (!getId() + .equals(other.getId())) return false; + if (!getNamesList() + .equals(other.getNamesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHECKSUM_FIELD_NUMBER; + hash = (53 * hash) + getChecksum().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Artifact parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Artifact parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Artifact parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Artifact parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Artifact parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Artifact parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Artifact parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Artifact parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Artifact parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Artifact parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Artifact parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Artifact parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Artifact prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Artifact describes a build product.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Artifact} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Artifact) + io.grafeas.v1.ArtifactOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Artifact.class, io.grafeas.v1.Artifact.Builder.class); + } + + // Construct using io.grafeas.v1.Artifact.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + checksum_ = ""; + id_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Artifact getDefaultInstanceForType() { + return io.grafeas.v1.Artifact.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Artifact build() { + io.grafeas.v1.Artifact result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Artifact buildPartial() { + io.grafeas.v1.Artifact result = new io.grafeas.v1.Artifact(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.Artifact result) { + if (((bitField0_ & 0x00000004) != 0)) { + names_ = names_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.names_ = names_; + } + + private void buildPartial0(io.grafeas.v1.Artifact result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.checksum_ = checksum_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Artifact) { + return mergeFrom((io.grafeas.v1.Artifact)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Artifact other) { + if (other == io.grafeas.v1.Artifact.getDefaultInstance()) return this; + if (!other.getChecksum().isEmpty()) { + checksum_ = other.checksum_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + checksum_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureNamesIsMutable(); + names_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object checksum_ = ""; + /** + *
+     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+     * container.
+     * 
+ * + * string checksum = 1; + * @return The checksum. + */ + public java.lang.String getChecksum() { + java.lang.Object ref = checksum_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + checksum_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+     * container.
+     * 
+ * + * string checksum = 1; + * @return The bytes for checksum. + */ + public com.google.protobuf.ByteString + getChecksumBytes() { + java.lang.Object ref = checksum_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + checksum_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+     * container.
+     * 
+ * + * string checksum = 1; + * @param value The checksum to set. + * @return This builder for chaining. + */ + public Builder setChecksum( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + checksum_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+     * container.
+     * 
+ * + * string checksum = 1; + * @return This builder for chaining. + */ + public Builder clearChecksum() { + checksum_ = getDefaultInstance().getChecksum(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+     * container.
+     * 
+ * + * string checksum = 1; + * @param value The bytes for checksum to set. + * @return This builder for chaining. + */ + public Builder setChecksumBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + checksum_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + *
+     * Artifact ID, if any; for container images, this will be a URL by digest
+     * like `gcr.io/projectID/imagename@sha256:123456`.
+     * 
+ * + * string id = 2; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Artifact ID, if any; for container images, this will be a URL by digest
+     * like `gcr.io/projectID/imagename@sha256:123456`.
+     * 
+ * + * string id = 2; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Artifact ID, if any; for container images, this will be a URL by digest
+     * like `gcr.io/projectID/imagename@sha256:123456`.
+     * 
+ * + * string id = 2; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Artifact ID, if any; for container images, this will be a URL by digest
+     * like `gcr.io/projectID/imagename@sha256:123456`.
+     * 
+ * + * string id = 2; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Artifact ID, if any; for container images, this will be a URL by digest
+     * like `gcr.io/projectID/imagename@sha256:123456`.
+     * 
+ * + * string id = 2; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureNamesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList + getNamesList() { + return names_.getUnmodifiableView(); + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @param index The index to set the value at. + * @param value The names to set. + * @return This builder for chaining. + */ + public Builder setNames( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureNamesIsMutable(); + names_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @param value The names to add. + * @return This builder for chaining. + */ + public Builder addNames( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @param values The names to add. + * @return This builder for chaining. + */ + public Builder addAllNames( + java.lang.Iterable values) { + ensureNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, names_); + onChanged(); + return this; + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @return This builder for chaining. + */ + public Builder clearNames() { + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @param value The bytes of the names to add. + * @return This builder for chaining. + */ + public Builder addNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Artifact) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Artifact) + private static final io.grafeas.v1.Artifact DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Artifact(); + } + + public static io.grafeas.v1.Artifact getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Artifact parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Artifact getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java new file mode 100644 index 000000000000..c60add69d210 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface ArtifactOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Artifact) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+   * container.
+   * 
+ * + * string checksum = 1; + * @return The checksum. + */ + java.lang.String getChecksum(); + /** + *
+   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+   * container.
+   * 
+ * + * string checksum = 1; + * @return The bytes for checksum. + */ + com.google.protobuf.ByteString + getChecksumBytes(); + + /** + *
+   * Artifact ID, if any; for container images, this will be a URL by digest
+   * like `gcr.io/projectID/imagename@sha256:123456`.
+   * 
+ * + * string id = 2; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * Artifact ID, if any; for container images, this will be a URL by digest
+   * like `gcr.io/projectID/imagename@sha256:123456`.
+   * 
+ * + * string id = 2; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @return A list containing the names. + */ + java.util.List + getNamesList(); + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @return The count of names. + */ + int getNamesCount(); + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @param index The index of the element to return. + * @return The names at the given index. + */ + java.lang.String getNames(int index); + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + com.google.protobuf.ByteString + getNamesBytes(int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java new file mode 100644 index 000000000000..ba5a83c6bff3 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/attestation.proto + +package io.grafeas.v1; + +public final class Attestation { + private Attestation() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_AttestationNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_AttestationNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_AttestationNote_Hint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Jwt_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Jwt_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_AttestationOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034grafeas/v1/attestation.proto\022\ngrafeas." + + "v1\032\027grafeas/v1/common.proto\"f\n\017Attestati" + + "onNote\022.\n\004hint\030\001 \001(\0132 .grafeas.v1.Attest" + + "ationNote.Hint\032#\n\004Hint\022\033\n\023human_readable" + + "_name\030\001 \001(\t\"\032\n\003Jwt\022\023\n\013compact_jwt\030\001 \001(\t\"" + + "}\n\025AttestationOccurrence\022\032\n\022serialized_p" + + "ayload\030\001 \001(\014\022)\n\nsignatures\030\002 \003(\0132\025.grafe" + + "as.v1.Signature\022\035\n\004jwts\030\003 \003(\0132\017.grafeas." + + "v1.JwtBQ\n\rio.grafeas.v1P\001Z8google.golang" + + ".org/genproto/googleapis/grafeas/v1;graf" + + "eas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grafeas.v1.Common.getDescriptor(), + }); + internal_static_grafeas_v1_AttestationNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_AttestationNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_AttestationNote_descriptor, + new java.lang.String[] { "Hint", }); + internal_static_grafeas_v1_AttestationNote_Hint_descriptor = + internal_static_grafeas_v1_AttestationNote_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_AttestationNote_Hint_descriptor, + new java.lang.String[] { "HumanReadableName", }); + internal_static_grafeas_v1_Jwt_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Jwt_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Jwt_descriptor, + new java.lang.String[] { "CompactJwt", }); + internal_static_grafeas_v1_AttestationOccurrence_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_AttestationOccurrence_descriptor, + new java.lang.String[] { "SerializedPayload", "Signatures", "Jwts", }); + io.grafeas.v1.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java new file mode 100644 index 000000000000..05af36fada4c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java @@ -0,0 +1,1279 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/attestation.proto + +package io.grafeas.v1; + +/** + *
+ * Note kind that represents a logical attestation "role" or "authority". For
+ * example, an organization might have one `Authority` for "QA" and one for
+ * "build". This note is intended to act strictly as a grouping mechanism for
+ * the attached occurrences (Attestations). This grouping mechanism also
+ * provides a security boundary, since IAM ACLs gate the ability for a principle
+ * to attach an occurrence to a given note. It also provides a single point of
+ * lookup to find all attached attestation occurrences, even if they don't all
+ * live in the same project.
+ * 
+ * + * Protobuf type {@code grafeas.v1.AttestationNote} + */ +public final class AttestationNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.AttestationNote) + AttestationNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use AttestationNote.newBuilder() to construct. + private AttestationNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttestationNote() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttestationNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AttestationNote.class, io.grafeas.v1.AttestationNote.Builder.class); + } + + public interface HintOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.AttestationNote.Hint) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "qa".
+     * 
+ * + * string human_readable_name = 1; + * @return The humanReadableName. + */ + java.lang.String getHumanReadableName(); + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "qa".
+     * 
+ * + * string human_readable_name = 1; + * @return The bytes for humanReadableName. + */ + com.google.protobuf.ByteString + getHumanReadableNameBytes(); + } + /** + *
+   * This submessage provides human-readable hints about the purpose of the
+   * authority. Because the name of a note acts as its resource reference, it is
+   * important to disambiguate the canonical name of the Note (which might be a
+   * UUID for security purposes) from "readable" names more suitable for debug
+   * output. Note that these hints should not be used to look up authorities in
+   * security sensitive contexts, such as when looking up attestations to
+   * verify.
+   * 
+ * + * Protobuf type {@code grafeas.v1.AttestationNote.Hint} + */ + public static final class Hint extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.AttestationNote.Hint) + HintOrBuilder { + private static final long serialVersionUID = 0L; + // Use Hint.newBuilder() to construct. + private Hint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Hint() { + humanReadableName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Hint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AttestationNote.Hint.class, io.grafeas.v1.AttestationNote.Hint.Builder.class); + } + + public static final int HUMAN_READABLE_NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object humanReadableName_ = ""; + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "qa".
+     * 
+ * + * string human_readable_name = 1; + * @return The humanReadableName. + */ + @java.lang.Override + public java.lang.String getHumanReadableName() { + java.lang.Object ref = humanReadableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + humanReadableName_ = s; + return s; + } + } + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "qa".
+     * 
+ * + * string human_readable_name = 1; + * @return The bytes for humanReadableName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHumanReadableNameBytes() { + java.lang.Object ref = humanReadableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + humanReadableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, humanReadableName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, humanReadableName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.AttestationNote.Hint)) { + return super.equals(obj); + } + io.grafeas.v1.AttestationNote.Hint other = (io.grafeas.v1.AttestationNote.Hint) obj; + + if (!getHumanReadableName() + .equals(other.getHumanReadableName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HUMAN_READABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getHumanReadableName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote.Hint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationNote.Hint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.AttestationNote.Hint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * This submessage provides human-readable hints about the purpose of the
+     * authority. Because the name of a note acts as its resource reference, it is
+     * important to disambiguate the canonical name of the Note (which might be a
+     * UUID for security purposes) from "readable" names more suitable for debug
+     * output. Note that these hints should not be used to look up authorities in
+     * security sensitive contexts, such as when looking up attestations to
+     * verify.
+     * 
+ * + * Protobuf type {@code grafeas.v1.AttestationNote.Hint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.AttestationNote.Hint) + io.grafeas.v1.AttestationNote.HintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AttestationNote.Hint.class, io.grafeas.v1.AttestationNote.Hint.Builder.class); + } + + // Construct using io.grafeas.v1.AttestationNote.Hint.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + humanReadableName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote.Hint getDefaultInstanceForType() { + return io.grafeas.v1.AttestationNote.Hint.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote.Hint build() { + io.grafeas.v1.AttestationNote.Hint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote.Hint buildPartial() { + io.grafeas.v1.AttestationNote.Hint result = new io.grafeas.v1.AttestationNote.Hint(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.AttestationNote.Hint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.humanReadableName_ = humanReadableName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.AttestationNote.Hint) { + return mergeFrom((io.grafeas.v1.AttestationNote.Hint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.AttestationNote.Hint other) { + if (other == io.grafeas.v1.AttestationNote.Hint.getDefaultInstance()) return this; + if (!other.getHumanReadableName().isEmpty()) { + humanReadableName_ = other.humanReadableName_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + humanReadableName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object humanReadableName_ = ""; + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "qa".
+       * 
+ * + * string human_readable_name = 1; + * @return The humanReadableName. + */ + public java.lang.String getHumanReadableName() { + java.lang.Object ref = humanReadableName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + humanReadableName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "qa".
+       * 
+ * + * string human_readable_name = 1; + * @return The bytes for humanReadableName. + */ + public com.google.protobuf.ByteString + getHumanReadableNameBytes() { + java.lang.Object ref = humanReadableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + humanReadableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "qa".
+       * 
+ * + * string human_readable_name = 1; + * @param value The humanReadableName to set. + * @return This builder for chaining. + */ + public Builder setHumanReadableName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + humanReadableName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "qa".
+       * 
+ * + * string human_readable_name = 1; + * @return This builder for chaining. + */ + public Builder clearHumanReadableName() { + humanReadableName_ = getDefaultInstance().getHumanReadableName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "qa".
+       * 
+ * + * string human_readable_name = 1; + * @param value The bytes for humanReadableName to set. + * @return This builder for chaining. + */ + public Builder setHumanReadableNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + humanReadableName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.AttestationNote.Hint) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.AttestationNote.Hint) + private static final io.grafeas.v1.AttestationNote.Hint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.AttestationNote.Hint(); + } + + public static io.grafeas.v1.AttestationNote.Hint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Hint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote.Hint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int HINT_FIELD_NUMBER = 1; + private io.grafeas.v1.AttestationNote.Hint hint_; + /** + *
+   * Hint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + * @return Whether the hint field is set. + */ + @java.lang.Override + public boolean hasHint() { + return hint_ != null; + } + /** + *
+   * Hint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + * @return The hint. + */ + @java.lang.Override + public io.grafeas.v1.AttestationNote.Hint getHint() { + return hint_ == null ? io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; + } + /** + *
+   * Hint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + @java.lang.Override + public io.grafeas.v1.AttestationNote.HintOrBuilder getHintOrBuilder() { + return hint_ == null ? io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (hint_ != null) { + output.writeMessage(1, getHint()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (hint_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getHint()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.AttestationNote)) { + return super.equals(obj); + } + io.grafeas.v1.AttestationNote other = (io.grafeas.v1.AttestationNote) obj; + + if (hasHint() != other.hasHint()) return false; + if (hasHint()) { + if (!getHint() + .equals(other.getHint())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHint()) { + hash = (37 * hash) + HINT_FIELD_NUMBER; + hash = (53 * hash) + getHint().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.AttestationNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.AttestationNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Note kind that represents a logical attestation "role" or "authority". For
+   * example, an organization might have one `Authority` for "QA" and one for
+   * "build". This note is intended to act strictly as a grouping mechanism for
+   * the attached occurrences (Attestations). This grouping mechanism also
+   * provides a security boundary, since IAM ACLs gate the ability for a principle
+   * to attach an occurrence to a given note. It also provides a single point of
+   * lookup to find all attached attestation occurrences, even if they don't all
+   * live in the same project.
+   * 
+ * + * Protobuf type {@code grafeas.v1.AttestationNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.AttestationNote) + io.grafeas.v1.AttestationNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AttestationNote.class, io.grafeas.v1.AttestationNote.Builder.class); + } + + // Construct using io.grafeas.v1.AttestationNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + hint_ = null; + if (hintBuilder_ != null) { + hintBuilder_.dispose(); + hintBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote getDefaultInstanceForType() { + return io.grafeas.v1.AttestationNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote build() { + io.grafeas.v1.AttestationNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote buildPartial() { + io.grafeas.v1.AttestationNote result = new io.grafeas.v1.AttestationNote(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.AttestationNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.hint_ = hintBuilder_ == null + ? hint_ + : hintBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.AttestationNote) { + return mergeFrom((io.grafeas.v1.AttestationNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.AttestationNote other) { + if (other == io.grafeas.v1.AttestationNote.getDefaultInstance()) return this; + if (other.hasHint()) { + mergeHint(other.getHint()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getHintFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.AttestationNote.Hint hint_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationNote.Hint, io.grafeas.v1.AttestationNote.Hint.Builder, io.grafeas.v1.AttestationNote.HintOrBuilder> hintBuilder_; + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + * @return Whether the hint field is set. + */ + public boolean hasHint() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + * @return The hint. + */ + public io.grafeas.v1.AttestationNote.Hint getHint() { + if (hintBuilder_ == null) { + return hint_ == null ? io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; + } else { + return hintBuilder_.getMessage(); + } + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + public Builder setHint(io.grafeas.v1.AttestationNote.Hint value) { + if (hintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hint_ = value; + } else { + hintBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + public Builder setHint( + io.grafeas.v1.AttestationNote.Hint.Builder builderForValue) { + if (hintBuilder_ == null) { + hint_ = builderForValue.build(); + } else { + hintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + public Builder mergeHint(io.grafeas.v1.AttestationNote.Hint value) { + if (hintBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + hint_ != null && + hint_ != io.grafeas.v1.AttestationNote.Hint.getDefaultInstance()) { + getHintBuilder().mergeFrom(value); + } else { + hint_ = value; + } + } else { + hintBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + public Builder clearHint() { + bitField0_ = (bitField0_ & ~0x00000001); + hint_ = null; + if (hintBuilder_ != null) { + hintBuilder_.dispose(); + hintBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + public io.grafeas.v1.AttestationNote.Hint.Builder getHintBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHintFieldBuilder().getBuilder(); + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + public io.grafeas.v1.AttestationNote.HintOrBuilder getHintOrBuilder() { + if (hintBuilder_ != null) { + return hintBuilder_.getMessageOrBuilder(); + } else { + return hint_ == null ? + io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; + } + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationNote.Hint, io.grafeas.v1.AttestationNote.Hint.Builder, io.grafeas.v1.AttestationNote.HintOrBuilder> + getHintFieldBuilder() { + if (hintBuilder_ == null) { + hintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationNote.Hint, io.grafeas.v1.AttestationNote.Hint.Builder, io.grafeas.v1.AttestationNote.HintOrBuilder>( + getHint(), + getParentForChildren(), + isClean()); + hint_ = null; + } + return hintBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.AttestationNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.AttestationNote) + private static final io.grafeas.v1.AttestationNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.AttestationNote(); + } + + public static io.grafeas.v1.AttestationNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttestationNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java new file mode 100644 index 000000000000..202623bd6817 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/attestation.proto + +package io.grafeas.v1; + +public interface AttestationNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.AttestationNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Hint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + * @return Whether the hint field is set. + */ + boolean hasHint(); + /** + *
+   * Hint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + * @return The hint. + */ + io.grafeas.v1.AttestationNote.Hint getHint(); + /** + *
+   * Hint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + io.grafeas.v1.AttestationNote.HintOrBuilder getHintOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java new file mode 100644 index 000000000000..20b2893ff31b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java @@ -0,0 +1,1658 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/attestation.proto + +package io.grafeas.v1; + +/** + *
+ * Occurrence that represents a single "attestation". The authenticity of an
+ * attestation can be verified using the attached signature. If the verifier
+ * trusts the public key of the signer, then verifying the signature is
+ * sufficient to establish trust. In this circumstance, the authority to which
+ * this attestation is attached is primarily useful for lookup (how to find
+ * this attestation if you already know the authority and artifact to be
+ * verified) and intent (for which authority this attestation was intended to
+ * sign.
+ * 
+ * + * Protobuf type {@code grafeas.v1.AttestationOccurrence} + */ +public final class AttestationOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.AttestationOccurrence) + AttestationOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use AttestationOccurrence.newBuilder() to construct. + private AttestationOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttestationOccurrence() { + serializedPayload_ = com.google.protobuf.ByteString.EMPTY; + signatures_ = java.util.Collections.emptyList(); + jwts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttestationOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AttestationOccurrence.class, io.grafeas.v1.AttestationOccurrence.Builder.class); + } + + public static final int SERIALIZED_PAYLOAD_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString serializedPayload_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+   * Required. The serialized payload that is verified by one or more
+   * `signatures`.
+   * 
+ * + * bytes serialized_payload = 1; + * @return The serializedPayload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSerializedPayload() { + return serializedPayload_; + } + + public static final int SIGNATURES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List signatures_; + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + @java.lang.Override + public java.util.List getSignaturesList() { + return signatures_; + } + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + @java.lang.Override + public java.util.List + getSignaturesOrBuilderList() { + return signatures_; + } + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + @java.lang.Override + public int getSignaturesCount() { + return signatures_.size(); + } + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + @java.lang.Override + public io.grafeas.v1.Signature getSignatures(int index) { + return signatures_.get(index); + } + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + @java.lang.Override + public io.grafeas.v1.SignatureOrBuilder getSignaturesOrBuilder( + int index) { + return signatures_.get(index); + } + + public static final int JWTS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List jwts_; + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + @java.lang.Override + public java.util.List getJwtsList() { + return jwts_; + } + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + @java.lang.Override + public java.util.List + getJwtsOrBuilderList() { + return jwts_; + } + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + @java.lang.Override + public int getJwtsCount() { + return jwts_.size(); + } + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + @java.lang.Override + public io.grafeas.v1.Jwt getJwts(int index) { + return jwts_.get(index); + } + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + @java.lang.Override + public io.grafeas.v1.JwtOrBuilder getJwtsOrBuilder( + int index) { + return jwts_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!serializedPayload_.isEmpty()) { + output.writeBytes(1, serializedPayload_); + } + for (int i = 0; i < signatures_.size(); i++) { + output.writeMessage(2, signatures_.get(i)); + } + for (int i = 0; i < jwts_.size(); i++) { + output.writeMessage(3, jwts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!serializedPayload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, serializedPayload_); + } + for (int i = 0; i < signatures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, signatures_.get(i)); + } + for (int i = 0; i < jwts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, jwts_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.AttestationOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.AttestationOccurrence other = (io.grafeas.v1.AttestationOccurrence) obj; + + if (!getSerializedPayload() + .equals(other.getSerializedPayload())) return false; + if (!getSignaturesList() + .equals(other.getSignaturesList())) return false; + if (!getJwtsList() + .equals(other.getJwtsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERIALIZED_PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getSerializedPayload().hashCode(); + if (getSignaturesCount() > 0) { + hash = (37 * hash) + SIGNATURES_FIELD_NUMBER; + hash = (53 * hash) + getSignaturesList().hashCode(); + } + if (getJwtsCount() > 0) { + hash = (37 * hash) + JWTS_FIELD_NUMBER; + hash = (53 * hash) + getJwtsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.AttestationOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AttestationOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.AttestationOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Occurrence that represents a single "attestation". The authenticity of an
+   * attestation can be verified using the attached signature. If the verifier
+   * trusts the public key of the signer, then verifying the signature is
+   * sufficient to establish trust. In this circumstance, the authority to which
+   * this attestation is attached is primarily useful for lookup (how to find
+   * this attestation if you already know the authority and artifact to be
+   * verified) and intent (for which authority this attestation was intended to
+   * sign.
+   * 
+ * + * Protobuf type {@code grafeas.v1.AttestationOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.AttestationOccurrence) + io.grafeas.v1.AttestationOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AttestationOccurrence.class, io.grafeas.v1.AttestationOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.AttestationOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + serializedPayload_ = com.google.protobuf.ByteString.EMPTY; + if (signaturesBuilder_ == null) { + signatures_ = java.util.Collections.emptyList(); + } else { + signatures_ = null; + signaturesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (jwtsBuilder_ == null) { + jwts_ = java.util.Collections.emptyList(); + } else { + jwts_ = null; + jwtsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.AttestationOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.AttestationOccurrence build() { + io.grafeas.v1.AttestationOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.AttestationOccurrence buildPartial() { + io.grafeas.v1.AttestationOccurrence result = new io.grafeas.v1.AttestationOccurrence(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.AttestationOccurrence result) { + if (signaturesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + signatures_ = java.util.Collections.unmodifiableList(signatures_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.signatures_ = signatures_; + } else { + result.signatures_ = signaturesBuilder_.build(); + } + if (jwtsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + jwts_ = java.util.Collections.unmodifiableList(jwts_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.jwts_ = jwts_; + } else { + result.jwts_ = jwtsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.AttestationOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serializedPayload_ = serializedPayload_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.AttestationOccurrence) { + return mergeFrom((io.grafeas.v1.AttestationOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.AttestationOccurrence other) { + if (other == io.grafeas.v1.AttestationOccurrence.getDefaultInstance()) return this; + if (other.getSerializedPayload() != com.google.protobuf.ByteString.EMPTY) { + setSerializedPayload(other.getSerializedPayload()); + } + if (signaturesBuilder_ == null) { + if (!other.signatures_.isEmpty()) { + if (signatures_.isEmpty()) { + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSignaturesIsMutable(); + signatures_.addAll(other.signatures_); + } + onChanged(); + } + } else { + if (!other.signatures_.isEmpty()) { + if (signaturesBuilder_.isEmpty()) { + signaturesBuilder_.dispose(); + signaturesBuilder_ = null; + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000002); + signaturesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSignaturesFieldBuilder() : null; + } else { + signaturesBuilder_.addAllMessages(other.signatures_); + } + } + } + if (jwtsBuilder_ == null) { + if (!other.jwts_.isEmpty()) { + if (jwts_.isEmpty()) { + jwts_ = other.jwts_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureJwtsIsMutable(); + jwts_.addAll(other.jwts_); + } + onChanged(); + } + } else { + if (!other.jwts_.isEmpty()) { + if (jwtsBuilder_.isEmpty()) { + jwtsBuilder_.dispose(); + jwtsBuilder_ = null; + jwts_ = other.jwts_; + bitField0_ = (bitField0_ & ~0x00000004); + jwtsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getJwtsFieldBuilder() : null; + } else { + jwtsBuilder_.addAllMessages(other.jwts_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + serializedPayload_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + io.grafeas.v1.Signature m = + input.readMessage( + io.grafeas.v1.Signature.parser(), + extensionRegistry); + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(m); + } else { + signaturesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + io.grafeas.v1.Jwt m = + input.readMessage( + io.grafeas.v1.Jwt.parser(), + extensionRegistry); + if (jwtsBuilder_ == null) { + ensureJwtsIsMutable(); + jwts_.add(m); + } else { + jwtsBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString serializedPayload_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Required. The serialized payload that is verified by one or more
+     * `signatures`.
+     * 
+ * + * bytes serialized_payload = 1; + * @return The serializedPayload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSerializedPayload() { + return serializedPayload_; + } + /** + *
+     * Required. The serialized payload that is verified by one or more
+     * `signatures`.
+     * 
+ * + * bytes serialized_payload = 1; + * @param value The serializedPayload to set. + * @return This builder for chaining. + */ + public Builder setSerializedPayload(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + serializedPayload_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The serialized payload that is verified by one or more
+     * `signatures`.
+     * 
+ * + * bytes serialized_payload = 1; + * @return This builder for chaining. + */ + public Builder clearSerializedPayload() { + bitField0_ = (bitField0_ & ~0x00000001); + serializedPayload_ = getDefaultInstance().getSerializedPayload(); + onChanged(); + return this; + } + + private java.util.List signatures_ = + java.util.Collections.emptyList(); + private void ensureSignaturesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + signatures_ = new java.util.ArrayList(signatures_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Signature, io.grafeas.v1.Signature.Builder, io.grafeas.v1.SignatureOrBuilder> signaturesBuilder_; + + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public java.util.List getSignaturesList() { + if (signaturesBuilder_ == null) { + return java.util.Collections.unmodifiableList(signatures_); + } else { + return signaturesBuilder_.getMessageList(); + } + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public int getSignaturesCount() { + if (signaturesBuilder_ == null) { + return signatures_.size(); + } else { + return signaturesBuilder_.getCount(); + } + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public io.grafeas.v1.Signature getSignatures(int index) { + if (signaturesBuilder_ == null) { + return signatures_.get(index); + } else { + return signaturesBuilder_.getMessage(index); + } + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder setSignatures( + int index, io.grafeas.v1.Signature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.set(index, value); + onChanged(); + } else { + signaturesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder setSignatures( + int index, io.grafeas.v1.Signature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.set(index, builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder addSignatures(io.grafeas.v1.Signature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(value); + onChanged(); + } else { + signaturesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder addSignatures( + int index, io.grafeas.v1.Signature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(index, value); + onChanged(); + } else { + signaturesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder addSignatures( + io.grafeas.v1.Signature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder addSignatures( + int index, io.grafeas.v1.Signature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(index, builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder addAllSignatures( + java.lang.Iterable values) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, signatures_); + onChanged(); + } else { + signaturesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder clearSignatures() { + if (signaturesBuilder_ == null) { + signatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + signaturesBuilder_.clear(); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder removeSignatures(int index) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.remove(index); + onChanged(); + } else { + signaturesBuilder_.remove(index); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public io.grafeas.v1.Signature.Builder getSignaturesBuilder( + int index) { + return getSignaturesFieldBuilder().getBuilder(index); + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public io.grafeas.v1.SignatureOrBuilder getSignaturesOrBuilder( + int index) { + if (signaturesBuilder_ == null) { + return signatures_.get(index); } else { + return signaturesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public java.util.List + getSignaturesOrBuilderList() { + if (signaturesBuilder_ != null) { + return signaturesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(signatures_); + } + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public io.grafeas.v1.Signature.Builder addSignaturesBuilder() { + return getSignaturesFieldBuilder().addBuilder( + io.grafeas.v1.Signature.getDefaultInstance()); + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public io.grafeas.v1.Signature.Builder addSignaturesBuilder( + int index) { + return getSignaturesFieldBuilder().addBuilder( + index, io.grafeas.v1.Signature.getDefaultInstance()); + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public java.util.List + getSignaturesBuilderList() { + return getSignaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Signature, io.grafeas.v1.Signature.Builder, io.grafeas.v1.SignatureOrBuilder> + getSignaturesFieldBuilder() { + if (signaturesBuilder_ == null) { + signaturesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Signature, io.grafeas.v1.Signature.Builder, io.grafeas.v1.SignatureOrBuilder>( + signatures_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + signatures_ = null; + } + return signaturesBuilder_; + } + + private java.util.List jwts_ = + java.util.Collections.emptyList(); + private void ensureJwtsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + jwts_ = new java.util.ArrayList(jwts_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Jwt, io.grafeas.v1.Jwt.Builder, io.grafeas.v1.JwtOrBuilder> jwtsBuilder_; + + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public java.util.List getJwtsList() { + if (jwtsBuilder_ == null) { + return java.util.Collections.unmodifiableList(jwts_); + } else { + return jwtsBuilder_.getMessageList(); + } + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public int getJwtsCount() { + if (jwtsBuilder_ == null) { + return jwts_.size(); + } else { + return jwtsBuilder_.getCount(); + } + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public io.grafeas.v1.Jwt getJwts(int index) { + if (jwtsBuilder_ == null) { + return jwts_.get(index); + } else { + return jwtsBuilder_.getMessage(index); + } + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder setJwts( + int index, io.grafeas.v1.Jwt value) { + if (jwtsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJwtsIsMutable(); + jwts_.set(index, value); + onChanged(); + } else { + jwtsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder setJwts( + int index, io.grafeas.v1.Jwt.Builder builderForValue) { + if (jwtsBuilder_ == null) { + ensureJwtsIsMutable(); + jwts_.set(index, builderForValue.build()); + onChanged(); + } else { + jwtsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder addJwts(io.grafeas.v1.Jwt value) { + if (jwtsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJwtsIsMutable(); + jwts_.add(value); + onChanged(); + } else { + jwtsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder addJwts( + int index, io.grafeas.v1.Jwt value) { + if (jwtsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJwtsIsMutable(); + jwts_.add(index, value); + onChanged(); + } else { + jwtsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder addJwts( + io.grafeas.v1.Jwt.Builder builderForValue) { + if (jwtsBuilder_ == null) { + ensureJwtsIsMutable(); + jwts_.add(builderForValue.build()); + onChanged(); + } else { + jwtsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder addJwts( + int index, io.grafeas.v1.Jwt.Builder builderForValue) { + if (jwtsBuilder_ == null) { + ensureJwtsIsMutable(); + jwts_.add(index, builderForValue.build()); + onChanged(); + } else { + jwtsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder addAllJwts( + java.lang.Iterable values) { + if (jwtsBuilder_ == null) { + ensureJwtsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, jwts_); + onChanged(); + } else { + jwtsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder clearJwts() { + if (jwtsBuilder_ == null) { + jwts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + jwtsBuilder_.clear(); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder removeJwts(int index) { + if (jwtsBuilder_ == null) { + ensureJwtsIsMutable(); + jwts_.remove(index); + onChanged(); + } else { + jwtsBuilder_.remove(index); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public io.grafeas.v1.Jwt.Builder getJwtsBuilder( + int index) { + return getJwtsFieldBuilder().getBuilder(index); + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public io.grafeas.v1.JwtOrBuilder getJwtsOrBuilder( + int index) { + if (jwtsBuilder_ == null) { + return jwts_.get(index); } else { + return jwtsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public java.util.List + getJwtsOrBuilderList() { + if (jwtsBuilder_ != null) { + return jwtsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(jwts_); + } + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public io.grafeas.v1.Jwt.Builder addJwtsBuilder() { + return getJwtsFieldBuilder().addBuilder( + io.grafeas.v1.Jwt.getDefaultInstance()); + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public io.grafeas.v1.Jwt.Builder addJwtsBuilder( + int index) { + return getJwtsFieldBuilder().addBuilder( + index, io.grafeas.v1.Jwt.getDefaultInstance()); + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public java.util.List + getJwtsBuilderList() { + return getJwtsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Jwt, io.grafeas.v1.Jwt.Builder, io.grafeas.v1.JwtOrBuilder> + getJwtsFieldBuilder() { + if (jwtsBuilder_ == null) { + jwtsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Jwt, io.grafeas.v1.Jwt.Builder, io.grafeas.v1.JwtOrBuilder>( + jwts_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + jwts_ = null; + } + return jwtsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.AttestationOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.AttestationOccurrence) + private static final io.grafeas.v1.AttestationOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.AttestationOccurrence(); + } + + public static io.grafeas.v1.AttestationOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttestationOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.AttestationOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java new file mode 100644 index 000000000000..771f03145fc8 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java @@ -0,0 +1,163 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/attestation.proto + +package io.grafeas.v1; + +public interface AttestationOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.AttestationOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The serialized payload that is verified by one or more
+   * `signatures`.
+   * 
+ * + * bytes serialized_payload = 1; + * @return The serializedPayload. + */ + com.google.protobuf.ByteString getSerializedPayload(); + + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + java.util.List + getSignaturesList(); + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + io.grafeas.v1.Signature getSignatures(int index); + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + int getSignaturesCount(); + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + java.util.List + getSignaturesOrBuilderList(); + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + io.grafeas.v1.SignatureOrBuilder getSignaturesOrBuilder( + int index); + + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + java.util.List + getJwtsList(); + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + io.grafeas.v1.Jwt getJwts(int index); + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + int getJwtsCount(); + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + java.util.List + getJwtsOrBuilderList(); + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + io.grafeas.v1.JwtOrBuilder getJwtsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java new file mode 100644 index 000000000000..0024b9c1f607 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java @@ -0,0 +1,910 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to create notes in batch.
+ * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateNotesRequest} + */ +public final class BatchCreateNotesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateNotesRequest) + BatchCreateNotesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchCreateNotesRequest.newBuilder() to construct. + private BatchCreateNotesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchCreateNotesRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchCreateNotesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetNotes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateNotesRequest.class, io.grafeas.v1.BatchCreateNotesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the notes are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the notes are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTES_FIELD_NUMBER = 2; + private static final class NotesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, io.grafeas.v1.Note> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + io.grafeas.v1.Note.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, io.grafeas.v1.Note> notes_; + private com.google.protobuf.MapField + internalGetNotes() { + if (notes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + NotesDefaultEntryHolder.defaultEntry); + } + return notes_; + } + public int getNotesCount() { + return internalGetNotes().getMap().size(); + } + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public boolean containsNotes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetNotes().getMap().containsKey(key); + } + /** + * Use {@link #getNotesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getNotes() { + return getNotesMap(); + } + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.Map getNotesMap() { + return internalGetNotes().getMap(); + } + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public /* nullable */ +io.grafeas.v1.Note getNotesOrDefault( + java.lang.String key, + /* nullable */ +io.grafeas.v1.Note defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNotes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.Note getNotesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNotes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetNotes(), + NotesDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + for (java.util.Map.Entry entry + : internalGetNotes().getMap().entrySet()) { + com.google.protobuf.MapEntry + notes__ = NotesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, notes__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BatchCreateNotesRequest)) { + return super.equals(obj); + } + io.grafeas.v1.BatchCreateNotesRequest other = (io.grafeas.v1.BatchCreateNotesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!internalGetNotes().equals( + other.internalGetNotes())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (!internalGetNotes().getMap().isEmpty()) { + hash = (37 * hash) + NOTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetNotes().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BatchCreateNotesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to create notes in batch.
+   * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateNotesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateNotesRequest) + io.grafeas.v1.BatchCreateNotesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetNotes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableNotes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateNotesRequest.class, io.grafeas.v1.BatchCreateNotesRequest.Builder.class); + } + + // Construct using io.grafeas.v1.BatchCreateNotesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + internalGetMutableNotes().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesRequest getDefaultInstanceForType() { + return io.grafeas.v1.BatchCreateNotesRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesRequest build() { + io.grafeas.v1.BatchCreateNotesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesRequest buildPartial() { + io.grafeas.v1.BatchCreateNotesRequest result = new io.grafeas.v1.BatchCreateNotesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.BatchCreateNotesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.notes_ = internalGetNotes(); + result.notes_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BatchCreateNotesRequest) { + return mergeFrom((io.grafeas.v1.BatchCreateNotesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BatchCreateNotesRequest other) { + if (other == io.grafeas.v1.BatchCreateNotesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableNotes().mergeFrom( + other.internalGetNotes()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + notes__ = input.readMessage( + NotesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableNotes().getMutableMap().put( + notes__.getKey(), notes__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the notes are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the notes are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the notes are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the notes are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the notes are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, io.grafeas.v1.Note> notes_; + private com.google.protobuf.MapField + internalGetNotes() { + if (notes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + NotesDefaultEntryHolder.defaultEntry); + } + return notes_; + } + private com.google.protobuf.MapField + internalGetMutableNotes() { + if (notes_ == null) { + notes_ = com.google.protobuf.MapField.newMapField( + NotesDefaultEntryHolder.defaultEntry); + } + if (!notes_.isMutable()) { + notes_ = notes_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return notes_; + } + public int getNotesCount() { + return internalGetNotes().getMap().size(); + } + /** + *
+     * The notes to create. Max allowed length is 1000.
+     * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public boolean containsNotes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetNotes().getMap().containsKey(key); + } + /** + * Use {@link #getNotesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getNotes() { + return getNotesMap(); + } + /** + *
+     * The notes to create. Max allowed length is 1000.
+     * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.Map getNotesMap() { + return internalGetNotes().getMap(); + } + /** + *
+     * The notes to create. Max allowed length is 1000.
+     * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public /* nullable */ +io.grafeas.v1.Note getNotesOrDefault( + java.lang.String key, + /* nullable */ +io.grafeas.v1.Note defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNotes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The notes to create. Max allowed length is 1000.
+     * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.Note getNotesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNotes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearNotes() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableNotes().getMutableMap() + .clear(); + return this; + } + /** + *
+     * The notes to create. Max allowed length is 1000.
+     * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeNotes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableNotes().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableNotes() { + bitField0_ |= 0x00000002; + return internalGetMutableNotes().getMutableMap(); + } + /** + *
+     * The notes to create. Max allowed length is 1000.
+     * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder putNotes( + java.lang.String key, + io.grafeas.v1.Note value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableNotes().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * The notes to create. Max allowed length is 1000.
+     * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder putAllNotes( + java.util.Map values) { + internalGetMutableNotes().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateNotesRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateNotesRequest) + private static final io.grafeas.v1.BatchCreateNotesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateNotesRequest(); + } + + public static io.grafeas.v1.BatchCreateNotesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateNotesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java new file mode 100644 index 000000000000..912f5e4cb609 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface BatchCreateNotesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateNotesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the notes are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the notes are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + int getNotesCount(); + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + boolean containsNotes( + java.lang.String key); + /** + * Use {@link #getNotesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getNotes(); + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.Map + getNotesMap(); + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + /* nullable */ +io.grafeas.v1.Note getNotesOrDefault( + java.lang.String key, + /* nullable */ +io.grafeas.v1.Note defaultValue); + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + io.grafeas.v1.Note getNotesOrThrow( + java.lang.String key); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java new file mode 100644 index 000000000000..6066cf15b94f --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java @@ -0,0 +1,862 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Response for creating notes in batch.
+ * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateNotesResponse} + */ +public final class BatchCreateNotesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateNotesResponse) + BatchCreateNotesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchCreateNotesResponse.newBuilder() to construct. + private BatchCreateNotesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchCreateNotesResponse() { + notes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchCreateNotesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateNotesResponse.class, io.grafeas.v1.BatchCreateNotesResponse.Builder.class); + } + + public static final int NOTES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List notes_; + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public java.util.List getNotesList() { + return notes_; + } + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public java.util.List + getNotesOrBuilderList() { + return notes_; + } + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public int getNotesCount() { + return notes_.size(); + } + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public io.grafeas.v1.Note getNotes(int index) { + return notes_.get(index); + } + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( + int index) { + return notes_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < notes_.size(); i++) { + output.writeMessage(1, notes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < notes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, notes_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BatchCreateNotesResponse)) { + return super.equals(obj); + } + io.grafeas.v1.BatchCreateNotesResponse other = (io.grafeas.v1.BatchCreateNotesResponse) obj; + + if (!getNotesList() + .equals(other.getNotesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNotesCount() > 0) { + hash = (37 * hash) + NOTES_FIELD_NUMBER; + hash = (53 * hash) + getNotesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BatchCreateNotesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for creating notes in batch.
+   * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateNotesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateNotesResponse) + io.grafeas.v1.BatchCreateNotesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateNotesResponse.class, io.grafeas.v1.BatchCreateNotesResponse.Builder.class); + } + + // Construct using io.grafeas.v1.BatchCreateNotesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (notesBuilder_ == null) { + notes_ = java.util.Collections.emptyList(); + } else { + notes_ = null; + notesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesResponse getDefaultInstanceForType() { + return io.grafeas.v1.BatchCreateNotesResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesResponse build() { + io.grafeas.v1.BatchCreateNotesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesResponse buildPartial() { + io.grafeas.v1.BatchCreateNotesResponse result = new io.grafeas.v1.BatchCreateNotesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.BatchCreateNotesResponse result) { + if (notesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + notes_ = java.util.Collections.unmodifiableList(notes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.notes_ = notes_; + } else { + result.notes_ = notesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.BatchCreateNotesResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BatchCreateNotesResponse) { + return mergeFrom((io.grafeas.v1.BatchCreateNotesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BatchCreateNotesResponse other) { + if (other == io.grafeas.v1.BatchCreateNotesResponse.getDefaultInstance()) return this; + if (notesBuilder_ == null) { + if (!other.notes_.isEmpty()) { + if (notes_.isEmpty()) { + notes_ = other.notes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNotesIsMutable(); + notes_.addAll(other.notes_); + } + onChanged(); + } + } else { + if (!other.notes_.isEmpty()) { + if (notesBuilder_.isEmpty()) { + notesBuilder_.dispose(); + notesBuilder_ = null; + notes_ = other.notes_; + bitField0_ = (bitField0_ & ~0x00000001); + notesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNotesFieldBuilder() : null; + } else { + notesBuilder_.addAllMessages(other.notes_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.grafeas.v1.Note m = + input.readMessage( + io.grafeas.v1.Note.parser(), + extensionRegistry); + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.add(m); + } else { + notesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List notes_ = + java.util.Collections.emptyList(); + private void ensureNotesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + notes_ = new java.util.ArrayList(notes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> notesBuilder_; + + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public java.util.List getNotesList() { + if (notesBuilder_ == null) { + return java.util.Collections.unmodifiableList(notes_); + } else { + return notesBuilder_.getMessageList(); + } + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public int getNotesCount() { + if (notesBuilder_ == null) { + return notes_.size(); + } else { + return notesBuilder_.getCount(); + } + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note getNotes(int index) { + if (notesBuilder_ == null) { + return notes_.get(index); + } else { + return notesBuilder_.getMessage(index); + } + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder setNotes( + int index, io.grafeas.v1.Note value) { + if (notesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotesIsMutable(); + notes_.set(index, value); + onChanged(); + } else { + notesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder setNotes( + int index, io.grafeas.v1.Note.Builder builderForValue) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.set(index, builderForValue.build()); + onChanged(); + } else { + notesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes(io.grafeas.v1.Note value) { + if (notesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotesIsMutable(); + notes_.add(value); + onChanged(); + } else { + notesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes( + int index, io.grafeas.v1.Note value) { + if (notesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotesIsMutable(); + notes_.add(index, value); + onChanged(); + } else { + notesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes( + io.grafeas.v1.Note.Builder builderForValue) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.add(builderForValue.build()); + onChanged(); + } else { + notesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes( + int index, io.grafeas.v1.Note.Builder builderForValue) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.add(index, builderForValue.build()); + onChanged(); + } else { + notesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addAllNotes( + java.lang.Iterable values) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, notes_); + onChanged(); + } else { + notesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder clearNotes() { + if (notesBuilder_ == null) { + notes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + notesBuilder_.clear(); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder removeNotes(int index) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.remove(index); + onChanged(); + } else { + notesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note.Builder getNotesBuilder( + int index) { + return getNotesFieldBuilder().getBuilder(index); + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( + int index) { + if (notesBuilder_ == null) { + return notes_.get(index); } else { + return notesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public java.util.List + getNotesOrBuilderList() { + if (notesBuilder_ != null) { + return notesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(notes_); + } + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note.Builder addNotesBuilder() { + return getNotesFieldBuilder().addBuilder( + io.grafeas.v1.Note.getDefaultInstance()); + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note.Builder addNotesBuilder( + int index) { + return getNotesFieldBuilder().addBuilder( + index, io.grafeas.v1.Note.getDefaultInstance()); + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public java.util.List + getNotesBuilderList() { + return getNotesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> + getNotesFieldBuilder() { + if (notesBuilder_ == null) { + notesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( + notes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + notes_ = null; + } + return notesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateNotesResponse) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateNotesResponse) + private static final io.grafeas.v1.BatchCreateNotesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateNotesResponse(); + } + + public static io.grafeas.v1.BatchCreateNotesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateNotesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java new file mode 100644 index 000000000000..d59c13740d4a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface BatchCreateNotesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateNotesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + java.util.List + getNotesList(); + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + io.grafeas.v1.Note getNotes(int index); + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + int getNotesCount(); + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + java.util.List + getNotesOrBuilderList(); + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java new file mode 100644 index 000000000000..26827deffd40 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java @@ -0,0 +1,1033 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to create occurrences in batch.
+ * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesRequest} + */ +public final class BatchCreateOccurrencesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateOccurrencesRequest) + BatchCreateOccurrencesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchCreateOccurrencesRequest.newBuilder() to construct. + private BatchCreateOccurrencesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchCreateOccurrencesRequest() { + parent_ = ""; + occurrences_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchCreateOccurrencesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateOccurrencesRequest.class, io.grafeas.v1.BatchCreateOccurrencesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrences are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrences are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OCCURRENCES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List occurrences_; + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getOccurrencesList() { + return occurrences_; + } + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getOccurrencesOrBuilderList() { + return occurrences_; + } + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getOccurrencesCount() { + return occurrences_.size(); + } + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.Occurrence getOccurrences(int index) { + return occurrences_.get(index); + } + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + return occurrences_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < occurrences_.size(); i++) { + output.writeMessage(2, occurrences_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + for (int i = 0; i < occurrences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, occurrences_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BatchCreateOccurrencesRequest)) { + return super.equals(obj); + } + io.grafeas.v1.BatchCreateOccurrencesRequest other = (io.grafeas.v1.BatchCreateOccurrencesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getOccurrencesList() + .equals(other.getOccurrencesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getOccurrencesCount() > 0) { + hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; + hash = (53 * hash) + getOccurrencesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BatchCreateOccurrencesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to create occurrences in batch.
+   * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateOccurrencesRequest) + io.grafeas.v1.BatchCreateOccurrencesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateOccurrencesRequest.class, io.grafeas.v1.BatchCreateOccurrencesRequest.Builder.class); + } + + // Construct using io.grafeas.v1.BatchCreateOccurrencesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + } else { + occurrences_ = null; + occurrencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesRequest getDefaultInstanceForType() { + return io.grafeas.v1.BatchCreateOccurrencesRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesRequest build() { + io.grafeas.v1.BatchCreateOccurrencesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesRequest buildPartial() { + io.grafeas.v1.BatchCreateOccurrencesRequest result = new io.grafeas.v1.BatchCreateOccurrencesRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.BatchCreateOccurrencesRequest result) { + if (occurrencesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + occurrences_ = java.util.Collections.unmodifiableList(occurrences_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.occurrences_ = occurrences_; + } else { + result.occurrences_ = occurrencesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.BatchCreateOccurrencesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BatchCreateOccurrencesRequest) { + return mergeFrom((io.grafeas.v1.BatchCreateOccurrencesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BatchCreateOccurrencesRequest other) { + if (other == io.grafeas.v1.BatchCreateOccurrencesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (occurrencesBuilder_ == null) { + if (!other.occurrences_.isEmpty()) { + if (occurrences_.isEmpty()) { + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOccurrencesIsMutable(); + occurrences_.addAll(other.occurrences_); + } + onChanged(); + } + } else { + if (!other.occurrences_.isEmpty()) { + if (occurrencesBuilder_.isEmpty()) { + occurrencesBuilder_.dispose(); + occurrencesBuilder_ = null; + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000002); + occurrencesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOccurrencesFieldBuilder() : null; + } else { + occurrencesBuilder_.addAllMessages(other.occurrences_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + io.grafeas.v1.Occurrence m = + input.readMessage( + io.grafeas.v1.Occurrence.parser(), + extensionRegistry); + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(m); + } else { + occurrencesBuilder_.addMessage(m); + } + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrences are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrences are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrences are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrences are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrences are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List occurrences_ = + java.util.Collections.emptyList(); + private void ensureOccurrencesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + occurrences_ = new java.util.ArrayList(occurrences_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; + + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getOccurrencesList() { + if (occurrencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(occurrences_); + } else { + return occurrencesBuilder_.getMessageList(); + } + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getOccurrencesCount() { + if (occurrencesBuilder_ == null) { + return occurrences_.size(); + } else { + return occurrencesBuilder_.getCount(); + } + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Occurrence getOccurrences(int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); + } else { + return occurrencesBuilder_.getMessage(index); + } + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.set(index, value); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.set(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addOccurrences(io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(index, value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addOccurrences( + io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllOccurrences( + java.lang.Iterable values) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, occurrences_); + onChanged(); + } else { + occurrencesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearOccurrences() { + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + occurrencesBuilder_.clear(); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeOccurrences(int index) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.remove(index); + onChanged(); + } else { + occurrencesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().getBuilder(index); + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); } else { + return occurrencesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getOccurrencesOrBuilderList() { + if (occurrencesBuilder_ != null) { + return occurrencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(occurrences_); + } + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { + return getOccurrencesFieldBuilder().addBuilder( + io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().addBuilder( + index, io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getOccurrencesBuilderList() { + return getOccurrencesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> + getOccurrencesFieldBuilder() { + if (occurrencesBuilder_ == null) { + occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( + occurrences_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + occurrences_ = null; + } + return occurrencesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateOccurrencesRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateOccurrencesRequest) + private static final io.grafeas.v1.BatchCreateOccurrencesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateOccurrencesRequest(); + } + + public static io.grafeas.v1.BatchCreateOccurrencesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateOccurrencesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java new file mode 100644 index 000000000000..34f9b79bdd4e --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface BatchCreateOccurrencesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateOccurrencesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrences are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrences are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getOccurrencesList(); + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + io.grafeas.v1.Occurrence getOccurrences(int index); + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + int getOccurrencesCount(); + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getOccurrencesOrBuilderList(); + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java new file mode 100644 index 000000000000..db2c5a911e7b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java @@ -0,0 +1,862 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Response for creating occurrences in batch.
+ * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesResponse} + */ +public final class BatchCreateOccurrencesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateOccurrencesResponse) + BatchCreateOccurrencesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchCreateOccurrencesResponse.newBuilder() to construct. + private BatchCreateOccurrencesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchCreateOccurrencesResponse() { + occurrences_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchCreateOccurrencesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateOccurrencesResponse.class, io.grafeas.v1.BatchCreateOccurrencesResponse.Builder.class); + } + + public static final int OCCURRENCES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List occurrences_; + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public java.util.List getOccurrencesList() { + return occurrences_; + } + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public java.util.List + getOccurrencesOrBuilderList() { + return occurrences_; + } + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public int getOccurrencesCount() { + return occurrences_.size(); + } + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public io.grafeas.v1.Occurrence getOccurrences(int index) { + return occurrences_.get(index); + } + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + return occurrences_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < occurrences_.size(); i++) { + output.writeMessage(1, occurrences_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < occurrences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, occurrences_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BatchCreateOccurrencesResponse)) { + return super.equals(obj); + } + io.grafeas.v1.BatchCreateOccurrencesResponse other = (io.grafeas.v1.BatchCreateOccurrencesResponse) obj; + + if (!getOccurrencesList() + .equals(other.getOccurrencesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOccurrencesCount() > 0) { + hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; + hash = (53 * hash) + getOccurrencesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BatchCreateOccurrencesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for creating occurrences in batch.
+   * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateOccurrencesResponse) + io.grafeas.v1.BatchCreateOccurrencesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateOccurrencesResponse.class, io.grafeas.v1.BatchCreateOccurrencesResponse.Builder.class); + } + + // Construct using io.grafeas.v1.BatchCreateOccurrencesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + } else { + occurrences_ = null; + occurrencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesResponse getDefaultInstanceForType() { + return io.grafeas.v1.BatchCreateOccurrencesResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesResponse build() { + io.grafeas.v1.BatchCreateOccurrencesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesResponse buildPartial() { + io.grafeas.v1.BatchCreateOccurrencesResponse result = new io.grafeas.v1.BatchCreateOccurrencesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.BatchCreateOccurrencesResponse result) { + if (occurrencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + occurrences_ = java.util.Collections.unmodifiableList(occurrences_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.occurrences_ = occurrences_; + } else { + result.occurrences_ = occurrencesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.BatchCreateOccurrencesResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BatchCreateOccurrencesResponse) { + return mergeFrom((io.grafeas.v1.BatchCreateOccurrencesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BatchCreateOccurrencesResponse other) { + if (other == io.grafeas.v1.BatchCreateOccurrencesResponse.getDefaultInstance()) return this; + if (occurrencesBuilder_ == null) { + if (!other.occurrences_.isEmpty()) { + if (occurrences_.isEmpty()) { + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOccurrencesIsMutable(); + occurrences_.addAll(other.occurrences_); + } + onChanged(); + } + } else { + if (!other.occurrences_.isEmpty()) { + if (occurrencesBuilder_.isEmpty()) { + occurrencesBuilder_.dispose(); + occurrencesBuilder_ = null; + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000001); + occurrencesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOccurrencesFieldBuilder() : null; + } else { + occurrencesBuilder_.addAllMessages(other.occurrences_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.grafeas.v1.Occurrence m = + input.readMessage( + io.grafeas.v1.Occurrence.parser(), + extensionRegistry); + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(m); + } else { + occurrencesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List occurrences_ = + java.util.Collections.emptyList(); + private void ensureOccurrencesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + occurrences_ = new java.util.ArrayList(occurrences_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; + + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List getOccurrencesList() { + if (occurrencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(occurrences_); + } else { + return occurrencesBuilder_.getMessageList(); + } + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public int getOccurrencesCount() { + if (occurrencesBuilder_ == null) { + return occurrences_.size(); + } else { + return occurrencesBuilder_.getCount(); + } + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence getOccurrences(int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); + } else { + return occurrencesBuilder_.getMessage(index); + } + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.set(index, value); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.set(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences(io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(index, value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addAllOccurrences( + java.lang.Iterable values) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, occurrences_); + onChanged(); + } else { + occurrencesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder clearOccurrences() { + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + occurrencesBuilder_.clear(); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder removeOccurrences(int index) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.remove(index); + onChanged(); + } else { + occurrencesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().getBuilder(index); + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); } else { + return occurrencesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List + getOccurrencesOrBuilderList() { + if (occurrencesBuilder_ != null) { + return occurrencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(occurrences_); + } + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { + return getOccurrencesFieldBuilder().addBuilder( + io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().addBuilder( + index, io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List + getOccurrencesBuilderList() { + return getOccurrencesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> + getOccurrencesFieldBuilder() { + if (occurrencesBuilder_ == null) { + occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( + occurrences_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + occurrences_ = null; + } + return occurrencesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateOccurrencesResponse) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateOccurrencesResponse) + private static final io.grafeas.v1.BatchCreateOccurrencesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateOccurrencesResponse(); + } + + public static io.grafeas.v1.BatchCreateOccurrencesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateOccurrencesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java new file mode 100644 index 000000000000..90337438be46 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface BatchCreateOccurrencesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateOccurrencesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + java.util.List + getOccurrencesList(); + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + io.grafeas.v1.Occurrence getOccurrences(int index); + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + int getOccurrencesCount(); + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + java.util.List + getOccurrencesOrBuilderList(); + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java new file mode 100644 index 000000000000..090e954f45ef --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java @@ -0,0 +1,74 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/build.proto + +package io.grafeas.v1; + +public final class Build { + private Build() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BuildNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BuildNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BuildOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026grafeas/v1/build.proto\022\ngrafeas.v1\032\"gr" + + "afeas/v1/intoto_provenance.proto\032!grafea" + + "s/v1/intoto_statement.proto\032\033grafeas/v1/" + + "provenance.proto\"$\n\tBuildNote\022\027\n\017builder" + + "_version\030\001 \001(\t\"\314\001\n\017BuildOccurrence\022/\n\npr" + + "ovenance\030\001 \001(\0132\033.grafeas.v1.BuildProvena" + + "nce\022\030\n\020provenance_bytes\030\002 \001(\t\0227\n\021intoto_" + + "provenance\030\003 \001(\0132\034.grafeas.v1.InTotoProv" + + "enance\0225\n\020intoto_statement\030\004 \001(\0132\033.grafe" + + "as.v1.InTotoStatementBQ\n\rio.grafeas.v1P\001" + + "Z8google.golang.org/genproto/googleapis/" + + "grafeas/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grafeas.v1.InTotoProvenanceProto.getDescriptor(), + io.grafeas.v1.InTotoStatementProto.getDescriptor(), + io.grafeas.v1.Provenance.getDescriptor(), + }); + internal_static_grafeas_v1_BuildNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_BuildNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BuildNote_descriptor, + new java.lang.String[] { "BuilderVersion", }); + internal_static_grafeas_v1_BuildOccurrence_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BuildOccurrence_descriptor, + new java.lang.String[] { "Provenance", "ProvenanceBytes", "IntotoProvenance", "IntotoStatement", }); + io.grafeas.v1.InTotoProvenanceProto.getDescriptor(); + io.grafeas.v1.InTotoStatementProto.getDescriptor(); + io.grafeas.v1.Provenance.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java new file mode 100644 index 000000000000..cefe7d8ac0e8 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java @@ -0,0 +1,582 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/build.proto + +package io.grafeas.v1; + +/** + *
+ * Note holding the version of the provider's builder and the signature of the
+ * provenance message in the build details occurrence.
+ * 
+ * + * Protobuf type {@code grafeas.v1.BuildNote} + */ +public final class BuildNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BuildNote) + BuildNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use BuildNote.newBuilder() to construct. + private BuildNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BuildNote() { + builderVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BuildNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuildNote.class, io.grafeas.v1.BuildNote.Builder.class); + } + + public static final int BUILDER_VERSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object builderVersion_ = ""; + /** + *
+   * Required. Immutable. Version of the builder which produced this build.
+   * 
+ * + * string builder_version = 1; + * @return The builderVersion. + */ + @java.lang.Override + public java.lang.String getBuilderVersion() { + java.lang.Object ref = builderVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + builderVersion_ = s; + return s; + } + } + /** + *
+   * Required. Immutable. Version of the builder which produced this build.
+   * 
+ * + * string builder_version = 1; + * @return The bytes for builderVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBuilderVersionBytes() { + java.lang.Object ref = builderVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + builderVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, builderVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, builderVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BuildNote)) { + return super.equals(obj); + } + io.grafeas.v1.BuildNote other = (io.grafeas.v1.BuildNote) obj; + + if (!getBuilderVersion() + .equals(other.getBuilderVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BUILDER_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getBuilderVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BuildNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuildNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuildNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BuildNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Note holding the version of the provider's builder and the signature of the
+   * provenance message in the build details occurrence.
+   * 
+ * + * Protobuf type {@code grafeas.v1.BuildNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BuildNote) + io.grafeas.v1.BuildNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuildNote.class, io.grafeas.v1.BuildNote.Builder.class); + } + + // Construct using io.grafeas.v1.BuildNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + builderVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BuildNote getDefaultInstanceForType() { + return io.grafeas.v1.BuildNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BuildNote build() { + io.grafeas.v1.BuildNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BuildNote buildPartial() { + io.grafeas.v1.BuildNote result = new io.grafeas.v1.BuildNote(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.BuildNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.builderVersion_ = builderVersion_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BuildNote) { + return mergeFrom((io.grafeas.v1.BuildNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BuildNote other) { + if (other == io.grafeas.v1.BuildNote.getDefaultInstance()) return this; + if (!other.getBuilderVersion().isEmpty()) { + builderVersion_ = other.builderVersion_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + builderVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object builderVersion_ = ""; + /** + *
+     * Required. Immutable. Version of the builder which produced this build.
+     * 
+ * + * string builder_version = 1; + * @return The builderVersion. + */ + public java.lang.String getBuilderVersion() { + java.lang.Object ref = builderVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + builderVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Immutable. Version of the builder which produced this build.
+     * 
+ * + * string builder_version = 1; + * @return The bytes for builderVersion. + */ + public com.google.protobuf.ByteString + getBuilderVersionBytes() { + java.lang.Object ref = builderVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + builderVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Immutable. Version of the builder which produced this build.
+     * 
+ * + * string builder_version = 1; + * @param value The builderVersion to set. + * @return This builder for chaining. + */ + public Builder setBuilderVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + builderVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. Version of the builder which produced this build.
+     * 
+ * + * string builder_version = 1; + * @return This builder for chaining. + */ + public Builder clearBuilderVersion() { + builderVersion_ = getDefaultInstance().getBuilderVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. Version of the builder which produced this build.
+     * 
+ * + * string builder_version = 1; + * @param value The bytes for builderVersion to set. + * @return This builder for chaining. + */ + public Builder setBuilderVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + builderVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BuildNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BuildNote) + private static final io.grafeas.v1.BuildNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BuildNote(); + } + + public static io.grafeas.v1.BuildNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BuildNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BuildNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java new file mode 100644 index 000000000000..bdd0c0e77f13 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/build.proto + +package io.grafeas.v1; + +public interface BuildNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BuildNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Immutable. Version of the builder which produced this build.
+   * 
+ * + * string builder_version = 1; + * @return The builderVersion. + */ + java.lang.String getBuilderVersion(); + /** + *
+   * Required. Immutable. Version of the builder which produced this build.
+   * 
+ * + * string builder_version = 1; + * @return The bytes for builderVersion. + */ + com.google.protobuf.ByteString + getBuilderVersionBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java new file mode 100644 index 000000000000..b026a2175e92 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java @@ -0,0 +1,1378 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/build.proto + +package io.grafeas.v1; + +/** + *
+ * Details of a build occurrence.
+ * 
+ * + * Protobuf type {@code grafeas.v1.BuildOccurrence} + */ +public final class BuildOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BuildOccurrence) + BuildOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use BuildOccurrence.newBuilder() to construct. + private BuildOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BuildOccurrence() { + provenanceBytes_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BuildOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuildOccurrence.class, io.grafeas.v1.BuildOccurrence.Builder.class); + } + + public static final int PROVENANCE_FIELD_NUMBER = 1; + private io.grafeas.v1.BuildProvenance provenance_; + /** + *
+   * The actual provenance for the build.
+   * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + * @return Whether the provenance field is set. + */ + @java.lang.Override + public boolean hasProvenance() { + return provenance_ != null; + } + /** + *
+   * The actual provenance for the build.
+   * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + * @return The provenance. + */ + @java.lang.Override + public io.grafeas.v1.BuildProvenance getProvenance() { + return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; + } + /** + *
+   * The actual provenance for the build.
+   * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + @java.lang.Override + public io.grafeas.v1.BuildProvenanceOrBuilder getProvenanceOrBuilder() { + return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; + } + + public static final int PROVENANCE_BYTES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object provenanceBytes_ = ""; + /** + *
+   * Serialized JSON representation of the provenance, used in generating the
+   * build signature in the corresponding build note. After verifying the
+   * signature, `provenance_bytes` can be unmarshalled and compared to the
+   * provenance to confirm that it is unchanged. A base64-encoded string
+   * representation of the provenance bytes is used for the signature in order
+   * to interoperate with openssl which expects this format for signature
+   * verification.
+   * The serialized form is captured both to avoid ambiguity in how the
+   * provenance is marshalled to json as well to prevent incompatibilities with
+   * future changes.
+   * 
+ * + * string provenance_bytes = 2; + * @return The provenanceBytes. + */ + @java.lang.Override + public java.lang.String getProvenanceBytes() { + java.lang.Object ref = provenanceBytes_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provenanceBytes_ = s; + return s; + } + } + /** + *
+   * Serialized JSON representation of the provenance, used in generating the
+   * build signature in the corresponding build note. After verifying the
+   * signature, `provenance_bytes` can be unmarshalled and compared to the
+   * provenance to confirm that it is unchanged. A base64-encoded string
+   * representation of the provenance bytes is used for the signature in order
+   * to interoperate with openssl which expects this format for signature
+   * verification.
+   * The serialized form is captured both to avoid ambiguity in how the
+   * provenance is marshalled to json as well to prevent incompatibilities with
+   * future changes.
+   * 
+ * + * string provenance_bytes = 2; + * @return The bytes for provenanceBytes. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProvenanceBytesBytes() { + java.lang.Object ref = provenanceBytes_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + provenanceBytes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTOTO_PROVENANCE_FIELD_NUMBER = 3; + private io.grafeas.v1.InTotoProvenance intotoProvenance_; + /** + *
+   * Deprecated. See InTotoStatement for the replacement.
+   * In-toto Provenance representation as defined in spec.
+   * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + * @return Whether the intotoProvenance field is set. + */ + @java.lang.Override + public boolean hasIntotoProvenance() { + return intotoProvenance_ != null; + } + /** + *
+   * Deprecated. See InTotoStatement for the replacement.
+   * In-toto Provenance representation as defined in spec.
+   * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + * @return The intotoProvenance. + */ + @java.lang.Override + public io.grafeas.v1.InTotoProvenance getIntotoProvenance() { + return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; + } + /** + *
+   * Deprecated. See InTotoStatement for the replacement.
+   * In-toto Provenance representation as defined in spec.
+   * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + @java.lang.Override + public io.grafeas.v1.InTotoProvenanceOrBuilder getIntotoProvenanceOrBuilder() { + return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; + } + + public static final int INTOTO_STATEMENT_FIELD_NUMBER = 4; + private io.grafeas.v1.InTotoStatement intotoStatement_; + /** + *
+   * In-toto Statement representation as defined in spec.
+   * The intoto_statement can contain any type of provenance. The serialized
+   * payload of the statement can be stored and signed in the Occurrence's
+   * envelope.
+   * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + * @return Whether the intotoStatement field is set. + */ + @java.lang.Override + public boolean hasIntotoStatement() { + return intotoStatement_ != null; + } + /** + *
+   * In-toto Statement representation as defined in spec.
+   * The intoto_statement can contain any type of provenance. The serialized
+   * payload of the statement can be stored and signed in the Occurrence's
+   * envelope.
+   * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + * @return The intotoStatement. + */ + @java.lang.Override + public io.grafeas.v1.InTotoStatement getIntotoStatement() { + return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; + } + /** + *
+   * In-toto Statement representation as defined in spec.
+   * The intoto_statement can contain any type of provenance. The serialized
+   * payload of the statement can be stored and signed in the Occurrence's
+   * envelope.
+   * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + @java.lang.Override + public io.grafeas.v1.InTotoStatementOrBuilder getIntotoStatementOrBuilder() { + return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (provenance_ != null) { + output.writeMessage(1, getProvenance()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provenanceBytes_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, provenanceBytes_); + } + if (intotoProvenance_ != null) { + output.writeMessage(3, getIntotoProvenance()); + } + if (intotoStatement_ != null) { + output.writeMessage(4, getIntotoStatement()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (provenance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProvenance()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provenanceBytes_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, provenanceBytes_); + } + if (intotoProvenance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getIntotoProvenance()); + } + if (intotoStatement_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getIntotoStatement()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BuildOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.BuildOccurrence other = (io.grafeas.v1.BuildOccurrence) obj; + + if (hasProvenance() != other.hasProvenance()) return false; + if (hasProvenance()) { + if (!getProvenance() + .equals(other.getProvenance())) return false; + } + if (!getProvenanceBytes() + .equals(other.getProvenanceBytes())) return false; + if (hasIntotoProvenance() != other.hasIntotoProvenance()) return false; + if (hasIntotoProvenance()) { + if (!getIntotoProvenance() + .equals(other.getIntotoProvenance())) return false; + } + if (hasIntotoStatement() != other.hasIntotoStatement()) return false; + if (hasIntotoStatement()) { + if (!getIntotoStatement() + .equals(other.getIntotoStatement())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProvenance()) { + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenance().hashCode(); + } + hash = (37 * hash) + PROVENANCE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getProvenanceBytes().hashCode(); + if (hasIntotoProvenance()) { + hash = (37 * hash) + INTOTO_PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getIntotoProvenance().hashCode(); + } + if (hasIntotoStatement()) { + hash = (37 * hash) + INTOTO_STATEMENT_FIELD_NUMBER; + hash = (53 * hash) + getIntotoStatement().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BuildOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuildOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuildOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BuildOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Details of a build occurrence.
+   * 
+ * + * Protobuf type {@code grafeas.v1.BuildOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BuildOccurrence) + io.grafeas.v1.BuildOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuildOccurrence.class, io.grafeas.v1.BuildOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.BuildOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + provenanceBytes_ = ""; + intotoProvenance_ = null; + if (intotoProvenanceBuilder_ != null) { + intotoProvenanceBuilder_.dispose(); + intotoProvenanceBuilder_ = null; + } + intotoStatement_ = null; + if (intotoStatementBuilder_ != null) { + intotoStatementBuilder_.dispose(); + intotoStatementBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BuildOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BuildOccurrence build() { + io.grafeas.v1.BuildOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BuildOccurrence buildPartial() { + io.grafeas.v1.BuildOccurrence result = new io.grafeas.v1.BuildOccurrence(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.BuildOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.provenance_ = provenanceBuilder_ == null + ? provenance_ + : provenanceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.provenanceBytes_ = provenanceBytes_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.intotoProvenance_ = intotoProvenanceBuilder_ == null + ? intotoProvenance_ + : intotoProvenanceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.intotoStatement_ = intotoStatementBuilder_ == null + ? intotoStatement_ + : intotoStatementBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BuildOccurrence) { + return mergeFrom((io.grafeas.v1.BuildOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BuildOccurrence other) { + if (other == io.grafeas.v1.BuildOccurrence.getDefaultInstance()) return this; + if (other.hasProvenance()) { + mergeProvenance(other.getProvenance()); + } + if (!other.getProvenanceBytes().isEmpty()) { + provenanceBytes_ = other.provenanceBytes_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasIntotoProvenance()) { + mergeIntotoProvenance(other.getIntotoProvenance()); + } + if (other.hasIntotoStatement()) { + mergeIntotoStatement(other.getIntotoStatement()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getProvenanceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + provenanceBytes_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getIntotoProvenanceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getIntotoStatementFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.BuildProvenance provenance_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildProvenance, io.grafeas.v1.BuildProvenance.Builder, io.grafeas.v1.BuildProvenanceOrBuilder> provenanceBuilder_; + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + * @return Whether the provenance field is set. + */ + public boolean hasProvenance() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + * @return The provenance. + */ + public io.grafeas.v1.BuildProvenance getProvenance() { + if (provenanceBuilder_ == null) { + return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; + } else { + return provenanceBuilder_.getMessage(); + } + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + public Builder setProvenance(io.grafeas.v1.BuildProvenance value) { + if (provenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + provenance_ = value; + } else { + provenanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + public Builder setProvenance( + io.grafeas.v1.BuildProvenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + provenance_ = builderForValue.build(); + } else { + provenanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + public Builder mergeProvenance(io.grafeas.v1.BuildProvenance value) { + if (provenanceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + provenance_ != null && + provenance_ != io.grafeas.v1.BuildProvenance.getDefaultInstance()) { + getProvenanceBuilder().mergeFrom(value); + } else { + provenance_ = value; + } + } else { + provenanceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + public Builder clearProvenance() { + bitField0_ = (bitField0_ & ~0x00000001); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + public io.grafeas.v1.BuildProvenance.Builder getProvenanceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getProvenanceFieldBuilder().getBuilder(); + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + public io.grafeas.v1.BuildProvenanceOrBuilder getProvenanceOrBuilder() { + if (provenanceBuilder_ != null) { + return provenanceBuilder_.getMessageOrBuilder(); + } else { + return provenance_ == null ? + io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; + } + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildProvenance, io.grafeas.v1.BuildProvenance.Builder, io.grafeas.v1.BuildProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + provenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildProvenance, io.grafeas.v1.BuildProvenance.Builder, io.grafeas.v1.BuildProvenanceOrBuilder>( + getProvenance(), + getParentForChildren(), + isClean()); + provenance_ = null; + } + return provenanceBuilder_; + } + + private java.lang.Object provenanceBytes_ = ""; + /** + *
+     * Serialized JSON representation of the provenance, used in generating the
+     * build signature in the corresponding build note. After verifying the
+     * signature, `provenance_bytes` can be unmarshalled and compared to the
+     * provenance to confirm that it is unchanged. A base64-encoded string
+     * representation of the provenance bytes is used for the signature in order
+     * to interoperate with openssl which expects this format for signature
+     * verification.
+     * The serialized form is captured both to avoid ambiguity in how the
+     * provenance is marshalled to json as well to prevent incompatibilities with
+     * future changes.
+     * 
+ * + * string provenance_bytes = 2; + * @return The provenanceBytes. + */ + public java.lang.String getProvenanceBytes() { + java.lang.Object ref = provenanceBytes_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provenanceBytes_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Serialized JSON representation of the provenance, used in generating the
+     * build signature in the corresponding build note. After verifying the
+     * signature, `provenance_bytes` can be unmarshalled and compared to the
+     * provenance to confirm that it is unchanged. A base64-encoded string
+     * representation of the provenance bytes is used for the signature in order
+     * to interoperate with openssl which expects this format for signature
+     * verification.
+     * The serialized form is captured both to avoid ambiguity in how the
+     * provenance is marshalled to json as well to prevent incompatibilities with
+     * future changes.
+     * 
+ * + * string provenance_bytes = 2; + * @return The bytes for provenanceBytes. + */ + public com.google.protobuf.ByteString + getProvenanceBytesBytes() { + java.lang.Object ref = provenanceBytes_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + provenanceBytes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Serialized JSON representation of the provenance, used in generating the
+     * build signature in the corresponding build note. After verifying the
+     * signature, `provenance_bytes` can be unmarshalled and compared to the
+     * provenance to confirm that it is unchanged. A base64-encoded string
+     * representation of the provenance bytes is used for the signature in order
+     * to interoperate with openssl which expects this format for signature
+     * verification.
+     * The serialized form is captured both to avoid ambiguity in how the
+     * provenance is marshalled to json as well to prevent incompatibilities with
+     * future changes.
+     * 
+ * + * string provenance_bytes = 2; + * @param value The provenanceBytes to set. + * @return This builder for chaining. + */ + public Builder setProvenanceBytes( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + provenanceBytes_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Serialized JSON representation of the provenance, used in generating the
+     * build signature in the corresponding build note. After verifying the
+     * signature, `provenance_bytes` can be unmarshalled and compared to the
+     * provenance to confirm that it is unchanged. A base64-encoded string
+     * representation of the provenance bytes is used for the signature in order
+     * to interoperate with openssl which expects this format for signature
+     * verification.
+     * The serialized form is captured both to avoid ambiguity in how the
+     * provenance is marshalled to json as well to prevent incompatibilities with
+     * future changes.
+     * 
+ * + * string provenance_bytes = 2; + * @return This builder for chaining. + */ + public Builder clearProvenanceBytes() { + provenanceBytes_ = getDefaultInstance().getProvenanceBytes(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Serialized JSON representation of the provenance, used in generating the
+     * build signature in the corresponding build note. After verifying the
+     * signature, `provenance_bytes` can be unmarshalled and compared to the
+     * provenance to confirm that it is unchanged. A base64-encoded string
+     * representation of the provenance bytes is used for the signature in order
+     * to interoperate with openssl which expects this format for signature
+     * verification.
+     * The serialized form is captured both to avoid ambiguity in how the
+     * provenance is marshalled to json as well to prevent incompatibilities with
+     * future changes.
+     * 
+ * + * string provenance_bytes = 2; + * @param value The bytes for provenanceBytes to set. + * @return This builder for chaining. + */ + public Builder setProvenanceBytesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + provenanceBytes_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.grafeas.v1.InTotoProvenance intotoProvenance_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> intotoProvenanceBuilder_; + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + * @return Whether the intotoProvenance field is set. + */ + public boolean hasIntotoProvenance() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + * @return The intotoProvenance. + */ + public io.grafeas.v1.InTotoProvenance getIntotoProvenance() { + if (intotoProvenanceBuilder_ == null) { + return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; + } else { + return intotoProvenanceBuilder_.getMessage(); + } + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + public Builder setIntotoProvenance(io.grafeas.v1.InTotoProvenance value) { + if (intotoProvenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + intotoProvenance_ = value; + } else { + intotoProvenanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + public Builder setIntotoProvenance( + io.grafeas.v1.InTotoProvenance.Builder builderForValue) { + if (intotoProvenanceBuilder_ == null) { + intotoProvenance_ = builderForValue.build(); + } else { + intotoProvenanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + public Builder mergeIntotoProvenance(io.grafeas.v1.InTotoProvenance value) { + if (intotoProvenanceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + intotoProvenance_ != null && + intotoProvenance_ != io.grafeas.v1.InTotoProvenance.getDefaultInstance()) { + getIntotoProvenanceBuilder().mergeFrom(value); + } else { + intotoProvenance_ = value; + } + } else { + intotoProvenanceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + public Builder clearIntotoProvenance() { + bitField0_ = (bitField0_ & ~0x00000004); + intotoProvenance_ = null; + if (intotoProvenanceBuilder_ != null) { + intotoProvenanceBuilder_.dispose(); + intotoProvenanceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + public io.grafeas.v1.InTotoProvenance.Builder getIntotoProvenanceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getIntotoProvenanceFieldBuilder().getBuilder(); + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + public io.grafeas.v1.InTotoProvenanceOrBuilder getIntotoProvenanceOrBuilder() { + if (intotoProvenanceBuilder_ != null) { + return intotoProvenanceBuilder_.getMessageOrBuilder(); + } else { + return intotoProvenance_ == null ? + io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; + } + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> + getIntotoProvenanceFieldBuilder() { + if (intotoProvenanceBuilder_ == null) { + intotoProvenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder>( + getIntotoProvenance(), + getParentForChildren(), + isClean()); + intotoProvenance_ = null; + } + return intotoProvenanceBuilder_; + } + + private io.grafeas.v1.InTotoStatement intotoStatement_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> intotoStatementBuilder_; + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + * @return Whether the intotoStatement field is set. + */ + public boolean hasIntotoStatement() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + * @return The intotoStatement. + */ + public io.grafeas.v1.InTotoStatement getIntotoStatement() { + if (intotoStatementBuilder_ == null) { + return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; + } else { + return intotoStatementBuilder_.getMessage(); + } + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + public Builder setIntotoStatement(io.grafeas.v1.InTotoStatement value) { + if (intotoStatementBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + intotoStatement_ = value; + } else { + intotoStatementBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + public Builder setIntotoStatement( + io.grafeas.v1.InTotoStatement.Builder builderForValue) { + if (intotoStatementBuilder_ == null) { + intotoStatement_ = builderForValue.build(); + } else { + intotoStatementBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + public Builder mergeIntotoStatement(io.grafeas.v1.InTotoStatement value) { + if (intotoStatementBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + intotoStatement_ != null && + intotoStatement_ != io.grafeas.v1.InTotoStatement.getDefaultInstance()) { + getIntotoStatementBuilder().mergeFrom(value); + } else { + intotoStatement_ = value; + } + } else { + intotoStatementBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + public Builder clearIntotoStatement() { + bitField0_ = (bitField0_ & ~0x00000008); + intotoStatement_ = null; + if (intotoStatementBuilder_ != null) { + intotoStatementBuilder_.dispose(); + intotoStatementBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + public io.grafeas.v1.InTotoStatement.Builder getIntotoStatementBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getIntotoStatementFieldBuilder().getBuilder(); + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + public io.grafeas.v1.InTotoStatementOrBuilder getIntotoStatementOrBuilder() { + if (intotoStatementBuilder_ != null) { + return intotoStatementBuilder_.getMessageOrBuilder(); + } else { + return intotoStatement_ == null ? + io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; + } + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> + getIntotoStatementFieldBuilder() { + if (intotoStatementBuilder_ == null) { + intotoStatementBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder>( + getIntotoStatement(), + getParentForChildren(), + isClean()); + intotoStatement_ = null; + } + return intotoStatementBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BuildOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BuildOccurrence) + private static final io.grafeas.v1.BuildOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BuildOccurrence(); + } + + public static io.grafeas.v1.BuildOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BuildOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BuildOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java new file mode 100644 index 000000000000..ee7da49a9992 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java @@ -0,0 +1,140 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/build.proto + +package io.grafeas.v1; + +public interface BuildOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BuildOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The actual provenance for the build.
+   * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + * @return Whether the provenance field is set. + */ + boolean hasProvenance(); + /** + *
+   * The actual provenance for the build.
+   * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + * @return The provenance. + */ + io.grafeas.v1.BuildProvenance getProvenance(); + /** + *
+   * The actual provenance for the build.
+   * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + io.grafeas.v1.BuildProvenanceOrBuilder getProvenanceOrBuilder(); + + /** + *
+   * Serialized JSON representation of the provenance, used in generating the
+   * build signature in the corresponding build note. After verifying the
+   * signature, `provenance_bytes` can be unmarshalled and compared to the
+   * provenance to confirm that it is unchanged. A base64-encoded string
+   * representation of the provenance bytes is used for the signature in order
+   * to interoperate with openssl which expects this format for signature
+   * verification.
+   * The serialized form is captured both to avoid ambiguity in how the
+   * provenance is marshalled to json as well to prevent incompatibilities with
+   * future changes.
+   * 
+ * + * string provenance_bytes = 2; + * @return The provenanceBytes. + */ + java.lang.String getProvenanceBytes(); + /** + *
+   * Serialized JSON representation of the provenance, used in generating the
+   * build signature in the corresponding build note. After verifying the
+   * signature, `provenance_bytes` can be unmarshalled and compared to the
+   * provenance to confirm that it is unchanged. A base64-encoded string
+   * representation of the provenance bytes is used for the signature in order
+   * to interoperate with openssl which expects this format for signature
+   * verification.
+   * The serialized form is captured both to avoid ambiguity in how the
+   * provenance is marshalled to json as well to prevent incompatibilities with
+   * future changes.
+   * 
+ * + * string provenance_bytes = 2; + * @return The bytes for provenanceBytes. + */ + com.google.protobuf.ByteString + getProvenanceBytesBytes(); + + /** + *
+   * Deprecated. See InTotoStatement for the replacement.
+   * In-toto Provenance representation as defined in spec.
+   * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + * @return Whether the intotoProvenance field is set. + */ + boolean hasIntotoProvenance(); + /** + *
+   * Deprecated. See InTotoStatement for the replacement.
+   * In-toto Provenance representation as defined in spec.
+   * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + * @return The intotoProvenance. + */ + io.grafeas.v1.InTotoProvenance getIntotoProvenance(); + /** + *
+   * Deprecated. See InTotoStatement for the replacement.
+   * In-toto Provenance representation as defined in spec.
+   * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + io.grafeas.v1.InTotoProvenanceOrBuilder getIntotoProvenanceOrBuilder(); + + /** + *
+   * In-toto Statement representation as defined in spec.
+   * The intoto_statement can contain any type of provenance. The serialized
+   * payload of the statement can be stored and signed in the Occurrence's
+   * envelope.
+   * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + * @return Whether the intotoStatement field is set. + */ + boolean hasIntotoStatement(); + /** + *
+   * In-toto Statement representation as defined in spec.
+   * The intoto_statement can contain any type of provenance. The serialized
+   * payload of the statement can be stored and signed in the Occurrence's
+   * envelope.
+   * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + * @return The intotoStatement. + */ + io.grafeas.v1.InTotoStatement getIntotoStatement(); + /** + *
+   * In-toto Statement representation as defined in spec.
+   * The intoto_statement can contain any type of provenance. The serialized
+   * payload of the statement can be stored and signed in the Occurrence's
+   * envelope.
+   * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + io.grafeas.v1.InTotoStatementOrBuilder getIntotoStatementOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java new file mode 100644 index 000000000000..1359a5f8fcfb --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java @@ -0,0 +1,3554 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Provenance of a build. Contains all information needed to verify the full
+ * details about the build from source to completion.
+ * 
+ * + * Protobuf type {@code grafeas.v1.BuildProvenance} + */ +public final class BuildProvenance extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BuildProvenance) + BuildProvenanceOrBuilder { +private static final long serialVersionUID = 0L; + // Use BuildProvenance.newBuilder() to construct. + private BuildProvenance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BuildProvenance() { + id_ = ""; + projectId_ = ""; + commands_ = java.util.Collections.emptyList(); + builtArtifacts_ = java.util.Collections.emptyList(); + creator_ = ""; + logsUri_ = ""; + triggerId_ = ""; + builderVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BuildProvenance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 12: + return internalGetBuildOptions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuildProvenance.class, io.grafeas.v1.BuildProvenance.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * Required. Unique identifier of the build.
+   * 
+ * + * string id = 1; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * Required. Unique identifier of the build.
+   * 
+ * + * string id = 1; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + *
+   * ID of the project.
+   * 
+ * + * string project_id = 2; + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + *
+   * ID of the project.
+   * 
+ * + * string project_id = 2; + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMANDS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List commands_; + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + @java.lang.Override + public java.util.List getCommandsList() { + return commands_; + } + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + @java.lang.Override + public java.util.List + getCommandsOrBuilderList() { + return commands_; + } + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + @java.lang.Override + public int getCommandsCount() { + return commands_.size(); + } + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + @java.lang.Override + public io.grafeas.v1.Command getCommands(int index) { + return commands_.get(index); + } + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + @java.lang.Override + public io.grafeas.v1.CommandOrBuilder getCommandsOrBuilder( + int index) { + return commands_.get(index); + } + + public static final int BUILT_ARTIFACTS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List builtArtifacts_; + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + @java.lang.Override + public java.util.List getBuiltArtifactsList() { + return builtArtifacts_; + } + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + @java.lang.Override + public java.util.List + getBuiltArtifactsOrBuilderList() { + return builtArtifacts_; + } + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + @java.lang.Override + public int getBuiltArtifactsCount() { + return builtArtifacts_.size(); + } + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + @java.lang.Override + public io.grafeas.v1.Artifact getBuiltArtifacts(int index) { + return builtArtifacts_.get(index); + } + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + @java.lang.Override + public io.grafeas.v1.ArtifactOrBuilder getBuiltArtifactsOrBuilder( + int index) { + return builtArtifacts_.get(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Time at which the build was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Time at which the build was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Time at which the build was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int START_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp startTime_; + /** + *
+   * Time at which execution of the build was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6; + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + *
+   * Time at which execution of the build was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6; + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + *
+   * Time at which execution of the build was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Time at which execution of the build was finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Time at which execution of the build was finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Time at which execution of the build was finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int CREATOR_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object creator_ = ""; + /** + *
+   * E-mail address of the user who initiated this build. Note that this was the
+   * user's e-mail address at the time the build was initiated; this address may
+   * not represent the same end-user for all time.
+   * 
+ * + * string creator = 8; + * @return The creator. + */ + @java.lang.Override + public java.lang.String getCreator() { + java.lang.Object ref = creator_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + creator_ = s; + return s; + } + } + /** + *
+   * E-mail address of the user who initiated this build. Note that this was the
+   * user's e-mail address at the time the build was initiated; this address may
+   * not represent the same end-user for all time.
+   * 
+ * + * string creator = 8; + * @return The bytes for creator. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCreatorBytes() { + java.lang.Object ref = creator_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + creator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOGS_URI_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private volatile java.lang.Object logsUri_ = ""; + /** + *
+   * URI where any logs for this provenance were written.
+   * 
+ * + * string logs_uri = 9; + * @return The logsUri. + */ + @java.lang.Override + public java.lang.String getLogsUri() { + java.lang.Object ref = logsUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logsUri_ = s; + return s; + } + } + /** + *
+   * URI where any logs for this provenance were written.
+   * 
+ * + * string logs_uri = 9; + * @return The bytes for logsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLogsUriBytes() { + java.lang.Object ref = logsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_PROVENANCE_FIELD_NUMBER = 10; + private io.grafeas.v1.Source sourceProvenance_; + /** + *
+   * Details of the Source input to the build.
+   * 
+ * + * .grafeas.v1.Source source_provenance = 10; + * @return Whether the sourceProvenance field is set. + */ + @java.lang.Override + public boolean hasSourceProvenance() { + return sourceProvenance_ != null; + } + /** + *
+   * Details of the Source input to the build.
+   * 
+ * + * .grafeas.v1.Source source_provenance = 10; + * @return The sourceProvenance. + */ + @java.lang.Override + public io.grafeas.v1.Source getSourceProvenance() { + return sourceProvenance_ == null ? io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; + } + /** + *
+   * Details of the Source input to the build.
+   * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + @java.lang.Override + public io.grafeas.v1.SourceOrBuilder getSourceProvenanceOrBuilder() { + return sourceProvenance_ == null ? io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; + } + + public static final int TRIGGER_ID_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object triggerId_ = ""; + /** + *
+   * Trigger identifier if the build was triggered automatically; empty if not.
+   * 
+ * + * string trigger_id = 11; + * @return The triggerId. + */ + @java.lang.Override + public java.lang.String getTriggerId() { + java.lang.Object ref = triggerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + triggerId_ = s; + return s; + } + } + /** + *
+   * Trigger identifier if the build was triggered automatically; empty if not.
+   * 
+ * + * string trigger_id = 11; + * @return The bytes for triggerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTriggerIdBytes() { + java.lang.Object ref = triggerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + triggerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUILD_OPTIONS_FIELD_NUMBER = 12; + private static final class BuildOptionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> buildOptions_; + private com.google.protobuf.MapField + internalGetBuildOptions() { + if (buildOptions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BuildOptionsDefaultEntryHolder.defaultEntry); + } + return buildOptions_; + } + public int getBuildOptionsCount() { + return internalGetBuildOptions().getMap().size(); + } + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public boolean containsBuildOptions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetBuildOptions().getMap().containsKey(key); + } + /** + * Use {@link #getBuildOptionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBuildOptions() { + return getBuildOptionsMap(); + } + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public java.util.Map getBuildOptionsMap() { + return internalGetBuildOptions().getMap(); + } + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getBuildOptionsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetBuildOptions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public java.lang.String getBuildOptionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetBuildOptions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int BUILDER_VERSION_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private volatile java.lang.Object builderVersion_ = ""; + /** + *
+   * Version string of the builder at the time this build was executed.
+   * 
+ * + * string builder_version = 13; + * @return The builderVersion. + */ + @java.lang.Override + public java.lang.String getBuilderVersion() { + java.lang.Object ref = builderVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + builderVersion_ = s; + return s; + } + } + /** + *
+   * Version string of the builder at the time this build was executed.
+   * 
+ * + * string builder_version = 13; + * @return The bytes for builderVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBuilderVersionBytes() { + java.lang.Object ref = builderVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + builderVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + for (int i = 0; i < commands_.size(); i++) { + output.writeMessage(3, commands_.get(i)); + } + for (int i = 0; i < builtArtifacts_.size(); i++) { + output.writeMessage(4, builtArtifacts_.get(i)); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (startTime_ != null) { + output.writeMessage(6, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(7, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, creator_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, logsUri_); + } + if (sourceProvenance_ != null) { + output.writeMessage(10, getSourceProvenance()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, triggerId_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetBuildOptions(), + BuildOptionsDefaultEntryHolder.defaultEntry, + 12); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, builderVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + for (int i = 0; i < commands_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, commands_.get(i)); + } + for (int i = 0; i < builtArtifacts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, builtArtifacts_.get(i)); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getCreateTime()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, creator_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, logsUri_); + } + if (sourceProvenance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getSourceProvenance()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, triggerId_); + } + for (java.util.Map.Entry entry + : internalGetBuildOptions().getMap().entrySet()) { + com.google.protobuf.MapEntry + buildOptions__ = BuildOptionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, buildOptions__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, builderVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BuildProvenance)) { + return super.equals(obj); + } + io.grafeas.v1.BuildProvenance other = (io.grafeas.v1.BuildProvenance) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getProjectId() + .equals(other.getProjectId())) return false; + if (!getCommandsList() + .equals(other.getCommandsList())) return false; + if (!getBuiltArtifactsList() + .equals(other.getBuiltArtifactsList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime() + .equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (!getCreator() + .equals(other.getCreator())) return false; + if (!getLogsUri() + .equals(other.getLogsUri())) return false; + if (hasSourceProvenance() != other.hasSourceProvenance()) return false; + if (hasSourceProvenance()) { + if (!getSourceProvenance() + .equals(other.getSourceProvenance())) return false; + } + if (!getTriggerId() + .equals(other.getTriggerId())) return false; + if (!internalGetBuildOptions().equals( + other.internalGetBuildOptions())) return false; + if (!getBuilderVersion() + .equals(other.getBuilderVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + if (getCommandsCount() > 0) { + hash = (37 * hash) + COMMANDS_FIELD_NUMBER; + hash = (53 * hash) + getCommandsList().hashCode(); + } + if (getBuiltArtifactsCount() > 0) { + hash = (37 * hash) + BUILT_ARTIFACTS_FIELD_NUMBER; + hash = (53 * hash) + getBuiltArtifactsList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + CREATOR_FIELD_NUMBER; + hash = (53 * hash) + getCreator().hashCode(); + hash = (37 * hash) + LOGS_URI_FIELD_NUMBER; + hash = (53 * hash) + getLogsUri().hashCode(); + if (hasSourceProvenance()) { + hash = (37 * hash) + SOURCE_PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getSourceProvenance().hashCode(); + } + hash = (37 * hash) + TRIGGER_ID_FIELD_NUMBER; + hash = (53 * hash) + getTriggerId().hashCode(); + if (!internalGetBuildOptions().getMap().isEmpty()) { + hash = (37 * hash) + BUILD_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetBuildOptions().hashCode(); + } + hash = (37 * hash) + BUILDER_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getBuilderVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BuildProvenance parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildProvenance parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildProvenance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildProvenance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildProvenance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildProvenance parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildProvenance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildProvenance parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuildProvenance parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildProvenance parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuildProvenance parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildProvenance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BuildProvenance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Provenance of a build. Contains all information needed to verify the full
+   * details about the build from source to completion.
+   * 
+ * + * Protobuf type {@code grafeas.v1.BuildProvenance} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BuildProvenance) + io.grafeas.v1.BuildProvenanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 12: + return internalGetBuildOptions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 12: + return internalGetMutableBuildOptions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuildProvenance.class, io.grafeas.v1.BuildProvenance.Builder.class); + } + + // Construct using io.grafeas.v1.BuildProvenance.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + projectId_ = ""; + if (commandsBuilder_ == null) { + commands_ = java.util.Collections.emptyList(); + } else { + commands_ = null; + commandsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (builtArtifactsBuilder_ == null) { + builtArtifacts_ = java.util.Collections.emptyList(); + } else { + builtArtifacts_ = null; + builtArtifactsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + creator_ = ""; + logsUri_ = ""; + sourceProvenance_ = null; + if (sourceProvenanceBuilder_ != null) { + sourceProvenanceBuilder_.dispose(); + sourceProvenanceBuilder_ = null; + } + triggerId_ = ""; + internalGetMutableBuildOptions().clear(); + builderVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BuildProvenance getDefaultInstanceForType() { + return io.grafeas.v1.BuildProvenance.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BuildProvenance build() { + io.grafeas.v1.BuildProvenance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BuildProvenance buildPartial() { + io.grafeas.v1.BuildProvenance result = new io.grafeas.v1.BuildProvenance(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.BuildProvenance result) { + if (commandsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + commands_ = java.util.Collections.unmodifiableList(commands_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.commands_ = commands_; + } else { + result.commands_ = commandsBuilder_.build(); + } + if (builtArtifactsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + builtArtifacts_ = java.util.Collections.unmodifiableList(builtArtifacts_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.builtArtifacts_ = builtArtifacts_; + } else { + result.builtArtifacts_ = builtArtifactsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.BuildProvenance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.startTime_ = startTimeBuilder_ == null + ? startTime_ + : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.creator_ = creator_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.logsUri_ = logsUri_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.sourceProvenance_ = sourceProvenanceBuilder_ == null + ? sourceProvenance_ + : sourceProvenanceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.triggerId_ = triggerId_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.buildOptions_ = internalGetBuildOptions(); + result.buildOptions_.makeImmutable(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.builderVersion_ = builderVersion_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BuildProvenance) { + return mergeFrom((io.grafeas.v1.BuildProvenance)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BuildProvenance other) { + if (other == io.grafeas.v1.BuildProvenance.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (commandsBuilder_ == null) { + if (!other.commands_.isEmpty()) { + if (commands_.isEmpty()) { + commands_ = other.commands_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureCommandsIsMutable(); + commands_.addAll(other.commands_); + } + onChanged(); + } + } else { + if (!other.commands_.isEmpty()) { + if (commandsBuilder_.isEmpty()) { + commandsBuilder_.dispose(); + commandsBuilder_ = null; + commands_ = other.commands_; + bitField0_ = (bitField0_ & ~0x00000004); + commandsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCommandsFieldBuilder() : null; + } else { + commandsBuilder_.addAllMessages(other.commands_); + } + } + } + if (builtArtifactsBuilder_ == null) { + if (!other.builtArtifacts_.isEmpty()) { + if (builtArtifacts_.isEmpty()) { + builtArtifacts_ = other.builtArtifacts_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.addAll(other.builtArtifacts_); + } + onChanged(); + } + } else { + if (!other.builtArtifacts_.isEmpty()) { + if (builtArtifactsBuilder_.isEmpty()) { + builtArtifactsBuilder_.dispose(); + builtArtifactsBuilder_ = null; + builtArtifacts_ = other.builtArtifacts_; + bitField0_ = (bitField0_ & ~0x00000008); + builtArtifactsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBuiltArtifactsFieldBuilder() : null; + } else { + builtArtifactsBuilder_.addAllMessages(other.builtArtifacts_); + } + } + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getCreator().isEmpty()) { + creator_ = other.creator_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getLogsUri().isEmpty()) { + logsUri_ = other.logsUri_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasSourceProvenance()) { + mergeSourceProvenance(other.getSourceProvenance()); + } + if (!other.getTriggerId().isEmpty()) { + triggerId_ = other.triggerId_; + bitField0_ |= 0x00000400; + onChanged(); + } + internalGetMutableBuildOptions().mergeFrom( + other.internalGetBuildOptions()); + bitField0_ |= 0x00000800; + if (!other.getBuilderVersion().isEmpty()) { + builderVersion_ = other.builderVersion_; + bitField0_ |= 0x00001000; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + io.grafeas.v1.Command m = + input.readMessage( + io.grafeas.v1.Command.parser(), + extensionRegistry); + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + commands_.add(m); + } else { + commandsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: { + io.grafeas.v1.Artifact m = + input.readMessage( + io.grafeas.v1.Artifact.parser(), + extensionRegistry); + if (builtArtifactsBuilder_ == null) { + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.add(m); + } else { + builtArtifactsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getStartTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + creator_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + logsUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: { + input.readMessage( + getSourceProvenanceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: { + triggerId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: { + com.google.protobuf.MapEntry + buildOptions__ = input.readMessage( + BuildOptionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableBuildOptions().getMutableMap().put( + buildOptions__.getKey(), buildOptions__.getValue()); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: { + builderVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * Required. Unique identifier of the build.
+     * 
+ * + * string id = 1; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Unique identifier of the build.
+     * 
+ * + * string id = 1; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Unique identifier of the build.
+     * 
+ * + * string id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. Unique identifier of the build.
+     * 
+ * + * string id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. Unique identifier of the build.
+     * 
+ * + * string id = 1; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + *
+     * ID of the project.
+     * 
+ * + * string project_id = 2; + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * ID of the project.
+     * 
+ * + * string project_id = 2; + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * ID of the project.
+     * 
+ * + * string project_id = 2; + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * ID of the project.
+     * 
+ * + * string project_id = 2; + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * ID of the project.
+     * 
+ * + * string project_id = 2; + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List commands_ = + java.util.Collections.emptyList(); + private void ensureCommandsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + commands_ = new java.util.ArrayList(commands_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Command, io.grafeas.v1.Command.Builder, io.grafeas.v1.CommandOrBuilder> commandsBuilder_; + + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public java.util.List getCommandsList() { + if (commandsBuilder_ == null) { + return java.util.Collections.unmodifiableList(commands_); + } else { + return commandsBuilder_.getMessageList(); + } + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public int getCommandsCount() { + if (commandsBuilder_ == null) { + return commands_.size(); + } else { + return commandsBuilder_.getCount(); + } + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public io.grafeas.v1.Command getCommands(int index) { + if (commandsBuilder_ == null) { + return commands_.get(index); + } else { + return commandsBuilder_.getMessage(index); + } + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder setCommands( + int index, io.grafeas.v1.Command value) { + if (commandsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandsIsMutable(); + commands_.set(index, value); + onChanged(); + } else { + commandsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder setCommands( + int index, io.grafeas.v1.Command.Builder builderForValue) { + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + commands_.set(index, builderForValue.build()); + onChanged(); + } else { + commandsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder addCommands(io.grafeas.v1.Command value) { + if (commandsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandsIsMutable(); + commands_.add(value); + onChanged(); + } else { + commandsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder addCommands( + int index, io.grafeas.v1.Command value) { + if (commandsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandsIsMutable(); + commands_.add(index, value); + onChanged(); + } else { + commandsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder addCommands( + io.grafeas.v1.Command.Builder builderForValue) { + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + commands_.add(builderForValue.build()); + onChanged(); + } else { + commandsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder addCommands( + int index, io.grafeas.v1.Command.Builder builderForValue) { + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + commands_.add(index, builderForValue.build()); + onChanged(); + } else { + commandsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder addAllCommands( + java.lang.Iterable values) { + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, commands_); + onChanged(); + } else { + commandsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder clearCommands() { + if (commandsBuilder_ == null) { + commands_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + commandsBuilder_.clear(); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder removeCommands(int index) { + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + commands_.remove(index); + onChanged(); + } else { + commandsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public io.grafeas.v1.Command.Builder getCommandsBuilder( + int index) { + return getCommandsFieldBuilder().getBuilder(index); + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public io.grafeas.v1.CommandOrBuilder getCommandsOrBuilder( + int index) { + if (commandsBuilder_ == null) { + return commands_.get(index); } else { + return commandsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public java.util.List + getCommandsOrBuilderList() { + if (commandsBuilder_ != null) { + return commandsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(commands_); + } + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public io.grafeas.v1.Command.Builder addCommandsBuilder() { + return getCommandsFieldBuilder().addBuilder( + io.grafeas.v1.Command.getDefaultInstance()); + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public io.grafeas.v1.Command.Builder addCommandsBuilder( + int index) { + return getCommandsFieldBuilder().addBuilder( + index, io.grafeas.v1.Command.getDefaultInstance()); + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public java.util.List + getCommandsBuilderList() { + return getCommandsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Command, io.grafeas.v1.Command.Builder, io.grafeas.v1.CommandOrBuilder> + getCommandsFieldBuilder() { + if (commandsBuilder_ == null) { + commandsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Command, io.grafeas.v1.Command.Builder, io.grafeas.v1.CommandOrBuilder>( + commands_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + commands_ = null; + } + return commandsBuilder_; + } + + private java.util.List builtArtifacts_ = + java.util.Collections.emptyList(); + private void ensureBuiltArtifactsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + builtArtifacts_ = new java.util.ArrayList(builtArtifacts_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Artifact, io.grafeas.v1.Artifact.Builder, io.grafeas.v1.ArtifactOrBuilder> builtArtifactsBuilder_; + + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public java.util.List getBuiltArtifactsList() { + if (builtArtifactsBuilder_ == null) { + return java.util.Collections.unmodifiableList(builtArtifacts_); + } else { + return builtArtifactsBuilder_.getMessageList(); + } + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public int getBuiltArtifactsCount() { + if (builtArtifactsBuilder_ == null) { + return builtArtifacts_.size(); + } else { + return builtArtifactsBuilder_.getCount(); + } + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public io.grafeas.v1.Artifact getBuiltArtifacts(int index) { + if (builtArtifactsBuilder_ == null) { + return builtArtifacts_.get(index); + } else { + return builtArtifactsBuilder_.getMessage(index); + } + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder setBuiltArtifacts( + int index, io.grafeas.v1.Artifact value) { + if (builtArtifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.set(index, value); + onChanged(); + } else { + builtArtifactsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder setBuiltArtifacts( + int index, io.grafeas.v1.Artifact.Builder builderForValue) { + if (builtArtifactsBuilder_ == null) { + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.set(index, builderForValue.build()); + onChanged(); + } else { + builtArtifactsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder addBuiltArtifacts(io.grafeas.v1.Artifact value) { + if (builtArtifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.add(value); + onChanged(); + } else { + builtArtifactsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder addBuiltArtifacts( + int index, io.grafeas.v1.Artifact value) { + if (builtArtifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.add(index, value); + onChanged(); + } else { + builtArtifactsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder addBuiltArtifacts( + io.grafeas.v1.Artifact.Builder builderForValue) { + if (builtArtifactsBuilder_ == null) { + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.add(builderForValue.build()); + onChanged(); + } else { + builtArtifactsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder addBuiltArtifacts( + int index, io.grafeas.v1.Artifact.Builder builderForValue) { + if (builtArtifactsBuilder_ == null) { + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.add(index, builderForValue.build()); + onChanged(); + } else { + builtArtifactsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder addAllBuiltArtifacts( + java.lang.Iterable values) { + if (builtArtifactsBuilder_ == null) { + ensureBuiltArtifactsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, builtArtifacts_); + onChanged(); + } else { + builtArtifactsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder clearBuiltArtifacts() { + if (builtArtifactsBuilder_ == null) { + builtArtifacts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + builtArtifactsBuilder_.clear(); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder removeBuiltArtifacts(int index) { + if (builtArtifactsBuilder_ == null) { + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.remove(index); + onChanged(); + } else { + builtArtifactsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public io.grafeas.v1.Artifact.Builder getBuiltArtifactsBuilder( + int index) { + return getBuiltArtifactsFieldBuilder().getBuilder(index); + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public io.grafeas.v1.ArtifactOrBuilder getBuiltArtifactsOrBuilder( + int index) { + if (builtArtifactsBuilder_ == null) { + return builtArtifacts_.get(index); } else { + return builtArtifactsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public java.util.List + getBuiltArtifactsOrBuilderList() { + if (builtArtifactsBuilder_ != null) { + return builtArtifactsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(builtArtifacts_); + } + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public io.grafeas.v1.Artifact.Builder addBuiltArtifactsBuilder() { + return getBuiltArtifactsFieldBuilder().addBuilder( + io.grafeas.v1.Artifact.getDefaultInstance()); + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public io.grafeas.v1.Artifact.Builder addBuiltArtifactsBuilder( + int index) { + return getBuiltArtifactsFieldBuilder().addBuilder( + index, io.grafeas.v1.Artifact.getDefaultInstance()); + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public java.util.List + getBuiltArtifactsBuilderList() { + return getBuiltArtifactsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Artifact, io.grafeas.v1.Artifact.Builder, io.grafeas.v1.ArtifactOrBuilder> + getBuiltArtifactsFieldBuilder() { + if (builtArtifactsBuilder_ == null) { + builtArtifactsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Artifact, io.grafeas.v1.Artifact.Builder, io.grafeas.v1.ArtifactOrBuilder>( + builtArtifacts_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + builtArtifacts_ = null; + } + return builtArtifactsBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + public Builder setStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + startTime_ != null && + startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000020); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getStartTime(), + getParentForChildren(), + isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000040); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object creator_ = ""; + /** + *
+     * E-mail address of the user who initiated this build. Note that this was the
+     * user's e-mail address at the time the build was initiated; this address may
+     * not represent the same end-user for all time.
+     * 
+ * + * string creator = 8; + * @return The creator. + */ + public java.lang.String getCreator() { + java.lang.Object ref = creator_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + creator_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * E-mail address of the user who initiated this build. Note that this was the
+     * user's e-mail address at the time the build was initiated; this address may
+     * not represent the same end-user for all time.
+     * 
+ * + * string creator = 8; + * @return The bytes for creator. + */ + public com.google.protobuf.ByteString + getCreatorBytes() { + java.lang.Object ref = creator_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + creator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * E-mail address of the user who initiated this build. Note that this was the
+     * user's e-mail address at the time the build was initiated; this address may
+     * not represent the same end-user for all time.
+     * 
+ * + * string creator = 8; + * @param value The creator to set. + * @return This builder for chaining. + */ + public Builder setCreator( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + creator_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * E-mail address of the user who initiated this build. Note that this was the
+     * user's e-mail address at the time the build was initiated; this address may
+     * not represent the same end-user for all time.
+     * 
+ * + * string creator = 8; + * @return This builder for chaining. + */ + public Builder clearCreator() { + creator_ = getDefaultInstance().getCreator(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + *
+     * E-mail address of the user who initiated this build. Note that this was the
+     * user's e-mail address at the time the build was initiated; this address may
+     * not represent the same end-user for all time.
+     * 
+ * + * string creator = 8; + * @param value The bytes for creator to set. + * @return This builder for chaining. + */ + public Builder setCreatorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + creator_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object logsUri_ = ""; + /** + *
+     * URI where any logs for this provenance were written.
+     * 
+ * + * string logs_uri = 9; + * @return The logsUri. + */ + public java.lang.String getLogsUri() { + java.lang.Object ref = logsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * URI where any logs for this provenance were written.
+     * 
+ * + * string logs_uri = 9; + * @return The bytes for logsUri. + */ + public com.google.protobuf.ByteString + getLogsUriBytes() { + java.lang.Object ref = logsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * URI where any logs for this provenance were written.
+     * 
+ * + * string logs_uri = 9; + * @param value The logsUri to set. + * @return This builder for chaining. + */ + public Builder setLogsUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + logsUri_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * URI where any logs for this provenance were written.
+     * 
+ * + * string logs_uri = 9; + * @return This builder for chaining. + */ + public Builder clearLogsUri() { + logsUri_ = getDefaultInstance().getLogsUri(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * URI where any logs for this provenance were written.
+     * 
+ * + * string logs_uri = 9; + * @param value The bytes for logsUri to set. + * @return This builder for chaining. + */ + public Builder setLogsUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + logsUri_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private io.grafeas.v1.Source sourceProvenance_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Source, io.grafeas.v1.Source.Builder, io.grafeas.v1.SourceOrBuilder> sourceProvenanceBuilder_; + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + * @return Whether the sourceProvenance field is set. + */ + public boolean hasSourceProvenance() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + * @return The sourceProvenance. + */ + public io.grafeas.v1.Source getSourceProvenance() { + if (sourceProvenanceBuilder_ == null) { + return sourceProvenance_ == null ? io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; + } else { + return sourceProvenanceBuilder_.getMessage(); + } + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + public Builder setSourceProvenance(io.grafeas.v1.Source value) { + if (sourceProvenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceProvenance_ = value; + } else { + sourceProvenanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + public Builder setSourceProvenance( + io.grafeas.v1.Source.Builder builderForValue) { + if (sourceProvenanceBuilder_ == null) { + sourceProvenance_ = builderForValue.build(); + } else { + sourceProvenanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + public Builder mergeSourceProvenance(io.grafeas.v1.Source value) { + if (sourceProvenanceBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) && + sourceProvenance_ != null && + sourceProvenance_ != io.grafeas.v1.Source.getDefaultInstance()) { + getSourceProvenanceBuilder().mergeFrom(value); + } else { + sourceProvenance_ = value; + } + } else { + sourceProvenanceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + public Builder clearSourceProvenance() { + bitField0_ = (bitField0_ & ~0x00000200); + sourceProvenance_ = null; + if (sourceProvenanceBuilder_ != null) { + sourceProvenanceBuilder_.dispose(); + sourceProvenanceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + public io.grafeas.v1.Source.Builder getSourceProvenanceBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getSourceProvenanceFieldBuilder().getBuilder(); + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + public io.grafeas.v1.SourceOrBuilder getSourceProvenanceOrBuilder() { + if (sourceProvenanceBuilder_ != null) { + return sourceProvenanceBuilder_.getMessageOrBuilder(); + } else { + return sourceProvenance_ == null ? + io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; + } + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Source, io.grafeas.v1.Source.Builder, io.grafeas.v1.SourceOrBuilder> + getSourceProvenanceFieldBuilder() { + if (sourceProvenanceBuilder_ == null) { + sourceProvenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Source, io.grafeas.v1.Source.Builder, io.grafeas.v1.SourceOrBuilder>( + getSourceProvenance(), + getParentForChildren(), + isClean()); + sourceProvenance_ = null; + } + return sourceProvenanceBuilder_; + } + + private java.lang.Object triggerId_ = ""; + /** + *
+     * Trigger identifier if the build was triggered automatically; empty if not.
+     * 
+ * + * string trigger_id = 11; + * @return The triggerId. + */ + public java.lang.String getTriggerId() { + java.lang.Object ref = triggerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + triggerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Trigger identifier if the build was triggered automatically; empty if not.
+     * 
+ * + * string trigger_id = 11; + * @return The bytes for triggerId. + */ + public com.google.protobuf.ByteString + getTriggerIdBytes() { + java.lang.Object ref = triggerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + triggerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Trigger identifier if the build was triggered automatically; empty if not.
+     * 
+ * + * string trigger_id = 11; + * @param value The triggerId to set. + * @return This builder for chaining. + */ + public Builder setTriggerId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + triggerId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * Trigger identifier if the build was triggered automatically; empty if not.
+     * 
+ * + * string trigger_id = 11; + * @return This builder for chaining. + */ + public Builder clearTriggerId() { + triggerId_ = getDefaultInstance().getTriggerId(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + *
+     * Trigger identifier if the build was triggered automatically; empty if not.
+     * 
+ * + * string trigger_id = 11; + * @param value The bytes for triggerId to set. + * @return This builder for chaining. + */ + public Builder setTriggerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + triggerId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> buildOptions_; + private com.google.protobuf.MapField + internalGetBuildOptions() { + if (buildOptions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BuildOptionsDefaultEntryHolder.defaultEntry); + } + return buildOptions_; + } + private com.google.protobuf.MapField + internalGetMutableBuildOptions() { + if (buildOptions_ == null) { + buildOptions_ = com.google.protobuf.MapField.newMapField( + BuildOptionsDefaultEntryHolder.defaultEntry); + } + if (!buildOptions_.isMutable()) { + buildOptions_ = buildOptions_.copy(); + } + bitField0_ |= 0x00000800; + onChanged(); + return buildOptions_; + } + public int getBuildOptionsCount() { + return internalGetBuildOptions().getMap().size(); + } + /** + *
+     * Special options applied to this build. This is a catch-all field where
+     * build providers can enter any desired additional details.
+     * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public boolean containsBuildOptions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetBuildOptions().getMap().containsKey(key); + } + /** + * Use {@link #getBuildOptionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBuildOptions() { + return getBuildOptionsMap(); + } + /** + *
+     * Special options applied to this build. This is a catch-all field where
+     * build providers can enter any desired additional details.
+     * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public java.util.Map getBuildOptionsMap() { + return internalGetBuildOptions().getMap(); + } + /** + *
+     * Special options applied to this build. This is a catch-all field where
+     * build providers can enter any desired additional details.
+     * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getBuildOptionsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetBuildOptions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Special options applied to this build. This is a catch-all field where
+     * build providers can enter any desired additional details.
+     * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public java.lang.String getBuildOptionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetBuildOptions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearBuildOptions() { + bitField0_ = (bitField0_ & ~0x00000800); + internalGetMutableBuildOptions().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Special options applied to this build. This is a catch-all field where
+     * build providers can enter any desired additional details.
+     * 
+ * + * map<string, string> build_options = 12; + */ + public Builder removeBuildOptions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableBuildOptions().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableBuildOptions() { + bitField0_ |= 0x00000800; + return internalGetMutableBuildOptions().getMutableMap(); + } + /** + *
+     * Special options applied to this build. This is a catch-all field where
+     * build providers can enter any desired additional details.
+     * 
+ * + * map<string, string> build_options = 12; + */ + public Builder putBuildOptions( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableBuildOptions().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000800; + return this; + } + /** + *
+     * Special options applied to this build. This is a catch-all field where
+     * build providers can enter any desired additional details.
+     * 
+ * + * map<string, string> build_options = 12; + */ + public Builder putAllBuildOptions( + java.util.Map values) { + internalGetMutableBuildOptions().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000800; + return this; + } + + private java.lang.Object builderVersion_ = ""; + /** + *
+     * Version string of the builder at the time this build was executed.
+     * 
+ * + * string builder_version = 13; + * @return The builderVersion. + */ + public java.lang.String getBuilderVersion() { + java.lang.Object ref = builderVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + builderVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Version string of the builder at the time this build was executed.
+     * 
+ * + * string builder_version = 13; + * @return The bytes for builderVersion. + */ + public com.google.protobuf.ByteString + getBuilderVersionBytes() { + java.lang.Object ref = builderVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + builderVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Version string of the builder at the time this build was executed.
+     * 
+ * + * string builder_version = 13; + * @param value The builderVersion to set. + * @return This builder for chaining. + */ + public Builder setBuilderVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + builderVersion_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * Version string of the builder at the time this build was executed.
+     * 
+ * + * string builder_version = 13; + * @return This builder for chaining. + */ + public Builder clearBuilderVersion() { + builderVersion_ = getDefaultInstance().getBuilderVersion(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + *
+     * Version string of the builder at the time this build was executed.
+     * 
+ * + * string builder_version = 13; + * @param value The bytes for builderVersion to set. + * @return This builder for chaining. + */ + public Builder setBuilderVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + builderVersion_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BuildProvenance) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BuildProvenance) + private static final io.grafeas.v1.BuildProvenance DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BuildProvenance(); + } + + public static io.grafeas.v1.BuildProvenance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BuildProvenance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BuildProvenance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java new file mode 100644 index 000000000000..9ee96a48e05b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java @@ -0,0 +1,388 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface BuildProvenanceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BuildProvenance) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Unique identifier of the build.
+   * 
+ * + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * Required. Unique identifier of the build.
+   * 
+ * + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * ID of the project.
+   * 
+ * + * string project_id = 2; + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + *
+   * ID of the project.
+   * 
+ * + * string project_id = 2; + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString + getProjectIdBytes(); + + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + java.util.List + getCommandsList(); + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + io.grafeas.v1.Command getCommands(int index); + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + int getCommandsCount(); + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + java.util.List + getCommandsOrBuilderList(); + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + io.grafeas.v1.CommandOrBuilder getCommandsOrBuilder( + int index); + + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + java.util.List + getBuiltArtifactsList(); + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + io.grafeas.v1.Artifact getBuiltArtifacts(int index); + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + int getBuiltArtifactsCount(); + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + java.util.List + getBuiltArtifactsOrBuilderList(); + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + io.grafeas.v1.ArtifactOrBuilder getBuiltArtifactsOrBuilder( + int index); + + /** + *
+   * Time at which the build was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Time at which the build was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Time at which the build was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Time at which execution of the build was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6; + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + *
+   * Time at which execution of the build was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6; + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + *
+   * Time at which execution of the build was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + *
+   * Time at which execution of the build was finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Time at which execution of the build was finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Time at which execution of the build was finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * E-mail address of the user who initiated this build. Note that this was the
+   * user's e-mail address at the time the build was initiated; this address may
+   * not represent the same end-user for all time.
+   * 
+ * + * string creator = 8; + * @return The creator. + */ + java.lang.String getCreator(); + /** + *
+   * E-mail address of the user who initiated this build. Note that this was the
+   * user's e-mail address at the time the build was initiated; this address may
+   * not represent the same end-user for all time.
+   * 
+ * + * string creator = 8; + * @return The bytes for creator. + */ + com.google.protobuf.ByteString + getCreatorBytes(); + + /** + *
+   * URI where any logs for this provenance were written.
+   * 
+ * + * string logs_uri = 9; + * @return The logsUri. + */ + java.lang.String getLogsUri(); + /** + *
+   * URI where any logs for this provenance were written.
+   * 
+ * + * string logs_uri = 9; + * @return The bytes for logsUri. + */ + com.google.protobuf.ByteString + getLogsUriBytes(); + + /** + *
+   * Details of the Source input to the build.
+   * 
+ * + * .grafeas.v1.Source source_provenance = 10; + * @return Whether the sourceProvenance field is set. + */ + boolean hasSourceProvenance(); + /** + *
+   * Details of the Source input to the build.
+   * 
+ * + * .grafeas.v1.Source source_provenance = 10; + * @return The sourceProvenance. + */ + io.grafeas.v1.Source getSourceProvenance(); + /** + *
+   * Details of the Source input to the build.
+   * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + io.grafeas.v1.SourceOrBuilder getSourceProvenanceOrBuilder(); + + /** + *
+   * Trigger identifier if the build was triggered automatically; empty if not.
+   * 
+ * + * string trigger_id = 11; + * @return The triggerId. + */ + java.lang.String getTriggerId(); + /** + *
+   * Trigger identifier if the build was triggered automatically; empty if not.
+   * 
+ * + * string trigger_id = 11; + * @return The bytes for triggerId. + */ + com.google.protobuf.ByteString + getTriggerIdBytes(); + + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + int getBuildOptionsCount(); + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + boolean containsBuildOptions( + java.lang.String key); + /** + * Use {@link #getBuildOptionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getBuildOptions(); + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + java.util.Map + getBuildOptionsMap(); + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + /* nullable */ +java.lang.String getBuildOptionsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + java.lang.String getBuildOptionsOrThrow( + java.lang.String key); + + /** + *
+   * Version string of the builder at the time this build was executed.
+   * 
+ * + * string builder_version = 13; + * @return The builderVersion. + */ + java.lang.String getBuilderVersion(); + /** + *
+   * Version string of the builder at the time this build was executed.
+   * 
+ * + * string builder_version = 13; + * @return The bytes for builderVersion. + */ + com.google.protobuf.ByteString + getBuilderVersionBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java new file mode 100644 index 000000000000..0d9adb96567b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java @@ -0,0 +1,544 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.BuilderConfig} + */ +public final class BuilderConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BuilderConfig) + BuilderConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use BuilderConfig.newBuilder() to construct. + private BuilderConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BuilderConfig() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BuilderConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuilderConfig.class, io.grafeas.v1.BuilderConfig.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BuilderConfig)) { + return super.equals(obj); + } + io.grafeas.v1.BuilderConfig other = (io.grafeas.v1.BuilderConfig) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BuilderConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuilderConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuilderConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuilderConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuilderConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuilderConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuilderConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuilderConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuilderConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuilderConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuilderConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuilderConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BuilderConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.BuilderConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BuilderConfig) + io.grafeas.v1.BuilderConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuilderConfig.class, io.grafeas.v1.BuilderConfig.Builder.class); + } + + // Construct using io.grafeas.v1.BuilderConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BuilderConfig getDefaultInstanceForType() { + return io.grafeas.v1.BuilderConfig.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BuilderConfig build() { + io.grafeas.v1.BuilderConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BuilderConfig buildPartial() { + io.grafeas.v1.BuilderConfig result = new io.grafeas.v1.BuilderConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.BuilderConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BuilderConfig) { + return mergeFrom((io.grafeas.v1.BuilderConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BuilderConfig other) { + if (other == io.grafeas.v1.BuilderConfig.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BuilderConfig) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BuilderConfig) + private static final io.grafeas.v1.BuilderConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BuilderConfig(); + } + + public static io.grafeas.v1.BuilderConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BuilderConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BuilderConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java new file mode 100644 index 000000000000..99554d4313c0 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +public interface BuilderConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BuilderConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java new file mode 100644 index 000000000000..e426740de2e1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java @@ -0,0 +1,2394 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/cvss.proto + +package io.grafeas.v1; + +/** + *
+ * Common Vulnerability Scoring System.
+ * For details, see https://www.first.org/cvss/specification-document
+ * This is a message we will try to use for storing various versions of CVSS
+ * rather than making a separate proto for storing a specific version.
+ * 
+ * + * Protobuf type {@code grafeas.v1.CVSS} + */ +public final class CVSS extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.CVSS) + CVSSOrBuilder { +private static final long serialVersionUID = 0L; + // Use CVSS.newBuilder() to construct. + private CVSS(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CVSS() { + attackVector_ = 0; + attackComplexity_ = 0; + authentication_ = 0; + privilegesRequired_ = 0; + userInteraction_ = 0; + scope_ = 0; + confidentialityImpact_ = 0; + integrityImpact_ = 0; + availabilityImpact_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CVSS(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CVSS.class, io.grafeas.v1.CVSS.Builder.class); + } + + /** + * Protobuf enum {@code grafeas.v1.CVSS.AttackVector} + */ + public enum AttackVector + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ATTACK_VECTOR_UNSPECIFIED = 0; + */ + ATTACK_VECTOR_UNSPECIFIED(0), + /** + * ATTACK_VECTOR_NETWORK = 1; + */ + ATTACK_VECTOR_NETWORK(1), + /** + * ATTACK_VECTOR_ADJACENT = 2; + */ + ATTACK_VECTOR_ADJACENT(2), + /** + * ATTACK_VECTOR_LOCAL = 3; + */ + ATTACK_VECTOR_LOCAL(3), + /** + * ATTACK_VECTOR_PHYSICAL = 4; + */ + ATTACK_VECTOR_PHYSICAL(4), + UNRECOGNIZED(-1), + ; + + /** + * ATTACK_VECTOR_UNSPECIFIED = 0; + */ + public static final int ATTACK_VECTOR_UNSPECIFIED_VALUE = 0; + /** + * ATTACK_VECTOR_NETWORK = 1; + */ + public static final int ATTACK_VECTOR_NETWORK_VALUE = 1; + /** + * ATTACK_VECTOR_ADJACENT = 2; + */ + public static final int ATTACK_VECTOR_ADJACENT_VALUE = 2; + /** + * ATTACK_VECTOR_LOCAL = 3; + */ + public static final int ATTACK_VECTOR_LOCAL_VALUE = 3; + /** + * ATTACK_VECTOR_PHYSICAL = 4; + */ + public static final int ATTACK_VECTOR_PHYSICAL_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AttackVector valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AttackVector forNumber(int value) { + switch (value) { + case 0: return ATTACK_VECTOR_UNSPECIFIED; + case 1: return ATTACK_VECTOR_NETWORK; + case 2: return ATTACK_VECTOR_ADJACENT; + case 3: return ATTACK_VECTOR_LOCAL; + case 4: return ATTACK_VECTOR_PHYSICAL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AttackVector> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AttackVector findValueByNumber(int number) { + return AttackVector.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(0); + } + + private static final AttackVector[] VALUES = values(); + + public static AttackVector valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AttackVector(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.AttackVector) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSS.AttackComplexity} + */ + public enum AttackComplexity + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + ATTACK_COMPLEXITY_UNSPECIFIED(0), + /** + * ATTACK_COMPLEXITY_LOW = 1; + */ + ATTACK_COMPLEXITY_LOW(1), + /** + * ATTACK_COMPLEXITY_HIGH = 2; + */ + ATTACK_COMPLEXITY_HIGH(2), + UNRECOGNIZED(-1), + ; + + /** + * ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + public static final int ATTACK_COMPLEXITY_UNSPECIFIED_VALUE = 0; + /** + * ATTACK_COMPLEXITY_LOW = 1; + */ + public static final int ATTACK_COMPLEXITY_LOW_VALUE = 1; + /** + * ATTACK_COMPLEXITY_HIGH = 2; + */ + public static final int ATTACK_COMPLEXITY_HIGH_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AttackComplexity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AttackComplexity forNumber(int value) { + switch (value) { + case 0: return ATTACK_COMPLEXITY_UNSPECIFIED; + case 1: return ATTACK_COMPLEXITY_LOW; + case 2: return ATTACK_COMPLEXITY_HIGH; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AttackComplexity> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AttackComplexity findValueByNumber(int number) { + return AttackComplexity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(1); + } + + private static final AttackComplexity[] VALUES = values(); + + public static AttackComplexity valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AttackComplexity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.AttackComplexity) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSS.Authentication} + */ + public enum Authentication + implements com.google.protobuf.ProtocolMessageEnum { + /** + * AUTHENTICATION_UNSPECIFIED = 0; + */ + AUTHENTICATION_UNSPECIFIED(0), + /** + * AUTHENTICATION_MULTIPLE = 1; + */ + AUTHENTICATION_MULTIPLE(1), + /** + * AUTHENTICATION_SINGLE = 2; + */ + AUTHENTICATION_SINGLE(2), + /** + * AUTHENTICATION_NONE = 3; + */ + AUTHENTICATION_NONE(3), + UNRECOGNIZED(-1), + ; + + /** + * AUTHENTICATION_UNSPECIFIED = 0; + */ + public static final int AUTHENTICATION_UNSPECIFIED_VALUE = 0; + /** + * AUTHENTICATION_MULTIPLE = 1; + */ + public static final int AUTHENTICATION_MULTIPLE_VALUE = 1; + /** + * AUTHENTICATION_SINGLE = 2; + */ + public static final int AUTHENTICATION_SINGLE_VALUE = 2; + /** + * AUTHENTICATION_NONE = 3; + */ + public static final int AUTHENTICATION_NONE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Authentication valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Authentication forNumber(int value) { + switch (value) { + case 0: return AUTHENTICATION_UNSPECIFIED; + case 1: return AUTHENTICATION_MULTIPLE; + case 2: return AUTHENTICATION_SINGLE; + case 3: return AUTHENTICATION_NONE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Authentication> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Authentication findValueByNumber(int number) { + return Authentication.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(2); + } + + private static final Authentication[] VALUES = values(); + + public static Authentication valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Authentication(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.Authentication) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSS.PrivilegesRequired} + */ + public enum PrivilegesRequired + implements com.google.protobuf.ProtocolMessageEnum { + /** + * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + PRIVILEGES_REQUIRED_UNSPECIFIED(0), + /** + * PRIVILEGES_REQUIRED_NONE = 1; + */ + PRIVILEGES_REQUIRED_NONE(1), + /** + * PRIVILEGES_REQUIRED_LOW = 2; + */ + PRIVILEGES_REQUIRED_LOW(2), + /** + * PRIVILEGES_REQUIRED_HIGH = 3; + */ + PRIVILEGES_REQUIRED_HIGH(3), + UNRECOGNIZED(-1), + ; + + /** + * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + public static final int PRIVILEGES_REQUIRED_UNSPECIFIED_VALUE = 0; + /** + * PRIVILEGES_REQUIRED_NONE = 1; + */ + public static final int PRIVILEGES_REQUIRED_NONE_VALUE = 1; + /** + * PRIVILEGES_REQUIRED_LOW = 2; + */ + public static final int PRIVILEGES_REQUIRED_LOW_VALUE = 2; + /** + * PRIVILEGES_REQUIRED_HIGH = 3; + */ + public static final int PRIVILEGES_REQUIRED_HIGH_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PrivilegesRequired valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PrivilegesRequired forNumber(int value) { + switch (value) { + case 0: return PRIVILEGES_REQUIRED_UNSPECIFIED; + case 1: return PRIVILEGES_REQUIRED_NONE; + case 2: return PRIVILEGES_REQUIRED_LOW; + case 3: return PRIVILEGES_REQUIRED_HIGH; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PrivilegesRequired> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PrivilegesRequired findValueByNumber(int number) { + return PrivilegesRequired.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(3); + } + + private static final PrivilegesRequired[] VALUES = values(); + + public static PrivilegesRequired valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PrivilegesRequired(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.PrivilegesRequired) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSS.UserInteraction} + */ + public enum UserInteraction + implements com.google.protobuf.ProtocolMessageEnum { + /** + * USER_INTERACTION_UNSPECIFIED = 0; + */ + USER_INTERACTION_UNSPECIFIED(0), + /** + * USER_INTERACTION_NONE = 1; + */ + USER_INTERACTION_NONE(1), + /** + * USER_INTERACTION_REQUIRED = 2; + */ + USER_INTERACTION_REQUIRED(2), + UNRECOGNIZED(-1), + ; + + /** + * USER_INTERACTION_UNSPECIFIED = 0; + */ + public static final int USER_INTERACTION_UNSPECIFIED_VALUE = 0; + /** + * USER_INTERACTION_NONE = 1; + */ + public static final int USER_INTERACTION_NONE_VALUE = 1; + /** + * USER_INTERACTION_REQUIRED = 2; + */ + public static final int USER_INTERACTION_REQUIRED_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UserInteraction valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static UserInteraction forNumber(int value) { + switch (value) { + case 0: return USER_INTERACTION_UNSPECIFIED; + case 1: return USER_INTERACTION_NONE; + case 2: return USER_INTERACTION_REQUIRED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + UserInteraction> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public UserInteraction findValueByNumber(int number) { + return UserInteraction.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(4); + } + + private static final UserInteraction[] VALUES = values(); + + public static UserInteraction valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private UserInteraction(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.UserInteraction) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSS.Scope} + */ + public enum Scope + implements com.google.protobuf.ProtocolMessageEnum { + /** + * SCOPE_UNSPECIFIED = 0; + */ + SCOPE_UNSPECIFIED(0), + /** + * SCOPE_UNCHANGED = 1; + */ + SCOPE_UNCHANGED(1), + /** + * SCOPE_CHANGED = 2; + */ + SCOPE_CHANGED(2), + UNRECOGNIZED(-1), + ; + + /** + * SCOPE_UNSPECIFIED = 0; + */ + public static final int SCOPE_UNSPECIFIED_VALUE = 0; + /** + * SCOPE_UNCHANGED = 1; + */ + public static final int SCOPE_UNCHANGED_VALUE = 1; + /** + * SCOPE_CHANGED = 2; + */ + public static final int SCOPE_CHANGED_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Scope valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Scope forNumber(int value) { + switch (value) { + case 0: return SCOPE_UNSPECIFIED; + case 1: return SCOPE_UNCHANGED; + case 2: return SCOPE_CHANGED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Scope> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Scope findValueByNumber(int number) { + return Scope.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(5); + } + + private static final Scope[] VALUES = values(); + + public static Scope valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Scope(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.Scope) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSS.Impact} + */ + public enum Impact + implements com.google.protobuf.ProtocolMessageEnum { + /** + * IMPACT_UNSPECIFIED = 0; + */ + IMPACT_UNSPECIFIED(0), + /** + * IMPACT_HIGH = 1; + */ + IMPACT_HIGH(1), + /** + * IMPACT_LOW = 2; + */ + IMPACT_LOW(2), + /** + * IMPACT_NONE = 3; + */ + IMPACT_NONE(3), + UNRECOGNIZED(-1), + ; + + /** + * IMPACT_UNSPECIFIED = 0; + */ + public static final int IMPACT_UNSPECIFIED_VALUE = 0; + /** + * IMPACT_HIGH = 1; + */ + public static final int IMPACT_HIGH_VALUE = 1; + /** + * IMPACT_LOW = 2; + */ + public static final int IMPACT_LOW_VALUE = 2; + /** + * IMPACT_NONE = 3; + */ + public static final int IMPACT_NONE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Impact valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Impact forNumber(int value) { + switch (value) { + case 0: return IMPACT_UNSPECIFIED; + case 1: return IMPACT_HIGH; + case 2: return IMPACT_LOW; + case 3: return IMPACT_NONE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Impact> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Impact findValueByNumber(int number) { + return Impact.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(6); + } + + private static final Impact[] VALUES = values(); + + public static Impact valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Impact(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.Impact) + } + + public static final int BASE_SCORE_FIELD_NUMBER = 1; + private float baseScore_ = 0F; + /** + *
+   * The base score is a function of the base metric scores.
+   * 
+ * + * float base_score = 1; + * @return The baseScore. + */ + @java.lang.Override + public float getBaseScore() { + return baseScore_; + } + + public static final int EXPLOITABILITY_SCORE_FIELD_NUMBER = 2; + private float exploitabilityScore_ = 0F; + /** + * float exploitability_score = 2; + * @return The exploitabilityScore. + */ + @java.lang.Override + public float getExploitabilityScore() { + return exploitabilityScore_; + } + + public static final int IMPACT_SCORE_FIELD_NUMBER = 3; + private float impactScore_ = 0F; + /** + * float impact_score = 3; + * @return The impactScore. + */ + @java.lang.Override + public float getImpactScore() { + return impactScore_; + } + + public static final int ATTACK_VECTOR_FIELD_NUMBER = 4; + private int attackVector_ = 0; + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @return The enum numeric value on the wire for attackVector. + */ + @java.lang.Override public int getAttackVectorValue() { + return attackVector_; + } + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @return The attackVector. + */ + @java.lang.Override public io.grafeas.v1.CVSS.AttackVector getAttackVector() { + io.grafeas.v1.CVSS.AttackVector result = io.grafeas.v1.CVSS.AttackVector.forNumber(attackVector_); + return result == null ? io.grafeas.v1.CVSS.AttackVector.UNRECOGNIZED : result; + } + + public static final int ATTACK_COMPLEXITY_FIELD_NUMBER = 5; + private int attackComplexity_ = 0; + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @return The enum numeric value on the wire for attackComplexity. + */ + @java.lang.Override public int getAttackComplexityValue() { + return attackComplexity_; + } + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @return The attackComplexity. + */ + @java.lang.Override public io.grafeas.v1.CVSS.AttackComplexity getAttackComplexity() { + io.grafeas.v1.CVSS.AttackComplexity result = io.grafeas.v1.CVSS.AttackComplexity.forNumber(attackComplexity_); + return result == null ? io.grafeas.v1.CVSS.AttackComplexity.UNRECOGNIZED : result; + } + + public static final int AUTHENTICATION_FIELD_NUMBER = 6; + private int authentication_ = 0; + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @return The enum numeric value on the wire for authentication. + */ + @java.lang.Override public int getAuthenticationValue() { + return authentication_; + } + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @return The authentication. + */ + @java.lang.Override public io.grafeas.v1.CVSS.Authentication getAuthentication() { + io.grafeas.v1.CVSS.Authentication result = io.grafeas.v1.CVSS.Authentication.forNumber(authentication_); + return result == null ? io.grafeas.v1.CVSS.Authentication.UNRECOGNIZED : result; + } + + public static final int PRIVILEGES_REQUIRED_FIELD_NUMBER = 7; + private int privilegesRequired_ = 0; + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @return The enum numeric value on the wire for privilegesRequired. + */ + @java.lang.Override public int getPrivilegesRequiredValue() { + return privilegesRequired_; + } + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @return The privilegesRequired. + */ + @java.lang.Override public io.grafeas.v1.CVSS.PrivilegesRequired getPrivilegesRequired() { + io.grafeas.v1.CVSS.PrivilegesRequired result = io.grafeas.v1.CVSS.PrivilegesRequired.forNumber(privilegesRequired_); + return result == null ? io.grafeas.v1.CVSS.PrivilegesRequired.UNRECOGNIZED : result; + } + + public static final int USER_INTERACTION_FIELD_NUMBER = 8; + private int userInteraction_ = 0; + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @return The enum numeric value on the wire for userInteraction. + */ + @java.lang.Override public int getUserInteractionValue() { + return userInteraction_; + } + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @return The userInteraction. + */ + @java.lang.Override public io.grafeas.v1.CVSS.UserInteraction getUserInteraction() { + io.grafeas.v1.CVSS.UserInteraction result = io.grafeas.v1.CVSS.UserInteraction.forNumber(userInteraction_); + return result == null ? io.grafeas.v1.CVSS.UserInteraction.UNRECOGNIZED : result; + } + + public static final int SCOPE_FIELD_NUMBER = 9; + private int scope_ = 0; + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override public int getScopeValue() { + return scope_; + } + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @return The scope. + */ + @java.lang.Override public io.grafeas.v1.CVSS.Scope getScope() { + io.grafeas.v1.CVSS.Scope result = io.grafeas.v1.CVSS.Scope.forNumber(scope_); + return result == null ? io.grafeas.v1.CVSS.Scope.UNRECOGNIZED : result; + } + + public static final int CONFIDENTIALITY_IMPACT_FIELD_NUMBER = 10; + private int confidentialityImpact_ = 0; + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @return The enum numeric value on the wire for confidentialityImpact. + */ + @java.lang.Override public int getConfidentialityImpactValue() { + return confidentialityImpact_; + } + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @return The confidentialityImpact. + */ + @java.lang.Override public io.grafeas.v1.CVSS.Impact getConfidentialityImpact() { + io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(confidentialityImpact_); + return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; + } + + public static final int INTEGRITY_IMPACT_FIELD_NUMBER = 11; + private int integrityImpact_ = 0; + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @return The enum numeric value on the wire for integrityImpact. + */ + @java.lang.Override public int getIntegrityImpactValue() { + return integrityImpact_; + } + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @return The integrityImpact. + */ + @java.lang.Override public io.grafeas.v1.CVSS.Impact getIntegrityImpact() { + io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(integrityImpact_); + return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; + } + + public static final int AVAILABILITY_IMPACT_FIELD_NUMBER = 12; + private int availabilityImpact_ = 0; + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @return The enum numeric value on the wire for availabilityImpact. + */ + @java.lang.Override public int getAvailabilityImpactValue() { + return availabilityImpact_; + } + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @return The availabilityImpact. + */ + @java.lang.Override public io.grafeas.v1.CVSS.Impact getAvailabilityImpact() { + io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(availabilityImpact_); + return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { + output.writeFloat(1, baseScore_); + } + if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { + output.writeFloat(2, exploitabilityScore_); + } + if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { + output.writeFloat(3, impactScore_); + } + if (attackVector_ != io.grafeas.v1.CVSS.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { + output.writeEnum(4, attackVector_); + } + if (attackComplexity_ != io.grafeas.v1.CVSS.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { + output.writeEnum(5, attackComplexity_); + } + if (authentication_ != io.grafeas.v1.CVSS.Authentication.AUTHENTICATION_UNSPECIFIED.getNumber()) { + output.writeEnum(6, authentication_); + } + if (privilegesRequired_ != io.grafeas.v1.CVSS.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { + output.writeEnum(7, privilegesRequired_); + } + if (userInteraction_ != io.grafeas.v1.CVSS.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { + output.writeEnum(8, userInteraction_); + } + if (scope_ != io.grafeas.v1.CVSS.Scope.SCOPE_UNSPECIFIED.getNumber()) { + output.writeEnum(9, scope_); + } + if (confidentialityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(10, confidentialityImpact_); + } + if (integrityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(11, integrityImpact_); + } + if (availabilityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(12, availabilityImpact_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, baseScore_); + } + if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, exploitabilityScore_); + } + if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, impactScore_); + } + if (attackVector_ != io.grafeas.v1.CVSS.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, attackVector_); + } + if (attackComplexity_ != io.grafeas.v1.CVSS.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, attackComplexity_); + } + if (authentication_ != io.grafeas.v1.CVSS.Authentication.AUTHENTICATION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(6, authentication_); + } + if (privilegesRequired_ != io.grafeas.v1.CVSS.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, privilegesRequired_); + } + if (userInteraction_ != io.grafeas.v1.CVSS.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, userInteraction_); + } + if (scope_ != io.grafeas.v1.CVSS.Scope.SCOPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, scope_); + } + if (confidentialityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, confidentialityImpact_); + } + if (integrityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, integrityImpact_); + } + if (availabilityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(12, availabilityImpact_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.CVSS)) { + return super.equals(obj); + } + io.grafeas.v1.CVSS other = (io.grafeas.v1.CVSS) obj; + + if (java.lang.Float.floatToIntBits(getBaseScore()) + != java.lang.Float.floatToIntBits( + other.getBaseScore())) return false; + if (java.lang.Float.floatToIntBits(getExploitabilityScore()) + != java.lang.Float.floatToIntBits( + other.getExploitabilityScore())) return false; + if (java.lang.Float.floatToIntBits(getImpactScore()) + != java.lang.Float.floatToIntBits( + other.getImpactScore())) return false; + if (attackVector_ != other.attackVector_) return false; + if (attackComplexity_ != other.attackComplexity_) return false; + if (authentication_ != other.authentication_) return false; + if (privilegesRequired_ != other.privilegesRequired_) return false; + if (userInteraction_ != other.userInteraction_) return false; + if (scope_ != other.scope_) return false; + if (confidentialityImpact_ != other.confidentialityImpact_) return false; + if (integrityImpact_ != other.integrityImpact_) return false; + if (availabilityImpact_ != other.availabilityImpact_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BASE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getBaseScore()); + hash = (37 * hash) + EXPLOITABILITY_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getExploitabilityScore()); + hash = (37 * hash) + IMPACT_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getImpactScore()); + hash = (37 * hash) + ATTACK_VECTOR_FIELD_NUMBER; + hash = (53 * hash) + attackVector_; + hash = (37 * hash) + ATTACK_COMPLEXITY_FIELD_NUMBER; + hash = (53 * hash) + attackComplexity_; + hash = (37 * hash) + AUTHENTICATION_FIELD_NUMBER; + hash = (53 * hash) + authentication_; + hash = (37 * hash) + PRIVILEGES_REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + privilegesRequired_; + hash = (37 * hash) + USER_INTERACTION_FIELD_NUMBER; + hash = (53 * hash) + userInteraction_; + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + scope_; + hash = (37 * hash) + CONFIDENTIALITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + confidentialityImpact_; + hash = (37 * hash) + INTEGRITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + integrityImpact_; + hash = (37 * hash) + AVAILABILITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + availabilityImpact_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.CVSS parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CVSS parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CVSS parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CVSS parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CVSS parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CVSS parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CVSS parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CVSS parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CVSS parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.CVSS parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CVSS parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CVSS parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.CVSS prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Common Vulnerability Scoring System.
+   * For details, see https://www.first.org/cvss/specification-document
+   * This is a message we will try to use for storing various versions of CVSS
+   * rather than making a separate proto for storing a specific version.
+   * 
+ * + * Protobuf type {@code grafeas.v1.CVSS} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.CVSS) + io.grafeas.v1.CVSSOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CVSS.class, io.grafeas.v1.CVSS.Builder.class); + } + + // Construct using io.grafeas.v1.CVSS.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + baseScore_ = 0F; + exploitabilityScore_ = 0F; + impactScore_ = 0F; + attackVector_ = 0; + attackComplexity_ = 0; + authentication_ = 0; + privilegesRequired_ = 0; + userInteraction_ = 0; + scope_ = 0; + confidentialityImpact_ = 0; + integrityImpact_ = 0; + availabilityImpact_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.CVSS getDefaultInstanceForType() { + return io.grafeas.v1.CVSS.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.CVSS build() { + io.grafeas.v1.CVSS result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.CVSS buildPartial() { + io.grafeas.v1.CVSS result = new io.grafeas.v1.CVSS(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.CVSS result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.baseScore_ = baseScore_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.exploitabilityScore_ = exploitabilityScore_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.impactScore_ = impactScore_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.attackVector_ = attackVector_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.attackComplexity_ = attackComplexity_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.authentication_ = authentication_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.privilegesRequired_ = privilegesRequired_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.userInteraction_ = userInteraction_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.scope_ = scope_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.confidentialityImpact_ = confidentialityImpact_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.integrityImpact_ = integrityImpact_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.availabilityImpact_ = availabilityImpact_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.CVSS) { + return mergeFrom((io.grafeas.v1.CVSS)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.CVSS other) { + if (other == io.grafeas.v1.CVSS.getDefaultInstance()) return this; + if (other.getBaseScore() != 0F) { + setBaseScore(other.getBaseScore()); + } + if (other.getExploitabilityScore() != 0F) { + setExploitabilityScore(other.getExploitabilityScore()); + } + if (other.getImpactScore() != 0F) { + setImpactScore(other.getImpactScore()); + } + if (other.attackVector_ != 0) { + setAttackVectorValue(other.getAttackVectorValue()); + } + if (other.attackComplexity_ != 0) { + setAttackComplexityValue(other.getAttackComplexityValue()); + } + if (other.authentication_ != 0) { + setAuthenticationValue(other.getAuthenticationValue()); + } + if (other.privilegesRequired_ != 0) { + setPrivilegesRequiredValue(other.getPrivilegesRequiredValue()); + } + if (other.userInteraction_ != 0) { + setUserInteractionValue(other.getUserInteractionValue()); + } + if (other.scope_ != 0) { + setScopeValue(other.getScopeValue()); + } + if (other.confidentialityImpact_ != 0) { + setConfidentialityImpactValue(other.getConfidentialityImpactValue()); + } + if (other.integrityImpact_ != 0) { + setIntegrityImpactValue(other.getIntegrityImpactValue()); + } + if (other.availabilityImpact_ != 0) { + setAvailabilityImpactValue(other.getAvailabilityImpactValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + baseScore_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: { + exploitabilityScore_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: { + impactScore_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 32: { + attackVector_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + attackComplexity_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + authentication_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + privilegesRequired_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + userInteraction_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + scope_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + confidentialityImpact_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: { + integrityImpact_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: { + availabilityImpact_ = input.readEnum(); + bitField0_ |= 0x00000800; + break; + } // case 96 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private float baseScore_ ; + /** + *
+     * The base score is a function of the base metric scores.
+     * 
+ * + * float base_score = 1; + * @return The baseScore. + */ + @java.lang.Override + public float getBaseScore() { + return baseScore_; + } + /** + *
+     * The base score is a function of the base metric scores.
+     * 
+ * + * float base_score = 1; + * @param value The baseScore to set. + * @return This builder for chaining. + */ + public Builder setBaseScore(float value) { + + baseScore_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The base score is a function of the base metric scores.
+     * 
+ * + * float base_score = 1; + * @return This builder for chaining. + */ + public Builder clearBaseScore() { + bitField0_ = (bitField0_ & ~0x00000001); + baseScore_ = 0F; + onChanged(); + return this; + } + + private float exploitabilityScore_ ; + /** + * float exploitability_score = 2; + * @return The exploitabilityScore. + */ + @java.lang.Override + public float getExploitabilityScore() { + return exploitabilityScore_; + } + /** + * float exploitability_score = 2; + * @param value The exploitabilityScore to set. + * @return This builder for chaining. + */ + public Builder setExploitabilityScore(float value) { + + exploitabilityScore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * float exploitability_score = 2; + * @return This builder for chaining. + */ + public Builder clearExploitabilityScore() { + bitField0_ = (bitField0_ & ~0x00000002); + exploitabilityScore_ = 0F; + onChanged(); + return this; + } + + private float impactScore_ ; + /** + * float impact_score = 3; + * @return The impactScore. + */ + @java.lang.Override + public float getImpactScore() { + return impactScore_; + } + /** + * float impact_score = 3; + * @param value The impactScore to set. + * @return This builder for chaining. + */ + public Builder setImpactScore(float value) { + + impactScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * float impact_score = 3; + * @return This builder for chaining. + */ + public Builder clearImpactScore() { + bitField0_ = (bitField0_ & ~0x00000004); + impactScore_ = 0F; + onChanged(); + return this; + } + + private int attackVector_ = 0; + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @return The enum numeric value on the wire for attackVector. + */ + @java.lang.Override public int getAttackVectorValue() { + return attackVector_; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @param value The enum numeric value on the wire for attackVector to set. + * @return This builder for chaining. + */ + public Builder setAttackVectorValue(int value) { + attackVector_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @return The attackVector. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.AttackVector getAttackVector() { + io.grafeas.v1.CVSS.AttackVector result = io.grafeas.v1.CVSS.AttackVector.forNumber(attackVector_); + return result == null ? io.grafeas.v1.CVSS.AttackVector.UNRECOGNIZED : result; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @param value The attackVector to set. + * @return This builder for chaining. + */ + public Builder setAttackVector(io.grafeas.v1.CVSS.AttackVector value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + attackVector_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @return This builder for chaining. + */ + public Builder clearAttackVector() { + bitField0_ = (bitField0_ & ~0x00000008); + attackVector_ = 0; + onChanged(); + return this; + } + + private int attackComplexity_ = 0; + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @return The enum numeric value on the wire for attackComplexity. + */ + @java.lang.Override public int getAttackComplexityValue() { + return attackComplexity_; + } + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @param value The enum numeric value on the wire for attackComplexity to set. + * @return This builder for chaining. + */ + public Builder setAttackComplexityValue(int value) { + attackComplexity_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @return The attackComplexity. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.AttackComplexity getAttackComplexity() { + io.grafeas.v1.CVSS.AttackComplexity result = io.grafeas.v1.CVSS.AttackComplexity.forNumber(attackComplexity_); + return result == null ? io.grafeas.v1.CVSS.AttackComplexity.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @param value The attackComplexity to set. + * @return This builder for chaining. + */ + public Builder setAttackComplexity(io.grafeas.v1.CVSS.AttackComplexity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + attackComplexity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @return This builder for chaining. + */ + public Builder clearAttackComplexity() { + bitField0_ = (bitField0_ & ~0x00000010); + attackComplexity_ = 0; + onChanged(); + return this; + } + + private int authentication_ = 0; + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @return The enum numeric value on the wire for authentication. + */ + @java.lang.Override public int getAuthenticationValue() { + return authentication_; + } + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @param value The enum numeric value on the wire for authentication to set. + * @return This builder for chaining. + */ + public Builder setAuthenticationValue(int value) { + authentication_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @return The authentication. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.Authentication getAuthentication() { + io.grafeas.v1.CVSS.Authentication result = io.grafeas.v1.CVSS.Authentication.forNumber(authentication_); + return result == null ? io.grafeas.v1.CVSS.Authentication.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @param value The authentication to set. + * @return This builder for chaining. + */ + public Builder setAuthentication(io.grafeas.v1.CVSS.Authentication value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + authentication_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @return This builder for chaining. + */ + public Builder clearAuthentication() { + bitField0_ = (bitField0_ & ~0x00000020); + authentication_ = 0; + onChanged(); + return this; + } + + private int privilegesRequired_ = 0; + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @return The enum numeric value on the wire for privilegesRequired. + */ + @java.lang.Override public int getPrivilegesRequiredValue() { + return privilegesRequired_; + } + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @param value The enum numeric value on the wire for privilegesRequired to set. + * @return This builder for chaining. + */ + public Builder setPrivilegesRequiredValue(int value) { + privilegesRequired_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @return The privilegesRequired. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.PrivilegesRequired getPrivilegesRequired() { + io.grafeas.v1.CVSS.PrivilegesRequired result = io.grafeas.v1.CVSS.PrivilegesRequired.forNumber(privilegesRequired_); + return result == null ? io.grafeas.v1.CVSS.PrivilegesRequired.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @param value The privilegesRequired to set. + * @return This builder for chaining. + */ + public Builder setPrivilegesRequired(io.grafeas.v1.CVSS.PrivilegesRequired value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + privilegesRequired_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @return This builder for chaining. + */ + public Builder clearPrivilegesRequired() { + bitField0_ = (bitField0_ & ~0x00000040); + privilegesRequired_ = 0; + onChanged(); + return this; + } + + private int userInteraction_ = 0; + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @return The enum numeric value on the wire for userInteraction. + */ + @java.lang.Override public int getUserInteractionValue() { + return userInteraction_; + } + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @param value The enum numeric value on the wire for userInteraction to set. + * @return This builder for chaining. + */ + public Builder setUserInteractionValue(int value) { + userInteraction_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @return The userInteraction. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.UserInteraction getUserInteraction() { + io.grafeas.v1.CVSS.UserInteraction result = io.grafeas.v1.CVSS.UserInteraction.forNumber(userInteraction_); + return result == null ? io.grafeas.v1.CVSS.UserInteraction.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @param value The userInteraction to set. + * @return This builder for chaining. + */ + public Builder setUserInteraction(io.grafeas.v1.CVSS.UserInteraction value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + userInteraction_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @return This builder for chaining. + */ + public Builder clearUserInteraction() { + bitField0_ = (bitField0_ & ~0x00000080); + userInteraction_ = 0; + onChanged(); + return this; + } + + private int scope_ = 0; + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override public int getScopeValue() { + return scope_; + } + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @param value The enum numeric value on the wire for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeValue(int value) { + scope_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @return The scope. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.Scope getScope() { + io.grafeas.v1.CVSS.Scope result = io.grafeas.v1.CVSS.Scope.forNumber(scope_); + return result == null ? io.grafeas.v1.CVSS.Scope.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(io.grafeas.v1.CVSS.Scope value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + scope_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @return This builder for chaining. + */ + public Builder clearScope() { + bitField0_ = (bitField0_ & ~0x00000100); + scope_ = 0; + onChanged(); + return this; + } + + private int confidentialityImpact_ = 0; + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @return The enum numeric value on the wire for confidentialityImpact. + */ + @java.lang.Override public int getConfidentialityImpactValue() { + return confidentialityImpact_; + } + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @param value The enum numeric value on the wire for confidentialityImpact to set. + * @return This builder for chaining. + */ + public Builder setConfidentialityImpactValue(int value) { + confidentialityImpact_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @return The confidentialityImpact. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.Impact getConfidentialityImpact() { + io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(confidentialityImpact_); + return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @param value The confidentialityImpact to set. + * @return This builder for chaining. + */ + public Builder setConfidentialityImpact(io.grafeas.v1.CVSS.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + confidentialityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @return This builder for chaining. + */ + public Builder clearConfidentialityImpact() { + bitField0_ = (bitField0_ & ~0x00000200); + confidentialityImpact_ = 0; + onChanged(); + return this; + } + + private int integrityImpact_ = 0; + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @return The enum numeric value on the wire for integrityImpact. + */ + @java.lang.Override public int getIntegrityImpactValue() { + return integrityImpact_; + } + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @param value The enum numeric value on the wire for integrityImpact to set. + * @return This builder for chaining. + */ + public Builder setIntegrityImpactValue(int value) { + integrityImpact_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @return The integrityImpact. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.Impact getIntegrityImpact() { + io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(integrityImpact_); + return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @param value The integrityImpact to set. + * @return This builder for chaining. + */ + public Builder setIntegrityImpact(io.grafeas.v1.CVSS.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + integrityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @return This builder for chaining. + */ + public Builder clearIntegrityImpact() { + bitField0_ = (bitField0_ & ~0x00000400); + integrityImpact_ = 0; + onChanged(); + return this; + } + + private int availabilityImpact_ = 0; + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @return The enum numeric value on the wire for availabilityImpact. + */ + @java.lang.Override public int getAvailabilityImpactValue() { + return availabilityImpact_; + } + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @param value The enum numeric value on the wire for availabilityImpact to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityImpactValue(int value) { + availabilityImpact_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @return The availabilityImpact. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.Impact getAvailabilityImpact() { + io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(availabilityImpact_); + return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @param value The availabilityImpact to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityImpact(io.grafeas.v1.CVSS.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + availabilityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @return This builder for chaining. + */ + public Builder clearAvailabilityImpact() { + bitField0_ = (bitField0_ & ~0x00000800); + availabilityImpact_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.CVSS) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.CVSS) + private static final io.grafeas.v1.CVSS DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.CVSS(); + } + + public static io.grafeas.v1.CVSS getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CVSS parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.CVSS getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java new file mode 100644 index 000000000000..2e8db76424dc --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java @@ -0,0 +1,142 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/cvss.proto + +package io.grafeas.v1; + +public interface CVSSOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.CVSS) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The base score is a function of the base metric scores.
+   * 
+ * + * float base_score = 1; + * @return The baseScore. + */ + float getBaseScore(); + + /** + * float exploitability_score = 2; + * @return The exploitabilityScore. + */ + float getExploitabilityScore(); + + /** + * float impact_score = 3; + * @return The impactScore. + */ + float getImpactScore(); + + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @return The enum numeric value on the wire for attackVector. + */ + int getAttackVectorValue(); + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @return The attackVector. + */ + io.grafeas.v1.CVSS.AttackVector getAttackVector(); + + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @return The enum numeric value on the wire for attackComplexity. + */ + int getAttackComplexityValue(); + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @return The attackComplexity. + */ + io.grafeas.v1.CVSS.AttackComplexity getAttackComplexity(); + + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @return The enum numeric value on the wire for authentication. + */ + int getAuthenticationValue(); + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @return The authentication. + */ + io.grafeas.v1.CVSS.Authentication getAuthentication(); + + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @return The enum numeric value on the wire for privilegesRequired. + */ + int getPrivilegesRequiredValue(); + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @return The privilegesRequired. + */ + io.grafeas.v1.CVSS.PrivilegesRequired getPrivilegesRequired(); + + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @return The enum numeric value on the wire for userInteraction. + */ + int getUserInteractionValue(); + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @return The userInteraction. + */ + io.grafeas.v1.CVSS.UserInteraction getUserInteraction(); + + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @return The enum numeric value on the wire for scope. + */ + int getScopeValue(); + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @return The scope. + */ + io.grafeas.v1.CVSS.Scope getScope(); + + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @return The enum numeric value on the wire for confidentialityImpact. + */ + int getConfidentialityImpactValue(); + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @return The confidentialityImpact. + */ + io.grafeas.v1.CVSS.Impact getConfidentialityImpact(); + + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @return The enum numeric value on the wire for integrityImpact. + */ + int getIntegrityImpactValue(); + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @return The integrityImpact. + */ + io.grafeas.v1.CVSS.Impact getIntegrityImpact(); + + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @return The enum numeric value on the wire for availabilityImpact. + */ + int getAvailabilityImpactValue(); + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @return The availabilityImpact. + */ + io.grafeas.v1.CVSS.Impact getAvailabilityImpact(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java new file mode 100644 index 000000000000..45bcae84cede --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java @@ -0,0 +1,128 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/cvss.proto + +package io.grafeas.v1; + +public final class CVSSProto { + private CVSSProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_CVSSv3_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_CVSSv3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_CVSS_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_CVSS_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\025grafeas/v1/cvss.proto\022\ngrafeas.v1\"\305\t\n\006" + + "CVSSv3\022\022\n\nbase_score\030\001 \001(\002\022\034\n\024exploitabi" + + "lity_score\030\002 \001(\002\022\024\n\014impact_score\030\003 \001(\002\0226" + + "\n\rattack_vector\030\005 \001(\0162\037.grafeas.v1.CVSSv" + + "3.AttackVector\022>\n\021attack_complexity\030\006 \001(" + + "\0162#.grafeas.v1.CVSSv3.AttackComplexity\022B" + + "\n\023privileges_required\030\007 \001(\0162%.grafeas.v1" + + ".CVSSv3.PrivilegesRequired\022<\n\020user_inter" + + "action\030\010 \001(\0162\".grafeas.v1.CVSSv3.UserInt" + + "eraction\022\'\n\005scope\030\t \001(\0162\030.grafeas.v1.CVS" + + "Sv3.Scope\0229\n\026confidentiality_impact\030\n \001(" + + "\0162\031.grafeas.v1.CVSSv3.Impact\0223\n\020integrit" + + "y_impact\030\013 \001(\0162\031.grafeas.v1.CVSSv3.Impac" + + "t\0226\n\023availability_impact\030\014 \001(\0162\031.grafeas" + + ".v1.CVSSv3.Impact\"\231\001\n\014AttackVector\022\035\n\031AT" + + "TACK_VECTOR_UNSPECIFIED\020\000\022\031\n\025ATTACK_VECT" + + "OR_NETWORK\020\001\022\032\n\026ATTACK_VECTOR_ADJACENT\020\002" + + "\022\027\n\023ATTACK_VECTOR_LOCAL\020\003\022\032\n\026ATTACK_VECT" + + "OR_PHYSICAL\020\004\"l\n\020AttackComplexity\022!\n\035ATT" + + "ACK_COMPLEXITY_UNSPECIFIED\020\000\022\031\n\025ATTACK_C" + + "OMPLEXITY_LOW\020\001\022\032\n\026ATTACK_COMPLEXITY_HIG" + + "H\020\002\"\222\001\n\022PrivilegesRequired\022#\n\037PRIVILEGES" + + "_REQUIRED_UNSPECIFIED\020\000\022\034\n\030PRIVILEGES_RE" + + "QUIRED_NONE\020\001\022\033\n\027PRIVILEGES_REQUIRED_LOW" + + "\020\002\022\034\n\030PRIVILEGES_REQUIRED_HIGH\020\003\"m\n\017User" + + "Interaction\022 \n\034USER_INTERACTION_UNSPECIF" + + "IED\020\000\022\031\n\025USER_INTERACTION_NONE\020\001\022\035\n\031USER" + + "_INTERACTION_REQUIRED\020\002\"F\n\005Scope\022\025\n\021SCOP" + + "E_UNSPECIFIED\020\000\022\023\n\017SCOPE_UNCHANGED\020\001\022\021\n\r" + + "SCOPE_CHANGED\020\002\"R\n\006Impact\022\026\n\022IMPACT_UNSP" + + "ECIFIED\020\000\022\017\n\013IMPACT_HIGH\020\001\022\016\n\nIMPACT_LOW" + + "\020\002\022\017\n\013IMPACT_NONE\020\003\"\360\n\n\004CVSS\022\022\n\nbase_sco" + + "re\030\001 \001(\002\022\034\n\024exploitability_score\030\002 \001(\002\022\024" + + "\n\014impact_score\030\003 \001(\002\0224\n\rattack_vector\030\004 " + + "\001(\0162\035.grafeas.v1.CVSS.AttackVector\022<\n\021at" + + "tack_complexity\030\005 \001(\0162!.grafeas.v1.CVSS." + + "AttackComplexity\0227\n\016authentication\030\006 \001(\016" + + "2\037.grafeas.v1.CVSS.Authentication\022@\n\023pri" + + "vileges_required\030\007 \001(\0162#.grafeas.v1.CVSS" + + ".PrivilegesRequired\022:\n\020user_interaction\030" + + "\010 \001(\0162 .grafeas.v1.CVSS.UserInteraction\022" + + "%\n\005scope\030\t \001(\0162\026.grafeas.v1.CVSS.Scope\0227" + + "\n\026confidentiality_impact\030\n \001(\0162\027.grafeas" + + ".v1.CVSS.Impact\0221\n\020integrity_impact\030\013 \001(" + + "\0162\027.grafeas.v1.CVSS.Impact\0224\n\023availabili" + + "ty_impact\030\014 \001(\0162\027.grafeas.v1.CVSS.Impact" + + "\"\231\001\n\014AttackVector\022\035\n\031ATTACK_VECTOR_UNSPE" + + "CIFIED\020\000\022\031\n\025ATTACK_VECTOR_NETWORK\020\001\022\032\n\026A" + + "TTACK_VECTOR_ADJACENT\020\002\022\027\n\023ATTACK_VECTOR" + + "_LOCAL\020\003\022\032\n\026ATTACK_VECTOR_PHYSICAL\020\004\"l\n\020" + + "AttackComplexity\022!\n\035ATTACK_COMPLEXITY_UN" + + "SPECIFIED\020\000\022\031\n\025ATTACK_COMPLEXITY_LOW\020\001\022\032" + + "\n\026ATTACK_COMPLEXITY_HIGH\020\002\"\201\001\n\016Authentic" + + "ation\022\036\n\032AUTHENTICATION_UNSPECIFIED\020\000\022\033\n" + + "\027AUTHENTICATION_MULTIPLE\020\001\022\031\n\025AUTHENTICA" + + "TION_SINGLE\020\002\022\027\n\023AUTHENTICATION_NONE\020\003\"\222" + + "\001\n\022PrivilegesRequired\022#\n\037PRIVILEGES_REQU" + + "IRED_UNSPECIFIED\020\000\022\034\n\030PRIVILEGES_REQUIRE" + + "D_NONE\020\001\022\033\n\027PRIVILEGES_REQUIRED_LOW\020\002\022\034\n" + + "\030PRIVILEGES_REQUIRED_HIGH\020\003\"m\n\017UserInter" + + "action\022 \n\034USER_INTERACTION_UNSPECIFIED\020\000" + + "\022\031\n\025USER_INTERACTION_NONE\020\001\022\035\n\031USER_INTE" + + "RACTION_REQUIRED\020\002\"F\n\005Scope\022\025\n\021SCOPE_UNS" + + "PECIFIED\020\000\022\023\n\017SCOPE_UNCHANGED\020\001\022\021\n\rSCOPE" + + "_CHANGED\020\002\"R\n\006Impact\022\026\n\022IMPACT_UNSPECIFI" + + "ED\020\000\022\017\n\013IMPACT_HIGH\020\001\022\016\n\nIMPACT_LOW\020\002\022\017\n" + + "\013IMPACT_NONE\020\003*S\n\013CVSSVersion\022\034\n\030CVSS_VE" + + "RSION_UNSPECIFIED\020\000\022\022\n\016CVSS_VERSION_2\020\001\022" + + "\022\n\016CVSS_VERSION_3\020\002B\\\n\rio.grafeas.v1B\tCV" + + "SSProtoP\001Z8google.golang.org/genproto/go" + + "ogleapis/grafeas/v1;grafeas\242\002\003GRAb\006proto" + + "3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_grafeas_v1_CVSSv3_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_CVSSv3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_CVSSv3_descriptor, + new java.lang.String[] { "BaseScore", "ExploitabilityScore", "ImpactScore", "AttackVector", "AttackComplexity", "PrivilegesRequired", "UserInteraction", "Scope", "ConfidentialityImpact", "IntegrityImpact", "AvailabilityImpact", }); + internal_static_grafeas_v1_CVSS_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_CVSS_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_CVSS_descriptor, + new java.lang.String[] { "BaseScore", "ExploitabilityScore", "ImpactScore", "AttackVector", "AttackComplexity", "Authentication", "PrivilegesRequired", "UserInteraction", "Scope", "ConfidentialityImpact", "IntegrityImpact", "AvailabilityImpact", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java new file mode 100644 index 000000000000..ce2a2a054bb1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java @@ -0,0 +1,126 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/cvss.proto + +package io.grafeas.v1; + +/** + *
+ * CVSS Version.
+ * 
+ * + * Protobuf enum {@code grafeas.v1.CVSSVersion} + */ +public enum CVSSVersion + implements com.google.protobuf.ProtocolMessageEnum { + /** + * CVSS_VERSION_UNSPECIFIED = 0; + */ + CVSS_VERSION_UNSPECIFIED(0), + /** + * CVSS_VERSION_2 = 1; + */ + CVSS_VERSION_2(1), + /** + * CVSS_VERSION_3 = 2; + */ + CVSS_VERSION_3(2), + UNRECOGNIZED(-1), + ; + + /** + * CVSS_VERSION_UNSPECIFIED = 0; + */ + public static final int CVSS_VERSION_UNSPECIFIED_VALUE = 0; + /** + * CVSS_VERSION_2 = 1; + */ + public static final int CVSS_VERSION_2_VALUE = 1; + /** + * CVSS_VERSION_3 = 2; + */ + public static final int CVSS_VERSION_3_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CVSSVersion valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CVSSVersion forNumber(int value) { + switch (value) { + case 0: return CVSS_VERSION_UNSPECIFIED; + case 1: return CVSS_VERSION_2; + case 2: return CVSS_VERSION_3; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + CVSSVersion> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CVSSVersion findValueByNumber(int number) { + return CVSSVersion.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSSProto.getDescriptor().getEnumTypes().get(0); + } + + private static final CVSSVersion[] VALUES = values(); + + public static CVSSVersion valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CVSSVersion(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSVersion) +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java new file mode 100644 index 000000000000..d23be5609fd1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java @@ -0,0 +1,2170 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/cvss.proto + +package io.grafeas.v1; + +/** + *
+ * Common Vulnerability Scoring System version 3.
+ * For details, see https://www.first.org/cvss/specification-document
+ * 
+ * + * Protobuf type {@code grafeas.v1.CVSSv3} + */ +public final class CVSSv3 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.CVSSv3) + CVSSv3OrBuilder { +private static final long serialVersionUID = 0L; + // Use CVSSv3.newBuilder() to construct. + private CVSSv3(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CVSSv3() { + attackVector_ = 0; + attackComplexity_ = 0; + privilegesRequired_ = 0; + userInteraction_ = 0; + scope_ = 0; + confidentialityImpact_ = 0; + integrityImpact_ = 0; + availabilityImpact_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CVSSv3(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CVSSv3.class, io.grafeas.v1.CVSSv3.Builder.class); + } + + /** + * Protobuf enum {@code grafeas.v1.CVSSv3.AttackVector} + */ + public enum AttackVector + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ATTACK_VECTOR_UNSPECIFIED = 0; + */ + ATTACK_VECTOR_UNSPECIFIED(0), + /** + * ATTACK_VECTOR_NETWORK = 1; + */ + ATTACK_VECTOR_NETWORK(1), + /** + * ATTACK_VECTOR_ADJACENT = 2; + */ + ATTACK_VECTOR_ADJACENT(2), + /** + * ATTACK_VECTOR_LOCAL = 3; + */ + ATTACK_VECTOR_LOCAL(3), + /** + * ATTACK_VECTOR_PHYSICAL = 4; + */ + ATTACK_VECTOR_PHYSICAL(4), + UNRECOGNIZED(-1), + ; + + /** + * ATTACK_VECTOR_UNSPECIFIED = 0; + */ + public static final int ATTACK_VECTOR_UNSPECIFIED_VALUE = 0; + /** + * ATTACK_VECTOR_NETWORK = 1; + */ + public static final int ATTACK_VECTOR_NETWORK_VALUE = 1; + /** + * ATTACK_VECTOR_ADJACENT = 2; + */ + public static final int ATTACK_VECTOR_ADJACENT_VALUE = 2; + /** + * ATTACK_VECTOR_LOCAL = 3; + */ + public static final int ATTACK_VECTOR_LOCAL_VALUE = 3; + /** + * ATTACK_VECTOR_PHYSICAL = 4; + */ + public static final int ATTACK_VECTOR_PHYSICAL_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AttackVector valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AttackVector forNumber(int value) { + switch (value) { + case 0: return ATTACK_VECTOR_UNSPECIFIED; + case 1: return ATTACK_VECTOR_NETWORK; + case 2: return ATTACK_VECTOR_ADJACENT; + case 3: return ATTACK_VECTOR_LOCAL; + case 4: return ATTACK_VECTOR_PHYSICAL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AttackVector> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AttackVector findValueByNumber(int number) { + return AttackVector.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(0); + } + + private static final AttackVector[] VALUES = values(); + + public static AttackVector valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AttackVector(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.AttackVector) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSSv3.AttackComplexity} + */ + public enum AttackComplexity + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + ATTACK_COMPLEXITY_UNSPECIFIED(0), + /** + * ATTACK_COMPLEXITY_LOW = 1; + */ + ATTACK_COMPLEXITY_LOW(1), + /** + * ATTACK_COMPLEXITY_HIGH = 2; + */ + ATTACK_COMPLEXITY_HIGH(2), + UNRECOGNIZED(-1), + ; + + /** + * ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + public static final int ATTACK_COMPLEXITY_UNSPECIFIED_VALUE = 0; + /** + * ATTACK_COMPLEXITY_LOW = 1; + */ + public static final int ATTACK_COMPLEXITY_LOW_VALUE = 1; + /** + * ATTACK_COMPLEXITY_HIGH = 2; + */ + public static final int ATTACK_COMPLEXITY_HIGH_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AttackComplexity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AttackComplexity forNumber(int value) { + switch (value) { + case 0: return ATTACK_COMPLEXITY_UNSPECIFIED; + case 1: return ATTACK_COMPLEXITY_LOW; + case 2: return ATTACK_COMPLEXITY_HIGH; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AttackComplexity> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AttackComplexity findValueByNumber(int number) { + return AttackComplexity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(1); + } + + private static final AttackComplexity[] VALUES = values(); + + public static AttackComplexity valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AttackComplexity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.AttackComplexity) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSSv3.PrivilegesRequired} + */ + public enum PrivilegesRequired + implements com.google.protobuf.ProtocolMessageEnum { + /** + * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + PRIVILEGES_REQUIRED_UNSPECIFIED(0), + /** + * PRIVILEGES_REQUIRED_NONE = 1; + */ + PRIVILEGES_REQUIRED_NONE(1), + /** + * PRIVILEGES_REQUIRED_LOW = 2; + */ + PRIVILEGES_REQUIRED_LOW(2), + /** + * PRIVILEGES_REQUIRED_HIGH = 3; + */ + PRIVILEGES_REQUIRED_HIGH(3), + UNRECOGNIZED(-1), + ; + + /** + * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + public static final int PRIVILEGES_REQUIRED_UNSPECIFIED_VALUE = 0; + /** + * PRIVILEGES_REQUIRED_NONE = 1; + */ + public static final int PRIVILEGES_REQUIRED_NONE_VALUE = 1; + /** + * PRIVILEGES_REQUIRED_LOW = 2; + */ + public static final int PRIVILEGES_REQUIRED_LOW_VALUE = 2; + /** + * PRIVILEGES_REQUIRED_HIGH = 3; + */ + public static final int PRIVILEGES_REQUIRED_HIGH_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PrivilegesRequired valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PrivilegesRequired forNumber(int value) { + switch (value) { + case 0: return PRIVILEGES_REQUIRED_UNSPECIFIED; + case 1: return PRIVILEGES_REQUIRED_NONE; + case 2: return PRIVILEGES_REQUIRED_LOW; + case 3: return PRIVILEGES_REQUIRED_HIGH; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PrivilegesRequired> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PrivilegesRequired findValueByNumber(int number) { + return PrivilegesRequired.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(2); + } + + private static final PrivilegesRequired[] VALUES = values(); + + public static PrivilegesRequired valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PrivilegesRequired(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.PrivilegesRequired) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSSv3.UserInteraction} + */ + public enum UserInteraction + implements com.google.protobuf.ProtocolMessageEnum { + /** + * USER_INTERACTION_UNSPECIFIED = 0; + */ + USER_INTERACTION_UNSPECIFIED(0), + /** + * USER_INTERACTION_NONE = 1; + */ + USER_INTERACTION_NONE(1), + /** + * USER_INTERACTION_REQUIRED = 2; + */ + USER_INTERACTION_REQUIRED(2), + UNRECOGNIZED(-1), + ; + + /** + * USER_INTERACTION_UNSPECIFIED = 0; + */ + public static final int USER_INTERACTION_UNSPECIFIED_VALUE = 0; + /** + * USER_INTERACTION_NONE = 1; + */ + public static final int USER_INTERACTION_NONE_VALUE = 1; + /** + * USER_INTERACTION_REQUIRED = 2; + */ + public static final int USER_INTERACTION_REQUIRED_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UserInteraction valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static UserInteraction forNumber(int value) { + switch (value) { + case 0: return USER_INTERACTION_UNSPECIFIED; + case 1: return USER_INTERACTION_NONE; + case 2: return USER_INTERACTION_REQUIRED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + UserInteraction> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public UserInteraction findValueByNumber(int number) { + return UserInteraction.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(3); + } + + private static final UserInteraction[] VALUES = values(); + + public static UserInteraction valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private UserInteraction(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.UserInteraction) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSSv3.Scope} + */ + public enum Scope + implements com.google.protobuf.ProtocolMessageEnum { + /** + * SCOPE_UNSPECIFIED = 0; + */ + SCOPE_UNSPECIFIED(0), + /** + * SCOPE_UNCHANGED = 1; + */ + SCOPE_UNCHANGED(1), + /** + * SCOPE_CHANGED = 2; + */ + SCOPE_CHANGED(2), + UNRECOGNIZED(-1), + ; + + /** + * SCOPE_UNSPECIFIED = 0; + */ + public static final int SCOPE_UNSPECIFIED_VALUE = 0; + /** + * SCOPE_UNCHANGED = 1; + */ + public static final int SCOPE_UNCHANGED_VALUE = 1; + /** + * SCOPE_CHANGED = 2; + */ + public static final int SCOPE_CHANGED_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Scope valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Scope forNumber(int value) { + switch (value) { + case 0: return SCOPE_UNSPECIFIED; + case 1: return SCOPE_UNCHANGED; + case 2: return SCOPE_CHANGED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Scope> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Scope findValueByNumber(int number) { + return Scope.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(4); + } + + private static final Scope[] VALUES = values(); + + public static Scope valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Scope(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.Scope) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSSv3.Impact} + */ + public enum Impact + implements com.google.protobuf.ProtocolMessageEnum { + /** + * IMPACT_UNSPECIFIED = 0; + */ + IMPACT_UNSPECIFIED(0), + /** + * IMPACT_HIGH = 1; + */ + IMPACT_HIGH(1), + /** + * IMPACT_LOW = 2; + */ + IMPACT_LOW(2), + /** + * IMPACT_NONE = 3; + */ + IMPACT_NONE(3), + UNRECOGNIZED(-1), + ; + + /** + * IMPACT_UNSPECIFIED = 0; + */ + public static final int IMPACT_UNSPECIFIED_VALUE = 0; + /** + * IMPACT_HIGH = 1; + */ + public static final int IMPACT_HIGH_VALUE = 1; + /** + * IMPACT_LOW = 2; + */ + public static final int IMPACT_LOW_VALUE = 2; + /** + * IMPACT_NONE = 3; + */ + public static final int IMPACT_NONE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Impact valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Impact forNumber(int value) { + switch (value) { + case 0: return IMPACT_UNSPECIFIED; + case 1: return IMPACT_HIGH; + case 2: return IMPACT_LOW; + case 3: return IMPACT_NONE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Impact> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Impact findValueByNumber(int number) { + return Impact.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(5); + } + + private static final Impact[] VALUES = values(); + + public static Impact valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Impact(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.Impact) + } + + public static final int BASE_SCORE_FIELD_NUMBER = 1; + private float baseScore_ = 0F; + /** + *
+   * The base score is a function of the base metric scores.
+   * 
+ * + * float base_score = 1; + * @return The baseScore. + */ + @java.lang.Override + public float getBaseScore() { + return baseScore_; + } + + public static final int EXPLOITABILITY_SCORE_FIELD_NUMBER = 2; + private float exploitabilityScore_ = 0F; + /** + * float exploitability_score = 2; + * @return The exploitabilityScore. + */ + @java.lang.Override + public float getExploitabilityScore() { + return exploitabilityScore_; + } + + public static final int IMPACT_SCORE_FIELD_NUMBER = 3; + private float impactScore_ = 0F; + /** + * float impact_score = 3; + * @return The impactScore. + */ + @java.lang.Override + public float getImpactScore() { + return impactScore_; + } + + public static final int ATTACK_VECTOR_FIELD_NUMBER = 5; + private int attackVector_ = 0; + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @return The enum numeric value on the wire for attackVector. + */ + @java.lang.Override public int getAttackVectorValue() { + return attackVector_; + } + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @return The attackVector. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.AttackVector getAttackVector() { + io.grafeas.v1.CVSSv3.AttackVector result = io.grafeas.v1.CVSSv3.AttackVector.forNumber(attackVector_); + return result == null ? io.grafeas.v1.CVSSv3.AttackVector.UNRECOGNIZED : result; + } + + public static final int ATTACK_COMPLEXITY_FIELD_NUMBER = 6; + private int attackComplexity_ = 0; + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return The enum numeric value on the wire for attackComplexity. + */ + @java.lang.Override public int getAttackComplexityValue() { + return attackComplexity_; + } + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return The attackComplexity. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.AttackComplexity getAttackComplexity() { + io.grafeas.v1.CVSSv3.AttackComplexity result = io.grafeas.v1.CVSSv3.AttackComplexity.forNumber(attackComplexity_); + return result == null ? io.grafeas.v1.CVSSv3.AttackComplexity.UNRECOGNIZED : result; + } + + public static final int PRIVILEGES_REQUIRED_FIELD_NUMBER = 7; + private int privilegesRequired_ = 0; + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return The enum numeric value on the wire for privilegesRequired. + */ + @java.lang.Override public int getPrivilegesRequiredValue() { + return privilegesRequired_; + } + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return The privilegesRequired. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.PrivilegesRequired getPrivilegesRequired() { + io.grafeas.v1.CVSSv3.PrivilegesRequired result = io.grafeas.v1.CVSSv3.PrivilegesRequired.forNumber(privilegesRequired_); + return result == null ? io.grafeas.v1.CVSSv3.PrivilegesRequired.UNRECOGNIZED : result; + } + + public static final int USER_INTERACTION_FIELD_NUMBER = 8; + private int userInteraction_ = 0; + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return The enum numeric value on the wire for userInteraction. + */ + @java.lang.Override public int getUserInteractionValue() { + return userInteraction_; + } + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return The userInteraction. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.UserInteraction getUserInteraction() { + io.grafeas.v1.CVSSv3.UserInteraction result = io.grafeas.v1.CVSSv3.UserInteraction.forNumber(userInteraction_); + return result == null ? io.grafeas.v1.CVSSv3.UserInteraction.UNRECOGNIZED : result; + } + + public static final int SCOPE_FIELD_NUMBER = 9; + private int scope_ = 0; + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override public int getScopeValue() { + return scope_; + } + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @return The scope. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.Scope getScope() { + io.grafeas.v1.CVSSv3.Scope result = io.grafeas.v1.CVSSv3.Scope.forNumber(scope_); + return result == null ? io.grafeas.v1.CVSSv3.Scope.UNRECOGNIZED : result; + } + + public static final int CONFIDENTIALITY_IMPACT_FIELD_NUMBER = 10; + private int confidentialityImpact_ = 0; + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return The enum numeric value on the wire for confidentialityImpact. + */ + @java.lang.Override public int getConfidentialityImpactValue() { + return confidentialityImpact_; + } + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return The confidentialityImpact. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.Impact getConfidentialityImpact() { + io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(confidentialityImpact_); + return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; + } + + public static final int INTEGRITY_IMPACT_FIELD_NUMBER = 11; + private int integrityImpact_ = 0; + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @return The enum numeric value on the wire for integrityImpact. + */ + @java.lang.Override public int getIntegrityImpactValue() { + return integrityImpact_; + } + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @return The integrityImpact. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.Impact getIntegrityImpact() { + io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(integrityImpact_); + return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; + } + + public static final int AVAILABILITY_IMPACT_FIELD_NUMBER = 12; + private int availabilityImpact_ = 0; + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @return The enum numeric value on the wire for availabilityImpact. + */ + @java.lang.Override public int getAvailabilityImpactValue() { + return availabilityImpact_; + } + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @return The availabilityImpact. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.Impact getAvailabilityImpact() { + io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(availabilityImpact_); + return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { + output.writeFloat(1, baseScore_); + } + if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { + output.writeFloat(2, exploitabilityScore_); + } + if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { + output.writeFloat(3, impactScore_); + } + if (attackVector_ != io.grafeas.v1.CVSSv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { + output.writeEnum(5, attackVector_); + } + if (attackComplexity_ != io.grafeas.v1.CVSSv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { + output.writeEnum(6, attackComplexity_); + } + if (privilegesRequired_ != io.grafeas.v1.CVSSv3.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { + output.writeEnum(7, privilegesRequired_); + } + if (userInteraction_ != io.grafeas.v1.CVSSv3.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { + output.writeEnum(8, userInteraction_); + } + if (scope_ != io.grafeas.v1.CVSSv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { + output.writeEnum(9, scope_); + } + if (confidentialityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(10, confidentialityImpact_); + } + if (integrityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(11, integrityImpact_); + } + if (availabilityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(12, availabilityImpact_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, baseScore_); + } + if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, exploitabilityScore_); + } + if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, impactScore_); + } + if (attackVector_ != io.grafeas.v1.CVSSv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, attackVector_); + } + if (attackComplexity_ != io.grafeas.v1.CVSSv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(6, attackComplexity_); + } + if (privilegesRequired_ != io.grafeas.v1.CVSSv3.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, privilegesRequired_); + } + if (userInteraction_ != io.grafeas.v1.CVSSv3.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, userInteraction_); + } + if (scope_ != io.grafeas.v1.CVSSv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, scope_); + } + if (confidentialityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, confidentialityImpact_); + } + if (integrityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, integrityImpact_); + } + if (availabilityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(12, availabilityImpact_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.CVSSv3)) { + return super.equals(obj); + } + io.grafeas.v1.CVSSv3 other = (io.grafeas.v1.CVSSv3) obj; + + if (java.lang.Float.floatToIntBits(getBaseScore()) + != java.lang.Float.floatToIntBits( + other.getBaseScore())) return false; + if (java.lang.Float.floatToIntBits(getExploitabilityScore()) + != java.lang.Float.floatToIntBits( + other.getExploitabilityScore())) return false; + if (java.lang.Float.floatToIntBits(getImpactScore()) + != java.lang.Float.floatToIntBits( + other.getImpactScore())) return false; + if (attackVector_ != other.attackVector_) return false; + if (attackComplexity_ != other.attackComplexity_) return false; + if (privilegesRequired_ != other.privilegesRequired_) return false; + if (userInteraction_ != other.userInteraction_) return false; + if (scope_ != other.scope_) return false; + if (confidentialityImpact_ != other.confidentialityImpact_) return false; + if (integrityImpact_ != other.integrityImpact_) return false; + if (availabilityImpact_ != other.availabilityImpact_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BASE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getBaseScore()); + hash = (37 * hash) + EXPLOITABILITY_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getExploitabilityScore()); + hash = (37 * hash) + IMPACT_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getImpactScore()); + hash = (37 * hash) + ATTACK_VECTOR_FIELD_NUMBER; + hash = (53 * hash) + attackVector_; + hash = (37 * hash) + ATTACK_COMPLEXITY_FIELD_NUMBER; + hash = (53 * hash) + attackComplexity_; + hash = (37 * hash) + PRIVILEGES_REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + privilegesRequired_; + hash = (37 * hash) + USER_INTERACTION_FIELD_NUMBER; + hash = (53 * hash) + userInteraction_; + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + scope_; + hash = (37 * hash) + CONFIDENTIALITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + confidentialityImpact_; + hash = (37 * hash) + INTEGRITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + integrityImpact_; + hash = (37 * hash) + AVAILABILITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + availabilityImpact_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.CVSSv3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CVSSv3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CVSSv3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CVSSv3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CVSSv3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CVSSv3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CVSSv3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CVSSv3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CVSSv3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.CVSSv3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CVSSv3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CVSSv3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.CVSSv3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Common Vulnerability Scoring System version 3.
+   * For details, see https://www.first.org/cvss/specification-document
+   * 
+ * + * Protobuf type {@code grafeas.v1.CVSSv3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.CVSSv3) + io.grafeas.v1.CVSSv3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CVSSv3.class, io.grafeas.v1.CVSSv3.Builder.class); + } + + // Construct using io.grafeas.v1.CVSSv3.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + baseScore_ = 0F; + exploitabilityScore_ = 0F; + impactScore_ = 0F; + attackVector_ = 0; + attackComplexity_ = 0; + privilegesRequired_ = 0; + userInteraction_ = 0; + scope_ = 0; + confidentialityImpact_ = 0; + integrityImpact_ = 0; + availabilityImpact_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.CVSSv3 getDefaultInstanceForType() { + return io.grafeas.v1.CVSSv3.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.CVSSv3 build() { + io.grafeas.v1.CVSSv3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.CVSSv3 buildPartial() { + io.grafeas.v1.CVSSv3 result = new io.grafeas.v1.CVSSv3(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.CVSSv3 result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.baseScore_ = baseScore_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.exploitabilityScore_ = exploitabilityScore_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.impactScore_ = impactScore_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.attackVector_ = attackVector_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.attackComplexity_ = attackComplexity_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.privilegesRequired_ = privilegesRequired_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.userInteraction_ = userInteraction_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.scope_ = scope_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.confidentialityImpact_ = confidentialityImpact_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.integrityImpact_ = integrityImpact_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.availabilityImpact_ = availabilityImpact_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.CVSSv3) { + return mergeFrom((io.grafeas.v1.CVSSv3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.CVSSv3 other) { + if (other == io.grafeas.v1.CVSSv3.getDefaultInstance()) return this; + if (other.getBaseScore() != 0F) { + setBaseScore(other.getBaseScore()); + } + if (other.getExploitabilityScore() != 0F) { + setExploitabilityScore(other.getExploitabilityScore()); + } + if (other.getImpactScore() != 0F) { + setImpactScore(other.getImpactScore()); + } + if (other.attackVector_ != 0) { + setAttackVectorValue(other.getAttackVectorValue()); + } + if (other.attackComplexity_ != 0) { + setAttackComplexityValue(other.getAttackComplexityValue()); + } + if (other.privilegesRequired_ != 0) { + setPrivilegesRequiredValue(other.getPrivilegesRequiredValue()); + } + if (other.userInteraction_ != 0) { + setUserInteractionValue(other.getUserInteractionValue()); + } + if (other.scope_ != 0) { + setScopeValue(other.getScopeValue()); + } + if (other.confidentialityImpact_ != 0) { + setConfidentialityImpactValue(other.getConfidentialityImpactValue()); + } + if (other.integrityImpact_ != 0) { + setIntegrityImpactValue(other.getIntegrityImpactValue()); + } + if (other.availabilityImpact_ != 0) { + setAvailabilityImpactValue(other.getAvailabilityImpactValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + baseScore_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: { + exploitabilityScore_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: { + impactScore_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 40: { + attackVector_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 40 + case 48: { + attackComplexity_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 48 + case 56: { + privilegesRequired_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 56 + case 64: { + userInteraction_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 64 + case 72: { + scope_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 72 + case 80: { + confidentialityImpact_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 80 + case 88: { + integrityImpact_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 88 + case 96: { + availabilityImpact_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 96 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private float baseScore_ ; + /** + *
+     * The base score is a function of the base metric scores.
+     * 
+ * + * float base_score = 1; + * @return The baseScore. + */ + @java.lang.Override + public float getBaseScore() { + return baseScore_; + } + /** + *
+     * The base score is a function of the base metric scores.
+     * 
+ * + * float base_score = 1; + * @param value The baseScore to set. + * @return This builder for chaining. + */ + public Builder setBaseScore(float value) { + + baseScore_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The base score is a function of the base metric scores.
+     * 
+ * + * float base_score = 1; + * @return This builder for chaining. + */ + public Builder clearBaseScore() { + bitField0_ = (bitField0_ & ~0x00000001); + baseScore_ = 0F; + onChanged(); + return this; + } + + private float exploitabilityScore_ ; + /** + * float exploitability_score = 2; + * @return The exploitabilityScore. + */ + @java.lang.Override + public float getExploitabilityScore() { + return exploitabilityScore_; + } + /** + * float exploitability_score = 2; + * @param value The exploitabilityScore to set. + * @return This builder for chaining. + */ + public Builder setExploitabilityScore(float value) { + + exploitabilityScore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * float exploitability_score = 2; + * @return This builder for chaining. + */ + public Builder clearExploitabilityScore() { + bitField0_ = (bitField0_ & ~0x00000002); + exploitabilityScore_ = 0F; + onChanged(); + return this; + } + + private float impactScore_ ; + /** + * float impact_score = 3; + * @return The impactScore. + */ + @java.lang.Override + public float getImpactScore() { + return impactScore_; + } + /** + * float impact_score = 3; + * @param value The impactScore to set. + * @return This builder for chaining. + */ + public Builder setImpactScore(float value) { + + impactScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * float impact_score = 3; + * @return This builder for chaining. + */ + public Builder clearImpactScore() { + bitField0_ = (bitField0_ & ~0x00000004); + impactScore_ = 0F; + onChanged(); + return this; + } + + private int attackVector_ = 0; + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @return The enum numeric value on the wire for attackVector. + */ + @java.lang.Override public int getAttackVectorValue() { + return attackVector_; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @param value The enum numeric value on the wire for attackVector to set. + * @return This builder for chaining. + */ + public Builder setAttackVectorValue(int value) { + attackVector_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @return The attackVector. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.AttackVector getAttackVector() { + io.grafeas.v1.CVSSv3.AttackVector result = io.grafeas.v1.CVSSv3.AttackVector.forNumber(attackVector_); + return result == null ? io.grafeas.v1.CVSSv3.AttackVector.UNRECOGNIZED : result; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @param value The attackVector to set. + * @return This builder for chaining. + */ + public Builder setAttackVector(io.grafeas.v1.CVSSv3.AttackVector value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + attackVector_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @return This builder for chaining. + */ + public Builder clearAttackVector() { + bitField0_ = (bitField0_ & ~0x00000008); + attackVector_ = 0; + onChanged(); + return this; + } + + private int attackComplexity_ = 0; + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return The enum numeric value on the wire for attackComplexity. + */ + @java.lang.Override public int getAttackComplexityValue() { + return attackComplexity_; + } + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @param value The enum numeric value on the wire for attackComplexity to set. + * @return This builder for chaining. + */ + public Builder setAttackComplexityValue(int value) { + attackComplexity_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return The attackComplexity. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.AttackComplexity getAttackComplexity() { + io.grafeas.v1.CVSSv3.AttackComplexity result = io.grafeas.v1.CVSSv3.AttackComplexity.forNumber(attackComplexity_); + return result == null ? io.grafeas.v1.CVSSv3.AttackComplexity.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @param value The attackComplexity to set. + * @return This builder for chaining. + */ + public Builder setAttackComplexity(io.grafeas.v1.CVSSv3.AttackComplexity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + attackComplexity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return This builder for chaining. + */ + public Builder clearAttackComplexity() { + bitField0_ = (bitField0_ & ~0x00000010); + attackComplexity_ = 0; + onChanged(); + return this; + } + + private int privilegesRequired_ = 0; + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return The enum numeric value on the wire for privilegesRequired. + */ + @java.lang.Override public int getPrivilegesRequiredValue() { + return privilegesRequired_; + } + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @param value The enum numeric value on the wire for privilegesRequired to set. + * @return This builder for chaining. + */ + public Builder setPrivilegesRequiredValue(int value) { + privilegesRequired_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return The privilegesRequired. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.PrivilegesRequired getPrivilegesRequired() { + io.grafeas.v1.CVSSv3.PrivilegesRequired result = io.grafeas.v1.CVSSv3.PrivilegesRequired.forNumber(privilegesRequired_); + return result == null ? io.grafeas.v1.CVSSv3.PrivilegesRequired.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @param value The privilegesRequired to set. + * @return This builder for chaining. + */ + public Builder setPrivilegesRequired(io.grafeas.v1.CVSSv3.PrivilegesRequired value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + privilegesRequired_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return This builder for chaining. + */ + public Builder clearPrivilegesRequired() { + bitField0_ = (bitField0_ & ~0x00000020); + privilegesRequired_ = 0; + onChanged(); + return this; + } + + private int userInteraction_ = 0; + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return The enum numeric value on the wire for userInteraction. + */ + @java.lang.Override public int getUserInteractionValue() { + return userInteraction_; + } + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @param value The enum numeric value on the wire for userInteraction to set. + * @return This builder for chaining. + */ + public Builder setUserInteractionValue(int value) { + userInteraction_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return The userInteraction. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.UserInteraction getUserInteraction() { + io.grafeas.v1.CVSSv3.UserInteraction result = io.grafeas.v1.CVSSv3.UserInteraction.forNumber(userInteraction_); + return result == null ? io.grafeas.v1.CVSSv3.UserInteraction.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @param value The userInteraction to set. + * @return This builder for chaining. + */ + public Builder setUserInteraction(io.grafeas.v1.CVSSv3.UserInteraction value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + userInteraction_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return This builder for chaining. + */ + public Builder clearUserInteraction() { + bitField0_ = (bitField0_ & ~0x00000040); + userInteraction_ = 0; + onChanged(); + return this; + } + + private int scope_ = 0; + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override public int getScopeValue() { + return scope_; + } + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @param value The enum numeric value on the wire for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeValue(int value) { + scope_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @return The scope. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.Scope getScope() { + io.grafeas.v1.CVSSv3.Scope result = io.grafeas.v1.CVSSv3.Scope.forNumber(scope_); + return result == null ? io.grafeas.v1.CVSSv3.Scope.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(io.grafeas.v1.CVSSv3.Scope value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + scope_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @return This builder for chaining. + */ + public Builder clearScope() { + bitField0_ = (bitField0_ & ~0x00000080); + scope_ = 0; + onChanged(); + return this; + } + + private int confidentialityImpact_ = 0; + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return The enum numeric value on the wire for confidentialityImpact. + */ + @java.lang.Override public int getConfidentialityImpactValue() { + return confidentialityImpact_; + } + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @param value The enum numeric value on the wire for confidentialityImpact to set. + * @return This builder for chaining. + */ + public Builder setConfidentialityImpactValue(int value) { + confidentialityImpact_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return The confidentialityImpact. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.Impact getConfidentialityImpact() { + io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(confidentialityImpact_); + return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @param value The confidentialityImpact to set. + * @return This builder for chaining. + */ + public Builder setConfidentialityImpact(io.grafeas.v1.CVSSv3.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + confidentialityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return This builder for chaining. + */ + public Builder clearConfidentialityImpact() { + bitField0_ = (bitField0_ & ~0x00000100); + confidentialityImpact_ = 0; + onChanged(); + return this; + } + + private int integrityImpact_ = 0; + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @return The enum numeric value on the wire for integrityImpact. + */ + @java.lang.Override public int getIntegrityImpactValue() { + return integrityImpact_; + } + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @param value The enum numeric value on the wire for integrityImpact to set. + * @return This builder for chaining. + */ + public Builder setIntegrityImpactValue(int value) { + integrityImpact_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @return The integrityImpact. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.Impact getIntegrityImpact() { + io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(integrityImpact_); + return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @param value The integrityImpact to set. + * @return This builder for chaining. + */ + public Builder setIntegrityImpact(io.grafeas.v1.CVSSv3.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + integrityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @return This builder for chaining. + */ + public Builder clearIntegrityImpact() { + bitField0_ = (bitField0_ & ~0x00000200); + integrityImpact_ = 0; + onChanged(); + return this; + } + + private int availabilityImpact_ = 0; + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @return The enum numeric value on the wire for availabilityImpact. + */ + @java.lang.Override public int getAvailabilityImpactValue() { + return availabilityImpact_; + } + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @param value The enum numeric value on the wire for availabilityImpact to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityImpactValue(int value) { + availabilityImpact_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @return The availabilityImpact. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.Impact getAvailabilityImpact() { + io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(availabilityImpact_); + return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @param value The availabilityImpact to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityImpact(io.grafeas.v1.CVSSv3.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + availabilityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @return This builder for chaining. + */ + public Builder clearAvailabilityImpact() { + bitField0_ = (bitField0_ & ~0x00000400); + availabilityImpact_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.CVSSv3) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.CVSSv3) + private static final io.grafeas.v1.CVSSv3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.CVSSv3(); + } + + public static io.grafeas.v1.CVSSv3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CVSSv3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.CVSSv3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java new file mode 100644 index 000000000000..f171b18e246c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/cvss.proto + +package io.grafeas.v1; + +public interface CVSSv3OrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.CVSSv3) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The base score is a function of the base metric scores.
+   * 
+ * + * float base_score = 1; + * @return The baseScore. + */ + float getBaseScore(); + + /** + * float exploitability_score = 2; + * @return The exploitabilityScore. + */ + float getExploitabilityScore(); + + /** + * float impact_score = 3; + * @return The impactScore. + */ + float getImpactScore(); + + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @return The enum numeric value on the wire for attackVector. + */ + int getAttackVectorValue(); + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @return The attackVector. + */ + io.grafeas.v1.CVSSv3.AttackVector getAttackVector(); + + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return The enum numeric value on the wire for attackComplexity. + */ + int getAttackComplexityValue(); + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return The attackComplexity. + */ + io.grafeas.v1.CVSSv3.AttackComplexity getAttackComplexity(); + + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return The enum numeric value on the wire for privilegesRequired. + */ + int getPrivilegesRequiredValue(); + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return The privilegesRequired. + */ + io.grafeas.v1.CVSSv3.PrivilegesRequired getPrivilegesRequired(); + + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return The enum numeric value on the wire for userInteraction. + */ + int getUserInteractionValue(); + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return The userInteraction. + */ + io.grafeas.v1.CVSSv3.UserInteraction getUserInteraction(); + + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @return The enum numeric value on the wire for scope. + */ + int getScopeValue(); + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @return The scope. + */ + io.grafeas.v1.CVSSv3.Scope getScope(); + + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return The enum numeric value on the wire for confidentialityImpact. + */ + int getConfidentialityImpactValue(); + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return The confidentialityImpact. + */ + io.grafeas.v1.CVSSv3.Impact getConfidentialityImpact(); + + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @return The enum numeric value on the wire for integrityImpact. + */ + int getIntegrityImpactValue(); + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @return The integrityImpact. + */ + io.grafeas.v1.CVSSv3.Impact getIntegrityImpact(); + + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @return The enum numeric value on the wire for availabilityImpact. + */ + int getAvailabilityImpactValue(); + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @return The availabilityImpact. + */ + io.grafeas.v1.CVSSv3.Impact getAvailabilityImpact(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java new file mode 100644 index 000000000000..8839140816d8 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java @@ -0,0 +1,1186 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * A CloudRepoSourceContext denotes a particular revision in a Google Cloud
+ * Source Repo.
+ * 
+ * + * Protobuf type {@code grafeas.v1.CloudRepoSourceContext} + */ +public final class CloudRepoSourceContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.CloudRepoSourceContext) + CloudRepoSourceContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use CloudRepoSourceContext.newBuilder() to construct. + private CloudRepoSourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CloudRepoSourceContext() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CloudRepoSourceContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CloudRepoSourceContext.class, io.grafeas.v1.CloudRepoSourceContext.Builder.class); + } + + private int revisionCase_ = 0; + private java.lang.Object revision_; + public enum RevisionCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REVISION_ID(2), + ALIAS_CONTEXT(3), + REVISION_NOT_SET(0); + private final int value; + private RevisionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RevisionCase valueOf(int value) { + return forNumber(value); + } + + public static RevisionCase forNumber(int value) { + switch (value) { + case 2: return REVISION_ID; + case 3: return ALIAS_CONTEXT; + case 0: return REVISION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public RevisionCase + getRevisionCase() { + return RevisionCase.forNumber( + revisionCase_); + } + + public static final int REPO_ID_FIELD_NUMBER = 1; + private io.grafeas.v1.RepoId repoId_; + /** + *
+   * The ID of the repo.
+   * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + * @return Whether the repoId field is set. + */ + @java.lang.Override + public boolean hasRepoId() { + return repoId_ != null; + } + /** + *
+   * The ID of the repo.
+   * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + * @return The repoId. + */ + @java.lang.Override + public io.grafeas.v1.RepoId getRepoId() { + return repoId_ == null ? io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; + } + /** + *
+   * The ID of the repo.
+   * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + @java.lang.Override + public io.grafeas.v1.RepoIdOrBuilder getRepoIdOrBuilder() { + return repoId_ == null ? io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; + } + + public static final int REVISION_ID_FIELD_NUMBER = 2; + /** + *
+   * A revision ID.
+   * 
+ * + * string revision_id = 2; + * @return Whether the revisionId field is set. + */ + public boolean hasRevisionId() { + return revisionCase_ == 2; + } + /** + *
+   * A revision ID.
+   * 
+ * + * string revision_id = 2; + * @return The revisionId. + */ + public java.lang.String getRevisionId() { + java.lang.Object ref = ""; + if (revisionCase_ == 2) { + ref = revision_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (revisionCase_ == 2) { + revision_ = s; + } + return s; + } + } + /** + *
+   * A revision ID.
+   * 
+ * + * string revision_id = 2; + * @return The bytes for revisionId. + */ + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = ""; + if (revisionCase_ == 2) { + ref = revision_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (revisionCase_ == 2) { + revision_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALIAS_CONTEXT_FIELD_NUMBER = 3; + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + * @return Whether the aliasContext field is set. + */ + @java.lang.Override + public boolean hasAliasContext() { + return revisionCase_ == 3; + } + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + * @return The aliasContext. + */ + @java.lang.Override + public io.grafeas.v1.AliasContext getAliasContext() { + if (revisionCase_ == 3) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + @java.lang.Override + public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { + if (revisionCase_ == 3) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (repoId_ != null) { + output.writeMessage(1, getRepoId()); + } + if (revisionCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, revision_); + } + if (revisionCase_ == 3) { + output.writeMessage(3, (io.grafeas.v1.AliasContext) revision_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (repoId_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRepoId()); + } + if (revisionCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, revision_); + } + if (revisionCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (io.grafeas.v1.AliasContext) revision_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.CloudRepoSourceContext)) { + return super.equals(obj); + } + io.grafeas.v1.CloudRepoSourceContext other = (io.grafeas.v1.CloudRepoSourceContext) obj; + + if (hasRepoId() != other.hasRepoId()) return false; + if (hasRepoId()) { + if (!getRepoId() + .equals(other.getRepoId())) return false; + } + if (!getRevisionCase().equals(other.getRevisionCase())) return false; + switch (revisionCase_) { + case 2: + if (!getRevisionId() + .equals(other.getRevisionId())) return false; + break; + case 3: + if (!getAliasContext() + .equals(other.getAliasContext())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRepoId()) { + hash = (37 * hash) + REPO_ID_FIELD_NUMBER; + hash = (53 * hash) + getRepoId().hashCode(); + } + switch (revisionCase_) { + case 2: + hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRevisionId().hashCode(); + break; + case 3: + hash = (37 * hash) + ALIAS_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getAliasContext().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CloudRepoSourceContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.CloudRepoSourceContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.CloudRepoSourceContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A CloudRepoSourceContext denotes a particular revision in a Google Cloud
+   * Source Repo.
+   * 
+ * + * Protobuf type {@code grafeas.v1.CloudRepoSourceContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.CloudRepoSourceContext) + io.grafeas.v1.CloudRepoSourceContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CloudRepoSourceContext.class, io.grafeas.v1.CloudRepoSourceContext.Builder.class); + } + + // Construct using io.grafeas.v1.CloudRepoSourceContext.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + repoId_ = null; + if (repoIdBuilder_ != null) { + repoIdBuilder_.dispose(); + repoIdBuilder_ = null; + } + if (aliasContextBuilder_ != null) { + aliasContextBuilder_.clear(); + } + revisionCase_ = 0; + revision_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContext getDefaultInstanceForType() { + return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContext build() { + io.grafeas.v1.CloudRepoSourceContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContext buildPartial() { + io.grafeas.v1.CloudRepoSourceContext result = new io.grafeas.v1.CloudRepoSourceContext(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.CloudRepoSourceContext result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.repoId_ = repoIdBuilder_ == null + ? repoId_ + : repoIdBuilder_.build(); + } + } + + private void buildPartialOneofs(io.grafeas.v1.CloudRepoSourceContext result) { + result.revisionCase_ = revisionCase_; + result.revision_ = this.revision_; + if (revisionCase_ == 3 && + aliasContextBuilder_ != null) { + result.revision_ = aliasContextBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.CloudRepoSourceContext) { + return mergeFrom((io.grafeas.v1.CloudRepoSourceContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.CloudRepoSourceContext other) { + if (other == io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance()) return this; + if (other.hasRepoId()) { + mergeRepoId(other.getRepoId()); + } + switch (other.getRevisionCase()) { + case REVISION_ID: { + revisionCase_ = 2; + revision_ = other.revision_; + onChanged(); + break; + } + case ALIAS_CONTEXT: { + mergeAliasContext(other.getAliasContext()); + break; + } + case REVISION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getRepoIdFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + revisionCase_ = 2; + revision_ = s; + break; + } // case 18 + case 26: { + input.readMessage( + getAliasContextFieldBuilder().getBuilder(), + extensionRegistry); + revisionCase_ = 3; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int revisionCase_ = 0; + private java.lang.Object revision_; + public RevisionCase + getRevisionCase() { + return RevisionCase.forNumber( + revisionCase_); + } + + public Builder clearRevision() { + revisionCase_ = 0; + revision_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private io.grafeas.v1.RepoId repoId_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.RepoId, io.grafeas.v1.RepoId.Builder, io.grafeas.v1.RepoIdOrBuilder> repoIdBuilder_; + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + * @return Whether the repoId field is set. + */ + public boolean hasRepoId() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + * @return The repoId. + */ + public io.grafeas.v1.RepoId getRepoId() { + if (repoIdBuilder_ == null) { + return repoId_ == null ? io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; + } else { + return repoIdBuilder_.getMessage(); + } + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + public Builder setRepoId(io.grafeas.v1.RepoId value) { + if (repoIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + repoId_ = value; + } else { + repoIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + public Builder setRepoId( + io.grafeas.v1.RepoId.Builder builderForValue) { + if (repoIdBuilder_ == null) { + repoId_ = builderForValue.build(); + } else { + repoIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + public Builder mergeRepoId(io.grafeas.v1.RepoId value) { + if (repoIdBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + repoId_ != null && + repoId_ != io.grafeas.v1.RepoId.getDefaultInstance()) { + getRepoIdBuilder().mergeFrom(value); + } else { + repoId_ = value; + } + } else { + repoIdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + public Builder clearRepoId() { + bitField0_ = (bitField0_ & ~0x00000001); + repoId_ = null; + if (repoIdBuilder_ != null) { + repoIdBuilder_.dispose(); + repoIdBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + public io.grafeas.v1.RepoId.Builder getRepoIdBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRepoIdFieldBuilder().getBuilder(); + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + public io.grafeas.v1.RepoIdOrBuilder getRepoIdOrBuilder() { + if (repoIdBuilder_ != null) { + return repoIdBuilder_.getMessageOrBuilder(); + } else { + return repoId_ == null ? + io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; + } + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.RepoId, io.grafeas.v1.RepoId.Builder, io.grafeas.v1.RepoIdOrBuilder> + getRepoIdFieldBuilder() { + if (repoIdBuilder_ == null) { + repoIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.RepoId, io.grafeas.v1.RepoId.Builder, io.grafeas.v1.RepoIdOrBuilder>( + getRepoId(), + getParentForChildren(), + isClean()); + repoId_ = null; + } + return repoIdBuilder_; + } + + /** + *
+     * A revision ID.
+     * 
+ * + * string revision_id = 2; + * @return Whether the revisionId field is set. + */ + @java.lang.Override + public boolean hasRevisionId() { + return revisionCase_ == 2; + } + /** + *
+     * A revision ID.
+     * 
+ * + * string revision_id = 2; + * @return The revisionId. + */ + @java.lang.Override + public java.lang.String getRevisionId() { + java.lang.Object ref = ""; + if (revisionCase_ == 2) { + ref = revision_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (revisionCase_ == 2) { + revision_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A revision ID.
+     * 
+ * + * string revision_id = 2; + * @return The bytes for revisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = ""; + if (revisionCase_ == 2) { + ref = revision_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (revisionCase_ == 2) { + revision_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A revision ID.
+     * 
+ * + * string revision_id = 2; + * @param value The revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + revisionCase_ = 2; + revision_ = value; + onChanged(); + return this; + } + /** + *
+     * A revision ID.
+     * 
+ * + * string revision_id = 2; + * @return This builder for chaining. + */ + public Builder clearRevisionId() { + if (revisionCase_ == 2) { + revisionCase_ = 0; + revision_ = null; + onChanged(); + } + return this; + } + /** + *
+     * A revision ID.
+     * 
+ * + * string revision_id = 2; + * @param value The bytes for revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + revisionCase_ = 2; + revision_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> aliasContextBuilder_; + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + * @return Whether the aliasContext field is set. + */ + @java.lang.Override + public boolean hasAliasContext() { + return revisionCase_ == 3; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + * @return The aliasContext. + */ + @java.lang.Override + public io.grafeas.v1.AliasContext getAliasContext() { + if (aliasContextBuilder_ == null) { + if (revisionCase_ == 3) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } else { + if (revisionCase_ == 3) { + return aliasContextBuilder_.getMessage(); + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + public Builder setAliasContext(io.grafeas.v1.AliasContext value) { + if (aliasContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + revision_ = value; + onChanged(); + } else { + aliasContextBuilder_.setMessage(value); + } + revisionCase_ = 3; + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + public Builder setAliasContext( + io.grafeas.v1.AliasContext.Builder builderForValue) { + if (aliasContextBuilder_ == null) { + revision_ = builderForValue.build(); + onChanged(); + } else { + aliasContextBuilder_.setMessage(builderForValue.build()); + } + revisionCase_ = 3; + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + public Builder mergeAliasContext(io.grafeas.v1.AliasContext value) { + if (aliasContextBuilder_ == null) { + if (revisionCase_ == 3 && + revision_ != io.grafeas.v1.AliasContext.getDefaultInstance()) { + revision_ = io.grafeas.v1.AliasContext.newBuilder((io.grafeas.v1.AliasContext) revision_) + .mergeFrom(value).buildPartial(); + } else { + revision_ = value; + } + onChanged(); + } else { + if (revisionCase_ == 3) { + aliasContextBuilder_.mergeFrom(value); + } else { + aliasContextBuilder_.setMessage(value); + } + } + revisionCase_ = 3; + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + public Builder clearAliasContext() { + if (aliasContextBuilder_ == null) { + if (revisionCase_ == 3) { + revisionCase_ = 0; + revision_ = null; + onChanged(); + } + } else { + if (revisionCase_ == 3) { + revisionCase_ = 0; + revision_ = null; + } + aliasContextBuilder_.clear(); + } + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + public io.grafeas.v1.AliasContext.Builder getAliasContextBuilder() { + return getAliasContextFieldBuilder().getBuilder(); + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + @java.lang.Override + public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { + if ((revisionCase_ == 3) && (aliasContextBuilder_ != null)) { + return aliasContextBuilder_.getMessageOrBuilder(); + } else { + if (revisionCase_ == 3) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> + getAliasContextFieldBuilder() { + if (aliasContextBuilder_ == null) { + if (!(revisionCase_ == 3)) { + revision_ = io.grafeas.v1.AliasContext.getDefaultInstance(); + } + aliasContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder>( + (io.grafeas.v1.AliasContext) revision_, + getParentForChildren(), + isClean()); + revision_ = null; + } + revisionCase_ = 3; + onChanged(); + return aliasContextBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.CloudRepoSourceContext) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.CloudRepoSourceContext) + private static final io.grafeas.v1.CloudRepoSourceContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.CloudRepoSourceContext(); + } + + public static io.grafeas.v1.CloudRepoSourceContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudRepoSourceContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java new file mode 100644 index 000000000000..adebca3e3ee9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java @@ -0,0 +1,94 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface CloudRepoSourceContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.CloudRepoSourceContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the repo.
+   * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + * @return Whether the repoId field is set. + */ + boolean hasRepoId(); + /** + *
+   * The ID of the repo.
+   * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + * @return The repoId. + */ + io.grafeas.v1.RepoId getRepoId(); + /** + *
+   * The ID of the repo.
+   * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + io.grafeas.v1.RepoIdOrBuilder getRepoIdOrBuilder(); + + /** + *
+   * A revision ID.
+   * 
+ * + * string revision_id = 2; + * @return Whether the revisionId field is set. + */ + boolean hasRevisionId(); + /** + *
+   * A revision ID.
+   * 
+ * + * string revision_id = 2; + * @return The revisionId. + */ + java.lang.String getRevisionId(); + /** + *
+   * A revision ID.
+   * 
+ * + * string revision_id = 2; + * @return The bytes for revisionId. + */ + com.google.protobuf.ByteString + getRevisionIdBytes(); + + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + * @return Whether the aliasContext field is set. + */ + boolean hasAliasContext(); + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + * @return The aliasContext. + */ + io.grafeas.v1.AliasContext getAliasContext(); + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder(); + + public io.grafeas.v1.CloudRepoSourceContext.RevisionCase getRevisionCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java new file mode 100644 index 000000000000..b1027d8a00bd --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java @@ -0,0 +1,1632 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Command describes a step performed as part of the build pipeline.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Command} + */ +public final class Command extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Command) + CommandOrBuilder { +private static final long serialVersionUID = 0L; + // Use Command.newBuilder() to construct. + private Command(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Command() { + name_ = ""; + env_ = com.google.protobuf.LazyStringArrayList.EMPTY; + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + dir_ = ""; + id_ = ""; + waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Command(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Command.class, io.grafeas.v1.Command.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. Name of the command, as presented on the command line, or if the
+   * command is packaged as a Docker container, as presented to `docker pull`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Name of the command, as presented on the command line, or if the
+   * command is packaged as a Docker container, as presented to `docker pull`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENV_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList env_; + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @return A list containing the env. + */ + public com.google.protobuf.ProtocolStringList + getEnvList() { + return env_; + } + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @return The count of env. + */ + public int getEnvCount() { + return env_.size(); + } + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @param index The index of the element to return. + * @return The env at the given index. + */ + public java.lang.String getEnv(int index) { + return env_.get(index); + } + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @param index The index of the value to return. + * @return The bytes of the env at the given index. + */ + public com.google.protobuf.ByteString + getEnvBytes(int index) { + return env_.getByteString(index); + } + + public static final int ARGS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList args_; + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList + getArgsList() { + return args_; + } + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString + getArgsBytes(int index) { + return args_.getByteString(index); + } + + public static final int DIR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object dir_ = ""; + /** + *
+   * Working directory (relative to project source root) used when running this
+   * command.
+   * 
+ * + * string dir = 4; + * @return The dir. + */ + @java.lang.Override + public java.lang.String getDir() { + java.lang.Object ref = dir_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dir_ = s; + return s; + } + } + /** + *
+   * Working directory (relative to project source root) used when running this
+   * command.
+   * 
+ * + * string dir = 4; + * @return The bytes for dir. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDirBytes() { + java.lang.Object ref = dir_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * Optional unique identifier for this command, used in wait_for to reference
+   * this command as a dependency.
+   * 
+ * + * string id = 5; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * Optional unique identifier for this command, used in wait_for to reference
+   * this command as a dependency.
+   * 
+ * + * string id = 5; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WAIT_FOR_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList waitFor_; + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @return A list containing the waitFor. + */ + public com.google.protobuf.ProtocolStringList + getWaitForList() { + return waitFor_; + } + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @return The count of waitFor. + */ + public int getWaitForCount() { + return waitFor_.size(); + } + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @param index The index of the element to return. + * @return The waitFor at the given index. + */ + public java.lang.String getWaitFor(int index) { + return waitFor_.get(index); + } + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @param index The index of the value to return. + * @return The bytes of the waitFor at the given index. + */ + public com.google.protobuf.ByteString + getWaitForBytes(int index) { + return waitFor_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < env_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, env_.getRaw(i)); + } + for (int i = 0; i < args_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, args_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dir_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dir_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, id_); + } + for (int i = 0; i < waitFor_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, waitFor_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < env_.size(); i++) { + dataSize += computeStringSizeNoTag(env_.getRaw(i)); + } + size += dataSize; + size += 1 * getEnvList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < args_.size(); i++) { + dataSize += computeStringSizeNoTag(args_.getRaw(i)); + } + size += dataSize; + size += 1 * getArgsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dir_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dir_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, id_); + } + { + int dataSize = 0; + for (int i = 0; i < waitFor_.size(); i++) { + dataSize += computeStringSizeNoTag(waitFor_.getRaw(i)); + } + size += dataSize; + size += 1 * getWaitForList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Command)) { + return super.equals(obj); + } + io.grafeas.v1.Command other = (io.grafeas.v1.Command) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getEnvList() + .equals(other.getEnvList())) return false; + if (!getArgsList() + .equals(other.getArgsList())) return false; + if (!getDir() + .equals(other.getDir())) return false; + if (!getId() + .equals(other.getId())) return false; + if (!getWaitForList() + .equals(other.getWaitForList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getEnvCount() > 0) { + hash = (37 * hash) + ENV_FIELD_NUMBER; + hash = (53 * hash) + getEnvList().hashCode(); + } + if (getArgsCount() > 0) { + hash = (37 * hash) + ARGS_FIELD_NUMBER; + hash = (53 * hash) + getArgsList().hashCode(); + } + hash = (37 * hash) + DIR_FIELD_NUMBER; + hash = (53 * hash) + getDir().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getWaitForCount() > 0) { + hash = (37 * hash) + WAIT_FOR_FIELD_NUMBER; + hash = (53 * hash) + getWaitForList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Command parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Command parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Command parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Command parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Command parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Command parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Command parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Command parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Command parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Command parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Command parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Command parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Command prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Command describes a step performed as part of the build pipeline.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Command} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Command) + io.grafeas.v1.CommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Command.class, io.grafeas.v1.Command.Builder.class); + } + + // Construct using io.grafeas.v1.Command.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + env_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + dir_ = ""; + id_ = ""; + waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Command getDefaultInstanceForType() { + return io.grafeas.v1.Command.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Command build() { + io.grafeas.v1.Command result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Command buildPartial() { + io.grafeas.v1.Command result = new io.grafeas.v1.Command(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.Command result) { + if (((bitField0_ & 0x00000002) != 0)) { + env_ = env_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.env_ = env_; + if (((bitField0_ & 0x00000004) != 0)) { + args_ = args_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.args_ = args_; + if (((bitField0_ & 0x00000020) != 0)) { + waitFor_ = waitFor_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.waitFor_ = waitFor_; + } + + private void buildPartial0(io.grafeas.v1.Command result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.dir_ = dir_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Command) { + return mergeFrom((io.grafeas.v1.Command)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Command other) { + if (other == io.grafeas.v1.Command.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.env_.isEmpty()) { + if (env_.isEmpty()) { + env_ = other.env_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEnvIsMutable(); + env_.addAll(other.env_); + } + onChanged(); + } + if (!other.args_.isEmpty()) { + if (args_.isEmpty()) { + args_ = other.args_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureArgsIsMutable(); + args_.addAll(other.args_); + } + onChanged(); + } + if (!other.getDir().isEmpty()) { + dir_ = other.dir_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.waitFor_.isEmpty()) { + if (waitFor_.isEmpty()) { + waitFor_ = other.waitFor_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureWaitForIsMutable(); + waitFor_.addAll(other.waitFor_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureEnvIsMutable(); + env_.add(s); + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureArgsIsMutable(); + args_.add(s); + break; + } // case 26 + case 34: { + dir_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + ensureWaitForIsMutable(); + waitFor_.add(s); + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Name of the command, as presented on the command line, or if the
+     * command is packaged as a Docker container, as presented to `docker pull`.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Name of the command, as presented on the command line, or if the
+     * command is packaged as a Docker container, as presented to `docker pull`.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Name of the command, as presented on the command line, or if the
+     * command is packaged as a Docker container, as presented to `docker pull`.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. Name of the command, as presented on the command line, or if the
+     * command is packaged as a Docker container, as presented to `docker pull`.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. Name of the command, as presented on the command line, or if the
+     * command is packaged as a Docker container, as presented to `docker pull`.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList env_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureEnvIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + env_ = new com.google.protobuf.LazyStringArrayList(env_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @return A list containing the env. + */ + public com.google.protobuf.ProtocolStringList + getEnvList() { + return env_.getUnmodifiableView(); + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @return The count of env. + */ + public int getEnvCount() { + return env_.size(); + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @param index The index of the element to return. + * @return The env at the given index. + */ + public java.lang.String getEnv(int index) { + return env_.get(index); + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @param index The index of the value to return. + * @return The bytes of the env at the given index. + */ + public com.google.protobuf.ByteString + getEnvBytes(int index) { + return env_.getByteString(index); + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @param index The index to set the value at. + * @param value The env to set. + * @return This builder for chaining. + */ + public Builder setEnv( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureEnvIsMutable(); + env_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @param value The env to add. + * @return This builder for chaining. + */ + public Builder addEnv( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureEnvIsMutable(); + env_.add(value); + onChanged(); + return this; + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @param values The env to add. + * @return This builder for chaining. + */ + public Builder addAllEnv( + java.lang.Iterable values) { + ensureEnvIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, env_); + onChanged(); + return this; + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @return This builder for chaining. + */ + public Builder clearEnv() { + env_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @param value The bytes of the env to add. + * @return This builder for chaining. + */ + public Builder addEnvBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureEnvIsMutable(); + env_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureArgsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(args_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList + getArgsList() { + return args_.getUnmodifiableView(); + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString + getArgsBytes(int index) { + return args_.getByteString(index); + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @param index The index to set the value at. + * @param value The args to set. + * @return This builder for chaining. + */ + public Builder setArgs( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureArgsIsMutable(); + args_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @param value The args to add. + * @return This builder for chaining. + */ + public Builder addArgs( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @param values The args to add. + * @return This builder for chaining. + */ + public Builder addAllArgs( + java.lang.Iterable values) { + ensureArgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, args_); + onChanged(); + return this; + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @return This builder for chaining. + */ + public Builder clearArgs() { + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @param value The bytes of the args to add. + * @return This builder for chaining. + */ + public Builder addArgsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + + private java.lang.Object dir_ = ""; + /** + *
+     * Working directory (relative to project source root) used when running this
+     * command.
+     * 
+ * + * string dir = 4; + * @return The dir. + */ + public java.lang.String getDir() { + java.lang.Object ref = dir_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dir_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Working directory (relative to project source root) used when running this
+     * command.
+     * 
+ * + * string dir = 4; + * @return The bytes for dir. + */ + public com.google.protobuf.ByteString + getDirBytes() { + java.lang.Object ref = dir_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Working directory (relative to project source root) used when running this
+     * command.
+     * 
+ * + * string dir = 4; + * @param value The dir to set. + * @return This builder for chaining. + */ + public Builder setDir( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + dir_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Working directory (relative to project source root) used when running this
+     * command.
+     * 
+ * + * string dir = 4; + * @return This builder for chaining. + */ + public Builder clearDir() { + dir_ = getDefaultInstance().getDir(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Working directory (relative to project source root) used when running this
+     * command.
+     * 
+ * + * string dir = 4; + * @param value The bytes for dir to set. + * @return This builder for chaining. + */ + public Builder setDirBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + dir_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + *
+     * Optional unique identifier for this command, used in wait_for to reference
+     * this command as a dependency.
+     * 
+ * + * string id = 5; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional unique identifier for this command, used in wait_for to reference
+     * this command as a dependency.
+     * 
+ * + * string id = 5; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional unique identifier for this command, used in wait_for to reference
+     * this command as a dependency.
+     * 
+ * + * string id = 5; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional unique identifier for this command, used in wait_for to reference
+     * this command as a dependency.
+     * 
+ * + * string id = 5; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Optional unique identifier for this command, used in wait_for to reference
+     * this command as a dependency.
+     * 
+ * + * string id = 5; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureWaitForIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + waitFor_ = new com.google.protobuf.LazyStringArrayList(waitFor_); + bitField0_ |= 0x00000020; + } + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @return A list containing the waitFor. + */ + public com.google.protobuf.ProtocolStringList + getWaitForList() { + return waitFor_.getUnmodifiableView(); + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @return The count of waitFor. + */ + public int getWaitForCount() { + return waitFor_.size(); + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @param index The index of the element to return. + * @return The waitFor at the given index. + */ + public java.lang.String getWaitFor(int index) { + return waitFor_.get(index); + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @param index The index of the value to return. + * @return The bytes of the waitFor at the given index. + */ + public com.google.protobuf.ByteString + getWaitForBytes(int index) { + return waitFor_.getByteString(index); + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @param index The index to set the value at. + * @param value The waitFor to set. + * @return This builder for chaining. + */ + public Builder setWaitFor( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureWaitForIsMutable(); + waitFor_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @param value The waitFor to add. + * @return This builder for chaining. + */ + public Builder addWaitFor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureWaitForIsMutable(); + waitFor_.add(value); + onChanged(); + return this; + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @param values The waitFor to add. + * @return This builder for chaining. + */ + public Builder addAllWaitFor( + java.lang.Iterable values) { + ensureWaitForIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, waitFor_); + onChanged(); + return this; + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @return This builder for chaining. + */ + public Builder clearWaitFor() { + waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @param value The bytes of the waitFor to add. + * @return This builder for chaining. + */ + public Builder addWaitForBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureWaitForIsMutable(); + waitFor_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Command) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Command) + private static final io.grafeas.v1.Command DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Command(); + } + + public static io.grafeas.v1.Command getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Command parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Command getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java new file mode 100644 index 000000000000..0eb0023c4121 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java @@ -0,0 +1,198 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface CommandOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Command) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Name of the command, as presented on the command line, or if the
+   * command is packaged as a Docker container, as presented to `docker pull`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Name of the command, as presented on the command line, or if the
+   * command is packaged as a Docker container, as presented to `docker pull`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @return A list containing the env. + */ + java.util.List + getEnvList(); + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @return The count of env. + */ + int getEnvCount(); + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @param index The index of the element to return. + * @return The env at the given index. + */ + java.lang.String getEnv(int index); + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @param index The index of the value to return. + * @return The bytes of the env at the given index. + */ + com.google.protobuf.ByteString + getEnvBytes(int index); + + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @return A list containing the args. + */ + java.util.List + getArgsList(); + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @return The count of args. + */ + int getArgsCount(); + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @param index The index of the element to return. + * @return The args at the given index. + */ + java.lang.String getArgs(int index); + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + com.google.protobuf.ByteString + getArgsBytes(int index); + + /** + *
+   * Working directory (relative to project source root) used when running this
+   * command.
+   * 
+ * + * string dir = 4; + * @return The dir. + */ + java.lang.String getDir(); + /** + *
+   * Working directory (relative to project source root) used when running this
+   * command.
+   * 
+ * + * string dir = 4; + * @return The bytes for dir. + */ + com.google.protobuf.ByteString + getDirBytes(); + + /** + *
+   * Optional unique identifier for this command, used in wait_for to reference
+   * this command as a dependency.
+   * 
+ * + * string id = 5; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * Optional unique identifier for this command, used in wait_for to reference
+   * this command as a dependency.
+   * 
+ * + * string id = 5; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @return A list containing the waitFor. + */ + java.util.List + getWaitForList(); + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @return The count of waitFor. + */ + int getWaitForCount(); + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @param index The index of the element to return. + * @return The waitFor at the given index. + */ + java.lang.String getWaitFor(int index); + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @param index The index of the value to return. + * @return The bytes of the waitFor at the given index. + */ + com.google.protobuf.ByteString + getWaitForBytes(int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java new file mode 100644 index 000000000000..1803e0d33785 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java @@ -0,0 +1,129 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public final class Common { + private Common() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_RelatedUrl_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Signature_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Signature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Envelope_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Envelope_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_EnvelopeSignature_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_FileLocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_FileLocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_License_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_License_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Digest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Digest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\027grafeas/v1/common.proto\022\ngrafeas.v1\"(\n" + + "\nRelatedUrl\022\013\n\003url\030\001 \001(\t\022\r\n\005label\030\002 \001(\t\"" + + "5\n\tSignature\022\021\n\tsignature\030\001 \001(\014\022\025\n\rpubli" + + "c_key_id\030\002 \001(\t\"d\n\010Envelope\022\017\n\007payload\030\001 " + + "\001(\014\022\024\n\014payload_type\030\002 \001(\t\0221\n\nsignatures\030" + + "\003 \003(\0132\035.grafeas.v1.EnvelopeSignature\"/\n\021" + + "EnvelopeSignature\022\013\n\003sig\030\001 \001(\014\022\r\n\005keyid\030" + + "\002 \001(\t\"!\n\014FileLocation\022\021\n\tfile_path\030\001 \001(\t" + + "\"/\n\007License\022\022\n\nexpression\030\001 \001(\t\022\020\n\010comme" + + "nts\030\002 \001(\t\",\n\006Digest\022\014\n\004algo\030\001 \001(\t\022\024\n\014dig" + + "est_bytes\030\002 \001(\014*\276\001\n\010NoteKind\022\031\n\025NOTE_KIN" + + "D_UNSPECIFIED\020\000\022\021\n\rVULNERABILITY\020\001\022\t\n\005BU" + + "ILD\020\002\022\t\n\005IMAGE\020\003\022\013\n\007PACKAGE\020\004\022\016\n\nDEPLOYM" + + "ENT\020\005\022\r\n\tDISCOVERY\020\006\022\017\n\013ATTESTATION\020\007\022\013\n" + + "\007UPGRADE\020\010\022\016\n\nCOMPLIANCE\020\t\022\024\n\020DSSE_ATTES" + + "TATION\020\nBQ\n\rio.grafeas.v1P\001Z8google.gola" + + "ng.org/genproto/googleapis/grafeas/v1;gr" + + "afeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_grafeas_v1_RelatedUrl_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_RelatedUrl_descriptor, + new java.lang.String[] { "Url", "Label", }); + internal_static_grafeas_v1_Signature_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Signature_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Signature_descriptor, + new java.lang.String[] { "Signature", "PublicKeyId", }); + internal_static_grafeas_v1_Envelope_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_Envelope_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Envelope_descriptor, + new java.lang.String[] { "Payload", "PayloadType", "Signatures", }); + internal_static_grafeas_v1_EnvelopeSignature_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_EnvelopeSignature_descriptor, + new java.lang.String[] { "Sig", "Keyid", }); + internal_static_grafeas_v1_FileLocation_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grafeas_v1_FileLocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_FileLocation_descriptor, + new java.lang.String[] { "FilePath", }); + internal_static_grafeas_v1_License_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_grafeas_v1_License_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_License_descriptor, + new java.lang.String[] { "Expression", "Comments", }); + internal_static_grafeas_v1_Digest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_grafeas_v1_Digest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Digest_descriptor, + new java.lang.String[] { "Algo", "DigestBytes", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java new file mode 100644 index 000000000000..89490dc99bcb --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java @@ -0,0 +1,679 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Indicates that the builder claims certain fields in this message to be
+ * complete.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Completeness} + */ +public final class Completeness extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Completeness) + CompletenessOrBuilder { +private static final long serialVersionUID = 0L; + // Use Completeness.newBuilder() to construct. + private Completeness(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Completeness() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Completeness(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Completeness.class, io.grafeas.v1.Completeness.Builder.class); + } + + public static final int ARGUMENTS_FIELD_NUMBER = 1; + private boolean arguments_ = false; + /** + *
+   * If true, the builder claims that recipe.arguments is complete, meaning that
+   * all external inputs are properly captured in the recipe.
+   * 
+ * + * bool arguments = 1; + * @return The arguments. + */ + @java.lang.Override + public boolean getArguments() { + return arguments_; + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 2; + private boolean environment_ = false; + /** + *
+   * If true, the builder claims that recipe.environment is claimed to be
+   * complete.
+   * 
+ * + * bool environment = 2; + * @return The environment. + */ + @java.lang.Override + public boolean getEnvironment() { + return environment_; + } + + public static final int MATERIALS_FIELD_NUMBER = 3; + private boolean materials_ = false; + /** + *
+   * If true, the builder claims that materials are complete, usually through
+   * some controls to prevent network access. Sometimes called "hermetic".
+   * 
+ * + * bool materials = 3; + * @return The materials. + */ + @java.lang.Override + public boolean getMaterials() { + return materials_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (arguments_ != false) { + output.writeBool(1, arguments_); + } + if (environment_ != false) { + output.writeBool(2, environment_); + } + if (materials_ != false) { + output.writeBool(3, materials_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (arguments_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, arguments_); + } + if (environment_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, environment_); + } + if (materials_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, materials_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Completeness)) { + return super.equals(obj); + } + io.grafeas.v1.Completeness other = (io.grafeas.v1.Completeness) obj; + + if (getArguments() + != other.getArguments()) return false; + if (getEnvironment() + != other.getEnvironment()) return false; + if (getMaterials() + != other.getMaterials()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getArguments()); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnvironment()); + hash = (37 * hash) + MATERIALS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMaterials()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Completeness parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Completeness parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Completeness parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Completeness parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Completeness parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Completeness parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Completeness parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Completeness parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Completeness parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Completeness parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Completeness parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Completeness parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Completeness prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Completeness} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Completeness) + io.grafeas.v1.CompletenessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Completeness.class, io.grafeas.v1.Completeness.Builder.class); + } + + // Construct using io.grafeas.v1.Completeness.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + arguments_ = false; + environment_ = false; + materials_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Completeness getDefaultInstanceForType() { + return io.grafeas.v1.Completeness.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Completeness build() { + io.grafeas.v1.Completeness result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Completeness buildPartial() { + io.grafeas.v1.Completeness result = new io.grafeas.v1.Completeness(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Completeness result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.arguments_ = arguments_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.environment_ = environment_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.materials_ = materials_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Completeness) { + return mergeFrom((io.grafeas.v1.Completeness)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Completeness other) { + if (other == io.grafeas.v1.Completeness.getDefaultInstance()) return this; + if (other.getArguments() != false) { + setArguments(other.getArguments()); + } + if (other.getEnvironment() != false) { + setEnvironment(other.getEnvironment()); + } + if (other.getMaterials() != false) { + setMaterials(other.getMaterials()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + arguments_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + environment_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + materials_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean arguments_ ; + /** + *
+     * If true, the builder claims that recipe.arguments is complete, meaning that
+     * all external inputs are properly captured in the recipe.
+     * 
+ * + * bool arguments = 1; + * @return The arguments. + */ + @java.lang.Override + public boolean getArguments() { + return arguments_; + } + /** + *
+     * If true, the builder claims that recipe.arguments is complete, meaning that
+     * all external inputs are properly captured in the recipe.
+     * 
+ * + * bool arguments = 1; + * @param value The arguments to set. + * @return This builder for chaining. + */ + public Builder setArguments(boolean value) { + + arguments_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * If true, the builder claims that recipe.arguments is complete, meaning that
+     * all external inputs are properly captured in the recipe.
+     * 
+ * + * bool arguments = 1; + * @return This builder for chaining. + */ + public Builder clearArguments() { + bitField0_ = (bitField0_ & ~0x00000001); + arguments_ = false; + onChanged(); + return this; + } + + private boolean environment_ ; + /** + *
+     * If true, the builder claims that recipe.environment is claimed to be
+     * complete.
+     * 
+ * + * bool environment = 2; + * @return The environment. + */ + @java.lang.Override + public boolean getEnvironment() { + return environment_; + } + /** + *
+     * If true, the builder claims that recipe.environment is claimed to be
+     * complete.
+     * 
+ * + * bool environment = 2; + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(boolean value) { + + environment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * If true, the builder claims that recipe.environment is claimed to be
+     * complete.
+     * 
+ * + * bool environment = 2; + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + bitField0_ = (bitField0_ & ~0x00000002); + environment_ = false; + onChanged(); + return this; + } + + private boolean materials_ ; + /** + *
+     * If true, the builder claims that materials are complete, usually through
+     * some controls to prevent network access. Sometimes called "hermetic".
+     * 
+ * + * bool materials = 3; + * @return The materials. + */ + @java.lang.Override + public boolean getMaterials() { + return materials_; + } + /** + *
+     * If true, the builder claims that materials are complete, usually through
+     * some controls to prevent network access. Sometimes called "hermetic".
+     * 
+ * + * bool materials = 3; + * @param value The materials to set. + * @return This builder for chaining. + */ + public Builder setMaterials(boolean value) { + + materials_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * If true, the builder claims that materials are complete, usually through
+     * some controls to prevent network access. Sometimes called "hermetic".
+     * 
+ * + * bool materials = 3; + * @return This builder for chaining. + */ + public Builder clearMaterials() { + bitField0_ = (bitField0_ & ~0x00000004); + materials_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Completeness) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Completeness) + private static final io.grafeas.v1.Completeness DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Completeness(); + } + + public static io.grafeas.v1.Completeness getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Completeness parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Completeness getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java new file mode 100644 index 000000000000..4c8b606b7d03 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java @@ -0,0 +1,42 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +public interface CompletenessOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Completeness) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If true, the builder claims that recipe.arguments is complete, meaning that
+   * all external inputs are properly captured in the recipe.
+   * 
+ * + * bool arguments = 1; + * @return The arguments. + */ + boolean getArguments(); + + /** + *
+   * If true, the builder claims that recipe.environment is claimed to be
+   * complete.
+   * 
+ * + * bool environment = 2; + * @return The environment. + */ + boolean getEnvironment(); + + /** + *
+   * If true, the builder claims that materials are complete, usually through
+   * some controls to prevent network access. Sometimes called "hermetic".
+   * 
+ * + * bool materials = 3; + * @return The materials. + */ + boolean getMaterials(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java new file mode 100644 index 000000000000..7d4fd429aa29 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java @@ -0,0 +1,111 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +public final class Compliance { + private Compliance() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ComplianceNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ComplianceVersion_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ComplianceOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_NonCompliantFile_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033grafeas/v1/compliance.proto\022\ngrafeas.v" + + "1\032\031grafeas/v1/severity.proto\"\313\002\n\016Complia" + + "nceNote\022\r\n\005title\030\001 \001(\t\022\023\n\013description\030\002 " + + "\001(\t\022.\n\007version\030\003 \003(\0132\035.grafeas.v1.Compli" + + "anceVersion\022\021\n\trationale\030\004 \001(\t\022\023\n\013remedi" + + "ation\030\005 \001(\t\022@\n\rcis_benchmark\030\006 \001(\0132\'.gra" + + "feas.v1.ComplianceNote.CisBenchmarkH\000\022\031\n" + + "\021scan_instructions\030\007 \001(\014\032M\n\014CisBenchmark" + + "\022\025\n\rprofile_level\030\001 \001(\005\022&\n\010severity\030\002 \001(" + + "\0162\024.grafeas.v1.SeverityB\021\n\017compliance_ty" + + "pe\"Q\n\021ComplianceVersion\022\017\n\007cpe_uri\030\001 \001(\t" + + "\022\032\n\022benchmark_document\030\003 \001(\t\022\017\n\007version\030" + + "\002 \001(\t\"p\n\024ComplianceOccurrence\0229\n\023non_com" + + "pliant_files\030\002 \003(\0132\034.grafeas.v1.NonCompl" + + "iantFile\022\035\n\025non_compliance_reason\030\003 \001(\t\"" + + "I\n\020NonCompliantFile\022\014\n\004path\030\001 \001(\t\022\027\n\017dis" + + "play_command\030\002 \001(\t\022\016\n\006reason\030\003 \001(\tBQ\n\rio" + + ".grafeas.v1P\001Z8google.golang.org/genprot" + + "o/googleapis/grafeas/v1;grafeas\242\002\003GRAb\006p" + + "roto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grafeas.v1.SeverityOuterClass.getDescriptor(), + }); + internal_static_grafeas_v1_ComplianceNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ComplianceNote_descriptor, + new java.lang.String[] { "Title", "Description", "Version", "Rationale", "Remediation", "CisBenchmark", "ScanInstructions", "ComplianceType", }); + internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor = + internal_static_grafeas_v1_ComplianceNote_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor, + new java.lang.String[] { "ProfileLevel", "Severity", }); + internal_static_grafeas_v1_ComplianceVersion_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ComplianceVersion_descriptor, + new java.lang.String[] { "CpeUri", "BenchmarkDocument", "Version", }); + internal_static_grafeas_v1_ComplianceOccurrence_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ComplianceOccurrence_descriptor, + new java.lang.String[] { "NonCompliantFiles", "NonComplianceReason", }); + internal_static_grafeas_v1_NonCompliantFile_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_NonCompliantFile_descriptor, + new java.lang.String[] { "Path", "DisplayCommand", "Reason", }); + io.grafeas.v1.SeverityOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java new file mode 100644 index 000000000000..d58e1ea6bb90 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java @@ -0,0 +1,2467 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.ComplianceNote} + */ +public final class ComplianceNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceNote) + ComplianceNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use ComplianceNote.newBuilder() to construct. + private ComplianceNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ComplianceNote() { + title_ = ""; + description_ = ""; + version_ = java.util.Collections.emptyList(); + rationale_ = ""; + remediation_ = ""; + scanInstructions_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ComplianceNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceNote.class, io.grafeas.v1.ComplianceNote.Builder.class); + } + + public interface CisBenchmarkOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceNote.CisBenchmark) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 profile_level = 1; + * @return The profileLevel. + */ + int getProfileLevel(); + + /** + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + int getSeverityValue(); + /** + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + io.grafeas.v1.Severity getSeverity(); + } + /** + *
+   * A compliance check that is a CIS benchmark.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ComplianceNote.CisBenchmark} + */ + public static final class CisBenchmark extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceNote.CisBenchmark) + CisBenchmarkOrBuilder { + private static final long serialVersionUID = 0L; + // Use CisBenchmark.newBuilder() to construct. + private CisBenchmark(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CisBenchmark() { + severity_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CisBenchmark(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceNote.CisBenchmark.class, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder.class); + } + + public static final int PROFILE_LEVEL_FIELD_NUMBER = 1; + private int profileLevel_ = 0; + /** + * int32 profile_level = 1; + * @return The profileLevel. + */ + @java.lang.Override + public int getProfileLevel() { + return profileLevel_; + } + + public static final int SEVERITY_FIELD_NUMBER = 2; + private int severity_ = 0; + /** + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override public int getSeverityValue() { + return severity_; + } + /** + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + @java.lang.Override public io.grafeas.v1.Severity getSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (profileLevel_ != 0) { + output.writeInt32(1, profileLevel_); + } + if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + output.writeEnum(2, severity_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (profileLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, profileLevel_); + } + if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, severity_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ComplianceNote.CisBenchmark)) { + return super.equals(obj); + } + io.grafeas.v1.ComplianceNote.CisBenchmark other = (io.grafeas.v1.ComplianceNote.CisBenchmark) obj; + + if (getProfileLevel() + != other.getProfileLevel()) return false; + if (severity_ != other.severity_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROFILE_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getProfileLevel(); + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + severity_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ComplianceNote.CisBenchmark prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A compliance check that is a CIS benchmark.
+     * 
+ * + * Protobuf type {@code grafeas.v1.ComplianceNote.CisBenchmark} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceNote.CisBenchmark) + io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceNote.CisBenchmark.class, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder.class); + } + + // Construct using io.grafeas.v1.ComplianceNote.CisBenchmark.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + profileLevel_ = 0; + severity_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmark getDefaultInstanceForType() { + return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmark build() { + io.grafeas.v1.ComplianceNote.CisBenchmark result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmark buildPartial() { + io.grafeas.v1.ComplianceNote.CisBenchmark result = new io.grafeas.v1.ComplianceNote.CisBenchmark(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.ComplianceNote.CisBenchmark result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.profileLevel_ = profileLevel_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.severity_ = severity_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ComplianceNote.CisBenchmark) { + return mergeFrom((io.grafeas.v1.ComplianceNote.CisBenchmark)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ComplianceNote.CisBenchmark other) { + if (other == io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance()) return this; + if (other.getProfileLevel() != 0) { + setProfileLevel(other.getProfileLevel()); + } + if (other.severity_ != 0) { + setSeverityValue(other.getSeverityValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + profileLevel_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + severity_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int profileLevel_ ; + /** + * int32 profile_level = 1; + * @return The profileLevel. + */ + @java.lang.Override + public int getProfileLevel() { + return profileLevel_; + } + /** + * int32 profile_level = 1; + * @param value The profileLevel to set. + * @return This builder for chaining. + */ + public Builder setProfileLevel(int value) { + + profileLevel_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int32 profile_level = 1; + * @return This builder for chaining. + */ + public Builder clearProfileLevel() { + bitField0_ = (bitField0_ & ~0x00000001); + profileLevel_ = 0; + onChanged(); + return this; + } + + private int severity_ = 0; + /** + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override public int getSeverityValue() { + return severity_; + } + /** + * .grafeas.v1.Severity severity = 2; + * @param value The enum numeric value on the wire for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityValue(int value) { + severity_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + @java.lang.Override + public io.grafeas.v1.Severity getSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.Severity severity = 2; + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity(io.grafeas.v1.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + severity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.Severity severity = 2; + * @return This builder for chaining. + */ + public Builder clearSeverity() { + bitField0_ = (bitField0_ & ~0x00000002); + severity_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceNote.CisBenchmark) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceNote.CisBenchmark) + private static final io.grafeas.v1.ComplianceNote.CisBenchmark DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceNote.CisBenchmark(); + } + + public static io.grafeas.v1.ComplianceNote.CisBenchmark getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CisBenchmark parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmark getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int complianceTypeCase_ = 0; + private java.lang.Object complianceType_; + public enum ComplianceTypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CIS_BENCHMARK(6), + COMPLIANCETYPE_NOT_SET(0); + private final int value; + private ComplianceTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ComplianceTypeCase valueOf(int value) { + return forNumber(value); + } + + public static ComplianceTypeCase forNumber(int value) { + switch (value) { + case 6: return CIS_BENCHMARK; + case 0: return COMPLIANCETYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ComplianceTypeCase + getComplianceTypeCase() { + return ComplianceTypeCase.forNumber( + complianceTypeCase_); + } + + public static final int TITLE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + *
+   * The title that identifies this compliance check.
+   * 
+ * + * string title = 1; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + *
+   * The title that identifies this compliance check.
+   * 
+ * + * string title = 1; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A description about this compliance check.
+   * 
+ * + * string description = 2; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A description about this compliance check.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List version_; + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + @java.lang.Override + public java.util.List getVersionList() { + return version_; + } + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + @java.lang.Override + public java.util.List + getVersionOrBuilderList() { + return version_; + } + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + @java.lang.Override + public int getVersionCount() { + return version_.size(); + } + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceVersion getVersion(int index) { + return version_.get(index); + } + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceVersionOrBuilder getVersionOrBuilder( + int index) { + return version_.get(index); + } + + public static final int RATIONALE_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object rationale_ = ""; + /** + *
+   * A rationale for the existence of this compliance check.
+   * 
+ * + * string rationale = 4; + * @return The rationale. + */ + @java.lang.Override + public java.lang.String getRationale() { + java.lang.Object ref = rationale_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rationale_ = s; + return s; + } + } + /** + *
+   * A rationale for the existence of this compliance check.
+   * 
+ * + * string rationale = 4; + * @return The bytes for rationale. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRationaleBytes() { + java.lang.Object ref = rationale_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rationale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REMEDIATION_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object remediation_ = ""; + /** + *
+   * A description of remediation steps if the compliance check fails.
+   * 
+ * + * string remediation = 5; + * @return The remediation. + */ + @java.lang.Override + public java.lang.String getRemediation() { + java.lang.Object ref = remediation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remediation_ = s; + return s; + } + } + /** + *
+   * A description of remediation steps if the compliance check fails.
+   * 
+ * + * string remediation = 5; + * @return The bytes for remediation. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRemediationBytes() { + java.lang.Object ref = remediation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remediation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CIS_BENCHMARK_FIELD_NUMBER = 6; + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + * @return Whether the cisBenchmark field is set. + */ + @java.lang.Override + public boolean hasCisBenchmark() { + return complianceTypeCase_ == 6; + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + * @return The cisBenchmark. + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmark getCisBenchmark() { + if (complianceTypeCase_ == 6) { + return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; + } + return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder getCisBenchmarkOrBuilder() { + if (complianceTypeCase_ == 6) { + return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; + } + return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); + } + + public static final int SCAN_INSTRUCTIONS_FIELD_NUMBER = 7; + private com.google.protobuf.ByteString scanInstructions_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+   * Serialized scan instructions with a predefined format.
+   * 
+ * + * bytes scan_instructions = 7; + * @return The scanInstructions. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScanInstructions() { + return scanInstructions_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + for (int i = 0; i < version_.size(); i++) { + output.writeMessage(3, version_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rationale_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, rationale_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remediation_); + } + if (complianceTypeCase_ == 6) { + output.writeMessage(6, (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_); + } + if (!scanInstructions_.isEmpty()) { + output.writeBytes(7, scanInstructions_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + for (int i = 0; i < version_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, version_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rationale_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, rationale_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remediation_); + } + if (complianceTypeCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_); + } + if (!scanInstructions_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(7, scanInstructions_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ComplianceNote)) { + return super.equals(obj); + } + io.grafeas.v1.ComplianceNote other = (io.grafeas.v1.ComplianceNote) obj; + + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getVersionList() + .equals(other.getVersionList())) return false; + if (!getRationale() + .equals(other.getRationale())) return false; + if (!getRemediation() + .equals(other.getRemediation())) return false; + if (!getScanInstructions() + .equals(other.getScanInstructions())) return false; + if (!getComplianceTypeCase().equals(other.getComplianceTypeCase())) return false; + switch (complianceTypeCase_) { + case 6: + if (!getCisBenchmark() + .equals(other.getCisBenchmark())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getVersionCount() > 0) { + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersionList().hashCode(); + } + hash = (37 * hash) + RATIONALE_FIELD_NUMBER; + hash = (53 * hash) + getRationale().hashCode(); + hash = (37 * hash) + REMEDIATION_FIELD_NUMBER; + hash = (53 * hash) + getRemediation().hashCode(); + hash = (37 * hash) + SCAN_INSTRUCTIONS_FIELD_NUMBER; + hash = (53 * hash) + getScanInstructions().hashCode(); + switch (complianceTypeCase_) { + case 6: + hash = (37 * hash) + CIS_BENCHMARK_FIELD_NUMBER; + hash = (53 * hash) + getCisBenchmark().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ComplianceNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ComplianceNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.ComplianceNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceNote) + io.grafeas.v1.ComplianceNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceNote.class, io.grafeas.v1.ComplianceNote.Builder.class); + } + + // Construct using io.grafeas.v1.ComplianceNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + title_ = ""; + description_ = ""; + if (versionBuilder_ == null) { + version_ = java.util.Collections.emptyList(); + } else { + version_ = null; + versionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + rationale_ = ""; + remediation_ = ""; + if (cisBenchmarkBuilder_ != null) { + cisBenchmarkBuilder_.clear(); + } + scanInstructions_ = com.google.protobuf.ByteString.EMPTY; + complianceTypeCase_ = 0; + complianceType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote getDefaultInstanceForType() { + return io.grafeas.v1.ComplianceNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote build() { + io.grafeas.v1.ComplianceNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote buildPartial() { + io.grafeas.v1.ComplianceNote result = new io.grafeas.v1.ComplianceNote(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.ComplianceNote result) { + if (versionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + version_ = java.util.Collections.unmodifiableList(version_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.version_ = version_; + } else { + result.version_ = versionBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.ComplianceNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.rationale_ = rationale_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.remediation_ = remediation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.scanInstructions_ = scanInstructions_; + } + } + + private void buildPartialOneofs(io.grafeas.v1.ComplianceNote result) { + result.complianceTypeCase_ = complianceTypeCase_; + result.complianceType_ = this.complianceType_; + if (complianceTypeCase_ == 6 && + cisBenchmarkBuilder_ != null) { + result.complianceType_ = cisBenchmarkBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ComplianceNote) { + return mergeFrom((io.grafeas.v1.ComplianceNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ComplianceNote other) { + if (other == io.grafeas.v1.ComplianceNote.getDefaultInstance()) return this; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (versionBuilder_ == null) { + if (!other.version_.isEmpty()) { + if (version_.isEmpty()) { + version_ = other.version_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureVersionIsMutable(); + version_.addAll(other.version_); + } + onChanged(); + } + } else { + if (!other.version_.isEmpty()) { + if (versionBuilder_.isEmpty()) { + versionBuilder_.dispose(); + versionBuilder_ = null; + version_ = other.version_; + bitField0_ = (bitField0_ & ~0x00000004); + versionBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVersionFieldBuilder() : null; + } else { + versionBuilder_.addAllMessages(other.version_); + } + } + } + if (!other.getRationale().isEmpty()) { + rationale_ = other.rationale_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getRemediation().isEmpty()) { + remediation_ = other.remediation_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getScanInstructions() != com.google.protobuf.ByteString.EMPTY) { + setScanInstructions(other.getScanInstructions()); + } + switch (other.getComplianceTypeCase()) { + case CIS_BENCHMARK: { + mergeCisBenchmark(other.getCisBenchmark()); + break; + } + case COMPLIANCETYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + io.grafeas.v1.ComplianceVersion m = + input.readMessage( + io.grafeas.v1.ComplianceVersion.parser(), + extensionRegistry); + if (versionBuilder_ == null) { + ensureVersionIsMutable(); + version_.add(m); + } else { + versionBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: { + rationale_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + remediation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getCisBenchmarkFieldBuilder().getBuilder(), + extensionRegistry); + complianceTypeCase_ = 6; + break; + } // case 50 + case 58: { + scanInstructions_ = input.readBytes(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int complianceTypeCase_ = 0; + private java.lang.Object complianceType_; + public ComplianceTypeCase + getComplianceTypeCase() { + return ComplianceTypeCase.forNumber( + complianceTypeCase_); + } + + public Builder clearComplianceType() { + complianceTypeCase_ = 0; + complianceType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object title_ = ""; + /** + *
+     * The title that identifies this compliance check.
+     * 
+ * + * string title = 1; + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The title that identifies this compliance check.
+     * 
+ * + * string title = 1; + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The title that identifies this compliance check.
+     * 
+ * + * string title = 1; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The title that identifies this compliance check.
+     * 
+ * + * string title = 1; + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The title that identifies this compliance check.
+     * 
+ * + * string title = 1; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A description about this compliance check.
+     * 
+ * + * string description = 2; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A description about this compliance check.
+     * 
+ * + * string description = 2; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A description about this compliance check.
+     * 
+ * + * string description = 2; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A description about this compliance check.
+     * 
+ * + * string description = 2; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A description about this compliance check.
+     * 
+ * + * string description = 2; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List version_ = + java.util.Collections.emptyList(); + private void ensureVersionIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + version_ = new java.util.ArrayList(version_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.ComplianceVersion, io.grafeas.v1.ComplianceVersion.Builder, io.grafeas.v1.ComplianceVersionOrBuilder> versionBuilder_; + + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public java.util.List getVersionList() { + if (versionBuilder_ == null) { + return java.util.Collections.unmodifiableList(version_); + } else { + return versionBuilder_.getMessageList(); + } + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public int getVersionCount() { + if (versionBuilder_ == null) { + return version_.size(); + } else { + return versionBuilder_.getCount(); + } + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public io.grafeas.v1.ComplianceVersion getVersion(int index) { + if (versionBuilder_ == null) { + return version_.get(index); + } else { + return versionBuilder_.getMessage(index); + } + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder setVersion( + int index, io.grafeas.v1.ComplianceVersion value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionIsMutable(); + version_.set(index, value); + onChanged(); + } else { + versionBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder setVersion( + int index, io.grafeas.v1.ComplianceVersion.Builder builderForValue) { + if (versionBuilder_ == null) { + ensureVersionIsMutable(); + version_.set(index, builderForValue.build()); + onChanged(); + } else { + versionBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder addVersion(io.grafeas.v1.ComplianceVersion value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionIsMutable(); + version_.add(value); + onChanged(); + } else { + versionBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder addVersion( + int index, io.grafeas.v1.ComplianceVersion value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionIsMutable(); + version_.add(index, value); + onChanged(); + } else { + versionBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder addVersion( + io.grafeas.v1.ComplianceVersion.Builder builderForValue) { + if (versionBuilder_ == null) { + ensureVersionIsMutable(); + version_.add(builderForValue.build()); + onChanged(); + } else { + versionBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder addVersion( + int index, io.grafeas.v1.ComplianceVersion.Builder builderForValue) { + if (versionBuilder_ == null) { + ensureVersionIsMutable(); + version_.add(index, builderForValue.build()); + onChanged(); + } else { + versionBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder addAllVersion( + java.lang.Iterable values) { + if (versionBuilder_ == null) { + ensureVersionIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, version_); + onChanged(); + } else { + versionBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder clearVersion() { + if (versionBuilder_ == null) { + version_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + versionBuilder_.clear(); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder removeVersion(int index) { + if (versionBuilder_ == null) { + ensureVersionIsMutable(); + version_.remove(index); + onChanged(); + } else { + versionBuilder_.remove(index); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public io.grafeas.v1.ComplianceVersion.Builder getVersionBuilder( + int index) { + return getVersionFieldBuilder().getBuilder(index); + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public io.grafeas.v1.ComplianceVersionOrBuilder getVersionOrBuilder( + int index) { + if (versionBuilder_ == null) { + return version_.get(index); } else { + return versionBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public java.util.List + getVersionOrBuilderList() { + if (versionBuilder_ != null) { + return versionBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(version_); + } + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public io.grafeas.v1.ComplianceVersion.Builder addVersionBuilder() { + return getVersionFieldBuilder().addBuilder( + io.grafeas.v1.ComplianceVersion.getDefaultInstance()); + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public io.grafeas.v1.ComplianceVersion.Builder addVersionBuilder( + int index) { + return getVersionFieldBuilder().addBuilder( + index, io.grafeas.v1.ComplianceVersion.getDefaultInstance()); + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public java.util.List + getVersionBuilderList() { + return getVersionFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.ComplianceVersion, io.grafeas.v1.ComplianceVersion.Builder, io.grafeas.v1.ComplianceVersionOrBuilder> + getVersionFieldBuilder() { + if (versionBuilder_ == null) { + versionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.ComplianceVersion, io.grafeas.v1.ComplianceVersion.Builder, io.grafeas.v1.ComplianceVersionOrBuilder>( + version_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + version_ = null; + } + return versionBuilder_; + } + + private java.lang.Object rationale_ = ""; + /** + *
+     * A rationale for the existence of this compliance check.
+     * 
+ * + * string rationale = 4; + * @return The rationale. + */ + public java.lang.String getRationale() { + java.lang.Object ref = rationale_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rationale_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A rationale for the existence of this compliance check.
+     * 
+ * + * string rationale = 4; + * @return The bytes for rationale. + */ + public com.google.protobuf.ByteString + getRationaleBytes() { + java.lang.Object ref = rationale_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rationale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A rationale for the existence of this compliance check.
+     * 
+ * + * string rationale = 4; + * @param value The rationale to set. + * @return This builder for chaining. + */ + public Builder setRationale( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + rationale_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * A rationale for the existence of this compliance check.
+     * 
+ * + * string rationale = 4; + * @return This builder for chaining. + */ + public Builder clearRationale() { + rationale_ = getDefaultInstance().getRationale(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * A rationale for the existence of this compliance check.
+     * 
+ * + * string rationale = 4; + * @param value The bytes for rationale to set. + * @return This builder for chaining. + */ + public Builder setRationaleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + rationale_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object remediation_ = ""; + /** + *
+     * A description of remediation steps if the compliance check fails.
+     * 
+ * + * string remediation = 5; + * @return The remediation. + */ + public java.lang.String getRemediation() { + java.lang.Object ref = remediation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remediation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A description of remediation steps if the compliance check fails.
+     * 
+ * + * string remediation = 5; + * @return The bytes for remediation. + */ + public com.google.protobuf.ByteString + getRemediationBytes() { + java.lang.Object ref = remediation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remediation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A description of remediation steps if the compliance check fails.
+     * 
+ * + * string remediation = 5; + * @param value The remediation to set. + * @return This builder for chaining. + */ + public Builder setRemediation( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + remediation_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * A description of remediation steps if the compliance check fails.
+     * 
+ * + * string remediation = 5; + * @return This builder for chaining. + */ + public Builder clearRemediation() { + remediation_ = getDefaultInstance().getRemediation(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * A description of remediation steps if the compliance check fails.
+     * 
+ * + * string remediation = 5; + * @param value The bytes for remediation to set. + * @return This builder for chaining. + */ + public Builder setRemediationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + remediation_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceNote.CisBenchmark, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder, io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder> cisBenchmarkBuilder_; + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + * @return Whether the cisBenchmark field is set. + */ + @java.lang.Override + public boolean hasCisBenchmark() { + return complianceTypeCase_ == 6; + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + * @return The cisBenchmark. + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmark getCisBenchmark() { + if (cisBenchmarkBuilder_ == null) { + if (complianceTypeCase_ == 6) { + return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; + } + return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); + } else { + if (complianceTypeCase_ == 6) { + return cisBenchmarkBuilder_.getMessage(); + } + return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); + } + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + public Builder setCisBenchmark(io.grafeas.v1.ComplianceNote.CisBenchmark value) { + if (cisBenchmarkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + complianceType_ = value; + onChanged(); + } else { + cisBenchmarkBuilder_.setMessage(value); + } + complianceTypeCase_ = 6; + return this; + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + public Builder setCisBenchmark( + io.grafeas.v1.ComplianceNote.CisBenchmark.Builder builderForValue) { + if (cisBenchmarkBuilder_ == null) { + complianceType_ = builderForValue.build(); + onChanged(); + } else { + cisBenchmarkBuilder_.setMessage(builderForValue.build()); + } + complianceTypeCase_ = 6; + return this; + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + public Builder mergeCisBenchmark(io.grafeas.v1.ComplianceNote.CisBenchmark value) { + if (cisBenchmarkBuilder_ == null) { + if (complianceTypeCase_ == 6 && + complianceType_ != io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance()) { + complianceType_ = io.grafeas.v1.ComplianceNote.CisBenchmark.newBuilder((io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_) + .mergeFrom(value).buildPartial(); + } else { + complianceType_ = value; + } + onChanged(); + } else { + if (complianceTypeCase_ == 6) { + cisBenchmarkBuilder_.mergeFrom(value); + } else { + cisBenchmarkBuilder_.setMessage(value); + } + } + complianceTypeCase_ = 6; + return this; + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + public Builder clearCisBenchmark() { + if (cisBenchmarkBuilder_ == null) { + if (complianceTypeCase_ == 6) { + complianceTypeCase_ = 0; + complianceType_ = null; + onChanged(); + } + } else { + if (complianceTypeCase_ == 6) { + complianceTypeCase_ = 0; + complianceType_ = null; + } + cisBenchmarkBuilder_.clear(); + } + return this; + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + public io.grafeas.v1.ComplianceNote.CisBenchmark.Builder getCisBenchmarkBuilder() { + return getCisBenchmarkFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder getCisBenchmarkOrBuilder() { + if ((complianceTypeCase_ == 6) && (cisBenchmarkBuilder_ != null)) { + return cisBenchmarkBuilder_.getMessageOrBuilder(); + } else { + if (complianceTypeCase_ == 6) { + return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; + } + return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); + } + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceNote.CisBenchmark, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder, io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder> + getCisBenchmarkFieldBuilder() { + if (cisBenchmarkBuilder_ == null) { + if (!(complianceTypeCase_ == 6)) { + complianceType_ = io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); + } + cisBenchmarkBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceNote.CisBenchmark, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder, io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder>( + (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_, + getParentForChildren(), + isClean()); + complianceType_ = null; + } + complianceTypeCase_ = 6; + onChanged(); + return cisBenchmarkBuilder_; + } + + private com.google.protobuf.ByteString scanInstructions_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Serialized scan instructions with a predefined format.
+     * 
+ * + * bytes scan_instructions = 7; + * @return The scanInstructions. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScanInstructions() { + return scanInstructions_; + } + /** + *
+     * Serialized scan instructions with a predefined format.
+     * 
+ * + * bytes scan_instructions = 7; + * @param value The scanInstructions to set. + * @return This builder for chaining. + */ + public Builder setScanInstructions(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + scanInstructions_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Serialized scan instructions with a predefined format.
+     * 
+ * + * bytes scan_instructions = 7; + * @return This builder for chaining. + */ + public Builder clearScanInstructions() { + bitField0_ = (bitField0_ & ~0x00000040); + scanInstructions_ = getDefaultInstance().getScanInstructions(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceNote) + private static final io.grafeas.v1.ComplianceNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceNote(); + } + + public static io.grafeas.v1.ComplianceNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComplianceNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java new file mode 100644 index 000000000000..8015d00f3627 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java @@ -0,0 +1,160 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +public interface ComplianceNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The title that identifies this compliance check.
+   * 
+ * + * string title = 1; + * @return The title. + */ + java.lang.String getTitle(); + /** + *
+   * The title that identifies this compliance check.
+   * 
+ * + * string title = 1; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + *
+   * A description about this compliance check.
+   * 
+ * + * string description = 2; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A description about this compliance check.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + java.util.List + getVersionList(); + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + io.grafeas.v1.ComplianceVersion getVersion(int index); + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + int getVersionCount(); + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + java.util.List + getVersionOrBuilderList(); + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + io.grafeas.v1.ComplianceVersionOrBuilder getVersionOrBuilder( + int index); + + /** + *
+   * A rationale for the existence of this compliance check.
+   * 
+ * + * string rationale = 4; + * @return The rationale. + */ + java.lang.String getRationale(); + /** + *
+   * A rationale for the existence of this compliance check.
+   * 
+ * + * string rationale = 4; + * @return The bytes for rationale. + */ + com.google.protobuf.ByteString + getRationaleBytes(); + + /** + *
+   * A description of remediation steps if the compliance check fails.
+   * 
+ * + * string remediation = 5; + * @return The remediation. + */ + java.lang.String getRemediation(); + /** + *
+   * A description of remediation steps if the compliance check fails.
+   * 
+ * + * string remediation = 5; + * @return The bytes for remediation. + */ + com.google.protobuf.ByteString + getRemediationBytes(); + + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + * @return Whether the cisBenchmark field is set. + */ + boolean hasCisBenchmark(); + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + * @return The cisBenchmark. + */ + io.grafeas.v1.ComplianceNote.CisBenchmark getCisBenchmark(); + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder getCisBenchmarkOrBuilder(); + + /** + *
+   * Serialized scan instructions with a predefined format.
+   * 
+ * + * bytes scan_instructions = 7; + * @return The scanInstructions. + */ + com.google.protobuf.ByteString getScanInstructions(); + + public io.grafeas.v1.ComplianceNote.ComplianceTypeCase getComplianceTypeCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java new file mode 100644 index 000000000000..1c25dcc2f406 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java @@ -0,0 +1,908 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +/** + *
+ * An indication that the compliance checks in the associated ComplianceNote
+ * were not satisfied for particular resources or a specified reason.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ComplianceOccurrence} + */ +public final class ComplianceOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceOccurrence) + ComplianceOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use ComplianceOccurrence.newBuilder() to construct. + private ComplianceOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ComplianceOccurrence() { + nonCompliantFiles_ = java.util.Collections.emptyList(); + nonComplianceReason_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ComplianceOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceOccurrence.class, io.grafeas.v1.ComplianceOccurrence.Builder.class); + } + + public static final int NON_COMPLIANT_FILES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List nonCompliantFiles_; + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + @java.lang.Override + public java.util.List getNonCompliantFilesList() { + return nonCompliantFiles_; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + @java.lang.Override + public java.util.List + getNonCompliantFilesOrBuilderList() { + return nonCompliantFiles_; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + @java.lang.Override + public int getNonCompliantFilesCount() { + return nonCompliantFiles_.size(); + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + @java.lang.Override + public io.grafeas.v1.NonCompliantFile getNonCompliantFiles(int index) { + return nonCompliantFiles_.get(index); + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + @java.lang.Override + public io.grafeas.v1.NonCompliantFileOrBuilder getNonCompliantFilesOrBuilder( + int index) { + return nonCompliantFiles_.get(index); + } + + public static final int NON_COMPLIANCE_REASON_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object nonComplianceReason_ = ""; + /** + * string non_compliance_reason = 3; + * @return The nonComplianceReason. + */ + @java.lang.Override + public java.lang.String getNonComplianceReason() { + java.lang.Object ref = nonComplianceReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nonComplianceReason_ = s; + return s; + } + } + /** + * string non_compliance_reason = 3; + * @return The bytes for nonComplianceReason. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNonComplianceReasonBytes() { + java.lang.Object ref = nonComplianceReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nonComplianceReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < nonCompliantFiles_.size(); i++) { + output.writeMessage(2, nonCompliantFiles_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nonComplianceReason_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nonComplianceReason_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < nonCompliantFiles_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, nonCompliantFiles_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nonComplianceReason_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nonComplianceReason_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ComplianceOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.ComplianceOccurrence other = (io.grafeas.v1.ComplianceOccurrence) obj; + + if (!getNonCompliantFilesList() + .equals(other.getNonCompliantFilesList())) return false; + if (!getNonComplianceReason() + .equals(other.getNonComplianceReason())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNonCompliantFilesCount() > 0) { + hash = (37 * hash) + NON_COMPLIANT_FILES_FIELD_NUMBER; + hash = (53 * hash) + getNonCompliantFilesList().hashCode(); + } + hash = (37 * hash) + NON_COMPLIANCE_REASON_FIELD_NUMBER; + hash = (53 * hash) + getNonComplianceReason().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ComplianceOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An indication that the compliance checks in the associated ComplianceNote
+   * were not satisfied for particular resources or a specified reason.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ComplianceOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceOccurrence) + io.grafeas.v1.ComplianceOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceOccurrence.class, io.grafeas.v1.ComplianceOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.ComplianceOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (nonCompliantFilesBuilder_ == null) { + nonCompliantFiles_ = java.util.Collections.emptyList(); + } else { + nonCompliantFiles_ = null; + nonCompliantFilesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nonComplianceReason_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrence build() { + io.grafeas.v1.ComplianceOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrence buildPartial() { + io.grafeas.v1.ComplianceOccurrence result = new io.grafeas.v1.ComplianceOccurrence(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.ComplianceOccurrence result) { + if (nonCompliantFilesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + nonCompliantFiles_ = java.util.Collections.unmodifiableList(nonCompliantFiles_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nonCompliantFiles_ = nonCompliantFiles_; + } else { + result.nonCompliantFiles_ = nonCompliantFilesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.ComplianceOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nonComplianceReason_ = nonComplianceReason_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ComplianceOccurrence) { + return mergeFrom((io.grafeas.v1.ComplianceOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ComplianceOccurrence other) { + if (other == io.grafeas.v1.ComplianceOccurrence.getDefaultInstance()) return this; + if (nonCompliantFilesBuilder_ == null) { + if (!other.nonCompliantFiles_.isEmpty()) { + if (nonCompliantFiles_.isEmpty()) { + nonCompliantFiles_ = other.nonCompliantFiles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.addAll(other.nonCompliantFiles_); + } + onChanged(); + } + } else { + if (!other.nonCompliantFiles_.isEmpty()) { + if (nonCompliantFilesBuilder_.isEmpty()) { + nonCompliantFilesBuilder_.dispose(); + nonCompliantFilesBuilder_ = null; + nonCompliantFiles_ = other.nonCompliantFiles_; + bitField0_ = (bitField0_ & ~0x00000001); + nonCompliantFilesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNonCompliantFilesFieldBuilder() : null; + } else { + nonCompliantFilesBuilder_.addAllMessages(other.nonCompliantFiles_); + } + } + } + if (!other.getNonComplianceReason().isEmpty()) { + nonComplianceReason_ = other.nonComplianceReason_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + io.grafeas.v1.NonCompliantFile m = + input.readMessage( + io.grafeas.v1.NonCompliantFile.parser(), + extensionRegistry); + if (nonCompliantFilesBuilder_ == null) { + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.add(m); + } else { + nonCompliantFilesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + nonComplianceReason_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List nonCompliantFiles_ = + java.util.Collections.emptyList(); + private void ensureNonCompliantFilesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + nonCompliantFiles_ = new java.util.ArrayList(nonCompliantFiles_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.NonCompliantFile, io.grafeas.v1.NonCompliantFile.Builder, io.grafeas.v1.NonCompliantFileOrBuilder> nonCompliantFilesBuilder_; + + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public java.util.List getNonCompliantFilesList() { + if (nonCompliantFilesBuilder_ == null) { + return java.util.Collections.unmodifiableList(nonCompliantFiles_); + } else { + return nonCompliantFilesBuilder_.getMessageList(); + } + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public int getNonCompliantFilesCount() { + if (nonCompliantFilesBuilder_ == null) { + return nonCompliantFiles_.size(); + } else { + return nonCompliantFilesBuilder_.getCount(); + } + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public io.grafeas.v1.NonCompliantFile getNonCompliantFiles(int index) { + if (nonCompliantFilesBuilder_ == null) { + return nonCompliantFiles_.get(index); + } else { + return nonCompliantFilesBuilder_.getMessage(index); + } + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder setNonCompliantFiles( + int index, io.grafeas.v1.NonCompliantFile value) { + if (nonCompliantFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.set(index, value); + onChanged(); + } else { + nonCompliantFilesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder setNonCompliantFiles( + int index, io.grafeas.v1.NonCompliantFile.Builder builderForValue) { + if (nonCompliantFilesBuilder_ == null) { + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.set(index, builderForValue.build()); + onChanged(); + } else { + nonCompliantFilesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder addNonCompliantFiles(io.grafeas.v1.NonCompliantFile value) { + if (nonCompliantFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.add(value); + onChanged(); + } else { + nonCompliantFilesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder addNonCompliantFiles( + int index, io.grafeas.v1.NonCompliantFile value) { + if (nonCompliantFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.add(index, value); + onChanged(); + } else { + nonCompliantFilesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder addNonCompliantFiles( + io.grafeas.v1.NonCompliantFile.Builder builderForValue) { + if (nonCompliantFilesBuilder_ == null) { + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.add(builderForValue.build()); + onChanged(); + } else { + nonCompliantFilesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder addNonCompliantFiles( + int index, io.grafeas.v1.NonCompliantFile.Builder builderForValue) { + if (nonCompliantFilesBuilder_ == null) { + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.add(index, builderForValue.build()); + onChanged(); + } else { + nonCompliantFilesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder addAllNonCompliantFiles( + java.lang.Iterable values) { + if (nonCompliantFilesBuilder_ == null) { + ensureNonCompliantFilesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nonCompliantFiles_); + onChanged(); + } else { + nonCompliantFilesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder clearNonCompliantFiles() { + if (nonCompliantFilesBuilder_ == null) { + nonCompliantFiles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nonCompliantFilesBuilder_.clear(); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder removeNonCompliantFiles(int index) { + if (nonCompliantFilesBuilder_ == null) { + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.remove(index); + onChanged(); + } else { + nonCompliantFilesBuilder_.remove(index); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public io.grafeas.v1.NonCompliantFile.Builder getNonCompliantFilesBuilder( + int index) { + return getNonCompliantFilesFieldBuilder().getBuilder(index); + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public io.grafeas.v1.NonCompliantFileOrBuilder getNonCompliantFilesOrBuilder( + int index) { + if (nonCompliantFilesBuilder_ == null) { + return nonCompliantFiles_.get(index); } else { + return nonCompliantFilesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public java.util.List + getNonCompliantFilesOrBuilderList() { + if (nonCompliantFilesBuilder_ != null) { + return nonCompliantFilesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nonCompliantFiles_); + } + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public io.grafeas.v1.NonCompliantFile.Builder addNonCompliantFilesBuilder() { + return getNonCompliantFilesFieldBuilder().addBuilder( + io.grafeas.v1.NonCompliantFile.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public io.grafeas.v1.NonCompliantFile.Builder addNonCompliantFilesBuilder( + int index) { + return getNonCompliantFilesFieldBuilder().addBuilder( + index, io.grafeas.v1.NonCompliantFile.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public java.util.List + getNonCompliantFilesBuilderList() { + return getNonCompliantFilesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.NonCompliantFile, io.grafeas.v1.NonCompliantFile.Builder, io.grafeas.v1.NonCompliantFileOrBuilder> + getNonCompliantFilesFieldBuilder() { + if (nonCompliantFilesBuilder_ == null) { + nonCompliantFilesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.NonCompliantFile, io.grafeas.v1.NonCompliantFile.Builder, io.grafeas.v1.NonCompliantFileOrBuilder>( + nonCompliantFiles_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + nonCompliantFiles_ = null; + } + return nonCompliantFilesBuilder_; + } + + private java.lang.Object nonComplianceReason_ = ""; + /** + * string non_compliance_reason = 3; + * @return The nonComplianceReason. + */ + public java.lang.String getNonComplianceReason() { + java.lang.Object ref = nonComplianceReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nonComplianceReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string non_compliance_reason = 3; + * @return The bytes for nonComplianceReason. + */ + public com.google.protobuf.ByteString + getNonComplianceReasonBytes() { + java.lang.Object ref = nonComplianceReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nonComplianceReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string non_compliance_reason = 3; + * @param value The nonComplianceReason to set. + * @return This builder for chaining. + */ + public Builder setNonComplianceReason( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nonComplianceReason_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string non_compliance_reason = 3; + * @return This builder for chaining. + */ + public Builder clearNonComplianceReason() { + nonComplianceReason_ = getDefaultInstance().getNonComplianceReason(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string non_compliance_reason = 3; + * @param value The bytes for nonComplianceReason to set. + * @return This builder for chaining. + */ + public Builder setNonComplianceReasonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nonComplianceReason_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceOccurrence) + private static final io.grafeas.v1.ComplianceOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceOccurrence(); + } + + public static io.grafeas.v1.ComplianceOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComplianceOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java new file mode 100644 index 000000000000..695ccc5a7661 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java @@ -0,0 +1,45 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +public interface ComplianceOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + java.util.List + getNonCompliantFilesList(); + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + io.grafeas.v1.NonCompliantFile getNonCompliantFiles(int index); + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + int getNonCompliantFilesCount(); + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + java.util.List + getNonCompliantFilesOrBuilderList(); + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + io.grafeas.v1.NonCompliantFileOrBuilder getNonCompliantFilesOrBuilder( + int index); + + /** + * string non_compliance_reason = 3; + * @return The nonComplianceReason. + */ + java.lang.String getNonComplianceReason(); + /** + * string non_compliance_reason = 3; + * @return The bytes for nonComplianceReason. + */ + com.google.protobuf.ByteString + getNonComplianceReasonBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java new file mode 100644 index 000000000000..05e789e67a8f --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java @@ -0,0 +1,931 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +/** + *
+ * Describes the CIS benchmark version that is applicable to a given OS and
+ * os version.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ComplianceVersion} + */ +public final class ComplianceVersion extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceVersion) + ComplianceVersionOrBuilder { +private static final long serialVersionUID = 0L; + // Use ComplianceVersion.newBuilder() to construct. + private ComplianceVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ComplianceVersion() { + cpeUri_ = ""; + benchmarkDocument_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ComplianceVersion(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceVersion.class, io.grafeas.v1.ComplianceVersion.Builder.class); + } + + public static final int CPE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cpeUri_ = ""; + /** + *
+   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+   * applicable to.
+   * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + @java.lang.Override + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } + } + /** + *
+   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+   * applicable to.
+   * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BENCHMARK_DOCUMENT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object benchmarkDocument_ = ""; + /** + *
+   * The name of the document that defines this benchmark, e.g. "CIS
+   * Container-Optimized OS".
+   * 
+ * + * string benchmark_document = 3; + * @return The benchmarkDocument. + */ + @java.lang.Override + public java.lang.String getBenchmarkDocument() { + java.lang.Object ref = benchmarkDocument_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + benchmarkDocument_ = s; + return s; + } + } + /** + *
+   * The name of the document that defines this benchmark, e.g. "CIS
+   * Container-Optimized OS".
+   * 
+ * + * string benchmark_document = 3; + * @return The bytes for benchmarkDocument. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBenchmarkDocumentBytes() { + java.lang.Object ref = benchmarkDocument_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + benchmarkDocument_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * The version of the benchmark. This is set to the version of the OS-specific
+   * CIS document the benchmark is defined in.
+   * 
+ * + * string version = 2; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * The version of the benchmark. This is set to the version of the OS-specific
+   * CIS document the benchmark is defined in.
+   * 
+ * + * string version = 2; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(benchmarkDocument_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, benchmarkDocument_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(benchmarkDocument_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, benchmarkDocument_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ComplianceVersion)) { + return super.equals(obj); + } + io.grafeas.v1.ComplianceVersion other = (io.grafeas.v1.ComplianceVersion) obj; + + if (!getCpeUri() + .equals(other.getCpeUri())) return false; + if (!getBenchmarkDocument() + .equals(other.getBenchmarkDocument())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCpeUri().hashCode(); + hash = (37 * hash) + BENCHMARK_DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getBenchmarkDocument().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ComplianceVersion parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceVersion parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceVersion parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceVersion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceVersion parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceVersion parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceVersion parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceVersion parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceVersion parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceVersion parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceVersion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ComplianceVersion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Describes the CIS benchmark version that is applicable to a given OS and
+   * os version.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ComplianceVersion} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceVersion) + io.grafeas.v1.ComplianceVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceVersion.class, io.grafeas.v1.ComplianceVersion.Builder.class); + } + + // Construct using io.grafeas.v1.ComplianceVersion.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cpeUri_ = ""; + benchmarkDocument_ = ""; + version_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceVersion getDefaultInstanceForType() { + return io.grafeas.v1.ComplianceVersion.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ComplianceVersion build() { + io.grafeas.v1.ComplianceVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceVersion buildPartial() { + io.grafeas.v1.ComplianceVersion result = new io.grafeas.v1.ComplianceVersion(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.ComplianceVersion result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cpeUri_ = cpeUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.benchmarkDocument_ = benchmarkDocument_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.version_ = version_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ComplianceVersion) { + return mergeFrom((io.grafeas.v1.ComplianceVersion)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ComplianceVersion other) { + if (other == io.grafeas.v1.ComplianceVersion.getDefaultInstance()) return this; + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBenchmarkDocument().isEmpty()) { + benchmarkDocument_ = other.benchmarkDocument_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: { + benchmarkDocument_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cpeUri_ = ""; + /** + *
+     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+     * applicable to.
+     * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+     * applicable to.
+     * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+     * applicable to.
+     * 
+ * + * string cpe_uri = 1; + * @param value The cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+     * applicable to.
+     * 
+ * + * string cpe_uri = 1; + * @return This builder for chaining. + */ + public Builder clearCpeUri() { + cpeUri_ = getDefaultInstance().getCpeUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+     * applicable to.
+     * 
+ * + * string cpe_uri = 1; + * @param value The bytes for cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object benchmarkDocument_ = ""; + /** + *
+     * The name of the document that defines this benchmark, e.g. "CIS
+     * Container-Optimized OS".
+     * 
+ * + * string benchmark_document = 3; + * @return The benchmarkDocument. + */ + public java.lang.String getBenchmarkDocument() { + java.lang.Object ref = benchmarkDocument_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + benchmarkDocument_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the document that defines this benchmark, e.g. "CIS
+     * Container-Optimized OS".
+     * 
+ * + * string benchmark_document = 3; + * @return The bytes for benchmarkDocument. + */ + public com.google.protobuf.ByteString + getBenchmarkDocumentBytes() { + java.lang.Object ref = benchmarkDocument_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + benchmarkDocument_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the document that defines this benchmark, e.g. "CIS
+     * Container-Optimized OS".
+     * 
+ * + * string benchmark_document = 3; + * @param value The benchmarkDocument to set. + * @return This builder for chaining. + */ + public Builder setBenchmarkDocument( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + benchmarkDocument_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The name of the document that defines this benchmark, e.g. "CIS
+     * Container-Optimized OS".
+     * 
+ * + * string benchmark_document = 3; + * @return This builder for chaining. + */ + public Builder clearBenchmarkDocument() { + benchmarkDocument_ = getDefaultInstance().getBenchmarkDocument(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The name of the document that defines this benchmark, e.g. "CIS
+     * Container-Optimized OS".
+     * 
+ * + * string benchmark_document = 3; + * @param value The bytes for benchmarkDocument to set. + * @return This builder for chaining. + */ + public Builder setBenchmarkDocumentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + benchmarkDocument_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * The version of the benchmark. This is set to the version of the OS-specific
+     * CIS document the benchmark is defined in.
+     * 
+ * + * string version = 2; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The version of the benchmark. This is set to the version of the OS-specific
+     * CIS document the benchmark is defined in.
+     * 
+ * + * string version = 2; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The version of the benchmark. This is set to the version of the OS-specific
+     * CIS document the benchmark is defined in.
+     * 
+ * + * string version = 2; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The version of the benchmark. This is set to the version of the OS-specific
+     * CIS document the benchmark is defined in.
+     * 
+ * + * string version = 2; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The version of the benchmark. This is set to the version of the OS-specific
+     * CIS document the benchmark is defined in.
+     * 
+ * + * string version = 2; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceVersion) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceVersion) + private static final io.grafeas.v1.ComplianceVersion DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceVersion(); + } + + public static io.grafeas.v1.ComplianceVersion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComplianceVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceVersion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java new file mode 100644 index 000000000000..3cdbaf8994ed --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +public interface ComplianceVersionOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceVersion) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+   * applicable to.
+   * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + java.lang.String getCpeUri(); + /** + *
+   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+   * applicable to.
+   * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + com.google.protobuf.ByteString + getCpeUriBytes(); + + /** + *
+   * The name of the document that defines this benchmark, e.g. "CIS
+   * Container-Optimized OS".
+   * 
+ * + * string benchmark_document = 3; + * @return The benchmarkDocument. + */ + java.lang.String getBenchmarkDocument(); + /** + *
+   * The name of the document that defines this benchmark, e.g. "CIS
+   * Container-Optimized OS".
+   * 
+ * + * string benchmark_document = 3; + * @return The bytes for benchmarkDocument. + */ + com.google.protobuf.ByteString + getBenchmarkDocumentBytes(); + + /** + *
+   * The version of the benchmark. This is set to the version of the OS-specific
+   * CIS document the benchmark is defined in.
+   * 
+ * + * string version = 2; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * The version of the benchmark. This is set to the version of the OS-specific
+   * CIS document the benchmark is defined in.
+   * 
+ * + * string version = 2; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java new file mode 100644 index 000000000000..aa37c98eeb01 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java @@ -0,0 +1,980 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to create a new note.
+ * 
+ * + * Protobuf type {@code grafeas.v1.CreateNoteRequest} + */ +public final class CreateNoteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.CreateNoteRequest) + CreateNoteRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateNoteRequest.newBuilder() to construct. + private CreateNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateNoteRequest() { + parent_ = ""; + noteId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateNoteRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CreateNoteRequest.class, io.grafeas.v1.CreateNoteRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the note is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the note is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTE_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object noteId_ = ""; + /** + *
+   * The ID to use for this note.
+   * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The noteId. + */ + @java.lang.Override + public java.lang.String getNoteId() { + java.lang.Object ref = noteId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteId_ = s; + return s; + } + } + /** + *
+   * The ID to use for this note.
+   * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for noteId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNoteIdBytes() { + java.lang.Object ref = noteId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + noteId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTE_FIELD_NUMBER = 3; + private io.grafeas.v1.Note note_; + /** + *
+   * The note to create.
+   * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the note field is set. + */ + @java.lang.Override + public boolean hasNote() { + return note_ != null; + } + /** + *
+   * The note to create.
+   * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The note. + */ + @java.lang.Override + public io.grafeas.v1.Note getNote() { + return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; + } + /** + *
+   * The note to create.
+   * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { + return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, noteId_); + } + if (note_ != null) { + output.writeMessage(3, getNote()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, noteId_); + } + if (note_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getNote()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.CreateNoteRequest)) { + return super.equals(obj); + } + io.grafeas.v1.CreateNoteRequest other = (io.grafeas.v1.CreateNoteRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getNoteId() + .equals(other.getNoteId())) return false; + if (hasNote() != other.hasNote()) return false; + if (hasNote()) { + if (!getNote() + .equals(other.getNote())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + NOTE_ID_FIELD_NUMBER; + hash = (53 * hash) + getNoteId().hashCode(); + if (hasNote()) { + hash = (37 * hash) + NOTE_FIELD_NUMBER; + hash = (53 * hash) + getNote().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.CreateNoteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CreateNoteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.CreateNoteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.CreateNoteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to create a new note.
+   * 
+ * + * Protobuf type {@code grafeas.v1.CreateNoteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.CreateNoteRequest) + io.grafeas.v1.CreateNoteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CreateNoteRequest.class, io.grafeas.v1.CreateNoteRequest.Builder.class); + } + + // Construct using io.grafeas.v1.CreateNoteRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + noteId_ = ""; + note_ = null; + if (noteBuilder_ != null) { + noteBuilder_.dispose(); + noteBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.CreateNoteRequest getDefaultInstanceForType() { + return io.grafeas.v1.CreateNoteRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.CreateNoteRequest build() { + io.grafeas.v1.CreateNoteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.CreateNoteRequest buildPartial() { + io.grafeas.v1.CreateNoteRequest result = new io.grafeas.v1.CreateNoteRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.CreateNoteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.noteId_ = noteId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.note_ = noteBuilder_ == null + ? note_ + : noteBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.CreateNoteRequest) { + return mergeFrom((io.grafeas.v1.CreateNoteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.CreateNoteRequest other) { + if (other == io.grafeas.v1.CreateNoteRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getNoteId().isEmpty()) { + noteId_ = other.noteId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasNote()) { + mergeNote(other.getNote()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + noteId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getNoteFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the note is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the note is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the note is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the note is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the note is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object noteId_ = ""; + /** + *
+     * The ID to use for this note.
+     * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The noteId. + */ + public java.lang.String getNoteId() { + java.lang.Object ref = noteId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID to use for this note.
+     * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for noteId. + */ + public com.google.protobuf.ByteString + getNoteIdBytes() { + java.lang.Object ref = noteId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + noteId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID to use for this note.
+     * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The noteId to set. + * @return This builder for chaining. + */ + public Builder setNoteId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + noteId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The ID to use for this note.
+     * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearNoteId() { + noteId_ = getDefaultInstance().getNoteId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The ID to use for this note.
+     * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for noteId to set. + * @return This builder for chaining. + */ + public Builder setNoteIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + noteId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.grafeas.v1.Note note_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> noteBuilder_; + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the note field is set. + */ + public boolean hasNote() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The note. + */ + public io.grafeas.v1.Note getNote() { + if (noteBuilder_ == null) { + return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; + } else { + return noteBuilder_.getMessage(); + } + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNote(io.grafeas.v1.Note value) { + if (noteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + note_ = value; + } else { + noteBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNote( + io.grafeas.v1.Note.Builder builderForValue) { + if (noteBuilder_ == null) { + note_ = builderForValue.build(); + } else { + noteBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeNote(io.grafeas.v1.Note value) { + if (noteBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + note_ != null && + note_ != io.grafeas.v1.Note.getDefaultInstance()) { + getNoteBuilder().mergeFrom(value); + } else { + note_ = value; + } + } else { + noteBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearNote() { + bitField0_ = (bitField0_ & ~0x00000004); + note_ = null; + if (noteBuilder_ != null) { + noteBuilder_.dispose(); + noteBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Note.Builder getNoteBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNoteFieldBuilder().getBuilder(); + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { + if (noteBuilder_ != null) { + return noteBuilder_.getMessageOrBuilder(); + } else { + return note_ == null ? + io.grafeas.v1.Note.getDefaultInstance() : note_; + } + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> + getNoteFieldBuilder() { + if (noteBuilder_ == null) { + noteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( + getNote(), + getParentForChildren(), + isClean()); + note_ = null; + } + return noteBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.CreateNoteRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.CreateNoteRequest) + private static final io.grafeas.v1.CreateNoteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.CreateNoteRequest(); + } + + public static io.grafeas.v1.CreateNoteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNoteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.CreateNoteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java new file mode 100644 index 000000000000..e5c14a7948a8 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface CreateNoteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.CreateNoteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the note is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the note is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The ID to use for this note.
+   * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The noteId. + */ + java.lang.String getNoteId(); + /** + *
+   * The ID to use for this note.
+   * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for noteId. + */ + com.google.protobuf.ByteString + getNoteIdBytes(); + + /** + *
+   * The note to create.
+   * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the note field is set. + */ + boolean hasNote(); + /** + *
+   * The note to create.
+   * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The note. + */ + io.grafeas.v1.Note getNote(); + /** + *
+   * The note to create.
+   * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + io.grafeas.v1.NoteOrBuilder getNoteOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java new file mode 100644 index 000000000000..0748ea7f5513 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java @@ -0,0 +1,816 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to create a new occurrence.
+ * 
+ * + * Protobuf type {@code grafeas.v1.CreateOccurrenceRequest} + */ +public final class CreateOccurrenceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.CreateOccurrenceRequest) + CreateOccurrenceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateOccurrenceRequest.newBuilder() to construct. + private CreateOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateOccurrenceRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateOccurrenceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CreateOccurrenceRequest.class, io.grafeas.v1.CreateOccurrenceRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrence is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrence is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OCCURRENCE_FIELD_NUMBER = 2; + private io.grafeas.v1.Occurrence occurrence_; + /** + *
+   * The occurrence to create.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the occurrence field is set. + */ + @java.lang.Override + public boolean hasOccurrence() { + return occurrence_ != null; + } + /** + *
+   * The occurrence to create.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The occurrence. + */ + @java.lang.Override + public io.grafeas.v1.Occurrence getOccurrence() { + return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } + /** + *
+   * The occurrence to create.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { + return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (occurrence_ != null) { + output.writeMessage(2, getOccurrence()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (occurrence_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOccurrence()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.CreateOccurrenceRequest)) { + return super.equals(obj); + } + io.grafeas.v1.CreateOccurrenceRequest other = (io.grafeas.v1.CreateOccurrenceRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasOccurrence() != other.hasOccurrence()) return false; + if (hasOccurrence()) { + if (!getOccurrence() + .equals(other.getOccurrence())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasOccurrence()) { + hash = (37 * hash) + OCCURRENCE_FIELD_NUMBER; + hash = (53 * hash) + getOccurrence().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.CreateOccurrenceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to create a new occurrence.
+   * 
+ * + * Protobuf type {@code grafeas.v1.CreateOccurrenceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.CreateOccurrenceRequest) + io.grafeas.v1.CreateOccurrenceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CreateOccurrenceRequest.class, io.grafeas.v1.CreateOccurrenceRequest.Builder.class); + } + + // Construct using io.grafeas.v1.CreateOccurrenceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + occurrence_ = null; + if (occurrenceBuilder_ != null) { + occurrenceBuilder_.dispose(); + occurrenceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.CreateOccurrenceRequest getDefaultInstanceForType() { + return io.grafeas.v1.CreateOccurrenceRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.CreateOccurrenceRequest build() { + io.grafeas.v1.CreateOccurrenceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.CreateOccurrenceRequest buildPartial() { + io.grafeas.v1.CreateOccurrenceRequest result = new io.grafeas.v1.CreateOccurrenceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.CreateOccurrenceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.occurrence_ = occurrenceBuilder_ == null + ? occurrence_ + : occurrenceBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.CreateOccurrenceRequest) { + return mergeFrom((io.grafeas.v1.CreateOccurrenceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.CreateOccurrenceRequest other) { + if (other == io.grafeas.v1.CreateOccurrenceRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasOccurrence()) { + mergeOccurrence(other.getOccurrence()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getOccurrenceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrence is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrence is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrence is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrence is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrence is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.grafeas.v1.Occurrence occurrence_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrenceBuilder_; + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the occurrence field is set. + */ + public boolean hasOccurrence() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The occurrence. + */ + public io.grafeas.v1.Occurrence getOccurrence() { + if (occurrenceBuilder_ == null) { + return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } else { + return occurrenceBuilder_.getMessage(); + } + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOccurrence(io.grafeas.v1.Occurrence value) { + if (occurrenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + occurrence_ = value; + } else { + occurrenceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOccurrence( + io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrenceBuilder_ == null) { + occurrence_ = builderForValue.build(); + } else { + occurrenceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeOccurrence(io.grafeas.v1.Occurrence value) { + if (occurrenceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + occurrence_ != null && + occurrence_ != io.grafeas.v1.Occurrence.getDefaultInstance()) { + getOccurrenceBuilder().mergeFrom(value); + } else { + occurrence_ = value; + } + } else { + occurrenceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearOccurrence() { + bitField0_ = (bitField0_ & ~0x00000002); + occurrence_ = null; + if (occurrenceBuilder_ != null) { + occurrenceBuilder_.dispose(); + occurrenceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Occurrence.Builder getOccurrenceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOccurrenceFieldBuilder().getBuilder(); + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { + if (occurrenceBuilder_ != null) { + return occurrenceBuilder_.getMessageOrBuilder(); + } else { + return occurrence_ == null ? + io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> + getOccurrenceFieldBuilder() { + if (occurrenceBuilder_ == null) { + occurrenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( + getOccurrence(), + getParentForChildren(), + isClean()); + occurrence_ = null; + } + return occurrenceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.CreateOccurrenceRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.CreateOccurrenceRequest) + private static final io.grafeas.v1.CreateOccurrenceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.CreateOccurrenceRequest(); + } + + public static io.grafeas.v1.CreateOccurrenceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateOccurrenceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.CreateOccurrenceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java new file mode 100644 index 000000000000..6e3a891dbb49 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface CreateOccurrenceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.CreateOccurrenceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrence is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrence is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The occurrence to create.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the occurrence field is set. + */ + boolean hasOccurrence(); + /** + *
+   * The occurrence to create.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The occurrence. + */ + io.grafeas.v1.Occurrence getOccurrence(); + /** + *
+   * The occurrence to create.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java new file mode 100644 index 000000000000..f8cbe4710cbd --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java @@ -0,0 +1,1257 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/dsse_attestation.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.DSSEAttestationNote} + */ +public final class DSSEAttestationNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DSSEAttestationNote) + DSSEAttestationNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use DSSEAttestationNote.newBuilder() to construct. + private DSSEAttestationNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DSSEAttestationNote() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DSSEAttestationNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DSSEAttestationNote.class, io.grafeas.v1.DSSEAttestationNote.Builder.class); + } + + public interface DSSEHintOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DSSEAttestationNote.DSSEHint) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "cloudbuild-prod".
+     * 
+ * + * string human_readable_name = 1; + * @return The humanReadableName. + */ + java.lang.String getHumanReadableName(); + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "cloudbuild-prod".
+     * 
+ * + * string human_readable_name = 1; + * @return The bytes for humanReadableName. + */ + com.google.protobuf.ByteString + getHumanReadableNameBytes(); + } + /** + *
+   * This submessage provides human-readable hints about the purpose of the
+   * authority. Because the name of a note acts as its resource reference, it is
+   * important to disambiguate the canonical name of the Note (which might be a
+   * UUID for security purposes) from "readable" names more suitable for debug
+   * output. Note that these hints should not be used to look up authorities in
+   * security sensitive contexts, such as when looking up attestations to
+   * verify.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DSSEAttestationNote.DSSEHint} + */ + public static final class DSSEHint extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DSSEAttestationNote.DSSEHint) + DSSEHintOrBuilder { + private static final long serialVersionUID = 0L; + // Use DSSEHint.newBuilder() to construct. + private DSSEHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DSSEHint() { + humanReadableName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DSSEHint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DSSEAttestationNote.DSSEHint.class, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder.class); + } + + public static final int HUMAN_READABLE_NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object humanReadableName_ = ""; + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "cloudbuild-prod".
+     * 
+ * + * string human_readable_name = 1; + * @return The humanReadableName. + */ + @java.lang.Override + public java.lang.String getHumanReadableName() { + java.lang.Object ref = humanReadableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + humanReadableName_ = s; + return s; + } + } + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "cloudbuild-prod".
+     * 
+ * + * string human_readable_name = 1; + * @return The bytes for humanReadableName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHumanReadableNameBytes() { + java.lang.Object ref = humanReadableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + humanReadableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, humanReadableName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, humanReadableName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DSSEAttestationNote.DSSEHint)) { + return super.equals(obj); + } + io.grafeas.v1.DSSEAttestationNote.DSSEHint other = (io.grafeas.v1.DSSEAttestationNote.DSSEHint) obj; + + if (!getHumanReadableName() + .equals(other.getHumanReadableName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HUMAN_READABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getHumanReadableName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DSSEAttestationNote.DSSEHint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * This submessage provides human-readable hints about the purpose of the
+     * authority. Because the name of a note acts as its resource reference, it is
+     * important to disambiguate the canonical name of the Note (which might be a
+     * UUID for security purposes) from "readable" names more suitable for debug
+     * output. Note that these hints should not be used to look up authorities in
+     * security sensitive contexts, such as when looking up attestations to
+     * verify.
+     * 
+ * + * Protobuf type {@code grafeas.v1.DSSEAttestationNote.DSSEHint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DSSEAttestationNote.DSSEHint) + io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DSSEAttestationNote.DSSEHint.class, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder.class); + } + + // Construct using io.grafeas.v1.DSSEAttestationNote.DSSEHint.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + humanReadableName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote.DSSEHint getDefaultInstanceForType() { + return io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote.DSSEHint build() { + io.grafeas.v1.DSSEAttestationNote.DSSEHint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote.DSSEHint buildPartial() { + io.grafeas.v1.DSSEAttestationNote.DSSEHint result = new io.grafeas.v1.DSSEAttestationNote.DSSEHint(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.DSSEAttestationNote.DSSEHint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.humanReadableName_ = humanReadableName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DSSEAttestationNote.DSSEHint) { + return mergeFrom((io.grafeas.v1.DSSEAttestationNote.DSSEHint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DSSEAttestationNote.DSSEHint other) { + if (other == io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance()) return this; + if (!other.getHumanReadableName().isEmpty()) { + humanReadableName_ = other.humanReadableName_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + humanReadableName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object humanReadableName_ = ""; + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "cloudbuild-prod".
+       * 
+ * + * string human_readable_name = 1; + * @return The humanReadableName. + */ + public java.lang.String getHumanReadableName() { + java.lang.Object ref = humanReadableName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + humanReadableName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "cloudbuild-prod".
+       * 
+ * + * string human_readable_name = 1; + * @return The bytes for humanReadableName. + */ + public com.google.protobuf.ByteString + getHumanReadableNameBytes() { + java.lang.Object ref = humanReadableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + humanReadableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "cloudbuild-prod".
+       * 
+ * + * string human_readable_name = 1; + * @param value The humanReadableName to set. + * @return This builder for chaining. + */ + public Builder setHumanReadableName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + humanReadableName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "cloudbuild-prod".
+       * 
+ * + * string human_readable_name = 1; + * @return This builder for chaining. + */ + public Builder clearHumanReadableName() { + humanReadableName_ = getDefaultInstance().getHumanReadableName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "cloudbuild-prod".
+       * 
+ * + * string human_readable_name = 1; + * @param value The bytes for humanReadableName to set. + * @return This builder for chaining. + */ + public Builder setHumanReadableNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + humanReadableName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DSSEAttestationNote.DSSEHint) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DSSEAttestationNote.DSSEHint) + private static final io.grafeas.v1.DSSEAttestationNote.DSSEHint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DSSEAttestationNote.DSSEHint(); + } + + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DSSEHint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote.DSSEHint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int HINT_FIELD_NUMBER = 1; + private io.grafeas.v1.DSSEAttestationNote.DSSEHint hint_; + /** + *
+   * DSSEHint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + * @return Whether the hint field is set. + */ + @java.lang.Override + public boolean hasHint() { + return hint_ != null; + } + /** + *
+   * DSSEHint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + * @return The hint. + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote.DSSEHint getHint() { + return hint_ == null ? io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; + } + /** + *
+   * DSSEHint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder getHintOrBuilder() { + return hint_ == null ? io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (hint_ != null) { + output.writeMessage(1, getHint()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (hint_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getHint()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DSSEAttestationNote)) { + return super.equals(obj); + } + io.grafeas.v1.DSSEAttestationNote other = (io.grafeas.v1.DSSEAttestationNote) obj; + + if (hasHint() != other.hasHint()) return false; + if (hasHint()) { + if (!getHint() + .equals(other.getHint())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHint()) { + hash = (37 * hash) + HINT_FIELD_NUMBER; + hash = (53 * hash) + getHint().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DSSEAttestationNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.DSSEAttestationNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DSSEAttestationNote) + io.grafeas.v1.DSSEAttestationNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DSSEAttestationNote.class, io.grafeas.v1.DSSEAttestationNote.Builder.class); + } + + // Construct using io.grafeas.v1.DSSEAttestationNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + hint_ = null; + if (hintBuilder_ != null) { + hintBuilder_.dispose(); + hintBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote getDefaultInstanceForType() { + return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote build() { + io.grafeas.v1.DSSEAttestationNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote buildPartial() { + io.grafeas.v1.DSSEAttestationNote result = new io.grafeas.v1.DSSEAttestationNote(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.DSSEAttestationNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.hint_ = hintBuilder_ == null + ? hint_ + : hintBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DSSEAttestationNote) { + return mergeFrom((io.grafeas.v1.DSSEAttestationNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DSSEAttestationNote other) { + if (other == io.grafeas.v1.DSSEAttestationNote.getDefaultInstance()) return this; + if (other.hasHint()) { + mergeHint(other.getHint()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getHintFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.DSSEAttestationNote.DSSEHint hint_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationNote.DSSEHint, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder, io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder> hintBuilder_; + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + * @return Whether the hint field is set. + */ + public boolean hasHint() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + * @return The hint. + */ + public io.grafeas.v1.DSSEAttestationNote.DSSEHint getHint() { + if (hintBuilder_ == null) { + return hint_ == null ? io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; + } else { + return hintBuilder_.getMessage(); + } + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + public Builder setHint(io.grafeas.v1.DSSEAttestationNote.DSSEHint value) { + if (hintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hint_ = value; + } else { + hintBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + public Builder setHint( + io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder builderForValue) { + if (hintBuilder_ == null) { + hint_ = builderForValue.build(); + } else { + hintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + public Builder mergeHint(io.grafeas.v1.DSSEAttestationNote.DSSEHint value) { + if (hintBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + hint_ != null && + hint_ != io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance()) { + getHintBuilder().mergeFrom(value); + } else { + hint_ = value; + } + } else { + hintBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + public Builder clearHint() { + bitField0_ = (bitField0_ & ~0x00000001); + hint_ = null; + if (hintBuilder_ != null) { + hintBuilder_.dispose(); + hintBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + public io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder getHintBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHintFieldBuilder().getBuilder(); + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + public io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder getHintOrBuilder() { + if (hintBuilder_ != null) { + return hintBuilder_.getMessageOrBuilder(); + } else { + return hint_ == null ? + io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; + } + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationNote.DSSEHint, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder, io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder> + getHintFieldBuilder() { + if (hintBuilder_ == null) { + hintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationNote.DSSEHint, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder, io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder>( + getHint(), + getParentForChildren(), + isClean()); + hint_ = null; + } + return hintBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DSSEAttestationNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DSSEAttestationNote) + private static final io.grafeas.v1.DSSEAttestationNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DSSEAttestationNote(); + } + + public static io.grafeas.v1.DSSEAttestationNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DSSEAttestationNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java new file mode 100644 index 000000000000..a117798b32fc --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/dsse_attestation.proto + +package io.grafeas.v1; + +public interface DSSEAttestationNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DSSEAttestationNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * DSSEHint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + * @return Whether the hint field is set. + */ + boolean hasHint(); + /** + *
+   * DSSEHint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + * @return The hint. + */ + io.grafeas.v1.DSSEAttestationNote.DSSEHint getHint(); + /** + *
+   * DSSEHint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder getHintOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java new file mode 100644 index 000000000000..4228d6b0b59c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java @@ -0,0 +1,941 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/dsse_attestation.proto + +package io.grafeas.v1; + +/** + *
+ * Deprecated. Prefer to use a regular Occurrence, and populate the
+ * Envelope at the top level of the Occurrence.
+ * 
+ * + * Protobuf type {@code grafeas.v1.DSSEAttestationOccurrence} + */ +public final class DSSEAttestationOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DSSEAttestationOccurrence) + DSSEAttestationOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use DSSEAttestationOccurrence.newBuilder() to construct. + private DSSEAttestationOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DSSEAttestationOccurrence() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DSSEAttestationOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DSSEAttestationOccurrence.class, io.grafeas.v1.DSSEAttestationOccurrence.Builder.class); + } + + private int decodedPayloadCase_ = 0; + private java.lang.Object decodedPayload_; + public enum DecodedPayloadCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STATEMENT(2), + DECODEDPAYLOAD_NOT_SET(0); + private final int value; + private DecodedPayloadCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DecodedPayloadCase valueOf(int value) { + return forNumber(value); + } + + public static DecodedPayloadCase forNumber(int value) { + switch (value) { + case 2: return STATEMENT; + case 0: return DECODEDPAYLOAD_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DecodedPayloadCase + getDecodedPayloadCase() { + return DecodedPayloadCase.forNumber( + decodedPayloadCase_); + } + + public static final int ENVELOPE_FIELD_NUMBER = 1; + private io.grafeas.v1.Envelope envelope_; + /** + *
+   * If doing something security critical, make sure to verify the signatures in
+   * this metadata.
+   * 
+ * + * .grafeas.v1.Envelope envelope = 1; + * @return Whether the envelope field is set. + */ + @java.lang.Override + public boolean hasEnvelope() { + return envelope_ != null; + } + /** + *
+   * If doing something security critical, make sure to verify the signatures in
+   * this metadata.
+   * 
+ * + * .grafeas.v1.Envelope envelope = 1; + * @return The envelope. + */ + @java.lang.Override + public io.grafeas.v1.Envelope getEnvelope() { + return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } + /** + *
+   * If doing something security critical, make sure to verify the signatures in
+   * this metadata.
+   * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + @java.lang.Override + public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { + return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } + + public static final int STATEMENT_FIELD_NUMBER = 2; + /** + * .grafeas.v1.InTotoStatement statement = 2; + * @return Whether the statement field is set. + */ + @java.lang.Override + public boolean hasStatement() { + return decodedPayloadCase_ == 2; + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + * @return The statement. + */ + @java.lang.Override + public io.grafeas.v1.InTotoStatement getStatement() { + if (decodedPayloadCase_ == 2) { + return (io.grafeas.v1.InTotoStatement) decodedPayload_; + } + return io.grafeas.v1.InTotoStatement.getDefaultInstance(); + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + @java.lang.Override + public io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder() { + if (decodedPayloadCase_ == 2) { + return (io.grafeas.v1.InTotoStatement) decodedPayload_; + } + return io.grafeas.v1.InTotoStatement.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (envelope_ != null) { + output.writeMessage(1, getEnvelope()); + } + if (decodedPayloadCase_ == 2) { + output.writeMessage(2, (io.grafeas.v1.InTotoStatement) decodedPayload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (envelope_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getEnvelope()); + } + if (decodedPayloadCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (io.grafeas.v1.InTotoStatement) decodedPayload_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DSSEAttestationOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.DSSEAttestationOccurrence other = (io.grafeas.v1.DSSEAttestationOccurrence) obj; + + if (hasEnvelope() != other.hasEnvelope()) return false; + if (hasEnvelope()) { + if (!getEnvelope() + .equals(other.getEnvelope())) return false; + } + if (!getDecodedPayloadCase().equals(other.getDecodedPayloadCase())) return false; + switch (decodedPayloadCase_) { + case 2: + if (!getStatement() + .equals(other.getStatement())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEnvelope()) { + hash = (37 * hash) + ENVELOPE_FIELD_NUMBER; + hash = (53 * hash) + getEnvelope().hashCode(); + } + switch (decodedPayloadCase_) { + case 2: + hash = (37 * hash) + STATEMENT_FIELD_NUMBER; + hash = (53 * hash) + getStatement().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DSSEAttestationOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Deprecated. Prefer to use a regular Occurrence, and populate the
+   * Envelope at the top level of the Occurrence.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DSSEAttestationOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DSSEAttestationOccurrence) + io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DSSEAttestationOccurrence.class, io.grafeas.v1.DSSEAttestationOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.DSSEAttestationOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + envelope_ = null; + if (envelopeBuilder_ != null) { + envelopeBuilder_.dispose(); + envelopeBuilder_ = null; + } + if (statementBuilder_ != null) { + statementBuilder_.clear(); + } + decodedPayloadCase_ = 0; + decodedPayload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrence build() { + io.grafeas.v1.DSSEAttestationOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrence buildPartial() { + io.grafeas.v1.DSSEAttestationOccurrence result = new io.grafeas.v1.DSSEAttestationOccurrence(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.DSSEAttestationOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.envelope_ = envelopeBuilder_ == null + ? envelope_ + : envelopeBuilder_.build(); + } + } + + private void buildPartialOneofs(io.grafeas.v1.DSSEAttestationOccurrence result) { + result.decodedPayloadCase_ = decodedPayloadCase_; + result.decodedPayload_ = this.decodedPayload_; + if (decodedPayloadCase_ == 2 && + statementBuilder_ != null) { + result.decodedPayload_ = statementBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DSSEAttestationOccurrence) { + return mergeFrom((io.grafeas.v1.DSSEAttestationOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DSSEAttestationOccurrence other) { + if (other == io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance()) return this; + if (other.hasEnvelope()) { + mergeEnvelope(other.getEnvelope()); + } + switch (other.getDecodedPayloadCase()) { + case STATEMENT: { + mergeStatement(other.getStatement()); + break; + } + case DECODEDPAYLOAD_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getEnvelopeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getStatementFieldBuilder().getBuilder(), + extensionRegistry); + decodedPayloadCase_ = 2; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int decodedPayloadCase_ = 0; + private java.lang.Object decodedPayload_; + public DecodedPayloadCase + getDecodedPayloadCase() { + return DecodedPayloadCase.forNumber( + decodedPayloadCase_); + } + + public Builder clearDecodedPayload() { + decodedPayloadCase_ = 0; + decodedPayload_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private io.grafeas.v1.Envelope envelope_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> envelopeBuilder_; + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + * @return Whether the envelope field is set. + */ + public boolean hasEnvelope() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + * @return The envelope. + */ + public io.grafeas.v1.Envelope getEnvelope() { + if (envelopeBuilder_ == null) { + return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } else { + return envelopeBuilder_.getMessage(); + } + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + public Builder setEnvelope(io.grafeas.v1.Envelope value) { + if (envelopeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + envelope_ = value; + } else { + envelopeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + public Builder setEnvelope( + io.grafeas.v1.Envelope.Builder builderForValue) { + if (envelopeBuilder_ == null) { + envelope_ = builderForValue.build(); + } else { + envelopeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + public Builder mergeEnvelope(io.grafeas.v1.Envelope value) { + if (envelopeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + envelope_ != null && + envelope_ != io.grafeas.v1.Envelope.getDefaultInstance()) { + getEnvelopeBuilder().mergeFrom(value); + } else { + envelope_ = value; + } + } else { + envelopeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + public Builder clearEnvelope() { + bitField0_ = (bitField0_ & ~0x00000001); + envelope_ = null; + if (envelopeBuilder_ != null) { + envelopeBuilder_.dispose(); + envelopeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + public io.grafeas.v1.Envelope.Builder getEnvelopeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getEnvelopeFieldBuilder().getBuilder(); + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { + if (envelopeBuilder_ != null) { + return envelopeBuilder_.getMessageOrBuilder(); + } else { + return envelope_ == null ? + io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> + getEnvelopeFieldBuilder() { + if (envelopeBuilder_ == null) { + envelopeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder>( + getEnvelope(), + getParentForChildren(), + isClean()); + envelope_ = null; + } + return envelopeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> statementBuilder_; + /** + * .grafeas.v1.InTotoStatement statement = 2; + * @return Whether the statement field is set. + */ + @java.lang.Override + public boolean hasStatement() { + return decodedPayloadCase_ == 2; + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + * @return The statement. + */ + @java.lang.Override + public io.grafeas.v1.InTotoStatement getStatement() { + if (statementBuilder_ == null) { + if (decodedPayloadCase_ == 2) { + return (io.grafeas.v1.InTotoStatement) decodedPayload_; + } + return io.grafeas.v1.InTotoStatement.getDefaultInstance(); + } else { + if (decodedPayloadCase_ == 2) { + return statementBuilder_.getMessage(); + } + return io.grafeas.v1.InTotoStatement.getDefaultInstance(); + } + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + public Builder setStatement(io.grafeas.v1.InTotoStatement value) { + if (statementBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + decodedPayload_ = value; + onChanged(); + } else { + statementBuilder_.setMessage(value); + } + decodedPayloadCase_ = 2; + return this; + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + public Builder setStatement( + io.grafeas.v1.InTotoStatement.Builder builderForValue) { + if (statementBuilder_ == null) { + decodedPayload_ = builderForValue.build(); + onChanged(); + } else { + statementBuilder_.setMessage(builderForValue.build()); + } + decodedPayloadCase_ = 2; + return this; + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + public Builder mergeStatement(io.grafeas.v1.InTotoStatement value) { + if (statementBuilder_ == null) { + if (decodedPayloadCase_ == 2 && + decodedPayload_ != io.grafeas.v1.InTotoStatement.getDefaultInstance()) { + decodedPayload_ = io.grafeas.v1.InTotoStatement.newBuilder((io.grafeas.v1.InTotoStatement) decodedPayload_) + .mergeFrom(value).buildPartial(); + } else { + decodedPayload_ = value; + } + onChanged(); + } else { + if (decodedPayloadCase_ == 2) { + statementBuilder_.mergeFrom(value); + } else { + statementBuilder_.setMessage(value); + } + } + decodedPayloadCase_ = 2; + return this; + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + public Builder clearStatement() { + if (statementBuilder_ == null) { + if (decodedPayloadCase_ == 2) { + decodedPayloadCase_ = 0; + decodedPayload_ = null; + onChanged(); + } + } else { + if (decodedPayloadCase_ == 2) { + decodedPayloadCase_ = 0; + decodedPayload_ = null; + } + statementBuilder_.clear(); + } + return this; + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + public io.grafeas.v1.InTotoStatement.Builder getStatementBuilder() { + return getStatementFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + @java.lang.Override + public io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder() { + if ((decodedPayloadCase_ == 2) && (statementBuilder_ != null)) { + return statementBuilder_.getMessageOrBuilder(); + } else { + if (decodedPayloadCase_ == 2) { + return (io.grafeas.v1.InTotoStatement) decodedPayload_; + } + return io.grafeas.v1.InTotoStatement.getDefaultInstance(); + } + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> + getStatementFieldBuilder() { + if (statementBuilder_ == null) { + if (!(decodedPayloadCase_ == 2)) { + decodedPayload_ = io.grafeas.v1.InTotoStatement.getDefaultInstance(); + } + statementBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder>( + (io.grafeas.v1.InTotoStatement) decodedPayload_, + getParentForChildren(), + isClean()); + decodedPayload_ = null; + } + decodedPayloadCase_ = 2; + onChanged(); + return statementBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DSSEAttestationOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DSSEAttestationOccurrence) + private static final io.grafeas.v1.DSSEAttestationOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DSSEAttestationOccurrence(); + } + + public static io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DSSEAttestationOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java new file mode 100644 index 000000000000..0ef0cb2ac550 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/dsse_attestation.proto + +package io.grafeas.v1; + +public interface DSSEAttestationOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DSSEAttestationOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If doing something security critical, make sure to verify the signatures in
+   * this metadata.
+   * 
+ * + * .grafeas.v1.Envelope envelope = 1; + * @return Whether the envelope field is set. + */ + boolean hasEnvelope(); + /** + *
+   * If doing something security critical, make sure to verify the signatures in
+   * this metadata.
+   * 
+ * + * .grafeas.v1.Envelope envelope = 1; + * @return The envelope. + */ + io.grafeas.v1.Envelope getEnvelope(); + /** + *
+   * If doing something security critical, make sure to verify the signatures in
+   * this metadata.
+   * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder(); + + /** + * .grafeas.v1.InTotoStatement statement = 2; + * @return Whether the statement field is set. + */ + boolean hasStatement(); + /** + * .grafeas.v1.InTotoStatement statement = 2; + * @return The statement. + */ + io.grafeas.v1.InTotoStatement getStatement(); + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder(); + + public io.grafeas.v1.DSSEAttestationOccurrence.DecodedPayloadCase getDecodedPayloadCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java new file mode 100644 index 000000000000..0436291b80b9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java @@ -0,0 +1,587 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to delete a note.
+ * 
+ * + * Protobuf type {@code grafeas.v1.DeleteNoteRequest} + */ +public final class DeleteNoteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DeleteNoteRequest) + DeleteNoteRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteNoteRequest.newBuilder() to construct. + private DeleteNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteNoteRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteNoteRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeleteNoteRequest.class, io.grafeas.v1.DeleteNoteRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DeleteNoteRequest)) { + return super.equals(obj); + } + io.grafeas.v1.DeleteNoteRequest other = (io.grafeas.v1.DeleteNoteRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeleteNoteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeleteNoteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DeleteNoteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to delete a note.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DeleteNoteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DeleteNoteRequest) + io.grafeas.v1.DeleteNoteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeleteNoteRequest.class, io.grafeas.v1.DeleteNoteRequest.Builder.class); + } + + // Construct using io.grafeas.v1.DeleteNoteRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DeleteNoteRequest getDefaultInstanceForType() { + return io.grafeas.v1.DeleteNoteRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DeleteNoteRequest build() { + io.grafeas.v1.DeleteNoteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DeleteNoteRequest buildPartial() { + io.grafeas.v1.DeleteNoteRequest result = new io.grafeas.v1.DeleteNoteRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.DeleteNoteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DeleteNoteRequest) { + return mergeFrom((io.grafeas.v1.DeleteNoteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DeleteNoteRequest other) { + if (other == io.grafeas.v1.DeleteNoteRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DeleteNoteRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DeleteNoteRequest) + private static final io.grafeas.v1.DeleteNoteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DeleteNoteRequest(); + } + + public static io.grafeas.v1.DeleteNoteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteNoteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DeleteNoteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java new file mode 100644 index 000000000000..f7cdc3fd761a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface DeleteNoteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DeleteNoteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java new file mode 100644 index 000000000000..cf4d61bfad6e --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java @@ -0,0 +1,587 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to delete an occurrence.
+ * 
+ * + * Protobuf type {@code grafeas.v1.DeleteOccurrenceRequest} + */ +public final class DeleteOccurrenceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DeleteOccurrenceRequest) + DeleteOccurrenceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteOccurrenceRequest.newBuilder() to construct. + private DeleteOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteOccurrenceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteOccurrenceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeleteOccurrenceRequest.class, io.grafeas.v1.DeleteOccurrenceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DeleteOccurrenceRequest)) { + return super.equals(obj); + } + io.grafeas.v1.DeleteOccurrenceRequest other = (io.grafeas.v1.DeleteOccurrenceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DeleteOccurrenceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to delete an occurrence.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DeleteOccurrenceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DeleteOccurrenceRequest) + io.grafeas.v1.DeleteOccurrenceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeleteOccurrenceRequest.class, io.grafeas.v1.DeleteOccurrenceRequest.Builder.class); + } + + // Construct using io.grafeas.v1.DeleteOccurrenceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DeleteOccurrenceRequest getDefaultInstanceForType() { + return io.grafeas.v1.DeleteOccurrenceRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DeleteOccurrenceRequest build() { + io.grafeas.v1.DeleteOccurrenceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DeleteOccurrenceRequest buildPartial() { + io.grafeas.v1.DeleteOccurrenceRequest result = new io.grafeas.v1.DeleteOccurrenceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.DeleteOccurrenceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DeleteOccurrenceRequest) { + return mergeFrom((io.grafeas.v1.DeleteOccurrenceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DeleteOccurrenceRequest other) { + if (other == io.grafeas.v1.DeleteOccurrenceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DeleteOccurrenceRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DeleteOccurrenceRequest) + private static final io.grafeas.v1.DeleteOccurrenceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DeleteOccurrenceRequest(); + } + + public static io.grafeas.v1.DeleteOccurrenceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteOccurrenceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DeleteOccurrenceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java new file mode 100644 index 000000000000..755eafdee791 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface DeleteOccurrenceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DeleteOccurrenceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java new file mode 100644 index 000000000000..a74f9380efe2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/deployment.proto + +package io.grafeas.v1; + +public final class Deployment { + private Deployment() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DeploymentNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DeploymentOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033grafeas/v1/deployment.proto\022\ngrafeas.v" + + "1\032\037google/protobuf/timestamp.proto\"&\n\016De" + + "ploymentNote\022\024\n\014resource_uri\030\001 \003(\t\"\307\002\n\024D" + + "eploymentOccurrence\022\022\n\nuser_email\030\001 \001(\t\022" + + "/\n\013deploy_time\030\002 \001(\0132\032.google.protobuf.T" + + "imestamp\0221\n\rundeploy_time\030\003 \001(\0132\032.google" + + ".protobuf.Timestamp\022\016\n\006config\030\004 \001(\t\022\017\n\007a" + + "ddress\030\005 \001(\t\022\024\n\014resource_uri\030\006 \003(\t\022;\n\010pl" + + "atform\030\007 \001(\0162).grafeas.v1.DeploymentOccu" + + "rrence.Platform\"C\n\010Platform\022\030\n\024PLATFORM_" + + "UNSPECIFIED\020\000\022\007\n\003GKE\020\001\022\010\n\004FLEX\020\002\022\n\n\006CUST" + + "OM\020\003BQ\n\rio.grafeas.v1P\001Z8google.golang.o" + + "rg/genproto/googleapis/grafeas/v1;grafea" + + "s\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_grafeas_v1_DeploymentNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DeploymentNote_descriptor, + new java.lang.String[] { "ResourceUri", }); + internal_static_grafeas_v1_DeploymentOccurrence_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DeploymentOccurrence_descriptor, + new java.lang.String[] { "UserEmail", "DeployTime", "UndeployTime", "Config", "Address", "ResourceUri", "Platform", }); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java new file mode 100644 index 000000000000..ad814299c958 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java @@ -0,0 +1,653 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/deployment.proto + +package io.grafeas.v1; + +/** + *
+ * An artifact that can be deployed in some runtime.
+ * 
+ * + * Protobuf type {@code grafeas.v1.DeploymentNote} + */ +public final class DeploymentNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DeploymentNote) + DeploymentNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeploymentNote.newBuilder() to construct. + private DeploymentNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeploymentNote() { + resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeploymentNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeploymentNote.class, io.grafeas.v1.DeploymentNote.Builder.class); + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList resourceUri_; + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @return A list containing the resourceUri. + */ + public com.google.protobuf.ProtocolStringList + getResourceUriList() { + return resourceUri_; + } + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @return The count of resourceUri. + */ + public int getResourceUriCount() { + return resourceUri_.size(); + } + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @param index The index of the element to return. + * @return The resourceUri at the given index. + */ + public java.lang.String getResourceUri(int index) { + return resourceUri_.get(index); + } + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @param index The index of the value to return. + * @return The bytes of the resourceUri at the given index. + */ + public com.google.protobuf.ByteString + getResourceUriBytes(int index) { + return resourceUri_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < resourceUri_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceUri_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < resourceUri_.size(); i++) { + dataSize += computeStringSizeNoTag(resourceUri_.getRaw(i)); + } + size += dataSize; + size += 1 * getResourceUriList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DeploymentNote)) { + return super.equals(obj); + } + io.grafeas.v1.DeploymentNote other = (io.grafeas.v1.DeploymentNote) obj; + + if (!getResourceUriList() + .equals(other.getResourceUriList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResourceUriCount() > 0) { + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUriList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DeploymentNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeploymentNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeploymentNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeploymentNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeploymentNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeploymentNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeploymentNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeploymentNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeploymentNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeploymentNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeploymentNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeploymentNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DeploymentNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An artifact that can be deployed in some runtime.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DeploymentNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DeploymentNote) + io.grafeas.v1.DeploymentNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeploymentNote.class, io.grafeas.v1.DeploymentNote.Builder.class); + } + + // Construct using io.grafeas.v1.DeploymentNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DeploymentNote getDefaultInstanceForType() { + return io.grafeas.v1.DeploymentNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DeploymentNote build() { + io.grafeas.v1.DeploymentNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DeploymentNote buildPartial() { + io.grafeas.v1.DeploymentNote result = new io.grafeas.v1.DeploymentNote(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.DeploymentNote result) { + if (((bitField0_ & 0x00000001) != 0)) { + resourceUri_ = resourceUri_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resourceUri_ = resourceUri_; + } + + private void buildPartial0(io.grafeas.v1.DeploymentNote result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DeploymentNote) { + return mergeFrom((io.grafeas.v1.DeploymentNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DeploymentNote other) { + if (other == io.grafeas.v1.DeploymentNote.getDefaultInstance()) return this; + if (!other.resourceUri_.isEmpty()) { + if (resourceUri_.isEmpty()) { + resourceUri_ = other.resourceUri_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourceUriIsMutable(); + resourceUri_.addAll(other.resourceUri_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourceUriIsMutable(); + resourceUri_.add(s); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureResourceUriIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resourceUri_ = new com.google.protobuf.LazyStringArrayList(resourceUri_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @return A list containing the resourceUri. + */ + public com.google.protobuf.ProtocolStringList + getResourceUriList() { + return resourceUri_.getUnmodifiableView(); + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @return The count of resourceUri. + */ + public int getResourceUriCount() { + return resourceUri_.size(); + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @param index The index of the element to return. + * @return The resourceUri at the given index. + */ + public java.lang.String getResourceUri(int index) { + return resourceUri_.get(index); + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @param index The index of the value to return. + * @return The bytes of the resourceUri at the given index. + */ + public com.google.protobuf.ByteString + getResourceUriBytes(int index) { + return resourceUri_.getByteString(index); + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @param index The index to set the value at. + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureResourceUriIsMutable(); + resourceUri_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @param value The resourceUri to add. + * @return This builder for chaining. + */ + public Builder addResourceUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureResourceUriIsMutable(); + resourceUri_.add(value); + onChanged(); + return this; + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @param values The resourceUri to add. + * @return This builder for chaining. + */ + public Builder addAllResourceUri( + java.lang.Iterable values) { + ensureResourceUriIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, resourceUri_); + onChanged(); + return this; + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @param value The bytes of the resourceUri to add. + * @return This builder for chaining. + */ + public Builder addResourceUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureResourceUriIsMutable(); + resourceUri_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DeploymentNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DeploymentNote) + private static final io.grafeas.v1.DeploymentNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DeploymentNote(); + } + + public static io.grafeas.v1.DeploymentNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeploymentNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DeploymentNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java new file mode 100644 index 000000000000..3e512a6a1a33 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java @@ -0,0 +1,50 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/deployment.proto + +package io.grafeas.v1; + +public interface DeploymentNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DeploymentNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @return A list containing the resourceUri. + */ + java.util.List + getResourceUriList(); + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @return The count of resourceUri. + */ + int getResourceUriCount(); + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @param index The index of the element to return. + * @return The resourceUri at the given index. + */ + java.lang.String getResourceUri(int index); + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @param index The index of the value to return. + * @return The bytes of the resourceUri at the given index. + */ + com.google.protobuf.ByteString + getResourceUriBytes(int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java new file mode 100644 index 000000000000..e0a761932ed7 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java @@ -0,0 +1,1900 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/deployment.proto + +package io.grafeas.v1; + +/** + *
+ * The period during which some deployable was active in a runtime.
+ * 
+ * + * Protobuf type {@code grafeas.v1.DeploymentOccurrence} + */ +public final class DeploymentOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DeploymentOccurrence) + DeploymentOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeploymentOccurrence.newBuilder() to construct. + private DeploymentOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeploymentOccurrence() { + userEmail_ = ""; + config_ = ""; + address_ = ""; + resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + platform_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeploymentOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeploymentOccurrence.class, io.grafeas.v1.DeploymentOccurrence.Builder.class); + } + + /** + *
+   * Types of platforms.
+   * 
+ * + * Protobuf enum {@code grafeas.v1.DeploymentOccurrence.Platform} + */ + public enum Platform + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown.
+     * 
+ * + * PLATFORM_UNSPECIFIED = 0; + */ + PLATFORM_UNSPECIFIED(0), + /** + *
+     * Google Container Engine.
+     * 
+ * + * GKE = 1; + */ + GKE(1), + /** + *
+     * Google App Engine: Flexible Environment.
+     * 
+ * + * FLEX = 2; + */ + FLEX(2), + /** + *
+     * Custom user-defined platform.
+     * 
+ * + * CUSTOM = 3; + */ + CUSTOM(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unknown.
+     * 
+ * + * PLATFORM_UNSPECIFIED = 0; + */ + public static final int PLATFORM_UNSPECIFIED_VALUE = 0; + /** + *
+     * Google Container Engine.
+     * 
+ * + * GKE = 1; + */ + public static final int GKE_VALUE = 1; + /** + *
+     * Google App Engine: Flexible Environment.
+     * 
+ * + * FLEX = 2; + */ + public static final int FLEX_VALUE = 2; + /** + *
+     * Custom user-defined platform.
+     * 
+ * + * CUSTOM = 3; + */ + public static final int CUSTOM_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Platform valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Platform forNumber(int value) { + switch (value) { + case 0: return PLATFORM_UNSPECIFIED; + case 1: return GKE; + case 2: return FLEX; + case 3: return CUSTOM; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Platform> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Platform findValueByNumber(int number) { + return Platform.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.DeploymentOccurrence.getDescriptor().getEnumTypes().get(0); + } + + private static final Platform[] VALUES = values(); + + public static Platform valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Platform(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.DeploymentOccurrence.Platform) + } + + public static final int USER_EMAIL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object userEmail_ = ""; + /** + *
+   * Identity of the user that triggered this deployment.
+   * 
+ * + * string user_email = 1; + * @return The userEmail. + */ + @java.lang.Override + public java.lang.String getUserEmail() { + java.lang.Object ref = userEmail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userEmail_ = s; + return s; + } + } + /** + *
+   * Identity of the user that triggered this deployment.
+   * 
+ * + * string user_email = 1; + * @return The bytes for userEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserEmailBytes() { + java.lang.Object ref = userEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPLOY_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp deployTime_; + /** + *
+   * Required. Beginning of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + * @return Whether the deployTime field is set. + */ + @java.lang.Override + public boolean hasDeployTime() { + return deployTime_ != null; + } + /** + *
+   * Required. Beginning of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + * @return The deployTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeployTime() { + return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; + } + /** + *
+   * Required. Beginning of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder() { + return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; + } + + public static final int UNDEPLOY_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp undeployTime_; + /** + *
+   * End of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + * @return Whether the undeployTime field is set. + */ + @java.lang.Override + public boolean hasUndeployTime() { + return undeployTime_ != null; + } + /** + *
+   * End of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + * @return The undeployTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUndeployTime() { + return undeployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; + } + /** + *
+   * End of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUndeployTimeOrBuilder() { + return undeployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; + } + + public static final int CONFIG_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object config_ = ""; + /** + *
+   * Configuration used to create this deployment.
+   * 
+ * + * string config = 4; + * @return The config. + */ + @java.lang.Override + public java.lang.String getConfig() { + java.lang.Object ref = config_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + config_ = s; + return s; + } + } + /** + *
+   * Configuration used to create this deployment.
+   * 
+ * + * string config = 4; + * @return The bytes for config. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getConfigBytes() { + java.lang.Object ref = config_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + config_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDRESS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object address_ = ""; + /** + *
+   * Address of the runtime element hosting this deployment.
+   * 
+ * + * string address = 5; + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + *
+   * Address of the runtime element hosting this deployment.
+   * 
+ * + * string address = 5; + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList resourceUri_; + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @return A list containing the resourceUri. + */ + public com.google.protobuf.ProtocolStringList + getResourceUriList() { + return resourceUri_; + } + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @return The count of resourceUri. + */ + public int getResourceUriCount() { + return resourceUri_.size(); + } + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @param index The index of the element to return. + * @return The resourceUri at the given index. + */ + public java.lang.String getResourceUri(int index) { + return resourceUri_.get(index); + } + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @param index The index of the value to return. + * @return The bytes of the resourceUri at the given index. + */ + public com.google.protobuf.ByteString + getResourceUriBytes(int index) { + return resourceUri_.getByteString(index); + } + + public static final int PLATFORM_FIELD_NUMBER = 7; + private int platform_ = 0; + /** + *
+   * Platform hosting this deployment.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @return The enum numeric value on the wire for platform. + */ + @java.lang.Override public int getPlatformValue() { + return platform_; + } + /** + *
+   * Platform hosting this deployment.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @return The platform. + */ + @java.lang.Override public io.grafeas.v1.DeploymentOccurrence.Platform getPlatform() { + io.grafeas.v1.DeploymentOccurrence.Platform result = io.grafeas.v1.DeploymentOccurrence.Platform.forNumber(platform_); + return result == null ? io.grafeas.v1.DeploymentOccurrence.Platform.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userEmail_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userEmail_); + } + if (deployTime_ != null) { + output.writeMessage(2, getDeployTime()); + } + if (undeployTime_ != null) { + output.writeMessage(3, getUndeployTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, config_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, address_); + } + for (int i = 0; i < resourceUri_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, resourceUri_.getRaw(i)); + } + if (platform_ != io.grafeas.v1.DeploymentOccurrence.Platform.PLATFORM_UNSPECIFIED.getNumber()) { + output.writeEnum(7, platform_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userEmail_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userEmail_); + } + if (deployTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDeployTime()); + } + if (undeployTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUndeployTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, config_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, address_); + } + { + int dataSize = 0; + for (int i = 0; i < resourceUri_.size(); i++) { + dataSize += computeStringSizeNoTag(resourceUri_.getRaw(i)); + } + size += dataSize; + size += 1 * getResourceUriList().size(); + } + if (platform_ != io.grafeas.v1.DeploymentOccurrence.Platform.PLATFORM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, platform_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DeploymentOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.DeploymentOccurrence other = (io.grafeas.v1.DeploymentOccurrence) obj; + + if (!getUserEmail() + .equals(other.getUserEmail())) return false; + if (hasDeployTime() != other.hasDeployTime()) return false; + if (hasDeployTime()) { + if (!getDeployTime() + .equals(other.getDeployTime())) return false; + } + if (hasUndeployTime() != other.hasUndeployTime()) return false; + if (hasUndeployTime()) { + if (!getUndeployTime() + .equals(other.getUndeployTime())) return false; + } + if (!getConfig() + .equals(other.getConfig())) return false; + if (!getAddress() + .equals(other.getAddress())) return false; + if (!getResourceUriList() + .equals(other.getResourceUriList())) return false; + if (platform_ != other.platform_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getUserEmail().hashCode(); + if (hasDeployTime()) { + hash = (37 * hash) + DEPLOY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeployTime().hashCode(); + } + if (hasUndeployTime()) { + hash = (37 * hash) + UNDEPLOY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUndeployTime().hashCode(); + } + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + if (getResourceUriCount() > 0) { + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUriList().hashCode(); + } + hash = (37 * hash) + PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + platform_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeploymentOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeploymentOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DeploymentOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The period during which some deployable was active in a runtime.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DeploymentOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DeploymentOccurrence) + io.grafeas.v1.DeploymentOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeploymentOccurrence.class, io.grafeas.v1.DeploymentOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.DeploymentOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userEmail_ = ""; + deployTime_ = null; + if (deployTimeBuilder_ != null) { + deployTimeBuilder_.dispose(); + deployTimeBuilder_ = null; + } + undeployTime_ = null; + if (undeployTimeBuilder_ != null) { + undeployTimeBuilder_.dispose(); + undeployTimeBuilder_ = null; + } + config_ = ""; + address_ = ""; + resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + platform_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrence build() { + io.grafeas.v1.DeploymentOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrence buildPartial() { + io.grafeas.v1.DeploymentOccurrence result = new io.grafeas.v1.DeploymentOccurrence(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.DeploymentOccurrence result) { + if (((bitField0_ & 0x00000020) != 0)) { + resourceUri_ = resourceUri_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.resourceUri_ = resourceUri_; + } + + private void buildPartial0(io.grafeas.v1.DeploymentOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userEmail_ = userEmail_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deployTime_ = deployTimeBuilder_ == null + ? deployTime_ + : deployTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.undeployTime_ = undeployTimeBuilder_ == null + ? undeployTime_ + : undeployTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.config_ = config_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.address_ = address_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.platform_ = platform_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DeploymentOccurrence) { + return mergeFrom((io.grafeas.v1.DeploymentOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DeploymentOccurrence other) { + if (other == io.grafeas.v1.DeploymentOccurrence.getDefaultInstance()) return this; + if (!other.getUserEmail().isEmpty()) { + userEmail_ = other.userEmail_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDeployTime()) { + mergeDeployTime(other.getDeployTime()); + } + if (other.hasUndeployTime()) { + mergeUndeployTime(other.getUndeployTime()); + } + if (!other.getConfig().isEmpty()) { + config_ = other.config_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.resourceUri_.isEmpty()) { + if (resourceUri_.isEmpty()) { + resourceUri_ = other.resourceUri_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureResourceUriIsMutable(); + resourceUri_.addAll(other.resourceUri_); + } + onChanged(); + } + if (other.platform_ != 0) { + setPlatformValue(other.getPlatformValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + userEmail_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getDeployTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getUndeployTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + config_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + address_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourceUriIsMutable(); + resourceUri_.add(s); + break; + } // case 50 + case 56: { + platform_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object userEmail_ = ""; + /** + *
+     * Identity of the user that triggered this deployment.
+     * 
+ * + * string user_email = 1; + * @return The userEmail. + */ + public java.lang.String getUserEmail() { + java.lang.Object ref = userEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Identity of the user that triggered this deployment.
+     * 
+ * + * string user_email = 1; + * @return The bytes for userEmail. + */ + public com.google.protobuf.ByteString + getUserEmailBytes() { + java.lang.Object ref = userEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Identity of the user that triggered this deployment.
+     * 
+ * + * string user_email = 1; + * @param value The userEmail to set. + * @return This builder for chaining. + */ + public Builder setUserEmail( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userEmail_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Identity of the user that triggered this deployment.
+     * 
+ * + * string user_email = 1; + * @return This builder for chaining. + */ + public Builder clearUserEmail() { + userEmail_ = getDefaultInstance().getUserEmail(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Identity of the user that triggered this deployment.
+     * 
+ * + * string user_email = 1; + * @param value The bytes for userEmail to set. + * @return This builder for chaining. + */ + public Builder setUserEmailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userEmail_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp deployTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> deployTimeBuilder_; + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + * @return Whether the deployTime field is set. + */ + public boolean hasDeployTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + * @return The deployTime. + */ + public com.google.protobuf.Timestamp getDeployTime() { + if (deployTimeBuilder_ == null) { + return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; + } else { + return deployTimeBuilder_.getMessage(); + } + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + public Builder setDeployTime(com.google.protobuf.Timestamp value) { + if (deployTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deployTime_ = value; + } else { + deployTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + public Builder setDeployTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (deployTimeBuilder_ == null) { + deployTime_ = builderForValue.build(); + } else { + deployTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + public Builder mergeDeployTime(com.google.protobuf.Timestamp value) { + if (deployTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + deployTime_ != null && + deployTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDeployTimeBuilder().mergeFrom(value); + } else { + deployTime_ = value; + } + } else { + deployTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + public Builder clearDeployTime() { + bitField0_ = (bitField0_ & ~0x00000002); + deployTime_ = null; + if (deployTimeBuilder_ != null) { + deployTimeBuilder_.dispose(); + deployTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getDeployTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDeployTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder() { + if (deployTimeBuilder_ != null) { + return deployTimeBuilder_.getMessageOrBuilder(); + } else { + return deployTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; + } + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getDeployTimeFieldBuilder() { + if (deployTimeBuilder_ == null) { + deployTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getDeployTime(), + getParentForChildren(), + isClean()); + deployTime_ = null; + } + return deployTimeBuilder_; + } + + private com.google.protobuf.Timestamp undeployTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> undeployTimeBuilder_; + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + * @return Whether the undeployTime field is set. + */ + public boolean hasUndeployTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + * @return The undeployTime. + */ + public com.google.protobuf.Timestamp getUndeployTime() { + if (undeployTimeBuilder_ == null) { + return undeployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; + } else { + return undeployTimeBuilder_.getMessage(); + } + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + public Builder setUndeployTime(com.google.protobuf.Timestamp value) { + if (undeployTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + undeployTime_ = value; + } else { + undeployTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + public Builder setUndeployTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (undeployTimeBuilder_ == null) { + undeployTime_ = builderForValue.build(); + } else { + undeployTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + public Builder mergeUndeployTime(com.google.protobuf.Timestamp value) { + if (undeployTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + undeployTime_ != null && + undeployTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUndeployTimeBuilder().mergeFrom(value); + } else { + undeployTime_ = value; + } + } else { + undeployTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + public Builder clearUndeployTime() { + bitField0_ = (bitField0_ & ~0x00000004); + undeployTime_ = null; + if (undeployTimeBuilder_ != null) { + undeployTimeBuilder_.dispose(); + undeployTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getUndeployTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUndeployTimeFieldBuilder().getBuilder(); + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getUndeployTimeOrBuilder() { + if (undeployTimeBuilder_ != null) { + return undeployTimeBuilder_.getMessageOrBuilder(); + } else { + return undeployTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; + } + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUndeployTimeFieldBuilder() { + if (undeployTimeBuilder_ == null) { + undeployTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUndeployTime(), + getParentForChildren(), + isClean()); + undeployTime_ = null; + } + return undeployTimeBuilder_; + } + + private java.lang.Object config_ = ""; + /** + *
+     * Configuration used to create this deployment.
+     * 
+ * + * string config = 4; + * @return The config. + */ + public java.lang.String getConfig() { + java.lang.Object ref = config_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + config_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Configuration used to create this deployment.
+     * 
+ * + * string config = 4; + * @return The bytes for config. + */ + public com.google.protobuf.ByteString + getConfigBytes() { + java.lang.Object ref = config_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + config_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Configuration used to create this deployment.
+     * 
+ * + * string config = 4; + * @param value The config to set. + * @return This builder for chaining. + */ + public Builder setConfig( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + config_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Configuration used to create this deployment.
+     * 
+ * + * string config = 4; + * @return This builder for chaining. + */ + public Builder clearConfig() { + config_ = getDefaultInstance().getConfig(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Configuration used to create this deployment.
+     * 
+ * + * string config = 4; + * @param value The bytes for config to set. + * @return This builder for chaining. + */ + public Builder setConfigBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + config_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object address_ = ""; + /** + *
+     * Address of the runtime element hosting this deployment.
+     * 
+ * + * string address = 5; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Address of the runtime element hosting this deployment.
+     * 
+ * + * string address = 5; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Address of the runtime element hosting this deployment.
+     * 
+ * + * string address = 5; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + address_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Address of the runtime element hosting this deployment.
+     * 
+ * + * string address = 5; + * @return This builder for chaining. + */ + public Builder clearAddress() { + address_ = getDefaultInstance().getAddress(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Address of the runtime element hosting this deployment.
+     * 
+ * + * string address = 5; + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + address_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureResourceUriIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + resourceUri_ = new com.google.protobuf.LazyStringArrayList(resourceUri_); + bitField0_ |= 0x00000020; + } + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @return A list containing the resourceUri. + */ + public com.google.protobuf.ProtocolStringList + getResourceUriList() { + return resourceUri_.getUnmodifiableView(); + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @return The count of resourceUri. + */ + public int getResourceUriCount() { + return resourceUri_.size(); + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @param index The index of the element to return. + * @return The resourceUri at the given index. + */ + public java.lang.String getResourceUri(int index) { + return resourceUri_.get(index); + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @param index The index of the value to return. + * @return The bytes of the resourceUri at the given index. + */ + public com.google.protobuf.ByteString + getResourceUriBytes(int index) { + return resourceUri_.getByteString(index); + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @param index The index to set the value at. + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureResourceUriIsMutable(); + resourceUri_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @param value The resourceUri to add. + * @return This builder for chaining. + */ + public Builder addResourceUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureResourceUriIsMutable(); + resourceUri_.add(value); + onChanged(); + return this; + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @param values The resourceUri to add. + * @return This builder for chaining. + */ + public Builder addAllResourceUri( + java.lang.Iterable values) { + ensureResourceUriIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, resourceUri_); + onChanged(); + return this; + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @param value The bytes of the resourceUri to add. + * @return This builder for chaining. + */ + public Builder addResourceUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureResourceUriIsMutable(); + resourceUri_.add(value); + onChanged(); + return this; + } + + private int platform_ = 0; + /** + *
+     * Platform hosting this deployment.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @return The enum numeric value on the wire for platform. + */ + @java.lang.Override public int getPlatformValue() { + return platform_; + } + /** + *
+     * Platform hosting this deployment.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @param value The enum numeric value on the wire for platform to set. + * @return This builder for chaining. + */ + public Builder setPlatformValue(int value) { + platform_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Platform hosting this deployment.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @return The platform. + */ + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrence.Platform getPlatform() { + io.grafeas.v1.DeploymentOccurrence.Platform result = io.grafeas.v1.DeploymentOccurrence.Platform.forNumber(platform_); + return result == null ? io.grafeas.v1.DeploymentOccurrence.Platform.UNRECOGNIZED : result; + } + /** + *
+     * Platform hosting this deployment.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @param value The platform to set. + * @return This builder for chaining. + */ + public Builder setPlatform(io.grafeas.v1.DeploymentOccurrence.Platform value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + platform_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Platform hosting this deployment.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @return This builder for chaining. + */ + public Builder clearPlatform() { + bitField0_ = (bitField0_ & ~0x00000040); + platform_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DeploymentOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DeploymentOccurrence) + private static final io.grafeas.v1.DeploymentOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DeploymentOccurrence(); + } + + public static io.grafeas.v1.DeploymentOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeploymentOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java new file mode 100644 index 000000000000..4a9234225f40 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java @@ -0,0 +1,187 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/deployment.proto + +package io.grafeas.v1; + +public interface DeploymentOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DeploymentOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Identity of the user that triggered this deployment.
+   * 
+ * + * string user_email = 1; + * @return The userEmail. + */ + java.lang.String getUserEmail(); + /** + *
+   * Identity of the user that triggered this deployment.
+   * 
+ * + * string user_email = 1; + * @return The bytes for userEmail. + */ + com.google.protobuf.ByteString + getUserEmailBytes(); + + /** + *
+   * Required. Beginning of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + * @return Whether the deployTime field is set. + */ + boolean hasDeployTime(); + /** + *
+   * Required. Beginning of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + * @return The deployTime. + */ + com.google.protobuf.Timestamp getDeployTime(); + /** + *
+   * Required. Beginning of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder(); + + /** + *
+   * End of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + * @return Whether the undeployTime field is set. + */ + boolean hasUndeployTime(); + /** + *
+   * End of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + * @return The undeployTime. + */ + com.google.protobuf.Timestamp getUndeployTime(); + /** + *
+   * End of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getUndeployTimeOrBuilder(); + + /** + *
+   * Configuration used to create this deployment.
+   * 
+ * + * string config = 4; + * @return The config. + */ + java.lang.String getConfig(); + /** + *
+   * Configuration used to create this deployment.
+   * 
+ * + * string config = 4; + * @return The bytes for config. + */ + com.google.protobuf.ByteString + getConfigBytes(); + + /** + *
+   * Address of the runtime element hosting this deployment.
+   * 
+ * + * string address = 5; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+   * Address of the runtime element hosting this deployment.
+   * 
+ * + * string address = 5; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @return A list containing the resourceUri. + */ + java.util.List + getResourceUriList(); + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @return The count of resourceUri. + */ + int getResourceUriCount(); + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @param index The index of the element to return. + * @return The resourceUri at the given index. + */ + java.lang.String getResourceUri(int index); + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @param index The index of the value to return. + * @return The bytes of the resourceUri at the given index. + */ + com.google.protobuf.ByteString + getResourceUriBytes(int index); + + /** + *
+   * Platform hosting this deployment.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @return The enum numeric value on the wire for platform. + */ + int getPlatformValue(); + /** + *
+   * Platform hosting this deployment.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @return The platform. + */ + io.grafeas.v1.DeploymentOccurrence.Platform getPlatform(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java new file mode 100644 index 000000000000..a3d76aee3b80 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java @@ -0,0 +1,663 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + *
+ * Digest information.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Digest} + */ +public final class Digest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Digest) + DigestOrBuilder { +private static final long serialVersionUID = 0L; + // Use Digest.newBuilder() to construct. + private Digest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Digest() { + algo_ = ""; + digestBytes_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Digest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Digest.class, io.grafeas.v1.Digest.Builder.class); + } + + public static final int ALGO_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object algo_ = ""; + /** + *
+   * `SHA1`, `SHA512` etc.
+   * 
+ * + * string algo = 1; + * @return The algo. + */ + @java.lang.Override + public java.lang.String getAlgo() { + java.lang.Object ref = algo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + algo_ = s; + return s; + } + } + /** + *
+   * `SHA1`, `SHA512` etc.
+   * 
+ * + * string algo = 1; + * @return The bytes for algo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAlgoBytes() { + java.lang.Object ref = algo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + algo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIGEST_BYTES_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString digestBytes_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+   * Value of the digest.
+   * 
+ * + * bytes digest_bytes = 2; + * @return The digestBytes. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDigestBytes() { + return digestBytes_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algo_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, algo_); + } + if (!digestBytes_.isEmpty()) { + output.writeBytes(2, digestBytes_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algo_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, algo_); + } + if (!digestBytes_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, digestBytes_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Digest)) { + return super.equals(obj); + } + io.grafeas.v1.Digest other = (io.grafeas.v1.Digest) obj; + + if (!getAlgo() + .equals(other.getAlgo())) return false; + if (!getDigestBytes() + .equals(other.getDigestBytes())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ALGO_FIELD_NUMBER; + hash = (53 * hash) + getAlgo().hashCode(); + hash = (37 * hash) + DIGEST_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getDigestBytes().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Digest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Digest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Digest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Digest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Digest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Digest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Digest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Digest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Digest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Digest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Digest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Digest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Digest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Digest information.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Digest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Digest) + io.grafeas.v1.DigestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Digest.class, io.grafeas.v1.Digest.Builder.class); + } + + // Construct using io.grafeas.v1.Digest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + algo_ = ""; + digestBytes_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Digest getDefaultInstanceForType() { + return io.grafeas.v1.Digest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Digest build() { + io.grafeas.v1.Digest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Digest buildPartial() { + io.grafeas.v1.Digest result = new io.grafeas.v1.Digest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Digest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.algo_ = algo_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.digestBytes_ = digestBytes_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Digest) { + return mergeFrom((io.grafeas.v1.Digest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Digest other) { + if (other == io.grafeas.v1.Digest.getDefaultInstance()) return this; + if (!other.getAlgo().isEmpty()) { + algo_ = other.algo_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getDigestBytes() != com.google.protobuf.ByteString.EMPTY) { + setDigestBytes(other.getDigestBytes()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + algo_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + digestBytes_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object algo_ = ""; + /** + *
+     * `SHA1`, `SHA512` etc.
+     * 
+ * + * string algo = 1; + * @return The algo. + */ + public java.lang.String getAlgo() { + java.lang.Object ref = algo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + algo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `SHA1`, `SHA512` etc.
+     * 
+ * + * string algo = 1; + * @return The bytes for algo. + */ + public com.google.protobuf.ByteString + getAlgoBytes() { + java.lang.Object ref = algo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + algo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `SHA1`, `SHA512` etc.
+     * 
+ * + * string algo = 1; + * @param value The algo to set. + * @return This builder for chaining. + */ + public Builder setAlgo( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + algo_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * `SHA1`, `SHA512` etc.
+     * 
+ * + * string algo = 1; + * @return This builder for chaining. + */ + public Builder clearAlgo() { + algo_ = getDefaultInstance().getAlgo(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * `SHA1`, `SHA512` etc.
+     * 
+ * + * string algo = 1; + * @param value The bytes for algo to set. + * @return This builder for chaining. + */ + public Builder setAlgoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + algo_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString digestBytes_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Value of the digest.
+     * 
+ * + * bytes digest_bytes = 2; + * @return The digestBytes. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDigestBytes() { + return digestBytes_; + } + /** + *
+     * Value of the digest.
+     * 
+ * + * bytes digest_bytes = 2; + * @param value The digestBytes to set. + * @return This builder for chaining. + */ + public Builder setDigestBytes(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + digestBytes_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Value of the digest.
+     * 
+ * + * bytes digest_bytes = 2; + * @return This builder for chaining. + */ + public Builder clearDigestBytes() { + bitField0_ = (bitField0_ & ~0x00000002); + digestBytes_ = getDefaultInstance().getDigestBytes(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Digest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Digest) + private static final io.grafeas.v1.Digest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Digest(); + } + + public static io.grafeas.v1.Digest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Digest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Digest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java new file mode 100644 index 000000000000..b1151e73ce84 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public interface DigestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Digest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * `SHA1`, `SHA512` etc.
+   * 
+ * + * string algo = 1; + * @return The algo. + */ + java.lang.String getAlgo(); + /** + *
+   * `SHA1`, `SHA512` etc.
+   * 
+ * + * string algo = 1; + * @return The bytes for algo. + */ + com.google.protobuf.ByteString + getAlgoBytes(); + + /** + *
+   * Value of the digest.
+   * 
+ * + * bytes digest_bytes = 2; + * @return The digestBytes. + */ + com.google.protobuf.ByteString getDigestBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java new file mode 100644 index 000000000000..405d615d4b2c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java @@ -0,0 +1,107 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/discovery.proto + +package io.grafeas.v1; + +public final class Discovery { + private Discovery() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DiscoveryNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032grafeas/v1/discovery.proto\022\ngrafeas.v1" + + "\032\037google/api/field_behavior.proto\032\037googl" + + "e/protobuf/timestamp.proto\032\027google/rpc/s" + + "tatus.proto\032\027grafeas/v1/common.proto\"<\n\r" + + "DiscoveryNote\022+\n\ranalysis_kind\030\001 \001(\0162\024.g" + + "rafeas.v1.NoteKind\"\374\005\n\023DiscoveryOccurren" + + "ce\022O\n\023continuous_analysis\030\001 \001(\01622.grafea" + + "s.v1.DiscoveryOccurrence.ContinuousAnaly" + + "sis\022G\n\017analysis_status\030\002 \001(\0162..grafeas.v" + + "1.DiscoveryOccurrence.AnalysisStatus\022M\n\022" + + "analysis_completed\030\007 \001(\01321.grafeas.v1.Di" + + "scoveryOccurrence.AnalysisCompleted\022*\n\016a" + + "nalysis_error\030\010 \003(\0132\022.google.rpc.Status\022" + + "1\n\025analysis_status_error\030\003 \001(\0132\022.google." + + "rpc.Status\022\013\n\003cpe\030\004 \001(\t\0222\n\016last_scan_tim" + + "e\030\005 \001(\0132\032.google.protobuf.Timestamp\0225\n\014a" + + "rchive_time\030\006 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\032*\n\021AnalysisCompleted\022\025\n\ranaly" + + "sis_type\030\001 \003(\t\"S\n\022ContinuousAnalysis\022#\n\037" + + "CONTINUOUS_ANALYSIS_UNSPECIFIED\020\000\022\n\n\006ACT" + + "IVE\020\001\022\014\n\010INACTIVE\020\002\"\243\001\n\016AnalysisStatus\022\037" + + "\n\033ANALYSIS_STATUS_UNSPECIFIED\020\000\022\013\n\007PENDI" + + "NG\020\001\022\014\n\010SCANNING\020\002\022\024\n\020FINISHED_SUCCESS\020\003" + + "\022\014\n\010COMPLETE\020\003\022\023\n\017FINISHED_FAILED\020\004\022\030\n\024F" + + "INISHED_UNSUPPORTED\020\005\032\002\020\001BQ\n\rio.grafeas." + + "v1P\001Z8google.golang.org/genproto/googlea" + + "pis/grafeas/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + io.grafeas.v1.Common.getDescriptor(), + }); + internal_static_grafeas_v1_DiscoveryNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DiscoveryNote_descriptor, + new java.lang.String[] { "AnalysisKind", }); + internal_static_grafeas_v1_DiscoveryOccurrence_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DiscoveryOccurrence_descriptor, + new java.lang.String[] { "ContinuousAnalysis", "AnalysisStatus", "AnalysisCompleted", "AnalysisError", "AnalysisStatusError", "Cpe", "LastScanTime", "ArchiveTime", }); + internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor = + internal_static_grafeas_v1_DiscoveryOccurrence_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor, + new java.lang.String[] { "AnalysisType", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + io.grafeas.v1.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java new file mode 100644 index 000000000000..8a134c302da5 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java @@ -0,0 +1,549 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/discovery.proto + +package io.grafeas.v1; + +/** + *
+ * A note that indicates a type of analysis a provider would perform. This note
+ * exists in a provider's project. A `Discovery` occurrence is created in a
+ * consumer's project at the start of analysis.
+ * 
+ * + * Protobuf type {@code grafeas.v1.DiscoveryNote} + */ +public final class DiscoveryNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DiscoveryNote) + DiscoveryNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use DiscoveryNote.newBuilder() to construct. + private DiscoveryNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DiscoveryNote() { + analysisKind_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DiscoveryNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DiscoveryNote.class, io.grafeas.v1.DiscoveryNote.Builder.class); + } + + public static final int ANALYSIS_KIND_FIELD_NUMBER = 1; + private int analysisKind_ = 0; + /** + *
+   * Required. Immutable. The kind of analysis that is handled by this
+   * discovery.
+   * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @return The enum numeric value on the wire for analysisKind. + */ + @java.lang.Override public int getAnalysisKindValue() { + return analysisKind_; + } + /** + *
+   * Required. Immutable. The kind of analysis that is handled by this
+   * discovery.
+   * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @return The analysisKind. + */ + @java.lang.Override public io.grafeas.v1.NoteKind getAnalysisKind() { + io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(analysisKind_); + return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (analysisKind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(1, analysisKind_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (analysisKind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, analysisKind_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DiscoveryNote)) { + return super.equals(obj); + } + io.grafeas.v1.DiscoveryNote other = (io.grafeas.v1.DiscoveryNote) obj; + + if (analysisKind_ != other.analysisKind_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ANALYSIS_KIND_FIELD_NUMBER; + hash = (53 * hash) + analysisKind_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DiscoveryNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DiscoveryNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A note that indicates a type of analysis a provider would perform. This note
+   * exists in a provider's project. A `Discovery` occurrence is created in a
+   * consumer's project at the start of analysis.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DiscoveryNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DiscoveryNote) + io.grafeas.v1.DiscoveryNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DiscoveryNote.class, io.grafeas.v1.DiscoveryNote.Builder.class); + } + + // Construct using io.grafeas.v1.DiscoveryNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + analysisKind_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryNote getDefaultInstanceForType() { + return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryNote build() { + io.grafeas.v1.DiscoveryNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryNote buildPartial() { + io.grafeas.v1.DiscoveryNote result = new io.grafeas.v1.DiscoveryNote(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.DiscoveryNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.analysisKind_ = analysisKind_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DiscoveryNote) { + return mergeFrom((io.grafeas.v1.DiscoveryNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DiscoveryNote other) { + if (other == io.grafeas.v1.DiscoveryNote.getDefaultInstance()) return this; + if (other.analysisKind_ != 0) { + setAnalysisKindValue(other.getAnalysisKindValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + analysisKind_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int analysisKind_ = 0; + /** + *
+     * Required. Immutable. The kind of analysis that is handled by this
+     * discovery.
+     * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @return The enum numeric value on the wire for analysisKind. + */ + @java.lang.Override public int getAnalysisKindValue() { + return analysisKind_; + } + /** + *
+     * Required. Immutable. The kind of analysis that is handled by this
+     * discovery.
+     * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @param value The enum numeric value on the wire for analysisKind to set. + * @return This builder for chaining. + */ + public Builder setAnalysisKindValue(int value) { + analysisKind_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The kind of analysis that is handled by this
+     * discovery.
+     * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @return The analysisKind. + */ + @java.lang.Override + public io.grafeas.v1.NoteKind getAnalysisKind() { + io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(analysisKind_); + return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; + } + /** + *
+     * Required. Immutable. The kind of analysis that is handled by this
+     * discovery.
+     * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @param value The analysisKind to set. + * @return This builder for chaining. + */ + public Builder setAnalysisKind(io.grafeas.v1.NoteKind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + analysisKind_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The kind of analysis that is handled by this
+     * discovery.
+     * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @return This builder for chaining. + */ + public Builder clearAnalysisKind() { + bitField0_ = (bitField0_ & ~0x00000001); + analysisKind_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DiscoveryNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DiscoveryNote) + private static final io.grafeas.v1.DiscoveryNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DiscoveryNote(); + } + + public static io.grafeas.v1.DiscoveryNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiscoveryNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java new file mode 100644 index 000000000000..ad1484f0679d --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java @@ -0,0 +1,30 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/discovery.proto + +package io.grafeas.v1; + +public interface DiscoveryNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DiscoveryNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Immutable. The kind of analysis that is handled by this
+   * discovery.
+   * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @return The enum numeric value on the wire for analysisKind. + */ + int getAnalysisKindValue(); + /** + *
+   * Required. Immutable. The kind of analysis that is handled by this
+   * discovery.
+   * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @return The analysisKind. + */ + io.grafeas.v1.NoteKind getAnalysisKind(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java new file mode 100644 index 000000000000..1c6321c5cc12 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java @@ -0,0 +1,3178 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/discovery.proto + +package io.grafeas.v1; + +/** + *
+ * Provides information about the analysis status of a discovered resource.
+ * 
+ * + * Protobuf type {@code grafeas.v1.DiscoveryOccurrence} + */ +public final class DiscoveryOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DiscoveryOccurrence) + DiscoveryOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use DiscoveryOccurrence.newBuilder() to construct. + private DiscoveryOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DiscoveryOccurrence() { + continuousAnalysis_ = 0; + analysisStatus_ = 0; + analysisError_ = java.util.Collections.emptyList(); + cpe_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DiscoveryOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DiscoveryOccurrence.class, io.grafeas.v1.DiscoveryOccurrence.Builder.class); + } + + /** + *
+   * Whether the resource is continuously analyzed.
+   * 
+ * + * Protobuf enum {@code grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis} + */ + public enum ContinuousAnalysis + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown.
+     * 
+ * + * CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; + */ + CONTINUOUS_ANALYSIS_UNSPECIFIED(0), + /** + *
+     * The resource is continuously analyzed.
+     * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + *
+     * The resource is ignored for continuous analysis.
+     * 
+ * + * INACTIVE = 2; + */ + INACTIVE(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unknown.
+     * 
+ * + * CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; + */ + public static final int CONTINUOUS_ANALYSIS_UNSPECIFIED_VALUE = 0; + /** + *
+     * The resource is continuously analyzed.
+     * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + /** + *
+     * The resource is ignored for continuous analysis.
+     * 
+ * + * INACTIVE = 2; + */ + public static final int INACTIVE_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContinuousAnalysis valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ContinuousAnalysis forNumber(int value) { + switch (value) { + case 0: return CONTINUOUS_ANALYSIS_UNSPECIFIED; + case 1: return ACTIVE; + case 2: return INACTIVE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ContinuousAnalysis> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ContinuousAnalysis findValueByNumber(int number) { + return ContinuousAnalysis.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.DiscoveryOccurrence.getDescriptor().getEnumTypes().get(0); + } + + private static final ContinuousAnalysis[] VALUES = values(); + + public static ContinuousAnalysis valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ContinuousAnalysis(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis) + } + + /** + *
+   * Analysis status for a resource. Currently for initial analysis only (not
+   * updated in continuous analysis).
+   * 
+ * + * Protobuf enum {@code grafeas.v1.DiscoveryOccurrence.AnalysisStatus} + */ + public enum AnalysisStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown.
+     * 
+ * + * ANALYSIS_STATUS_UNSPECIFIED = 0; + */ + ANALYSIS_STATUS_UNSPECIFIED(0, 0), + /** + *
+     * Resource is known but no action has been taken yet.
+     * 
+ * + * PENDING = 1; + */ + PENDING(1, 1), + /** + *
+     * Resource is being analyzed.
+     * 
+ * + * SCANNING = 2; + */ + SCANNING(2, 2), + /** + *
+     * Analysis has finished successfully.
+     * 
+ * + * FINISHED_SUCCESS = 3; + */ + FINISHED_SUCCESS(3, 3), + /** + *
+     * Analysis has finished unsuccessfully, the analysis itself is in a bad
+     * state.
+     * 
+ * + * FINISHED_FAILED = 4; + */ + FINISHED_FAILED(5, 4), + /** + *
+     * The resource is known not to be supported.
+     * 
+ * + * FINISHED_UNSUPPORTED = 5; + */ + FINISHED_UNSUPPORTED(6, 5), + UNRECOGNIZED(-1, -1), + ; + + /** + *
+     * Analysis has completed.
+     * 
+ * + * COMPLETE = 3; + */ + public static final AnalysisStatus COMPLETE = FINISHED_SUCCESS; + /** + *
+     * Unknown.
+     * 
+ * + * ANALYSIS_STATUS_UNSPECIFIED = 0; + */ + public static final int ANALYSIS_STATUS_UNSPECIFIED_VALUE = 0; + /** + *
+     * Resource is known but no action has been taken yet.
+     * 
+ * + * PENDING = 1; + */ + public static final int PENDING_VALUE = 1; + /** + *
+     * Resource is being analyzed.
+     * 
+ * + * SCANNING = 2; + */ + public static final int SCANNING_VALUE = 2; + /** + *
+     * Analysis has finished successfully.
+     * 
+ * + * FINISHED_SUCCESS = 3; + */ + public static final int FINISHED_SUCCESS_VALUE = 3; + /** + *
+     * Analysis has completed.
+     * 
+ * + * COMPLETE = 3; + */ + public static final int COMPLETE_VALUE = 3; + /** + *
+     * Analysis has finished unsuccessfully, the analysis itself is in a bad
+     * state.
+     * 
+ * + * FINISHED_FAILED = 4; + */ + public static final int FINISHED_FAILED_VALUE = 4; + /** + *
+     * The resource is known not to be supported.
+     * 
+ * + * FINISHED_UNSUPPORTED = 5; + */ + public static final int FINISHED_UNSUPPORTED_VALUE = 5; + + + public final int getNumber() { + if (index == -1) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AnalysisStatus valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AnalysisStatus forNumber(int value) { + switch (value) { + case 0: return ANALYSIS_STATUS_UNSPECIFIED; + case 1: return PENDING; + case 2: return SCANNING; + case 3: return FINISHED_SUCCESS; + case 4: return FINISHED_FAILED; + case 5: return FINISHED_UNSUPPORTED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AnalysisStatus> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AnalysisStatus findValueByNumber(int number) { + return AnalysisStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (index == -1) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.DiscoveryOccurrence.getDescriptor().getEnumTypes().get(1); + } + + private static final AnalysisStatus[] VALUES = getStaticValuesArray(); + private static AnalysisStatus[] getStaticValuesArray() { + return new AnalysisStatus[] { + ANALYSIS_STATUS_UNSPECIFIED, PENDING, SCANNING, FINISHED_SUCCESS, COMPLETE, FINISHED_FAILED, FINISHED_UNSUPPORTED, + }; + } + public static AnalysisStatus valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private AnalysisStatus(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.DiscoveryOccurrence.AnalysisStatus) + } + + public interface AnalysisCompletedOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string analysis_type = 1; + * @return A list containing the analysisType. + */ + java.util.List + getAnalysisTypeList(); + /** + * repeated string analysis_type = 1; + * @return The count of analysisType. + */ + int getAnalysisTypeCount(); + /** + * repeated string analysis_type = 1; + * @param index The index of the element to return. + * @return The analysisType at the given index. + */ + java.lang.String getAnalysisType(int index); + /** + * repeated string analysis_type = 1; + * @param index The index of the value to return. + * @return The bytes of the analysisType at the given index. + */ + com.google.protobuf.ByteString + getAnalysisTypeBytes(int index); + } + /** + *
+   * Indicates which analysis completed successfully. Multiple types of
+   * analysis can be performed on a single resource.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DiscoveryOccurrence.AnalysisCompleted} + */ + public static final class AnalysisCompleted extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) + AnalysisCompletedOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalysisCompleted.newBuilder() to construct. + private AnalysisCompleted(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnalysisCompleted() { + analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnalysisCompleted(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.class, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder.class); + } + + public static final int ANALYSIS_TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList analysisType_; + /** + * repeated string analysis_type = 1; + * @return A list containing the analysisType. + */ + public com.google.protobuf.ProtocolStringList + getAnalysisTypeList() { + return analysisType_; + } + /** + * repeated string analysis_type = 1; + * @return The count of analysisType. + */ + public int getAnalysisTypeCount() { + return analysisType_.size(); + } + /** + * repeated string analysis_type = 1; + * @param index The index of the element to return. + * @return The analysisType at the given index. + */ + public java.lang.String getAnalysisType(int index) { + return analysisType_.get(index); + } + /** + * repeated string analysis_type = 1; + * @param index The index of the value to return. + * @return The bytes of the analysisType at the given index. + */ + public com.google.protobuf.ByteString + getAnalysisTypeBytes(int index) { + return analysisType_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < analysisType_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, analysisType_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < analysisType_.size(); i++) { + dataSize += computeStringSizeNoTag(analysisType_.getRaw(i)); + } + size += dataSize; + size += 1 * getAnalysisTypeList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted)) { + return super.equals(obj); + } + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted other = (io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) obj; + + if (!getAnalysisTypeList() + .equals(other.getAnalysisTypeList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnalysisTypeCount() > 0) { + hash = (37 * hash) + ANALYSIS_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisTypeList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Indicates which analysis completed successfully. Multiple types of
+     * analysis can be performed on a single resource.
+     * 
+ * + * Protobuf type {@code grafeas.v1.DiscoveryOccurrence.AnalysisCompleted} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.class, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder.class); + } + + // Construct using io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getDefaultInstanceForType() { + return io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted build() { + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted buildPartial() { + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result = new io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result) { + if (((bitField0_ & 0x00000001) != 0)) { + analysisType_ = analysisType_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.analysisType_ = analysisType_; + } + + private void buildPartial0(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) { + return mergeFrom((io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted other) { + if (other == io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance()) return this; + if (!other.analysisType_.isEmpty()) { + if (analysisType_.isEmpty()) { + analysisType_ = other.analysisType_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnalysisTypeIsMutable(); + analysisType_.addAll(other.analysisType_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureAnalysisTypeIsMutable(); + analysisType_.add(s); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAnalysisTypeIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + analysisType_ = new com.google.protobuf.LazyStringArrayList(analysisType_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string analysis_type = 1; + * @return A list containing the analysisType. + */ + public com.google.protobuf.ProtocolStringList + getAnalysisTypeList() { + return analysisType_.getUnmodifiableView(); + } + /** + * repeated string analysis_type = 1; + * @return The count of analysisType. + */ + public int getAnalysisTypeCount() { + return analysisType_.size(); + } + /** + * repeated string analysis_type = 1; + * @param index The index of the element to return. + * @return The analysisType at the given index. + */ + public java.lang.String getAnalysisType(int index) { + return analysisType_.get(index); + } + /** + * repeated string analysis_type = 1; + * @param index The index of the value to return. + * @return The bytes of the analysisType at the given index. + */ + public com.google.protobuf.ByteString + getAnalysisTypeBytes(int index) { + return analysisType_.getByteString(index); + } + /** + * repeated string analysis_type = 1; + * @param index The index to set the value at. + * @param value The analysisType to set. + * @return This builder for chaining. + */ + public Builder setAnalysisType( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAnalysisTypeIsMutable(); + analysisType_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string analysis_type = 1; + * @param value The analysisType to add. + * @return This builder for chaining. + */ + public Builder addAnalysisType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAnalysisTypeIsMutable(); + analysisType_.add(value); + onChanged(); + return this; + } + /** + * repeated string analysis_type = 1; + * @param values The analysisType to add. + * @return This builder for chaining. + */ + public Builder addAllAnalysisType( + java.lang.Iterable values) { + ensureAnalysisTypeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, analysisType_); + onChanged(); + return this; + } + /** + * repeated string analysis_type = 1; + * @return This builder for chaining. + */ + public Builder clearAnalysisType() { + analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string analysis_type = 1; + * @param value The bytes of the analysisType to add. + * @return This builder for chaining. + */ + public Builder addAnalysisTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureAnalysisTypeIsMutable(); + analysisType_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) + private static final io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted(); + } + + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalysisCompleted parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int CONTINUOUS_ANALYSIS_FIELD_NUMBER = 1; + private int continuousAnalysis_ = 0; + /** + *
+   * Whether the resource is continuously analyzed.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @return The enum numeric value on the wire for continuousAnalysis. + */ + @java.lang.Override public int getContinuousAnalysisValue() { + return continuousAnalysis_; + } + /** + *
+   * Whether the resource is continuously analyzed.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @return The continuousAnalysis. + */ + @java.lang.Override public io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis getContinuousAnalysis() { + io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis result = io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.forNumber(continuousAnalysis_); + return result == null ? io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.UNRECOGNIZED : result; + } + + public static final int ANALYSIS_STATUS_FIELD_NUMBER = 2; + private int analysisStatus_ = 0; + /** + *
+   * The status of discovery for the resource.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @return The enum numeric value on the wire for analysisStatus. + */ + @java.lang.Override public int getAnalysisStatusValue() { + return analysisStatus_; + } + /** + *
+   * The status of discovery for the resource.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @return The analysisStatus. + */ + @java.lang.Override public io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus getAnalysisStatus() { + io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus result = io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.forNumber(analysisStatus_); + return result == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.UNRECOGNIZED : result; + } + + public static final int ANALYSIS_COMPLETED_FIELD_NUMBER = 7; + private io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysisCompleted_; + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + * @return Whether the analysisCompleted field is set. + */ + @java.lang.Override + public boolean hasAnalysisCompleted() { + return analysisCompleted_ != null; + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + * @return The analysisCompleted. + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getAnalysisCompleted() { + return analysisCompleted_ == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder getAnalysisCompletedOrBuilder() { + return analysisCompleted_ == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; + } + + public static final int ANALYSIS_ERROR_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private java.util.List analysisError_; + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + @java.lang.Override + public java.util.List getAnalysisErrorList() { + return analysisError_; + } + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + @java.lang.Override + public java.util.List + getAnalysisErrorOrBuilderList() { + return analysisError_; + } + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + @java.lang.Override + public int getAnalysisErrorCount() { + return analysisError_.size(); + } + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + @java.lang.Override + public com.google.rpc.Status getAnalysisError(int index) { + return analysisError_.get(index); + } + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getAnalysisErrorOrBuilder( + int index) { + return analysisError_.get(index); + } + + public static final int ANALYSIS_STATUS_ERROR_FIELD_NUMBER = 3; + private com.google.rpc.Status analysisStatusError_; + /** + *
+   * When an error is encountered this will contain a LocalizedMessage under
+   * details to show to the user. The LocalizedMessage is output only and
+   * populated by the API.
+   * 
+ * + * .google.rpc.Status analysis_status_error = 3; + * @return Whether the analysisStatusError field is set. + */ + @java.lang.Override + public boolean hasAnalysisStatusError() { + return analysisStatusError_ != null; + } + /** + *
+   * When an error is encountered this will contain a LocalizedMessage under
+   * details to show to the user. The LocalizedMessage is output only and
+   * populated by the API.
+   * 
+ * + * .google.rpc.Status analysis_status_error = 3; + * @return The analysisStatusError. + */ + @java.lang.Override + public com.google.rpc.Status getAnalysisStatusError() { + return analysisStatusError_ == null ? com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; + } + /** + *
+   * When an error is encountered this will contain a LocalizedMessage under
+   * details to show to the user. The LocalizedMessage is output only and
+   * populated by the API.
+   * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getAnalysisStatusErrorOrBuilder() { + return analysisStatusError_ == null ? com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; + } + + public static final int CPE_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object cpe_ = ""; + /** + *
+   * The CPE of the resource being scanned.
+   * 
+ * + * string cpe = 4; + * @return The cpe. + */ + @java.lang.Override + public java.lang.String getCpe() { + java.lang.Object ref = cpe_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpe_ = s; + return s; + } + } + /** + *
+   * The CPE of the resource being scanned.
+   * 
+ * + * string cpe = 4; + * @return The bytes for cpe. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeBytes() { + java.lang.Object ref = cpe_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_SCAN_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp lastScanTime_; + /** + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * @return Whether the lastScanTime field is set. + */ + @java.lang.Override + public boolean hasLastScanTime() { + return lastScanTime_ != null; + } + /** + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * @return The lastScanTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastScanTime() { + return lastScanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; + } + /** + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastScanTimeOrBuilder() { + return lastScanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; + } + + public static final int ARCHIVE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp archiveTime_; + /** + *
+   * The time occurrences related to this discovery occurrence were archived.
+   * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the archiveTime field is set. + */ + @java.lang.Override + public boolean hasArchiveTime() { + return archiveTime_ != null; + } + /** + *
+   * The time occurrences related to this discovery occurrence were archived.
+   * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The archiveTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getArchiveTime() { + return archiveTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; + } + /** + *
+   * The time occurrences related to this discovery occurrence were archived.
+   * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getArchiveTimeOrBuilder() { + return archiveTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (continuousAnalysis_ != io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.CONTINUOUS_ANALYSIS_UNSPECIFIED.getNumber()) { + output.writeEnum(1, continuousAnalysis_); + } + if (analysisStatus_ != io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.ANALYSIS_STATUS_UNSPECIFIED.getNumber()) { + output.writeEnum(2, analysisStatus_); + } + if (analysisStatusError_ != null) { + output.writeMessage(3, getAnalysisStatusError()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpe_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cpe_); + } + if (lastScanTime_ != null) { + output.writeMessage(5, getLastScanTime()); + } + if (archiveTime_ != null) { + output.writeMessage(6, getArchiveTime()); + } + if (analysisCompleted_ != null) { + output.writeMessage(7, getAnalysisCompleted()); + } + for (int i = 0; i < analysisError_.size(); i++) { + output.writeMessage(8, analysisError_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (continuousAnalysis_ != io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.CONTINUOUS_ANALYSIS_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, continuousAnalysis_); + } + if (analysisStatus_ != io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.ANALYSIS_STATUS_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, analysisStatus_); + } + if (analysisStatusError_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getAnalysisStatusError()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpe_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cpe_); + } + if (lastScanTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getLastScanTime()); + } + if (archiveTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getArchiveTime()); + } + if (analysisCompleted_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getAnalysisCompleted()); + } + for (int i = 0; i < analysisError_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, analysisError_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DiscoveryOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.DiscoveryOccurrence other = (io.grafeas.v1.DiscoveryOccurrence) obj; + + if (continuousAnalysis_ != other.continuousAnalysis_) return false; + if (analysisStatus_ != other.analysisStatus_) return false; + if (hasAnalysisCompleted() != other.hasAnalysisCompleted()) return false; + if (hasAnalysisCompleted()) { + if (!getAnalysisCompleted() + .equals(other.getAnalysisCompleted())) return false; + } + if (!getAnalysisErrorList() + .equals(other.getAnalysisErrorList())) return false; + if (hasAnalysisStatusError() != other.hasAnalysisStatusError()) return false; + if (hasAnalysisStatusError()) { + if (!getAnalysisStatusError() + .equals(other.getAnalysisStatusError())) return false; + } + if (!getCpe() + .equals(other.getCpe())) return false; + if (hasLastScanTime() != other.hasLastScanTime()) return false; + if (hasLastScanTime()) { + if (!getLastScanTime() + .equals(other.getLastScanTime())) return false; + } + if (hasArchiveTime() != other.hasArchiveTime()) return false; + if (hasArchiveTime()) { + if (!getArchiveTime() + .equals(other.getArchiveTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTINUOUS_ANALYSIS_FIELD_NUMBER; + hash = (53 * hash) + continuousAnalysis_; + hash = (37 * hash) + ANALYSIS_STATUS_FIELD_NUMBER; + hash = (53 * hash) + analysisStatus_; + if (hasAnalysisCompleted()) { + hash = (37 * hash) + ANALYSIS_COMPLETED_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisCompleted().hashCode(); + } + if (getAnalysisErrorCount() > 0) { + hash = (37 * hash) + ANALYSIS_ERROR_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisErrorList().hashCode(); + } + if (hasAnalysisStatusError()) { + hash = (37 * hash) + ANALYSIS_STATUS_ERROR_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisStatusError().hashCode(); + } + hash = (37 * hash) + CPE_FIELD_NUMBER; + hash = (53 * hash) + getCpe().hashCode(); + if (hasLastScanTime()) { + hash = (37 * hash) + LAST_SCAN_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastScanTime().hashCode(); + } + if (hasArchiveTime()) { + hash = (37 * hash) + ARCHIVE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getArchiveTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DiscoveryOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Provides information about the analysis status of a discovered resource.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DiscoveryOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DiscoveryOccurrence) + io.grafeas.v1.DiscoveryOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DiscoveryOccurrence.class, io.grafeas.v1.DiscoveryOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.DiscoveryOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + continuousAnalysis_ = 0; + analysisStatus_ = 0; + analysisCompleted_ = null; + if (analysisCompletedBuilder_ != null) { + analysisCompletedBuilder_.dispose(); + analysisCompletedBuilder_ = null; + } + if (analysisErrorBuilder_ == null) { + analysisError_ = java.util.Collections.emptyList(); + } else { + analysisError_ = null; + analysisErrorBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + analysisStatusError_ = null; + if (analysisStatusErrorBuilder_ != null) { + analysisStatusErrorBuilder_.dispose(); + analysisStatusErrorBuilder_ = null; + } + cpe_ = ""; + lastScanTime_ = null; + if (lastScanTimeBuilder_ != null) { + lastScanTimeBuilder_.dispose(); + lastScanTimeBuilder_ = null; + } + archiveTime_ = null; + if (archiveTimeBuilder_ != null) { + archiveTimeBuilder_.dispose(); + archiveTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence build() { + io.grafeas.v1.DiscoveryOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence buildPartial() { + io.grafeas.v1.DiscoveryOccurrence result = new io.grafeas.v1.DiscoveryOccurrence(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.DiscoveryOccurrence result) { + if (analysisErrorBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + analysisError_ = java.util.Collections.unmodifiableList(analysisError_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.analysisError_ = analysisError_; + } else { + result.analysisError_ = analysisErrorBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.DiscoveryOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.continuousAnalysis_ = continuousAnalysis_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.analysisStatus_ = analysisStatus_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.analysisCompleted_ = analysisCompletedBuilder_ == null + ? analysisCompleted_ + : analysisCompletedBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.analysisStatusError_ = analysisStatusErrorBuilder_ == null + ? analysisStatusError_ + : analysisStatusErrorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.cpe_ = cpe_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.lastScanTime_ = lastScanTimeBuilder_ == null + ? lastScanTime_ + : lastScanTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.archiveTime_ = archiveTimeBuilder_ == null + ? archiveTime_ + : archiveTimeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DiscoveryOccurrence) { + return mergeFrom((io.grafeas.v1.DiscoveryOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DiscoveryOccurrence other) { + if (other == io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance()) return this; + if (other.continuousAnalysis_ != 0) { + setContinuousAnalysisValue(other.getContinuousAnalysisValue()); + } + if (other.analysisStatus_ != 0) { + setAnalysisStatusValue(other.getAnalysisStatusValue()); + } + if (other.hasAnalysisCompleted()) { + mergeAnalysisCompleted(other.getAnalysisCompleted()); + } + if (analysisErrorBuilder_ == null) { + if (!other.analysisError_.isEmpty()) { + if (analysisError_.isEmpty()) { + analysisError_ = other.analysisError_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureAnalysisErrorIsMutable(); + analysisError_.addAll(other.analysisError_); + } + onChanged(); + } + } else { + if (!other.analysisError_.isEmpty()) { + if (analysisErrorBuilder_.isEmpty()) { + analysisErrorBuilder_.dispose(); + analysisErrorBuilder_ = null; + analysisError_ = other.analysisError_; + bitField0_ = (bitField0_ & ~0x00000008); + analysisErrorBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAnalysisErrorFieldBuilder() : null; + } else { + analysisErrorBuilder_.addAllMessages(other.analysisError_); + } + } + } + if (other.hasAnalysisStatusError()) { + mergeAnalysisStatusError(other.getAnalysisStatusError()); + } + if (!other.getCpe().isEmpty()) { + cpe_ = other.cpe_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasLastScanTime()) { + mergeLastScanTime(other.getLastScanTime()); + } + if (other.hasArchiveTime()) { + mergeArchiveTime(other.getArchiveTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + continuousAnalysis_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + analysisStatus_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + input.readMessage( + getAnalysisStatusErrorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: { + cpe_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 34 + case 42: { + input.readMessage( + getLastScanTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 42 + case 50: { + input.readMessage( + getArchiveTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 50 + case 58: { + input.readMessage( + getAnalysisCompletedFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 58 + case 66: { + com.google.rpc.Status m = + input.readMessage( + com.google.rpc.Status.parser(), + extensionRegistry); + if (analysisErrorBuilder_ == null) { + ensureAnalysisErrorIsMutable(); + analysisError_.add(m); + } else { + analysisErrorBuilder_.addMessage(m); + } + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int continuousAnalysis_ = 0; + /** + *
+     * Whether the resource is continuously analyzed.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @return The enum numeric value on the wire for continuousAnalysis. + */ + @java.lang.Override public int getContinuousAnalysisValue() { + return continuousAnalysis_; + } + /** + *
+     * Whether the resource is continuously analyzed.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @param value The enum numeric value on the wire for continuousAnalysis to set. + * @return This builder for chaining. + */ + public Builder setContinuousAnalysisValue(int value) { + continuousAnalysis_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Whether the resource is continuously analyzed.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @return The continuousAnalysis. + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis getContinuousAnalysis() { + io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis result = io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.forNumber(continuousAnalysis_); + return result == null ? io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.UNRECOGNIZED : result; + } + /** + *
+     * Whether the resource is continuously analyzed.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @param value The continuousAnalysis to set. + * @return This builder for chaining. + */ + public Builder setContinuousAnalysis(io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + continuousAnalysis_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Whether the resource is continuously analyzed.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @return This builder for chaining. + */ + public Builder clearContinuousAnalysis() { + bitField0_ = (bitField0_ & ~0x00000001); + continuousAnalysis_ = 0; + onChanged(); + return this; + } + + private int analysisStatus_ = 0; + /** + *
+     * The status of discovery for the resource.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @return The enum numeric value on the wire for analysisStatus. + */ + @java.lang.Override public int getAnalysisStatusValue() { + return analysisStatus_; + } + /** + *
+     * The status of discovery for the resource.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @param value The enum numeric value on the wire for analysisStatus to set. + * @return This builder for chaining. + */ + public Builder setAnalysisStatusValue(int value) { + analysisStatus_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The status of discovery for the resource.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @return The analysisStatus. + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus getAnalysisStatus() { + io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus result = io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.forNumber(analysisStatus_); + return result == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.UNRECOGNIZED : result; + } + /** + *
+     * The status of discovery for the resource.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @param value The analysisStatus to set. + * @return This builder for chaining. + */ + public Builder setAnalysisStatus(io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + analysisStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The status of discovery for the resource.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @return This builder for chaining. + */ + public Builder clearAnalysisStatus() { + bitField0_ = (bitField0_ & ~0x00000002); + analysisStatus_ = 0; + onChanged(); + return this; + } + + private io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysisCompleted_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder> analysisCompletedBuilder_; + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + * @return Whether the analysisCompleted field is set. + */ + public boolean hasAnalysisCompleted() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + * @return The analysisCompleted. + */ + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getAnalysisCompleted() { + if (analysisCompletedBuilder_ == null) { + return analysisCompleted_ == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; + } else { + return analysisCompletedBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + public Builder setAnalysisCompleted(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted value) { + if (analysisCompletedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisCompleted_ = value; + } else { + analysisCompletedBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + public Builder setAnalysisCompleted( + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder builderForValue) { + if (analysisCompletedBuilder_ == null) { + analysisCompleted_ = builderForValue.build(); + } else { + analysisCompletedBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + public Builder mergeAnalysisCompleted(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted value) { + if (analysisCompletedBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + analysisCompleted_ != null && + analysisCompleted_ != io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance()) { + getAnalysisCompletedBuilder().mergeFrom(value); + } else { + analysisCompleted_ = value; + } + } else { + analysisCompletedBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + public Builder clearAnalysisCompleted() { + bitField0_ = (bitField0_ & ~0x00000004); + analysisCompleted_ = null; + if (analysisCompletedBuilder_ != null) { + analysisCompletedBuilder_.dispose(); + analysisCompletedBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder getAnalysisCompletedBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAnalysisCompletedFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder getAnalysisCompletedOrBuilder() { + if (analysisCompletedBuilder_ != null) { + return analysisCompletedBuilder_.getMessageOrBuilder(); + } else { + return analysisCompleted_ == null ? + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; + } + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder> + getAnalysisCompletedFieldBuilder() { + if (analysisCompletedBuilder_ == null) { + analysisCompletedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder>( + getAnalysisCompleted(), + getParentForChildren(), + isClean()); + analysisCompleted_ = null; + } + return analysisCompletedBuilder_; + } + + private java.util.List analysisError_ = + java.util.Collections.emptyList(); + private void ensureAnalysisErrorIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + analysisError_ = new java.util.ArrayList(analysisError_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> analysisErrorBuilder_; + + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public java.util.List getAnalysisErrorList() { + if (analysisErrorBuilder_ == null) { + return java.util.Collections.unmodifiableList(analysisError_); + } else { + return analysisErrorBuilder_.getMessageList(); + } + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public int getAnalysisErrorCount() { + if (analysisErrorBuilder_ == null) { + return analysisError_.size(); + } else { + return analysisErrorBuilder_.getCount(); + } + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public com.google.rpc.Status getAnalysisError(int index) { + if (analysisErrorBuilder_ == null) { + return analysisError_.get(index); + } else { + return analysisErrorBuilder_.getMessage(index); + } + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder setAnalysisError( + int index, com.google.rpc.Status value) { + if (analysisErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysisErrorIsMutable(); + analysisError_.set(index, value); + onChanged(); + } else { + analysisErrorBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder setAnalysisError( + int index, com.google.rpc.Status.Builder builderForValue) { + if (analysisErrorBuilder_ == null) { + ensureAnalysisErrorIsMutable(); + analysisError_.set(index, builderForValue.build()); + onChanged(); + } else { + analysisErrorBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder addAnalysisError(com.google.rpc.Status value) { + if (analysisErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysisErrorIsMutable(); + analysisError_.add(value); + onChanged(); + } else { + analysisErrorBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder addAnalysisError( + int index, com.google.rpc.Status value) { + if (analysisErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysisErrorIsMutable(); + analysisError_.add(index, value); + onChanged(); + } else { + analysisErrorBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder addAnalysisError( + com.google.rpc.Status.Builder builderForValue) { + if (analysisErrorBuilder_ == null) { + ensureAnalysisErrorIsMutable(); + analysisError_.add(builderForValue.build()); + onChanged(); + } else { + analysisErrorBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder addAnalysisError( + int index, com.google.rpc.Status.Builder builderForValue) { + if (analysisErrorBuilder_ == null) { + ensureAnalysisErrorIsMutable(); + analysisError_.add(index, builderForValue.build()); + onChanged(); + } else { + analysisErrorBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder addAllAnalysisError( + java.lang.Iterable values) { + if (analysisErrorBuilder_ == null) { + ensureAnalysisErrorIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, analysisError_); + onChanged(); + } else { + analysisErrorBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder clearAnalysisError() { + if (analysisErrorBuilder_ == null) { + analysisError_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + analysisErrorBuilder_.clear(); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder removeAnalysisError(int index) { + if (analysisErrorBuilder_ == null) { + ensureAnalysisErrorIsMutable(); + analysisError_.remove(index); + onChanged(); + } else { + analysisErrorBuilder_.remove(index); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public com.google.rpc.Status.Builder getAnalysisErrorBuilder( + int index) { + return getAnalysisErrorFieldBuilder().getBuilder(index); + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public com.google.rpc.StatusOrBuilder getAnalysisErrorOrBuilder( + int index) { + if (analysisErrorBuilder_ == null) { + return analysisError_.get(index); } else { + return analysisErrorBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public java.util.List + getAnalysisErrorOrBuilderList() { + if (analysisErrorBuilder_ != null) { + return analysisErrorBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(analysisError_); + } + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public com.google.rpc.Status.Builder addAnalysisErrorBuilder() { + return getAnalysisErrorFieldBuilder().addBuilder( + com.google.rpc.Status.getDefaultInstance()); + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public com.google.rpc.Status.Builder addAnalysisErrorBuilder( + int index) { + return getAnalysisErrorFieldBuilder().addBuilder( + index, com.google.rpc.Status.getDefaultInstance()); + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public java.util.List + getAnalysisErrorBuilderList() { + return getAnalysisErrorFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getAnalysisErrorFieldBuilder() { + if (analysisErrorBuilder_ == null) { + analysisErrorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + analysisError_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + analysisError_ = null; + } + return analysisErrorBuilder_; + } + + private com.google.rpc.Status analysisStatusError_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> analysisStatusErrorBuilder_; + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + * @return Whether the analysisStatusError field is set. + */ + public boolean hasAnalysisStatusError() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + * @return The analysisStatusError. + */ + public com.google.rpc.Status getAnalysisStatusError() { + if (analysisStatusErrorBuilder_ == null) { + return analysisStatusError_ == null ? com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; + } else { + return analysisStatusErrorBuilder_.getMessage(); + } + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + public Builder setAnalysisStatusError(com.google.rpc.Status value) { + if (analysisStatusErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisStatusError_ = value; + } else { + analysisStatusErrorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + public Builder setAnalysisStatusError( + com.google.rpc.Status.Builder builderForValue) { + if (analysisStatusErrorBuilder_ == null) { + analysisStatusError_ = builderForValue.build(); + } else { + analysisStatusErrorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + public Builder mergeAnalysisStatusError(com.google.rpc.Status value) { + if (analysisStatusErrorBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + analysisStatusError_ != null && + analysisStatusError_ != com.google.rpc.Status.getDefaultInstance()) { + getAnalysisStatusErrorBuilder().mergeFrom(value); + } else { + analysisStatusError_ = value; + } + } else { + analysisStatusErrorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + public Builder clearAnalysisStatusError() { + bitField0_ = (bitField0_ & ~0x00000010); + analysisStatusError_ = null; + if (analysisStatusErrorBuilder_ != null) { + analysisStatusErrorBuilder_.dispose(); + analysisStatusErrorBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + public com.google.rpc.Status.Builder getAnalysisStatusErrorBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getAnalysisStatusErrorFieldBuilder().getBuilder(); + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + public com.google.rpc.StatusOrBuilder getAnalysisStatusErrorOrBuilder() { + if (analysisStatusErrorBuilder_ != null) { + return analysisStatusErrorBuilder_.getMessageOrBuilder(); + } else { + return analysisStatusError_ == null ? + com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; + } + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getAnalysisStatusErrorFieldBuilder() { + if (analysisStatusErrorBuilder_ == null) { + analysisStatusErrorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getAnalysisStatusError(), + getParentForChildren(), + isClean()); + analysisStatusError_ = null; + } + return analysisStatusErrorBuilder_; + } + + private java.lang.Object cpe_ = ""; + /** + *
+     * The CPE of the resource being scanned.
+     * 
+ * + * string cpe = 4; + * @return The cpe. + */ + public java.lang.String getCpe() { + java.lang.Object ref = cpe_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpe_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The CPE of the resource being scanned.
+     * 
+ * + * string cpe = 4; + * @return The bytes for cpe. + */ + public com.google.protobuf.ByteString + getCpeBytes() { + java.lang.Object ref = cpe_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The CPE of the resource being scanned.
+     * 
+ * + * string cpe = 4; + * @param value The cpe to set. + * @return This builder for chaining. + */ + public Builder setCpe( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpe_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The CPE of the resource being scanned.
+     * 
+ * + * string cpe = 4; + * @return This builder for chaining. + */ + public Builder clearCpe() { + cpe_ = getDefaultInstance().getCpe(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The CPE of the resource being scanned.
+     * 
+ * + * string cpe = 4; + * @param value The bytes for cpe to set. + * @return This builder for chaining. + */ + public Builder setCpeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpe_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastScanTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastScanTimeBuilder_; + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * @return Whether the lastScanTime field is set. + */ + public boolean hasLastScanTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * @return The lastScanTime. + */ + public com.google.protobuf.Timestamp getLastScanTime() { + if (lastScanTimeBuilder_ == null) { + return lastScanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; + } else { + return lastScanTimeBuilder_.getMessage(); + } + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public Builder setLastScanTime(com.google.protobuf.Timestamp value) { + if (lastScanTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastScanTime_ = value; + } else { + lastScanTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public Builder setLastScanTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastScanTimeBuilder_ == null) { + lastScanTime_ = builderForValue.build(); + } else { + lastScanTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public Builder mergeLastScanTime(com.google.protobuf.Timestamp value) { + if (lastScanTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + lastScanTime_ != null && + lastScanTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLastScanTimeBuilder().mergeFrom(value); + } else { + lastScanTime_ = value; + } + } else { + lastScanTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public Builder clearLastScanTime() { + bitField0_ = (bitField0_ & ~0x00000040); + lastScanTime_ = null; + if (lastScanTimeBuilder_ != null) { + lastScanTimeBuilder_.dispose(); + lastScanTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getLastScanTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getLastScanTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getLastScanTimeOrBuilder() { + if (lastScanTimeBuilder_ != null) { + return lastScanTimeBuilder_.getMessageOrBuilder(); + } else { + return lastScanTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; + } + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getLastScanTimeFieldBuilder() { + if (lastScanTimeBuilder_ == null) { + lastScanTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getLastScanTime(), + getParentForChildren(), + isClean()); + lastScanTime_ = null; + } + return lastScanTimeBuilder_; + } + + private com.google.protobuf.Timestamp archiveTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> archiveTimeBuilder_; + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the archiveTime field is set. + */ + public boolean hasArchiveTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The archiveTime. + */ + public com.google.protobuf.Timestamp getArchiveTime() { + if (archiveTimeBuilder_ == null) { + return archiveTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; + } else { + return archiveTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setArchiveTime(com.google.protobuf.Timestamp value) { + if (archiveTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + archiveTime_ = value; + } else { + archiveTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setArchiveTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (archiveTimeBuilder_ == null) { + archiveTime_ = builderForValue.build(); + } else { + archiveTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeArchiveTime(com.google.protobuf.Timestamp value) { + if (archiveTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + archiveTime_ != null && + archiveTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getArchiveTimeBuilder().mergeFrom(value); + } else { + archiveTime_ = value; + } + } else { + archiveTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearArchiveTime() { + bitField0_ = (bitField0_ & ~0x00000080); + archiveTime_ = null; + if (archiveTimeBuilder_ != null) { + archiveTimeBuilder_.dispose(); + archiveTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getArchiveTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getArchiveTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getArchiveTimeOrBuilder() { + if (archiveTimeBuilder_ != null) { + return archiveTimeBuilder_.getMessageOrBuilder(); + } else { + return archiveTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; + } + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getArchiveTimeFieldBuilder() { + if (archiveTimeBuilder_ == null) { + archiveTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getArchiveTime(), + getParentForChildren(), + isClean()); + archiveTime_ = null; + } + return archiveTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DiscoveryOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DiscoveryOccurrence) + private static final io.grafeas.v1.DiscoveryOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DiscoveryOccurrence(); + } + + public static io.grafeas.v1.DiscoveryOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiscoveryOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java new file mode 100644 index 000000000000..6d5434fd5737 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java @@ -0,0 +1,218 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/discovery.proto + +package io.grafeas.v1; + +public interface DiscoveryOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DiscoveryOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Whether the resource is continuously analyzed.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @return The enum numeric value on the wire for continuousAnalysis. + */ + int getContinuousAnalysisValue(); + /** + *
+   * Whether the resource is continuously analyzed.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @return The continuousAnalysis. + */ + io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis getContinuousAnalysis(); + + /** + *
+   * The status of discovery for the resource.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @return The enum numeric value on the wire for analysisStatus. + */ + int getAnalysisStatusValue(); + /** + *
+   * The status of discovery for the resource.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @return The analysisStatus. + */ + io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus getAnalysisStatus(); + + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + * @return Whether the analysisCompleted field is set. + */ + boolean hasAnalysisCompleted(); + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + * @return The analysisCompleted. + */ + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getAnalysisCompleted(); + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder getAnalysisCompletedOrBuilder(); + + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + java.util.List + getAnalysisErrorList(); + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + com.google.rpc.Status getAnalysisError(int index); + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + int getAnalysisErrorCount(); + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + java.util.List + getAnalysisErrorOrBuilderList(); + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + com.google.rpc.StatusOrBuilder getAnalysisErrorOrBuilder( + int index); + + /** + *
+   * When an error is encountered this will contain a LocalizedMessage under
+   * details to show to the user. The LocalizedMessage is output only and
+   * populated by the API.
+   * 
+ * + * .google.rpc.Status analysis_status_error = 3; + * @return Whether the analysisStatusError field is set. + */ + boolean hasAnalysisStatusError(); + /** + *
+   * When an error is encountered this will contain a LocalizedMessage under
+   * details to show to the user. The LocalizedMessage is output only and
+   * populated by the API.
+   * 
+ * + * .google.rpc.Status analysis_status_error = 3; + * @return The analysisStatusError. + */ + com.google.rpc.Status getAnalysisStatusError(); + /** + *
+   * When an error is encountered this will contain a LocalizedMessage under
+   * details to show to the user. The LocalizedMessage is output only and
+   * populated by the API.
+   * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + com.google.rpc.StatusOrBuilder getAnalysisStatusErrorOrBuilder(); + + /** + *
+   * The CPE of the resource being scanned.
+   * 
+ * + * string cpe = 4; + * @return The cpe. + */ + java.lang.String getCpe(); + /** + *
+   * The CPE of the resource being scanned.
+   * 
+ * + * string cpe = 4; + * @return The bytes for cpe. + */ + com.google.protobuf.ByteString + getCpeBytes(); + + /** + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * @return Whether the lastScanTime field is set. + */ + boolean hasLastScanTime(); + /** + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * @return The lastScanTime. + */ + com.google.protobuf.Timestamp getLastScanTime(); + /** + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getLastScanTimeOrBuilder(); + + /** + *
+   * The time occurrences related to this discovery occurrence were archived.
+   * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the archiveTime field is set. + */ + boolean hasArchiveTime(); + /** + *
+   * The time occurrences related to this discovery occurrence were archived.
+   * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The archiveTime. + */ + com.google.protobuf.Timestamp getArchiveTime(); + /** + *
+   * The time occurrences related to this discovery occurrence were archived.
+   * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getArchiveTimeOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java new file mode 100644 index 000000000000..fe74a108d6d7 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java @@ -0,0 +1,1439 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +/** + *
+ * This represents a particular channel of distribution for a given package.
+ * E.g., Debian's jessie-backports dpkg mirror.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Distribution} + */ +public final class Distribution extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Distribution) + DistributionOrBuilder { +private static final long serialVersionUID = 0L; + // Use Distribution.newBuilder() to construct. + private Distribution(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Distribution() { + cpeUri_ = ""; + architecture_ = 0; + maintainer_ = ""; + url_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Distribution(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Distribution.class, io.grafeas.v1.Distribution.Builder.class); + } + + public static final int CPE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cpeUri_ = ""; + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The cpeUri. + */ + @java.lang.Override + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } + } + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for cpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 2; + private int architecture_ = 0; + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override public int getArchitectureValue() { + return architecture_; + } + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @return The architecture. + */ + @java.lang.Override public io.grafeas.v1.Architecture getArchitecture() { + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); + return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; + } + + public static final int LATEST_VERSION_FIELD_NUMBER = 3; + private io.grafeas.v1.Version latestVersion_; + /** + *
+   * The latest available version of this package in this distribution channel.
+   * 
+ * + * .grafeas.v1.Version latest_version = 3; + * @return Whether the latestVersion field is set. + */ + @java.lang.Override + public boolean hasLatestVersion() { + return latestVersion_ != null; + } + /** + *
+   * The latest available version of this package in this distribution channel.
+   * 
+ * + * .grafeas.v1.Version latest_version = 3; + * @return The latestVersion. + */ + @java.lang.Override + public io.grafeas.v1.Version getLatestVersion() { + return latestVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; + } + /** + *
+   * The latest available version of this package in this distribution channel.
+   * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getLatestVersionOrBuilder() { + return latestVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; + } + + public static final int MAINTAINER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object maintainer_ = ""; + /** + *
+   * A freeform string denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 4; + * @return The maintainer. + */ + @java.lang.Override + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + maintainer_ = s; + return s; + } + } + /** + *
+   * A freeform string denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 4; + * @return The bytes for maintainer. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+   * The distribution channel-specific homepage for this package.
+   * 
+ * + * string url = 5; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+   * The distribution channel-specific homepage for this package.
+   * 
+ * + * string url = 5; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * The distribution channel-specific description of this package.
+   * 
+ * + * string description = 6; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The distribution channel-specific description of this package.
+   * 
+ * + * string description = 6; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); + } + if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, architecture_); + } + if (latestVersion_ != null) { + output.writeMessage(3, getLatestVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, maintainer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); + } + if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, architecture_); + } + if (latestVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLatestVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, maintainer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Distribution)) { + return super.equals(obj); + } + io.grafeas.v1.Distribution other = (io.grafeas.v1.Distribution) obj; + + if (!getCpeUri() + .equals(other.getCpeUri())) return false; + if (architecture_ != other.architecture_) return false; + if (hasLatestVersion() != other.hasLatestVersion()) return false; + if (hasLatestVersion()) { + if (!getLatestVersion() + .equals(other.getLatestVersion())) return false; + } + if (!getMaintainer() + .equals(other.getMaintainer())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCpeUri().hashCode(); + hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + architecture_; + if (hasLatestVersion()) { + hash = (37 * hash) + LATEST_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getLatestVersion().hashCode(); + } + hash = (37 * hash) + MAINTAINER_FIELD_NUMBER; + hash = (53 * hash) + getMaintainer().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Distribution parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Distribution parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Distribution parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Distribution parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Distribution parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Distribution parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Distribution parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Distribution parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Distribution parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Distribution parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Distribution parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Distribution parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Distribution prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * This represents a particular channel of distribution for a given package.
+   * E.g., Debian's jessie-backports dpkg mirror.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Distribution} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Distribution) + io.grafeas.v1.DistributionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Distribution.class, io.grafeas.v1.Distribution.Builder.class); + } + + // Construct using io.grafeas.v1.Distribution.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cpeUri_ = ""; + architecture_ = 0; + latestVersion_ = null; + if (latestVersionBuilder_ != null) { + latestVersionBuilder_.dispose(); + latestVersionBuilder_ = null; + } + maintainer_ = ""; + url_ = ""; + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Distribution getDefaultInstanceForType() { + return io.grafeas.v1.Distribution.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Distribution build() { + io.grafeas.v1.Distribution result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Distribution buildPartial() { + io.grafeas.v1.Distribution result = new io.grafeas.v1.Distribution(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Distribution result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cpeUri_ = cpeUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.architecture_ = architecture_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.latestVersion_ = latestVersionBuilder_ == null + ? latestVersion_ + : latestVersionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.maintainer_ = maintainer_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Distribution) { + return mergeFrom((io.grafeas.v1.Distribution)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Distribution other) { + if (other == io.grafeas.v1.Distribution.getDefaultInstance()) return this; + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.architecture_ != 0) { + setArchitectureValue(other.getArchitectureValue()); + } + if (other.hasLatestVersion()) { + mergeLatestVersion(other.getLatestVersion()); + } + if (!other.getMaintainer().isEmpty()) { + maintainer_ = other.maintainer_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + architecture_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + input.readMessage( + getLatestVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + maintainer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cpeUri_ = ""; + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearCpeUri() { + cpeUri_ = getDefaultInstance().getCpeUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int architecture_ = 0; + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override public int getArchitectureValue() { + return architecture_; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @param value The enum numeric value on the wire for architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitectureValue(int value) { + architecture_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @return The architecture. + */ + @java.lang.Override + public io.grafeas.v1.Architecture getArchitecture() { + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); + return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @param value The architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitecture(io.grafeas.v1.Architecture value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + architecture_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @return This builder for chaining. + */ + public Builder clearArchitecture() { + bitField0_ = (bitField0_ & ~0x00000002); + architecture_ = 0; + onChanged(); + return this; + } + + private io.grafeas.v1.Version latestVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> latestVersionBuilder_; + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + * @return Whether the latestVersion field is set. + */ + public boolean hasLatestVersion() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + * @return The latestVersion. + */ + public io.grafeas.v1.Version getLatestVersion() { + if (latestVersionBuilder_ == null) { + return latestVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; + } else { + return latestVersionBuilder_.getMessage(); + } + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + public Builder setLatestVersion(io.grafeas.v1.Version value) { + if (latestVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latestVersion_ = value; + } else { + latestVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + public Builder setLatestVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (latestVersionBuilder_ == null) { + latestVersion_ = builderForValue.build(); + } else { + latestVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + public Builder mergeLatestVersion(io.grafeas.v1.Version value) { + if (latestVersionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + latestVersion_ != null && + latestVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { + getLatestVersionBuilder().mergeFrom(value); + } else { + latestVersion_ = value; + } + } else { + latestVersionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + public Builder clearLatestVersion() { + bitField0_ = (bitField0_ & ~0x00000004); + latestVersion_ = null; + if (latestVersionBuilder_ != null) { + latestVersionBuilder_.dispose(); + latestVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + public io.grafeas.v1.Version.Builder getLatestVersionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getLatestVersionFieldBuilder().getBuilder(); + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + public io.grafeas.v1.VersionOrBuilder getLatestVersionOrBuilder() { + if (latestVersionBuilder_ != null) { + return latestVersionBuilder_.getMessageOrBuilder(); + } else { + return latestVersion_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; + } + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getLatestVersionFieldBuilder() { + if (latestVersionBuilder_ == null) { + latestVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getLatestVersion(), + getParentForChildren(), + isClean()); + latestVersion_ = null; + } + return latestVersionBuilder_; + } + + private java.lang.Object maintainer_ = ""; + /** + *
+     * A freeform string denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 4; + * @return The maintainer. + */ + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + maintainer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A freeform string denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 4; + * @return The bytes for maintainer. + */ + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A freeform string denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 4; + * @param value The maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainer( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + maintainer_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * A freeform string denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 4; + * @return This builder for chaining. + */ + public Builder clearMaintainer() { + maintainer_ = getDefaultInstance().getMaintainer(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * A freeform string denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 4; + * @param value The bytes for maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + maintainer_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+     * The distribution channel-specific homepage for this package.
+     * 
+ * + * string url = 5; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The distribution channel-specific homepage for this package.
+     * 
+ * + * string url = 5; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The distribution channel-specific homepage for this package.
+     * 
+ * + * string url = 5; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The distribution channel-specific homepage for this package.
+     * 
+ * + * string url = 5; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * The distribution channel-specific homepage for this package.
+     * 
+ * + * string url = 5; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The distribution channel-specific description of this package.
+     * 
+ * + * string description = 6; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The distribution channel-specific description of this package.
+     * 
+ * + * string description = 6; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The distribution channel-specific description of this package.
+     * 
+ * + * string description = 6; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The distribution channel-specific description of this package.
+     * 
+ * + * string description = 6; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The distribution channel-specific description of this package.
+     * 
+ * + * string description = 6; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Distribution) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Distribution) + private static final io.grafeas.v1.Distribution DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Distribution(); + } + + public static io.grafeas.v1.Distribution getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Distribution parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Distribution getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java new file mode 100644 index 000000000000..68a9704ee42d --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java @@ -0,0 +1,139 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +public interface DistributionOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Distribution) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The cpeUri. + */ + java.lang.String getCpeUri(); + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for cpeUri. + */ + com.google.protobuf.ByteString + getCpeUriBytes(); + + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @return The enum numeric value on the wire for architecture. + */ + int getArchitectureValue(); + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @return The architecture. + */ + io.grafeas.v1.Architecture getArchitecture(); + + /** + *
+   * The latest available version of this package in this distribution channel.
+   * 
+ * + * .grafeas.v1.Version latest_version = 3; + * @return Whether the latestVersion field is set. + */ + boolean hasLatestVersion(); + /** + *
+   * The latest available version of this package in this distribution channel.
+   * 
+ * + * .grafeas.v1.Version latest_version = 3; + * @return The latestVersion. + */ + io.grafeas.v1.Version getLatestVersion(); + /** + *
+   * The latest available version of this package in this distribution channel.
+   * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + io.grafeas.v1.VersionOrBuilder getLatestVersionOrBuilder(); + + /** + *
+   * A freeform string denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 4; + * @return The maintainer. + */ + java.lang.String getMaintainer(); + /** + *
+   * A freeform string denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 4; + * @return The bytes for maintainer. + */ + com.google.protobuf.ByteString + getMaintainerBytes(); + + /** + *
+   * The distribution channel-specific homepage for this package.
+   * 
+ * + * string url = 5; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+   * The distribution channel-specific homepage for this package.
+   * 
+ * + * string url = 5; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+   * The distribution channel-specific description of this package.
+   * 
+ * + * string description = 6; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The distribution channel-specific description of this package.
+   * 
+ * + * string description = 6; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java new file mode 100644 index 000000000000..00a87936ba93 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/dsse_attestation.proto + +package io.grafeas.v1; + +public final class DsseAttestation { + private DsseAttestation() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DSSEAttestationNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n!grafeas/v1/dsse_attestation.proto\022\ngra" + + "feas.v1\032\027grafeas/v1/common.proto\032!grafea" + + "s/v1/intoto_statement.proto\"v\n\023DSSEAttes" + + "tationNote\0226\n\004hint\030\001 \001(\0132(.grafeas.v1.DS" + + "SEAttestationNote.DSSEHint\032\'\n\010DSSEHint\022\033" + + "\n\023human_readable_name\030\001 \001(\t\"\210\001\n\031DSSEAtte" + + "stationOccurrence\022&\n\010envelope\030\001 \001(\0132\024.gr" + + "afeas.v1.Envelope\0220\n\tstatement\030\002 \001(\0132\033.g" + + "rafeas.v1.InTotoStatementH\000B\021\n\017decoded_p" + + "ayloadBQ\n\rio.grafeas.v1P\001Z8google.golang" + + ".org/genproto/googleapis/grafeas/v1;graf" + + "eas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grafeas.v1.Common.getDescriptor(), + io.grafeas.v1.InTotoStatementProto.getDescriptor(), + }); + internal_static_grafeas_v1_DSSEAttestationNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DSSEAttestationNote_descriptor, + new java.lang.String[] { "Hint", }); + internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor = + internal_static_grafeas_v1_DSSEAttestationNote_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor, + new java.lang.String[] { "HumanReadableName", }); + internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor, + new java.lang.String[] { "Envelope", "Statement", "DecodedPayload", }); + io.grafeas.v1.Common.getDescriptor(); + io.grafeas.v1.InTotoStatementProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java new file mode 100644 index 000000000000..62f692aff974 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java @@ -0,0 +1,977 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + *
+ * MUST match
+ * https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An
+ * authenticated message of arbitrary type.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Envelope} + */ +public final class Envelope extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Envelope) + EnvelopeOrBuilder { +private static final long serialVersionUID = 0L; + // Use Envelope.newBuilder() to construct. + private Envelope(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Envelope() { + payload_ = com.google.protobuf.ByteString.EMPTY; + payloadType_ = ""; + signatures_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Envelope(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Envelope.class, io.grafeas.v1.Envelope.Builder.class); + } + + public static final int PAYLOAD_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes payload = 1; + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + public static final int PAYLOAD_TYPE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object payloadType_ = ""; + /** + * string payload_type = 2; + * @return The payloadType. + */ + @java.lang.Override + public java.lang.String getPayloadType() { + java.lang.Object ref = payloadType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payloadType_ = s; + return s; + } + } + /** + * string payload_type = 2; + * @return The bytes for payloadType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPayloadTypeBytes() { + java.lang.Object ref = payloadType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payloadType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIGNATURES_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List signatures_; + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + @java.lang.Override + public java.util.List getSignaturesList() { + return signatures_; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + @java.lang.Override + public java.util.List + getSignaturesOrBuilderList() { + return signatures_; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + @java.lang.Override + public int getSignaturesCount() { + return signatures_.size(); + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + @java.lang.Override + public io.grafeas.v1.EnvelopeSignature getSignatures(int index) { + return signatures_.get(index); + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + @java.lang.Override + public io.grafeas.v1.EnvelopeSignatureOrBuilder getSignaturesOrBuilder( + int index) { + return signatures_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!payload_.isEmpty()) { + output.writeBytes(1, payload_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, payloadType_); + } + for (int i = 0; i < signatures_.size(); i++) { + output.writeMessage(3, signatures_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, payload_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, payloadType_); + } + for (int i = 0; i < signatures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, signatures_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Envelope)) { + return super.equals(obj); + } + io.grafeas.v1.Envelope other = (io.grafeas.v1.Envelope) obj; + + if (!getPayload() + .equals(other.getPayload())) return false; + if (!getPayloadType() + .equals(other.getPayloadType())) return false; + if (!getSignaturesList() + .equals(other.getSignaturesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPayloadType().hashCode(); + if (getSignaturesCount() > 0) { + hash = (37 * hash) + SIGNATURES_FIELD_NUMBER; + hash = (53 * hash) + getSignaturesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Envelope parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Envelope parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Envelope parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Envelope parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Envelope parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Envelope parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Envelope parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Envelope parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Envelope parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Envelope parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Envelope parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Envelope parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Envelope prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * MUST match
+   * https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An
+   * authenticated message of arbitrary type.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Envelope} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Envelope) + io.grafeas.v1.EnvelopeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Envelope.class, io.grafeas.v1.Envelope.Builder.class); + } + + // Construct using io.grafeas.v1.Envelope.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + payload_ = com.google.protobuf.ByteString.EMPTY; + payloadType_ = ""; + if (signaturesBuilder_ == null) { + signatures_ = java.util.Collections.emptyList(); + } else { + signatures_ = null; + signaturesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Envelope getDefaultInstanceForType() { + return io.grafeas.v1.Envelope.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Envelope build() { + io.grafeas.v1.Envelope result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Envelope buildPartial() { + io.grafeas.v1.Envelope result = new io.grafeas.v1.Envelope(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.Envelope result) { + if (signaturesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + signatures_ = java.util.Collections.unmodifiableList(signatures_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.signatures_ = signatures_; + } else { + result.signatures_ = signaturesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.Envelope result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.payload_ = payload_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.payloadType_ = payloadType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Envelope) { + return mergeFrom((io.grafeas.v1.Envelope)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Envelope other) { + if (other == io.grafeas.v1.Envelope.getDefaultInstance()) return this; + if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { + setPayload(other.getPayload()); + } + if (!other.getPayloadType().isEmpty()) { + payloadType_ = other.payloadType_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (signaturesBuilder_ == null) { + if (!other.signatures_.isEmpty()) { + if (signatures_.isEmpty()) { + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSignaturesIsMutable(); + signatures_.addAll(other.signatures_); + } + onChanged(); + } + } else { + if (!other.signatures_.isEmpty()) { + if (signaturesBuilder_.isEmpty()) { + signaturesBuilder_.dispose(); + signaturesBuilder_ = null; + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000004); + signaturesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSignaturesFieldBuilder() : null; + } else { + signaturesBuilder_.addAllMessages(other.signatures_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + payload_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + payloadType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + io.grafeas.v1.EnvelopeSignature m = + input.readMessage( + io.grafeas.v1.EnvelopeSignature.parser(), + extensionRegistry); + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(m); + } else { + signaturesBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes payload = 1; + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + /** + * bytes payload = 1; + * @param value The payload to set. + * @return This builder for chaining. + */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + payload_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bytes payload = 1; + * @return This builder for chaining. + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000001); + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + + private java.lang.Object payloadType_ = ""; + /** + * string payload_type = 2; + * @return The payloadType. + */ + public java.lang.String getPayloadType() { + java.lang.Object ref = payloadType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payloadType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string payload_type = 2; + * @return The bytes for payloadType. + */ + public com.google.protobuf.ByteString + getPayloadTypeBytes() { + java.lang.Object ref = payloadType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payloadType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string payload_type = 2; + * @param value The payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + payloadType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string payload_type = 2; + * @return This builder for chaining. + */ + public Builder clearPayloadType() { + payloadType_ = getDefaultInstance().getPayloadType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string payload_type = 2; + * @param value The bytes for payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + payloadType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List signatures_ = + java.util.Collections.emptyList(); + private void ensureSignaturesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + signatures_ = new java.util.ArrayList(signatures_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.EnvelopeSignature, io.grafeas.v1.EnvelopeSignature.Builder, io.grafeas.v1.EnvelopeSignatureOrBuilder> signaturesBuilder_; + + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public java.util.List getSignaturesList() { + if (signaturesBuilder_ == null) { + return java.util.Collections.unmodifiableList(signatures_); + } else { + return signaturesBuilder_.getMessageList(); + } + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public int getSignaturesCount() { + if (signaturesBuilder_ == null) { + return signatures_.size(); + } else { + return signaturesBuilder_.getCount(); + } + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public io.grafeas.v1.EnvelopeSignature getSignatures(int index) { + if (signaturesBuilder_ == null) { + return signatures_.get(index); + } else { + return signaturesBuilder_.getMessage(index); + } + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder setSignatures( + int index, io.grafeas.v1.EnvelopeSignature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.set(index, value); + onChanged(); + } else { + signaturesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder setSignatures( + int index, io.grafeas.v1.EnvelopeSignature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.set(index, builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder addSignatures(io.grafeas.v1.EnvelopeSignature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(value); + onChanged(); + } else { + signaturesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder addSignatures( + int index, io.grafeas.v1.EnvelopeSignature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(index, value); + onChanged(); + } else { + signaturesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder addSignatures( + io.grafeas.v1.EnvelopeSignature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder addSignatures( + int index, io.grafeas.v1.EnvelopeSignature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(index, builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder addAllSignatures( + java.lang.Iterable values) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, signatures_); + onChanged(); + } else { + signaturesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder clearSignatures() { + if (signaturesBuilder_ == null) { + signatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + signaturesBuilder_.clear(); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder removeSignatures(int index) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.remove(index); + onChanged(); + } else { + signaturesBuilder_.remove(index); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public io.grafeas.v1.EnvelopeSignature.Builder getSignaturesBuilder( + int index) { + return getSignaturesFieldBuilder().getBuilder(index); + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public io.grafeas.v1.EnvelopeSignatureOrBuilder getSignaturesOrBuilder( + int index) { + if (signaturesBuilder_ == null) { + return signatures_.get(index); } else { + return signaturesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public java.util.List + getSignaturesOrBuilderList() { + if (signaturesBuilder_ != null) { + return signaturesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(signatures_); + } + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public io.grafeas.v1.EnvelopeSignature.Builder addSignaturesBuilder() { + return getSignaturesFieldBuilder().addBuilder( + io.grafeas.v1.EnvelopeSignature.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public io.grafeas.v1.EnvelopeSignature.Builder addSignaturesBuilder( + int index) { + return getSignaturesFieldBuilder().addBuilder( + index, io.grafeas.v1.EnvelopeSignature.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public java.util.List + getSignaturesBuilderList() { + return getSignaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.EnvelopeSignature, io.grafeas.v1.EnvelopeSignature.Builder, io.grafeas.v1.EnvelopeSignatureOrBuilder> + getSignaturesFieldBuilder() { + if (signaturesBuilder_ == null) { + signaturesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.EnvelopeSignature, io.grafeas.v1.EnvelopeSignature.Builder, io.grafeas.v1.EnvelopeSignatureOrBuilder>( + signatures_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + signatures_ = null; + } + return signaturesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Envelope) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Envelope) + private static final io.grafeas.v1.Envelope DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Envelope(); + } + + public static io.grafeas.v1.Envelope getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Envelope parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Envelope getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java new file mode 100644 index 000000000000..836bb5b989d0 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public interface EnvelopeOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Envelope) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes payload = 1; + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); + + /** + * string payload_type = 2; + * @return The payloadType. + */ + java.lang.String getPayloadType(); + /** + * string payload_type = 2; + * @return The bytes for payloadType. + */ + com.google.protobuf.ByteString + getPayloadTypeBytes(); + + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + java.util.List + getSignaturesList(); + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + io.grafeas.v1.EnvelopeSignature getSignatures(int index); + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + int getSignaturesCount(); + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + java.util.List + getSignaturesOrBuilderList(); + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + io.grafeas.v1.EnvelopeSignatureOrBuilder getSignaturesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java new file mode 100644 index 000000000000..d3bec7230117 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java @@ -0,0 +1,611 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.EnvelopeSignature} + */ +public final class EnvelopeSignature extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.EnvelopeSignature) + EnvelopeSignatureOrBuilder { +private static final long serialVersionUID = 0L; + // Use EnvelopeSignature.newBuilder() to construct. + private EnvelopeSignature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EnvelopeSignature() { + sig_ = com.google.protobuf.ByteString.EMPTY; + keyid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EnvelopeSignature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.EnvelopeSignature.class, io.grafeas.v1.EnvelopeSignature.Builder.class); + } + + public static final int SIG_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString sig_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes sig = 1; + * @return The sig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSig() { + return sig_; + } + + public static final int KEYID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object keyid_ = ""; + /** + * string keyid = 2; + * @return The keyid. + */ + @java.lang.Override + public java.lang.String getKeyid() { + java.lang.Object ref = keyid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyid_ = s; + return s; + } + } + /** + * string keyid = 2; + * @return The bytes for keyid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyidBytes() { + java.lang.Object ref = keyid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keyid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!sig_.isEmpty()) { + output.writeBytes(1, sig_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keyid_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!sig_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, sig_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, keyid_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.EnvelopeSignature)) { + return super.equals(obj); + } + io.grafeas.v1.EnvelopeSignature other = (io.grafeas.v1.EnvelopeSignature) obj; + + if (!getSig() + .equals(other.getSig())) return false; + if (!getKeyid() + .equals(other.getKeyid())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SIG_FIELD_NUMBER; + hash = (53 * hash) + getSig().hashCode(); + hash = (37 * hash) + KEYID_FIELD_NUMBER; + hash = (53 * hash) + getKeyid().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.EnvelopeSignature parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.EnvelopeSignature parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.EnvelopeSignature parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.EnvelopeSignature prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.EnvelopeSignature} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.EnvelopeSignature) + io.grafeas.v1.EnvelopeSignatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.EnvelopeSignature.class, io.grafeas.v1.EnvelopeSignature.Builder.class); + } + + // Construct using io.grafeas.v1.EnvelopeSignature.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sig_ = com.google.protobuf.ByteString.EMPTY; + keyid_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.EnvelopeSignature getDefaultInstanceForType() { + return io.grafeas.v1.EnvelopeSignature.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.EnvelopeSignature build() { + io.grafeas.v1.EnvelopeSignature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.EnvelopeSignature buildPartial() { + io.grafeas.v1.EnvelopeSignature result = new io.grafeas.v1.EnvelopeSignature(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.EnvelopeSignature result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sig_ = sig_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.keyid_ = keyid_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.EnvelopeSignature) { + return mergeFrom((io.grafeas.v1.EnvelopeSignature)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.EnvelopeSignature other) { + if (other == io.grafeas.v1.EnvelopeSignature.getDefaultInstance()) return this; + if (other.getSig() != com.google.protobuf.ByteString.EMPTY) { + setSig(other.getSig()); + } + if (!other.getKeyid().isEmpty()) { + keyid_ = other.keyid_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + sig_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + keyid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString sig_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes sig = 1; + * @return The sig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSig() { + return sig_; + } + /** + * bytes sig = 1; + * @param value The sig to set. + * @return This builder for chaining. + */ + public Builder setSig(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + sig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bytes sig = 1; + * @return This builder for chaining. + */ + public Builder clearSig() { + bitField0_ = (bitField0_ & ~0x00000001); + sig_ = getDefaultInstance().getSig(); + onChanged(); + return this; + } + + private java.lang.Object keyid_ = ""; + /** + * string keyid = 2; + * @return The keyid. + */ + public java.lang.String getKeyid() { + java.lang.Object ref = keyid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string keyid = 2; + * @return The bytes for keyid. + */ + public com.google.protobuf.ByteString + getKeyidBytes() { + java.lang.Object ref = keyid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keyid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string keyid = 2; + * @param value The keyid to set. + * @return This builder for chaining. + */ + public Builder setKeyid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + keyid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string keyid = 2; + * @return This builder for chaining. + */ + public Builder clearKeyid() { + keyid_ = getDefaultInstance().getKeyid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string keyid = 2; + * @param value The bytes for keyid to set. + * @return This builder for chaining. + */ + public Builder setKeyidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + keyid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.EnvelopeSignature) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.EnvelopeSignature) + private static final io.grafeas.v1.EnvelopeSignature DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.EnvelopeSignature(); + } + + public static io.grafeas.v1.EnvelopeSignature getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnvelopeSignature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.EnvelopeSignature getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java new file mode 100644 index 000000000000..13a73d048cf2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public interface EnvelopeSignatureOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.EnvelopeSignature) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes sig = 1; + * @return The sig. + */ + com.google.protobuf.ByteString getSig(); + + /** + * string keyid = 2; + * @return The keyid. + */ + java.lang.String getKeyid(); + /** + * string keyid = 2; + * @return The bytes for keyid. + */ + com.google.protobuf.ByteString + getKeyidBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java new file mode 100644 index 000000000000..95a37b40792a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java @@ -0,0 +1,864 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Container message for hashes of byte content of files, used in source
+ * messages to verify integrity of source input to the build.
+ * 
+ * + * Protobuf type {@code grafeas.v1.FileHashes} + */ +public final class FileHashes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.FileHashes) + FileHashesOrBuilder { +private static final long serialVersionUID = 0L; + // Use FileHashes.newBuilder() to construct. + private FileHashes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FileHashes() { + fileHash_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FileHashes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.FileHashes.class, io.grafeas.v1.FileHashes.Builder.class); + } + + public static final int FILE_HASH_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List fileHash_; + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + @java.lang.Override + public java.util.List getFileHashList() { + return fileHash_; + } + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + @java.lang.Override + public java.util.List + getFileHashOrBuilderList() { + return fileHash_; + } + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + @java.lang.Override + public int getFileHashCount() { + return fileHash_.size(); + } + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + @java.lang.Override + public io.grafeas.v1.Hash getFileHash(int index) { + return fileHash_.get(index); + } + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + @java.lang.Override + public io.grafeas.v1.HashOrBuilder getFileHashOrBuilder( + int index) { + return fileHash_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < fileHash_.size(); i++) { + output.writeMessage(1, fileHash_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fileHash_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, fileHash_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.FileHashes)) { + return super.equals(obj); + } + io.grafeas.v1.FileHashes other = (io.grafeas.v1.FileHashes) obj; + + if (!getFileHashList() + .equals(other.getFileHashList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFileHashCount() > 0) { + hash = (37 * hash) + FILE_HASH_FIELD_NUMBER; + hash = (53 * hash) + getFileHashList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.FileHashes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.FileHashes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.FileHashes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.FileHashes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.FileHashes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.FileHashes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.FileHashes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.FileHashes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.FileHashes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.FileHashes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.FileHashes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.FileHashes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.FileHashes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Container message for hashes of byte content of files, used in source
+   * messages to verify integrity of source input to the build.
+   * 
+ * + * Protobuf type {@code grafeas.v1.FileHashes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.FileHashes) + io.grafeas.v1.FileHashesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.FileHashes.class, io.grafeas.v1.FileHashes.Builder.class); + } + + // Construct using io.grafeas.v1.FileHashes.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (fileHashBuilder_ == null) { + fileHash_ = java.util.Collections.emptyList(); + } else { + fileHash_ = null; + fileHashBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.FileHashes getDefaultInstanceForType() { + return io.grafeas.v1.FileHashes.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.FileHashes build() { + io.grafeas.v1.FileHashes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.FileHashes buildPartial() { + io.grafeas.v1.FileHashes result = new io.grafeas.v1.FileHashes(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.FileHashes result) { + if (fileHashBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fileHash_ = java.util.Collections.unmodifiableList(fileHash_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fileHash_ = fileHash_; + } else { + result.fileHash_ = fileHashBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.FileHashes result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.FileHashes) { + return mergeFrom((io.grafeas.v1.FileHashes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.FileHashes other) { + if (other == io.grafeas.v1.FileHashes.getDefaultInstance()) return this; + if (fileHashBuilder_ == null) { + if (!other.fileHash_.isEmpty()) { + if (fileHash_.isEmpty()) { + fileHash_ = other.fileHash_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFileHashIsMutable(); + fileHash_.addAll(other.fileHash_); + } + onChanged(); + } + } else { + if (!other.fileHash_.isEmpty()) { + if (fileHashBuilder_.isEmpty()) { + fileHashBuilder_.dispose(); + fileHashBuilder_ = null; + fileHash_ = other.fileHash_; + bitField0_ = (bitField0_ & ~0x00000001); + fileHashBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFileHashFieldBuilder() : null; + } else { + fileHashBuilder_.addAllMessages(other.fileHash_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.grafeas.v1.Hash m = + input.readMessage( + io.grafeas.v1.Hash.parser(), + extensionRegistry); + if (fileHashBuilder_ == null) { + ensureFileHashIsMutable(); + fileHash_.add(m); + } else { + fileHashBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List fileHash_ = + java.util.Collections.emptyList(); + private void ensureFileHashIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fileHash_ = new java.util.ArrayList(fileHash_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Hash, io.grafeas.v1.Hash.Builder, io.grafeas.v1.HashOrBuilder> fileHashBuilder_; + + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public java.util.List getFileHashList() { + if (fileHashBuilder_ == null) { + return java.util.Collections.unmodifiableList(fileHash_); + } else { + return fileHashBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public int getFileHashCount() { + if (fileHashBuilder_ == null) { + return fileHash_.size(); + } else { + return fileHashBuilder_.getCount(); + } + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public io.grafeas.v1.Hash getFileHash(int index) { + if (fileHashBuilder_ == null) { + return fileHash_.get(index); + } else { + return fileHashBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder setFileHash( + int index, io.grafeas.v1.Hash value) { + if (fileHashBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileHashIsMutable(); + fileHash_.set(index, value); + onChanged(); + } else { + fileHashBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder setFileHash( + int index, io.grafeas.v1.Hash.Builder builderForValue) { + if (fileHashBuilder_ == null) { + ensureFileHashIsMutable(); + fileHash_.set(index, builderForValue.build()); + onChanged(); + } else { + fileHashBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder addFileHash(io.grafeas.v1.Hash value) { + if (fileHashBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileHashIsMutable(); + fileHash_.add(value); + onChanged(); + } else { + fileHashBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder addFileHash( + int index, io.grafeas.v1.Hash value) { + if (fileHashBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileHashIsMutable(); + fileHash_.add(index, value); + onChanged(); + } else { + fileHashBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder addFileHash( + io.grafeas.v1.Hash.Builder builderForValue) { + if (fileHashBuilder_ == null) { + ensureFileHashIsMutable(); + fileHash_.add(builderForValue.build()); + onChanged(); + } else { + fileHashBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder addFileHash( + int index, io.grafeas.v1.Hash.Builder builderForValue) { + if (fileHashBuilder_ == null) { + ensureFileHashIsMutable(); + fileHash_.add(index, builderForValue.build()); + onChanged(); + } else { + fileHashBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder addAllFileHash( + java.lang.Iterable values) { + if (fileHashBuilder_ == null) { + ensureFileHashIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fileHash_); + onChanged(); + } else { + fileHashBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder clearFileHash() { + if (fileHashBuilder_ == null) { + fileHash_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fileHashBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder removeFileHash(int index) { + if (fileHashBuilder_ == null) { + ensureFileHashIsMutable(); + fileHash_.remove(index); + onChanged(); + } else { + fileHashBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public io.grafeas.v1.Hash.Builder getFileHashBuilder( + int index) { + return getFileHashFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public io.grafeas.v1.HashOrBuilder getFileHashOrBuilder( + int index) { + if (fileHashBuilder_ == null) { + return fileHash_.get(index); } else { + return fileHashBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public java.util.List + getFileHashOrBuilderList() { + if (fileHashBuilder_ != null) { + return fileHashBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fileHash_); + } + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public io.grafeas.v1.Hash.Builder addFileHashBuilder() { + return getFileHashFieldBuilder().addBuilder( + io.grafeas.v1.Hash.getDefaultInstance()); + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public io.grafeas.v1.Hash.Builder addFileHashBuilder( + int index) { + return getFileHashFieldBuilder().addBuilder( + index, io.grafeas.v1.Hash.getDefaultInstance()); + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public java.util.List + getFileHashBuilderList() { + return getFileHashFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Hash, io.grafeas.v1.Hash.Builder, io.grafeas.v1.HashOrBuilder> + getFileHashFieldBuilder() { + if (fileHashBuilder_ == null) { + fileHashBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Hash, io.grafeas.v1.Hash.Builder, io.grafeas.v1.HashOrBuilder>( + fileHash_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fileHash_ = null; + } + return fileHashBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.FileHashes) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.FileHashes) + private static final io.grafeas.v1.FileHashes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.FileHashes(); + } + + public static io.grafeas.v1.FileHashes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FileHashes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.FileHashes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java new file mode 100644 index 000000000000..fd271d4029ff --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface FileHashesOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.FileHashes) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + java.util.List + getFileHashList(); + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + io.grafeas.v1.Hash getFileHash(int index); + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + int getFileHashCount(); + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + java.util.List + getFileHashOrBuilderList(); + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + io.grafeas.v1.HashOrBuilder getFileHashOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java new file mode 100644 index 000000000000..6d2ecff765e6 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java @@ -0,0 +1,587 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + *
+ * Indicates the location at which a package was found.
+ * 
+ * + * Protobuf type {@code grafeas.v1.FileLocation} + */ +public final class FileLocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.FileLocation) + FileLocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use FileLocation.newBuilder() to construct. + private FileLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FileLocation() { + filePath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FileLocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.FileLocation.class, io.grafeas.v1.FileLocation.Builder.class); + } + + public static final int FILE_PATH_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object filePath_ = ""; + /** + *
+   * For jars that are contained inside .war files, this filepath
+   * can indicate the path to war file combined with the path to jar file.
+   * 
+ * + * string file_path = 1; + * @return The filePath. + */ + @java.lang.Override + public java.lang.String getFilePath() { + java.lang.Object ref = filePath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filePath_ = s; + return s; + } + } + /** + *
+   * For jars that are contained inside .war files, this filepath
+   * can indicate the path to war file combined with the path to jar file.
+   * 
+ * + * string file_path = 1; + * @return The bytes for filePath. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilePathBytes() { + java.lang.Object ref = filePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filePath_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filePath_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.FileLocation)) { + return super.equals(obj); + } + io.grafeas.v1.FileLocation other = (io.grafeas.v1.FileLocation) obj; + + if (!getFilePath() + .equals(other.getFilePath())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FILE_PATH_FIELD_NUMBER; + hash = (53 * hash) + getFilePath().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.FileLocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.FileLocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.FileLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.FileLocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.FileLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.FileLocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.FileLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.FileLocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.FileLocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.FileLocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.FileLocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.FileLocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.FileLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Indicates the location at which a package was found.
+   * 
+ * + * Protobuf type {@code grafeas.v1.FileLocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.FileLocation) + io.grafeas.v1.FileLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.FileLocation.class, io.grafeas.v1.FileLocation.Builder.class); + } + + // Construct using io.grafeas.v1.FileLocation.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + filePath_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.FileLocation getDefaultInstanceForType() { + return io.grafeas.v1.FileLocation.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.FileLocation build() { + io.grafeas.v1.FileLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.FileLocation buildPartial() { + io.grafeas.v1.FileLocation result = new io.grafeas.v1.FileLocation(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.FileLocation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.filePath_ = filePath_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.FileLocation) { + return mergeFrom((io.grafeas.v1.FileLocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.FileLocation other) { + if (other == io.grafeas.v1.FileLocation.getDefaultInstance()) return this; + if (!other.getFilePath().isEmpty()) { + filePath_ = other.filePath_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + filePath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object filePath_ = ""; + /** + *
+     * For jars that are contained inside .war files, this filepath
+     * can indicate the path to war file combined with the path to jar file.
+     * 
+ * + * string file_path = 1; + * @return The filePath. + */ + public java.lang.String getFilePath() { + java.lang.Object ref = filePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * For jars that are contained inside .war files, this filepath
+     * can indicate the path to war file combined with the path to jar file.
+     * 
+ * + * string file_path = 1; + * @return The bytes for filePath. + */ + public com.google.protobuf.ByteString + getFilePathBytes() { + java.lang.Object ref = filePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * For jars that are contained inside .war files, this filepath
+     * can indicate the path to war file combined with the path to jar file.
+     * 
+ * + * string file_path = 1; + * @param value The filePath to set. + * @return This builder for chaining. + */ + public Builder setFilePath( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filePath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * For jars that are contained inside .war files, this filepath
+     * can indicate the path to war file combined with the path to jar file.
+     * 
+ * + * string file_path = 1; + * @return This builder for chaining. + */ + public Builder clearFilePath() { + filePath_ = getDefaultInstance().getFilePath(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * For jars that are contained inside .war files, this filepath
+     * can indicate the path to war file combined with the path to jar file.
+     * 
+ * + * string file_path = 1; + * @param value The bytes for filePath to set. + * @return This builder for chaining. + */ + public Builder setFilePathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filePath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.FileLocation) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.FileLocation) + private static final io.grafeas.v1.FileLocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.FileLocation(); + } + + public static io.grafeas.v1.FileLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FileLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.FileLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java new file mode 100644 index 000000000000..7869d5e04677 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public interface FileLocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.FileLocation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * For jars that are contained inside .war files, this filepath
+   * can indicate the path to war file combined with the path to jar file.
+   * 
+ * + * string file_path = 1; + * @return The filePath. + */ + java.lang.String getFilePath(); + /** + *
+   * For jars that are contained inside .war files, this filepath
+   * can indicate the path to war file combined with the path to jar file.
+   * 
+ * + * string file_path = 1; + * @return The bytes for filePath. + */ + com.google.protobuf.ByteString + getFilePathBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java new file mode 100644 index 000000000000..ce9a56433288 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java @@ -0,0 +1,1009 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +/** + *
+ * A set of properties that uniquely identify a given Docker image.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Fingerprint} + */ +public final class Fingerprint extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Fingerprint) + FingerprintOrBuilder { +private static final long serialVersionUID = 0L; + // Use Fingerprint.newBuilder() to construct. + private Fingerprint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Fingerprint() { + v1Name_ = ""; + v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; + v2Name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Fingerprint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Fingerprint.class, io.grafeas.v1.Fingerprint.Builder.class); + } + + public static final int V1_NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object v1Name_ = ""; + /** + *
+   * Required. The layer ID of the final layer in the Docker image's v1
+   * representation.
+   * 
+ * + * string v1_name = 1; + * @return The v1Name. + */ + @java.lang.Override + public java.lang.String getV1Name() { + java.lang.Object ref = v1Name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + v1Name_ = s; + return s; + } + } + /** + *
+   * Required. The layer ID of the final layer in the Docker image's v1
+   * representation.
+   * 
+ * + * string v1_name = 1; + * @return The bytes for v1Name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getV1NameBytes() { + java.lang.Object ref = v1Name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + v1Name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int V2_BLOB_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList v2Blob_; + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @return A list containing the v2Blob. + */ + public com.google.protobuf.ProtocolStringList + getV2BlobList() { + return v2Blob_; + } + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @return The count of v2Blob. + */ + public int getV2BlobCount() { + return v2Blob_.size(); + } + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @param index The index of the element to return. + * @return The v2Blob at the given index. + */ + public java.lang.String getV2Blob(int index) { + return v2Blob_.get(index); + } + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @param index The index of the value to return. + * @return The bytes of the v2Blob at the given index. + */ + public com.google.protobuf.ByteString + getV2BlobBytes(int index) { + return v2Blob_.getByteString(index); + } + + public static final int V2_NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object v2Name_ = ""; + /** + *
+   * Output only. The name of the image's v2 blobs computed via:
+   *   [bottom] := v2_blob[bottom]
+   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+   * Only the name of the final blob is kept.
+   * 
+ * + * string v2_name = 3; + * @return The v2Name. + */ + @java.lang.Override + public java.lang.String getV2Name() { + java.lang.Object ref = v2Name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + v2Name_ = s; + return s; + } + } + /** + *
+   * Output only. The name of the image's v2 blobs computed via:
+   *   [bottom] := v2_blob[bottom]
+   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+   * Only the name of the final blob is kept.
+   * 
+ * + * string v2_name = 3; + * @return The bytes for v2Name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getV2NameBytes() { + java.lang.Object ref = v2Name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + v2Name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v1Name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, v1Name_); + } + for (int i = 0; i < v2Blob_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, v2Blob_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v2Name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, v2Name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v1Name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, v1Name_); + } + { + int dataSize = 0; + for (int i = 0; i < v2Blob_.size(); i++) { + dataSize += computeStringSizeNoTag(v2Blob_.getRaw(i)); + } + size += dataSize; + size += 1 * getV2BlobList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v2Name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, v2Name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Fingerprint)) { + return super.equals(obj); + } + io.grafeas.v1.Fingerprint other = (io.grafeas.v1.Fingerprint) obj; + + if (!getV1Name() + .equals(other.getV1Name())) return false; + if (!getV2BlobList() + .equals(other.getV2BlobList())) return false; + if (!getV2Name() + .equals(other.getV2Name())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + V1_NAME_FIELD_NUMBER; + hash = (53 * hash) + getV1Name().hashCode(); + if (getV2BlobCount() > 0) { + hash = (37 * hash) + V2_BLOB_FIELD_NUMBER; + hash = (53 * hash) + getV2BlobList().hashCode(); + } + hash = (37 * hash) + V2_NAME_FIELD_NUMBER; + hash = (53 * hash) + getV2Name().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Fingerprint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Fingerprint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Fingerprint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Fingerprint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Fingerprint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Fingerprint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Fingerprint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Fingerprint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Fingerprint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Fingerprint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Fingerprint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Fingerprint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Fingerprint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A set of properties that uniquely identify a given Docker image.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Fingerprint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Fingerprint) + io.grafeas.v1.FingerprintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Fingerprint.class, io.grafeas.v1.Fingerprint.Builder.class); + } + + // Construct using io.grafeas.v1.Fingerprint.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + v1Name_ = ""; + v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + v2Name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Fingerprint getDefaultInstanceForType() { + return io.grafeas.v1.Fingerprint.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Fingerprint build() { + io.grafeas.v1.Fingerprint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Fingerprint buildPartial() { + io.grafeas.v1.Fingerprint result = new io.grafeas.v1.Fingerprint(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.Fingerprint result) { + if (((bitField0_ & 0x00000002) != 0)) { + v2Blob_ = v2Blob_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.v2Blob_ = v2Blob_; + } + + private void buildPartial0(io.grafeas.v1.Fingerprint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.v1Name_ = v1Name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.v2Name_ = v2Name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Fingerprint) { + return mergeFrom((io.grafeas.v1.Fingerprint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Fingerprint other) { + if (other == io.grafeas.v1.Fingerprint.getDefaultInstance()) return this; + if (!other.getV1Name().isEmpty()) { + v1Name_ = other.v1Name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.v2Blob_.isEmpty()) { + if (v2Blob_.isEmpty()) { + v2Blob_ = other.v2Blob_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureV2BlobIsMutable(); + v2Blob_.addAll(other.v2Blob_); + } + onChanged(); + } + if (!other.getV2Name().isEmpty()) { + v2Name_ = other.v2Name_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + v1Name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureV2BlobIsMutable(); + v2Blob_.add(s); + break; + } // case 18 + case 26: { + v2Name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object v1Name_ = ""; + /** + *
+     * Required. The layer ID of the final layer in the Docker image's v1
+     * representation.
+     * 
+ * + * string v1_name = 1; + * @return The v1Name. + */ + public java.lang.String getV1Name() { + java.lang.Object ref = v1Name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + v1Name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The layer ID of the final layer in the Docker image's v1
+     * representation.
+     * 
+ * + * string v1_name = 1; + * @return The bytes for v1Name. + */ + public com.google.protobuf.ByteString + getV1NameBytes() { + java.lang.Object ref = v1Name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + v1Name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The layer ID of the final layer in the Docker image's v1
+     * representation.
+     * 
+ * + * string v1_name = 1; + * @param value The v1Name to set. + * @return This builder for chaining. + */ + public Builder setV1Name( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + v1Name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The layer ID of the final layer in the Docker image's v1
+     * representation.
+     * 
+ * + * string v1_name = 1; + * @return This builder for chaining. + */ + public Builder clearV1Name() { + v1Name_ = getDefaultInstance().getV1Name(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The layer ID of the final layer in the Docker image's v1
+     * representation.
+     * 
+ * + * string v1_name = 1; + * @param value The bytes for v1Name to set. + * @return This builder for chaining. + */ + public Builder setV1NameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + v1Name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureV2BlobIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + v2Blob_ = new com.google.protobuf.LazyStringArrayList(v2Blob_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @return A list containing the v2Blob. + */ + public com.google.protobuf.ProtocolStringList + getV2BlobList() { + return v2Blob_.getUnmodifiableView(); + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @return The count of v2Blob. + */ + public int getV2BlobCount() { + return v2Blob_.size(); + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @param index The index of the element to return. + * @return The v2Blob at the given index. + */ + public java.lang.String getV2Blob(int index) { + return v2Blob_.get(index); + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @param index The index of the value to return. + * @return The bytes of the v2Blob at the given index. + */ + public com.google.protobuf.ByteString + getV2BlobBytes(int index) { + return v2Blob_.getByteString(index); + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @param index The index to set the value at. + * @param value The v2Blob to set. + * @return This builder for chaining. + */ + public Builder setV2Blob( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureV2BlobIsMutable(); + v2Blob_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @param value The v2Blob to add. + * @return This builder for chaining. + */ + public Builder addV2Blob( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureV2BlobIsMutable(); + v2Blob_.add(value); + onChanged(); + return this; + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @param values The v2Blob to add. + * @return This builder for chaining. + */ + public Builder addAllV2Blob( + java.lang.Iterable values) { + ensureV2BlobIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, v2Blob_); + onChanged(); + return this; + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @return This builder for chaining. + */ + public Builder clearV2Blob() { + v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @param value The bytes of the v2Blob to add. + * @return This builder for chaining. + */ + public Builder addV2BlobBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureV2BlobIsMutable(); + v2Blob_.add(value); + onChanged(); + return this; + } + + private java.lang.Object v2Name_ = ""; + /** + *
+     * Output only. The name of the image's v2 blobs computed via:
+     *   [bottom] := v2_blob[bottom]
+     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+     * Only the name of the final blob is kept.
+     * 
+ * + * string v2_name = 3; + * @return The v2Name. + */ + public java.lang.String getV2Name() { + java.lang.Object ref = v2Name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + v2Name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The name of the image's v2 blobs computed via:
+     *   [bottom] := v2_blob[bottom]
+     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+     * Only the name of the final blob is kept.
+     * 
+ * + * string v2_name = 3; + * @return The bytes for v2Name. + */ + public com.google.protobuf.ByteString + getV2NameBytes() { + java.lang.Object ref = v2Name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + v2Name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The name of the image's v2 blobs computed via:
+     *   [bottom] := v2_blob[bottom]
+     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+     * Only the name of the final blob is kept.
+     * 
+ * + * string v2_name = 3; + * @param value The v2Name to set. + * @return This builder for chaining. + */ + public Builder setV2Name( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + v2Name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The name of the image's v2 blobs computed via:
+     *   [bottom] := v2_blob[bottom]
+     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+     * Only the name of the final blob is kept.
+     * 
+ * + * string v2_name = 3; + * @return This builder for chaining. + */ + public Builder clearV2Name() { + v2Name_ = getDefaultInstance().getV2Name(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Output only. The name of the image's v2 blobs computed via:
+     *   [bottom] := v2_blob[bottom]
+     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+     * Only the name of the final blob is kept.
+     * 
+ * + * string v2_name = 3; + * @param value The bytes for v2Name to set. + * @return This builder for chaining. + */ + public Builder setV2NameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + v2Name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Fingerprint) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Fingerprint) + private static final io.grafeas.v1.Fingerprint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Fingerprint(); + } + + public static io.grafeas.v1.Fingerprint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Fingerprint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Fingerprint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java new file mode 100644 index 000000000000..ca06107712b3 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java @@ -0,0 +1,98 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +public interface FingerprintOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Fingerprint) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The layer ID of the final layer in the Docker image's v1
+   * representation.
+   * 
+ * + * string v1_name = 1; + * @return The v1Name. + */ + java.lang.String getV1Name(); + /** + *
+   * Required. The layer ID of the final layer in the Docker image's v1
+   * representation.
+   * 
+ * + * string v1_name = 1; + * @return The bytes for v1Name. + */ + com.google.protobuf.ByteString + getV1NameBytes(); + + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @return A list containing the v2Blob. + */ + java.util.List + getV2BlobList(); + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @return The count of v2Blob. + */ + int getV2BlobCount(); + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @param index The index of the element to return. + * @return The v2Blob at the given index. + */ + java.lang.String getV2Blob(int index); + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @param index The index of the value to return. + * @return The bytes of the v2Blob at the given index. + */ + com.google.protobuf.ByteString + getV2BlobBytes(int index); + + /** + *
+   * Output only. The name of the image's v2 blobs computed via:
+   *   [bottom] := v2_blob[bottom]
+   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+   * Only the name of the final blob is kept.
+   * 
+ * + * string v2_name = 3; + * @return The v2Name. + */ + java.lang.String getV2Name(); + /** + *
+   * Output only. The name of the image's v2 blobs computed via:
+   *   [bottom] := v2_blob[bottom]
+   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+   * Only the name of the final blob is kept.
+   * 
+ * + * string v2_name = 3; + * @return The bytes for v2Name. + */ + com.google.protobuf.ByteString + getV2NameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java new file mode 100644 index 000000000000..5e61686f515f --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java @@ -0,0 +1,1297 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * A SourceContext referring to a Gerrit project.
+ * 
+ * + * Protobuf type {@code grafeas.v1.GerritSourceContext} + */ +public final class GerritSourceContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.GerritSourceContext) + GerritSourceContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use GerritSourceContext.newBuilder() to construct. + private GerritSourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GerritSourceContext() { + hostUri_ = ""; + gerritProject_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GerritSourceContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GerritSourceContext.class, io.grafeas.v1.GerritSourceContext.Builder.class); + } + + private int revisionCase_ = 0; + private java.lang.Object revision_; + public enum RevisionCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REVISION_ID(3), + ALIAS_CONTEXT(4), + REVISION_NOT_SET(0); + private final int value; + private RevisionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RevisionCase valueOf(int value) { + return forNumber(value); + } + + public static RevisionCase forNumber(int value) { + switch (value) { + case 3: return REVISION_ID; + case 4: return ALIAS_CONTEXT; + case 0: return REVISION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public RevisionCase + getRevisionCase() { + return RevisionCase.forNumber( + revisionCase_); + } + + public static final int HOST_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object hostUri_ = ""; + /** + *
+   * The URI of a running Gerrit instance.
+   * 
+ * + * string host_uri = 1; + * @return The hostUri. + */ + @java.lang.Override + public java.lang.String getHostUri() { + java.lang.Object ref = hostUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hostUri_ = s; + return s; + } + } + /** + *
+   * The URI of a running Gerrit instance.
+   * 
+ * + * string host_uri = 1; + * @return The bytes for hostUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHostUriBytes() { + java.lang.Object ref = hostUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hostUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GERRIT_PROJECT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object gerritProject_ = ""; + /** + *
+   * The full project name within the host. Projects may be nested, so
+   * "project/subproject" is a valid project name. The "repo name" is the
+   * hostURI/project.
+   * 
+ * + * string gerrit_project = 2; + * @return The gerritProject. + */ + @java.lang.Override + public java.lang.String getGerritProject() { + java.lang.Object ref = gerritProject_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gerritProject_ = s; + return s; + } + } + /** + *
+   * The full project name within the host. Projects may be nested, so
+   * "project/subproject" is a valid project name. The "repo name" is the
+   * hostURI/project.
+   * 
+ * + * string gerrit_project = 2; + * @return The bytes for gerritProject. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGerritProjectBytes() { + java.lang.Object ref = gerritProject_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gerritProject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_ID_FIELD_NUMBER = 3; + /** + *
+   * A revision (commit) ID.
+   * 
+ * + * string revision_id = 3; + * @return Whether the revisionId field is set. + */ + public boolean hasRevisionId() { + return revisionCase_ == 3; + } + /** + *
+   * A revision (commit) ID.
+   * 
+ * + * string revision_id = 3; + * @return The revisionId. + */ + public java.lang.String getRevisionId() { + java.lang.Object ref = ""; + if (revisionCase_ == 3) { + ref = revision_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (revisionCase_ == 3) { + revision_ = s; + } + return s; + } + } + /** + *
+   * A revision (commit) ID.
+   * 
+ * + * string revision_id = 3; + * @return The bytes for revisionId. + */ + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = ""; + if (revisionCase_ == 3) { + ref = revision_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (revisionCase_ == 3) { + revision_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALIAS_CONTEXT_FIELD_NUMBER = 4; + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + * @return Whether the aliasContext field is set. + */ + @java.lang.Override + public boolean hasAliasContext() { + return revisionCase_ == 4; + } + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + * @return The aliasContext. + */ + @java.lang.Override + public io.grafeas.v1.AliasContext getAliasContext() { + if (revisionCase_ == 4) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + @java.lang.Override + public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { + if (revisionCase_ == 4) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hostUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gerritProject_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gerritProject_); + } + if (revisionCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, revision_); + } + if (revisionCase_ == 4) { + output.writeMessage(4, (io.grafeas.v1.AliasContext) revision_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hostUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gerritProject_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gerritProject_); + } + if (revisionCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, revision_); + } + if (revisionCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (io.grafeas.v1.AliasContext) revision_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.GerritSourceContext)) { + return super.equals(obj); + } + io.grafeas.v1.GerritSourceContext other = (io.grafeas.v1.GerritSourceContext) obj; + + if (!getHostUri() + .equals(other.getHostUri())) return false; + if (!getGerritProject() + .equals(other.getGerritProject())) return false; + if (!getRevisionCase().equals(other.getRevisionCase())) return false; + switch (revisionCase_) { + case 3: + if (!getRevisionId() + .equals(other.getRevisionId())) return false; + break; + case 4: + if (!getAliasContext() + .equals(other.getAliasContext())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HOST_URI_FIELD_NUMBER; + hash = (53 * hash) + getHostUri().hashCode(); + hash = (37 * hash) + GERRIT_PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getGerritProject().hashCode(); + switch (revisionCase_) { + case 3: + hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRevisionId().hashCode(); + break; + case 4: + hash = (37 * hash) + ALIAS_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getAliasContext().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.GerritSourceContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GerritSourceContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GerritSourceContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GerritSourceContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GerritSourceContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GerritSourceContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GerritSourceContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GerritSourceContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GerritSourceContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.GerritSourceContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GerritSourceContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GerritSourceContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.GerritSourceContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A SourceContext referring to a Gerrit project.
+   * 
+ * + * Protobuf type {@code grafeas.v1.GerritSourceContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.GerritSourceContext) + io.grafeas.v1.GerritSourceContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GerritSourceContext.class, io.grafeas.v1.GerritSourceContext.Builder.class); + } + + // Construct using io.grafeas.v1.GerritSourceContext.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + hostUri_ = ""; + gerritProject_ = ""; + if (aliasContextBuilder_ != null) { + aliasContextBuilder_.clear(); + } + revisionCase_ = 0; + revision_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.GerritSourceContext getDefaultInstanceForType() { + return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.GerritSourceContext build() { + io.grafeas.v1.GerritSourceContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.GerritSourceContext buildPartial() { + io.grafeas.v1.GerritSourceContext result = new io.grafeas.v1.GerritSourceContext(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.GerritSourceContext result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.hostUri_ = hostUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.gerritProject_ = gerritProject_; + } + } + + private void buildPartialOneofs(io.grafeas.v1.GerritSourceContext result) { + result.revisionCase_ = revisionCase_; + result.revision_ = this.revision_; + if (revisionCase_ == 4 && + aliasContextBuilder_ != null) { + result.revision_ = aliasContextBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.GerritSourceContext) { + return mergeFrom((io.grafeas.v1.GerritSourceContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.GerritSourceContext other) { + if (other == io.grafeas.v1.GerritSourceContext.getDefaultInstance()) return this; + if (!other.getHostUri().isEmpty()) { + hostUri_ = other.hostUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getGerritProject().isEmpty()) { + gerritProject_ = other.gerritProject_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getRevisionCase()) { + case REVISION_ID: { + revisionCase_ = 3; + revision_ = other.revision_; + onChanged(); + break; + } + case ALIAS_CONTEXT: { + mergeAliasContext(other.getAliasContext()); + break; + } + case REVISION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + hostUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + gerritProject_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + revisionCase_ = 3; + revision_ = s; + break; + } // case 26 + case 34: { + input.readMessage( + getAliasContextFieldBuilder().getBuilder(), + extensionRegistry); + revisionCase_ = 4; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int revisionCase_ = 0; + private java.lang.Object revision_; + public RevisionCase + getRevisionCase() { + return RevisionCase.forNumber( + revisionCase_); + } + + public Builder clearRevision() { + revisionCase_ = 0; + revision_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object hostUri_ = ""; + /** + *
+     * The URI of a running Gerrit instance.
+     * 
+ * + * string host_uri = 1; + * @return The hostUri. + */ + public java.lang.String getHostUri() { + java.lang.Object ref = hostUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hostUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URI of a running Gerrit instance.
+     * 
+ * + * string host_uri = 1; + * @return The bytes for hostUri. + */ + public com.google.protobuf.ByteString + getHostUriBytes() { + java.lang.Object ref = hostUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hostUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URI of a running Gerrit instance.
+     * 
+ * + * string host_uri = 1; + * @param value The hostUri to set. + * @return This builder for chaining. + */ + public Builder setHostUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + hostUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The URI of a running Gerrit instance.
+     * 
+ * + * string host_uri = 1; + * @return This builder for chaining. + */ + public Builder clearHostUri() { + hostUri_ = getDefaultInstance().getHostUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The URI of a running Gerrit instance.
+     * 
+ * + * string host_uri = 1; + * @param value The bytes for hostUri to set. + * @return This builder for chaining. + */ + public Builder setHostUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + hostUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object gerritProject_ = ""; + /** + *
+     * The full project name within the host. Projects may be nested, so
+     * "project/subproject" is a valid project name. The "repo name" is the
+     * hostURI/project.
+     * 
+ * + * string gerrit_project = 2; + * @return The gerritProject. + */ + public java.lang.String getGerritProject() { + java.lang.Object ref = gerritProject_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gerritProject_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full project name within the host. Projects may be nested, so
+     * "project/subproject" is a valid project name. The "repo name" is the
+     * hostURI/project.
+     * 
+ * + * string gerrit_project = 2; + * @return The bytes for gerritProject. + */ + public com.google.protobuf.ByteString + getGerritProjectBytes() { + java.lang.Object ref = gerritProject_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gerritProject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full project name within the host. Projects may be nested, so
+     * "project/subproject" is a valid project name. The "repo name" is the
+     * hostURI/project.
+     * 
+ * + * string gerrit_project = 2; + * @param value The gerritProject to set. + * @return This builder for chaining. + */ + public Builder setGerritProject( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + gerritProject_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The full project name within the host. Projects may be nested, so
+     * "project/subproject" is a valid project name. The "repo name" is the
+     * hostURI/project.
+     * 
+ * + * string gerrit_project = 2; + * @return This builder for chaining. + */ + public Builder clearGerritProject() { + gerritProject_ = getDefaultInstance().getGerritProject(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The full project name within the host. Projects may be nested, so
+     * "project/subproject" is a valid project name. The "repo name" is the
+     * hostURI/project.
+     * 
+ * + * string gerrit_project = 2; + * @param value The bytes for gerritProject to set. + * @return This builder for chaining. + */ + public Builder setGerritProjectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + gerritProject_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + *
+     * A revision (commit) ID.
+     * 
+ * + * string revision_id = 3; + * @return Whether the revisionId field is set. + */ + @java.lang.Override + public boolean hasRevisionId() { + return revisionCase_ == 3; + } + /** + *
+     * A revision (commit) ID.
+     * 
+ * + * string revision_id = 3; + * @return The revisionId. + */ + @java.lang.Override + public java.lang.String getRevisionId() { + java.lang.Object ref = ""; + if (revisionCase_ == 3) { + ref = revision_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (revisionCase_ == 3) { + revision_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A revision (commit) ID.
+     * 
+ * + * string revision_id = 3; + * @return The bytes for revisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = ""; + if (revisionCase_ == 3) { + ref = revision_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (revisionCase_ == 3) { + revision_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A revision (commit) ID.
+     * 
+ * + * string revision_id = 3; + * @param value The revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + revisionCase_ = 3; + revision_ = value; + onChanged(); + return this; + } + /** + *
+     * A revision (commit) ID.
+     * 
+ * + * string revision_id = 3; + * @return This builder for chaining. + */ + public Builder clearRevisionId() { + if (revisionCase_ == 3) { + revisionCase_ = 0; + revision_ = null; + onChanged(); + } + return this; + } + /** + *
+     * A revision (commit) ID.
+     * 
+ * + * string revision_id = 3; + * @param value The bytes for revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + revisionCase_ = 3; + revision_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> aliasContextBuilder_; + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + * @return Whether the aliasContext field is set. + */ + @java.lang.Override + public boolean hasAliasContext() { + return revisionCase_ == 4; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + * @return The aliasContext. + */ + @java.lang.Override + public io.grafeas.v1.AliasContext getAliasContext() { + if (aliasContextBuilder_ == null) { + if (revisionCase_ == 4) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } else { + if (revisionCase_ == 4) { + return aliasContextBuilder_.getMessage(); + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + public Builder setAliasContext(io.grafeas.v1.AliasContext value) { + if (aliasContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + revision_ = value; + onChanged(); + } else { + aliasContextBuilder_.setMessage(value); + } + revisionCase_ = 4; + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + public Builder setAliasContext( + io.grafeas.v1.AliasContext.Builder builderForValue) { + if (aliasContextBuilder_ == null) { + revision_ = builderForValue.build(); + onChanged(); + } else { + aliasContextBuilder_.setMessage(builderForValue.build()); + } + revisionCase_ = 4; + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + public Builder mergeAliasContext(io.grafeas.v1.AliasContext value) { + if (aliasContextBuilder_ == null) { + if (revisionCase_ == 4 && + revision_ != io.grafeas.v1.AliasContext.getDefaultInstance()) { + revision_ = io.grafeas.v1.AliasContext.newBuilder((io.grafeas.v1.AliasContext) revision_) + .mergeFrom(value).buildPartial(); + } else { + revision_ = value; + } + onChanged(); + } else { + if (revisionCase_ == 4) { + aliasContextBuilder_.mergeFrom(value); + } else { + aliasContextBuilder_.setMessage(value); + } + } + revisionCase_ = 4; + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + public Builder clearAliasContext() { + if (aliasContextBuilder_ == null) { + if (revisionCase_ == 4) { + revisionCase_ = 0; + revision_ = null; + onChanged(); + } + } else { + if (revisionCase_ == 4) { + revisionCase_ = 0; + revision_ = null; + } + aliasContextBuilder_.clear(); + } + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + public io.grafeas.v1.AliasContext.Builder getAliasContextBuilder() { + return getAliasContextFieldBuilder().getBuilder(); + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + @java.lang.Override + public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { + if ((revisionCase_ == 4) && (aliasContextBuilder_ != null)) { + return aliasContextBuilder_.getMessageOrBuilder(); + } else { + if (revisionCase_ == 4) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> + getAliasContextFieldBuilder() { + if (aliasContextBuilder_ == null) { + if (!(revisionCase_ == 4)) { + revision_ = io.grafeas.v1.AliasContext.getDefaultInstance(); + } + aliasContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder>( + (io.grafeas.v1.AliasContext) revision_, + getParentForChildren(), + isClean()); + revision_ = null; + } + revisionCase_ = 4; + onChanged(); + return aliasContextBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.GerritSourceContext) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.GerritSourceContext) + private static final io.grafeas.v1.GerritSourceContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.GerritSourceContext(); + } + + public static io.grafeas.v1.GerritSourceContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GerritSourceContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.GerritSourceContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java new file mode 100644 index 000000000000..c0221c8a2abd --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java @@ -0,0 +1,111 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface GerritSourceContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.GerritSourceContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The URI of a running Gerrit instance.
+   * 
+ * + * string host_uri = 1; + * @return The hostUri. + */ + java.lang.String getHostUri(); + /** + *
+   * The URI of a running Gerrit instance.
+   * 
+ * + * string host_uri = 1; + * @return The bytes for hostUri. + */ + com.google.protobuf.ByteString + getHostUriBytes(); + + /** + *
+   * The full project name within the host. Projects may be nested, so
+   * "project/subproject" is a valid project name. The "repo name" is the
+   * hostURI/project.
+   * 
+ * + * string gerrit_project = 2; + * @return The gerritProject. + */ + java.lang.String getGerritProject(); + /** + *
+   * The full project name within the host. Projects may be nested, so
+   * "project/subproject" is a valid project name. The "repo name" is the
+   * hostURI/project.
+   * 
+ * + * string gerrit_project = 2; + * @return The bytes for gerritProject. + */ + com.google.protobuf.ByteString + getGerritProjectBytes(); + + /** + *
+   * A revision (commit) ID.
+   * 
+ * + * string revision_id = 3; + * @return Whether the revisionId field is set. + */ + boolean hasRevisionId(); + /** + *
+   * A revision (commit) ID.
+   * 
+ * + * string revision_id = 3; + * @return The revisionId. + */ + java.lang.String getRevisionId(); + /** + *
+   * A revision (commit) ID.
+   * 
+ * + * string revision_id = 3; + * @return The bytes for revisionId. + */ + com.google.protobuf.ByteString + getRevisionIdBytes(); + + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + * @return Whether the aliasContext field is set. + */ + boolean hasAliasContext(); + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + * @return The aliasContext. + */ + io.grafeas.v1.AliasContext getAliasContext(); + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder(); + + public io.grafeas.v1.GerritSourceContext.RevisionCase getRevisionCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java new file mode 100644 index 000000000000..0d89ff20cad2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java @@ -0,0 +1,587 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to get a note.
+ * 
+ * + * Protobuf type {@code grafeas.v1.GetNoteRequest} + */ +public final class GetNoteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.GetNoteRequest) + GetNoteRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetNoteRequest.newBuilder() to construct. + private GetNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetNoteRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetNoteRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GetNoteRequest.class, io.grafeas.v1.GetNoteRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.GetNoteRequest)) { + return super.equals(obj); + } + io.grafeas.v1.GetNoteRequest other = (io.grafeas.v1.GetNoteRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.GetNoteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetNoteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetNoteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetNoteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetNoteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetNoteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetNoteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetNoteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GetNoteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetNoteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GetNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.GetNoteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to get a note.
+   * 
+ * + * Protobuf type {@code grafeas.v1.GetNoteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.GetNoteRequest) + io.grafeas.v1.GetNoteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GetNoteRequest.class, io.grafeas.v1.GetNoteRequest.Builder.class); + } + + // Construct using io.grafeas.v1.GetNoteRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.GetNoteRequest getDefaultInstanceForType() { + return io.grafeas.v1.GetNoteRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.GetNoteRequest build() { + io.grafeas.v1.GetNoteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.GetNoteRequest buildPartial() { + io.grafeas.v1.GetNoteRequest result = new io.grafeas.v1.GetNoteRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.GetNoteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.GetNoteRequest) { + return mergeFrom((io.grafeas.v1.GetNoteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.GetNoteRequest other) { + if (other == io.grafeas.v1.GetNoteRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.GetNoteRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.GetNoteRequest) + private static final io.grafeas.v1.GetNoteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.GetNoteRequest(); + } + + public static io.grafeas.v1.GetNoteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNoteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.GetNoteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java new file mode 100644 index 000000000000..8b35e38c0447 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface GetNoteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.GetNoteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java new file mode 100644 index 000000000000..485d009b3969 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java @@ -0,0 +1,587 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to get the note to which the specified occurrence is attached.
+ * 
+ * + * Protobuf type {@code grafeas.v1.GetOccurrenceNoteRequest} + */ +public final class GetOccurrenceNoteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.GetOccurrenceNoteRequest) + GetOccurrenceNoteRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetOccurrenceNoteRequest.newBuilder() to construct. + private GetOccurrenceNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetOccurrenceNoteRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetOccurrenceNoteRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GetOccurrenceNoteRequest.class, io.grafeas.v1.GetOccurrenceNoteRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.GetOccurrenceNoteRequest)) { + return super.equals(obj); + } + io.grafeas.v1.GetOccurrenceNoteRequest other = (io.grafeas.v1.GetOccurrenceNoteRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.GetOccurrenceNoteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to get the note to which the specified occurrence is attached.
+   * 
+ * + * Protobuf type {@code grafeas.v1.GetOccurrenceNoteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.GetOccurrenceNoteRequest) + io.grafeas.v1.GetOccurrenceNoteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GetOccurrenceNoteRequest.class, io.grafeas.v1.GetOccurrenceNoteRequest.Builder.class); + } + + // Construct using io.grafeas.v1.GetOccurrenceNoteRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceNoteRequest getDefaultInstanceForType() { + return io.grafeas.v1.GetOccurrenceNoteRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceNoteRequest build() { + io.grafeas.v1.GetOccurrenceNoteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceNoteRequest buildPartial() { + io.grafeas.v1.GetOccurrenceNoteRequest result = new io.grafeas.v1.GetOccurrenceNoteRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.GetOccurrenceNoteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.GetOccurrenceNoteRequest) { + return mergeFrom((io.grafeas.v1.GetOccurrenceNoteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.GetOccurrenceNoteRequest other) { + if (other == io.grafeas.v1.GetOccurrenceNoteRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.GetOccurrenceNoteRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.GetOccurrenceNoteRequest) + private static final io.grafeas.v1.GetOccurrenceNoteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.GetOccurrenceNoteRequest(); + } + + public static io.grafeas.v1.GetOccurrenceNoteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetOccurrenceNoteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceNoteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java new file mode 100644 index 000000000000..26185bddff7d --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface GetOccurrenceNoteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.GetOccurrenceNoteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java new file mode 100644 index 000000000000..16e1cf97f986 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java @@ -0,0 +1,587 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to get an occurrence.
+ * 
+ * + * Protobuf type {@code grafeas.v1.GetOccurrenceRequest} + */ +public final class GetOccurrenceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.GetOccurrenceRequest) + GetOccurrenceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetOccurrenceRequest.newBuilder() to construct. + private GetOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetOccurrenceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetOccurrenceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GetOccurrenceRequest.class, io.grafeas.v1.GetOccurrenceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.GetOccurrenceRequest)) { + return super.equals(obj); + } + io.grafeas.v1.GetOccurrenceRequest other = (io.grafeas.v1.GetOccurrenceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetOccurrenceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.GetOccurrenceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to get an occurrence.
+   * 
+ * + * Protobuf type {@code grafeas.v1.GetOccurrenceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.GetOccurrenceRequest) + io.grafeas.v1.GetOccurrenceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GetOccurrenceRequest.class, io.grafeas.v1.GetOccurrenceRequest.Builder.class); + } + + // Construct using io.grafeas.v1.GetOccurrenceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceRequest getDefaultInstanceForType() { + return io.grafeas.v1.GetOccurrenceRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceRequest build() { + io.grafeas.v1.GetOccurrenceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceRequest buildPartial() { + io.grafeas.v1.GetOccurrenceRequest result = new io.grafeas.v1.GetOccurrenceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.GetOccurrenceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.GetOccurrenceRequest) { + return mergeFrom((io.grafeas.v1.GetOccurrenceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.GetOccurrenceRequest other) { + if (other == io.grafeas.v1.GetOccurrenceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.GetOccurrenceRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.GetOccurrenceRequest) + private static final io.grafeas.v1.GetOccurrenceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.GetOccurrenceRequest(); + } + + public static io.grafeas.v1.GetOccurrenceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetOccurrenceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java new file mode 100644 index 000000000000..67210e529112 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface GetOccurrenceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.GetOccurrenceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java new file mode 100644 index 000000000000..6ba7ba88015e --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java @@ -0,0 +1,746 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * A GitSourceContext denotes a particular revision in a third party Git
+ * repository (e.g., GitHub).
+ * 
+ * + * Protobuf type {@code grafeas.v1.GitSourceContext} + */ +public final class GitSourceContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.GitSourceContext) + GitSourceContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use GitSourceContext.newBuilder() to construct. + private GitSourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GitSourceContext() { + url_ = ""; + revisionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GitSourceContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GitSourceContext.class, io.grafeas.v1.GitSourceContext.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+   * Git repository URL.
+   * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+   * Git repository URL.
+   * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object revisionId_ = ""; + /** + *
+   * Git commit hash.
+   * 
+ * + * string revision_id = 2; + * @return The revisionId. + */ + @java.lang.Override + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revisionId_ = s; + return s; + } + } + /** + *
+   * Git commit hash.
+   * 
+ * + * string revision_id = 2; + * @return The bytes for revisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, revisionId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, revisionId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.GitSourceContext)) { + return super.equals(obj); + } + io.grafeas.v1.GitSourceContext other = (io.grafeas.v1.GitSourceContext) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getRevisionId() + .equals(other.getRevisionId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRevisionId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.GitSourceContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GitSourceContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GitSourceContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GitSourceContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GitSourceContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GitSourceContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GitSourceContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GitSourceContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GitSourceContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.GitSourceContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GitSourceContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GitSourceContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.GitSourceContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A GitSourceContext denotes a particular revision in a third party Git
+   * repository (e.g., GitHub).
+   * 
+ * + * Protobuf type {@code grafeas.v1.GitSourceContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.GitSourceContext) + io.grafeas.v1.GitSourceContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GitSourceContext.class, io.grafeas.v1.GitSourceContext.Builder.class); + } + + // Construct using io.grafeas.v1.GitSourceContext.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + url_ = ""; + revisionId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.GitSourceContext getDefaultInstanceForType() { + return io.grafeas.v1.GitSourceContext.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.GitSourceContext build() { + io.grafeas.v1.GitSourceContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.GitSourceContext buildPartial() { + io.grafeas.v1.GitSourceContext result = new io.grafeas.v1.GitSourceContext(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.GitSourceContext result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.revisionId_ = revisionId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.GitSourceContext) { + return mergeFrom((io.grafeas.v1.GitSourceContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.GitSourceContext other) { + if (other == io.grafeas.v1.GitSourceContext.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRevisionId().isEmpty()) { + revisionId_ = other.revisionId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + revisionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object url_ = ""; + /** + *
+     * Git repository URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Git repository URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Git repository URL.
+     * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Git repository URL.
+     * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Git repository URL.
+     * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object revisionId_ = ""; + /** + *
+     * Git commit hash.
+     * 
+ * + * string revision_id = 2; + * @return The revisionId. + */ + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revisionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Git commit hash.
+     * 
+ * + * string revision_id = 2; + * @return The bytes for revisionId. + */ + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Git commit hash.
+     * 
+ * + * string revision_id = 2; + * @param value The revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + revisionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Git commit hash.
+     * 
+ * + * string revision_id = 2; + * @return This builder for chaining. + */ + public Builder clearRevisionId() { + revisionId_ = getDefaultInstance().getRevisionId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Git commit hash.
+     * 
+ * + * string revision_id = 2; + * @param value The bytes for revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + revisionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.GitSourceContext) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.GitSourceContext) + private static final io.grafeas.v1.GitSourceContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.GitSourceContext(); + } + + public static io.grafeas.v1.GitSourceContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GitSourceContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.GitSourceContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java new file mode 100644 index 000000000000..22f81fc4db36 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface GitSourceContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.GitSourceContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Git repository URL.
+   * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+   * Git repository URL.
+   * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+   * Git commit hash.
+   * 
+ * + * string revision_id = 2; + * @return The revisionId. + */ + java.lang.String getRevisionId(); + /** + *
+   * Git commit hash.
+   * 
+ * + * string revision_id = 2; + * @return The bytes for revisionId. + */ + com.google.protobuf.ByteString + getRevisionIdBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java new file mode 100644 index 000000000000..332ac72426e8 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java @@ -0,0 +1,2264 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import io.grafeas.v1.stub.GrafeasStub; +import io.grafeas.v1.stub.GrafeasStubSettings; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: [Grafeas](https://grafeas.io) API. + * + *

Retrieves analysis results of Cloud components such as Docker container images. + * + *

Analysis results are stored as a series of occurrences. An `Occurrence` contains information + * about a specific analysis instance on a resource. An occurrence refers to a `Note`. A note + * contains details describing the analysis and is generally stored in a separate project, called a + * `Provider`. Multiple occurrences can refer to the same note. + * + *

For example, an SSL vulnerability could affect multiple images. In this case, there would be + * one note for the vulnerability and an occurrence for each image with the vulnerability referring + * to that note. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+ *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
+ *   Occurrence response = grafeasClient.getOccurrence(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the GrafeasClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of GrafeasSettings to create(). + * For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * GrafeasSettings grafeasSettings =
+ *     GrafeasSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * GrafeasClient grafeasClient = GrafeasClient.create(grafeasSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * GrafeasSettings grafeasSettings = GrafeasSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * GrafeasClient grafeasClient = GrafeasClient.create(grafeasSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class GrafeasClient implements BackgroundResource { + private final GrafeasSettings settings; + private final GrafeasStub stub; + + /** Constructs an instance of GrafeasClient with default settings. */ + public static final GrafeasClient create() throws IOException { + return create(GrafeasSettings.newBuilder().build()); + } + + /** + * Constructs an instance of GrafeasClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final GrafeasClient create(GrafeasSettings settings) throws IOException { + return new GrafeasClient(settings); + } + + /** + * Constructs an instance of GrafeasClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(GrafeasSettings). + */ + public static final GrafeasClient create(GrafeasStub stub) { + return new GrafeasClient(stub); + } + + /** + * Constructs an instance of GrafeasClient, using the given settings. This is protected so that it + * is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrafeasClient(GrafeasSettings settings) throws IOException { + this.settings = settings; + this.stub = ((GrafeasStubSettings) settings.getStubSettings()).createStub(); + } + + protected GrafeasClient(GrafeasStub stub) { + this.settings = null; + this.stub = stub; + } + + public final GrafeasSettings getSettings() { + return settings; + } + + public GrafeasStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
+   *   Occurrence response = grafeasClient.getOccurrence(name);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence getOccurrence(OccurrenceName name) { + GetOccurrenceRequest request = + GetOccurrenceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
+   *   Occurrence response = grafeasClient.getOccurrence(name);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence getOccurrence(String name) { + GetOccurrenceRequest request = GetOccurrenceRequest.newBuilder().setName(name).build(); + return getOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   GetOccurrenceRequest request =
+   *       GetOccurrenceRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .build();
+   *   Occurrence response = grafeasClient.getOccurrence(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence getOccurrence(GetOccurrenceRequest request) { + return getOccurrenceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   GetOccurrenceRequest request =
+   *       GetOccurrenceRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .build();
+   *   ApiFuture future = grafeasClient.getOccurrenceCallable().futureCall(request);
+   *   // Do something.
+   *   Occurrence response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getOccurrenceCallable() { + return stub.getOccurrenceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String filter = "filter-1274492040";
+   *   for (Occurrence element : grafeasClient.listOccurrences(parent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent The name of the project to list occurrences for in the form of + * `projects/[PROJECT_ID]`. + * @param filter The filter expression. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOccurrencesPagedResponse listOccurrences(ProjectName parent, String filter) { + ListOccurrencesRequest request = + ListOccurrencesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFilter(filter) + .build(); + return listOccurrences(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   String filter = "filter-1274492040";
+   *   for (Occurrence element : grafeasClient.listOccurrences(parent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent The name of the project to list occurrences for in the form of + * `projects/[PROJECT_ID]`. + * @param filter The filter expression. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOccurrencesPagedResponse listOccurrences(String parent, String filter) { + ListOccurrencesRequest request = + ListOccurrencesRequest.newBuilder().setParent(parent).setFilter(filter).build(); + return listOccurrences(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListOccurrencesRequest request =
+   *       ListOccurrencesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Occurrence element : grafeasClient.listOccurrences(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOccurrencesPagedResponse listOccurrences(ListOccurrencesRequest request) { + return listOccurrencesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListOccurrencesRequest request =
+   *       ListOccurrencesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       grafeasClient.listOccurrencesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Occurrence element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listOccurrencesPagedCallable() { + return stub.listOccurrencesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListOccurrencesRequest request =
+   *       ListOccurrencesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListOccurrencesResponse response = grafeasClient.listOccurrencesCallable().call(request);
+   *     for (Occurrence element : response.getOccurrencesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listOccurrencesCallable() { + return stub.listOccurrencesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified occurrence. For example, use this method to delete an occurrence when the + * occurrence is no longer applicable for the given resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
+   *   grafeasClient.deleteOccurrence(name);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteOccurrence(OccurrenceName name) { + DeleteOccurrenceRequest request = + DeleteOccurrenceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified occurrence. For example, use this method to delete an occurrence when the + * occurrence is no longer applicable for the given resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
+   *   grafeasClient.deleteOccurrence(name);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteOccurrence(String name) { + DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder().setName(name).build(); + deleteOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified occurrence. For example, use this method to delete an occurrence when the + * occurrence is no longer applicable for the given resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   DeleteOccurrenceRequest request =
+   *       DeleteOccurrenceRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .build();
+   *   grafeasClient.deleteOccurrence(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteOccurrence(DeleteOccurrenceRequest request) { + deleteOccurrenceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified occurrence. For example, use this method to delete an occurrence when the + * occurrence is no longer applicable for the given resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   DeleteOccurrenceRequest request =
+   *       DeleteOccurrenceRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .build();
+   *   ApiFuture future = grafeasClient.deleteOccurrenceCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteOccurrenceCallable() { + return stub.deleteOccurrenceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   Occurrence occurrence = Occurrence.newBuilder().build();
+   *   Occurrence response = grafeasClient.createOccurrence(parent, occurrence);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * occurrence is to be created. + * @param occurrence The occurrence to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence createOccurrence(ProjectName parent, Occurrence occurrence) { + CreateOccurrenceRequest request = + CreateOccurrenceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setOccurrence(occurrence) + .build(); + return createOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   Occurrence occurrence = Occurrence.newBuilder().build();
+   *   Occurrence response = grafeasClient.createOccurrence(parent, occurrence);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * occurrence is to be created. + * @param occurrence The occurrence to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence createOccurrence(String parent, Occurrence occurrence) { + CreateOccurrenceRequest request = + CreateOccurrenceRequest.newBuilder().setParent(parent).setOccurrence(occurrence).build(); + return createOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   CreateOccurrenceRequest request =
+   *       CreateOccurrenceRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setOccurrence(Occurrence.newBuilder().build())
+   *           .build();
+   *   Occurrence response = grafeasClient.createOccurrence(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence createOccurrence(CreateOccurrenceRequest request) { + return createOccurrenceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   CreateOccurrenceRequest request =
+   *       CreateOccurrenceRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setOccurrence(Occurrence.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = grafeasClient.createOccurrenceCallable().futureCall(request);
+   *   // Do something.
+   *   Occurrence response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createOccurrenceCallable() { + return stub.createOccurrenceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new occurrences in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   List occurrences = new ArrayList<>();
+   *   BatchCreateOccurrencesResponse response =
+   *       grafeasClient.batchCreateOccurrences(parent, occurrences);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * occurrences are to be created. + * @param occurrences The occurrences to create. Max allowed length is 1000. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateOccurrencesResponse batchCreateOccurrences( + ProjectName parent, List occurrences) { + BatchCreateOccurrencesRequest request = + BatchCreateOccurrencesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllOccurrences(occurrences) + .build(); + return batchCreateOccurrences(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new occurrences in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   List occurrences = new ArrayList<>();
+   *   BatchCreateOccurrencesResponse response =
+   *       grafeasClient.batchCreateOccurrences(parent, occurrences);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * occurrences are to be created. + * @param occurrences The occurrences to create. Max allowed length is 1000. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateOccurrencesResponse batchCreateOccurrences( + String parent, List occurrences) { + BatchCreateOccurrencesRequest request = + BatchCreateOccurrencesRequest.newBuilder() + .setParent(parent) + .addAllOccurrences(occurrences) + .build(); + return batchCreateOccurrences(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new occurrences in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   BatchCreateOccurrencesRequest request =
+   *       BatchCreateOccurrencesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .addAllOccurrences(new ArrayList())
+   *           .build();
+   *   BatchCreateOccurrencesResponse response = grafeasClient.batchCreateOccurrences(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateOccurrencesResponse batchCreateOccurrences( + BatchCreateOccurrencesRequest request) { + return batchCreateOccurrencesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new occurrences in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   BatchCreateOccurrencesRequest request =
+   *       BatchCreateOccurrencesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .addAllOccurrences(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       grafeasClient.batchCreateOccurrencesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchCreateOccurrencesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchCreateOccurrencesCallable() { + return stub.batchCreateOccurrencesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
+   *   Occurrence occurrence = Occurrence.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Occurrence response = grafeasClient.updateOccurrence(name, occurrence, updateMask);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @param occurrence The updated occurrence. + * @param updateMask The fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence updateOccurrence( + OccurrenceName name, Occurrence occurrence, FieldMask updateMask) { + UpdateOccurrenceRequest request = + UpdateOccurrenceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setOccurrence(occurrence) + .setUpdateMask(updateMask) + .build(); + return updateOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
+   *   Occurrence occurrence = Occurrence.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Occurrence response = grafeasClient.updateOccurrence(name, occurrence, updateMask);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @param occurrence The updated occurrence. + * @param updateMask The fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence updateOccurrence( + String name, Occurrence occurrence, FieldMask updateMask) { + UpdateOccurrenceRequest request = + UpdateOccurrenceRequest.newBuilder() + .setName(name) + .setOccurrence(occurrence) + .setUpdateMask(updateMask) + .build(); + return updateOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   UpdateOccurrenceRequest request =
+   *       UpdateOccurrenceRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .setOccurrence(Occurrence.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Occurrence response = grafeasClient.updateOccurrence(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence updateOccurrence(UpdateOccurrenceRequest request) { + return updateOccurrenceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   UpdateOccurrenceRequest request =
+   *       UpdateOccurrenceRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .setOccurrence(Occurrence.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = grafeasClient.updateOccurrenceCallable().futureCall(request);
+   *   // Do something.
+   *   Occurrence response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateOccurrenceCallable() { + return stub.updateOccurrenceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the note attached to the specified occurrence. Consumer projects can use this method to + * get a note that belongs to a provider project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
+   *   Note response = grafeasClient.getOccurrenceNote(name);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note getOccurrenceNote(OccurrenceName name) { + GetOccurrenceNoteRequest request = + GetOccurrenceNoteRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getOccurrenceNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the note attached to the specified occurrence. Consumer projects can use this method to + * get a note that belongs to a provider project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
+   *   Note response = grafeasClient.getOccurrenceNote(name);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note getOccurrenceNote(String name) { + GetOccurrenceNoteRequest request = GetOccurrenceNoteRequest.newBuilder().setName(name).build(); + return getOccurrenceNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the note attached to the specified occurrence. Consumer projects can use this method to + * get a note that belongs to a provider project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   GetOccurrenceNoteRequest request =
+   *       GetOccurrenceNoteRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .build();
+   *   Note response = grafeasClient.getOccurrenceNote(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note getOccurrenceNote(GetOccurrenceNoteRequest request) { + return getOccurrenceNoteCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the note attached to the specified occurrence. Consumer projects can use this method to + * get a note that belongs to a provider project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   GetOccurrenceNoteRequest request =
+   *       GetOccurrenceNoteRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .build();
+   *   ApiFuture future = grafeasClient.getOccurrenceNoteCallable().futureCall(request);
+   *   // Do something.
+   *   Note response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getOccurrenceNoteCallable() { + return stub.getOccurrenceNoteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
+   *   Note response = grafeasClient.getNote(name);
+   * }
+   * }
+ * + * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note getNote(NoteName name) { + GetNoteRequest request = + GetNoteRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
+   *   Note response = grafeasClient.getNote(name);
+   * }
+   * }
+ * + * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note getNote(String name) { + GetNoteRequest request = GetNoteRequest.newBuilder().setName(name).build(); + return getNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   GetNoteRequest request =
+   *       GetNoteRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .build();
+   *   Note response = grafeasClient.getNote(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note getNote(GetNoteRequest request) { + return getNoteCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   GetNoteRequest request =
+   *       GetNoteRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .build();
+   *   ApiFuture future = grafeasClient.getNoteCallable().futureCall(request);
+   *   // Do something.
+   *   Note response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getNoteCallable() { + return stub.getNoteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notes for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String filter = "filter-1274492040";
+   *   for (Note element : grafeasClient.listNotes(parent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent The name of the project to list notes for in the form of `projects/[PROJECT_ID]`. + * @param filter The filter expression. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotesPagedResponse listNotes(ProjectName parent, String filter) { + ListNotesRequest request = + ListNotesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFilter(filter) + .build(); + return listNotes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notes for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   String filter = "filter-1274492040";
+   *   for (Note element : grafeasClient.listNotes(parent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent The name of the project to list notes for in the form of `projects/[PROJECT_ID]`. + * @param filter The filter expression. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotesPagedResponse listNotes(String parent, String filter) { + ListNotesRequest request = + ListNotesRequest.newBuilder().setParent(parent).setFilter(filter).build(); + return listNotes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notes for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListNotesRequest request =
+   *       ListNotesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Note element : grafeasClient.listNotes(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotesPagedResponse listNotes(ListNotesRequest request) { + return listNotesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notes for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListNotesRequest request =
+   *       ListNotesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = grafeasClient.listNotesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Note element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listNotesPagedCallable() { + return stub.listNotesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notes for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListNotesRequest request =
+   *       ListNotesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListNotesResponse response = grafeasClient.listNotesCallable().call(request);
+   *     for (Note element : response.getNotesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listNotesCallable() { + return stub.listNotesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
+   *   grafeasClient.deleteNote(name);
+   * }
+   * }
+ * + * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteNote(NoteName name) { + DeleteNoteRequest request = + DeleteNoteRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
+   *   grafeasClient.deleteNote(name);
+   * }
+   * }
+ * + * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteNote(String name) { + DeleteNoteRequest request = DeleteNoteRequest.newBuilder().setName(name).build(); + deleteNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   DeleteNoteRequest request =
+   *       DeleteNoteRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .build();
+   *   grafeasClient.deleteNote(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteNote(DeleteNoteRequest request) { + deleteNoteCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   DeleteNoteRequest request =
+   *       DeleteNoteRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .build();
+   *   ApiFuture future = grafeasClient.deleteNoteCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteNoteCallable() { + return stub.deleteNoteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String noteId = "noteId-1039694675";
+   *   Note note = Note.newBuilder().build();
+   *   Note response = grafeasClient.createNote(parent, noteId, note);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * note is to be created. + * @param noteId The ID to use for this note. + * @param note The note to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note createNote(ProjectName parent, String noteId, Note note) { + CreateNoteRequest request = + CreateNoteRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNoteId(noteId) + .setNote(note) + .build(); + return createNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   String noteId = "noteId-1039694675";
+   *   Note note = Note.newBuilder().build();
+   *   Note response = grafeasClient.createNote(parent, noteId, note);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * note is to be created. + * @param noteId The ID to use for this note. + * @param note The note to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note createNote(String parent, String noteId, Note note) { + CreateNoteRequest request = + CreateNoteRequest.newBuilder().setParent(parent).setNoteId(noteId).setNote(note).build(); + return createNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   CreateNoteRequest request =
+   *       CreateNoteRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setNoteId("noteId-1039694675")
+   *           .setNote(Note.newBuilder().build())
+   *           .build();
+   *   Note response = grafeasClient.createNote(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note createNote(CreateNoteRequest request) { + return createNoteCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   CreateNoteRequest request =
+   *       CreateNoteRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setNoteId("noteId-1039694675")
+   *           .setNote(Note.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = grafeasClient.createNoteCallable().futureCall(request);
+   *   // Do something.
+   *   Note response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createNoteCallable() { + return stub.createNoteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new notes in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   Map notes = new HashMap<>();
+   *   BatchCreateNotesResponse response = grafeasClient.batchCreateNotes(parent, notes);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * notes are to be created. + * @param notes The notes to create. Max allowed length is 1000. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateNotesResponse batchCreateNotes( + ProjectName parent, Map notes) { + BatchCreateNotesRequest request = + BatchCreateNotesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .putAllNotes(notes) + .build(); + return batchCreateNotes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new notes in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   Map notes = new HashMap<>();
+   *   BatchCreateNotesResponse response = grafeasClient.batchCreateNotes(parent, notes);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * notes are to be created. + * @param notes The notes to create. Max allowed length is 1000. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateNotesResponse batchCreateNotes(String parent, Map notes) { + BatchCreateNotesRequest request = + BatchCreateNotesRequest.newBuilder().setParent(parent).putAllNotes(notes).build(); + return batchCreateNotes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new notes in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   BatchCreateNotesRequest request =
+   *       BatchCreateNotesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .putAllNotes(new HashMap())
+   *           .build();
+   *   BatchCreateNotesResponse response = grafeasClient.batchCreateNotes(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateNotesResponse batchCreateNotes(BatchCreateNotesRequest request) { + return batchCreateNotesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new notes in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   BatchCreateNotesRequest request =
+   *       BatchCreateNotesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .putAllNotes(new HashMap())
+   *           .build();
+   *   ApiFuture future =
+   *       grafeasClient.batchCreateNotesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchCreateNotesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchCreateNotesCallable() { + return stub.batchCreateNotesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
+   *   Note note = Note.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Note response = grafeasClient.updateNote(name, note, updateMask);
+   * }
+   * }
+ * + * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @param note The updated note. + * @param updateMask The fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note updateNote(NoteName name, Note note, FieldMask updateMask) { + UpdateNoteRequest request = + UpdateNoteRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setNote(note) + .setUpdateMask(updateMask) + .build(); + return updateNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
+   *   Note note = Note.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Note response = grafeasClient.updateNote(name, note, updateMask);
+   * }
+   * }
+ * + * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @param note The updated note. + * @param updateMask The fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note updateNote(String name, Note note, FieldMask updateMask) { + UpdateNoteRequest request = + UpdateNoteRequest.newBuilder() + .setName(name) + .setNote(note) + .setUpdateMask(updateMask) + .build(); + return updateNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   UpdateNoteRequest request =
+   *       UpdateNoteRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .setNote(Note.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Note response = grafeasClient.updateNote(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note updateNote(UpdateNoteRequest request) { + return updateNoteCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   UpdateNoteRequest request =
+   *       UpdateNoteRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .setNote(Note.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = grafeasClient.updateNoteCallable().futureCall(request);
+   *   // Do something.
+   *   Note response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateNoteCallable() { + return stub.updateNoteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences referencing the specified note. Provider projects can use this method to get + * all occurrences across consumer projects referencing the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
+   *   String filter = "filter-1274492040";
+   *   for (Occurrence element : grafeasClient.listNoteOccurrences(name, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name The name of the note to list occurrences for in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @param filter The filter expression. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNoteOccurrencesPagedResponse listNoteOccurrences(NoteName name, String filter) { + ListNoteOccurrencesRequest request = + ListNoteOccurrencesRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setFilter(filter) + .build(); + return listNoteOccurrences(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences referencing the specified note. Provider projects can use this method to get + * all occurrences across consumer projects referencing the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
+   *   String filter = "filter-1274492040";
+   *   for (Occurrence element : grafeasClient.listNoteOccurrences(name, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name The name of the note to list occurrences for in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @param filter The filter expression. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNoteOccurrencesPagedResponse listNoteOccurrences(String name, String filter) { + ListNoteOccurrencesRequest request = + ListNoteOccurrencesRequest.newBuilder().setName(name).setFilter(filter).build(); + return listNoteOccurrences(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences referencing the specified note. Provider projects can use this method to get + * all occurrences across consumer projects referencing the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListNoteOccurrencesRequest request =
+   *       ListNoteOccurrencesRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Occurrence element : grafeasClient.listNoteOccurrences(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNoteOccurrencesPagedResponse listNoteOccurrences( + ListNoteOccurrencesRequest request) { + return listNoteOccurrencesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences referencing the specified note. Provider projects can use this method to get + * all occurrences across consumer projects referencing the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListNoteOccurrencesRequest request =
+   *       ListNoteOccurrencesRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       grafeasClient.listNoteOccurrencesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Occurrence element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNoteOccurrencesPagedCallable() { + return stub.listNoteOccurrencesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences referencing the specified note. Provider projects can use this method to get + * all occurrences across consumer projects referencing the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListNoteOccurrencesRequest request =
+   *       ListNoteOccurrencesRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListNoteOccurrencesResponse response =
+   *         grafeasClient.listNoteOccurrencesCallable().call(request);
+   *     for (Occurrence element : response.getOccurrencesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNoteOccurrencesCallable() { + return stub.listNoteOccurrencesCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListOccurrencesPagedResponse + extends AbstractPagedListResponse< + ListOccurrencesRequest, + ListOccurrencesResponse, + Occurrence, + ListOccurrencesPage, + ListOccurrencesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListOccurrencesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListOccurrencesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListOccurrencesPagedResponse(ListOccurrencesPage page) { + super(page, ListOccurrencesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListOccurrencesPage + extends AbstractPage< + ListOccurrencesRequest, ListOccurrencesResponse, Occurrence, ListOccurrencesPage> { + + private ListOccurrencesPage( + PageContext context, + ListOccurrencesResponse response) { + super(context, response); + } + + private static ListOccurrencesPage createEmptyPage() { + return new ListOccurrencesPage(null, null); + } + + @Override + protected ListOccurrencesPage createPage( + PageContext context, + ListOccurrencesResponse response) { + return new ListOccurrencesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListOccurrencesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListOccurrencesRequest, + ListOccurrencesResponse, + Occurrence, + ListOccurrencesPage, + ListOccurrencesFixedSizeCollection> { + + private ListOccurrencesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListOccurrencesFixedSizeCollection createEmptyCollection() { + return new ListOccurrencesFixedSizeCollection(null, 0); + } + + @Override + protected ListOccurrencesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListOccurrencesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListNotesPagedResponse + extends AbstractPagedListResponse< + ListNotesRequest, ListNotesResponse, Note, ListNotesPage, ListNotesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNotesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListNotesPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListNotesPagedResponse(ListNotesPage page) { + super(page, ListNotesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNotesPage + extends AbstractPage { + + private ListNotesPage( + PageContext context, + ListNotesResponse response) { + super(context, response); + } + + private static ListNotesPage createEmptyPage() { + return new ListNotesPage(null, null); + } + + @Override + protected ListNotesPage createPage( + PageContext context, + ListNotesResponse response) { + return new ListNotesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNotesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNotesRequest, ListNotesResponse, Note, ListNotesPage, ListNotesFixedSizeCollection> { + + private ListNotesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNotesFixedSizeCollection createEmptyCollection() { + return new ListNotesFixedSizeCollection(null, 0); + } + + @Override + protected ListNotesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNotesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListNoteOccurrencesPagedResponse + extends AbstractPagedListResponse< + ListNoteOccurrencesRequest, + ListNoteOccurrencesResponse, + Occurrence, + ListNoteOccurrencesPage, + ListNoteOccurrencesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNoteOccurrencesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListNoteOccurrencesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListNoteOccurrencesPagedResponse(ListNoteOccurrencesPage page) { + super(page, ListNoteOccurrencesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNoteOccurrencesPage + extends AbstractPage< + ListNoteOccurrencesRequest, + ListNoteOccurrencesResponse, + Occurrence, + ListNoteOccurrencesPage> { + + private ListNoteOccurrencesPage( + PageContext context, + ListNoteOccurrencesResponse response) { + super(context, response); + } + + private static ListNoteOccurrencesPage createEmptyPage() { + return new ListNoteOccurrencesPage(null, null); + } + + @Override + protected ListNoteOccurrencesPage createPage( + PageContext context, + ListNoteOccurrencesResponse response) { + return new ListNoteOccurrencesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNoteOccurrencesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNoteOccurrencesRequest, + ListNoteOccurrencesResponse, + Occurrence, + ListNoteOccurrencesPage, + ListNoteOccurrencesFixedSizeCollection> { + + private ListNoteOccurrencesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNoteOccurrencesFixedSizeCollection createEmptyCollection() { + return new ListNoteOccurrencesFixedSizeCollection(null, 0); + } + + @Override + protected ListNoteOccurrencesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNoteOccurrencesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java new file mode 100644 index 000000000000..46c98bd4370b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java @@ -0,0 +1,1491 @@ +package io.grafeas.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * [Grafeas](https://grafeas.io) API.
+ * Retrieves analysis results of Cloud components such as Docker container
+ * images.
+ * Analysis results are stored as a series of occurrences. An `Occurrence`
+ * contains information about a specific analysis instance on a resource. An
+ * occurrence refers to a `Note`. A note contains details describing the
+ * analysis and is generally stored in a separate project, called a `Provider`.
+ * Multiple occurrences can refer to the same note.
+ * For example, an SSL vulnerability could affect multiple images. In this case,
+ * there would be one note for the vulnerability and an occurrence for each
+ * image with the vulnerability referring to that note.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: grafeas/v1/grafeas.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class GrafeasGrpc { + + private GrafeasGrpc() {} + + public static final String SERVICE_NAME = "grafeas.v1.Grafeas"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getGetOccurrenceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetOccurrence", + requestType = io.grafeas.v1.GetOccurrenceRequest.class, + responseType = io.grafeas.v1.Occurrence.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetOccurrenceMethod() { + io.grpc.MethodDescriptor getGetOccurrenceMethod; + if ((getGetOccurrenceMethod = GrafeasGrpc.getGetOccurrenceMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getGetOccurrenceMethod = GrafeasGrpc.getGetOccurrenceMethod) == null) { + GrafeasGrpc.getGetOccurrenceMethod = getGetOccurrenceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOccurrence")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.GetOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.Occurrence.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("GetOccurrence")) + .build(); + } + } + } + return getGetOccurrenceMethod; + } + + private static volatile io.grpc.MethodDescriptor getListOccurrencesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListOccurrences", + requestType = io.grafeas.v1.ListOccurrencesRequest.class, + responseType = io.grafeas.v1.ListOccurrencesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListOccurrencesMethod() { + io.grpc.MethodDescriptor getListOccurrencesMethod; + if ((getListOccurrencesMethod = GrafeasGrpc.getListOccurrencesMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getListOccurrencesMethod = GrafeasGrpc.getListOccurrencesMethod) == null) { + GrafeasGrpc.getListOccurrencesMethod = getListOccurrencesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListOccurrences")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.ListOccurrencesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.ListOccurrencesResponse.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("ListOccurrences")) + .build(); + } + } + } + return getListOccurrencesMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteOccurrenceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteOccurrence", + requestType = io.grafeas.v1.DeleteOccurrenceRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteOccurrenceMethod() { + io.grpc.MethodDescriptor getDeleteOccurrenceMethod; + if ((getDeleteOccurrenceMethod = GrafeasGrpc.getDeleteOccurrenceMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getDeleteOccurrenceMethod = GrafeasGrpc.getDeleteOccurrenceMethod) == null) { + GrafeasGrpc.getDeleteOccurrenceMethod = getDeleteOccurrenceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteOccurrence")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.DeleteOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("DeleteOccurrence")) + .build(); + } + } + } + return getDeleteOccurrenceMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateOccurrenceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateOccurrence", + requestType = io.grafeas.v1.CreateOccurrenceRequest.class, + responseType = io.grafeas.v1.Occurrence.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateOccurrenceMethod() { + io.grpc.MethodDescriptor getCreateOccurrenceMethod; + if ((getCreateOccurrenceMethod = GrafeasGrpc.getCreateOccurrenceMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getCreateOccurrenceMethod = GrafeasGrpc.getCreateOccurrenceMethod) == null) { + GrafeasGrpc.getCreateOccurrenceMethod = getCreateOccurrenceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateOccurrence")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.CreateOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.Occurrence.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("CreateOccurrence")) + .build(); + } + } + } + return getCreateOccurrenceMethod; + } + + private static volatile io.grpc.MethodDescriptor getBatchCreateOccurrencesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchCreateOccurrences", + requestType = io.grafeas.v1.BatchCreateOccurrencesRequest.class, + responseType = io.grafeas.v1.BatchCreateOccurrencesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBatchCreateOccurrencesMethod() { + io.grpc.MethodDescriptor getBatchCreateOccurrencesMethod; + if ((getBatchCreateOccurrencesMethod = GrafeasGrpc.getBatchCreateOccurrencesMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getBatchCreateOccurrencesMethod = GrafeasGrpc.getBatchCreateOccurrencesMethod) == null) { + GrafeasGrpc.getBatchCreateOccurrencesMethod = getBatchCreateOccurrencesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchCreateOccurrences")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.BatchCreateOccurrencesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.BatchCreateOccurrencesResponse.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("BatchCreateOccurrences")) + .build(); + } + } + } + return getBatchCreateOccurrencesMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateOccurrenceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateOccurrence", + requestType = io.grafeas.v1.UpdateOccurrenceRequest.class, + responseType = io.grafeas.v1.Occurrence.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateOccurrenceMethod() { + io.grpc.MethodDescriptor getUpdateOccurrenceMethod; + if ((getUpdateOccurrenceMethod = GrafeasGrpc.getUpdateOccurrenceMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getUpdateOccurrenceMethod = GrafeasGrpc.getUpdateOccurrenceMethod) == null) { + GrafeasGrpc.getUpdateOccurrenceMethod = getUpdateOccurrenceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateOccurrence")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.UpdateOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.Occurrence.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("UpdateOccurrence")) + .build(); + } + } + } + return getUpdateOccurrenceMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetOccurrenceNoteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetOccurrenceNote", + requestType = io.grafeas.v1.GetOccurrenceNoteRequest.class, + responseType = io.grafeas.v1.Note.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetOccurrenceNoteMethod() { + io.grpc.MethodDescriptor getGetOccurrenceNoteMethod; + if ((getGetOccurrenceNoteMethod = GrafeasGrpc.getGetOccurrenceNoteMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getGetOccurrenceNoteMethod = GrafeasGrpc.getGetOccurrenceNoteMethod) == null) { + GrafeasGrpc.getGetOccurrenceNoteMethod = getGetOccurrenceNoteMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOccurrenceNote")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.GetOccurrenceNoteRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.Note.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("GetOccurrenceNote")) + .build(); + } + } + } + return getGetOccurrenceNoteMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetNoteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNote", + requestType = io.grafeas.v1.GetNoteRequest.class, + responseType = io.grafeas.v1.Note.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetNoteMethod() { + io.grpc.MethodDescriptor getGetNoteMethod; + if ((getGetNoteMethod = GrafeasGrpc.getGetNoteMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getGetNoteMethod = GrafeasGrpc.getGetNoteMethod) == null) { + GrafeasGrpc.getGetNoteMethod = getGetNoteMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNote")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.GetNoteRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.Note.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("GetNote")) + .build(); + } + } + } + return getGetNoteMethod; + } + + private static volatile io.grpc.MethodDescriptor getListNotesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNotes", + requestType = io.grafeas.v1.ListNotesRequest.class, + responseType = io.grafeas.v1.ListNotesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListNotesMethod() { + io.grpc.MethodDescriptor getListNotesMethod; + if ((getListNotesMethod = GrafeasGrpc.getListNotesMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getListNotesMethod = GrafeasGrpc.getListNotesMethod) == null) { + GrafeasGrpc.getListNotesMethod = getListNotesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNotes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.ListNotesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.ListNotesResponse.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("ListNotes")) + .build(); + } + } + } + return getListNotesMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteNoteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteNote", + requestType = io.grafeas.v1.DeleteNoteRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteNoteMethod() { + io.grpc.MethodDescriptor getDeleteNoteMethod; + if ((getDeleteNoteMethod = GrafeasGrpc.getDeleteNoteMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getDeleteNoteMethod = GrafeasGrpc.getDeleteNoteMethod) == null) { + GrafeasGrpc.getDeleteNoteMethod = getDeleteNoteMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNote")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.DeleteNoteRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("DeleteNote")) + .build(); + } + } + } + return getDeleteNoteMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateNoteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateNote", + requestType = io.grafeas.v1.CreateNoteRequest.class, + responseType = io.grafeas.v1.Note.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateNoteMethod() { + io.grpc.MethodDescriptor getCreateNoteMethod; + if ((getCreateNoteMethod = GrafeasGrpc.getCreateNoteMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getCreateNoteMethod = GrafeasGrpc.getCreateNoteMethod) == null) { + GrafeasGrpc.getCreateNoteMethod = getCreateNoteMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNote")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.CreateNoteRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.Note.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("CreateNote")) + .build(); + } + } + } + return getCreateNoteMethod; + } + + private static volatile io.grpc.MethodDescriptor getBatchCreateNotesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchCreateNotes", + requestType = io.grafeas.v1.BatchCreateNotesRequest.class, + responseType = io.grafeas.v1.BatchCreateNotesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBatchCreateNotesMethod() { + io.grpc.MethodDescriptor getBatchCreateNotesMethod; + if ((getBatchCreateNotesMethod = GrafeasGrpc.getBatchCreateNotesMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getBatchCreateNotesMethod = GrafeasGrpc.getBatchCreateNotesMethod) == null) { + GrafeasGrpc.getBatchCreateNotesMethod = getBatchCreateNotesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchCreateNotes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.BatchCreateNotesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.BatchCreateNotesResponse.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("BatchCreateNotes")) + .build(); + } + } + } + return getBatchCreateNotesMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateNoteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateNote", + requestType = io.grafeas.v1.UpdateNoteRequest.class, + responseType = io.grafeas.v1.Note.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateNoteMethod() { + io.grpc.MethodDescriptor getUpdateNoteMethod; + if ((getUpdateNoteMethod = GrafeasGrpc.getUpdateNoteMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getUpdateNoteMethod = GrafeasGrpc.getUpdateNoteMethod) == null) { + GrafeasGrpc.getUpdateNoteMethod = getUpdateNoteMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateNote")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.UpdateNoteRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.Note.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("UpdateNote")) + .build(); + } + } + } + return getUpdateNoteMethod; + } + + private static volatile io.grpc.MethodDescriptor getListNoteOccurrencesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNoteOccurrences", + requestType = io.grafeas.v1.ListNoteOccurrencesRequest.class, + responseType = io.grafeas.v1.ListNoteOccurrencesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListNoteOccurrencesMethod() { + io.grpc.MethodDescriptor getListNoteOccurrencesMethod; + if ((getListNoteOccurrencesMethod = GrafeasGrpc.getListNoteOccurrencesMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getListNoteOccurrencesMethod = GrafeasGrpc.getListNoteOccurrencesMethod) == null) { + GrafeasGrpc.getListNoteOccurrencesMethod = getListNoteOccurrencesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNoteOccurrences")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.ListNoteOccurrencesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.ListNoteOccurrencesResponse.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("ListNoteOccurrences")) + .build(); + } + } + } + return getListNoteOccurrencesMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static GrafeasStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GrafeasStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GrafeasStub(channel, callOptions); + } + }; + return GrafeasStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static GrafeasBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GrafeasBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GrafeasBlockingStub(channel, callOptions); + } + }; + return GrafeasBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static GrafeasFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GrafeasFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GrafeasFutureStub(channel, callOptions); + } + }; + return GrafeasFutureStub.newStub(factory, channel); + } + + /** + *
+   * [Grafeas](https://grafeas.io) API.
+   * Retrieves analysis results of Cloud components such as Docker container
+   * images.
+   * Analysis results are stored as a series of occurrences. An `Occurrence`
+   * contains information about a specific analysis instance on a resource. An
+   * occurrence refers to a `Note`. A note contains details describing the
+   * analysis and is generally stored in a separate project, called a `Provider`.
+   * Multiple occurrences can refer to the same note.
+   * For example, an SSL vulnerability could affect multiple images. In this case,
+   * there would be one note for the vulnerability and an occurrence for each
+   * image with the vulnerability referring to that note.
+   * 
+ */ + public static abstract class GrafeasImplBase implements io.grpc.BindableService { + + /** + *
+     * Gets the specified occurrence.
+     * 
+ */ + public void getOccurrence(io.grafeas.v1.GetOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOccurrenceMethod(), responseObserver); + } + + /** + *
+     * Lists occurrences for the specified project.
+     * 
+ */ + public void listOccurrences(io.grafeas.v1.ListOccurrencesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListOccurrencesMethod(), responseObserver); + } + + /** + *
+     * Deletes the specified occurrence. For example, use this method to delete an
+     * occurrence when the occurrence is no longer applicable for the given
+     * resource.
+     * 
+ */ + public void deleteOccurrence(io.grafeas.v1.DeleteOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteOccurrenceMethod(), responseObserver); + } + + /** + *
+     * Creates a new occurrence.
+     * 
+ */ + public void createOccurrence(io.grafeas.v1.CreateOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateOccurrenceMethod(), responseObserver); + } + + /** + *
+     * Creates new occurrences in batch.
+     * 
+ */ + public void batchCreateOccurrences(io.grafeas.v1.BatchCreateOccurrencesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchCreateOccurrencesMethod(), responseObserver); + } + + /** + *
+     * Updates the specified occurrence.
+     * 
+ */ + public void updateOccurrence(io.grafeas.v1.UpdateOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateOccurrenceMethod(), responseObserver); + } + + /** + *
+     * Gets the note attached to the specified occurrence. Consumer projects can
+     * use this method to get a note that belongs to a provider project.
+     * 
+ */ + public void getOccurrenceNote(io.grafeas.v1.GetOccurrenceNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOccurrenceNoteMethod(), responseObserver); + } + + /** + *
+     * Gets the specified note.
+     * 
+ */ + public void getNote(io.grafeas.v1.GetNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNoteMethod(), responseObserver); + } + + /** + *
+     * Lists notes for the specified project.
+     * 
+ */ + public void listNotes(io.grafeas.v1.ListNotesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNotesMethod(), responseObserver); + } + + /** + *
+     * Deletes the specified note.
+     * 
+ */ + public void deleteNote(io.grafeas.v1.DeleteNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNoteMethod(), responseObserver); + } + + /** + *
+     * Creates a new note.
+     * 
+ */ + public void createNote(io.grafeas.v1.CreateNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNoteMethod(), responseObserver); + } + + /** + *
+     * Creates new notes in batch.
+     * 
+ */ + public void batchCreateNotes(io.grafeas.v1.BatchCreateNotesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchCreateNotesMethod(), responseObserver); + } + + /** + *
+     * Updates the specified note.
+     * 
+ */ + public void updateNote(io.grafeas.v1.UpdateNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateNoteMethod(), responseObserver); + } + + /** + *
+     * Lists occurrences referencing the specified note. Provider projects can use
+     * this method to get all occurrences across consumer projects referencing the
+     * specified note.
+     * 
+ */ + public void listNoteOccurrences(io.grafeas.v1.ListNoteOccurrencesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNoteOccurrencesMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetOccurrenceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.GetOccurrenceRequest, + io.grafeas.v1.Occurrence>( + this, METHODID_GET_OCCURRENCE))) + .addMethod( + getListOccurrencesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.ListOccurrencesRequest, + io.grafeas.v1.ListOccurrencesResponse>( + this, METHODID_LIST_OCCURRENCES))) + .addMethod( + getDeleteOccurrenceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.DeleteOccurrenceRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_OCCURRENCE))) + .addMethod( + getCreateOccurrenceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.CreateOccurrenceRequest, + io.grafeas.v1.Occurrence>( + this, METHODID_CREATE_OCCURRENCE))) + .addMethod( + getBatchCreateOccurrencesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.BatchCreateOccurrencesRequest, + io.grafeas.v1.BatchCreateOccurrencesResponse>( + this, METHODID_BATCH_CREATE_OCCURRENCES))) + .addMethod( + getUpdateOccurrenceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.UpdateOccurrenceRequest, + io.grafeas.v1.Occurrence>( + this, METHODID_UPDATE_OCCURRENCE))) + .addMethod( + getGetOccurrenceNoteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.GetOccurrenceNoteRequest, + io.grafeas.v1.Note>( + this, METHODID_GET_OCCURRENCE_NOTE))) + .addMethod( + getGetNoteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.GetNoteRequest, + io.grafeas.v1.Note>( + this, METHODID_GET_NOTE))) + .addMethod( + getListNotesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.ListNotesRequest, + io.grafeas.v1.ListNotesResponse>( + this, METHODID_LIST_NOTES))) + .addMethod( + getDeleteNoteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.DeleteNoteRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_NOTE))) + .addMethod( + getCreateNoteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.CreateNoteRequest, + io.grafeas.v1.Note>( + this, METHODID_CREATE_NOTE))) + .addMethod( + getBatchCreateNotesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.BatchCreateNotesRequest, + io.grafeas.v1.BatchCreateNotesResponse>( + this, METHODID_BATCH_CREATE_NOTES))) + .addMethod( + getUpdateNoteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.UpdateNoteRequest, + io.grafeas.v1.Note>( + this, METHODID_UPDATE_NOTE))) + .addMethod( + getListNoteOccurrencesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.ListNoteOccurrencesRequest, + io.grafeas.v1.ListNoteOccurrencesResponse>( + this, METHODID_LIST_NOTE_OCCURRENCES))) + .build(); + } + } + + /** + *
+   * [Grafeas](https://grafeas.io) API.
+   * Retrieves analysis results of Cloud components such as Docker container
+   * images.
+   * Analysis results are stored as a series of occurrences. An `Occurrence`
+   * contains information about a specific analysis instance on a resource. An
+   * occurrence refers to a `Note`. A note contains details describing the
+   * analysis and is generally stored in a separate project, called a `Provider`.
+   * Multiple occurrences can refer to the same note.
+   * For example, an SSL vulnerability could affect multiple images. In this case,
+   * there would be one note for the vulnerability and an occurrence for each
+   * image with the vulnerability referring to that note.
+   * 
+ */ + public static final class GrafeasStub extends io.grpc.stub.AbstractAsyncStub { + private GrafeasStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GrafeasStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GrafeasStub(channel, callOptions); + } + + /** + *
+     * Gets the specified occurrence.
+     * 
+ */ + public void getOccurrence(io.grafeas.v1.GetOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetOccurrenceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists occurrences for the specified project.
+     * 
+ */ + public void listOccurrences(io.grafeas.v1.ListOccurrencesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListOccurrencesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes the specified occurrence. For example, use this method to delete an
+     * occurrence when the occurrence is no longer applicable for the given
+     * resource.
+     * 
+ */ + public void deleteOccurrence(io.grafeas.v1.DeleteOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteOccurrenceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a new occurrence.
+     * 
+ */ + public void createOccurrence(io.grafeas.v1.CreateOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateOccurrenceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates new occurrences in batch.
+     * 
+ */ + public void batchCreateOccurrences(io.grafeas.v1.BatchCreateOccurrencesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchCreateOccurrencesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates the specified occurrence.
+     * 
+ */ + public void updateOccurrence(io.grafeas.v1.UpdateOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateOccurrenceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets the note attached to the specified occurrence. Consumer projects can
+     * use this method to get a note that belongs to a provider project.
+     * 
+ */ + public void getOccurrenceNote(io.grafeas.v1.GetOccurrenceNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetOccurrenceNoteMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets the specified note.
+     * 
+ */ + public void getNote(io.grafeas.v1.GetNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNoteMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists notes for the specified project.
+     * 
+ */ + public void listNotes(io.grafeas.v1.ListNotesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNotesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes the specified note.
+     * 
+ */ + public void deleteNote(io.grafeas.v1.DeleteNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteNoteMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a new note.
+     * 
+ */ + public void createNote(io.grafeas.v1.CreateNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateNoteMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates new notes in batch.
+     * 
+ */ + public void batchCreateNotes(io.grafeas.v1.BatchCreateNotesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchCreateNotesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates the specified note.
+     * 
+ */ + public void updateNote(io.grafeas.v1.UpdateNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateNoteMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists occurrences referencing the specified note. Provider projects can use
+     * this method to get all occurrences across consumer projects referencing the
+     * specified note.
+     * 
+ */ + public void listNoteOccurrences(io.grafeas.v1.ListNoteOccurrencesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNoteOccurrencesMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * [Grafeas](https://grafeas.io) API.
+   * Retrieves analysis results of Cloud components such as Docker container
+   * images.
+   * Analysis results are stored as a series of occurrences. An `Occurrence`
+   * contains information about a specific analysis instance on a resource. An
+   * occurrence refers to a `Note`. A note contains details describing the
+   * analysis and is generally stored in a separate project, called a `Provider`.
+   * Multiple occurrences can refer to the same note.
+   * For example, an SSL vulnerability could affect multiple images. In this case,
+   * there would be one note for the vulnerability and an occurrence for each
+   * image with the vulnerability referring to that note.
+   * 
+ */ + public static final class GrafeasBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private GrafeasBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GrafeasBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GrafeasBlockingStub(channel, callOptions); + } + + /** + *
+     * Gets the specified occurrence.
+     * 
+ */ + public io.grafeas.v1.Occurrence getOccurrence(io.grafeas.v1.GetOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetOccurrenceMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists occurrences for the specified project.
+     * 
+ */ + public io.grafeas.v1.ListOccurrencesResponse listOccurrences(io.grafeas.v1.ListOccurrencesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListOccurrencesMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes the specified occurrence. For example, use this method to delete an
+     * occurrence when the occurrence is no longer applicable for the given
+     * resource.
+     * 
+ */ + public com.google.protobuf.Empty deleteOccurrence(io.grafeas.v1.DeleteOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteOccurrenceMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a new occurrence.
+     * 
+ */ + public io.grafeas.v1.Occurrence createOccurrence(io.grafeas.v1.CreateOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateOccurrenceMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates new occurrences in batch.
+     * 
+ */ + public io.grafeas.v1.BatchCreateOccurrencesResponse batchCreateOccurrences(io.grafeas.v1.BatchCreateOccurrencesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchCreateOccurrencesMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates the specified occurrence.
+     * 
+ */ + public io.grafeas.v1.Occurrence updateOccurrence(io.grafeas.v1.UpdateOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateOccurrenceMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets the note attached to the specified occurrence. Consumer projects can
+     * use this method to get a note that belongs to a provider project.
+     * 
+ */ + public io.grafeas.v1.Note getOccurrenceNote(io.grafeas.v1.GetOccurrenceNoteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetOccurrenceNoteMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets the specified note.
+     * 
+ */ + public io.grafeas.v1.Note getNote(io.grafeas.v1.GetNoteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNoteMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists notes for the specified project.
+     * 
+ */ + public io.grafeas.v1.ListNotesResponse listNotes(io.grafeas.v1.ListNotesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNotesMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes the specified note.
+     * 
+ */ + public com.google.protobuf.Empty deleteNote(io.grafeas.v1.DeleteNoteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteNoteMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a new note.
+     * 
+ */ + public io.grafeas.v1.Note createNote(io.grafeas.v1.CreateNoteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateNoteMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates new notes in batch.
+     * 
+ */ + public io.grafeas.v1.BatchCreateNotesResponse batchCreateNotes(io.grafeas.v1.BatchCreateNotesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchCreateNotesMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates the specified note.
+     * 
+ */ + public io.grafeas.v1.Note updateNote(io.grafeas.v1.UpdateNoteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateNoteMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists occurrences referencing the specified note. Provider projects can use
+     * this method to get all occurrences across consumer projects referencing the
+     * specified note.
+     * 
+ */ + public io.grafeas.v1.ListNoteOccurrencesResponse listNoteOccurrences(io.grafeas.v1.ListNoteOccurrencesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNoteOccurrencesMethod(), getCallOptions(), request); + } + } + + /** + *
+   * [Grafeas](https://grafeas.io) API.
+   * Retrieves analysis results of Cloud components such as Docker container
+   * images.
+   * Analysis results are stored as a series of occurrences. An `Occurrence`
+   * contains information about a specific analysis instance on a resource. An
+   * occurrence refers to a `Note`. A note contains details describing the
+   * analysis and is generally stored in a separate project, called a `Provider`.
+   * Multiple occurrences can refer to the same note.
+   * For example, an SSL vulnerability could affect multiple images. In this case,
+   * there would be one note for the vulnerability and an occurrence for each
+   * image with the vulnerability referring to that note.
+   * 
+ */ + public static final class GrafeasFutureStub extends io.grpc.stub.AbstractFutureStub { + private GrafeasFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GrafeasFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GrafeasFutureStub(channel, callOptions); + } + + /** + *
+     * Gets the specified occurrence.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getOccurrence( + io.grafeas.v1.GetOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetOccurrenceMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists occurrences for the specified project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listOccurrences( + io.grafeas.v1.ListOccurrencesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListOccurrencesMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes the specified occurrence. For example, use this method to delete an
+     * occurrence when the occurrence is no longer applicable for the given
+     * resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteOccurrence( + io.grafeas.v1.DeleteOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteOccurrenceMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a new occurrence.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createOccurrence( + io.grafeas.v1.CreateOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateOccurrenceMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates new occurrences in batch.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture batchCreateOccurrences( + io.grafeas.v1.BatchCreateOccurrencesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchCreateOccurrencesMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates the specified occurrence.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateOccurrence( + io.grafeas.v1.UpdateOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateOccurrenceMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets the note attached to the specified occurrence. Consumer projects can
+     * use this method to get a note that belongs to a provider project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getOccurrenceNote( + io.grafeas.v1.GetOccurrenceNoteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetOccurrenceNoteMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets the specified note.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getNote( + io.grafeas.v1.GetNoteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNoteMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists notes for the specified project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listNotes( + io.grafeas.v1.ListNotesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNotesMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes the specified note.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteNote( + io.grafeas.v1.DeleteNoteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteNoteMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a new note.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createNote( + io.grafeas.v1.CreateNoteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateNoteMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates new notes in batch.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture batchCreateNotes( + io.grafeas.v1.BatchCreateNotesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchCreateNotesMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates the specified note.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateNote( + io.grafeas.v1.UpdateNoteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateNoteMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists occurrences referencing the specified note. Provider projects can use
+     * this method to get all occurrences across consumer projects referencing the
+     * specified note.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listNoteOccurrences( + io.grafeas.v1.ListNoteOccurrencesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNoteOccurrencesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_OCCURRENCE = 0; + private static final int METHODID_LIST_OCCURRENCES = 1; + private static final int METHODID_DELETE_OCCURRENCE = 2; + private static final int METHODID_CREATE_OCCURRENCE = 3; + private static final int METHODID_BATCH_CREATE_OCCURRENCES = 4; + private static final int METHODID_UPDATE_OCCURRENCE = 5; + private static final int METHODID_GET_OCCURRENCE_NOTE = 6; + private static final int METHODID_GET_NOTE = 7; + private static final int METHODID_LIST_NOTES = 8; + private static final int METHODID_DELETE_NOTE = 9; + private static final int METHODID_CREATE_NOTE = 10; + private static final int METHODID_BATCH_CREATE_NOTES = 11; + private static final int METHODID_UPDATE_NOTE = 12; + private static final int METHODID_LIST_NOTE_OCCURRENCES = 13; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final GrafeasImplBase serviceImpl; + private final int methodId; + + MethodHandlers(GrafeasImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_OCCURRENCE: + serviceImpl.getOccurrence((io.grafeas.v1.GetOccurrenceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_OCCURRENCES: + serviceImpl.listOccurrences((io.grafeas.v1.ListOccurrencesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_OCCURRENCE: + serviceImpl.deleteOccurrence((io.grafeas.v1.DeleteOccurrenceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_OCCURRENCE: + serviceImpl.createOccurrence((io.grafeas.v1.CreateOccurrenceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_CREATE_OCCURRENCES: + serviceImpl.batchCreateOccurrences((io.grafeas.v1.BatchCreateOccurrencesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_OCCURRENCE: + serviceImpl.updateOccurrence((io.grafeas.v1.UpdateOccurrenceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_OCCURRENCE_NOTE: + serviceImpl.getOccurrenceNote((io.grafeas.v1.GetOccurrenceNoteRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_NOTE: + serviceImpl.getNote((io.grafeas.v1.GetNoteRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_NOTES: + serviceImpl.listNotes((io.grafeas.v1.ListNotesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_NOTE: + serviceImpl.deleteNote((io.grafeas.v1.DeleteNoteRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_NOTE: + serviceImpl.createNote((io.grafeas.v1.CreateNoteRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_CREATE_NOTES: + serviceImpl.batchCreateNotes((io.grafeas.v1.BatchCreateNotesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_NOTE: + serviceImpl.updateNote((io.grafeas.v1.UpdateNoteRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_NOTE_OCCURRENCES: + serviceImpl.listNoteOccurrences((io.grafeas.v1.ListNoteOccurrencesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class GrafeasBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + GrafeasBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Grafeas"); + } + } + + private static final class GrafeasFileDescriptorSupplier + extends GrafeasBaseDescriptorSupplier { + GrafeasFileDescriptorSupplier() {} + } + + private static final class GrafeasMethodDescriptorSupplier + extends GrafeasBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + GrafeasMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (GrafeasGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new GrafeasFileDescriptorSupplier()) + .addMethod(getGetOccurrenceMethod()) + .addMethod(getListOccurrencesMethod()) + .addMethod(getDeleteOccurrenceMethod()) + .addMethod(getCreateOccurrenceMethod()) + .addMethod(getBatchCreateOccurrencesMethod()) + .addMethod(getUpdateOccurrenceMethod()) + .addMethod(getGetOccurrenceNoteMethod()) + .addMethod(getGetNoteMethod()) + .addMethod(getListNotesMethod()) + .addMethod(getDeleteNoteMethod()) + .addMethod(getCreateNoteMethod()) + .addMethod(getBatchCreateNotesMethod()) + .addMethod(getUpdateNoteMethod()) + .addMethod(getListNoteOccurrencesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java new file mode 100644 index 000000000000..12056463b434 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java @@ -0,0 +1,487 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public final class GrafeasOuterClass { + private GrafeasOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Occurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Occurrence_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Note_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Note_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_GetNoteRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ListNotesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ListNotesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DeleteNoteRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_CreateNoteRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_UpdateNoteRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\030grafeas/v1/grafeas.proto\022\ngrafeas.v1\032\034" + + "google/api/annotations.proto\032\027google/api" + + "/client.proto\032\037google/api/field_behavior" + + ".proto\032\031google/api/resource.proto\032\033googl" + + "e/protobuf/empty.proto\032 google/protobuf/" + + "field_mask.proto\032\037google/protobuf/timest" + + "amp.proto\032\034grafeas/v1/attestation.proto\032" + + "\026grafeas/v1/build.proto\032\027grafeas/v1/comm" + + "on.proto\032\033grafeas/v1/compliance.proto\032\033g" + + "rafeas/v1/deployment.proto\032\032grafeas/v1/d" + + "iscovery.proto\032!grafeas/v1/dsse_attestat" + + "ion.proto\032\026grafeas/v1/image.proto\032\030grafe" + + "as/v1/package.proto\032\030grafeas/v1/upgrade." + + "proto\032\036grafeas/v1/vulnerability.proto\"\373\006" + + "\n\nOccurrence\022\014\n\004name\030\001 \001(\t\022\024\n\014resource_u" + + "ri\030\002 \001(\t\022\021\n\tnote_name\030\003 \001(\t\022\"\n\004kind\030\004 \001(" + + "\0162\024.grafeas.v1.NoteKind\022\023\n\013remediation\030\005" + + " \001(\t\022/\n\013create_time\030\006 \001(\0132\032.google.proto" + + "buf.Timestamp\022/\n\013update_time\030\007 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022<\n\rvulnerability\030" + + "\010 \001(\0132#.grafeas.v1.VulnerabilityOccurren" + + "ceH\000\022,\n\005build\030\t \001(\0132\033.grafeas.v1.BuildOc" + + "currenceH\000\022,\n\005image\030\n \001(\0132\033.grafeas.v1.I" + + "mageOccurrenceH\000\0220\n\007package\030\013 \001(\0132\035.graf" + + "eas.v1.PackageOccurrenceH\000\0226\n\ndeployment" + + "\030\014 \001(\0132 .grafeas.v1.DeploymentOccurrence" + + "H\000\0224\n\tdiscovery\030\r \001(\0132\037.grafeas.v1.Disco" + + "veryOccurrenceH\000\0228\n\013attestation\030\016 \001(\0132!." + + "grafeas.v1.AttestationOccurrenceH\000\0220\n\007up" + + "grade\030\017 \001(\0132\035.grafeas.v1.UpgradeOccurren" + + "ceH\000\0226\n\ncompliance\030\020 \001(\0132 .grafeas.v1.Co" + + "mplianceOccurrenceH\000\022A\n\020dsse_attestation" + + "\030\021 \001(\0132%.grafeas.v1.DSSEAttestationOccur" + + "renceH\000\022&\n\010envelope\030\022 \001(\0132\024.grafeas.v1.E" + + "nvelope:G\352AD\n\025grafeas.io/Occurrence\022+pro" + + "jects/{project}/occurrences/{occurrence}" + + "B\t\n\007details\"\361\006\n\004Note\022\014\n\004name\030\001 \001(\t\022\031\n\021sh" + + "ort_description\030\002 \001(\t\022\030\n\020long_descriptio" + + "n\030\003 \001(\t\022\"\n\004kind\030\004 \001(\0162\024.grafeas.v1.NoteK" + + "ind\022+\n\013related_url\030\005 \003(\0132\026.grafeas.v1.Re" + + "latedUrl\0223\n\017expiration_time\030\006 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022/\n\013create_time\030\007 \001" + + "(\0132\032.google.protobuf.Timestamp\022/\n\013update" + + "_time\030\010 \001(\0132\032.google.protobuf.Timestamp\022" + + "\032\n\022related_note_names\030\t \003(\t\0226\n\rvulnerabi" + + "lity\030\n \001(\0132\035.grafeas.v1.VulnerabilityNot" + + "eH\000\022&\n\005build\030\013 \001(\0132\025.grafeas.v1.BuildNot" + + "eH\000\022&\n\005image\030\014 \001(\0132\025.grafeas.v1.ImageNot" + + "eH\000\022*\n\007package\030\r \001(\0132\027.grafeas.v1.Packag" + + "eNoteH\000\0220\n\ndeployment\030\016 \001(\0132\032.grafeas.v1" + + ".DeploymentNoteH\000\022.\n\tdiscovery\030\017 \001(\0132\031.g" + + "rafeas.v1.DiscoveryNoteH\000\0222\n\013attestation" + + "\030\020 \001(\0132\033.grafeas.v1.AttestationNoteH\000\022*\n" + + "\007upgrade\030\021 \001(\0132\027.grafeas.v1.UpgradeNoteH" + + "\000\0220\n\ncompliance\030\022 \001(\0132\032.grafeas.v1.Compl" + + "ianceNoteH\000\022;\n\020dsse_attestation\030\023 \001(\0132\037." + + "grafeas.v1.DSSEAttestationNoteH\000:5\352A2\n\017g" + + "rafeas.io/Note\022\037projects/{project}/notes" + + "/{note}B\006\n\004type\"C\n\024GetOccurrenceRequest\022" + + "+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io/Occurr" + + "ence\"{\n\026ListOccurrencesRequest\022*\n\006parent" + + "\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Project\022\016\n\006fi" + + "lter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_to" + + "ken\030\004 \001(\t\"_\n\027ListOccurrencesResponse\022+\n\013" + + "occurrences\030\001 \003(\0132\026.grafeas.v1.Occurrenc" + + "e\022\027\n\017next_page_token\030\002 \001(\t\"F\n\027DeleteOccu" + + "rrenceRequest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025gra" + + "feas.io/Occurrence\"v\n\027CreateOccurrenceRe" + + "quest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.i" + + "o/Project\022/\n\noccurrence\030\002 \001(\0132\026.grafeas." + + "v1.OccurrenceB\003\340A\002\"\250\001\n\027UpdateOccurrenceR" + + "equest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io" + + "/Occurrence\022/\n\noccurrence\030\002 \001(\0132\026.grafea" + + "s.v1.OccurrenceB\003\340A\002\022/\n\013update_mask\030\003 \001(" + + "\0132\032.google.protobuf.FieldMask\"7\n\016GetNote" + + "Request\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.i" + + "o/Note\"G\n\030GetOccurrenceNoteRequest\022+\n\004na" + + "me\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io/Occurrence\"" + + "u\n\020ListNotesRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002" + + "\372A\024\n\022grafeas.io/Project\022\016\n\006filter\030\002 \001(\t\022" + + "\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"M" + + "\n\021ListNotesResponse\022\037\n\005notes\030\001 \003(\0132\020.gra" + + "feas.v1.Note\022\027\n\017next_page_token\030\002 \001(\t\":\n" + + "\021DeleteNoteRequest\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021" + + "\n\017grafeas.io/Note\"z\n\021CreateNoteRequest\022*" + + "\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Proje" + + "ct\022\024\n\007note_id\030\002 \001(\tB\003\340A\002\022#\n\004note\030\003 \001(\0132\020" + + ".grafeas.v1.NoteB\003\340A\002\"\220\001\n\021UpdateNoteRequ" + + "est\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.io/No" + + "te\022#\n\004note\030\002 \001(\0132\020.grafeas.v1.NoteB\003\340A\002\022" + + "/\n\013update_mask\030\003 \001(\0132\032.google.protobuf.F" + + "ieldMask\"z\n\032ListNoteOccurrencesRequest\022%" + + "\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.io/Note\022\016\n" + + "\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage" + + "_token\030\004 \001(\t\"c\n\033ListNoteOccurrencesRespo" + + "nse\022+\n\013occurrences\030\001 \003(\0132\026.grafeas.v1.Oc" + + "currence\022\027\n\017next_page_token\030\002 \001(\t\"\311\001\n\027Ba" + + "tchCreateNotesRequest\022*\n\006parent\030\001 \001(\tB\032\340" + + "A\002\372A\024\n\022grafeas.io/Project\022B\n\005notes\030\002 \003(\013" + + "2..grafeas.v1.BatchCreateNotesRequest.No" + + "tesEntryB\003\340A\002\032>\n\nNotesEntry\022\013\n\003key\030\001 \001(\t" + + "\022\037\n\005value\030\002 \001(\0132\020.grafeas.v1.Note:\0028\001\";\n" + + "\030BatchCreateNotesResponse\022\037\n\005notes\030\001 \003(\013" + + "2\020.grafeas.v1.Note\"}\n\035BatchCreateOccurre" + + "ncesRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022gra" + + "feas.io/Project\0220\n\013occurrences\030\002 \003(\0132\026.g" + + "rafeas.v1.OccurrenceB\003\340A\002\"M\n\036BatchCreate" + + "OccurrencesResponse\022+\n\013occurrences\030\001 \003(\013" + + "2\026.grafeas.v1.Occurrence2\222\020\n\007Grafeas\022}\n\r" + + "GetOccurrence\022 .grafeas.v1.GetOccurrence" + + "Request\032\026.grafeas.v1.Occurrence\"2\202\323\344\223\002%\022" + + "#/v1/{name=projects/*/occurrences/*}\332A\004n" + + "ame\022\227\001\n\017ListOccurrences\022\".grafeas.v1.Lis" + + "tOccurrencesRequest\032#.grafeas.v1.ListOcc" + + "urrencesResponse\";\202\323\344\223\002%\022#/v1/{parent=pr" + + "ojects/*}/occurrences\332A\rparent,filter\022\203\001" + + "\n\020DeleteOccurrence\022#.grafeas.v1.DeleteOc" + + "currenceRequest\032\026.google.protobuf.Empty\"" + + "2\202\323\344\223\002%*#/v1/{name=projects/*/occurrence" + + "s/*}\332A\004name\022\234\001\n\020CreateOccurrence\022#.grafe" + + "as.v1.CreateOccurrenceRequest\032\026.grafeas." + + "v1.Occurrence\"K\202\323\344\223\0021\"#/v1/{parent=proje" + + "cts/*}/occurrences:\noccurrence\332A\021parent," + + "occurrence\022\300\001\n\026BatchCreateOccurrences\022)." + + "grafeas.v1.BatchCreateOccurrencesRequest" + + "\032*.grafeas.v1.BatchCreateOccurrencesResp" + + "onse\"O\202\323\344\223\0024\"//v1/{parent=projects/*}/oc" + + "currences:batchCreate:\001*\332A\022parent,occurr" + + "ences\022\246\001\n\020UpdateOccurrence\022#.grafeas.v1." + + "UpdateOccurrenceRequest\032\026.grafeas.v1.Occ" + + "urrence\"U\202\323\344\223\00212#/v1/{name=projects/*/oc" + + "currences/*}:\noccurrence\332A\033name,occurren" + + "ce,update_mask\022\205\001\n\021GetOccurrenceNote\022$.g" + + "rafeas.v1.GetOccurrenceNoteRequest\032\020.gra" + + "feas.v1.Note\"8\202\323\344\223\002+\022)/v1/{name=projects" + + "/*/occurrences/*}/notes\332A\004name\022e\n\007GetNot" + + "e\022\032.grafeas.v1.GetNoteRequest\032\020.grafeas." + + "v1.Note\",\202\323\344\223\002\037\022\035/v1/{name=projects/*/no" + + "tes/*}\332A\004name\022\177\n\tListNotes\022\034.grafeas.v1." + + "ListNotesRequest\032\035.grafeas.v1.ListNotesR" + + "esponse\"5\202\323\344\223\002\037\022\035/v1/{parent=projects/*}" + + "/notes\332A\rparent,filter\022q\n\nDeleteNote\022\035.g" + + "rafeas.v1.DeleteNoteRequest\032\026.google.pro" + + "tobuf.Empty\",\202\323\344\223\002\037*\035/v1/{name=projects/" + + "*/notes/*}\332A\004name\022\200\001\n\nCreateNote\022\035.grafe" + + "as.v1.CreateNoteRequest\032\020.grafeas.v1.Not" + + "e\"A\202\323\344\223\002%\"\035/v1/{parent=projects/*}/notes" + + ":\004note\332A\023parent,note_id,note\022\242\001\n\020BatchCr" + + "eateNotes\022#.grafeas.v1.BatchCreateNotesR" + + "equest\032$.grafeas.v1.BatchCreateNotesResp" + + "onse\"C\202\323\344\223\002.\")/v1/{parent=projects/*}/no" + + "tes:batchCreate:\001*\332A\014parent,notes\022\202\001\n\nUp" + + "dateNote\022\035.grafeas.v1.UpdateNoteRequest\032" + + "\020.grafeas.v1.Note\"C\202\323\344\223\002%2\035/v1/{name=pro" + + "jects/*/notes/*}:\004note\332A\025name,note,updat" + + "e_mask\022\247\001\n\023ListNoteOccurrences\022&.grafeas" + + ".v1.ListNoteOccurrencesRequest\032\'.grafeas" + + ".v1.ListNoteOccurrencesResponse\"?\202\323\344\223\002+\022" + + ")/v1/{name=projects/*/notes/*}/occurrenc" + + "es\332A\013name,filter\032#\312A containeranalysis.g" + + "oogleapis.comB|\n\rio.grafeas.v1P\001Z8google" + + ".golang.org/genproto/googleapis/grafeas/" + + "v1;grafeas\242\002\003GRA\352A(\n\022grafeas.io/Project\022" + + "\022projects/{project}b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + io.grafeas.v1.Attestation.getDescriptor(), + io.grafeas.v1.Build.getDescriptor(), + io.grafeas.v1.Common.getDescriptor(), + io.grafeas.v1.Compliance.getDescriptor(), + io.grafeas.v1.Deployment.getDescriptor(), + io.grafeas.v1.Discovery.getDescriptor(), + io.grafeas.v1.DsseAttestation.getDescriptor(), + io.grafeas.v1.Image.getDescriptor(), + io.grafeas.v1.Package.getDescriptor(), + io.grafeas.v1.Upgrade.getDescriptor(), + io.grafeas.v1.Vulnerability.getDescriptor(), + }); + internal_static_grafeas_v1_Occurrence_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_Occurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Occurrence_descriptor, + new java.lang.String[] { "Name", "ResourceUri", "NoteName", "Kind", "Remediation", "CreateTime", "UpdateTime", "Vulnerability", "Build", "Image", "Package", "Deployment", "Discovery", "Attestation", "Upgrade", "Compliance", "DsseAttestation", "Envelope", "Details", }); + internal_static_grafeas_v1_Note_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Note_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Note_descriptor, + new java.lang.String[] { "Name", "ShortDescription", "LongDescription", "Kind", "RelatedUrl", "ExpirationTime", "CreateTime", "UpdateTime", "RelatedNoteNames", "Vulnerability", "Build", "Image", "Package", "Deployment", "Discovery", "Attestation", "Upgrade", "Compliance", "DsseAttestation", "Type", }); + internal_static_grafeas_v1_GetOccurrenceRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_GetOccurrenceRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_grafeas_v1_ListOccurrencesRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ListOccurrencesRequest_descriptor, + new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", }); + internal_static_grafeas_v1_ListOccurrencesResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ListOccurrencesResponse_descriptor, + new java.lang.String[] { "Occurrences", "NextPageToken", }); + internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor, + new java.lang.String[] { "Parent", "Occurrence", }); + internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor, + new java.lang.String[] { "Name", "Occurrence", "UpdateMask", }); + internal_static_grafeas_v1_GetNoteRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_GetNoteRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_grafeas_v1_ListNotesRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ListNotesRequest_descriptor, + new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", }); + internal_static_grafeas_v1_ListNotesResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ListNotesResponse_descriptor, + new java.lang.String[] { "Notes", "NextPageToken", }); + internal_static_grafeas_v1_DeleteNoteRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DeleteNoteRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_grafeas_v1_CreateNoteRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_CreateNoteRequest_descriptor, + new java.lang.String[] { "Parent", "NoteId", "Note", }); + internal_static_grafeas_v1_UpdateNoteRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_UpdateNoteRequest_descriptor, + new java.lang.String[] { "Name", "Note", "UpdateMask", }); + internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor, + new java.lang.String[] { "Name", "Filter", "PageSize", "PageToken", }); + internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor, + new java.lang.String[] { "Occurrences", "NextPageToken", }); + internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor, + new java.lang.String[] { "Parent", "Notes", }); + internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor = + internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor, + new java.lang.String[] { "Notes", }); + internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor, + new java.lang.String[] { "Parent", "Occurrences", }); + internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor, + new java.lang.String[] { "Occurrences", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + io.grafeas.v1.Attestation.getDescriptor(); + io.grafeas.v1.Build.getDescriptor(); + io.grafeas.v1.Common.getDescriptor(); + io.grafeas.v1.Compliance.getDescriptor(); + io.grafeas.v1.Deployment.getDescriptor(); + io.grafeas.v1.Discovery.getDescriptor(); + io.grafeas.v1.DsseAttestation.getDescriptor(); + io.grafeas.v1.Image.getDescriptor(); + io.grafeas.v1.Package.getDescriptor(); + io.grafeas.v1.Upgrade.getDescriptor(); + io.grafeas.v1.Vulnerability.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java new file mode 100644 index 000000000000..898f9ad61838 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java @@ -0,0 +1,340 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.protobuf.Empty; +import io.grafeas.v1.stub.GrafeasStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link GrafeasClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (containeranalysis.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getOccurrence to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * GrafeasSettings.Builder grafeasSettingsBuilder = GrafeasSettings.newBuilder();
+ * grafeasSettingsBuilder
+ *     .getOccurrenceSettings()
+ *     .setRetrySettings(
+ *         grafeasSettingsBuilder
+ *             .getOccurrenceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * GrafeasSettings grafeasSettings = grafeasSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class GrafeasSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to getOccurrence. */ + public UnaryCallSettings getOccurrenceSettings() { + return ((GrafeasStubSettings) getStubSettings()).getOccurrenceSettings(); + } + + /** Returns the object with the settings used for calls to listOccurrences. */ + public PagedCallSettings< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> + listOccurrencesSettings() { + return ((GrafeasStubSettings) getStubSettings()).listOccurrencesSettings(); + } + + /** Returns the object with the settings used for calls to deleteOccurrence. */ + public UnaryCallSettings deleteOccurrenceSettings() { + return ((GrafeasStubSettings) getStubSettings()).deleteOccurrenceSettings(); + } + + /** Returns the object with the settings used for calls to createOccurrence. */ + public UnaryCallSettings createOccurrenceSettings() { + return ((GrafeasStubSettings) getStubSettings()).createOccurrenceSettings(); + } + + /** Returns the object with the settings used for calls to batchCreateOccurrences. */ + public UnaryCallSettings + batchCreateOccurrencesSettings() { + return ((GrafeasStubSettings) getStubSettings()).batchCreateOccurrencesSettings(); + } + + /** Returns the object with the settings used for calls to updateOccurrence. */ + public UnaryCallSettings updateOccurrenceSettings() { + return ((GrafeasStubSettings) getStubSettings()).updateOccurrenceSettings(); + } + + /** Returns the object with the settings used for calls to getOccurrenceNote. */ + public UnaryCallSettings getOccurrenceNoteSettings() { + return ((GrafeasStubSettings) getStubSettings()).getOccurrenceNoteSettings(); + } + + /** Returns the object with the settings used for calls to getNote. */ + public UnaryCallSettings getNoteSettings() { + return ((GrafeasStubSettings) getStubSettings()).getNoteSettings(); + } + + /** Returns the object with the settings used for calls to listNotes. */ + public PagedCallSettings + listNotesSettings() { + return ((GrafeasStubSettings) getStubSettings()).listNotesSettings(); + } + + /** Returns the object with the settings used for calls to deleteNote. */ + public UnaryCallSettings deleteNoteSettings() { + return ((GrafeasStubSettings) getStubSettings()).deleteNoteSettings(); + } + + /** Returns the object with the settings used for calls to createNote. */ + public UnaryCallSettings createNoteSettings() { + return ((GrafeasStubSettings) getStubSettings()).createNoteSettings(); + } + + /** Returns the object with the settings used for calls to batchCreateNotes. */ + public UnaryCallSettings + batchCreateNotesSettings() { + return ((GrafeasStubSettings) getStubSettings()).batchCreateNotesSettings(); + } + + /** Returns the object with the settings used for calls to updateNote. */ + public UnaryCallSettings updateNoteSettings() { + return ((GrafeasStubSettings) getStubSettings()).updateNoteSettings(); + } + + /** Returns the object with the settings used for calls to listNoteOccurrences. */ + public PagedCallSettings< + ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> + listNoteOccurrencesSettings() { + return ((GrafeasStubSettings) getStubSettings()).listNoteOccurrencesSettings(); + } + + public static final GrafeasSettings create(GrafeasStubSettings stub) throws IOException { + return new GrafeasSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return GrafeasStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return GrafeasStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return GrafeasStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GrafeasStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return GrafeasStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return GrafeasStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return GrafeasStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected GrafeasSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for GrafeasSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(GrafeasStubSettings.newBuilder(clientContext)); + } + + protected Builder(GrafeasSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(GrafeasStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(GrafeasStubSettings.newBuilder()); + } + + public GrafeasStubSettings.Builder getStubSettingsBuilder() { + return ((GrafeasStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getOccurrence. */ + public UnaryCallSettings.Builder getOccurrenceSettings() { + return getStubSettingsBuilder().getOccurrenceSettings(); + } + + /** Returns the builder for the settings used for calls to listOccurrences. */ + public PagedCallSettings.Builder< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> + listOccurrencesSettings() { + return getStubSettingsBuilder().listOccurrencesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteOccurrence. */ + public UnaryCallSettings.Builder deleteOccurrenceSettings() { + return getStubSettingsBuilder().deleteOccurrenceSettings(); + } + + /** Returns the builder for the settings used for calls to createOccurrence. */ + public UnaryCallSettings.Builder + createOccurrenceSettings() { + return getStubSettingsBuilder().createOccurrenceSettings(); + } + + /** Returns the builder for the settings used for calls to batchCreateOccurrences. */ + public UnaryCallSettings.Builder + batchCreateOccurrencesSettings() { + return getStubSettingsBuilder().batchCreateOccurrencesSettings(); + } + + /** Returns the builder for the settings used for calls to updateOccurrence. */ + public UnaryCallSettings.Builder + updateOccurrenceSettings() { + return getStubSettingsBuilder().updateOccurrenceSettings(); + } + + /** Returns the builder for the settings used for calls to getOccurrenceNote. */ + public UnaryCallSettings.Builder getOccurrenceNoteSettings() { + return getStubSettingsBuilder().getOccurrenceNoteSettings(); + } + + /** Returns the builder for the settings used for calls to getNote. */ + public UnaryCallSettings.Builder getNoteSettings() { + return getStubSettingsBuilder().getNoteSettings(); + } + + /** Returns the builder for the settings used for calls to listNotes. */ + public PagedCallSettings.Builder + listNotesSettings() { + return getStubSettingsBuilder().listNotesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNote. */ + public UnaryCallSettings.Builder deleteNoteSettings() { + return getStubSettingsBuilder().deleteNoteSettings(); + } + + /** Returns the builder for the settings used for calls to createNote. */ + public UnaryCallSettings.Builder createNoteSettings() { + return getStubSettingsBuilder().createNoteSettings(); + } + + /** Returns the builder for the settings used for calls to batchCreateNotes. */ + public UnaryCallSettings.Builder + batchCreateNotesSettings() { + return getStubSettingsBuilder().batchCreateNotesSettings(); + } + + /** Returns the builder for the settings used for calls to updateNote. */ + public UnaryCallSettings.Builder updateNoteSettings() { + return getStubSettingsBuilder().updateNoteSettings(); + } + + /** Returns the builder for the settings used for calls to listNoteOccurrences. */ + public PagedCallSettings.Builder< + ListNoteOccurrencesRequest, + ListNoteOccurrencesResponse, + ListNoteOccurrencesPagedResponse> + listNoteOccurrencesSettings() { + return getStubSettingsBuilder().listNoteOccurrencesSettings(); + } + + @Override + public GrafeasSettings build() throws IOException { + return new GrafeasSettings(this); + } + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java new file mode 100644 index 000000000000..9d44bb822baa --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java @@ -0,0 +1,663 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *

+ * Container message for hash values.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Hash} + */ +public final class Hash extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Hash) + HashOrBuilder { +private static final long serialVersionUID = 0L; + // Use Hash.newBuilder() to construct. + private Hash(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Hash() { + type_ = ""; + value_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Hash(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Hash.class, io.grafeas.v1.Hash.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + *
+   * Required. The type of hash that was performed, e.g. "SHA-256".
+   * 
+ * + * string type = 1; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * Required. The type of hash that was performed, e.g. "SHA-256".
+   * 
+ * + * string type = 1; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+   * Required. The hash value.
+   * 
+ * + * bytes value = 2; + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (!value_.isEmpty()) { + output.writeBytes(2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (!value_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Hash)) { + return super.equals(obj); + } + io.grafeas.v1.Hash other = (io.grafeas.v1.Hash) obj; + + if (!getType() + .equals(other.getType())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Hash parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Hash parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Hash parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Hash parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Hash parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Hash parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Hash parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Hash parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Hash parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Hash parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Hash parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Hash parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Hash prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Container message for hash values.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Hash} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Hash) + io.grafeas.v1.HashOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Hash.class, io.grafeas.v1.Hash.Builder.class); + } + + // Construct using io.grafeas.v1.Hash.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + value_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Hash getDefaultInstanceForType() { + return io.grafeas.v1.Hash.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Hash build() { + io.grafeas.v1.Hash result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Hash buildPartial() { + io.grafeas.v1.Hash result = new io.grafeas.v1.Hash(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Hash result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Hash) { + return mergeFrom((io.grafeas.v1.Hash)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Hash other) { + if (other == io.grafeas.v1.Hash.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + value_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + *
+     * Required. The type of hash that was performed, e.g. "SHA-256".
+     * 
+ * + * string type = 1; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The type of hash that was performed, e.g. "SHA-256".
+     * 
+ * + * string type = 1; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The type of hash that was performed, e.g. "SHA-256".
+     * 
+ * + * string type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The type of hash that was performed, e.g. "SHA-256".
+     * 
+ * + * string type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The type of hash that was performed, e.g. "SHA-256".
+     * 
+ * + * string type = 1; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Required. The hash value.
+     * 
+ * + * bytes value = 2; + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return value_; + } + /** + *
+     * Required. The hash value.
+     * 
+ * + * bytes value = 2; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The hash value.
+     * 
+ * + * bytes value = 2; + * @return This builder for chaining. + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Hash) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Hash) + private static final io.grafeas.v1.Hash DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Hash(); + } + + public static io.grafeas.v1.Hash getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Hash parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Hash getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java new file mode 100644 index 000000000000..3b14e9540a5b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface HashOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Hash) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The type of hash that was performed, e.g. "SHA-256".
+   * 
+ * + * string type = 1; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * Required. The type of hash that was performed, e.g. "SHA-256".
+   * 
+ * + * string type = 1; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+   * Required. The hash value.
+   * 
+ * + * bytes value = 2; + * @return The value. + */ + com.google.protobuf.ByteString getValue(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java new file mode 100644 index 000000000000..4552e28165f9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java @@ -0,0 +1,90 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +public final class Image { + private Image() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Layer_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Layer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Fingerprint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Fingerprint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ImageNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ImageNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ImageOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026grafeas/v1/image.proto\022\ngrafeas.v1\"-\n\005" + + "Layer\022\021\n\tdirective\030\001 \001(\t\022\021\n\targuments\030\002 " + + "\001(\t\"@\n\013Fingerprint\022\017\n\007v1_name\030\001 \001(\t\022\017\n\007v" + + "2_blob\030\002 \003(\t\022\017\n\007v2_name\030\003 \001(\t\"O\n\tImageNo" + + "te\022\024\n\014resource_url\030\001 \001(\t\022,\n\013fingerprint\030" + + "\002 \001(\0132\027.grafeas.v1.Fingerprint\"\223\001\n\017Image" + + "Occurrence\022,\n\013fingerprint\030\001 \001(\0132\027.grafea" + + "s.v1.Fingerprint\022\020\n\010distance\030\002 \001(\005\022%\n\nla" + + "yer_info\030\003 \003(\0132\021.grafeas.v1.Layer\022\031\n\021bas" + + "e_resource_url\030\004 \001(\tBQ\n\rio.grafeas.v1P\001Z" + + "8google.golang.org/genproto/googleapis/g" + + "rafeas/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_grafeas_v1_Layer_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_Layer_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Layer_descriptor, + new java.lang.String[] { "Directive", "Arguments", }); + internal_static_grafeas_v1_Fingerprint_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Fingerprint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Fingerprint_descriptor, + new java.lang.String[] { "V1Name", "V2Blob", "V2Name", }); + internal_static_grafeas_v1_ImageNote_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_ImageNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ImageNote_descriptor, + new java.lang.String[] { "ResourceUrl", "Fingerprint", }); + internal_static_grafeas_v1_ImageOccurrence_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ImageOccurrence_descriptor, + new java.lang.String[] { "Fingerprint", "Distance", "LayerInfo", "BaseResourceUrl", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java new file mode 100644 index 000000000000..69fb40e2db70 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java @@ -0,0 +1,824 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +/** + *
+ * Basis describes the base image portion (Note) of the DockerImage
+ * relationship. Linked occurrences are derived from this or an equivalent image
+ * via:
+ *   FROM <Basis.resource_url>
+ * Or an equivalent reference, e.g., a tag of the resource_url.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ImageNote} + */ +public final class ImageNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ImageNote) + ImageNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageNote.newBuilder() to construct. + private ImageNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageNote() { + resourceUrl_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ImageNote.class, io.grafeas.v1.ImageNote.Builder.class); + } + + public static final int RESOURCE_URL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object resourceUrl_ = ""; + /** + *
+   * Required. Immutable. The resource_url for the resource representing the
+   * basis of associated occurrence images.
+   * 
+ * + * string resource_url = 1; + * @return The resourceUrl. + */ + @java.lang.Override + public java.lang.String getResourceUrl() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUrl_ = s; + return s; + } + } + /** + *
+   * Required. Immutable. The resource_url for the resource representing the
+   * basis of associated occurrence images.
+   * 
+ * + * string resource_url = 1; + * @return The bytes for resourceUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceUrlBytes() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FINGERPRINT_FIELD_NUMBER = 2; + private io.grafeas.v1.Fingerprint fingerprint_; + /** + *
+   * Required. Immutable. The fingerprint of the base image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + * @return Whether the fingerprint field is set. + */ + @java.lang.Override + public boolean hasFingerprint() { + return fingerprint_ != null; + } + /** + *
+   * Required. Immutable. The fingerprint of the base image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + * @return The fingerprint. + */ + @java.lang.Override + public io.grafeas.v1.Fingerprint getFingerprint() { + return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } + /** + *
+   * Required. Immutable. The fingerprint of the base image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + @java.lang.Override + public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { + return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceUrl_); + } + if (fingerprint_ != null) { + output.writeMessage(2, getFingerprint()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceUrl_); + } + if (fingerprint_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFingerprint()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ImageNote)) { + return super.equals(obj); + } + io.grafeas.v1.ImageNote other = (io.grafeas.v1.ImageNote) obj; + + if (!getResourceUrl() + .equals(other.getResourceUrl())) return false; + if (hasFingerprint() != other.hasFingerprint()) return false; + if (hasFingerprint()) { + if (!getFingerprint() + .equals(other.getFingerprint())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_URL_FIELD_NUMBER; + hash = (53 * hash) + getResourceUrl().hashCode(); + if (hasFingerprint()) { + hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER; + hash = (53 * hash) + getFingerprint().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ImageNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ImageNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ImageNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ImageNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ImageNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ImageNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ImageNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ImageNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ImageNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ImageNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ImageNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ImageNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ImageNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Basis describes the base image portion (Note) of the DockerImage
+   * relationship. Linked occurrences are derived from this or an equivalent image
+   * via:
+   *   FROM <Basis.resource_url>
+   * Or an equivalent reference, e.g., a tag of the resource_url.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ImageNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ImageNote) + io.grafeas.v1.ImageNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ImageNote.class, io.grafeas.v1.ImageNote.Builder.class); + } + + // Construct using io.grafeas.v1.ImageNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceUrl_ = ""; + fingerprint_ = null; + if (fingerprintBuilder_ != null) { + fingerprintBuilder_.dispose(); + fingerprintBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ImageNote getDefaultInstanceForType() { + return io.grafeas.v1.ImageNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ImageNote build() { + io.grafeas.v1.ImageNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ImageNote buildPartial() { + io.grafeas.v1.ImageNote result = new io.grafeas.v1.ImageNote(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.ImageNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceUrl_ = resourceUrl_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fingerprint_ = fingerprintBuilder_ == null + ? fingerprint_ + : fingerprintBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ImageNote) { + return mergeFrom((io.grafeas.v1.ImageNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ImageNote other) { + if (other == io.grafeas.v1.ImageNote.getDefaultInstance()) return this; + if (!other.getResourceUrl().isEmpty()) { + resourceUrl_ = other.resourceUrl_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasFingerprint()) { + mergeFingerprint(other.getFingerprint()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + resourceUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getFingerprintFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object resourceUrl_ = ""; + /** + *
+     * Required. Immutable. The resource_url for the resource representing the
+     * basis of associated occurrence images.
+     * 
+ * + * string resource_url = 1; + * @return The resourceUrl. + */ + public java.lang.String getResourceUrl() { + java.lang.Object ref = resourceUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Immutable. The resource_url for the resource representing the
+     * basis of associated occurrence images.
+     * 
+ * + * string resource_url = 1; + * @return The bytes for resourceUrl. + */ + public com.google.protobuf.ByteString + getResourceUrlBytes() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Immutable. The resource_url for the resource representing the
+     * basis of associated occurrence images.
+     * 
+ * + * string resource_url = 1; + * @param value The resourceUrl to set. + * @return This builder for chaining. + */ + public Builder setResourceUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resourceUrl_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The resource_url for the resource representing the
+     * basis of associated occurrence images.
+     * 
+ * + * string resource_url = 1; + * @return This builder for chaining. + */ + public Builder clearResourceUrl() { + resourceUrl_ = getDefaultInstance().getResourceUrl(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The resource_url for the resource representing the
+     * basis of associated occurrence images.
+     * 
+ * + * string resource_url = 1; + * @param value The bytes for resourceUrl to set. + * @return This builder for chaining. + */ + public Builder setResourceUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resourceUrl_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.grafeas.v1.Fingerprint fingerprint_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> fingerprintBuilder_; + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + * @return Whether the fingerprint field is set. + */ + public boolean hasFingerprint() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + * @return The fingerprint. + */ + public io.grafeas.v1.Fingerprint getFingerprint() { + if (fingerprintBuilder_ == null) { + return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } else { + return fingerprintBuilder_.getMessage(); + } + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + public Builder setFingerprint(io.grafeas.v1.Fingerprint value) { + if (fingerprintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fingerprint_ = value; + } else { + fingerprintBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + public Builder setFingerprint( + io.grafeas.v1.Fingerprint.Builder builderForValue) { + if (fingerprintBuilder_ == null) { + fingerprint_ = builderForValue.build(); + } else { + fingerprintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + public Builder mergeFingerprint(io.grafeas.v1.Fingerprint value) { + if (fingerprintBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + fingerprint_ != null && + fingerprint_ != io.grafeas.v1.Fingerprint.getDefaultInstance()) { + getFingerprintBuilder().mergeFrom(value); + } else { + fingerprint_ = value; + } + } else { + fingerprintBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + public Builder clearFingerprint() { + bitField0_ = (bitField0_ & ~0x00000002); + fingerprint_ = null; + if (fingerprintBuilder_ != null) { + fingerprintBuilder_.dispose(); + fingerprintBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + public io.grafeas.v1.Fingerprint.Builder getFingerprintBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFingerprintFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { + if (fingerprintBuilder_ != null) { + return fingerprintBuilder_.getMessageOrBuilder(); + } else { + return fingerprint_ == null ? + io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> + getFingerprintFieldBuilder() { + if (fingerprintBuilder_ == null) { + fingerprintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder>( + getFingerprint(), + getParentForChildren(), + isClean()); + fingerprint_ = null; + } + return fingerprintBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ImageNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ImageNote) + private static final io.grafeas.v1.ImageNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ImageNote(); + } + + public static io.grafeas.v1.ImageNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ImageNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java new file mode 100644 index 000000000000..d3ff6b229887 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +public interface ImageNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ImageNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Immutable. The resource_url for the resource representing the
+   * basis of associated occurrence images.
+   * 
+ * + * string resource_url = 1; + * @return The resourceUrl. + */ + java.lang.String getResourceUrl(); + /** + *
+   * Required. Immutable. The resource_url for the resource representing the
+   * basis of associated occurrence images.
+   * 
+ * + * string resource_url = 1; + * @return The bytes for resourceUrl. + */ + com.google.protobuf.ByteString + getResourceUrlBytes(); + + /** + *
+   * Required. Immutable. The fingerprint of the base image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + * @return Whether the fingerprint field is set. + */ + boolean hasFingerprint(); + /** + *
+   * Required. Immutable. The fingerprint of the base image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + * @return The fingerprint. + */ + io.grafeas.v1.Fingerprint getFingerprint(); + /** + *
+   * Required. Immutable. The fingerprint of the base image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java new file mode 100644 index 000000000000..42e50c3a99ed --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java @@ -0,0 +1,1398 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +/** + *
+ * Details of the derived image portion of the DockerImage relationship. This
+ * image would be produced from a Dockerfile with FROM <DockerImage.Basis in
+ * attached Note>.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ImageOccurrence} + */ +public final class ImageOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ImageOccurrence) + ImageOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageOccurrence.newBuilder() to construct. + private ImageOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageOccurrence() { + layerInfo_ = java.util.Collections.emptyList(); + baseResourceUrl_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ImageOccurrence.class, io.grafeas.v1.ImageOccurrence.Builder.class); + } + + public static final int FINGERPRINT_FIELD_NUMBER = 1; + private io.grafeas.v1.Fingerprint fingerprint_; + /** + *
+   * Required. The fingerprint of the derived image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + * @return Whether the fingerprint field is set. + */ + @java.lang.Override + public boolean hasFingerprint() { + return fingerprint_ != null; + } + /** + *
+   * Required. The fingerprint of the derived image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + * @return The fingerprint. + */ + @java.lang.Override + public io.grafeas.v1.Fingerprint getFingerprint() { + return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } + /** + *
+   * Required. The fingerprint of the derived image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + @java.lang.Override + public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { + return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } + + public static final int DISTANCE_FIELD_NUMBER = 2; + private int distance_ = 0; + /** + *
+   * Output only. The number of layers by which this image differs from the
+   * associated image basis.
+   * 
+ * + * int32 distance = 2; + * @return The distance. + */ + @java.lang.Override + public int getDistance() { + return distance_; + } + + public static final int LAYER_INFO_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List layerInfo_; + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + @java.lang.Override + public java.util.List getLayerInfoList() { + return layerInfo_; + } + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + @java.lang.Override + public java.util.List + getLayerInfoOrBuilderList() { + return layerInfo_; + } + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + @java.lang.Override + public int getLayerInfoCount() { + return layerInfo_.size(); + } + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + @java.lang.Override + public io.grafeas.v1.Layer getLayerInfo(int index) { + return layerInfo_.get(index); + } + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + @java.lang.Override + public io.grafeas.v1.LayerOrBuilder getLayerInfoOrBuilder( + int index) { + return layerInfo_.get(index); + } + + public static final int BASE_RESOURCE_URL_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object baseResourceUrl_ = ""; + /** + *
+   * Output only. This contains the base image URL for the derived image
+   * occurrence.
+   * 
+ * + * string base_resource_url = 4; + * @return The baseResourceUrl. + */ + @java.lang.Override + public java.lang.String getBaseResourceUrl() { + java.lang.Object ref = baseResourceUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseResourceUrl_ = s; + return s; + } + } + /** + *
+   * Output only. This contains the base image URL for the derived image
+   * occurrence.
+   * 
+ * + * string base_resource_url = 4; + * @return The bytes for baseResourceUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBaseResourceUrlBytes() { + java.lang.Object ref = baseResourceUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + baseResourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (fingerprint_ != null) { + output.writeMessage(1, getFingerprint()); + } + if (distance_ != 0) { + output.writeInt32(2, distance_); + } + for (int i = 0; i < layerInfo_.size(); i++) { + output.writeMessage(3, layerInfo_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseResourceUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, baseResourceUrl_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (fingerprint_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getFingerprint()); + } + if (distance_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, distance_); + } + for (int i = 0; i < layerInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, layerInfo_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseResourceUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, baseResourceUrl_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ImageOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.ImageOccurrence other = (io.grafeas.v1.ImageOccurrence) obj; + + if (hasFingerprint() != other.hasFingerprint()) return false; + if (hasFingerprint()) { + if (!getFingerprint() + .equals(other.getFingerprint())) return false; + } + if (getDistance() + != other.getDistance()) return false; + if (!getLayerInfoList() + .equals(other.getLayerInfoList())) return false; + if (!getBaseResourceUrl() + .equals(other.getBaseResourceUrl())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFingerprint()) { + hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER; + hash = (53 * hash) + getFingerprint().hashCode(); + } + hash = (37 * hash) + DISTANCE_FIELD_NUMBER; + hash = (53 * hash) + getDistance(); + if (getLayerInfoCount() > 0) { + hash = (37 * hash) + LAYER_INFO_FIELD_NUMBER; + hash = (53 * hash) + getLayerInfoList().hashCode(); + } + hash = (37 * hash) + BASE_RESOURCE_URL_FIELD_NUMBER; + hash = (53 * hash) + getBaseResourceUrl().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ImageOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ImageOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ImageOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ImageOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ImageOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ImageOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ImageOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ImageOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ImageOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ImageOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ImageOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ImageOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ImageOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Details of the derived image portion of the DockerImage relationship. This
+   * image would be produced from a Dockerfile with FROM <DockerImage.Basis in
+   * attached Note>.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ImageOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ImageOccurrence) + io.grafeas.v1.ImageOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ImageOccurrence.class, io.grafeas.v1.ImageOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.ImageOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fingerprint_ = null; + if (fingerprintBuilder_ != null) { + fingerprintBuilder_.dispose(); + fingerprintBuilder_ = null; + } + distance_ = 0; + if (layerInfoBuilder_ == null) { + layerInfo_ = java.util.Collections.emptyList(); + } else { + layerInfo_ = null; + layerInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + baseResourceUrl_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ImageOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ImageOccurrence build() { + io.grafeas.v1.ImageOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ImageOccurrence buildPartial() { + io.grafeas.v1.ImageOccurrence result = new io.grafeas.v1.ImageOccurrence(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.ImageOccurrence result) { + if (layerInfoBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + layerInfo_ = java.util.Collections.unmodifiableList(layerInfo_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.layerInfo_ = layerInfo_; + } else { + result.layerInfo_ = layerInfoBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.ImageOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fingerprint_ = fingerprintBuilder_ == null + ? fingerprint_ + : fingerprintBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.distance_ = distance_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.baseResourceUrl_ = baseResourceUrl_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ImageOccurrence) { + return mergeFrom((io.grafeas.v1.ImageOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ImageOccurrence other) { + if (other == io.grafeas.v1.ImageOccurrence.getDefaultInstance()) return this; + if (other.hasFingerprint()) { + mergeFingerprint(other.getFingerprint()); + } + if (other.getDistance() != 0) { + setDistance(other.getDistance()); + } + if (layerInfoBuilder_ == null) { + if (!other.layerInfo_.isEmpty()) { + if (layerInfo_.isEmpty()) { + layerInfo_ = other.layerInfo_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLayerInfoIsMutable(); + layerInfo_.addAll(other.layerInfo_); + } + onChanged(); + } + } else { + if (!other.layerInfo_.isEmpty()) { + if (layerInfoBuilder_.isEmpty()) { + layerInfoBuilder_.dispose(); + layerInfoBuilder_ = null; + layerInfo_ = other.layerInfo_; + bitField0_ = (bitField0_ & ~0x00000004); + layerInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLayerInfoFieldBuilder() : null; + } else { + layerInfoBuilder_.addAllMessages(other.layerInfo_); + } + } + } + if (!other.getBaseResourceUrl().isEmpty()) { + baseResourceUrl_ = other.baseResourceUrl_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getFingerprintFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + distance_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + io.grafeas.v1.Layer m = + input.readMessage( + io.grafeas.v1.Layer.parser(), + extensionRegistry); + if (layerInfoBuilder_ == null) { + ensureLayerInfoIsMutable(); + layerInfo_.add(m); + } else { + layerInfoBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: { + baseResourceUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.Fingerprint fingerprint_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> fingerprintBuilder_; + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + * @return Whether the fingerprint field is set. + */ + public boolean hasFingerprint() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + * @return The fingerprint. + */ + public io.grafeas.v1.Fingerprint getFingerprint() { + if (fingerprintBuilder_ == null) { + return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } else { + return fingerprintBuilder_.getMessage(); + } + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + public Builder setFingerprint(io.grafeas.v1.Fingerprint value) { + if (fingerprintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fingerprint_ = value; + } else { + fingerprintBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + public Builder setFingerprint( + io.grafeas.v1.Fingerprint.Builder builderForValue) { + if (fingerprintBuilder_ == null) { + fingerprint_ = builderForValue.build(); + } else { + fingerprintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + public Builder mergeFingerprint(io.grafeas.v1.Fingerprint value) { + if (fingerprintBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + fingerprint_ != null && + fingerprint_ != io.grafeas.v1.Fingerprint.getDefaultInstance()) { + getFingerprintBuilder().mergeFrom(value); + } else { + fingerprint_ = value; + } + } else { + fingerprintBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + public Builder clearFingerprint() { + bitField0_ = (bitField0_ & ~0x00000001); + fingerprint_ = null; + if (fingerprintBuilder_ != null) { + fingerprintBuilder_.dispose(); + fingerprintBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + public io.grafeas.v1.Fingerprint.Builder getFingerprintBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getFingerprintFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { + if (fingerprintBuilder_ != null) { + return fingerprintBuilder_.getMessageOrBuilder(); + } else { + return fingerprint_ == null ? + io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> + getFingerprintFieldBuilder() { + if (fingerprintBuilder_ == null) { + fingerprintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder>( + getFingerprint(), + getParentForChildren(), + isClean()); + fingerprint_ = null; + } + return fingerprintBuilder_; + } + + private int distance_ ; + /** + *
+     * Output only. The number of layers by which this image differs from the
+     * associated image basis.
+     * 
+ * + * int32 distance = 2; + * @return The distance. + */ + @java.lang.Override + public int getDistance() { + return distance_; + } + /** + *
+     * Output only. The number of layers by which this image differs from the
+     * associated image basis.
+     * 
+ * + * int32 distance = 2; + * @param value The distance to set. + * @return This builder for chaining. + */ + public Builder setDistance(int value) { + + distance_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The number of layers by which this image differs from the
+     * associated image basis.
+     * 
+ * + * int32 distance = 2; + * @return This builder for chaining. + */ + public Builder clearDistance() { + bitField0_ = (bitField0_ & ~0x00000002); + distance_ = 0; + onChanged(); + return this; + } + + private java.util.List layerInfo_ = + java.util.Collections.emptyList(); + private void ensureLayerInfoIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + layerInfo_ = new java.util.ArrayList(layerInfo_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Layer, io.grafeas.v1.Layer.Builder, io.grafeas.v1.LayerOrBuilder> layerInfoBuilder_; + + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public java.util.List getLayerInfoList() { + if (layerInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(layerInfo_); + } else { + return layerInfoBuilder_.getMessageList(); + } + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public int getLayerInfoCount() { + if (layerInfoBuilder_ == null) { + return layerInfo_.size(); + } else { + return layerInfoBuilder_.getCount(); + } + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public io.grafeas.v1.Layer getLayerInfo(int index) { + if (layerInfoBuilder_ == null) { + return layerInfo_.get(index); + } else { + return layerInfoBuilder_.getMessage(index); + } + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder setLayerInfo( + int index, io.grafeas.v1.Layer value) { + if (layerInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLayerInfoIsMutable(); + layerInfo_.set(index, value); + onChanged(); + } else { + layerInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder setLayerInfo( + int index, io.grafeas.v1.Layer.Builder builderForValue) { + if (layerInfoBuilder_ == null) { + ensureLayerInfoIsMutable(); + layerInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + layerInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder addLayerInfo(io.grafeas.v1.Layer value) { + if (layerInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLayerInfoIsMutable(); + layerInfo_.add(value); + onChanged(); + } else { + layerInfoBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder addLayerInfo( + int index, io.grafeas.v1.Layer value) { + if (layerInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLayerInfoIsMutable(); + layerInfo_.add(index, value); + onChanged(); + } else { + layerInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder addLayerInfo( + io.grafeas.v1.Layer.Builder builderForValue) { + if (layerInfoBuilder_ == null) { + ensureLayerInfoIsMutable(); + layerInfo_.add(builderForValue.build()); + onChanged(); + } else { + layerInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder addLayerInfo( + int index, io.grafeas.v1.Layer.Builder builderForValue) { + if (layerInfoBuilder_ == null) { + ensureLayerInfoIsMutable(); + layerInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + layerInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder addAllLayerInfo( + java.lang.Iterable values) { + if (layerInfoBuilder_ == null) { + ensureLayerInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, layerInfo_); + onChanged(); + } else { + layerInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder clearLayerInfo() { + if (layerInfoBuilder_ == null) { + layerInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + layerInfoBuilder_.clear(); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder removeLayerInfo(int index) { + if (layerInfoBuilder_ == null) { + ensureLayerInfoIsMutable(); + layerInfo_.remove(index); + onChanged(); + } else { + layerInfoBuilder_.remove(index); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public io.grafeas.v1.Layer.Builder getLayerInfoBuilder( + int index) { + return getLayerInfoFieldBuilder().getBuilder(index); + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public io.grafeas.v1.LayerOrBuilder getLayerInfoOrBuilder( + int index) { + if (layerInfoBuilder_ == null) { + return layerInfo_.get(index); } else { + return layerInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public java.util.List + getLayerInfoOrBuilderList() { + if (layerInfoBuilder_ != null) { + return layerInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(layerInfo_); + } + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public io.grafeas.v1.Layer.Builder addLayerInfoBuilder() { + return getLayerInfoFieldBuilder().addBuilder( + io.grafeas.v1.Layer.getDefaultInstance()); + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public io.grafeas.v1.Layer.Builder addLayerInfoBuilder( + int index) { + return getLayerInfoFieldBuilder().addBuilder( + index, io.grafeas.v1.Layer.getDefaultInstance()); + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public java.util.List + getLayerInfoBuilderList() { + return getLayerInfoFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Layer, io.grafeas.v1.Layer.Builder, io.grafeas.v1.LayerOrBuilder> + getLayerInfoFieldBuilder() { + if (layerInfoBuilder_ == null) { + layerInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Layer, io.grafeas.v1.Layer.Builder, io.grafeas.v1.LayerOrBuilder>( + layerInfo_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + layerInfo_ = null; + } + return layerInfoBuilder_; + } + + private java.lang.Object baseResourceUrl_ = ""; + /** + *
+     * Output only. This contains the base image URL for the derived image
+     * occurrence.
+     * 
+ * + * string base_resource_url = 4; + * @return The baseResourceUrl. + */ + public java.lang.String getBaseResourceUrl() { + java.lang.Object ref = baseResourceUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseResourceUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. This contains the base image URL for the derived image
+     * occurrence.
+     * 
+ * + * string base_resource_url = 4; + * @return The bytes for baseResourceUrl. + */ + public com.google.protobuf.ByteString + getBaseResourceUrlBytes() { + java.lang.Object ref = baseResourceUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + baseResourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. This contains the base image URL for the derived image
+     * occurrence.
+     * 
+ * + * string base_resource_url = 4; + * @param value The baseResourceUrl to set. + * @return This builder for chaining. + */ + public Builder setBaseResourceUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + baseResourceUrl_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. This contains the base image URL for the derived image
+     * occurrence.
+     * 
+ * + * string base_resource_url = 4; + * @return This builder for chaining. + */ + public Builder clearBaseResourceUrl() { + baseResourceUrl_ = getDefaultInstance().getBaseResourceUrl(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Output only. This contains the base image URL for the derived image
+     * occurrence.
+     * 
+ * + * string base_resource_url = 4; + * @param value The bytes for baseResourceUrl to set. + * @return This builder for chaining. + */ + public Builder setBaseResourceUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + baseResourceUrl_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ImageOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ImageOccurrence) + private static final io.grafeas.v1.ImageOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ImageOccurrence(); + } + + public static io.grafeas.v1.ImageOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ImageOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java new file mode 100644 index 000000000000..1de5a573a328 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java @@ -0,0 +1,123 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +public interface ImageOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ImageOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The fingerprint of the derived image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + * @return Whether the fingerprint field is set. + */ + boolean hasFingerprint(); + /** + *
+   * Required. The fingerprint of the derived image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + * @return The fingerprint. + */ + io.grafeas.v1.Fingerprint getFingerprint(); + /** + *
+   * Required. The fingerprint of the derived image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder(); + + /** + *
+   * Output only. The number of layers by which this image differs from the
+   * associated image basis.
+   * 
+ * + * int32 distance = 2; + * @return The distance. + */ + int getDistance(); + + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + java.util.List + getLayerInfoList(); + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + io.grafeas.v1.Layer getLayerInfo(int index); + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + int getLayerInfoCount(); + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + java.util.List + getLayerInfoOrBuilderList(); + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + io.grafeas.v1.LayerOrBuilder getLayerInfoOrBuilder( + int index); + + /** + *
+   * Output only. This contains the base image URL for the derived image
+   * occurrence.
+   * 
+ * + * string base_resource_url = 4; + * @return The baseResourceUrl. + */ + java.lang.String getBaseResourceUrl(); + /** + *
+   * Output only. This contains the base image URL for the derived image
+   * occurrence.
+   * 
+ * + * string base_resource_url = 4; + * @return The bytes for baseResourceUrl. + */ + com.google.protobuf.ByteString + getBaseResourceUrlBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java new file mode 100644 index 000000000000..e5a98d01e8fe --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java @@ -0,0 +1,1359 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.InTotoProvenance} + */ +public final class InTotoProvenance extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.InTotoProvenance) + InTotoProvenanceOrBuilder { +private static final long serialVersionUID = 0L; + // Use InTotoProvenance.newBuilder() to construct. + private InTotoProvenance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InTotoProvenance() { + materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InTotoProvenance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.InTotoProvenance.class, io.grafeas.v1.InTotoProvenance.Builder.class); + } + + public static final int BUILDER_CONFIG_FIELD_NUMBER = 1; + private io.grafeas.v1.BuilderConfig builderConfig_; + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + * @return Whether the builderConfig field is set. + */ + @java.lang.Override + public boolean hasBuilderConfig() { + return builderConfig_ != null; + } + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + * @return The builderConfig. + */ + @java.lang.Override + public io.grafeas.v1.BuilderConfig getBuilderConfig() { + return builderConfig_ == null ? io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; + } + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + @java.lang.Override + public io.grafeas.v1.BuilderConfigOrBuilder getBuilderConfigOrBuilder() { + return builderConfig_ == null ? io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; + } + + public static final int RECIPE_FIELD_NUMBER = 2; + private io.grafeas.v1.Recipe recipe_; + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.Recipe recipe = 2; + * @return Whether the recipe field is set. + */ + @java.lang.Override + public boolean hasRecipe() { + return recipe_ != null; + } + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.Recipe recipe = 2; + * @return The recipe. + */ + @java.lang.Override + public io.grafeas.v1.Recipe getRecipe() { + return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; + } + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + @java.lang.Override + public io.grafeas.v1.RecipeOrBuilder getRecipeOrBuilder() { + return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; + } + + public static final int METADATA_FIELD_NUMBER = 3; + private io.grafeas.v1.Metadata metadata_; + /** + * .grafeas.v1.Metadata metadata = 3; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * .grafeas.v1.Metadata metadata = 3; + * @return The metadata. + */ + @java.lang.Override + public io.grafeas.v1.Metadata getMetadata() { + return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + @java.lang.Override + public io.grafeas.v1.MetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; + } + + public static final int MATERIALS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList materials_; + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @return A list containing the materials. + */ + public com.google.protobuf.ProtocolStringList + getMaterialsList() { + return materials_; + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @return The count of materials. + */ + public int getMaterialsCount() { + return materials_.size(); + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @param index The index of the element to return. + * @return The materials at the given index. + */ + public java.lang.String getMaterials(int index) { + return materials_.get(index); + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @param index The index of the value to return. + * @return The bytes of the materials at the given index. + */ + public com.google.protobuf.ByteString + getMaterialsBytes(int index) { + return materials_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (builderConfig_ != null) { + output.writeMessage(1, getBuilderConfig()); + } + if (recipe_ != null) { + output.writeMessage(2, getRecipe()); + } + if (metadata_ != null) { + output.writeMessage(3, getMetadata()); + } + for (int i = 0; i < materials_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, materials_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (builderConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBuilderConfig()); + } + if (recipe_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRecipe()); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getMetadata()); + } + { + int dataSize = 0; + for (int i = 0; i < materials_.size(); i++) { + dataSize += computeStringSizeNoTag(materials_.getRaw(i)); + } + size += dataSize; + size += 1 * getMaterialsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.InTotoProvenance)) { + return super.equals(obj); + } + io.grafeas.v1.InTotoProvenance other = (io.grafeas.v1.InTotoProvenance) obj; + + if (hasBuilderConfig() != other.hasBuilderConfig()) return false; + if (hasBuilderConfig()) { + if (!getBuilderConfig() + .equals(other.getBuilderConfig())) return false; + } + if (hasRecipe() != other.hasRecipe()) return false; + if (hasRecipe()) { + if (!getRecipe() + .equals(other.getRecipe())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getMaterialsList() + .equals(other.getMaterialsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBuilderConfig()) { + hash = (37 * hash) + BUILDER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBuilderConfig().hashCode(); + } + if (hasRecipe()) { + hash = (37 * hash) + RECIPE_FIELD_NUMBER; + hash = (53 * hash) + getRecipe().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (getMaterialsCount() > 0) { + hash = (37 * hash) + MATERIALS_FIELD_NUMBER; + hash = (53 * hash) + getMaterialsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.InTotoProvenance parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.InTotoProvenance parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.InTotoProvenance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.InTotoProvenance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.InTotoProvenance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.InTotoProvenance parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.InTotoProvenance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.InTotoProvenance parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.InTotoProvenance parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.InTotoProvenance parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.InTotoProvenance parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.InTotoProvenance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.InTotoProvenance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.InTotoProvenance} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.InTotoProvenance) + io.grafeas.v1.InTotoProvenanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.InTotoProvenance.class, io.grafeas.v1.InTotoProvenance.Builder.class); + } + + // Construct using io.grafeas.v1.InTotoProvenance.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + builderConfig_ = null; + if (builderConfigBuilder_ != null) { + builderConfigBuilder_.dispose(); + builderConfigBuilder_ = null; + } + recipe_ = null; + if (recipeBuilder_ != null) { + recipeBuilder_.dispose(); + recipeBuilder_ = null; + } + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.InTotoProvenance getDefaultInstanceForType() { + return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.InTotoProvenance build() { + io.grafeas.v1.InTotoProvenance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.InTotoProvenance buildPartial() { + io.grafeas.v1.InTotoProvenance result = new io.grafeas.v1.InTotoProvenance(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.InTotoProvenance result) { + if (((bitField0_ & 0x00000008) != 0)) { + materials_ = materials_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.materials_ = materials_; + } + + private void buildPartial0(io.grafeas.v1.InTotoProvenance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.builderConfig_ = builderConfigBuilder_ == null + ? builderConfig_ + : builderConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.recipe_ = recipeBuilder_ == null + ? recipe_ + : recipeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.InTotoProvenance) { + return mergeFrom((io.grafeas.v1.InTotoProvenance)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.InTotoProvenance other) { + if (other == io.grafeas.v1.InTotoProvenance.getDefaultInstance()) return this; + if (other.hasBuilderConfig()) { + mergeBuilderConfig(other.getBuilderConfig()); + } + if (other.hasRecipe()) { + mergeRecipe(other.getRecipe()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (!other.materials_.isEmpty()) { + if (materials_.isEmpty()) { + materials_ = other.materials_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureMaterialsIsMutable(); + materials_.addAll(other.materials_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getBuilderConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getRecipeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + ensureMaterialsIsMutable(); + materials_.add(s); + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.BuilderConfig builderConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuilderConfig, io.grafeas.v1.BuilderConfig.Builder, io.grafeas.v1.BuilderConfigOrBuilder> builderConfigBuilder_; + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + * @return Whether the builderConfig field is set. + */ + public boolean hasBuilderConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + * @return The builderConfig. + */ + public io.grafeas.v1.BuilderConfig getBuilderConfig() { + if (builderConfigBuilder_ == null) { + return builderConfig_ == null ? io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; + } else { + return builderConfigBuilder_.getMessage(); + } + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + public Builder setBuilderConfig(io.grafeas.v1.BuilderConfig value) { + if (builderConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + builderConfig_ = value; + } else { + builderConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + public Builder setBuilderConfig( + io.grafeas.v1.BuilderConfig.Builder builderForValue) { + if (builderConfigBuilder_ == null) { + builderConfig_ = builderForValue.build(); + } else { + builderConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + public Builder mergeBuilderConfig(io.grafeas.v1.BuilderConfig value) { + if (builderConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + builderConfig_ != null && + builderConfig_ != io.grafeas.v1.BuilderConfig.getDefaultInstance()) { + getBuilderConfigBuilder().mergeFrom(value); + } else { + builderConfig_ = value; + } + } else { + builderConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + public Builder clearBuilderConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + builderConfig_ = null; + if (builderConfigBuilder_ != null) { + builderConfigBuilder_.dispose(); + builderConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + public io.grafeas.v1.BuilderConfig.Builder getBuilderConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBuilderConfigFieldBuilder().getBuilder(); + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + public io.grafeas.v1.BuilderConfigOrBuilder getBuilderConfigOrBuilder() { + if (builderConfigBuilder_ != null) { + return builderConfigBuilder_.getMessageOrBuilder(); + } else { + return builderConfig_ == null ? + io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; + } + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuilderConfig, io.grafeas.v1.BuilderConfig.Builder, io.grafeas.v1.BuilderConfigOrBuilder> + getBuilderConfigFieldBuilder() { + if (builderConfigBuilder_ == null) { + builderConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuilderConfig, io.grafeas.v1.BuilderConfig.Builder, io.grafeas.v1.BuilderConfigOrBuilder>( + getBuilderConfig(), + getParentForChildren(), + isClean()); + builderConfig_ = null; + } + return builderConfigBuilder_; + } + + private io.grafeas.v1.Recipe recipe_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Recipe, io.grafeas.v1.Recipe.Builder, io.grafeas.v1.RecipeOrBuilder> recipeBuilder_; + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + * @return Whether the recipe field is set. + */ + public boolean hasRecipe() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + * @return The recipe. + */ + public io.grafeas.v1.Recipe getRecipe() { + if (recipeBuilder_ == null) { + return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; + } else { + return recipeBuilder_.getMessage(); + } + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + public Builder setRecipe(io.grafeas.v1.Recipe value) { + if (recipeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + recipe_ = value; + } else { + recipeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + public Builder setRecipe( + io.grafeas.v1.Recipe.Builder builderForValue) { + if (recipeBuilder_ == null) { + recipe_ = builderForValue.build(); + } else { + recipeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + public Builder mergeRecipe(io.grafeas.v1.Recipe value) { + if (recipeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + recipe_ != null && + recipe_ != io.grafeas.v1.Recipe.getDefaultInstance()) { + getRecipeBuilder().mergeFrom(value); + } else { + recipe_ = value; + } + } else { + recipeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + public Builder clearRecipe() { + bitField0_ = (bitField0_ & ~0x00000002); + recipe_ = null; + if (recipeBuilder_ != null) { + recipeBuilder_.dispose(); + recipeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + public io.grafeas.v1.Recipe.Builder getRecipeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRecipeFieldBuilder().getBuilder(); + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + public io.grafeas.v1.RecipeOrBuilder getRecipeOrBuilder() { + if (recipeBuilder_ != null) { + return recipeBuilder_.getMessageOrBuilder(); + } else { + return recipe_ == null ? + io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; + } + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Recipe, io.grafeas.v1.Recipe.Builder, io.grafeas.v1.RecipeOrBuilder> + getRecipeFieldBuilder() { + if (recipeBuilder_ == null) { + recipeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Recipe, io.grafeas.v1.Recipe.Builder, io.grafeas.v1.RecipeOrBuilder>( + getRecipe(), + getParentForChildren(), + isClean()); + recipe_ = null; + } + return recipeBuilder_; + } + + private io.grafeas.v1.Metadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Metadata, io.grafeas.v1.Metadata.Builder, io.grafeas.v1.MetadataOrBuilder> metadataBuilder_; + /** + * .grafeas.v1.Metadata metadata = 3; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .grafeas.v1.Metadata metadata = 3; + * @return The metadata. + */ + public io.grafeas.v1.Metadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + public Builder setMetadata(io.grafeas.v1.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + public Builder setMetadata( + io.grafeas.v1.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + public Builder mergeMetadata(io.grafeas.v1.Metadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + metadata_ != null && + metadata_ != io.grafeas.v1.Metadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + public io.grafeas.v1.Metadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + public io.grafeas.v1.MetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; + } + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Metadata, io.grafeas.v1.Metadata.Builder, io.grafeas.v1.MetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Metadata, io.grafeas.v1.Metadata.Builder, io.grafeas.v1.MetadataOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private com.google.protobuf.LazyStringList materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureMaterialsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + materials_ = new com.google.protobuf.LazyStringArrayList(materials_); + bitField0_ |= 0x00000008; + } + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @return A list containing the materials. + */ + public com.google.protobuf.ProtocolStringList + getMaterialsList() { + return materials_.getUnmodifiableView(); + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @return The count of materials. + */ + public int getMaterialsCount() { + return materials_.size(); + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @param index The index of the element to return. + * @return The materials at the given index. + */ + public java.lang.String getMaterials(int index) { + return materials_.get(index); + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @param index The index of the value to return. + * @return The bytes of the materials at the given index. + */ + public com.google.protobuf.ByteString + getMaterialsBytes(int index) { + return materials_.getByteString(index); + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @param index The index to set the value at. + * @param value The materials to set. + * @return This builder for chaining. + */ + public Builder setMaterials( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureMaterialsIsMutable(); + materials_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @param value The materials to add. + * @return This builder for chaining. + */ + public Builder addMaterials( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureMaterialsIsMutable(); + materials_.add(value); + onChanged(); + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @param values The materials to add. + * @return This builder for chaining. + */ + public Builder addAllMaterials( + java.lang.Iterable values) { + ensureMaterialsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, materials_); + onChanged(); + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @return This builder for chaining. + */ + public Builder clearMaterials() { + materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @param value The bytes of the materials to add. + * @return This builder for chaining. + */ + public Builder addMaterialsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureMaterialsIsMutable(); + materials_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.InTotoProvenance) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.InTotoProvenance) + private static final io.grafeas.v1.InTotoProvenance DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.InTotoProvenance(); + } + + public static io.grafeas.v1.InTotoProvenance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InTotoProvenance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.InTotoProvenance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java new file mode 100644 index 000000000000..b24aa48eb140 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java @@ -0,0 +1,140 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +public interface InTotoProvenanceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.InTotoProvenance) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + * @return Whether the builderConfig field is set. + */ + boolean hasBuilderConfig(); + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + * @return The builderConfig. + */ + io.grafeas.v1.BuilderConfig getBuilderConfig(); + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + io.grafeas.v1.BuilderConfigOrBuilder getBuilderConfigOrBuilder(); + + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.Recipe recipe = 2; + * @return Whether the recipe field is set. + */ + boolean hasRecipe(); + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.Recipe recipe = 2; + * @return The recipe. + */ + io.grafeas.v1.Recipe getRecipe(); + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + io.grafeas.v1.RecipeOrBuilder getRecipeOrBuilder(); + + /** + * .grafeas.v1.Metadata metadata = 3; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * .grafeas.v1.Metadata metadata = 3; + * @return The metadata. + */ + io.grafeas.v1.Metadata getMetadata(); + /** + * .grafeas.v1.Metadata metadata = 3; + */ + io.grafeas.v1.MetadataOrBuilder getMetadataOrBuilder(); + + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @return A list containing the materials. + */ + java.util.List + getMaterialsList(); + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @return The count of materials. + */ + int getMaterialsCount(); + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @param index The index of the element to return. + * @return The materials at the given index. + */ + java.lang.String getMaterials(int index); + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @param index The index of the value to return. + * @return The bytes of the materials at the given index. + */ + com.google.protobuf.ByteString + getMaterialsBytes(int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java new file mode 100644 index 000000000000..338b8a798f77 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java @@ -0,0 +1,115 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +public final class InTotoProvenanceProto { + private InTotoProvenanceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Recipe_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Recipe_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Completeness_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Completeness_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Metadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Metadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BuilderConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_InTotoProvenance_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\"grafeas/v1/intoto_provenance.proto\022\ngr" + + "afeas.v1\032\031google/protobuf/any.proto\032\037goo" + + "gle/protobuf/timestamp.proto\"\234\001\n\006Recipe\022" + + "\014\n\004type\030\001 \001(\t\022\033\n\023defined_in_material\030\002 \001" + + "(\003\022\023\n\013entry_point\030\003 \001(\t\022\'\n\targuments\030\004 \003" + + "(\0132\024.google.protobuf.Any\022)\n\013environment\030" + + "\005 \003(\0132\024.google.protobuf.Any\"I\n\014Completen" + + "ess\022\021\n\targuments\030\001 \001(\010\022\023\n\013environment\030\002 " + + "\001(\010\022\021\n\tmaterials\030\003 \001(\010\"\332\001\n\010Metadata\022\033\n\023b" + + "uild_invocation_id\030\001 \001(\t\0224\n\020build_starte" + + "d_on\030\002 \001(\0132\032.google.protobuf.Timestamp\0225" + + "\n\021build_finished_on\030\003 \001(\0132\032.google.proto" + + "buf.Timestamp\022.\n\014completeness\030\004 \001(\0132\030.gr" + + "afeas.v1.Completeness\022\024\n\014reproducible\030\005 " + + "\001(\010\"\033\n\rBuilderConfig\022\n\n\002id\030\001 \001(\t\"\244\001\n\020InT" + + "otoProvenance\0221\n\016builder_config\030\001 \001(\0132\031." + + "grafeas.v1.BuilderConfig\022\"\n\006recipe\030\002 \001(\013" + + "2\022.grafeas.v1.Recipe\022&\n\010metadata\030\003 \001(\0132\024" + + ".grafeas.v1.Metadata\022\021\n\tmaterials\030\004 \003(\tB" + + "h\n\rio.grafeas.v1B\025InTotoProvenanceProtoP" + + "\001Z8google.golang.org/genproto/googleapis" + + "/grafeas/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.AnyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_grafeas_v1_Recipe_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_Recipe_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Recipe_descriptor, + new java.lang.String[] { "Type", "DefinedInMaterial", "EntryPoint", "Arguments", "Environment", }); + internal_static_grafeas_v1_Completeness_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Completeness_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Completeness_descriptor, + new java.lang.String[] { "Arguments", "Environment", "Materials", }); + internal_static_grafeas_v1_Metadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_Metadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Metadata_descriptor, + new java.lang.String[] { "BuildInvocationId", "BuildStartedOn", "BuildFinishedOn", "Completeness", "Reproducible", }); + internal_static_grafeas_v1_BuilderConfig_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BuilderConfig_descriptor, + new java.lang.String[] { "Id", }); + internal_static_grafeas_v1_InTotoProvenance_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_InTotoProvenance_descriptor, + new java.lang.String[] { "BuilderConfig", "Recipe", "Metadata", "Materials", }); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java new file mode 100644 index 000000000000..5f36886717b9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java @@ -0,0 +1,1802 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_statement.proto + +package io.grafeas.v1; + +/** + *
+ * Spec defined at
+ * https://github.com/in-toto/attestation/tree/main/spec#statement The
+ * serialized InTotoStatement will be stored as Envelope.payload.
+ * Envelope.payloadType is always "application/vnd.in-toto+json".
+ * 
+ * + * Protobuf type {@code grafeas.v1.InTotoStatement} + */ +public final class InTotoStatement extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.InTotoStatement) + InTotoStatementOrBuilder { +private static final long serialVersionUID = 0L; + // Use InTotoStatement.newBuilder() to construct. + private InTotoStatement(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InTotoStatement() { + type_ = ""; + subject_ = java.util.Collections.emptyList(); + predicateType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InTotoStatement(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.InTotoStatement.class, io.grafeas.v1.InTotoStatement.Builder.class); + } + + private int predicateCase_ = 0; + private java.lang.Object predicate_; + public enum PredicateCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PROVENANCE(4), + SLSA_PROVENANCE(5), + SLSA_PROVENANCE_ZERO_TWO(6), + PREDICATE_NOT_SET(0); + private final int value; + private PredicateCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PredicateCase valueOf(int value) { + return forNumber(value); + } + + public static PredicateCase forNumber(int value) { + switch (value) { + case 4: return PROVENANCE; + case 5: return SLSA_PROVENANCE; + case 6: return SLSA_PROVENANCE_ZERO_TWO; + case 0: return PREDICATE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public PredicateCase + getPredicateCase() { + return PredicateCase.forNumber( + predicateCase_); + } + + public static final int TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + *
+   * Always `https://in-toto.io/Statement/v0.1`.
+   * 
+ * + * string type = 1 [json_name = "_type"]; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * Always `https://in-toto.io/Statement/v0.1`.
+   * 
+ * + * string type = 1 [json_name = "_type"]; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List subject_; + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + @java.lang.Override + public java.util.List getSubjectList() { + return subject_; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + @java.lang.Override + public java.util.List + getSubjectOrBuilderList() { + return subject_; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + @java.lang.Override + public int getSubjectCount() { + return subject_.size(); + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + @java.lang.Override + public io.grafeas.v1.Subject getSubject(int index) { + return subject_.get(index); + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + @java.lang.Override + public io.grafeas.v1.SubjectOrBuilder getSubjectOrBuilder( + int index) { + return subject_.get(index); + } + + public static final int PREDICATE_TYPE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object predicateType_ = ""; + /** + *
+   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+   * 
+ * + * string predicate_type = 3; + * @return The predicateType. + */ + @java.lang.Override + public java.lang.String getPredicateType() { + java.lang.Object ref = predicateType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + predicateType_ = s; + return s; + } + } + /** + *
+   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+   * 
+ * + * string predicate_type = 3; + * @return The bytes for predicateType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPredicateTypeBytes() { + java.lang.Object ref = predicateType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + predicateType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROVENANCE_FIELD_NUMBER = 4; + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + * @return Whether the provenance field is set. + */ + @java.lang.Override + public boolean hasProvenance() { + return predicateCase_ == 4; + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + * @return The provenance. + */ + @java.lang.Override + public io.grafeas.v1.InTotoProvenance getProvenance() { + if (predicateCase_ == 4) { + return (io.grafeas.v1.InTotoProvenance) predicate_; + } + return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + @java.lang.Override + public io.grafeas.v1.InTotoProvenanceOrBuilder getProvenanceOrBuilder() { + if (predicateCase_ == 4) { + return (io.grafeas.v1.InTotoProvenance) predicate_; + } + return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); + } + + public static final int SLSA_PROVENANCE_FIELD_NUMBER = 5; + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + * @return Whether the slsaProvenance field is set. + */ + @java.lang.Override + public boolean hasSlsaProvenance() { + return predicateCase_ == 5; + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + * @return The slsaProvenance. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance getSlsaProvenance() { + if (predicateCase_ == 5) { + return (io.grafeas.v1.SlsaProvenance) predicate_; + } + return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceOrBuilder getSlsaProvenanceOrBuilder() { + if (predicateCase_ == 5) { + return (io.grafeas.v1.SlsaProvenance) predicate_; + } + return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); + } + + public static final int SLSA_PROVENANCE_ZERO_TWO_FIELD_NUMBER = 6; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + * @return Whether the slsaProvenanceZeroTwo field is set. + */ + @java.lang.Override + public boolean hasSlsaProvenanceZeroTwo() { + return predicateCase_ == 6; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + * @return The slsaProvenanceZeroTwo. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo getSlsaProvenanceZeroTwo() { + if (predicateCase_ == 6) { + return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; + } + return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder getSlsaProvenanceZeroTwoOrBuilder() { + if (predicateCase_ == 6) { + return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; + } + return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + for (int i = 0; i < subject_.size(); i++) { + output.writeMessage(2, subject_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(predicateType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, predicateType_); + } + if (predicateCase_ == 4) { + output.writeMessage(4, (io.grafeas.v1.InTotoProvenance) predicate_); + } + if (predicateCase_ == 5) { + output.writeMessage(5, (io.grafeas.v1.SlsaProvenance) predicate_); + } + if (predicateCase_ == 6) { + output.writeMessage(6, (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + for (int i = 0; i < subject_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, subject_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(predicateType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, predicateType_); + } + if (predicateCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (io.grafeas.v1.InTotoProvenance) predicate_); + } + if (predicateCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (io.grafeas.v1.SlsaProvenance) predicate_); + } + if (predicateCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.InTotoStatement)) { + return super.equals(obj); + } + io.grafeas.v1.InTotoStatement other = (io.grafeas.v1.InTotoStatement) obj; + + if (!getType() + .equals(other.getType())) return false; + if (!getSubjectList() + .equals(other.getSubjectList())) return false; + if (!getPredicateType() + .equals(other.getPredicateType())) return false; + if (!getPredicateCase().equals(other.getPredicateCase())) return false; + switch (predicateCase_) { + case 4: + if (!getProvenance() + .equals(other.getProvenance())) return false; + break; + case 5: + if (!getSlsaProvenance() + .equals(other.getSlsaProvenance())) return false; + break; + case 6: + if (!getSlsaProvenanceZeroTwo() + .equals(other.getSlsaProvenanceZeroTwo())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (getSubjectCount() > 0) { + hash = (37 * hash) + SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getSubjectList().hashCode(); + } + hash = (37 * hash) + PREDICATE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPredicateType().hashCode(); + switch (predicateCase_) { + case 4: + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenance().hashCode(); + break; + case 5: + hash = (37 * hash) + SLSA_PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getSlsaProvenance().hashCode(); + break; + case 6: + hash = (37 * hash) + SLSA_PROVENANCE_ZERO_TWO_FIELD_NUMBER; + hash = (53 * hash) + getSlsaProvenanceZeroTwo().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.InTotoStatement parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.InTotoStatement parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.InTotoStatement parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.InTotoStatement parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.InTotoStatement parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.InTotoStatement parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.InTotoStatement parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.InTotoStatement parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.InTotoStatement parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.InTotoStatement parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.InTotoStatement parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.InTotoStatement parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.InTotoStatement prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Spec defined at
+   * https://github.com/in-toto/attestation/tree/main/spec#statement The
+   * serialized InTotoStatement will be stored as Envelope.payload.
+   * Envelope.payloadType is always "application/vnd.in-toto+json".
+   * 
+ * + * Protobuf type {@code grafeas.v1.InTotoStatement} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.InTotoStatement) + io.grafeas.v1.InTotoStatementOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.InTotoStatement.class, io.grafeas.v1.InTotoStatement.Builder.class); + } + + // Construct using io.grafeas.v1.InTotoStatement.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + if (subjectBuilder_ == null) { + subject_ = java.util.Collections.emptyList(); + } else { + subject_ = null; + subjectBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + predicateType_ = ""; + if (provenanceBuilder_ != null) { + provenanceBuilder_.clear(); + } + if (slsaProvenanceBuilder_ != null) { + slsaProvenanceBuilder_.clear(); + } + if (slsaProvenanceZeroTwoBuilder_ != null) { + slsaProvenanceZeroTwoBuilder_.clear(); + } + predicateCase_ = 0; + predicate_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.InTotoStatement getDefaultInstanceForType() { + return io.grafeas.v1.InTotoStatement.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.InTotoStatement build() { + io.grafeas.v1.InTotoStatement result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.InTotoStatement buildPartial() { + io.grafeas.v1.InTotoStatement result = new io.grafeas.v1.InTotoStatement(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.InTotoStatement result) { + if (subjectBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + subject_ = java.util.Collections.unmodifiableList(subject_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.subject_ = subject_; + } else { + result.subject_ = subjectBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.InTotoStatement result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.predicateType_ = predicateType_; + } + } + + private void buildPartialOneofs(io.grafeas.v1.InTotoStatement result) { + result.predicateCase_ = predicateCase_; + result.predicate_ = this.predicate_; + if (predicateCase_ == 4 && + provenanceBuilder_ != null) { + result.predicate_ = provenanceBuilder_.build(); + } + if (predicateCase_ == 5 && + slsaProvenanceBuilder_ != null) { + result.predicate_ = slsaProvenanceBuilder_.build(); + } + if (predicateCase_ == 6 && + slsaProvenanceZeroTwoBuilder_ != null) { + result.predicate_ = slsaProvenanceZeroTwoBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.InTotoStatement) { + return mergeFrom((io.grafeas.v1.InTotoStatement)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.InTotoStatement other) { + if (other == io.grafeas.v1.InTotoStatement.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (subjectBuilder_ == null) { + if (!other.subject_.isEmpty()) { + if (subject_.isEmpty()) { + subject_ = other.subject_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSubjectIsMutable(); + subject_.addAll(other.subject_); + } + onChanged(); + } + } else { + if (!other.subject_.isEmpty()) { + if (subjectBuilder_.isEmpty()) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + subject_ = other.subject_; + bitField0_ = (bitField0_ & ~0x00000002); + subjectBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubjectFieldBuilder() : null; + } else { + subjectBuilder_.addAllMessages(other.subject_); + } + } + } + if (!other.getPredicateType().isEmpty()) { + predicateType_ = other.predicateType_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getPredicateCase()) { + case PROVENANCE: { + mergeProvenance(other.getProvenance()); + break; + } + case SLSA_PROVENANCE: { + mergeSlsaProvenance(other.getSlsaProvenance()); + break; + } + case SLSA_PROVENANCE_ZERO_TWO: { + mergeSlsaProvenanceZeroTwo(other.getSlsaProvenanceZeroTwo()); + break; + } + case PREDICATE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + io.grafeas.v1.Subject m = + input.readMessage( + io.grafeas.v1.Subject.parser(), + extensionRegistry); + if (subjectBuilder_ == null) { + ensureSubjectIsMutable(); + subject_.add(m); + } else { + subjectBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + predicateType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getProvenanceFieldBuilder().getBuilder(), + extensionRegistry); + predicateCase_ = 4; + break; + } // case 34 + case 42: { + input.readMessage( + getSlsaProvenanceFieldBuilder().getBuilder(), + extensionRegistry); + predicateCase_ = 5; + break; + } // case 42 + case 50: { + input.readMessage( + getSlsaProvenanceZeroTwoFieldBuilder().getBuilder(), + extensionRegistry); + predicateCase_ = 6; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int predicateCase_ = 0; + private java.lang.Object predicate_; + public PredicateCase + getPredicateCase() { + return PredicateCase.forNumber( + predicateCase_); + } + + public Builder clearPredicate() { + predicateCase_ = 0; + predicate_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + *
+     * Always `https://in-toto.io/Statement/v0.1`.
+     * 
+ * + * string type = 1 [json_name = "_type"]; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Always `https://in-toto.io/Statement/v0.1`.
+     * 
+ * + * string type = 1 [json_name = "_type"]; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Always `https://in-toto.io/Statement/v0.1`.
+     * 
+ * + * string type = 1 [json_name = "_type"]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Always `https://in-toto.io/Statement/v0.1`.
+     * 
+ * + * string type = 1 [json_name = "_type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Always `https://in-toto.io/Statement/v0.1`.
+     * 
+ * + * string type = 1 [json_name = "_type"]; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List subject_ = + java.util.Collections.emptyList(); + private void ensureSubjectIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + subject_ = new java.util.ArrayList(subject_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Subject, io.grafeas.v1.Subject.Builder, io.grafeas.v1.SubjectOrBuilder> subjectBuilder_; + + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public java.util.List getSubjectList() { + if (subjectBuilder_ == null) { + return java.util.Collections.unmodifiableList(subject_); + } else { + return subjectBuilder_.getMessageList(); + } + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public int getSubjectCount() { + if (subjectBuilder_ == null) { + return subject_.size(); + } else { + return subjectBuilder_.getCount(); + } + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public io.grafeas.v1.Subject getSubject(int index) { + if (subjectBuilder_ == null) { + return subject_.get(index); + } else { + return subjectBuilder_.getMessage(index); + } + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder setSubject( + int index, io.grafeas.v1.Subject value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectIsMutable(); + subject_.set(index, value); + onChanged(); + } else { + subjectBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder setSubject( + int index, io.grafeas.v1.Subject.Builder builderForValue) { + if (subjectBuilder_ == null) { + ensureSubjectIsMutable(); + subject_.set(index, builderForValue.build()); + onChanged(); + } else { + subjectBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder addSubject(io.grafeas.v1.Subject value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectIsMutable(); + subject_.add(value); + onChanged(); + } else { + subjectBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder addSubject( + int index, io.grafeas.v1.Subject value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectIsMutable(); + subject_.add(index, value); + onChanged(); + } else { + subjectBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder addSubject( + io.grafeas.v1.Subject.Builder builderForValue) { + if (subjectBuilder_ == null) { + ensureSubjectIsMutable(); + subject_.add(builderForValue.build()); + onChanged(); + } else { + subjectBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder addSubject( + int index, io.grafeas.v1.Subject.Builder builderForValue) { + if (subjectBuilder_ == null) { + ensureSubjectIsMutable(); + subject_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder addAllSubject( + java.lang.Iterable values) { + if (subjectBuilder_ == null) { + ensureSubjectIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subject_); + onChanged(); + } else { + subjectBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder clearSubject() { + if (subjectBuilder_ == null) { + subject_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + subjectBuilder_.clear(); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder removeSubject(int index) { + if (subjectBuilder_ == null) { + ensureSubjectIsMutable(); + subject_.remove(index); + onChanged(); + } else { + subjectBuilder_.remove(index); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public io.grafeas.v1.Subject.Builder getSubjectBuilder( + int index) { + return getSubjectFieldBuilder().getBuilder(index); + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public io.grafeas.v1.SubjectOrBuilder getSubjectOrBuilder( + int index) { + if (subjectBuilder_ == null) { + return subject_.get(index); } else { + return subjectBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public java.util.List + getSubjectOrBuilderList() { + if (subjectBuilder_ != null) { + return subjectBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subject_); + } + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public io.grafeas.v1.Subject.Builder addSubjectBuilder() { + return getSubjectFieldBuilder().addBuilder( + io.grafeas.v1.Subject.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public io.grafeas.v1.Subject.Builder addSubjectBuilder( + int index) { + return getSubjectFieldBuilder().addBuilder( + index, io.grafeas.v1.Subject.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public java.util.List + getSubjectBuilderList() { + return getSubjectFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Subject, io.grafeas.v1.Subject.Builder, io.grafeas.v1.SubjectOrBuilder> + getSubjectFieldBuilder() { + if (subjectBuilder_ == null) { + subjectBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Subject, io.grafeas.v1.Subject.Builder, io.grafeas.v1.SubjectOrBuilder>( + subject_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + subject_ = null; + } + return subjectBuilder_; + } + + private java.lang.Object predicateType_ = ""; + /** + *
+     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+     * 
+ * + * string predicate_type = 3; + * @return The predicateType. + */ + public java.lang.String getPredicateType() { + java.lang.Object ref = predicateType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + predicateType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+     * 
+ * + * string predicate_type = 3; + * @return The bytes for predicateType. + */ + public com.google.protobuf.ByteString + getPredicateTypeBytes() { + java.lang.Object ref = predicateType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + predicateType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+     * 
+ * + * string predicate_type = 3; + * @param value The predicateType to set. + * @return This builder for chaining. + */ + public Builder setPredicateType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + predicateType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+     * 
+ * + * string predicate_type = 3; + * @return This builder for chaining. + */ + public Builder clearPredicateType() { + predicateType_ = getDefaultInstance().getPredicateType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+     * 
+ * + * string predicate_type = 3; + * @param value The bytes for predicateType to set. + * @return This builder for chaining. + */ + public Builder setPredicateTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + predicateType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> provenanceBuilder_; + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + * @return Whether the provenance field is set. + */ + @java.lang.Override + public boolean hasProvenance() { + return predicateCase_ == 4; + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + * @return The provenance. + */ + @java.lang.Override + public io.grafeas.v1.InTotoProvenance getProvenance() { + if (provenanceBuilder_ == null) { + if (predicateCase_ == 4) { + return (io.grafeas.v1.InTotoProvenance) predicate_; + } + return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); + } else { + if (predicateCase_ == 4) { + return provenanceBuilder_.getMessage(); + } + return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); + } + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + public Builder setProvenance(io.grafeas.v1.InTotoProvenance value) { + if (provenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + predicate_ = value; + onChanged(); + } else { + provenanceBuilder_.setMessage(value); + } + predicateCase_ = 4; + return this; + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + public Builder setProvenance( + io.grafeas.v1.InTotoProvenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + predicate_ = builderForValue.build(); + onChanged(); + } else { + provenanceBuilder_.setMessage(builderForValue.build()); + } + predicateCase_ = 4; + return this; + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + public Builder mergeProvenance(io.grafeas.v1.InTotoProvenance value) { + if (provenanceBuilder_ == null) { + if (predicateCase_ == 4 && + predicate_ != io.grafeas.v1.InTotoProvenance.getDefaultInstance()) { + predicate_ = io.grafeas.v1.InTotoProvenance.newBuilder((io.grafeas.v1.InTotoProvenance) predicate_) + .mergeFrom(value).buildPartial(); + } else { + predicate_ = value; + } + onChanged(); + } else { + if (predicateCase_ == 4) { + provenanceBuilder_.mergeFrom(value); + } else { + provenanceBuilder_.setMessage(value); + } + } + predicateCase_ = 4; + return this; + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + public Builder clearProvenance() { + if (provenanceBuilder_ == null) { + if (predicateCase_ == 4) { + predicateCase_ = 0; + predicate_ = null; + onChanged(); + } + } else { + if (predicateCase_ == 4) { + predicateCase_ = 0; + predicate_ = null; + } + provenanceBuilder_.clear(); + } + return this; + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + public io.grafeas.v1.InTotoProvenance.Builder getProvenanceBuilder() { + return getProvenanceFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + @java.lang.Override + public io.grafeas.v1.InTotoProvenanceOrBuilder getProvenanceOrBuilder() { + if ((predicateCase_ == 4) && (provenanceBuilder_ != null)) { + return provenanceBuilder_.getMessageOrBuilder(); + } else { + if (predicateCase_ == 4) { + return (io.grafeas.v1.InTotoProvenance) predicate_; + } + return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); + } + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + if (!(predicateCase_ == 4)) { + predicate_ = io.grafeas.v1.InTotoProvenance.getDefaultInstance(); + } + provenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder>( + (io.grafeas.v1.InTotoProvenance) predicate_, + getParentForChildren(), + isClean()); + predicate_ = null; + } + predicateCase_ = 4; + onChanged(); + return provenanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance, io.grafeas.v1.SlsaProvenance.Builder, io.grafeas.v1.SlsaProvenanceOrBuilder> slsaProvenanceBuilder_; + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + * @return Whether the slsaProvenance field is set. + */ + @java.lang.Override + public boolean hasSlsaProvenance() { + return predicateCase_ == 5; + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + * @return The slsaProvenance. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance getSlsaProvenance() { + if (slsaProvenanceBuilder_ == null) { + if (predicateCase_ == 5) { + return (io.grafeas.v1.SlsaProvenance) predicate_; + } + return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); + } else { + if (predicateCase_ == 5) { + return slsaProvenanceBuilder_.getMessage(); + } + return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); + } + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + public Builder setSlsaProvenance(io.grafeas.v1.SlsaProvenance value) { + if (slsaProvenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + predicate_ = value; + onChanged(); + } else { + slsaProvenanceBuilder_.setMessage(value); + } + predicateCase_ = 5; + return this; + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + public Builder setSlsaProvenance( + io.grafeas.v1.SlsaProvenance.Builder builderForValue) { + if (slsaProvenanceBuilder_ == null) { + predicate_ = builderForValue.build(); + onChanged(); + } else { + slsaProvenanceBuilder_.setMessage(builderForValue.build()); + } + predicateCase_ = 5; + return this; + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + public Builder mergeSlsaProvenance(io.grafeas.v1.SlsaProvenance value) { + if (slsaProvenanceBuilder_ == null) { + if (predicateCase_ == 5 && + predicate_ != io.grafeas.v1.SlsaProvenance.getDefaultInstance()) { + predicate_ = io.grafeas.v1.SlsaProvenance.newBuilder((io.grafeas.v1.SlsaProvenance) predicate_) + .mergeFrom(value).buildPartial(); + } else { + predicate_ = value; + } + onChanged(); + } else { + if (predicateCase_ == 5) { + slsaProvenanceBuilder_.mergeFrom(value); + } else { + slsaProvenanceBuilder_.setMessage(value); + } + } + predicateCase_ = 5; + return this; + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + public Builder clearSlsaProvenance() { + if (slsaProvenanceBuilder_ == null) { + if (predicateCase_ == 5) { + predicateCase_ = 0; + predicate_ = null; + onChanged(); + } + } else { + if (predicateCase_ == 5) { + predicateCase_ = 0; + predicate_ = null; + } + slsaProvenanceBuilder_.clear(); + } + return this; + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + public io.grafeas.v1.SlsaProvenance.Builder getSlsaProvenanceBuilder() { + return getSlsaProvenanceFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceOrBuilder getSlsaProvenanceOrBuilder() { + if ((predicateCase_ == 5) && (slsaProvenanceBuilder_ != null)) { + return slsaProvenanceBuilder_.getMessageOrBuilder(); + } else { + if (predicateCase_ == 5) { + return (io.grafeas.v1.SlsaProvenance) predicate_; + } + return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); + } + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance, io.grafeas.v1.SlsaProvenance.Builder, io.grafeas.v1.SlsaProvenanceOrBuilder> + getSlsaProvenanceFieldBuilder() { + if (slsaProvenanceBuilder_ == null) { + if (!(predicateCase_ == 5)) { + predicate_ = io.grafeas.v1.SlsaProvenance.getDefaultInstance(); + } + slsaProvenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance, io.grafeas.v1.SlsaProvenance.Builder, io.grafeas.v1.SlsaProvenanceOrBuilder>( + (io.grafeas.v1.SlsaProvenance) predicate_, + getParentForChildren(), + isClean()); + predicate_ = null; + } + predicateCase_ = 5; + onChanged(); + return slsaProvenanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder, io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder> slsaProvenanceZeroTwoBuilder_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + * @return Whether the slsaProvenanceZeroTwo field is set. + */ + @java.lang.Override + public boolean hasSlsaProvenanceZeroTwo() { + return predicateCase_ == 6; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + * @return The slsaProvenanceZeroTwo. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo getSlsaProvenanceZeroTwo() { + if (slsaProvenanceZeroTwoBuilder_ == null) { + if (predicateCase_ == 6) { + return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; + } + return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); + } else { + if (predicateCase_ == 6) { + return slsaProvenanceZeroTwoBuilder_.getMessage(); + } + return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + public Builder setSlsaProvenanceZeroTwo(io.grafeas.v1.SlsaProvenanceZeroTwo value) { + if (slsaProvenanceZeroTwoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + predicate_ = value; + onChanged(); + } else { + slsaProvenanceZeroTwoBuilder_.setMessage(value); + } + predicateCase_ = 6; + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + public Builder setSlsaProvenanceZeroTwo( + io.grafeas.v1.SlsaProvenanceZeroTwo.Builder builderForValue) { + if (slsaProvenanceZeroTwoBuilder_ == null) { + predicate_ = builderForValue.build(); + onChanged(); + } else { + slsaProvenanceZeroTwoBuilder_.setMessage(builderForValue.build()); + } + predicateCase_ = 6; + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + public Builder mergeSlsaProvenanceZeroTwo(io.grafeas.v1.SlsaProvenanceZeroTwo value) { + if (slsaProvenanceZeroTwoBuilder_ == null) { + if (predicateCase_ == 6 && + predicate_ != io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance()) { + predicate_ = io.grafeas.v1.SlsaProvenanceZeroTwo.newBuilder((io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_) + .mergeFrom(value).buildPartial(); + } else { + predicate_ = value; + } + onChanged(); + } else { + if (predicateCase_ == 6) { + slsaProvenanceZeroTwoBuilder_.mergeFrom(value); + } else { + slsaProvenanceZeroTwoBuilder_.setMessage(value); + } + } + predicateCase_ = 6; + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + public Builder clearSlsaProvenanceZeroTwo() { + if (slsaProvenanceZeroTwoBuilder_ == null) { + if (predicateCase_ == 6) { + predicateCase_ = 0; + predicate_ = null; + onChanged(); + } + } else { + if (predicateCase_ == 6) { + predicateCase_ = 0; + predicate_ = null; + } + slsaProvenanceZeroTwoBuilder_.clear(); + } + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.Builder getSlsaProvenanceZeroTwoBuilder() { + return getSlsaProvenanceZeroTwoFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder getSlsaProvenanceZeroTwoOrBuilder() { + if ((predicateCase_ == 6) && (slsaProvenanceZeroTwoBuilder_ != null)) { + return slsaProvenanceZeroTwoBuilder_.getMessageOrBuilder(); + } else { + if (predicateCase_ == 6) { + return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; + } + return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder, io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder> + getSlsaProvenanceZeroTwoFieldBuilder() { + if (slsaProvenanceZeroTwoBuilder_ == null) { + if (!(predicateCase_ == 6)) { + predicate_ = io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); + } + slsaProvenanceZeroTwoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder, io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder>( + (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_, + getParentForChildren(), + isClean()); + predicate_ = null; + } + predicateCase_ = 6; + onChanged(); + return slsaProvenanceZeroTwoBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.InTotoStatement) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.InTotoStatement) + private static final io.grafeas.v1.InTotoStatement DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.InTotoStatement(); + } + + public static io.grafeas.v1.InTotoStatement getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InTotoStatement parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.InTotoStatement getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java new file mode 100644 index 000000000000..0f28f2f9126d --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java @@ -0,0 +1,120 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_statement.proto + +package io.grafeas.v1; + +public interface InTotoStatementOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.InTotoStatement) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Always `https://in-toto.io/Statement/v0.1`.
+   * 
+ * + * string type = 1 [json_name = "_type"]; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * Always `https://in-toto.io/Statement/v0.1`.
+   * 
+ * + * string type = 1 [json_name = "_type"]; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + java.util.List + getSubjectList(); + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + io.grafeas.v1.Subject getSubject(int index); + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + int getSubjectCount(); + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + java.util.List + getSubjectOrBuilderList(); + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + io.grafeas.v1.SubjectOrBuilder getSubjectOrBuilder( + int index); + + /** + *
+   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+   * 
+ * + * string predicate_type = 3; + * @return The predicateType. + */ + java.lang.String getPredicateType(); + /** + *
+   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+   * 
+ * + * string predicate_type = 3; + * @return The bytes for predicateType. + */ + com.google.protobuf.ByteString + getPredicateTypeBytes(); + + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + * @return Whether the provenance field is set. + */ + boolean hasProvenance(); + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + * @return The provenance. + */ + io.grafeas.v1.InTotoProvenance getProvenance(); + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + io.grafeas.v1.InTotoProvenanceOrBuilder getProvenanceOrBuilder(); + + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + * @return Whether the slsaProvenance field is set. + */ + boolean hasSlsaProvenance(); + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + * @return The slsaProvenance. + */ + io.grafeas.v1.SlsaProvenance getSlsaProvenance(); + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + io.grafeas.v1.SlsaProvenanceOrBuilder getSlsaProvenanceOrBuilder(); + + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + * @return Whether the slsaProvenanceZeroTwo field is set. + */ + boolean hasSlsaProvenanceZeroTwo(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + * @return The slsaProvenanceZeroTwo. + */ + io.grafeas.v1.SlsaProvenanceZeroTwo getSlsaProvenanceZeroTwo(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder getSlsaProvenanceZeroTwoOrBuilder(); + + public io.grafeas.v1.InTotoStatement.PredicateCase getPredicateCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java new file mode 100644 index 000000000000..966c8d35ded8 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_statement.proto + +package io.grafeas.v1; + +public final class InTotoStatementProto { + private InTotoStatementProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_InTotoStatement_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Subject_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Subject_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Subject_DigestEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Subject_DigestEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n!grafeas/v1/intoto_statement.proto\022\ngra" + + "feas.v1\032\"grafeas/v1/intoto_provenance.pr" + + "oto\032 grafeas/v1/slsa_provenance.proto\032)g" + + "rafeas/v1/slsa_provenance_zero_two.proto" + + "\"\243\002\n\017InTotoStatement\022\023\n\004type\030\001 \001(\tR\005_typ" + + "e\022$\n\007subject\030\002 \003(\0132\023.grafeas.v1.Subject\022" + + "\026\n\016predicate_type\030\003 \001(\t\0222\n\nprovenance\030\004 " + + "\001(\0132\034.grafeas.v1.InTotoProvenanceH\000\0225\n\017s" + + "lsa_provenance\030\005 \001(\0132\032.grafeas.v1.SlsaPr" + + "ovenanceH\000\022E\n\030slsa_provenance_zero_two\030\006" + + " \001(\0132!.grafeas.v1.SlsaProvenanceZeroTwoH" + + "\000B\013\n\tpredicate\"w\n\007Subject\022\014\n\004name\030\001 \001(\t\022" + + "/\n\006digest\030\002 \003(\0132\037.grafeas.v1.Subject.Dig" + + "estEntry\032-\n\013DigestEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + + "value\030\002 \001(\t:\0028\001Bg\n\rio.grafeas.v1B\024InToto" + + "StatementProtoP\001Z8google.golang.org/genp" + + "roto/googleapis/grafeas/v1;grafeas\242\002\003GRA" + + "b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grafeas.v1.InTotoProvenanceProto.getDescriptor(), + io.grafeas.v1.SlsaProvenanceProto.getDescriptor(), + io.grafeas.v1.SlsaProvenanceZeroTwoProto.getDescriptor(), + }); + internal_static_grafeas_v1_InTotoStatement_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_InTotoStatement_descriptor, + new java.lang.String[] { "Type", "Subject", "PredicateType", "Provenance", "SlsaProvenance", "SlsaProvenanceZeroTwo", "Predicate", }); + internal_static_grafeas_v1_Subject_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Subject_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Subject_descriptor, + new java.lang.String[] { "Name", "Digest", }); + internal_static_grafeas_v1_Subject_DigestEntry_descriptor = + internal_static_grafeas_v1_Subject_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_Subject_DigestEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Subject_DigestEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + io.grafeas.v1.InTotoProvenanceProto.getDescriptor(); + io.grafeas.v1.SlsaProvenanceProto.getDescriptor(); + io.grafeas.v1.SlsaProvenanceZeroTwoProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java new file mode 100644 index 000000000000..f0b0c75c7f9c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java @@ -0,0 +1,586 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/attestation.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.Jwt} + */ +public final class Jwt extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Jwt) + JwtOrBuilder { +private static final long serialVersionUID = 0L; + // Use Jwt.newBuilder() to construct. + private Jwt(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Jwt() { + compactJwt_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Jwt(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Jwt.class, io.grafeas.v1.Jwt.Builder.class); + } + + public static final int COMPACT_JWT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object compactJwt_ = ""; + /** + *
+   * The compact encoding of a JWS, which is always three base64 encoded strings
+   * joined by periods. For details, see:
+   * https://tools.ietf.org/html/rfc7515.html#section-3.1
+   * 
+ * + * string compact_jwt = 1; + * @return The compactJwt. + */ + @java.lang.Override + public java.lang.String getCompactJwt() { + java.lang.Object ref = compactJwt_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + compactJwt_ = s; + return s; + } + } + /** + *
+   * The compact encoding of a JWS, which is always three base64 encoded strings
+   * joined by periods. For details, see:
+   * https://tools.ietf.org/html/rfc7515.html#section-3.1
+   * 
+ * + * string compact_jwt = 1; + * @return The bytes for compactJwt. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCompactJwtBytes() { + java.lang.Object ref = compactJwt_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + compactJwt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compactJwt_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, compactJwt_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compactJwt_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, compactJwt_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Jwt)) { + return super.equals(obj); + } + io.grafeas.v1.Jwt other = (io.grafeas.v1.Jwt) obj; + + if (!getCompactJwt() + .equals(other.getCompactJwt())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COMPACT_JWT_FIELD_NUMBER; + hash = (53 * hash) + getCompactJwt().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Jwt parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Jwt parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Jwt parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Jwt parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Jwt parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Jwt parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Jwt parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Jwt parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Jwt parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Jwt parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Jwt parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Jwt parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Jwt prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.Jwt} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Jwt) + io.grafeas.v1.JwtOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Jwt.class, io.grafeas.v1.Jwt.Builder.class); + } + + // Construct using io.grafeas.v1.Jwt.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + compactJwt_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Jwt getDefaultInstanceForType() { + return io.grafeas.v1.Jwt.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Jwt build() { + io.grafeas.v1.Jwt result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Jwt buildPartial() { + io.grafeas.v1.Jwt result = new io.grafeas.v1.Jwt(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Jwt result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.compactJwt_ = compactJwt_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Jwt) { + return mergeFrom((io.grafeas.v1.Jwt)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Jwt other) { + if (other == io.grafeas.v1.Jwt.getDefaultInstance()) return this; + if (!other.getCompactJwt().isEmpty()) { + compactJwt_ = other.compactJwt_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + compactJwt_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object compactJwt_ = ""; + /** + *
+     * The compact encoding of a JWS, which is always three base64 encoded strings
+     * joined by periods. For details, see:
+     * https://tools.ietf.org/html/rfc7515.html#section-3.1
+     * 
+ * + * string compact_jwt = 1; + * @return The compactJwt. + */ + public java.lang.String getCompactJwt() { + java.lang.Object ref = compactJwt_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + compactJwt_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The compact encoding of a JWS, which is always three base64 encoded strings
+     * joined by periods. For details, see:
+     * https://tools.ietf.org/html/rfc7515.html#section-3.1
+     * 
+ * + * string compact_jwt = 1; + * @return The bytes for compactJwt. + */ + public com.google.protobuf.ByteString + getCompactJwtBytes() { + java.lang.Object ref = compactJwt_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + compactJwt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The compact encoding of a JWS, which is always three base64 encoded strings
+     * joined by periods. For details, see:
+     * https://tools.ietf.org/html/rfc7515.html#section-3.1
+     * 
+ * + * string compact_jwt = 1; + * @param value The compactJwt to set. + * @return This builder for chaining. + */ + public Builder setCompactJwt( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + compactJwt_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The compact encoding of a JWS, which is always three base64 encoded strings
+     * joined by periods. For details, see:
+     * https://tools.ietf.org/html/rfc7515.html#section-3.1
+     * 
+ * + * string compact_jwt = 1; + * @return This builder for chaining. + */ + public Builder clearCompactJwt() { + compactJwt_ = getDefaultInstance().getCompactJwt(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The compact encoding of a JWS, which is always three base64 encoded strings
+     * joined by periods. For details, see:
+     * https://tools.ietf.org/html/rfc7515.html#section-3.1
+     * 
+ * + * string compact_jwt = 1; + * @param value The bytes for compactJwt to set. + * @return This builder for chaining. + */ + public Builder setCompactJwtBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + compactJwt_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Jwt) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Jwt) + private static final io.grafeas.v1.Jwt DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Jwt(); + } + + public static io.grafeas.v1.Jwt getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Jwt parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Jwt getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java new file mode 100644 index 000000000000..b548750df7d9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/attestation.proto + +package io.grafeas.v1; + +public interface JwtOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Jwt) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The compact encoding of a JWS, which is always three base64 encoded strings
+   * joined by periods. For details, see:
+   * https://tools.ietf.org/html/rfc7515.html#section-3.1
+   * 
+ * + * string compact_jwt = 1; + * @return The compactJwt. + */ + java.lang.String getCompactJwt(); + /** + *
+   * The compact encoding of a JWS, which is always three base64 encoded strings
+   * joined by periods. For details, see:
+   * https://tools.ietf.org/html/rfc7515.html#section-3.1
+   * 
+ * + * string compact_jwt = 1; + * @return The bytes for compactJwt. + */ + com.google.protobuf.ByteString + getCompactJwtBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java new file mode 100644 index 000000000000..7c69d4115d68 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java @@ -0,0 +1,751 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +/** + *
+ * Layer holds metadata specific to a layer of a Docker image.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Layer} + */ +public final class Layer extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Layer) + LayerOrBuilder { +private static final long serialVersionUID = 0L; + // Use Layer.newBuilder() to construct. + private Layer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Layer() { + directive_ = ""; + arguments_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Layer(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Layer.class, io.grafeas.v1.Layer.Builder.class); + } + + public static final int DIRECTIVE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object directive_ = ""; + /** + *
+   * Required. The recovered Dockerfile directive used to construct this layer.
+   * See https://docs.docker.com/engine/reference/builder/ for more information.
+   * 
+ * + * string directive = 1; + * @return The directive. + */ + @java.lang.Override + public java.lang.String getDirective() { + java.lang.Object ref = directive_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + directive_ = s; + return s; + } + } + /** + *
+   * Required. The recovered Dockerfile directive used to construct this layer.
+   * See https://docs.docker.com/engine/reference/builder/ for more information.
+   * 
+ * + * string directive = 1; + * @return The bytes for directive. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDirectiveBytes() { + java.lang.Object ref = directive_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + directive_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARGUMENTS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object arguments_ = ""; + /** + *
+   * The recovered arguments to the Dockerfile directive.
+   * 
+ * + * string arguments = 2; + * @return The arguments. + */ + @java.lang.Override + public java.lang.String getArguments() { + java.lang.Object ref = arguments_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + arguments_ = s; + return s; + } + } + /** + *
+   * The recovered arguments to the Dockerfile directive.
+   * 
+ * + * string arguments = 2; + * @return The bytes for arguments. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getArgumentsBytes() { + java.lang.Object ref = arguments_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + arguments_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(directive_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, directive_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(arguments_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, arguments_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(directive_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, directive_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(arguments_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, arguments_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Layer)) { + return super.equals(obj); + } + io.grafeas.v1.Layer other = (io.grafeas.v1.Layer) obj; + + if (!getDirective() + .equals(other.getDirective())) return false; + if (!getArguments() + .equals(other.getArguments())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DIRECTIVE_FIELD_NUMBER; + hash = (53 * hash) + getDirective().hashCode(); + hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getArguments().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Layer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Layer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Layer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Layer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Layer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Layer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Layer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Layer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Layer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Layer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Layer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Layer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Layer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Layer holds metadata specific to a layer of a Docker image.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Layer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Layer) + io.grafeas.v1.LayerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Layer.class, io.grafeas.v1.Layer.Builder.class); + } + + // Construct using io.grafeas.v1.Layer.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + directive_ = ""; + arguments_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Layer getDefaultInstanceForType() { + return io.grafeas.v1.Layer.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Layer build() { + io.grafeas.v1.Layer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Layer buildPartial() { + io.grafeas.v1.Layer result = new io.grafeas.v1.Layer(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Layer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.directive_ = directive_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.arguments_ = arguments_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Layer) { + return mergeFrom((io.grafeas.v1.Layer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Layer other) { + if (other == io.grafeas.v1.Layer.getDefaultInstance()) return this; + if (!other.getDirective().isEmpty()) { + directive_ = other.directive_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getArguments().isEmpty()) { + arguments_ = other.arguments_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + directive_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + arguments_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object directive_ = ""; + /** + *
+     * Required. The recovered Dockerfile directive used to construct this layer.
+     * See https://docs.docker.com/engine/reference/builder/ for more information.
+     * 
+ * + * string directive = 1; + * @return The directive. + */ + public java.lang.String getDirective() { + java.lang.Object ref = directive_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + directive_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The recovered Dockerfile directive used to construct this layer.
+     * See https://docs.docker.com/engine/reference/builder/ for more information.
+     * 
+ * + * string directive = 1; + * @return The bytes for directive. + */ + public com.google.protobuf.ByteString + getDirectiveBytes() { + java.lang.Object ref = directive_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + directive_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The recovered Dockerfile directive used to construct this layer.
+     * See https://docs.docker.com/engine/reference/builder/ for more information.
+     * 
+ * + * string directive = 1; + * @param value The directive to set. + * @return This builder for chaining. + */ + public Builder setDirective( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + directive_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The recovered Dockerfile directive used to construct this layer.
+     * See https://docs.docker.com/engine/reference/builder/ for more information.
+     * 
+ * + * string directive = 1; + * @return This builder for chaining. + */ + public Builder clearDirective() { + directive_ = getDefaultInstance().getDirective(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The recovered Dockerfile directive used to construct this layer.
+     * See https://docs.docker.com/engine/reference/builder/ for more information.
+     * 
+ * + * string directive = 1; + * @param value The bytes for directive to set. + * @return This builder for chaining. + */ + public Builder setDirectiveBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + directive_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object arguments_ = ""; + /** + *
+     * The recovered arguments to the Dockerfile directive.
+     * 
+ * + * string arguments = 2; + * @return The arguments. + */ + public java.lang.String getArguments() { + java.lang.Object ref = arguments_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + arguments_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The recovered arguments to the Dockerfile directive.
+     * 
+ * + * string arguments = 2; + * @return The bytes for arguments. + */ + public com.google.protobuf.ByteString + getArgumentsBytes() { + java.lang.Object ref = arguments_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + arguments_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The recovered arguments to the Dockerfile directive.
+     * 
+ * + * string arguments = 2; + * @param value The arguments to set. + * @return This builder for chaining. + */ + public Builder setArguments( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + arguments_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The recovered arguments to the Dockerfile directive.
+     * 
+ * + * string arguments = 2; + * @return This builder for chaining. + */ + public Builder clearArguments() { + arguments_ = getDefaultInstance().getArguments(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The recovered arguments to the Dockerfile directive.
+     * 
+ * + * string arguments = 2; + * @param value The bytes for arguments to set. + * @return This builder for chaining. + */ + public Builder setArgumentsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + arguments_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Layer) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Layer) + private static final io.grafeas.v1.Layer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Layer(); + } + + public static io.grafeas.v1.Layer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Layer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Layer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java new file mode 100644 index 000000000000..57a86a319e96 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +public interface LayerOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Layer) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The recovered Dockerfile directive used to construct this layer.
+   * See https://docs.docker.com/engine/reference/builder/ for more information.
+   * 
+ * + * string directive = 1; + * @return The directive. + */ + java.lang.String getDirective(); + /** + *
+   * Required. The recovered Dockerfile directive used to construct this layer.
+   * See https://docs.docker.com/engine/reference/builder/ for more information.
+   * 
+ * + * string directive = 1; + * @return The bytes for directive. + */ + com.google.protobuf.ByteString + getDirectiveBytes(); + + /** + *
+   * The recovered arguments to the Dockerfile directive.
+   * 
+ * + * string arguments = 2; + * @return The arguments. + */ + java.lang.String getArguments(); + /** + *
+   * The recovered arguments to the Dockerfile directive.
+   * 
+ * + * string arguments = 2; + * @return The bytes for arguments. + */ + com.google.protobuf.ByteString + getArgumentsBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java new file mode 100644 index 000000000000..376885d90c5f --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java @@ -0,0 +1,772 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + *
+ * License information.
+ * 
+ * + * Protobuf type {@code grafeas.v1.License} + */ +public final class License extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.License) + LicenseOrBuilder { +private static final long serialVersionUID = 0L; + // Use License.newBuilder() to construct. + private License(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private License() { + expression_ = ""; + comments_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new License(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_License_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_License_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.License.class, io.grafeas.v1.License.Builder.class); + } + + public static final int EXPRESSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object expression_ = ""; + /** + *
+   * Often a single license can be used to represent the licensing terms.
+   * Sometimes it is necessary to include a choice of one or more licenses
+   * or some combination of license identifiers.
+   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+   * "GPL-2.0-or-later WITH Bison-exception-2.2".
+   * 
+ * + * string expression = 1; + * @return The expression. + */ + @java.lang.Override + public java.lang.String getExpression() { + java.lang.Object ref = expression_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + expression_ = s; + return s; + } + } + /** + *
+   * Often a single license can be used to represent the licensing terms.
+   * Sometimes it is necessary to include a choice of one or more licenses
+   * or some combination of license identifiers.
+   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+   * "GPL-2.0-or-later WITH Bison-exception-2.2".
+   * 
+ * + * string expression = 1; + * @return The bytes for expression. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExpressionBytes() { + java.lang.Object ref = expression_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + expression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMENTS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object comments_ = ""; + /** + *
+   * Comments
+   * 
+ * + * string comments = 2; + * @return The comments. + */ + @java.lang.Override + public java.lang.String getComments() { + java.lang.Object ref = comments_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + comments_ = s; + return s; + } + } + /** + *
+   * Comments
+   * 
+ * + * string comments = 2; + * @return The bytes for comments. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCommentsBytes() { + java.lang.Object ref = comments_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + comments_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expression_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, expression_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comments_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, comments_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expression_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, expression_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comments_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, comments_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.License)) { + return super.equals(obj); + } + io.grafeas.v1.License other = (io.grafeas.v1.License) obj; + + if (!getExpression() + .equals(other.getExpression())) return false; + if (!getComments() + .equals(other.getComments())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EXPRESSION_FIELD_NUMBER; + hash = (53 * hash) + getExpression().hashCode(); + hash = (37 * hash) + COMMENTS_FIELD_NUMBER; + hash = (53 * hash) + getComments().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.License parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.License parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.License parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.License parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.License parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.License parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.License parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.License parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.License parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.License parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.License parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.License parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.License prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * License information.
+   * 
+ * + * Protobuf type {@code grafeas.v1.License} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.License) + io.grafeas.v1.LicenseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_License_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_License_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.License.class, io.grafeas.v1.License.Builder.class); + } + + // Construct using io.grafeas.v1.License.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + expression_ = ""; + comments_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_License_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.License getDefaultInstanceForType() { + return io.grafeas.v1.License.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.License build() { + io.grafeas.v1.License result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.License buildPartial() { + io.grafeas.v1.License result = new io.grafeas.v1.License(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.License result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.expression_ = expression_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.comments_ = comments_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.License) { + return mergeFrom((io.grafeas.v1.License)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.License other) { + if (other == io.grafeas.v1.License.getDefaultInstance()) return this; + if (!other.getExpression().isEmpty()) { + expression_ = other.expression_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getComments().isEmpty()) { + comments_ = other.comments_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + expression_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + comments_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object expression_ = ""; + /** + *
+     * Often a single license can be used to represent the licensing terms.
+     * Sometimes it is necessary to include a choice of one or more licenses
+     * or some combination of license identifiers.
+     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+     * "GPL-2.0-or-later WITH Bison-exception-2.2".
+     * 
+ * + * string expression = 1; + * @return The expression. + */ + public java.lang.String getExpression() { + java.lang.Object ref = expression_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + expression_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Often a single license can be used to represent the licensing terms.
+     * Sometimes it is necessary to include a choice of one or more licenses
+     * or some combination of license identifiers.
+     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+     * "GPL-2.0-or-later WITH Bison-exception-2.2".
+     * 
+ * + * string expression = 1; + * @return The bytes for expression. + */ + public com.google.protobuf.ByteString + getExpressionBytes() { + java.lang.Object ref = expression_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + expression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Often a single license can be used to represent the licensing terms.
+     * Sometimes it is necessary to include a choice of one or more licenses
+     * or some combination of license identifiers.
+     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+     * "GPL-2.0-or-later WITH Bison-exception-2.2".
+     * 
+ * + * string expression = 1; + * @param value The expression to set. + * @return This builder for chaining. + */ + public Builder setExpression( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + expression_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Often a single license can be used to represent the licensing terms.
+     * Sometimes it is necessary to include a choice of one or more licenses
+     * or some combination of license identifiers.
+     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+     * "GPL-2.0-or-later WITH Bison-exception-2.2".
+     * 
+ * + * string expression = 1; + * @return This builder for chaining. + */ + public Builder clearExpression() { + expression_ = getDefaultInstance().getExpression(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Often a single license can be used to represent the licensing terms.
+     * Sometimes it is necessary to include a choice of one or more licenses
+     * or some combination of license identifiers.
+     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+     * "GPL-2.0-or-later WITH Bison-exception-2.2".
+     * 
+ * + * string expression = 1; + * @param value The bytes for expression to set. + * @return This builder for chaining. + */ + public Builder setExpressionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + expression_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object comments_ = ""; + /** + *
+     * Comments
+     * 
+ * + * string comments = 2; + * @return The comments. + */ + public java.lang.String getComments() { + java.lang.Object ref = comments_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + comments_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Comments
+     * 
+ * + * string comments = 2; + * @return The bytes for comments. + */ + public com.google.protobuf.ByteString + getCommentsBytes() { + java.lang.Object ref = comments_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + comments_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Comments
+     * 
+ * + * string comments = 2; + * @param value The comments to set. + * @return This builder for chaining. + */ + public Builder setComments( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + comments_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Comments
+     * 
+ * + * string comments = 2; + * @return This builder for chaining. + */ + public Builder clearComments() { + comments_ = getDefaultInstance().getComments(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Comments
+     * 
+ * + * string comments = 2; + * @param value The bytes for comments to set. + * @return This builder for chaining. + */ + public Builder setCommentsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + comments_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.License) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.License) + private static final io.grafeas.v1.License DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.License(); + } + + public static io.grafeas.v1.License getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public License parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.License getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java new file mode 100644 index 000000000000..0fa178dd2864 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public interface LicenseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.License) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Often a single license can be used to represent the licensing terms.
+   * Sometimes it is necessary to include a choice of one or more licenses
+   * or some combination of license identifiers.
+   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+   * "GPL-2.0-or-later WITH Bison-exception-2.2".
+   * 
+ * + * string expression = 1; + * @return The expression. + */ + java.lang.String getExpression(); + /** + *
+   * Often a single license can be used to represent the licensing terms.
+   * Sometimes it is necessary to include a choice of one or more licenses
+   * or some combination of license identifiers.
+   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+   * "GPL-2.0-or-later WITH Bison-exception-2.2".
+   * 
+ * + * string expression = 1; + * @return The bytes for expression. + */ + com.google.protobuf.ByteString + getExpressionBytes(); + + /** + *
+   * Comments
+   * 
+ * + * string comments = 2; + * @return The comments. + */ + java.lang.String getComments(); + /** + *
+   * Comments
+   * 
+ * + * string comments = 2; + * @return The bytes for comments. + */ + com.google.protobuf.ByteString + getCommentsBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java new file mode 100644 index 000000000000..f10788f12a0a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java @@ -0,0 +1,997 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to list occurrences for a note.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ListNoteOccurrencesRequest} + */ +public final class ListNoteOccurrencesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ListNoteOccurrencesRequest) + ListNoteOccurrencesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListNoteOccurrencesRequest.newBuilder() to construct. + private ListNoteOccurrencesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListNoteOccurrencesRequest() { + name_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListNoteOccurrencesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNoteOccurrencesRequest.class, io.grafeas.v1.ListNoteOccurrencesRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the note to list occurrences for in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the note to list occurrences for in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + *
+   * Number of occurrences to return in the list.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ListNoteOccurrencesRequest)) { + return super.equals(obj); + } + io.grafeas.v1.ListNoteOccurrencesRequest other = (io.grafeas.v1.ListNoteOccurrencesRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ListNoteOccurrencesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to list occurrences for a note.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ListNoteOccurrencesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNoteOccurrencesRequest) + io.grafeas.v1.ListNoteOccurrencesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNoteOccurrencesRequest.class, io.grafeas.v1.ListNoteOccurrencesRequest.Builder.class); + } + + // Construct using io.grafeas.v1.ListNoteOccurrencesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesRequest getDefaultInstanceForType() { + return io.grafeas.v1.ListNoteOccurrencesRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesRequest build() { + io.grafeas.v1.ListNoteOccurrencesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesRequest buildPartial() { + io.grafeas.v1.ListNoteOccurrencesRequest result = new io.grafeas.v1.ListNoteOccurrencesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.ListNoteOccurrencesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ListNoteOccurrencesRequest) { + return mergeFrom((io.grafeas.v1.ListNoteOccurrencesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ListNoteOccurrencesRequest other) { + if (other == io.grafeas.v1.ListNoteOccurrencesRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the note to list occurrences for in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the note to list occurrences for in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the note to list occurrences for in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the note to list occurrences for in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the note to list occurrences for in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Number of occurrences to return in the list.
+     * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Number of occurrences to return in the list.
+     * 
+ * + * int32 page_size = 3; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Number of occurrences to return in the list.
+     * 
+ * + * int32 page_size = 3; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNoteOccurrencesRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ListNoteOccurrencesRequest) + private static final io.grafeas.v1.ListNoteOccurrencesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ListNoteOccurrencesRequest(); + } + + public static io.grafeas.v1.ListNoteOccurrencesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNoteOccurrencesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java new file mode 100644 index 000000000000..170d72ff8fcc --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java @@ -0,0 +1,81 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface ListNoteOccurrencesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNoteOccurrencesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the note to list occurrences for in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the note to list occurrences for in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Number of occurrences to return in the list.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java new file mode 100644 index 000000000000..8b768f9bac8a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java @@ -0,0 +1,1026 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Response for listing occurrences for a note.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ListNoteOccurrencesResponse} + */ +public final class ListNoteOccurrencesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ListNoteOccurrencesResponse) + ListNoteOccurrencesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListNoteOccurrencesResponse.newBuilder() to construct. + private ListNoteOccurrencesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListNoteOccurrencesResponse() { + occurrences_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListNoteOccurrencesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNoteOccurrencesResponse.class, io.grafeas.v1.ListNoteOccurrencesResponse.Builder.class); + } + + public static final int OCCURRENCES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List occurrences_; + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public java.util.List getOccurrencesList() { + return occurrences_; + } + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public java.util.List + getOccurrencesOrBuilderList() { + return occurrences_; + } + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public int getOccurrencesCount() { + return occurrences_.size(); + } + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public io.grafeas.v1.Occurrence getOccurrences(int index) { + return occurrences_.get(index); + } + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + return occurrences_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < occurrences_.size(); i++) { + output.writeMessage(1, occurrences_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < occurrences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, occurrences_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ListNoteOccurrencesResponse)) { + return super.equals(obj); + } + io.grafeas.v1.ListNoteOccurrencesResponse other = (io.grafeas.v1.ListNoteOccurrencesResponse) obj; + + if (!getOccurrencesList() + .equals(other.getOccurrencesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOccurrencesCount() > 0) { + hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; + hash = (53 * hash) + getOccurrencesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ListNoteOccurrencesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for listing occurrences for a note.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ListNoteOccurrencesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNoteOccurrencesResponse) + io.grafeas.v1.ListNoteOccurrencesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNoteOccurrencesResponse.class, io.grafeas.v1.ListNoteOccurrencesResponse.Builder.class); + } + + // Construct using io.grafeas.v1.ListNoteOccurrencesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + } else { + occurrences_ = null; + occurrencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesResponse getDefaultInstanceForType() { + return io.grafeas.v1.ListNoteOccurrencesResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesResponse build() { + io.grafeas.v1.ListNoteOccurrencesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesResponse buildPartial() { + io.grafeas.v1.ListNoteOccurrencesResponse result = new io.grafeas.v1.ListNoteOccurrencesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.ListNoteOccurrencesResponse result) { + if (occurrencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + occurrences_ = java.util.Collections.unmodifiableList(occurrences_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.occurrences_ = occurrences_; + } else { + result.occurrences_ = occurrencesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.ListNoteOccurrencesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ListNoteOccurrencesResponse) { + return mergeFrom((io.grafeas.v1.ListNoteOccurrencesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ListNoteOccurrencesResponse other) { + if (other == io.grafeas.v1.ListNoteOccurrencesResponse.getDefaultInstance()) return this; + if (occurrencesBuilder_ == null) { + if (!other.occurrences_.isEmpty()) { + if (occurrences_.isEmpty()) { + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOccurrencesIsMutable(); + occurrences_.addAll(other.occurrences_); + } + onChanged(); + } + } else { + if (!other.occurrences_.isEmpty()) { + if (occurrencesBuilder_.isEmpty()) { + occurrencesBuilder_.dispose(); + occurrencesBuilder_ = null; + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000001); + occurrencesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOccurrencesFieldBuilder() : null; + } else { + occurrencesBuilder_.addAllMessages(other.occurrences_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.grafeas.v1.Occurrence m = + input.readMessage( + io.grafeas.v1.Occurrence.parser(), + extensionRegistry); + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(m); + } else { + occurrencesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List occurrences_ = + java.util.Collections.emptyList(); + private void ensureOccurrencesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + occurrences_ = new java.util.ArrayList(occurrences_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; + + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List getOccurrencesList() { + if (occurrencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(occurrences_); + } else { + return occurrencesBuilder_.getMessageList(); + } + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public int getOccurrencesCount() { + if (occurrencesBuilder_ == null) { + return occurrences_.size(); + } else { + return occurrencesBuilder_.getCount(); + } + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence getOccurrences(int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); + } else { + return occurrencesBuilder_.getMessage(index); + } + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.set(index, value); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.set(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences(io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(index, value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addAllOccurrences( + java.lang.Iterable values) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, occurrences_); + onChanged(); + } else { + occurrencesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder clearOccurrences() { + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + occurrencesBuilder_.clear(); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder removeOccurrences(int index) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.remove(index); + onChanged(); + } else { + occurrencesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().getBuilder(index); + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); } else { + return occurrencesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List + getOccurrencesOrBuilderList() { + if (occurrencesBuilder_ != null) { + return occurrencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(occurrences_); + } + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { + return getOccurrencesFieldBuilder().addBuilder( + io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().addBuilder( + index, io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List + getOccurrencesBuilderList() { + return getOccurrencesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> + getOccurrencesFieldBuilder() { + if (occurrencesBuilder_ == null) { + occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( + occurrences_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + occurrences_ = null; + } + return occurrencesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNoteOccurrencesResponse) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ListNoteOccurrencesResponse) + private static final io.grafeas.v1.ListNoteOccurrencesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ListNoteOccurrencesResponse(); + } + + public static io.grafeas.v1.ListNoteOccurrencesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNoteOccurrencesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java new file mode 100644 index 000000000000..f3ad30711d2d --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface ListNoteOccurrencesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNoteOccurrencesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + java.util.List + getOccurrencesList(); + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + io.grafeas.v1.Occurrence getOccurrences(int index); + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + int getOccurrencesCount(); + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + java.util.List + getOccurrencesOrBuilderList(); + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index); + + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java new file mode 100644 index 000000000000..5a5f75cc706b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java @@ -0,0 +1,1001 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to list notes.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ListNotesRequest} + */ +public final class ListNotesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ListNotesRequest) + ListNotesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListNotesRequest.newBuilder() to construct. + private ListNotesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListNotesRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListNotesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNotesRequest.class, io.grafeas.v1.ListNotesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * The name of the project to list notes for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The name of the project to list notes for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + *
+   * Number of notes to return in the list. Must be positive. Max allowed page
+   * size is 1000. If not specified, page size defaults to 20.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ListNotesRequest)) { + return super.equals(obj); + } + io.grafeas.v1.ListNotesRequest other = (io.grafeas.v1.ListNotesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ListNotesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNotesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNotesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNotesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNotesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNotesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNotesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNotesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNotesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNotesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNotesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNotesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ListNotesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to list notes.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ListNotesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNotesRequest) + io.grafeas.v1.ListNotesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNotesRequest.class, io.grafeas.v1.ListNotesRequest.Builder.class); + } + + // Construct using io.grafeas.v1.ListNotesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ListNotesRequest getDefaultInstanceForType() { + return io.grafeas.v1.ListNotesRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ListNotesRequest build() { + io.grafeas.v1.ListNotesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ListNotesRequest buildPartial() { + io.grafeas.v1.ListNotesRequest result = new io.grafeas.v1.ListNotesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.ListNotesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ListNotesRequest) { + return mergeFrom((io.grafeas.v1.ListNotesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ListNotesRequest other) { + if (other == io.grafeas.v1.ListNotesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * The name of the project to list notes for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the project to list notes for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the project to list notes for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the project to list notes for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the project to list notes for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Number of notes to return in the list. Must be positive. Max allowed page
+     * size is 1000. If not specified, page size defaults to 20.
+     * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Number of notes to return in the list. Must be positive. Max allowed page
+     * size is 1000. If not specified, page size defaults to 20.
+     * 
+ * + * int32 page_size = 3; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Number of notes to return in the list. Must be positive. Max allowed page
+     * size is 1000. If not specified, page size defaults to 20.
+     * 
+ * + * int32 page_size = 3; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNotesRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ListNotesRequest) + private static final io.grafeas.v1.ListNotesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ListNotesRequest(); + } + + public static io.grafeas.v1.ListNotesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNotesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ListNotesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java new file mode 100644 index 000000000000..eaebab9dbf1b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface ListNotesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNotesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the project to list notes for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The name of the project to list notes for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Number of notes to return in the list. Must be positive. Max allowed page
+   * size is 1000. If not specified, page size defaults to 20.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java new file mode 100644 index 000000000000..47debbe86abd --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java @@ -0,0 +1,1040 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Response for listing notes.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ListNotesResponse} + */ +public final class ListNotesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ListNotesResponse) + ListNotesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListNotesResponse.newBuilder() to construct. + private ListNotesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListNotesResponse() { + notes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListNotesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNotesResponse.class, io.grafeas.v1.ListNotesResponse.Builder.class); + } + + public static final int NOTES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List notes_; + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public java.util.List getNotesList() { + return notes_; + } + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public java.util.List + getNotesOrBuilderList() { + return notes_; + } + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public int getNotesCount() { + return notes_.size(); + } + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public io.grafeas.v1.Note getNotes(int index) { + return notes_.get(index); + } + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( + int index) { + return notes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < notes_.size(); i++) { + output.writeMessage(1, notes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < notes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, notes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ListNotesResponse)) { + return super.equals(obj); + } + io.grafeas.v1.ListNotesResponse other = (io.grafeas.v1.ListNotesResponse) obj; + + if (!getNotesList() + .equals(other.getNotesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNotesCount() > 0) { + hash = (37 * hash) + NOTES_FIELD_NUMBER; + hash = (53 * hash) + getNotesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ListNotesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNotesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNotesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNotesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNotesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNotesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNotesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNotesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNotesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNotesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNotesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNotesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ListNotesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for listing notes.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ListNotesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNotesResponse) + io.grafeas.v1.ListNotesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNotesResponse.class, io.grafeas.v1.ListNotesResponse.Builder.class); + } + + // Construct using io.grafeas.v1.ListNotesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (notesBuilder_ == null) { + notes_ = java.util.Collections.emptyList(); + } else { + notes_ = null; + notesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ListNotesResponse getDefaultInstanceForType() { + return io.grafeas.v1.ListNotesResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ListNotesResponse build() { + io.grafeas.v1.ListNotesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ListNotesResponse buildPartial() { + io.grafeas.v1.ListNotesResponse result = new io.grafeas.v1.ListNotesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.ListNotesResponse result) { + if (notesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + notes_ = java.util.Collections.unmodifiableList(notes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.notes_ = notes_; + } else { + result.notes_ = notesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.ListNotesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ListNotesResponse) { + return mergeFrom((io.grafeas.v1.ListNotesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ListNotesResponse other) { + if (other == io.grafeas.v1.ListNotesResponse.getDefaultInstance()) return this; + if (notesBuilder_ == null) { + if (!other.notes_.isEmpty()) { + if (notes_.isEmpty()) { + notes_ = other.notes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNotesIsMutable(); + notes_.addAll(other.notes_); + } + onChanged(); + } + } else { + if (!other.notes_.isEmpty()) { + if (notesBuilder_.isEmpty()) { + notesBuilder_.dispose(); + notesBuilder_ = null; + notes_ = other.notes_; + bitField0_ = (bitField0_ & ~0x00000001); + notesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNotesFieldBuilder() : null; + } else { + notesBuilder_.addAllMessages(other.notes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.grafeas.v1.Note m = + input.readMessage( + io.grafeas.v1.Note.parser(), + extensionRegistry); + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.add(m); + } else { + notesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List notes_ = + java.util.Collections.emptyList(); + private void ensureNotesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + notes_ = new java.util.ArrayList(notes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> notesBuilder_; + + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public java.util.List getNotesList() { + if (notesBuilder_ == null) { + return java.util.Collections.unmodifiableList(notes_); + } else { + return notesBuilder_.getMessageList(); + } + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public int getNotesCount() { + if (notesBuilder_ == null) { + return notes_.size(); + } else { + return notesBuilder_.getCount(); + } + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note getNotes(int index) { + if (notesBuilder_ == null) { + return notes_.get(index); + } else { + return notesBuilder_.getMessage(index); + } + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder setNotes( + int index, io.grafeas.v1.Note value) { + if (notesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotesIsMutable(); + notes_.set(index, value); + onChanged(); + } else { + notesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder setNotes( + int index, io.grafeas.v1.Note.Builder builderForValue) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.set(index, builderForValue.build()); + onChanged(); + } else { + notesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes(io.grafeas.v1.Note value) { + if (notesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotesIsMutable(); + notes_.add(value); + onChanged(); + } else { + notesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes( + int index, io.grafeas.v1.Note value) { + if (notesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotesIsMutable(); + notes_.add(index, value); + onChanged(); + } else { + notesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes( + io.grafeas.v1.Note.Builder builderForValue) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.add(builderForValue.build()); + onChanged(); + } else { + notesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes( + int index, io.grafeas.v1.Note.Builder builderForValue) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.add(index, builderForValue.build()); + onChanged(); + } else { + notesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addAllNotes( + java.lang.Iterable values) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, notes_); + onChanged(); + } else { + notesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder clearNotes() { + if (notesBuilder_ == null) { + notes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + notesBuilder_.clear(); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder removeNotes(int index) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.remove(index); + onChanged(); + } else { + notesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note.Builder getNotesBuilder( + int index) { + return getNotesFieldBuilder().getBuilder(index); + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( + int index) { + if (notesBuilder_ == null) { + return notes_.get(index); } else { + return notesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public java.util.List + getNotesOrBuilderList() { + if (notesBuilder_ != null) { + return notesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(notes_); + } + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note.Builder addNotesBuilder() { + return getNotesFieldBuilder().addBuilder( + io.grafeas.v1.Note.getDefaultInstance()); + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note.Builder addNotesBuilder( + int index) { + return getNotesFieldBuilder().addBuilder( + index, io.grafeas.v1.Note.getDefaultInstance()); + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public java.util.List + getNotesBuilderList() { + return getNotesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> + getNotesFieldBuilder() { + if (notesBuilder_ == null) { + notesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( + notes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + notes_ = null; + } + return notesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNotesResponse) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ListNotesResponse) + private static final io.grafeas.v1.ListNotesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ListNotesResponse(); + } + + public static io.grafeas.v1.ListNotesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNotesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ListNotesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java new file mode 100644 index 000000000000..41ae132266e5 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface ListNotesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNotesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + java.util.List + getNotesList(); + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + io.grafeas.v1.Note getNotes(int index); + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + int getNotesCount(); + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + java.util.List + getNotesOrBuilderList(); + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( + int index); + + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java new file mode 100644 index 000000000000..ca66bb189c1e --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java @@ -0,0 +1,1001 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to list occurrences.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ListOccurrencesRequest} + */ +public final class ListOccurrencesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ListOccurrencesRequest) + ListOccurrencesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListOccurrencesRequest.newBuilder() to construct. + private ListOccurrencesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListOccurrencesRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListOccurrencesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListOccurrencesRequest.class, io.grafeas.v1.ListOccurrencesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * The name of the project to list occurrences for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The name of the project to list occurrences for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + *
+   * Number of occurrences to return in the list. Must be positive. Max allowed
+   * page size is 1000. If not specified, page size defaults to 20.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ListOccurrencesRequest)) { + return super.equals(obj); + } + io.grafeas.v1.ListOccurrencesRequest other = (io.grafeas.v1.ListOccurrencesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListOccurrencesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ListOccurrencesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to list occurrences.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ListOccurrencesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ListOccurrencesRequest) + io.grafeas.v1.ListOccurrencesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListOccurrencesRequest.class, io.grafeas.v1.ListOccurrencesRequest.Builder.class); + } + + // Construct using io.grafeas.v1.ListOccurrencesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesRequest getDefaultInstanceForType() { + return io.grafeas.v1.ListOccurrencesRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesRequest build() { + io.grafeas.v1.ListOccurrencesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesRequest buildPartial() { + io.grafeas.v1.ListOccurrencesRequest result = new io.grafeas.v1.ListOccurrencesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.ListOccurrencesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ListOccurrencesRequest) { + return mergeFrom((io.grafeas.v1.ListOccurrencesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ListOccurrencesRequest other) { + if (other == io.grafeas.v1.ListOccurrencesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * The name of the project to list occurrences for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the project to list occurrences for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the project to list occurrences for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the project to list occurrences for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the project to list occurrences for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Number of occurrences to return in the list. Must be positive. Max allowed
+     * page size is 1000. If not specified, page size defaults to 20.
+     * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Number of occurrences to return in the list. Must be positive. Max allowed
+     * page size is 1000. If not specified, page size defaults to 20.
+     * 
+ * + * int32 page_size = 3; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Number of occurrences to return in the list. Must be positive. Max allowed
+     * page size is 1000. If not specified, page size defaults to 20.
+     * 
+ * + * int32 page_size = 3; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ListOccurrencesRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ListOccurrencesRequest) + private static final io.grafeas.v1.ListOccurrencesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ListOccurrencesRequest(); + } + + public static io.grafeas.v1.ListOccurrencesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOccurrencesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java new file mode 100644 index 000000000000..057e3b26a4d7 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface ListOccurrencesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ListOccurrencesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the project to list occurrences for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The name of the project to list occurrences for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Number of occurrences to return in the list. Must be positive. Max allowed
+   * page size is 1000. If not specified, page size defaults to 20.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java new file mode 100644 index 000000000000..2a69a922f24e --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java @@ -0,0 +1,1040 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Response for listing occurrences.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ListOccurrencesResponse} + */ +public final class ListOccurrencesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ListOccurrencesResponse) + ListOccurrencesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListOccurrencesResponse.newBuilder() to construct. + private ListOccurrencesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListOccurrencesResponse() { + occurrences_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListOccurrencesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListOccurrencesResponse.class, io.grafeas.v1.ListOccurrencesResponse.Builder.class); + } + + public static final int OCCURRENCES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List occurrences_; + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public java.util.List getOccurrencesList() { + return occurrences_; + } + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public java.util.List + getOccurrencesOrBuilderList() { + return occurrences_; + } + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public int getOccurrencesCount() { + return occurrences_.size(); + } + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public io.grafeas.v1.Occurrence getOccurrences(int index) { + return occurrences_.get(index); + } + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + return occurrences_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < occurrences_.size(); i++) { + output.writeMessage(1, occurrences_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < occurrences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, occurrences_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ListOccurrencesResponse)) { + return super.equals(obj); + } + io.grafeas.v1.ListOccurrencesResponse other = (io.grafeas.v1.ListOccurrencesResponse) obj; + + if (!getOccurrencesList() + .equals(other.getOccurrencesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOccurrencesCount() > 0) { + hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; + hash = (53 * hash) + getOccurrencesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListOccurrencesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ListOccurrencesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for listing occurrences.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ListOccurrencesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ListOccurrencesResponse) + io.grafeas.v1.ListOccurrencesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListOccurrencesResponse.class, io.grafeas.v1.ListOccurrencesResponse.Builder.class); + } + + // Construct using io.grafeas.v1.ListOccurrencesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + } else { + occurrences_ = null; + occurrencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesResponse getDefaultInstanceForType() { + return io.grafeas.v1.ListOccurrencesResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesResponse build() { + io.grafeas.v1.ListOccurrencesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesResponse buildPartial() { + io.grafeas.v1.ListOccurrencesResponse result = new io.grafeas.v1.ListOccurrencesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.ListOccurrencesResponse result) { + if (occurrencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + occurrences_ = java.util.Collections.unmodifiableList(occurrences_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.occurrences_ = occurrences_; + } else { + result.occurrences_ = occurrencesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.ListOccurrencesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ListOccurrencesResponse) { + return mergeFrom((io.grafeas.v1.ListOccurrencesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ListOccurrencesResponse other) { + if (other == io.grafeas.v1.ListOccurrencesResponse.getDefaultInstance()) return this; + if (occurrencesBuilder_ == null) { + if (!other.occurrences_.isEmpty()) { + if (occurrences_.isEmpty()) { + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOccurrencesIsMutable(); + occurrences_.addAll(other.occurrences_); + } + onChanged(); + } + } else { + if (!other.occurrences_.isEmpty()) { + if (occurrencesBuilder_.isEmpty()) { + occurrencesBuilder_.dispose(); + occurrencesBuilder_ = null; + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000001); + occurrencesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOccurrencesFieldBuilder() : null; + } else { + occurrencesBuilder_.addAllMessages(other.occurrences_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.grafeas.v1.Occurrence m = + input.readMessage( + io.grafeas.v1.Occurrence.parser(), + extensionRegistry); + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(m); + } else { + occurrencesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List occurrences_ = + java.util.Collections.emptyList(); + private void ensureOccurrencesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + occurrences_ = new java.util.ArrayList(occurrences_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; + + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List getOccurrencesList() { + if (occurrencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(occurrences_); + } else { + return occurrencesBuilder_.getMessageList(); + } + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public int getOccurrencesCount() { + if (occurrencesBuilder_ == null) { + return occurrences_.size(); + } else { + return occurrencesBuilder_.getCount(); + } + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence getOccurrences(int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); + } else { + return occurrencesBuilder_.getMessage(index); + } + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.set(index, value); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.set(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences(io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(index, value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addAllOccurrences( + java.lang.Iterable values) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, occurrences_); + onChanged(); + } else { + occurrencesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder clearOccurrences() { + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + occurrencesBuilder_.clear(); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder removeOccurrences(int index) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.remove(index); + onChanged(); + } else { + occurrencesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().getBuilder(index); + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); } else { + return occurrencesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List + getOccurrencesOrBuilderList() { + if (occurrencesBuilder_ != null) { + return occurrencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(occurrences_); + } + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { + return getOccurrencesFieldBuilder().addBuilder( + io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().addBuilder( + index, io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List + getOccurrencesBuilderList() { + return getOccurrencesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> + getOccurrencesFieldBuilder() { + if (occurrencesBuilder_ == null) { + occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( + occurrences_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + occurrences_ = null; + } + return occurrencesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ListOccurrencesResponse) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ListOccurrencesResponse) + private static final io.grafeas.v1.ListOccurrencesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ListOccurrencesResponse(); + } + + public static io.grafeas.v1.ListOccurrencesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOccurrencesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java new file mode 100644 index 000000000000..e5e64e4513ca --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface ListOccurrencesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ListOccurrencesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + java.util.List + getOccurrencesList(); + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + io.grafeas.v1.Occurrence getOccurrences(int index); + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + int getOccurrencesCount(); + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + java.util.List + getOccurrencesOrBuilderList(); + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index); + + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java new file mode 100644 index 000000000000..13e84c81b5b1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java @@ -0,0 +1,994 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +/** + *
+ * An occurrence of a particular package installation found within a system's
+ * filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Location} + */ +public final class Location extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Location) + LocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use Location.newBuilder() to construct. + private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Location() { + cpeUri_ = ""; + path_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Location(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Location.class, io.grafeas.v1.Location.Builder.class); + } + + public static final int CPE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cpeUri_ = ""; + /** + *
+   * Deprecated.
+   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+   * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + @java.lang.Override + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } + } + /** + *
+   * Deprecated.
+   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+   * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + private io.grafeas.v1.Version version_; + /** + *
+   * Deprecated.
+   * The version installed at this location.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return Whether the version field is set. + */ + @java.lang.Override + public boolean hasVersion() { + return version_ != null; + } + /** + *
+   * Deprecated.
+   * The version installed at this location.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return The version. + */ + @java.lang.Override + public io.grafeas.v1.Version getVersion() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + /** + *
+   * Deprecated.
+   * The version installed at this location.
+   * 
+ * + * .grafeas.v1.Version version = 2; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + + public static final int PATH_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object path_ = ""; + /** + *
+   * The path from which we gathered that this package/version is installed.
+   * 
+ * + * string path = 3; + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + *
+   * The path from which we gathered that this package/version is installed.
+   * 
+ * + * string path = 3; + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); + } + if (version_ != null) { + output.writeMessage(2, getVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, path_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); + } + if (version_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, path_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Location)) { + return super.equals(obj); + } + io.grafeas.v1.Location other = (io.grafeas.v1.Location) obj; + + if (!getCpeUri() + .equals(other.getCpeUri())) return false; + if (hasVersion() != other.hasVersion()) return false; + if (hasVersion()) { + if (!getVersion() + .equals(other.getVersion())) return false; + } + if (!getPath() + .equals(other.getPath())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCpeUri().hashCode(); + if (hasVersion()) { + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + } + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Location parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Location parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Location parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Location parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Location parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Location parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Location parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Location parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Location parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Location parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Location parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Location parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Location prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An occurrence of a particular package installation found within a system's
+   * filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Location} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Location) + io.grafeas.v1.LocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Location.class, io.grafeas.v1.Location.Builder.class); + } + + // Construct using io.grafeas.v1.Location.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cpeUri_ = ""; + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + path_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Location getDefaultInstanceForType() { + return io.grafeas.v1.Location.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Location build() { + io.grafeas.v1.Location result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Location buildPartial() { + io.grafeas.v1.Location result = new io.grafeas.v1.Location(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Location result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cpeUri_ = cpeUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.version_ = versionBuilder_ == null + ? version_ + : versionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.path_ = path_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Location) { + return mergeFrom((io.grafeas.v1.Location)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Location other) { + if (other == io.grafeas.v1.Location.getDefaultInstance()) return this; + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasVersion()) { + mergeVersion(other.getVersion()); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cpeUri_ = ""; + /** + *
+     * Deprecated.
+     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+     * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated.
+     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+     * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated.
+     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+     * 
+ * + * string cpe_uri = 1; + * @param value The cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Deprecated.
+     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+     * 
+ * + * string cpe_uri = 1; + * @return This builder for chaining. + */ + public Builder clearCpeUri() { + cpeUri_ = getDefaultInstance().getCpeUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Deprecated.
+     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+     * 
+ * + * string cpe_uri = 1; + * @param value The bytes for cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.grafeas.v1.Version version_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + * @return Whether the version field is set. + */ + public boolean hasVersion() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + * @return The version. + */ + public io.grafeas.v1.Version getVersion() { + if (versionBuilder_ == null) { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } else { + return versionBuilder_.getMessage(); + } + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder setVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + } else { + versionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder setVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (versionBuilder_ == null) { + version_ = builderForValue.build(); + } else { + versionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder mergeVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + version_ != null && + version_ != io.grafeas.v1.Version.getDefaultInstance()) { + getVersionBuilder().mergeFrom(value); + } else { + version_ = value; + } + } else { + versionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder clearVersion() { + bitField0_ = (bitField0_ & ~0x00000002); + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public io.grafeas.v1.Version.Builder getVersionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getVersionFieldBuilder().getBuilder(); + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + if (versionBuilder_ != null) { + return versionBuilder_.getMessageOrBuilder(); + } else { + return version_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : version_; + } + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getVersionFieldBuilder() { + if (versionBuilder_ == null) { + versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getVersion(), + getParentForChildren(), + isClean()); + version_ = null; + } + return versionBuilder_; + } + + private java.lang.Object path_ = ""; + /** + *
+     * The path from which we gathered that this package/version is installed.
+     * 
+ * + * string path = 3; + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The path from which we gathered that this package/version is installed.
+     * 
+ * + * string path = 3; + * @return The bytes for path. + */ + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The path from which we gathered that this package/version is installed.
+     * 
+ * + * string path = 3; + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + path_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The path from which we gathered that this package/version is installed.
+     * 
+ * + * string path = 3; + * @return This builder for chaining. + */ + public Builder clearPath() { + path_ = getDefaultInstance().getPath(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The path from which we gathered that this package/version is installed.
+     * 
+ * + * string path = 3; + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + path_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Location) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Location) + private static final io.grafeas.v1.Location DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Location(); + } + + public static io.grafeas.v1.Location getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Location parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Location getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java new file mode 100644 index 000000000000..9b0f8af80d16 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java @@ -0,0 +1,81 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +public interface LocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Location) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Deprecated.
+   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+   * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + java.lang.String getCpeUri(); + /** + *
+   * Deprecated.
+   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+   * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + com.google.protobuf.ByteString + getCpeUriBytes(); + + /** + *
+   * Deprecated.
+   * The version installed at this location.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return Whether the version field is set. + */ + boolean hasVersion(); + /** + *
+   * Deprecated.
+   * The version installed at this location.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return The version. + */ + io.grafeas.v1.Version getVersion(); + /** + *
+   * Deprecated.
+   * The version installed at this location.
+   * 
+ * + * .grafeas.v1.Version version = 2; + */ + io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); + + /** + *
+   * The path from which we gathered that this package/version is installed.
+   * 
+ * + * string path = 3; + * @return The path. + */ + java.lang.String getPath(); + /** + *
+   * The path from which we gathered that this package/version is installed.
+   * 
+ * + * string path = 3; + * @return The bytes for path. + */ + com.google.protobuf.ByteString + getPathBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java new file mode 100644 index 000000000000..3aee42f64ca5 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java @@ -0,0 +1,1380 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Other properties of the build.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Metadata} + */ +public final class Metadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Metadata) + MetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use Metadata.newBuilder() to construct. + private Metadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Metadata() { + buildInvocationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Metadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Metadata.class, io.grafeas.v1.Metadata.Builder.class); + } + + public static final int BUILD_INVOCATION_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object buildInvocationId_ = ""; + /** + *
+   * Identifies the particular build invocation, which can be useful for finding
+   * associated logs or other ad-hoc analysis. The value SHOULD be globally
+   * unique, per in-toto Provenance spec.
+   * 
+ * + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + @java.lang.Override + public java.lang.String getBuildInvocationId() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildInvocationId_ = s; + return s; + } + } + /** + *
+   * Identifies the particular build invocation, which can be useful for finding
+   * associated logs or other ad-hoc analysis. The value SHOULD be globally
+   * unique, per in-toto Provenance spec.
+   * 
+ * + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBuildInvocationIdBytes() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildInvocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUILD_STARTED_ON_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp buildStartedOn_; + /** + *
+   * The timestamp of when the build started.
+   * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + @java.lang.Override + public boolean hasBuildStartedOn() { + return buildStartedOn_ != null; + } + /** + *
+   * The timestamp of when the build started.
+   * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getBuildStartedOn() { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + /** + *
+   * The timestamp of when the build started.
+   * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + + public static final int BUILD_FINISHED_ON_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp buildFinishedOn_; + /** + *
+   * The timestamp of when the build completed.
+   * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + @java.lang.Override + public boolean hasBuildFinishedOn() { + return buildFinishedOn_ != null; + } + /** + *
+   * The timestamp of when the build completed.
+   * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getBuildFinishedOn() { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + /** + *
+   * The timestamp of when the build completed.
+   * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + + public static final int COMPLETENESS_FIELD_NUMBER = 4; + private io.grafeas.v1.Completeness completeness_; + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * .grafeas.v1.Completeness completeness = 4; + * @return Whether the completeness field is set. + */ + @java.lang.Override + public boolean hasCompleteness() { + return completeness_ != null; + } + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * .grafeas.v1.Completeness completeness = 4; + * @return The completeness. + */ + @java.lang.Override + public io.grafeas.v1.Completeness getCompleteness() { + return completeness_ == null ? io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; + } + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + @java.lang.Override + public io.grafeas.v1.CompletenessOrBuilder getCompletenessOrBuilder() { + return completeness_ == null ? io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; + } + + public static final int REPRODUCIBLE_FIELD_NUMBER = 5; + private boolean reproducible_ = false; + /** + *
+   * If true, the builder claims that running the recipe on materials will
+   * produce bit-for-bit identical output.
+   * 
+ * + * bool reproducible = 5; + * @return The reproducible. + */ + @java.lang.Override + public boolean getReproducible() { + return reproducible_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, buildInvocationId_); + } + if (buildStartedOn_ != null) { + output.writeMessage(2, getBuildStartedOn()); + } + if (buildFinishedOn_ != null) { + output.writeMessage(3, getBuildFinishedOn()); + } + if (completeness_ != null) { + output.writeMessage(4, getCompleteness()); + } + if (reproducible_ != false) { + output.writeBool(5, reproducible_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, buildInvocationId_); + } + if (buildStartedOn_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBuildStartedOn()); + } + if (buildFinishedOn_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getBuildFinishedOn()); + } + if (completeness_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCompleteness()); + } + if (reproducible_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, reproducible_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Metadata)) { + return super.equals(obj); + } + io.grafeas.v1.Metadata other = (io.grafeas.v1.Metadata) obj; + + if (!getBuildInvocationId() + .equals(other.getBuildInvocationId())) return false; + if (hasBuildStartedOn() != other.hasBuildStartedOn()) return false; + if (hasBuildStartedOn()) { + if (!getBuildStartedOn() + .equals(other.getBuildStartedOn())) return false; + } + if (hasBuildFinishedOn() != other.hasBuildFinishedOn()) return false; + if (hasBuildFinishedOn()) { + if (!getBuildFinishedOn() + .equals(other.getBuildFinishedOn())) return false; + } + if (hasCompleteness() != other.hasCompleteness()) return false; + if (hasCompleteness()) { + if (!getCompleteness() + .equals(other.getCompleteness())) return false; + } + if (getReproducible() + != other.getReproducible()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BUILD_INVOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getBuildInvocationId().hashCode(); + if (hasBuildStartedOn()) { + hash = (37 * hash) + BUILD_STARTED_ON_FIELD_NUMBER; + hash = (53 * hash) + getBuildStartedOn().hashCode(); + } + if (hasBuildFinishedOn()) { + hash = (37 * hash) + BUILD_FINISHED_ON_FIELD_NUMBER; + hash = (53 * hash) + getBuildFinishedOn().hashCode(); + } + if (hasCompleteness()) { + hash = (37 * hash) + COMPLETENESS_FIELD_NUMBER; + hash = (53 * hash) + getCompleteness().hashCode(); + } + hash = (37 * hash) + REPRODUCIBLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReproducible()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Metadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Metadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Metadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Metadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Metadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Metadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Metadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Metadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Metadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Metadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Metadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Metadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Metadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Other properties of the build.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Metadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Metadata) + io.grafeas.v1.MetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Metadata.class, io.grafeas.v1.Metadata.Builder.class); + } + + // Construct using io.grafeas.v1.Metadata.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + buildInvocationId_ = ""; + buildStartedOn_ = null; + if (buildStartedOnBuilder_ != null) { + buildStartedOnBuilder_.dispose(); + buildStartedOnBuilder_ = null; + } + buildFinishedOn_ = null; + if (buildFinishedOnBuilder_ != null) { + buildFinishedOnBuilder_.dispose(); + buildFinishedOnBuilder_ = null; + } + completeness_ = null; + if (completenessBuilder_ != null) { + completenessBuilder_.dispose(); + completenessBuilder_ = null; + } + reproducible_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Metadata getDefaultInstanceForType() { + return io.grafeas.v1.Metadata.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Metadata build() { + io.grafeas.v1.Metadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Metadata buildPartial() { + io.grafeas.v1.Metadata result = new io.grafeas.v1.Metadata(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Metadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.buildInvocationId_ = buildInvocationId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.buildStartedOn_ = buildStartedOnBuilder_ == null + ? buildStartedOn_ + : buildStartedOnBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.buildFinishedOn_ = buildFinishedOnBuilder_ == null + ? buildFinishedOn_ + : buildFinishedOnBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.completeness_ = completenessBuilder_ == null + ? completeness_ + : completenessBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.reproducible_ = reproducible_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Metadata) { + return mergeFrom((io.grafeas.v1.Metadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Metadata other) { + if (other == io.grafeas.v1.Metadata.getDefaultInstance()) return this; + if (!other.getBuildInvocationId().isEmpty()) { + buildInvocationId_ = other.buildInvocationId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasBuildStartedOn()) { + mergeBuildStartedOn(other.getBuildStartedOn()); + } + if (other.hasBuildFinishedOn()) { + mergeBuildFinishedOn(other.getBuildFinishedOn()); + } + if (other.hasCompleteness()) { + mergeCompleteness(other.getCompleteness()); + } + if (other.getReproducible() != false) { + setReproducible(other.getReproducible()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + buildInvocationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getBuildStartedOnFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getBuildFinishedOnFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getCompletenessFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + reproducible_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object buildInvocationId_ = ""; + /** + *
+     * Identifies the particular build invocation, which can be useful for finding
+     * associated logs or other ad-hoc analysis. The value SHOULD be globally
+     * unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + public java.lang.String getBuildInvocationId() { + java.lang.Object ref = buildInvocationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildInvocationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Identifies the particular build invocation, which can be useful for finding
+     * associated logs or other ad-hoc analysis. The value SHOULD be globally
+     * unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + public com.google.protobuf.ByteString + getBuildInvocationIdBytes() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildInvocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Identifies the particular build invocation, which can be useful for finding
+     * associated logs or other ad-hoc analysis. The value SHOULD be globally
+     * unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @param value The buildInvocationId to set. + * @return This builder for chaining. + */ + public Builder setBuildInvocationId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + buildInvocationId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Identifies the particular build invocation, which can be useful for finding
+     * associated logs or other ad-hoc analysis. The value SHOULD be globally
+     * unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @return This builder for chaining. + */ + public Builder clearBuildInvocationId() { + buildInvocationId_ = getDefaultInstance().getBuildInvocationId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Identifies the particular build invocation, which can be useful for finding
+     * associated logs or other ad-hoc analysis. The value SHOULD be globally
+     * unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @param value The bytes for buildInvocationId to set. + * @return This builder for chaining. + */ + public Builder setBuildInvocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + buildInvocationId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp buildStartedOn_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildStartedOnBuilder_; + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + public boolean hasBuildStartedOn() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + public com.google.protobuf.Timestamp getBuildStartedOn() { + if (buildStartedOnBuilder_ == null) { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } else { + return buildStartedOnBuilder_.getMessage(); + } + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder setBuildStartedOn(com.google.protobuf.Timestamp value) { + if (buildStartedOnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + buildStartedOn_ = value; + } else { + buildStartedOnBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder setBuildStartedOn( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (buildStartedOnBuilder_ == null) { + buildStartedOn_ = builderForValue.build(); + } else { + buildStartedOnBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder mergeBuildStartedOn(com.google.protobuf.Timestamp value) { + if (buildStartedOnBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + buildStartedOn_ != null && + buildStartedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getBuildStartedOnBuilder().mergeFrom(value); + } else { + buildStartedOn_ = value; + } + } else { + buildStartedOnBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder clearBuildStartedOn() { + bitField0_ = (bitField0_ & ~0x00000002); + buildStartedOn_ = null; + if (buildStartedOnBuilder_ != null) { + buildStartedOnBuilder_.dispose(); + buildStartedOnBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public com.google.protobuf.Timestamp.Builder getBuildStartedOnBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBuildStartedOnFieldBuilder().getBuilder(); + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { + if (buildStartedOnBuilder_ != null) { + return buildStartedOnBuilder_.getMessageOrBuilder(); + } else { + return buildStartedOn_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getBuildStartedOnFieldBuilder() { + if (buildStartedOnBuilder_ == null) { + buildStartedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getBuildStartedOn(), + getParentForChildren(), + isClean()); + buildStartedOn_ = null; + } + return buildStartedOnBuilder_; + } + + private com.google.protobuf.Timestamp buildFinishedOn_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildFinishedOnBuilder_; + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + public boolean hasBuildFinishedOn() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + public com.google.protobuf.Timestamp getBuildFinishedOn() { + if (buildFinishedOnBuilder_ == null) { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } else { + return buildFinishedOnBuilder_.getMessage(); + } + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder setBuildFinishedOn(com.google.protobuf.Timestamp value) { + if (buildFinishedOnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + buildFinishedOn_ = value; + } else { + buildFinishedOnBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder setBuildFinishedOn( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (buildFinishedOnBuilder_ == null) { + buildFinishedOn_ = builderForValue.build(); + } else { + buildFinishedOnBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder mergeBuildFinishedOn(com.google.protobuf.Timestamp value) { + if (buildFinishedOnBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + buildFinishedOn_ != null && + buildFinishedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getBuildFinishedOnBuilder().mergeFrom(value); + } else { + buildFinishedOn_ = value; + } + } else { + buildFinishedOnBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder clearBuildFinishedOn() { + bitField0_ = (bitField0_ & ~0x00000004); + buildFinishedOn_ = null; + if (buildFinishedOnBuilder_ != null) { + buildFinishedOnBuilder_.dispose(); + buildFinishedOnBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public com.google.protobuf.Timestamp.Builder getBuildFinishedOnBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBuildFinishedOnFieldBuilder().getBuilder(); + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { + if (buildFinishedOnBuilder_ != null) { + return buildFinishedOnBuilder_.getMessageOrBuilder(); + } else { + return buildFinishedOn_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getBuildFinishedOnFieldBuilder() { + if (buildFinishedOnBuilder_ == null) { + buildFinishedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getBuildFinishedOn(), + getParentForChildren(), + isClean()); + buildFinishedOn_ = null; + } + return buildFinishedOnBuilder_; + } + + private io.grafeas.v1.Completeness completeness_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Completeness, io.grafeas.v1.Completeness.Builder, io.grafeas.v1.CompletenessOrBuilder> completenessBuilder_; + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + * @return Whether the completeness field is set. + */ + public boolean hasCompleteness() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + * @return The completeness. + */ + public io.grafeas.v1.Completeness getCompleteness() { + if (completenessBuilder_ == null) { + return completeness_ == null ? io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; + } else { + return completenessBuilder_.getMessage(); + } + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + public Builder setCompleteness(io.grafeas.v1.Completeness value) { + if (completenessBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + completeness_ = value; + } else { + completenessBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + public Builder setCompleteness( + io.grafeas.v1.Completeness.Builder builderForValue) { + if (completenessBuilder_ == null) { + completeness_ = builderForValue.build(); + } else { + completenessBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + public Builder mergeCompleteness(io.grafeas.v1.Completeness value) { + if (completenessBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + completeness_ != null && + completeness_ != io.grafeas.v1.Completeness.getDefaultInstance()) { + getCompletenessBuilder().mergeFrom(value); + } else { + completeness_ = value; + } + } else { + completenessBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + public Builder clearCompleteness() { + bitField0_ = (bitField0_ & ~0x00000008); + completeness_ = null; + if (completenessBuilder_ != null) { + completenessBuilder_.dispose(); + completenessBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + public io.grafeas.v1.Completeness.Builder getCompletenessBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCompletenessFieldBuilder().getBuilder(); + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + public io.grafeas.v1.CompletenessOrBuilder getCompletenessOrBuilder() { + if (completenessBuilder_ != null) { + return completenessBuilder_.getMessageOrBuilder(); + } else { + return completeness_ == null ? + io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; + } + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Completeness, io.grafeas.v1.Completeness.Builder, io.grafeas.v1.CompletenessOrBuilder> + getCompletenessFieldBuilder() { + if (completenessBuilder_ == null) { + completenessBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Completeness, io.grafeas.v1.Completeness.Builder, io.grafeas.v1.CompletenessOrBuilder>( + getCompleteness(), + getParentForChildren(), + isClean()); + completeness_ = null; + } + return completenessBuilder_; + } + + private boolean reproducible_ ; + /** + *
+     * If true, the builder claims that running the recipe on materials will
+     * produce bit-for-bit identical output.
+     * 
+ * + * bool reproducible = 5; + * @return The reproducible. + */ + @java.lang.Override + public boolean getReproducible() { + return reproducible_; + } + /** + *
+     * If true, the builder claims that running the recipe on materials will
+     * produce bit-for-bit identical output.
+     * 
+ * + * bool reproducible = 5; + * @param value The reproducible to set. + * @return This builder for chaining. + */ + public Builder setReproducible(boolean value) { + + reproducible_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * If true, the builder claims that running the recipe on materials will
+     * produce bit-for-bit identical output.
+     * 
+ * + * bool reproducible = 5; + * @return This builder for chaining. + */ + public Builder clearReproducible() { + bitField0_ = (bitField0_ & ~0x00000010); + reproducible_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Metadata) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Metadata) + private static final io.grafeas.v1.Metadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Metadata(); + } + + public static io.grafeas.v1.Metadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Metadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java new file mode 100644 index 000000000000..9999c1a7ef58 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java @@ -0,0 +1,128 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +public interface MetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Metadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Identifies the particular build invocation, which can be useful for finding
+   * associated logs or other ad-hoc analysis. The value SHOULD be globally
+   * unique, per in-toto Provenance spec.
+   * 
+ * + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + java.lang.String getBuildInvocationId(); + /** + *
+   * Identifies the particular build invocation, which can be useful for finding
+   * associated logs or other ad-hoc analysis. The value SHOULD be globally
+   * unique, per in-toto Provenance spec.
+   * 
+ * + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + com.google.protobuf.ByteString + getBuildInvocationIdBytes(); + + /** + *
+   * The timestamp of when the build started.
+   * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + boolean hasBuildStartedOn(); + /** + *
+   * The timestamp of when the build started.
+   * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + com.google.protobuf.Timestamp getBuildStartedOn(); + /** + *
+   * The timestamp of when the build started.
+   * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder(); + + /** + *
+   * The timestamp of when the build completed.
+   * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + boolean hasBuildFinishedOn(); + /** + *
+   * The timestamp of when the build completed.
+   * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + com.google.protobuf.Timestamp getBuildFinishedOn(); + /** + *
+   * The timestamp of when the build completed.
+   * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder(); + + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * .grafeas.v1.Completeness completeness = 4; + * @return Whether the completeness field is set. + */ + boolean hasCompleteness(); + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * .grafeas.v1.Completeness completeness = 4; + * @return The completeness. + */ + io.grafeas.v1.Completeness getCompleteness(); + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + io.grafeas.v1.CompletenessOrBuilder getCompletenessOrBuilder(); + + /** + *
+   * If true, the builder claims that running the recipe on materials will
+   * produce bit-for-bit identical output.
+   * 
+ * + * bool reproducible = 5; + * @return The reproducible. + */ + boolean getReproducible(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java new file mode 100644 index 000000000000..ec17bbcd5c76 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java @@ -0,0 +1,908 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +/** + *
+ * Details about files that caused a compliance check to fail.
+ * 
+ * + * Protobuf type {@code grafeas.v1.NonCompliantFile} + */ +public final class NonCompliantFile extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.NonCompliantFile) + NonCompliantFileOrBuilder { +private static final long serialVersionUID = 0L; + // Use NonCompliantFile.newBuilder() to construct. + private NonCompliantFile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NonCompliantFile() { + path_ = ""; + displayCommand_ = ""; + reason_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NonCompliantFile(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.NonCompliantFile.class, io.grafeas.v1.NonCompliantFile.Builder.class); + } + + public static final int PATH_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object path_ = ""; + /** + *
+   * Empty if `display_command` is set.
+   * 
+ * + * string path = 1; + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + *
+   * Empty if `display_command` is set.
+   * 
+ * + * string path = 1; + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_COMMAND_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object displayCommand_ = ""; + /** + *
+   * Command to display the non-compliant files.
+   * 
+ * + * string display_command = 2; + * @return The displayCommand. + */ + @java.lang.Override + public java.lang.String getDisplayCommand() { + java.lang.Object ref = displayCommand_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayCommand_ = s; + return s; + } + } + /** + *
+   * Command to display the non-compliant files.
+   * 
+ * + * string display_command = 2; + * @return The bytes for displayCommand. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayCommandBytes() { + java.lang.Object ref = displayCommand_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayCommand_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REASON_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object reason_ = ""; + /** + *
+   * Explains why a file is non compliant for a CIS check.
+   * 
+ * + * string reason = 3; + * @return The reason. + */ + @java.lang.Override + public java.lang.String getReason() { + java.lang.Object ref = reason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reason_ = s; + return s; + } + } + /** + *
+   * Explains why a file is non compliant for a CIS check.
+   * 
+ * + * string reason = 3; + * @return The bytes for reason. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReasonBytes() { + java.lang.Object ref = reason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + reason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayCommand_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayCommand_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, reason_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayCommand_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayCommand_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, reason_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.NonCompliantFile)) { + return super.equals(obj); + } + io.grafeas.v1.NonCompliantFile other = (io.grafeas.v1.NonCompliantFile) obj; + + if (!getPath() + .equals(other.getPath())) return false; + if (!getDisplayCommand() + .equals(other.getDisplayCommand())) return false; + if (!getReason() + .equals(other.getReason())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + DISPLAY_COMMAND_FIELD_NUMBER; + hash = (53 * hash) + getDisplayCommand().hashCode(); + hash = (37 * hash) + REASON_FIELD_NUMBER; + hash = (53 * hash) + getReason().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.NonCompliantFile parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.NonCompliantFile parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.NonCompliantFile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.NonCompliantFile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.NonCompliantFile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.NonCompliantFile parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.NonCompliantFile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.NonCompliantFile parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.NonCompliantFile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.NonCompliantFile parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.NonCompliantFile parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.NonCompliantFile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.NonCompliantFile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Details about files that caused a compliance check to fail.
+   * 
+ * + * Protobuf type {@code grafeas.v1.NonCompliantFile} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.NonCompliantFile) + io.grafeas.v1.NonCompliantFileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.NonCompliantFile.class, io.grafeas.v1.NonCompliantFile.Builder.class); + } + + // Construct using io.grafeas.v1.NonCompliantFile.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + path_ = ""; + displayCommand_ = ""; + reason_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.NonCompliantFile getDefaultInstanceForType() { + return io.grafeas.v1.NonCompliantFile.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.NonCompliantFile build() { + io.grafeas.v1.NonCompliantFile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.NonCompliantFile buildPartial() { + io.grafeas.v1.NonCompliantFile result = new io.grafeas.v1.NonCompliantFile(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.NonCompliantFile result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.path_ = path_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayCommand_ = displayCommand_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.reason_ = reason_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.NonCompliantFile) { + return mergeFrom((io.grafeas.v1.NonCompliantFile)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.NonCompliantFile other) { + if (other == io.grafeas.v1.NonCompliantFile.getDefaultInstance()) return this; + if (!other.getPath().isEmpty()) { + path_ = other.path_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayCommand().isEmpty()) { + displayCommand_ = other.displayCommand_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getReason().isEmpty()) { + reason_ = other.reason_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + displayCommand_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + reason_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object path_ = ""; + /** + *
+     * Empty if `display_command` is set.
+     * 
+ * + * string path = 1; + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Empty if `display_command` is set.
+     * 
+ * + * string path = 1; + * @return The bytes for path. + */ + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Empty if `display_command` is set.
+     * 
+ * + * string path = 1; + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + path_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Empty if `display_command` is set.
+     * 
+ * + * string path = 1; + * @return This builder for chaining. + */ + public Builder clearPath() { + path_ = getDefaultInstance().getPath(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Empty if `display_command` is set.
+     * 
+ * + * string path = 1; + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + path_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayCommand_ = ""; + /** + *
+     * Command to display the non-compliant files.
+     * 
+ * + * string display_command = 2; + * @return The displayCommand. + */ + public java.lang.String getDisplayCommand() { + java.lang.Object ref = displayCommand_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayCommand_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Command to display the non-compliant files.
+     * 
+ * + * string display_command = 2; + * @return The bytes for displayCommand. + */ + public com.google.protobuf.ByteString + getDisplayCommandBytes() { + java.lang.Object ref = displayCommand_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayCommand_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Command to display the non-compliant files.
+     * 
+ * + * string display_command = 2; + * @param value The displayCommand to set. + * @return This builder for chaining. + */ + public Builder setDisplayCommand( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayCommand_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Command to display the non-compliant files.
+     * 
+ * + * string display_command = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayCommand() { + displayCommand_ = getDefaultInstance().getDisplayCommand(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Command to display the non-compliant files.
+     * 
+ * + * string display_command = 2; + * @param value The bytes for displayCommand to set. + * @return This builder for chaining. + */ + public Builder setDisplayCommandBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayCommand_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object reason_ = ""; + /** + *
+     * Explains why a file is non compliant for a CIS check.
+     * 
+ * + * string reason = 3; + * @return The reason. + */ + public java.lang.String getReason() { + java.lang.Object ref = reason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Explains why a file is non compliant for a CIS check.
+     * 
+ * + * string reason = 3; + * @return The bytes for reason. + */ + public com.google.protobuf.ByteString + getReasonBytes() { + java.lang.Object ref = reason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + reason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Explains why a file is non compliant for a CIS check.
+     * 
+ * + * string reason = 3; + * @param value The reason to set. + * @return This builder for chaining. + */ + public Builder setReason( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + reason_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Explains why a file is non compliant for a CIS check.
+     * 
+ * + * string reason = 3; + * @return This builder for chaining. + */ + public Builder clearReason() { + reason_ = getDefaultInstance().getReason(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Explains why a file is non compliant for a CIS check.
+     * 
+ * + * string reason = 3; + * @param value The bytes for reason to set. + * @return This builder for chaining. + */ + public Builder setReasonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + reason_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.NonCompliantFile) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.NonCompliantFile) + private static final io.grafeas.v1.NonCompliantFile DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.NonCompliantFile(); + } + + public static io.grafeas.v1.NonCompliantFile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NonCompliantFile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.NonCompliantFile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java new file mode 100644 index 000000000000..fece8f7338c1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +public interface NonCompliantFileOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.NonCompliantFile) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Empty if `display_command` is set.
+   * 
+ * + * string path = 1; + * @return The path. + */ + java.lang.String getPath(); + /** + *
+   * Empty if `display_command` is set.
+   * 
+ * + * string path = 1; + * @return The bytes for path. + */ + com.google.protobuf.ByteString + getPathBytes(); + + /** + *
+   * Command to display the non-compliant files.
+   * 
+ * + * string display_command = 2; + * @return The displayCommand. + */ + java.lang.String getDisplayCommand(); + /** + *
+   * Command to display the non-compliant files.
+   * 
+ * + * string display_command = 2; + * @return The bytes for displayCommand. + */ + com.google.protobuf.ByteString + getDisplayCommandBytes(); + + /** + *
+   * Explains why a file is non compliant for a CIS check.
+   * 
+ * + * string reason = 3; + * @return The reason. + */ + java.lang.String getReason(); + /** + *
+   * Explains why a file is non compliant for a CIS check.
+   * 
+ * + * string reason = 3; + * @return The bytes for reason. + */ + com.google.protobuf.ByteString + getReasonBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java new file mode 100644 index 000000000000..88e76d9b461e --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java @@ -0,0 +1,5068 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * A type of analysis that can be done for a resource.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Note} + */ +public final class Note extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Note) + NoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use Note.newBuilder() to construct. + private Note(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Note() { + name_ = ""; + shortDescription_ = ""; + longDescription_ = ""; + kind_ = 0; + relatedUrl_ = java.util.Collections.emptyList(); + relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Note(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Note.class, io.grafeas.v1.Note.Builder.class); + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VULNERABILITY(10), + BUILD(11), + IMAGE(12), + PACKAGE(13), + DEPLOYMENT(14), + DISCOVERY(15), + ATTESTATION(16), + UPGRADE(17), + COMPLIANCE(18), + DSSE_ATTESTATION(19), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 10: return VULNERABILITY; + case 11: return BUILD; + case 12: return IMAGE; + case 13: return PACKAGE; + case 14: return DEPLOYMENT; + case 15: return DISCOVERY; + case 16: return ATTESTATION; + case 17: return UPGRADE; + case 18: return COMPLIANCE; + case 19: return DSSE_ATTESTATION; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Output only. The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Output only. The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object shortDescription_ = ""; + /** + *
+   * A one sentence description of this note.
+   * 
+ * + * string short_description = 2; + * @return The shortDescription. + */ + @java.lang.Override + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } + } + /** + *
+   * A one sentence description of this note.
+   * 
+ * + * string short_description = 2; + * @return The bytes for shortDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LONG_DESCRIPTION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object longDescription_ = ""; + /** + *
+   * A detailed description of this note.
+   * 
+ * + * string long_description = 3; + * @return The longDescription. + */ + @java.lang.Override + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } + } + /** + *
+   * A detailed description of this note.
+   * 
+ * + * string long_description = 3; + * @return The bytes for longDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KIND_FIELD_NUMBER = 4; + private int kind_ = 0; + /** + *
+   * Output only. The type of analysis. This field can be used as a filter in
+   * list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+   * Output only. The type of analysis. This field can be used as a filter in
+   * list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The kind. + */ + @java.lang.Override public io.grafeas.v1.NoteKind getKind() { + io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); + return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; + } + + public static final int RELATED_URL_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List relatedUrl_; + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + @java.lang.Override + public java.util.List getRelatedUrlList() { + return relatedUrl_; + } + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + @java.lang.Override + public java.util.List + getRelatedUrlOrBuilderList() { + return relatedUrl_; + } + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + @java.lang.Override + public int getRelatedUrlCount() { + return relatedUrl_.size(); + } + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrl getRelatedUrl(int index) { + return relatedUrl_.get(index); + } + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlOrBuilder( + int index) { + return relatedUrl_.get(index); + } + + public static final int EXPIRATION_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp expirationTime_; + /** + *
+   * Time of expiration for this note. Empty if note does not expire.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + * @return Whether the expirationTime field is set. + */ + @java.lang.Override + public boolean hasExpirationTime() { + return expirationTime_ != null; + } + /** + *
+   * Time of expiration for this note. Empty if note does not expire.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + * @return The expirationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpirationTime() { + return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; + } + /** + *
+   * Time of expiration for this note. Empty if note does not expire.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time this note was created. This field can be used as a
+   * filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time this note was created. This field can be used as a
+   * filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time this note was created. This field can be used as a
+   * filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The time this note was last updated. This field can be used as
+   * a filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The time this note was last updated. This field can be used as
+   * a filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The time this note was last updated. This field can be used as
+   * a filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int RELATED_NOTE_NAMES_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList relatedNoteNames_; + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @return A list containing the relatedNoteNames. + */ + public com.google.protobuf.ProtocolStringList + getRelatedNoteNamesList() { + return relatedNoteNames_; + } + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @return The count of relatedNoteNames. + */ + public int getRelatedNoteNamesCount() { + return relatedNoteNames_.size(); + } + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @param index The index of the element to return. + * @return The relatedNoteNames at the given index. + */ + public java.lang.String getRelatedNoteNames(int index) { + return relatedNoteNames_.get(index); + } + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @param index The index of the value to return. + * @return The bytes of the relatedNoteNames at the given index. + */ + public com.google.protobuf.ByteString + getRelatedNoteNamesBytes(int index) { + return relatedNoteNames_.getByteString(index); + } + + public static final int VULNERABILITY_FIELD_NUMBER = 10; + /** + *
+   * A note describing a package vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + * @return Whether the vulnerability field is set. + */ + @java.lang.Override + public boolean hasVulnerability() { + return typeCase_ == 10; + } + /** + *
+   * A note describing a package vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + * @return The vulnerability. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote getVulnerability() { + if (typeCase_ == 10) { + return (io.grafeas.v1.VulnerabilityNote) type_; + } + return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); + } + /** + *
+   * A note describing a package vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNoteOrBuilder getVulnerabilityOrBuilder() { + if (typeCase_ == 10) { + return (io.grafeas.v1.VulnerabilityNote) type_; + } + return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); + } + + public static final int BUILD_FIELD_NUMBER = 11; + /** + *
+   * A note describing build provenance for a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildNote build = 11; + * @return Whether the build field is set. + */ + @java.lang.Override + public boolean hasBuild() { + return typeCase_ == 11; + } + /** + *
+   * A note describing build provenance for a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildNote build = 11; + * @return The build. + */ + @java.lang.Override + public io.grafeas.v1.BuildNote getBuild() { + if (typeCase_ == 11) { + return (io.grafeas.v1.BuildNote) type_; + } + return io.grafeas.v1.BuildNote.getDefaultInstance(); + } + /** + *
+   * A note describing build provenance for a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + @java.lang.Override + public io.grafeas.v1.BuildNoteOrBuilder getBuildOrBuilder() { + if (typeCase_ == 11) { + return (io.grafeas.v1.BuildNote) type_; + } + return io.grafeas.v1.BuildNote.getDefaultInstance(); + } + + public static final int IMAGE_FIELD_NUMBER = 12; + /** + *
+   * A note describing a base image.
+   * 
+ * + * .grafeas.v1.ImageNote image = 12; + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return typeCase_ == 12; + } + /** + *
+   * A note describing a base image.
+   * 
+ * + * .grafeas.v1.ImageNote image = 12; + * @return The image. + */ + @java.lang.Override + public io.grafeas.v1.ImageNote getImage() { + if (typeCase_ == 12) { + return (io.grafeas.v1.ImageNote) type_; + } + return io.grafeas.v1.ImageNote.getDefaultInstance(); + } + /** + *
+   * A note describing a base image.
+   * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + @java.lang.Override + public io.grafeas.v1.ImageNoteOrBuilder getImageOrBuilder() { + if (typeCase_ == 12) { + return (io.grafeas.v1.ImageNote) type_; + } + return io.grafeas.v1.ImageNote.getDefaultInstance(); + } + + public static final int PACKAGE_FIELD_NUMBER = 13; + /** + *
+   * A note describing a package hosted by various package managers.
+   * 
+ * + * .grafeas.v1.PackageNote package = 13; + * @return Whether the package field is set. + */ + @java.lang.Override + public boolean hasPackage() { + return typeCase_ == 13; + } + /** + *
+   * A note describing a package hosted by various package managers.
+   * 
+ * + * .grafeas.v1.PackageNote package = 13; + * @return The package. + */ + @java.lang.Override + public io.grafeas.v1.PackageNote getPackage() { + if (typeCase_ == 13) { + return (io.grafeas.v1.PackageNote) type_; + } + return io.grafeas.v1.PackageNote.getDefaultInstance(); + } + /** + *
+   * A note describing a package hosted by various package managers.
+   * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + @java.lang.Override + public io.grafeas.v1.PackageNoteOrBuilder getPackageOrBuilder() { + if (typeCase_ == 13) { + return (io.grafeas.v1.PackageNote) type_; + } + return io.grafeas.v1.PackageNote.getDefaultInstance(); + } + + public static final int DEPLOYMENT_FIELD_NUMBER = 14; + /** + *
+   * A note describing something that can be deployed.
+   * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + * @return Whether the deployment field is set. + */ + @java.lang.Override + public boolean hasDeployment() { + return typeCase_ == 14; + } + /** + *
+   * A note describing something that can be deployed.
+   * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + * @return The deployment. + */ + @java.lang.Override + public io.grafeas.v1.DeploymentNote getDeployment() { + if (typeCase_ == 14) { + return (io.grafeas.v1.DeploymentNote) type_; + } + return io.grafeas.v1.DeploymentNote.getDefaultInstance(); + } + /** + *
+   * A note describing something that can be deployed.
+   * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + @java.lang.Override + public io.grafeas.v1.DeploymentNoteOrBuilder getDeploymentOrBuilder() { + if (typeCase_ == 14) { + return (io.grafeas.v1.DeploymentNote) type_; + } + return io.grafeas.v1.DeploymentNote.getDefaultInstance(); + } + + public static final int DISCOVERY_FIELD_NUMBER = 15; + /** + *
+   * A note describing the initial analysis of a resource.
+   * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + * @return Whether the discovery field is set. + */ + @java.lang.Override + public boolean hasDiscovery() { + return typeCase_ == 15; + } + /** + *
+   * A note describing the initial analysis of a resource.
+   * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + * @return The discovery. + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryNote getDiscovery() { + if (typeCase_ == 15) { + return (io.grafeas.v1.DiscoveryNote) type_; + } + return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); + } + /** + *
+   * A note describing the initial analysis of a resource.
+   * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryNoteOrBuilder getDiscoveryOrBuilder() { + if (typeCase_ == 15) { + return (io.grafeas.v1.DiscoveryNote) type_; + } + return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); + } + + public static final int ATTESTATION_FIELD_NUMBER = 16; + /** + *
+   * A note describing an attestation role.
+   * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + * @return Whether the attestation field is set. + */ + @java.lang.Override + public boolean hasAttestation() { + return typeCase_ == 16; + } + /** + *
+   * A note describing an attestation role.
+   * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + * @return The attestation. + */ + @java.lang.Override + public io.grafeas.v1.AttestationNote getAttestation() { + if (typeCase_ == 16) { + return (io.grafeas.v1.AttestationNote) type_; + } + return io.grafeas.v1.AttestationNote.getDefaultInstance(); + } + /** + *
+   * A note describing an attestation role.
+   * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + @java.lang.Override + public io.grafeas.v1.AttestationNoteOrBuilder getAttestationOrBuilder() { + if (typeCase_ == 16) { + return (io.grafeas.v1.AttestationNote) type_; + } + return io.grafeas.v1.AttestationNote.getDefaultInstance(); + } + + public static final int UPGRADE_FIELD_NUMBER = 17; + /** + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * @return Whether the upgrade field is set. + */ + @java.lang.Override + public boolean hasUpgrade() { + return typeCase_ == 17; + } + /** + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * @return The upgrade. + */ + @java.lang.Override + public io.grafeas.v1.UpgradeNote getUpgrade() { + if (typeCase_ == 17) { + return (io.grafeas.v1.UpgradeNote) type_; + } + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + /** + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + @java.lang.Override + public io.grafeas.v1.UpgradeNoteOrBuilder getUpgradeOrBuilder() { + if (typeCase_ == 17) { + return (io.grafeas.v1.UpgradeNote) type_; + } + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + + public static final int COMPLIANCE_FIELD_NUMBER = 18; + /** + *
+   * A note describing a compliance check.
+   * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + * @return Whether the compliance field is set. + */ + @java.lang.Override + public boolean hasCompliance() { + return typeCase_ == 18; + } + /** + *
+   * A note describing a compliance check.
+   * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + * @return The compliance. + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNote getCompliance() { + if (typeCase_ == 18) { + return (io.grafeas.v1.ComplianceNote) type_; + } + return io.grafeas.v1.ComplianceNote.getDefaultInstance(); + } + /** + *
+   * A note describing a compliance check.
+   * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNoteOrBuilder getComplianceOrBuilder() { + if (typeCase_ == 18) { + return (io.grafeas.v1.ComplianceNote) type_; + } + return io.grafeas.v1.ComplianceNote.getDefaultInstance(); + } + + public static final int DSSE_ATTESTATION_FIELD_NUMBER = 19; + /** + *
+   * A note describing a dsse attestation note.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + * @return Whether the dsseAttestation field is set. + */ + @java.lang.Override + public boolean hasDsseAttestation() { + return typeCase_ == 19; + } + /** + *
+   * A note describing a dsse attestation note.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + * @return The dsseAttestation. + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote getDsseAttestation() { + if (typeCase_ == 19) { + return (io.grafeas.v1.DSSEAttestationNote) type_; + } + return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); + } + /** + *
+   * A note describing a dsse attestation note.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder() { + if (typeCase_ == 19) { + return (io.grafeas.v1.DSSEAttestationNote) type_; + } + return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, longDescription_); + } + if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(4, kind_); + } + for (int i = 0; i < relatedUrl_.size(); i++) { + output.writeMessage(5, relatedUrl_.get(i)); + } + if (expirationTime_ != null) { + output.writeMessage(6, getExpirationTime()); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(8, getUpdateTime()); + } + for (int i = 0; i < relatedNoteNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, relatedNoteNames_.getRaw(i)); + } + if (typeCase_ == 10) { + output.writeMessage(10, (io.grafeas.v1.VulnerabilityNote) type_); + } + if (typeCase_ == 11) { + output.writeMessage(11, (io.grafeas.v1.BuildNote) type_); + } + if (typeCase_ == 12) { + output.writeMessage(12, (io.grafeas.v1.ImageNote) type_); + } + if (typeCase_ == 13) { + output.writeMessage(13, (io.grafeas.v1.PackageNote) type_); + } + if (typeCase_ == 14) { + output.writeMessage(14, (io.grafeas.v1.DeploymentNote) type_); + } + if (typeCase_ == 15) { + output.writeMessage(15, (io.grafeas.v1.DiscoveryNote) type_); + } + if (typeCase_ == 16) { + output.writeMessage(16, (io.grafeas.v1.AttestationNote) type_); + } + if (typeCase_ == 17) { + output.writeMessage(17, (io.grafeas.v1.UpgradeNote) type_); + } + if (typeCase_ == 18) { + output.writeMessage(18, (io.grafeas.v1.ComplianceNote) type_); + } + if (typeCase_ == 19) { + output.writeMessage(19, (io.grafeas.v1.DSSEAttestationNote) type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, longDescription_); + } + if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, kind_); + } + for (int i = 0; i < relatedUrl_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, relatedUrl_.get(i)); + } + if (expirationTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getExpirationTime()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getUpdateTime()); + } + { + int dataSize = 0; + for (int i = 0; i < relatedNoteNames_.size(); i++) { + dataSize += computeStringSizeNoTag(relatedNoteNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelatedNoteNamesList().size(); + } + if (typeCase_ == 10) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, (io.grafeas.v1.VulnerabilityNote) type_); + } + if (typeCase_ == 11) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, (io.grafeas.v1.BuildNote) type_); + } + if (typeCase_ == 12) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, (io.grafeas.v1.ImageNote) type_); + } + if (typeCase_ == 13) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, (io.grafeas.v1.PackageNote) type_); + } + if (typeCase_ == 14) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, (io.grafeas.v1.DeploymentNote) type_); + } + if (typeCase_ == 15) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, (io.grafeas.v1.DiscoveryNote) type_); + } + if (typeCase_ == 16) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, (io.grafeas.v1.AttestationNote) type_); + } + if (typeCase_ == 17) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, (io.grafeas.v1.UpgradeNote) type_); + } + if (typeCase_ == 18) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, (io.grafeas.v1.ComplianceNote) type_); + } + if (typeCase_ == 19) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, (io.grafeas.v1.DSSEAttestationNote) type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Note)) { + return super.equals(obj); + } + io.grafeas.v1.Note other = (io.grafeas.v1.Note) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getShortDescription() + .equals(other.getShortDescription())) return false; + if (!getLongDescription() + .equals(other.getLongDescription())) return false; + if (kind_ != other.kind_) return false; + if (!getRelatedUrlList() + .equals(other.getRelatedUrlList())) return false; + if (hasExpirationTime() != other.hasExpirationTime()) return false; + if (hasExpirationTime()) { + if (!getExpirationTime() + .equals(other.getExpirationTime())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!getRelatedNoteNamesList() + .equals(other.getRelatedNoteNamesList())) return false; + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 10: + if (!getVulnerability() + .equals(other.getVulnerability())) return false; + break; + case 11: + if (!getBuild() + .equals(other.getBuild())) return false; + break; + case 12: + if (!getImage() + .equals(other.getImage())) return false; + break; + case 13: + if (!getPackage() + .equals(other.getPackage())) return false; + break; + case 14: + if (!getDeployment() + .equals(other.getDeployment())) return false; + break; + case 15: + if (!getDiscovery() + .equals(other.getDiscovery())) return false; + break; + case 16: + if (!getAttestation() + .equals(other.getAttestation())) return false; + break; + case 17: + if (!getUpgrade() + .equals(other.getUpgrade())) return false; + break; + case 18: + if (!getCompliance() + .equals(other.getCompliance())) return false; + break; + case 19: + if (!getDsseAttestation() + .equals(other.getDsseAttestation())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SHORT_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getShortDescription().hashCode(); + hash = (37 * hash) + LONG_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getLongDescription().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + kind_; + if (getRelatedUrlCount() > 0) { + hash = (37 * hash) + RELATED_URL_FIELD_NUMBER; + hash = (53 * hash) + getRelatedUrlList().hashCode(); + } + if (hasExpirationTime()) { + hash = (37 * hash) + EXPIRATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpirationTime().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (getRelatedNoteNamesCount() > 0) { + hash = (37 * hash) + RELATED_NOTE_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getRelatedNoteNamesList().hashCode(); + } + switch (typeCase_) { + case 10: + hash = (37 * hash) + VULNERABILITY_FIELD_NUMBER; + hash = (53 * hash) + getVulnerability().hashCode(); + break; + case 11: + hash = (37 * hash) + BUILD_FIELD_NUMBER; + hash = (53 * hash) + getBuild().hashCode(); + break; + case 12: + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + break; + case 13: + hash = (37 * hash) + PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPackage().hashCode(); + break; + case 14: + hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getDeployment().hashCode(); + break; + case 15: + hash = (37 * hash) + DISCOVERY_FIELD_NUMBER; + hash = (53 * hash) + getDiscovery().hashCode(); + break; + case 16: + hash = (37 * hash) + ATTESTATION_FIELD_NUMBER; + hash = (53 * hash) + getAttestation().hashCode(); + break; + case 17: + hash = (37 * hash) + UPGRADE_FIELD_NUMBER; + hash = (53 * hash) + getUpgrade().hashCode(); + break; + case 18: + hash = (37 * hash) + COMPLIANCE_FIELD_NUMBER; + hash = (53 * hash) + getCompliance().hashCode(); + break; + case 19: + hash = (37 * hash) + DSSE_ATTESTATION_FIELD_NUMBER; + hash = (53 * hash) + getDsseAttestation().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Note parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Note parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Note parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Note parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Note parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Note parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Note parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Note parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Note parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Note parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Note parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Note parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Note prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A type of analysis that can be done for a resource.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Note} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Note) + io.grafeas.v1.NoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Note.class, io.grafeas.v1.Note.Builder.class); + } + + // Construct using io.grafeas.v1.Note.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + shortDescription_ = ""; + longDescription_ = ""; + kind_ = 0; + if (relatedUrlBuilder_ == null) { + relatedUrl_ = java.util.Collections.emptyList(); + } else { + relatedUrl_ = null; + relatedUrlBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + expirationTime_ = null; + if (expirationTimeBuilder_ != null) { + expirationTimeBuilder_.dispose(); + expirationTimeBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000100); + if (vulnerabilityBuilder_ != null) { + vulnerabilityBuilder_.clear(); + } + if (buildBuilder_ != null) { + buildBuilder_.clear(); + } + if (imageBuilder_ != null) { + imageBuilder_.clear(); + } + if (packageBuilder_ != null) { + packageBuilder_.clear(); + } + if (deploymentBuilder_ != null) { + deploymentBuilder_.clear(); + } + if (discoveryBuilder_ != null) { + discoveryBuilder_.clear(); + } + if (attestationBuilder_ != null) { + attestationBuilder_.clear(); + } + if (upgradeBuilder_ != null) { + upgradeBuilder_.clear(); + } + if (complianceBuilder_ != null) { + complianceBuilder_.clear(); + } + if (dsseAttestationBuilder_ != null) { + dsseAttestationBuilder_.clear(); + } + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Note getDefaultInstanceForType() { + return io.grafeas.v1.Note.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Note build() { + io.grafeas.v1.Note result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Note buildPartial() { + io.grafeas.v1.Note result = new io.grafeas.v1.Note(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.Note result) { + if (relatedUrlBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + relatedUrl_ = java.util.Collections.unmodifiableList(relatedUrl_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.relatedUrl_ = relatedUrl_; + } else { + result.relatedUrl_ = relatedUrlBuilder_.build(); + } + if (((bitField0_ & 0x00000100) != 0)) { + relatedNoteNames_ = relatedNoteNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.relatedNoteNames_ = relatedNoteNames_; + } + + private void buildPartial0(io.grafeas.v1.Note result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.shortDescription_ = shortDescription_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.longDescription_ = longDescription_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.expirationTime_ = expirationTimeBuilder_ == null + ? expirationTime_ + : expirationTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + } + } + + private void buildPartialOneofs(io.grafeas.v1.Note result) { + result.typeCase_ = typeCase_; + result.type_ = this.type_; + if (typeCase_ == 10 && + vulnerabilityBuilder_ != null) { + result.type_ = vulnerabilityBuilder_.build(); + } + if (typeCase_ == 11 && + buildBuilder_ != null) { + result.type_ = buildBuilder_.build(); + } + if (typeCase_ == 12 && + imageBuilder_ != null) { + result.type_ = imageBuilder_.build(); + } + if (typeCase_ == 13 && + packageBuilder_ != null) { + result.type_ = packageBuilder_.build(); + } + if (typeCase_ == 14 && + deploymentBuilder_ != null) { + result.type_ = deploymentBuilder_.build(); + } + if (typeCase_ == 15 && + discoveryBuilder_ != null) { + result.type_ = discoveryBuilder_.build(); + } + if (typeCase_ == 16 && + attestationBuilder_ != null) { + result.type_ = attestationBuilder_.build(); + } + if (typeCase_ == 17 && + upgradeBuilder_ != null) { + result.type_ = upgradeBuilder_.build(); + } + if (typeCase_ == 18 && + complianceBuilder_ != null) { + result.type_ = complianceBuilder_.build(); + } + if (typeCase_ == 19 && + dsseAttestationBuilder_ != null) { + result.type_ = dsseAttestationBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Note) { + return mergeFrom((io.grafeas.v1.Note)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Note other) { + if (other == io.grafeas.v1.Note.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getShortDescription().isEmpty()) { + shortDescription_ = other.shortDescription_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getLongDescription().isEmpty()) { + longDescription_ = other.longDescription_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.kind_ != 0) { + setKindValue(other.getKindValue()); + } + if (relatedUrlBuilder_ == null) { + if (!other.relatedUrl_.isEmpty()) { + if (relatedUrl_.isEmpty()) { + relatedUrl_ = other.relatedUrl_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureRelatedUrlIsMutable(); + relatedUrl_.addAll(other.relatedUrl_); + } + onChanged(); + } + } else { + if (!other.relatedUrl_.isEmpty()) { + if (relatedUrlBuilder_.isEmpty()) { + relatedUrlBuilder_.dispose(); + relatedUrlBuilder_ = null; + relatedUrl_ = other.relatedUrl_; + bitField0_ = (bitField0_ & ~0x00000010); + relatedUrlBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRelatedUrlFieldBuilder() : null; + } else { + relatedUrlBuilder_.addAllMessages(other.relatedUrl_); + } + } + } + if (other.hasExpirationTime()) { + mergeExpirationTime(other.getExpirationTime()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.relatedNoteNames_.isEmpty()) { + if (relatedNoteNames_.isEmpty()) { + relatedNoteNames_ = other.relatedNoteNames_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureRelatedNoteNamesIsMutable(); + relatedNoteNames_.addAll(other.relatedNoteNames_); + } + onChanged(); + } + switch (other.getTypeCase()) { + case VULNERABILITY: { + mergeVulnerability(other.getVulnerability()); + break; + } + case BUILD: { + mergeBuild(other.getBuild()); + break; + } + case IMAGE: { + mergeImage(other.getImage()); + break; + } + case PACKAGE: { + mergePackage(other.getPackage()); + break; + } + case DEPLOYMENT: { + mergeDeployment(other.getDeployment()); + break; + } + case DISCOVERY: { + mergeDiscovery(other.getDiscovery()); + break; + } + case ATTESTATION: { + mergeAttestation(other.getAttestation()); + break; + } + case UPGRADE: { + mergeUpgrade(other.getUpgrade()); + break; + } + case COMPLIANCE: { + mergeCompliance(other.getCompliance()); + break; + } + case DSSE_ATTESTATION: { + mergeDsseAttestation(other.getDsseAttestation()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + shortDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + longDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + kind_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + io.grafeas.v1.RelatedUrl m = + input.readMessage( + io.grafeas.v1.RelatedUrl.parser(), + extensionRegistry); + if (relatedUrlBuilder_ == null) { + ensureRelatedUrlIsMutable(); + relatedUrl_.add(m); + } else { + relatedUrlBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: { + input.readMessage( + getExpirationTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + ensureRelatedNoteNamesIsMutable(); + relatedNoteNames_.add(s); + break; + } // case 74 + case 82: { + input.readMessage( + getVulnerabilityFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 10; + break; + } // case 82 + case 90: { + input.readMessage( + getBuildFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 11; + break; + } // case 90 + case 98: { + input.readMessage( + getImageFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 12; + break; + } // case 98 + case 106: { + input.readMessage( + getPackageFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 13; + break; + } // case 106 + case 114: { + input.readMessage( + getDeploymentFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 14; + break; + } // case 114 + case 122: { + input.readMessage( + getDiscoveryFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 15; + break; + } // case 122 + case 130: { + input.readMessage( + getAttestationFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 16; + break; + } // case 130 + case 138: { + input.readMessage( + getUpgradeFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 17; + break; + } // case 138 + case 146: { + input.readMessage( + getComplianceFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 18; + break; + } // case 146 + case 154: { + input.readMessage( + getDsseAttestationFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 19; + break; + } // case 154 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Output only. The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Output only. The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object shortDescription_ = ""; + /** + *
+     * A one sentence description of this note.
+     * 
+ * + * string short_description = 2; + * @return The shortDescription. + */ + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A one sentence description of this note.
+     * 
+ * + * string short_description = 2; + * @return The bytes for shortDescription. + */ + public com.google.protobuf.ByteString + getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A one sentence description of this note.
+     * 
+ * + * string short_description = 2; + * @param value The shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + shortDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A one sentence description of this note.
+     * 
+ * + * string short_description = 2; + * @return This builder for chaining. + */ + public Builder clearShortDescription() { + shortDescription_ = getDefaultInstance().getShortDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A one sentence description of this note.
+     * 
+ * + * string short_description = 2; + * @param value The bytes for shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + shortDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object longDescription_ = ""; + /** + *
+     * A detailed description of this note.
+     * 
+ * + * string long_description = 3; + * @return The longDescription. + */ + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A detailed description of this note.
+     * 
+ * + * string long_description = 3; + * @return The bytes for longDescription. + */ + public com.google.protobuf.ByteString + getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A detailed description of this note.
+     * 
+ * + * string long_description = 3; + * @param value The longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + longDescription_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * A detailed description of this note.
+     * 
+ * + * string long_description = 3; + * @return This builder for chaining. + */ + public Builder clearLongDescription() { + longDescription_ = getDefaultInstance().getLongDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * A detailed description of this note.
+     * 
+ * + * string long_description = 3; + * @param value The bytes for longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + longDescription_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int kind_ = 0; + /** + *
+     * Output only. The type of analysis. This field can be used as a filter in
+     * list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+     * Output only. The type of analysis. This field can be used as a filter in
+     * list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @param value The enum numeric value on the wire for kind to set. + * @return This builder for chaining. + */ + public Builder setKindValue(int value) { + kind_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The type of analysis. This field can be used as a filter in
+     * list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The kind. + */ + @java.lang.Override + public io.grafeas.v1.NoteKind getKind() { + io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); + return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The type of analysis. This field can be used as a filter in
+     * list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(io.grafeas.v1.NoteKind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The type of analysis. This field can be used as a filter in
+     * list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return This builder for chaining. + */ + public Builder clearKind() { + bitField0_ = (bitField0_ & ~0x00000008); + kind_ = 0; + onChanged(); + return this; + } + + private java.util.List relatedUrl_ = + java.util.Collections.emptyList(); + private void ensureRelatedUrlIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + relatedUrl_ = new java.util.ArrayList(relatedUrl_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> relatedUrlBuilder_; + + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public java.util.List getRelatedUrlList() { + if (relatedUrlBuilder_ == null) { + return java.util.Collections.unmodifiableList(relatedUrl_); + } else { + return relatedUrlBuilder_.getMessageList(); + } + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public int getRelatedUrlCount() { + if (relatedUrlBuilder_ == null) { + return relatedUrl_.size(); + } else { + return relatedUrlBuilder_.getCount(); + } + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public io.grafeas.v1.RelatedUrl getRelatedUrl(int index) { + if (relatedUrlBuilder_ == null) { + return relatedUrl_.get(index); + } else { + return relatedUrlBuilder_.getMessage(index); + } + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder setRelatedUrl( + int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrlIsMutable(); + relatedUrl_.set(index, value); + onChanged(); + } else { + relatedUrlBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder setRelatedUrl( + int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrlBuilder_ == null) { + ensureRelatedUrlIsMutable(); + relatedUrl_.set(index, builderForValue.build()); + onChanged(); + } else { + relatedUrlBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder addRelatedUrl(io.grafeas.v1.RelatedUrl value) { + if (relatedUrlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrlIsMutable(); + relatedUrl_.add(value); + onChanged(); + } else { + relatedUrlBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder addRelatedUrl( + int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrlIsMutable(); + relatedUrl_.add(index, value); + onChanged(); + } else { + relatedUrlBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder addRelatedUrl( + io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrlBuilder_ == null) { + ensureRelatedUrlIsMutable(); + relatedUrl_.add(builderForValue.build()); + onChanged(); + } else { + relatedUrlBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder addRelatedUrl( + int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrlBuilder_ == null) { + ensureRelatedUrlIsMutable(); + relatedUrl_.add(index, builderForValue.build()); + onChanged(); + } else { + relatedUrlBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder addAllRelatedUrl( + java.lang.Iterable values) { + if (relatedUrlBuilder_ == null) { + ensureRelatedUrlIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relatedUrl_); + onChanged(); + } else { + relatedUrlBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder clearRelatedUrl() { + if (relatedUrlBuilder_ == null) { + relatedUrl_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + relatedUrlBuilder_.clear(); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder removeRelatedUrl(int index) { + if (relatedUrlBuilder_ == null) { + ensureRelatedUrlIsMutable(); + relatedUrl_.remove(index); + onChanged(); + } else { + relatedUrlBuilder_.remove(index); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public io.grafeas.v1.RelatedUrl.Builder getRelatedUrlBuilder( + int index) { + return getRelatedUrlFieldBuilder().getBuilder(index); + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlOrBuilder( + int index) { + if (relatedUrlBuilder_ == null) { + return relatedUrl_.get(index); } else { + return relatedUrlBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public java.util.List + getRelatedUrlOrBuilderList() { + if (relatedUrlBuilder_ != null) { + return relatedUrlBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relatedUrl_); + } + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlBuilder() { + return getRelatedUrlFieldBuilder().addBuilder( + io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlBuilder( + int index) { + return getRelatedUrlFieldBuilder().addBuilder( + index, io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public java.util.List + getRelatedUrlBuilderList() { + return getRelatedUrlFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> + getRelatedUrlFieldBuilder() { + if (relatedUrlBuilder_ == null) { + relatedUrlBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder>( + relatedUrl_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + relatedUrl_ = null; + } + return relatedUrlBuilder_; + } + + private com.google.protobuf.Timestamp expirationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expirationTimeBuilder_; + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + * @return Whether the expirationTime field is set. + */ + public boolean hasExpirationTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + * @return The expirationTime. + */ + public com.google.protobuf.Timestamp getExpirationTime() { + if (expirationTimeBuilder_ == null) { + return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; + } else { + return expirationTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + public Builder setExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expirationTime_ = value; + } else { + expirationTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + public Builder setExpirationTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (expirationTimeBuilder_ == null) { + expirationTime_ = builderForValue.build(); + } else { + expirationTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + public Builder mergeExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + expirationTime_ != null && + expirationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpirationTimeBuilder().mergeFrom(value); + } else { + expirationTime_ = value; + } + } else { + expirationTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + public Builder clearExpirationTime() { + bitField0_ = (bitField0_ & ~0x00000020); + expirationTime_ = null; + if (expirationTimeBuilder_ != null) { + expirationTimeBuilder_.dispose(); + expirationTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getExpirationTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getExpirationTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + if (expirationTimeBuilder_ != null) { + return expirationTimeBuilder_.getMessageOrBuilder(); + } else { + return expirationTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; + } + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getExpirationTimeFieldBuilder() { + if (expirationTimeBuilder_ == null) { + expirationTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getExpirationTime(), + getParentForChildren(), + isClean()); + expirationTime_ = null; + } + return expirationTimeBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.LazyStringList relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRelatedNoteNamesIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + relatedNoteNames_ = new com.google.protobuf.LazyStringArrayList(relatedNoteNames_); + bitField0_ |= 0x00000100; + } + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @return A list containing the relatedNoteNames. + */ + public com.google.protobuf.ProtocolStringList + getRelatedNoteNamesList() { + return relatedNoteNames_.getUnmodifiableView(); + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @return The count of relatedNoteNames. + */ + public int getRelatedNoteNamesCount() { + return relatedNoteNames_.size(); + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @param index The index of the element to return. + * @return The relatedNoteNames at the given index. + */ + public java.lang.String getRelatedNoteNames(int index) { + return relatedNoteNames_.get(index); + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @param index The index of the value to return. + * @return The bytes of the relatedNoteNames at the given index. + */ + public com.google.protobuf.ByteString + getRelatedNoteNamesBytes(int index) { + return relatedNoteNames_.getByteString(index); + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @param index The index to set the value at. + * @param value The relatedNoteNames to set. + * @return This builder for chaining. + */ + public Builder setRelatedNoteNames( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureRelatedNoteNamesIsMutable(); + relatedNoteNames_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @param value The relatedNoteNames to add. + * @return This builder for chaining. + */ + public Builder addRelatedNoteNames( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureRelatedNoteNamesIsMutable(); + relatedNoteNames_.add(value); + onChanged(); + return this; + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @param values The relatedNoteNames to add. + * @return This builder for chaining. + */ + public Builder addAllRelatedNoteNames( + java.lang.Iterable values) { + ensureRelatedNoteNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relatedNoteNames_); + onChanged(); + return this; + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @return This builder for chaining. + */ + public Builder clearRelatedNoteNames() { + relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @param value The bytes of the relatedNoteNames to add. + * @return This builder for chaining. + */ + public Builder addRelatedNoteNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureRelatedNoteNamesIsMutable(); + relatedNoteNames_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote, io.grafeas.v1.VulnerabilityNote.Builder, io.grafeas.v1.VulnerabilityNoteOrBuilder> vulnerabilityBuilder_; + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + * @return Whether the vulnerability field is set. + */ + @java.lang.Override + public boolean hasVulnerability() { + return typeCase_ == 10; + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + * @return The vulnerability. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote getVulnerability() { + if (vulnerabilityBuilder_ == null) { + if (typeCase_ == 10) { + return (io.grafeas.v1.VulnerabilityNote) type_; + } + return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); + } else { + if (typeCase_ == 10) { + return vulnerabilityBuilder_.getMessage(); + } + return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + public Builder setVulnerability(io.grafeas.v1.VulnerabilityNote value) { + if (vulnerabilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + vulnerabilityBuilder_.setMessage(value); + } + typeCase_ = 10; + return this; + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + public Builder setVulnerability( + io.grafeas.v1.VulnerabilityNote.Builder builderForValue) { + if (vulnerabilityBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + vulnerabilityBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 10; + return this; + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + public Builder mergeVulnerability(io.grafeas.v1.VulnerabilityNote value) { + if (vulnerabilityBuilder_ == null) { + if (typeCase_ == 10 && + type_ != io.grafeas.v1.VulnerabilityNote.getDefaultInstance()) { + type_ = io.grafeas.v1.VulnerabilityNote.newBuilder((io.grafeas.v1.VulnerabilityNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 10) { + vulnerabilityBuilder_.mergeFrom(value); + } else { + vulnerabilityBuilder_.setMessage(value); + } + } + typeCase_ = 10; + return this; + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + public Builder clearVulnerability() { + if (vulnerabilityBuilder_ == null) { + if (typeCase_ == 10) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 10) { + typeCase_ = 0; + type_ = null; + } + vulnerabilityBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + public io.grafeas.v1.VulnerabilityNote.Builder getVulnerabilityBuilder() { + return getVulnerabilityFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNoteOrBuilder getVulnerabilityOrBuilder() { + if ((typeCase_ == 10) && (vulnerabilityBuilder_ != null)) { + return vulnerabilityBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 10) { + return (io.grafeas.v1.VulnerabilityNote) type_; + } + return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote, io.grafeas.v1.VulnerabilityNote.Builder, io.grafeas.v1.VulnerabilityNoteOrBuilder> + getVulnerabilityFieldBuilder() { + if (vulnerabilityBuilder_ == null) { + if (!(typeCase_ == 10)) { + type_ = io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); + } + vulnerabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote, io.grafeas.v1.VulnerabilityNote.Builder, io.grafeas.v1.VulnerabilityNoteOrBuilder>( + (io.grafeas.v1.VulnerabilityNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 10; + onChanged(); + return vulnerabilityBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildNote, io.grafeas.v1.BuildNote.Builder, io.grafeas.v1.BuildNoteOrBuilder> buildBuilder_; + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + * @return Whether the build field is set. + */ + @java.lang.Override + public boolean hasBuild() { + return typeCase_ == 11; + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + * @return The build. + */ + @java.lang.Override + public io.grafeas.v1.BuildNote getBuild() { + if (buildBuilder_ == null) { + if (typeCase_ == 11) { + return (io.grafeas.v1.BuildNote) type_; + } + return io.grafeas.v1.BuildNote.getDefaultInstance(); + } else { + if (typeCase_ == 11) { + return buildBuilder_.getMessage(); + } + return io.grafeas.v1.BuildNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + public Builder setBuild(io.grafeas.v1.BuildNote value) { + if (buildBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + buildBuilder_.setMessage(value); + } + typeCase_ = 11; + return this; + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + public Builder setBuild( + io.grafeas.v1.BuildNote.Builder builderForValue) { + if (buildBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + buildBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 11; + return this; + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + public Builder mergeBuild(io.grafeas.v1.BuildNote value) { + if (buildBuilder_ == null) { + if (typeCase_ == 11 && + type_ != io.grafeas.v1.BuildNote.getDefaultInstance()) { + type_ = io.grafeas.v1.BuildNote.newBuilder((io.grafeas.v1.BuildNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 11) { + buildBuilder_.mergeFrom(value); + } else { + buildBuilder_.setMessage(value); + } + } + typeCase_ = 11; + return this; + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + public Builder clearBuild() { + if (buildBuilder_ == null) { + if (typeCase_ == 11) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 11) { + typeCase_ = 0; + type_ = null; + } + buildBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + public io.grafeas.v1.BuildNote.Builder getBuildBuilder() { + return getBuildFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + @java.lang.Override + public io.grafeas.v1.BuildNoteOrBuilder getBuildOrBuilder() { + if ((typeCase_ == 11) && (buildBuilder_ != null)) { + return buildBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 11) { + return (io.grafeas.v1.BuildNote) type_; + } + return io.grafeas.v1.BuildNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildNote, io.grafeas.v1.BuildNote.Builder, io.grafeas.v1.BuildNoteOrBuilder> + getBuildFieldBuilder() { + if (buildBuilder_ == null) { + if (!(typeCase_ == 11)) { + type_ = io.grafeas.v1.BuildNote.getDefaultInstance(); + } + buildBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildNote, io.grafeas.v1.BuildNote.Builder, io.grafeas.v1.BuildNoteOrBuilder>( + (io.grafeas.v1.BuildNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 11; + onChanged(); + return buildBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ImageNote, io.grafeas.v1.ImageNote.Builder, io.grafeas.v1.ImageNoteOrBuilder> imageBuilder_; + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return typeCase_ == 12; + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + * @return The image. + */ + @java.lang.Override + public io.grafeas.v1.ImageNote getImage() { + if (imageBuilder_ == null) { + if (typeCase_ == 12) { + return (io.grafeas.v1.ImageNote) type_; + } + return io.grafeas.v1.ImageNote.getDefaultInstance(); + } else { + if (typeCase_ == 12) { + return imageBuilder_.getMessage(); + } + return io.grafeas.v1.ImageNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + public Builder setImage(io.grafeas.v1.ImageNote value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + imageBuilder_.setMessage(value); + } + typeCase_ = 12; + return this; + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + public Builder setImage( + io.grafeas.v1.ImageNote.Builder builderForValue) { + if (imageBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 12; + return this; + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + public Builder mergeImage(io.grafeas.v1.ImageNote value) { + if (imageBuilder_ == null) { + if (typeCase_ == 12 && + type_ != io.grafeas.v1.ImageNote.getDefaultInstance()) { + type_ = io.grafeas.v1.ImageNote.newBuilder((io.grafeas.v1.ImageNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 12) { + imageBuilder_.mergeFrom(value); + } else { + imageBuilder_.setMessage(value); + } + } + typeCase_ = 12; + return this; + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + public Builder clearImage() { + if (imageBuilder_ == null) { + if (typeCase_ == 12) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 12) { + typeCase_ = 0; + type_ = null; + } + imageBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + public io.grafeas.v1.ImageNote.Builder getImageBuilder() { + return getImageFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + @java.lang.Override + public io.grafeas.v1.ImageNoteOrBuilder getImageOrBuilder() { + if ((typeCase_ == 12) && (imageBuilder_ != null)) { + return imageBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 12) { + return (io.grafeas.v1.ImageNote) type_; + } + return io.grafeas.v1.ImageNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ImageNote, io.grafeas.v1.ImageNote.Builder, io.grafeas.v1.ImageNoteOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + if (!(typeCase_ == 12)) { + type_ = io.grafeas.v1.ImageNote.getDefaultInstance(); + } + imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ImageNote, io.grafeas.v1.ImageNote.Builder, io.grafeas.v1.ImageNoteOrBuilder>( + (io.grafeas.v1.ImageNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 12; + onChanged(); + return imageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.PackageNote, io.grafeas.v1.PackageNote.Builder, io.grafeas.v1.PackageNoteOrBuilder> packageBuilder_; + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + * @return Whether the package field is set. + */ + @java.lang.Override + public boolean hasPackage() { + return typeCase_ == 13; + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + * @return The package. + */ + @java.lang.Override + public io.grafeas.v1.PackageNote getPackage() { + if (packageBuilder_ == null) { + if (typeCase_ == 13) { + return (io.grafeas.v1.PackageNote) type_; + } + return io.grafeas.v1.PackageNote.getDefaultInstance(); + } else { + if (typeCase_ == 13) { + return packageBuilder_.getMessage(); + } + return io.grafeas.v1.PackageNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + public Builder setPackage(io.grafeas.v1.PackageNote value) { + if (packageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + packageBuilder_.setMessage(value); + } + typeCase_ = 13; + return this; + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + public Builder setPackage( + io.grafeas.v1.PackageNote.Builder builderForValue) { + if (packageBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + packageBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 13; + return this; + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + public Builder mergePackage(io.grafeas.v1.PackageNote value) { + if (packageBuilder_ == null) { + if (typeCase_ == 13 && + type_ != io.grafeas.v1.PackageNote.getDefaultInstance()) { + type_ = io.grafeas.v1.PackageNote.newBuilder((io.grafeas.v1.PackageNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 13) { + packageBuilder_.mergeFrom(value); + } else { + packageBuilder_.setMessage(value); + } + } + typeCase_ = 13; + return this; + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + public Builder clearPackage() { + if (packageBuilder_ == null) { + if (typeCase_ == 13) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 13) { + typeCase_ = 0; + type_ = null; + } + packageBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + public io.grafeas.v1.PackageNote.Builder getPackageBuilder() { + return getPackageFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + @java.lang.Override + public io.grafeas.v1.PackageNoteOrBuilder getPackageOrBuilder() { + if ((typeCase_ == 13) && (packageBuilder_ != null)) { + return packageBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 13) { + return (io.grafeas.v1.PackageNote) type_; + } + return io.grafeas.v1.PackageNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.PackageNote, io.grafeas.v1.PackageNote.Builder, io.grafeas.v1.PackageNoteOrBuilder> + getPackageFieldBuilder() { + if (packageBuilder_ == null) { + if (!(typeCase_ == 13)) { + type_ = io.grafeas.v1.PackageNote.getDefaultInstance(); + } + packageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.PackageNote, io.grafeas.v1.PackageNote.Builder, io.grafeas.v1.PackageNoteOrBuilder>( + (io.grafeas.v1.PackageNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 13; + onChanged(); + return packageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DeploymentNote, io.grafeas.v1.DeploymentNote.Builder, io.grafeas.v1.DeploymentNoteOrBuilder> deploymentBuilder_; + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + * @return Whether the deployment field is set. + */ + @java.lang.Override + public boolean hasDeployment() { + return typeCase_ == 14; + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + * @return The deployment. + */ + @java.lang.Override + public io.grafeas.v1.DeploymentNote getDeployment() { + if (deploymentBuilder_ == null) { + if (typeCase_ == 14) { + return (io.grafeas.v1.DeploymentNote) type_; + } + return io.grafeas.v1.DeploymentNote.getDefaultInstance(); + } else { + if (typeCase_ == 14) { + return deploymentBuilder_.getMessage(); + } + return io.grafeas.v1.DeploymentNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + public Builder setDeployment(io.grafeas.v1.DeploymentNote value) { + if (deploymentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + deploymentBuilder_.setMessage(value); + } + typeCase_ = 14; + return this; + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + public Builder setDeployment( + io.grafeas.v1.DeploymentNote.Builder builderForValue) { + if (deploymentBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + deploymentBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 14; + return this; + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + public Builder mergeDeployment(io.grafeas.v1.DeploymentNote value) { + if (deploymentBuilder_ == null) { + if (typeCase_ == 14 && + type_ != io.grafeas.v1.DeploymentNote.getDefaultInstance()) { + type_ = io.grafeas.v1.DeploymentNote.newBuilder((io.grafeas.v1.DeploymentNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 14) { + deploymentBuilder_.mergeFrom(value); + } else { + deploymentBuilder_.setMessage(value); + } + } + typeCase_ = 14; + return this; + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + public Builder clearDeployment() { + if (deploymentBuilder_ == null) { + if (typeCase_ == 14) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 14) { + typeCase_ = 0; + type_ = null; + } + deploymentBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + public io.grafeas.v1.DeploymentNote.Builder getDeploymentBuilder() { + return getDeploymentFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + @java.lang.Override + public io.grafeas.v1.DeploymentNoteOrBuilder getDeploymentOrBuilder() { + if ((typeCase_ == 14) && (deploymentBuilder_ != null)) { + return deploymentBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 14) { + return (io.grafeas.v1.DeploymentNote) type_; + } + return io.grafeas.v1.DeploymentNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DeploymentNote, io.grafeas.v1.DeploymentNote.Builder, io.grafeas.v1.DeploymentNoteOrBuilder> + getDeploymentFieldBuilder() { + if (deploymentBuilder_ == null) { + if (!(typeCase_ == 14)) { + type_ = io.grafeas.v1.DeploymentNote.getDefaultInstance(); + } + deploymentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DeploymentNote, io.grafeas.v1.DeploymentNote.Builder, io.grafeas.v1.DeploymentNoteOrBuilder>( + (io.grafeas.v1.DeploymentNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 14; + onChanged(); + return deploymentBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryNote, io.grafeas.v1.DiscoveryNote.Builder, io.grafeas.v1.DiscoveryNoteOrBuilder> discoveryBuilder_; + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + * @return Whether the discovery field is set. + */ + @java.lang.Override + public boolean hasDiscovery() { + return typeCase_ == 15; + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + * @return The discovery. + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryNote getDiscovery() { + if (discoveryBuilder_ == null) { + if (typeCase_ == 15) { + return (io.grafeas.v1.DiscoveryNote) type_; + } + return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); + } else { + if (typeCase_ == 15) { + return discoveryBuilder_.getMessage(); + } + return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + public Builder setDiscovery(io.grafeas.v1.DiscoveryNote value) { + if (discoveryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + discoveryBuilder_.setMessage(value); + } + typeCase_ = 15; + return this; + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + public Builder setDiscovery( + io.grafeas.v1.DiscoveryNote.Builder builderForValue) { + if (discoveryBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + discoveryBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 15; + return this; + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + public Builder mergeDiscovery(io.grafeas.v1.DiscoveryNote value) { + if (discoveryBuilder_ == null) { + if (typeCase_ == 15 && + type_ != io.grafeas.v1.DiscoveryNote.getDefaultInstance()) { + type_ = io.grafeas.v1.DiscoveryNote.newBuilder((io.grafeas.v1.DiscoveryNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 15) { + discoveryBuilder_.mergeFrom(value); + } else { + discoveryBuilder_.setMessage(value); + } + } + typeCase_ = 15; + return this; + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + public Builder clearDiscovery() { + if (discoveryBuilder_ == null) { + if (typeCase_ == 15) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 15) { + typeCase_ = 0; + type_ = null; + } + discoveryBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + public io.grafeas.v1.DiscoveryNote.Builder getDiscoveryBuilder() { + return getDiscoveryFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryNoteOrBuilder getDiscoveryOrBuilder() { + if ((typeCase_ == 15) && (discoveryBuilder_ != null)) { + return discoveryBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 15) { + return (io.grafeas.v1.DiscoveryNote) type_; + } + return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryNote, io.grafeas.v1.DiscoveryNote.Builder, io.grafeas.v1.DiscoveryNoteOrBuilder> + getDiscoveryFieldBuilder() { + if (discoveryBuilder_ == null) { + if (!(typeCase_ == 15)) { + type_ = io.grafeas.v1.DiscoveryNote.getDefaultInstance(); + } + discoveryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryNote, io.grafeas.v1.DiscoveryNote.Builder, io.grafeas.v1.DiscoveryNoteOrBuilder>( + (io.grafeas.v1.DiscoveryNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 15; + onChanged(); + return discoveryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationNote, io.grafeas.v1.AttestationNote.Builder, io.grafeas.v1.AttestationNoteOrBuilder> attestationBuilder_; + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + * @return Whether the attestation field is set. + */ + @java.lang.Override + public boolean hasAttestation() { + return typeCase_ == 16; + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + * @return The attestation. + */ + @java.lang.Override + public io.grafeas.v1.AttestationNote getAttestation() { + if (attestationBuilder_ == null) { + if (typeCase_ == 16) { + return (io.grafeas.v1.AttestationNote) type_; + } + return io.grafeas.v1.AttestationNote.getDefaultInstance(); + } else { + if (typeCase_ == 16) { + return attestationBuilder_.getMessage(); + } + return io.grafeas.v1.AttestationNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + public Builder setAttestation(io.grafeas.v1.AttestationNote value) { + if (attestationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + attestationBuilder_.setMessage(value); + } + typeCase_ = 16; + return this; + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + public Builder setAttestation( + io.grafeas.v1.AttestationNote.Builder builderForValue) { + if (attestationBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + attestationBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 16; + return this; + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + public Builder mergeAttestation(io.grafeas.v1.AttestationNote value) { + if (attestationBuilder_ == null) { + if (typeCase_ == 16 && + type_ != io.grafeas.v1.AttestationNote.getDefaultInstance()) { + type_ = io.grafeas.v1.AttestationNote.newBuilder((io.grafeas.v1.AttestationNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 16) { + attestationBuilder_.mergeFrom(value); + } else { + attestationBuilder_.setMessage(value); + } + } + typeCase_ = 16; + return this; + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + public Builder clearAttestation() { + if (attestationBuilder_ == null) { + if (typeCase_ == 16) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 16) { + typeCase_ = 0; + type_ = null; + } + attestationBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + public io.grafeas.v1.AttestationNote.Builder getAttestationBuilder() { + return getAttestationFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + @java.lang.Override + public io.grafeas.v1.AttestationNoteOrBuilder getAttestationOrBuilder() { + if ((typeCase_ == 16) && (attestationBuilder_ != null)) { + return attestationBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 16) { + return (io.grafeas.v1.AttestationNote) type_; + } + return io.grafeas.v1.AttestationNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationNote, io.grafeas.v1.AttestationNote.Builder, io.grafeas.v1.AttestationNoteOrBuilder> + getAttestationFieldBuilder() { + if (attestationBuilder_ == null) { + if (!(typeCase_ == 16)) { + type_ = io.grafeas.v1.AttestationNote.getDefaultInstance(); + } + attestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationNote, io.grafeas.v1.AttestationNote.Builder, io.grafeas.v1.AttestationNoteOrBuilder>( + (io.grafeas.v1.AttestationNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 16; + onChanged(); + return attestationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeNote, io.grafeas.v1.UpgradeNote.Builder, io.grafeas.v1.UpgradeNoteOrBuilder> upgradeBuilder_; + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * @return Whether the upgrade field is set. + */ + @java.lang.Override + public boolean hasUpgrade() { + return typeCase_ == 17; + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * @return The upgrade. + */ + @java.lang.Override + public io.grafeas.v1.UpgradeNote getUpgrade() { + if (upgradeBuilder_ == null) { + if (typeCase_ == 17) { + return (io.grafeas.v1.UpgradeNote) type_; + } + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } else { + if (typeCase_ == 17) { + return upgradeBuilder_.getMessage(); + } + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public Builder setUpgrade(io.grafeas.v1.UpgradeNote value) { + if (upgradeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + upgradeBuilder_.setMessage(value); + } + typeCase_ = 17; + return this; + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public Builder setUpgrade( + io.grafeas.v1.UpgradeNote.Builder builderForValue) { + if (upgradeBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + upgradeBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 17; + return this; + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public Builder mergeUpgrade(io.grafeas.v1.UpgradeNote value) { + if (upgradeBuilder_ == null) { + if (typeCase_ == 17 && + type_ != io.grafeas.v1.UpgradeNote.getDefaultInstance()) { + type_ = io.grafeas.v1.UpgradeNote.newBuilder((io.grafeas.v1.UpgradeNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 17) { + upgradeBuilder_.mergeFrom(value); + } else { + upgradeBuilder_.setMessage(value); + } + } + typeCase_ = 17; + return this; + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public Builder clearUpgrade() { + if (upgradeBuilder_ == null) { + if (typeCase_ == 17) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 17) { + typeCase_ = 0; + type_ = null; + } + upgradeBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public io.grafeas.v1.UpgradeNote.Builder getUpgradeBuilder() { + return getUpgradeFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + @java.lang.Override + public io.grafeas.v1.UpgradeNoteOrBuilder getUpgradeOrBuilder() { + if ((typeCase_ == 17) && (upgradeBuilder_ != null)) { + return upgradeBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 17) { + return (io.grafeas.v1.UpgradeNote) type_; + } + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeNote, io.grafeas.v1.UpgradeNote.Builder, io.grafeas.v1.UpgradeNoteOrBuilder> + getUpgradeFieldBuilder() { + if (upgradeBuilder_ == null) { + if (!(typeCase_ == 17)) { + type_ = io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + upgradeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeNote, io.grafeas.v1.UpgradeNote.Builder, io.grafeas.v1.UpgradeNoteOrBuilder>( + (io.grafeas.v1.UpgradeNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 17; + onChanged(); + return upgradeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceNote, io.grafeas.v1.ComplianceNote.Builder, io.grafeas.v1.ComplianceNoteOrBuilder> complianceBuilder_; + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + * @return Whether the compliance field is set. + */ + @java.lang.Override + public boolean hasCompliance() { + return typeCase_ == 18; + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + * @return The compliance. + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNote getCompliance() { + if (complianceBuilder_ == null) { + if (typeCase_ == 18) { + return (io.grafeas.v1.ComplianceNote) type_; + } + return io.grafeas.v1.ComplianceNote.getDefaultInstance(); + } else { + if (typeCase_ == 18) { + return complianceBuilder_.getMessage(); + } + return io.grafeas.v1.ComplianceNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + public Builder setCompliance(io.grafeas.v1.ComplianceNote value) { + if (complianceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + complianceBuilder_.setMessage(value); + } + typeCase_ = 18; + return this; + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + public Builder setCompliance( + io.grafeas.v1.ComplianceNote.Builder builderForValue) { + if (complianceBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + complianceBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 18; + return this; + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + public Builder mergeCompliance(io.grafeas.v1.ComplianceNote value) { + if (complianceBuilder_ == null) { + if (typeCase_ == 18 && + type_ != io.grafeas.v1.ComplianceNote.getDefaultInstance()) { + type_ = io.grafeas.v1.ComplianceNote.newBuilder((io.grafeas.v1.ComplianceNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 18) { + complianceBuilder_.mergeFrom(value); + } else { + complianceBuilder_.setMessage(value); + } + } + typeCase_ = 18; + return this; + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + public Builder clearCompliance() { + if (complianceBuilder_ == null) { + if (typeCase_ == 18) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 18) { + typeCase_ = 0; + type_ = null; + } + complianceBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + public io.grafeas.v1.ComplianceNote.Builder getComplianceBuilder() { + return getComplianceFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNoteOrBuilder getComplianceOrBuilder() { + if ((typeCase_ == 18) && (complianceBuilder_ != null)) { + return complianceBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 18) { + return (io.grafeas.v1.ComplianceNote) type_; + } + return io.grafeas.v1.ComplianceNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceNote, io.grafeas.v1.ComplianceNote.Builder, io.grafeas.v1.ComplianceNoteOrBuilder> + getComplianceFieldBuilder() { + if (complianceBuilder_ == null) { + if (!(typeCase_ == 18)) { + type_ = io.grafeas.v1.ComplianceNote.getDefaultInstance(); + } + complianceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceNote, io.grafeas.v1.ComplianceNote.Builder, io.grafeas.v1.ComplianceNoteOrBuilder>( + (io.grafeas.v1.ComplianceNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 18; + onChanged(); + return complianceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationNote, io.grafeas.v1.DSSEAttestationNote.Builder, io.grafeas.v1.DSSEAttestationNoteOrBuilder> dsseAttestationBuilder_; + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + * @return Whether the dsseAttestation field is set. + */ + @java.lang.Override + public boolean hasDsseAttestation() { + return typeCase_ == 19; + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + * @return The dsseAttestation. + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote getDsseAttestation() { + if (dsseAttestationBuilder_ == null) { + if (typeCase_ == 19) { + return (io.grafeas.v1.DSSEAttestationNote) type_; + } + return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); + } else { + if (typeCase_ == 19) { + return dsseAttestationBuilder_.getMessage(); + } + return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + public Builder setDsseAttestation(io.grafeas.v1.DSSEAttestationNote value) { + if (dsseAttestationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + dsseAttestationBuilder_.setMessage(value); + } + typeCase_ = 19; + return this; + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + public Builder setDsseAttestation( + io.grafeas.v1.DSSEAttestationNote.Builder builderForValue) { + if (dsseAttestationBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + dsseAttestationBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 19; + return this; + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + public Builder mergeDsseAttestation(io.grafeas.v1.DSSEAttestationNote value) { + if (dsseAttestationBuilder_ == null) { + if (typeCase_ == 19 && + type_ != io.grafeas.v1.DSSEAttestationNote.getDefaultInstance()) { + type_ = io.grafeas.v1.DSSEAttestationNote.newBuilder((io.grafeas.v1.DSSEAttestationNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 19) { + dsseAttestationBuilder_.mergeFrom(value); + } else { + dsseAttestationBuilder_.setMessage(value); + } + } + typeCase_ = 19; + return this; + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + public Builder clearDsseAttestation() { + if (dsseAttestationBuilder_ == null) { + if (typeCase_ == 19) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 19) { + typeCase_ = 0; + type_ = null; + } + dsseAttestationBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + public io.grafeas.v1.DSSEAttestationNote.Builder getDsseAttestationBuilder() { + return getDsseAttestationFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder() { + if ((typeCase_ == 19) && (dsseAttestationBuilder_ != null)) { + return dsseAttestationBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 19) { + return (io.grafeas.v1.DSSEAttestationNote) type_; + } + return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationNote, io.grafeas.v1.DSSEAttestationNote.Builder, io.grafeas.v1.DSSEAttestationNoteOrBuilder> + getDsseAttestationFieldBuilder() { + if (dsseAttestationBuilder_ == null) { + if (!(typeCase_ == 19)) { + type_ = io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); + } + dsseAttestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationNote, io.grafeas.v1.DSSEAttestationNote.Builder, io.grafeas.v1.DSSEAttestationNoteOrBuilder>( + (io.grafeas.v1.DSSEAttestationNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 19; + onChanged(); + return dsseAttestationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Note) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Note) + private static final io.grafeas.v1.Note DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Note(); + } + + public static io.grafeas.v1.Note getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Note parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Note getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java new file mode 100644 index 000000000000..45f6d41dacb9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java @@ -0,0 +1,286 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + *
+ * Kind represents the kinds of notes supported.
+ * 
+ * + * Protobuf enum {@code grafeas.v1.NoteKind} + */ +public enum NoteKind + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Default value. This value is unused.
+   * 
+ * + * NOTE_KIND_UNSPECIFIED = 0; + */ + NOTE_KIND_UNSPECIFIED(0), + /** + *
+   * The note and occurrence represent a package vulnerability.
+   * 
+ * + * VULNERABILITY = 1; + */ + VULNERABILITY(1), + /** + *
+   * The note and occurrence assert build provenance.
+   * 
+ * + * BUILD = 2; + */ + BUILD(2), + /** + *
+   * This represents an image basis relationship.
+   * 
+ * + * IMAGE = 3; + */ + IMAGE(3), + /** + *
+   * This represents a package installed via a package manager.
+   * 
+ * + * PACKAGE = 4; + */ + PACKAGE(4), + /** + *
+   * The note and occurrence track deployment events.
+   * 
+ * + * DEPLOYMENT = 5; + */ + DEPLOYMENT(5), + /** + *
+   * The note and occurrence track the initial discovery status of a resource.
+   * 
+ * + * DISCOVERY = 6; + */ + DISCOVERY(6), + /** + *
+   * This represents a logical "role" that can attest to artifacts.
+   * 
+ * + * ATTESTATION = 7; + */ + ATTESTATION(7), + /** + *
+   * This represents an available package upgrade.
+   * 
+ * + * UPGRADE = 8; + */ + UPGRADE(8), + /** + *
+   * This represents a Compliance Note
+   * 
+ * + * COMPLIANCE = 9; + */ + COMPLIANCE(9), + /** + *
+   * This represents a DSSE attestation Note
+   * 
+ * + * DSSE_ATTESTATION = 10; + */ + DSSE_ATTESTATION(10), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Default value. This value is unused.
+   * 
+ * + * NOTE_KIND_UNSPECIFIED = 0; + */ + public static final int NOTE_KIND_UNSPECIFIED_VALUE = 0; + /** + *
+   * The note and occurrence represent a package vulnerability.
+   * 
+ * + * VULNERABILITY = 1; + */ + public static final int VULNERABILITY_VALUE = 1; + /** + *
+   * The note and occurrence assert build provenance.
+   * 
+ * + * BUILD = 2; + */ + public static final int BUILD_VALUE = 2; + /** + *
+   * This represents an image basis relationship.
+   * 
+ * + * IMAGE = 3; + */ + public static final int IMAGE_VALUE = 3; + /** + *
+   * This represents a package installed via a package manager.
+   * 
+ * + * PACKAGE = 4; + */ + public static final int PACKAGE_VALUE = 4; + /** + *
+   * The note and occurrence track deployment events.
+   * 
+ * + * DEPLOYMENT = 5; + */ + public static final int DEPLOYMENT_VALUE = 5; + /** + *
+   * The note and occurrence track the initial discovery status of a resource.
+   * 
+ * + * DISCOVERY = 6; + */ + public static final int DISCOVERY_VALUE = 6; + /** + *
+   * This represents a logical "role" that can attest to artifacts.
+   * 
+ * + * ATTESTATION = 7; + */ + public static final int ATTESTATION_VALUE = 7; + /** + *
+   * This represents an available package upgrade.
+   * 
+ * + * UPGRADE = 8; + */ + public static final int UPGRADE_VALUE = 8; + /** + *
+   * This represents a Compliance Note
+   * 
+ * + * COMPLIANCE = 9; + */ + public static final int COMPLIANCE_VALUE = 9; + /** + *
+   * This represents a DSSE attestation Note
+   * 
+ * + * DSSE_ATTESTATION = 10; + */ + public static final int DSSE_ATTESTATION_VALUE = 10; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NoteKind valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static NoteKind forNumber(int value) { + switch (value) { + case 0: return NOTE_KIND_UNSPECIFIED; + case 1: return VULNERABILITY; + case 2: return BUILD; + case 3: return IMAGE; + case 4: return PACKAGE; + case 5: return DEPLOYMENT; + case 6: return DISCOVERY; + case 7: return ATTESTATION; + case 8: return UPGRADE; + case 9: return COMPLIANCE; + case 10: return DSSE_ATTESTATION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + NoteKind> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NoteKind findValueByNumber(int number) { + return NoteKind.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.Common.getDescriptor().getEnumTypes().get(0); + } + + private static final NoteKind[] VALUES = values(); + + public static NoteKind valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NoteKind(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.NoteKind) +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java new file mode 100644 index 000000000000..cc46d3b47ff2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java @@ -0,0 +1,191 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class NoteName implements ResourceName { + private static final PathTemplate PROJECT_NOTE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/notes/{note}"); + private volatile Map fieldValuesMap; + private final String project; + private final String note; + + @Deprecated + protected NoteName() { + project = null; + note = null; + } + + private NoteName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + note = Preconditions.checkNotNull(builder.getNote()); + } + + public String getProject() { + return project; + } + + public String getNote() { + return note; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static NoteName of(String project, String note) { + return newBuilder().setProject(project).setNote(note).build(); + } + + public static String format(String project, String note) { + return newBuilder().setProject(project).setNote(note).build().toString(); + } + + public static NoteName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_NOTE.validatedMatch( + formattedString, "NoteName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("note")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (NoteName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_NOTE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (note != null) { + fieldMapBuilder.put("note", note); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_NOTE.instantiate("project", project, "note", note); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + NoteName that = ((NoteName) o); + return Objects.equals(this.project, that.project) && Objects.equals(this.note, that.note); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(note); + return h; + } + + /** Builder for projects/{project}/notes/{note}. */ + public static class Builder { + private String project; + private String note; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getNote() { + return note; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setNote(String note) { + this.note = note; + return this; + } + + private Builder(NoteName noteName) { + this.project = noteName.project; + this.note = noteName.note; + } + + public NoteName build() { + return new NoteName(this); + } + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java new file mode 100644 index 000000000000..c9978023ec34 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java @@ -0,0 +1,536 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface NoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Note) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Output only. The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * A one sentence description of this note.
+   * 
+ * + * string short_description = 2; + * @return The shortDescription. + */ + java.lang.String getShortDescription(); + /** + *
+   * A one sentence description of this note.
+   * 
+ * + * string short_description = 2; + * @return The bytes for shortDescription. + */ + com.google.protobuf.ByteString + getShortDescriptionBytes(); + + /** + *
+   * A detailed description of this note.
+   * 
+ * + * string long_description = 3; + * @return The longDescription. + */ + java.lang.String getLongDescription(); + /** + *
+   * A detailed description of this note.
+   * 
+ * + * string long_description = 3; + * @return The bytes for longDescription. + */ + com.google.protobuf.ByteString + getLongDescriptionBytes(); + + /** + *
+   * Output only. The type of analysis. This field can be used as a filter in
+   * list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + int getKindValue(); + /** + *
+   * Output only. The type of analysis. This field can be used as a filter in
+   * list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The kind. + */ + io.grafeas.v1.NoteKind getKind(); + + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + java.util.List + getRelatedUrlList(); + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + io.grafeas.v1.RelatedUrl getRelatedUrl(int index); + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + int getRelatedUrlCount(); + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + java.util.List + getRelatedUrlOrBuilderList(); + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlOrBuilder( + int index); + + /** + *
+   * Time of expiration for this note. Empty if note does not expire.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + * @return Whether the expirationTime field is set. + */ + boolean hasExpirationTime(); + /** + *
+   * Time of expiration for this note. Empty if note does not expire.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + * @return The expirationTime. + */ + com.google.protobuf.Timestamp getExpirationTime(); + /** + *
+   * Time of expiration for this note. Empty if note does not expire.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder(); + + /** + *
+   * Output only. The time this note was created. This field can be used as a
+   * filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time this note was created. This field can be used as a
+   * filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time this note was created. This field can be used as a
+   * filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time this note was last updated. This field can be used as
+   * a filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The time this note was last updated. This field can be used as
+   * a filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The time this note was last updated. This field can be used as
+   * a filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @return A list containing the relatedNoteNames. + */ + java.util.List + getRelatedNoteNamesList(); + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @return The count of relatedNoteNames. + */ + int getRelatedNoteNamesCount(); + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @param index The index of the element to return. + * @return The relatedNoteNames at the given index. + */ + java.lang.String getRelatedNoteNames(int index); + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @param index The index of the value to return. + * @return The bytes of the relatedNoteNames at the given index. + */ + com.google.protobuf.ByteString + getRelatedNoteNamesBytes(int index); + + /** + *
+   * A note describing a package vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + * @return Whether the vulnerability field is set. + */ + boolean hasVulnerability(); + /** + *
+   * A note describing a package vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + * @return The vulnerability. + */ + io.grafeas.v1.VulnerabilityNote getVulnerability(); + /** + *
+   * A note describing a package vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + io.grafeas.v1.VulnerabilityNoteOrBuilder getVulnerabilityOrBuilder(); + + /** + *
+   * A note describing build provenance for a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildNote build = 11; + * @return Whether the build field is set. + */ + boolean hasBuild(); + /** + *
+   * A note describing build provenance for a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildNote build = 11; + * @return The build. + */ + io.grafeas.v1.BuildNote getBuild(); + /** + *
+   * A note describing build provenance for a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + io.grafeas.v1.BuildNoteOrBuilder getBuildOrBuilder(); + + /** + *
+   * A note describing a base image.
+   * 
+ * + * .grafeas.v1.ImageNote image = 12; + * @return Whether the image field is set. + */ + boolean hasImage(); + /** + *
+   * A note describing a base image.
+   * 
+ * + * .grafeas.v1.ImageNote image = 12; + * @return The image. + */ + io.grafeas.v1.ImageNote getImage(); + /** + *
+   * A note describing a base image.
+   * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + io.grafeas.v1.ImageNoteOrBuilder getImageOrBuilder(); + + /** + *
+   * A note describing a package hosted by various package managers.
+   * 
+ * + * .grafeas.v1.PackageNote package = 13; + * @return Whether the package field is set. + */ + boolean hasPackage(); + /** + *
+   * A note describing a package hosted by various package managers.
+   * 
+ * + * .grafeas.v1.PackageNote package = 13; + * @return The package. + */ + io.grafeas.v1.PackageNote getPackage(); + /** + *
+   * A note describing a package hosted by various package managers.
+   * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + io.grafeas.v1.PackageNoteOrBuilder getPackageOrBuilder(); + + /** + *
+   * A note describing something that can be deployed.
+   * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + * @return Whether the deployment field is set. + */ + boolean hasDeployment(); + /** + *
+   * A note describing something that can be deployed.
+   * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + * @return The deployment. + */ + io.grafeas.v1.DeploymentNote getDeployment(); + /** + *
+   * A note describing something that can be deployed.
+   * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + io.grafeas.v1.DeploymentNoteOrBuilder getDeploymentOrBuilder(); + + /** + *
+   * A note describing the initial analysis of a resource.
+   * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + * @return Whether the discovery field is set. + */ + boolean hasDiscovery(); + /** + *
+   * A note describing the initial analysis of a resource.
+   * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + * @return The discovery. + */ + io.grafeas.v1.DiscoveryNote getDiscovery(); + /** + *
+   * A note describing the initial analysis of a resource.
+   * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + io.grafeas.v1.DiscoveryNoteOrBuilder getDiscoveryOrBuilder(); + + /** + *
+   * A note describing an attestation role.
+   * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + * @return Whether the attestation field is set. + */ + boolean hasAttestation(); + /** + *
+   * A note describing an attestation role.
+   * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + * @return The attestation. + */ + io.grafeas.v1.AttestationNote getAttestation(); + /** + *
+   * A note describing an attestation role.
+   * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + io.grafeas.v1.AttestationNoteOrBuilder getAttestationOrBuilder(); + + /** + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * @return Whether the upgrade field is set. + */ + boolean hasUpgrade(); + /** + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * @return The upgrade. + */ + io.grafeas.v1.UpgradeNote getUpgrade(); + /** + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + io.grafeas.v1.UpgradeNoteOrBuilder getUpgradeOrBuilder(); + + /** + *
+   * A note describing a compliance check.
+   * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + * @return Whether the compliance field is set. + */ + boolean hasCompliance(); + /** + *
+   * A note describing a compliance check.
+   * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + * @return The compliance. + */ + io.grafeas.v1.ComplianceNote getCompliance(); + /** + *
+   * A note describing a compliance check.
+   * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + io.grafeas.v1.ComplianceNoteOrBuilder getComplianceOrBuilder(); + + /** + *
+   * A note describing a dsse attestation note.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + * @return Whether the dsseAttestation field is set. + */ + boolean hasDsseAttestation(); + /** + *
+   * A note describing a dsse attestation note.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + * @return The dsseAttestation. + */ + io.grafeas.v1.DSSEAttestationNote getDsseAttestation(); + /** + *
+   * A note describing a dsse attestation note.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder(); + + public io.grafeas.v1.Note.TypeCase getTypeCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java new file mode 100644 index 000000000000..bc2470a2d0cf --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java @@ -0,0 +1,4569 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * An instance of an analysis type that has been found on a resource.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Occurrence} + */ +public final class Occurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Occurrence) + OccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use Occurrence.newBuilder() to construct. + private Occurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Occurrence() { + name_ = ""; + resourceUri_ = ""; + noteName_ = ""; + kind_ = 0; + remediation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Occurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Occurrence.class, io.grafeas.v1.Occurrence.Builder.class); + } + + private int detailsCase_ = 0; + private java.lang.Object details_; + public enum DetailsCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VULNERABILITY(8), + BUILD(9), + IMAGE(10), + PACKAGE(11), + DEPLOYMENT(12), + DISCOVERY(13), + ATTESTATION(14), + UPGRADE(15), + COMPLIANCE(16), + DSSE_ATTESTATION(17), + DETAILS_NOT_SET(0); + private final int value; + private DetailsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DetailsCase valueOf(int value) { + return forNumber(value); + } + + public static DetailsCase forNumber(int value) { + switch (value) { + case 8: return VULNERABILITY; + case 9: return BUILD; + case 10: return IMAGE; + case 11: return PACKAGE; + case 12: return DEPLOYMENT; + case 13: return DISCOVERY; + case 14: return ATTESTATION; + case 15: return UPGRADE; + case 16: return COMPLIANCE; + case 17: return DSSE_ATTESTATION; + case 0: return DETAILS_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DetailsCase + getDetailsCase() { + return DetailsCase.forNumber( + detailsCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Output only. The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Output only. The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object resourceUri_ = ""; + /** + *
+   * Required. Immutable. A URI that represents the resource for which the
+   * occurrence applies. For example,
+   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+   * 
+ * + * string resource_uri = 2; + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } + } + /** + *
+   * Required. Immutable. A URI that represents the resource for which the
+   * occurrence applies. For example,
+   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+   * 
+ * + * string resource_uri = 2; + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTE_NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object noteName_ = ""; + /** + *
+   * Required. Immutable. The analysis note associated with this occurrence, in
+   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+   * used as a filter in list requests.
+   * 
+ * + * string note_name = 3; + * @return The noteName. + */ + @java.lang.Override + public java.lang.String getNoteName() { + java.lang.Object ref = noteName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteName_ = s; + return s; + } + } + /** + *
+   * Required. Immutable. The analysis note associated with this occurrence, in
+   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+   * used as a filter in list requests.
+   * 
+ * + * string note_name = 3; + * @return The bytes for noteName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNoteNameBytes() { + java.lang.Object ref = noteName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + noteName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KIND_FIELD_NUMBER = 4; + private int kind_ = 0; + /** + *
+   * Output only. This explicitly denotes which of the occurrence details are
+   * specified. This field can be used as a filter in list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+   * Output only. This explicitly denotes which of the occurrence details are
+   * specified. This field can be used as a filter in list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The kind. + */ + @java.lang.Override public io.grafeas.v1.NoteKind getKind() { + io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); + return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; + } + + public static final int REMEDIATION_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object remediation_ = ""; + /** + *
+   * A description of actions that can be taken to remedy the note.
+   * 
+ * + * string remediation = 5; + * @return The remediation. + */ + @java.lang.Override + public java.lang.String getRemediation() { + java.lang.Object ref = remediation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remediation_ = s; + return s; + } + } + /** + *
+   * A description of actions that can be taken to remedy the note.
+   * 
+ * + * string remediation = 5; + * @return The bytes for remediation. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRemediationBytes() { + java.lang.Object ref = remediation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remediation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time this occurrence was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time this occurrence was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time this occurrence was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The time this occurrence was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The time this occurrence was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The time this occurrence was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int VULNERABILITY_FIELD_NUMBER = 8; + /** + *
+   * Describes a security vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + * @return Whether the vulnerability field is set. + */ + @java.lang.Override + public boolean hasVulnerability() { + return detailsCase_ == 8; + } + /** + *
+   * Describes a security vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + * @return The vulnerability. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence getVulnerability() { + if (detailsCase_ == 8) { + return (io.grafeas.v1.VulnerabilityOccurrence) details_; + } + return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes a security vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrenceOrBuilder getVulnerabilityOrBuilder() { + if (detailsCase_ == 8) { + return (io.grafeas.v1.VulnerabilityOccurrence) details_; + } + return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); + } + + public static final int BUILD_FIELD_NUMBER = 9; + /** + *
+   * Describes a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + * @return Whether the build field is set. + */ + @java.lang.Override + public boolean hasBuild() { + return detailsCase_ == 9; + } + /** + *
+   * Describes a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + * @return The build. + */ + @java.lang.Override + public io.grafeas.v1.BuildOccurrence getBuild() { + if (detailsCase_ == 9) { + return (io.grafeas.v1.BuildOccurrence) details_; + } + return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + @java.lang.Override + public io.grafeas.v1.BuildOccurrenceOrBuilder getBuildOrBuilder() { + if (detailsCase_ == 9) { + return (io.grafeas.v1.BuildOccurrence) details_; + } + return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); + } + + public static final int IMAGE_FIELD_NUMBER = 10; + /** + *
+   * Describes how this resource derives from the basis in the associated
+   * note.
+   * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return detailsCase_ == 10; + } + /** + *
+   * Describes how this resource derives from the basis in the associated
+   * note.
+   * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + * @return The image. + */ + @java.lang.Override + public io.grafeas.v1.ImageOccurrence getImage() { + if (detailsCase_ == 10) { + return (io.grafeas.v1.ImageOccurrence) details_; + } + return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes how this resource derives from the basis in the associated
+   * note.
+   * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + @java.lang.Override + public io.grafeas.v1.ImageOccurrenceOrBuilder getImageOrBuilder() { + if (detailsCase_ == 10) { + return (io.grafeas.v1.ImageOccurrence) details_; + } + return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); + } + + public static final int PACKAGE_FIELD_NUMBER = 11; + /** + *
+   * Describes the installation of a package on the linked resource.
+   * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + * @return Whether the package field is set. + */ + @java.lang.Override + public boolean hasPackage() { + return detailsCase_ == 11; + } + /** + *
+   * Describes the installation of a package on the linked resource.
+   * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + * @return The package. + */ + @java.lang.Override + public io.grafeas.v1.PackageOccurrence getPackage() { + if (detailsCase_ == 11) { + return (io.grafeas.v1.PackageOccurrence) details_; + } + return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes the installation of a package on the linked resource.
+   * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + @java.lang.Override + public io.grafeas.v1.PackageOccurrenceOrBuilder getPackageOrBuilder() { + if (detailsCase_ == 11) { + return (io.grafeas.v1.PackageOccurrence) details_; + } + return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); + } + + public static final int DEPLOYMENT_FIELD_NUMBER = 12; + /** + *
+   * Describes the deployment of an artifact on a runtime.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + * @return Whether the deployment field is set. + */ + @java.lang.Override + public boolean hasDeployment() { + return detailsCase_ == 12; + } + /** + *
+   * Describes the deployment of an artifact on a runtime.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + * @return The deployment. + */ + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrence getDeployment() { + if (detailsCase_ == 12) { + return (io.grafeas.v1.DeploymentOccurrence) details_; + } + return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes the deployment of an artifact on a runtime.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrenceOrBuilder getDeploymentOrBuilder() { + if (detailsCase_ == 12) { + return (io.grafeas.v1.DeploymentOccurrence) details_; + } + return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); + } + + public static final int DISCOVERY_FIELD_NUMBER = 13; + /** + *
+   * Describes when a resource was discovered.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + * @return Whether the discovery field is set. + */ + @java.lang.Override + public boolean hasDiscovery() { + return detailsCase_ == 13; + } + /** + *
+   * Describes when a resource was discovered.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + * @return The discovery. + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence getDiscovery() { + if (detailsCase_ == 13) { + return (io.grafeas.v1.DiscoveryOccurrence) details_; + } + return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes when a resource was discovered.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrenceOrBuilder getDiscoveryOrBuilder() { + if (detailsCase_ == 13) { + return (io.grafeas.v1.DiscoveryOccurrence) details_; + } + return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); + } + + public static final int ATTESTATION_FIELD_NUMBER = 14; + /** + *
+   * Describes an attestation of an artifact.
+   * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + * @return Whether the attestation field is set. + */ + @java.lang.Override + public boolean hasAttestation() { + return detailsCase_ == 14; + } + /** + *
+   * Describes an attestation of an artifact.
+   * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + * @return The attestation. + */ + @java.lang.Override + public io.grafeas.v1.AttestationOccurrence getAttestation() { + if (detailsCase_ == 14) { + return (io.grafeas.v1.AttestationOccurrence) details_; + } + return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes an attestation of an artifact.
+   * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + @java.lang.Override + public io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder() { + if (detailsCase_ == 14) { + return (io.grafeas.v1.AttestationOccurrence) details_; + } + return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); + } + + public static final int UPGRADE_FIELD_NUMBER = 15; + /** + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * @return Whether the upgrade field is set. + */ + @java.lang.Override + public boolean hasUpgrade() { + return detailsCase_ == 15; + } + /** + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * @return The upgrade. + */ + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrence getUpgrade() { + if (detailsCase_ == 15) { + return (io.grafeas.v1.UpgradeOccurrence) details_; + } + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrenceOrBuilder getUpgradeOrBuilder() { + if (detailsCase_ == 15) { + return (io.grafeas.v1.UpgradeOccurrence) details_; + } + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + + public static final int COMPLIANCE_FIELD_NUMBER = 16; + /** + *
+   * Describes a compliance violation on a linked resource.
+   * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + * @return Whether the compliance field is set. + */ + @java.lang.Override + public boolean hasCompliance() { + return detailsCase_ == 16; + } + /** + *
+   * Describes a compliance violation on a linked resource.
+   * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + * @return The compliance. + */ + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrence getCompliance() { + if (detailsCase_ == 16) { + return (io.grafeas.v1.ComplianceOccurrence) details_; + } + return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes a compliance violation on a linked resource.
+   * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrenceOrBuilder getComplianceOrBuilder() { + if (detailsCase_ == 16) { + return (io.grafeas.v1.ComplianceOccurrence) details_; + } + return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); + } + + public static final int DSSE_ATTESTATION_FIELD_NUMBER = 17; + /** + *
+   * Describes an attestation of an artifact using dsse.
+   * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + * @return Whether the dsseAttestation field is set. + */ + @java.lang.Override + public boolean hasDsseAttestation() { + return detailsCase_ == 17; + } + /** + *
+   * Describes an attestation of an artifact using dsse.
+   * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + * @return The dsseAttestation. + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrence getDsseAttestation() { + if (detailsCase_ == 17) { + return (io.grafeas.v1.DSSEAttestationOccurrence) details_; + } + return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes an attestation of an artifact using dsse.
+   * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder getDsseAttestationOrBuilder() { + if (detailsCase_ == 17) { + return (io.grafeas.v1.DSSEAttestationOccurrence) details_; + } + return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); + } + + public static final int ENVELOPE_FIELD_NUMBER = 18; + private io.grafeas.v1.Envelope envelope_; + /** + *
+   * https://github.com/secure-systems-lab/dsse
+   * 
+ * + * .grafeas.v1.Envelope envelope = 18; + * @return Whether the envelope field is set. + */ + @java.lang.Override + public boolean hasEnvelope() { + return envelope_ != null; + } + /** + *
+   * https://github.com/secure-systems-lab/dsse
+   * 
+ * + * .grafeas.v1.Envelope envelope = 18; + * @return The envelope. + */ + @java.lang.Override + public io.grafeas.v1.Envelope getEnvelope() { + return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } + /** + *
+   * https://github.com/secure-systems-lab/dsse
+   * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + @java.lang.Override + public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { + return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, noteName_); + } + if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(4, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remediation_); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(7, getUpdateTime()); + } + if (detailsCase_ == 8) { + output.writeMessage(8, (io.grafeas.v1.VulnerabilityOccurrence) details_); + } + if (detailsCase_ == 9) { + output.writeMessage(9, (io.grafeas.v1.BuildOccurrence) details_); + } + if (detailsCase_ == 10) { + output.writeMessage(10, (io.grafeas.v1.ImageOccurrence) details_); + } + if (detailsCase_ == 11) { + output.writeMessage(11, (io.grafeas.v1.PackageOccurrence) details_); + } + if (detailsCase_ == 12) { + output.writeMessage(12, (io.grafeas.v1.DeploymentOccurrence) details_); + } + if (detailsCase_ == 13) { + output.writeMessage(13, (io.grafeas.v1.DiscoveryOccurrence) details_); + } + if (detailsCase_ == 14) { + output.writeMessage(14, (io.grafeas.v1.AttestationOccurrence) details_); + } + if (detailsCase_ == 15) { + output.writeMessage(15, (io.grafeas.v1.UpgradeOccurrence) details_); + } + if (detailsCase_ == 16) { + output.writeMessage(16, (io.grafeas.v1.ComplianceOccurrence) details_); + } + if (detailsCase_ == 17) { + output.writeMessage(17, (io.grafeas.v1.DSSEAttestationOccurrence) details_); + } + if (envelope_ != null) { + output.writeMessage(18, getEnvelope()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, noteName_); + } + if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remediation_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getUpdateTime()); + } + if (detailsCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (io.grafeas.v1.VulnerabilityOccurrence) details_); + } + if (detailsCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (io.grafeas.v1.BuildOccurrence) details_); + } + if (detailsCase_ == 10) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, (io.grafeas.v1.ImageOccurrence) details_); + } + if (detailsCase_ == 11) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, (io.grafeas.v1.PackageOccurrence) details_); + } + if (detailsCase_ == 12) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, (io.grafeas.v1.DeploymentOccurrence) details_); + } + if (detailsCase_ == 13) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, (io.grafeas.v1.DiscoveryOccurrence) details_); + } + if (detailsCase_ == 14) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, (io.grafeas.v1.AttestationOccurrence) details_); + } + if (detailsCase_ == 15) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, (io.grafeas.v1.UpgradeOccurrence) details_); + } + if (detailsCase_ == 16) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, (io.grafeas.v1.ComplianceOccurrence) details_); + } + if (detailsCase_ == 17) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, (io.grafeas.v1.DSSEAttestationOccurrence) details_); + } + if (envelope_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getEnvelope()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Occurrence)) { + return super.equals(obj); + } + io.grafeas.v1.Occurrence other = (io.grafeas.v1.Occurrence) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getResourceUri() + .equals(other.getResourceUri())) return false; + if (!getNoteName() + .equals(other.getNoteName())) return false; + if (kind_ != other.kind_) return false; + if (!getRemediation() + .equals(other.getRemediation())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (hasEnvelope() != other.hasEnvelope()) return false; + if (hasEnvelope()) { + if (!getEnvelope() + .equals(other.getEnvelope())) return false; + } + if (!getDetailsCase().equals(other.getDetailsCase())) return false; + switch (detailsCase_) { + case 8: + if (!getVulnerability() + .equals(other.getVulnerability())) return false; + break; + case 9: + if (!getBuild() + .equals(other.getBuild())) return false; + break; + case 10: + if (!getImage() + .equals(other.getImage())) return false; + break; + case 11: + if (!getPackage() + .equals(other.getPackage())) return false; + break; + case 12: + if (!getDeployment() + .equals(other.getDeployment())) return false; + break; + case 13: + if (!getDiscovery() + .equals(other.getDiscovery())) return false; + break; + case 14: + if (!getAttestation() + .equals(other.getAttestation())) return false; + break; + case 15: + if (!getUpgrade() + .equals(other.getUpgrade())) return false; + break; + case 16: + if (!getCompliance() + .equals(other.getCompliance())) return false; + break; + case 17: + if (!getDsseAttestation() + .equals(other.getDsseAttestation())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + hash = (37 * hash) + NOTE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getNoteName().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + kind_; + hash = (37 * hash) + REMEDIATION_FIELD_NUMBER; + hash = (53 * hash) + getRemediation().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasEnvelope()) { + hash = (37 * hash) + ENVELOPE_FIELD_NUMBER; + hash = (53 * hash) + getEnvelope().hashCode(); + } + switch (detailsCase_) { + case 8: + hash = (37 * hash) + VULNERABILITY_FIELD_NUMBER; + hash = (53 * hash) + getVulnerability().hashCode(); + break; + case 9: + hash = (37 * hash) + BUILD_FIELD_NUMBER; + hash = (53 * hash) + getBuild().hashCode(); + break; + case 10: + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + break; + case 11: + hash = (37 * hash) + PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPackage().hashCode(); + break; + case 12: + hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getDeployment().hashCode(); + break; + case 13: + hash = (37 * hash) + DISCOVERY_FIELD_NUMBER; + hash = (53 * hash) + getDiscovery().hashCode(); + break; + case 14: + hash = (37 * hash) + ATTESTATION_FIELD_NUMBER; + hash = (53 * hash) + getAttestation().hashCode(); + break; + case 15: + hash = (37 * hash) + UPGRADE_FIELD_NUMBER; + hash = (53 * hash) + getUpgrade().hashCode(); + break; + case 16: + hash = (37 * hash) + COMPLIANCE_FIELD_NUMBER; + hash = (53 * hash) + getCompliance().hashCode(); + break; + case 17: + hash = (37 * hash) + DSSE_ATTESTATION_FIELD_NUMBER; + hash = (53 * hash) + getDsseAttestation().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Occurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Occurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Occurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Occurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Occurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Occurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Occurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Occurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Occurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Occurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Occurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Occurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Occurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An instance of an analysis type that has been found on a resource.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Occurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Occurrence) + io.grafeas.v1.OccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Occurrence.class, io.grafeas.v1.Occurrence.Builder.class); + } + + // Construct using io.grafeas.v1.Occurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + resourceUri_ = ""; + noteName_ = ""; + kind_ = 0; + remediation_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + if (vulnerabilityBuilder_ != null) { + vulnerabilityBuilder_.clear(); + } + if (buildBuilder_ != null) { + buildBuilder_.clear(); + } + if (imageBuilder_ != null) { + imageBuilder_.clear(); + } + if (packageBuilder_ != null) { + packageBuilder_.clear(); + } + if (deploymentBuilder_ != null) { + deploymentBuilder_.clear(); + } + if (discoveryBuilder_ != null) { + discoveryBuilder_.clear(); + } + if (attestationBuilder_ != null) { + attestationBuilder_.clear(); + } + if (upgradeBuilder_ != null) { + upgradeBuilder_.clear(); + } + if (complianceBuilder_ != null) { + complianceBuilder_.clear(); + } + if (dsseAttestationBuilder_ != null) { + dsseAttestationBuilder_.clear(); + } + envelope_ = null; + if (envelopeBuilder_ != null) { + envelopeBuilder_.dispose(); + envelopeBuilder_ = null; + } + detailsCase_ = 0; + details_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Occurrence getDefaultInstanceForType() { + return io.grafeas.v1.Occurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Occurrence build() { + io.grafeas.v1.Occurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Occurrence buildPartial() { + io.grafeas.v1.Occurrence result = new io.grafeas.v1.Occurrence(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Occurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceUri_ = resourceUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.noteName_ = noteName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.remediation_ = remediation_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.envelope_ = envelopeBuilder_ == null + ? envelope_ + : envelopeBuilder_.build(); + } + } + + private void buildPartialOneofs(io.grafeas.v1.Occurrence result) { + result.detailsCase_ = detailsCase_; + result.details_ = this.details_; + if (detailsCase_ == 8 && + vulnerabilityBuilder_ != null) { + result.details_ = vulnerabilityBuilder_.build(); + } + if (detailsCase_ == 9 && + buildBuilder_ != null) { + result.details_ = buildBuilder_.build(); + } + if (detailsCase_ == 10 && + imageBuilder_ != null) { + result.details_ = imageBuilder_.build(); + } + if (detailsCase_ == 11 && + packageBuilder_ != null) { + result.details_ = packageBuilder_.build(); + } + if (detailsCase_ == 12 && + deploymentBuilder_ != null) { + result.details_ = deploymentBuilder_.build(); + } + if (detailsCase_ == 13 && + discoveryBuilder_ != null) { + result.details_ = discoveryBuilder_.build(); + } + if (detailsCase_ == 14 && + attestationBuilder_ != null) { + result.details_ = attestationBuilder_.build(); + } + if (detailsCase_ == 15 && + upgradeBuilder_ != null) { + result.details_ = upgradeBuilder_.build(); + } + if (detailsCase_ == 16 && + complianceBuilder_ != null) { + result.details_ = complianceBuilder_.build(); + } + if (detailsCase_ == 17 && + dsseAttestationBuilder_ != null) { + result.details_ = dsseAttestationBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Occurrence) { + return mergeFrom((io.grafeas.v1.Occurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Occurrence other) { + if (other == io.grafeas.v1.Occurrence.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getNoteName().isEmpty()) { + noteName_ = other.noteName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.kind_ != 0) { + setKindValue(other.getKindValue()); + } + if (!other.getRemediation().isEmpty()) { + remediation_ = other.remediation_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasEnvelope()) { + mergeEnvelope(other.getEnvelope()); + } + switch (other.getDetailsCase()) { + case VULNERABILITY: { + mergeVulnerability(other.getVulnerability()); + break; + } + case BUILD: { + mergeBuild(other.getBuild()); + break; + } + case IMAGE: { + mergeImage(other.getImage()); + break; + } + case PACKAGE: { + mergePackage(other.getPackage()); + break; + } + case DEPLOYMENT: { + mergeDeployment(other.getDeployment()); + break; + } + case DISCOVERY: { + mergeDiscovery(other.getDiscovery()); + break; + } + case ATTESTATION: { + mergeAttestation(other.getAttestation()); + break; + } + case UPGRADE: { + mergeUpgrade(other.getUpgrade()); + break; + } + case COMPLIANCE: { + mergeCompliance(other.getCompliance()); + break; + } + case DSSE_ATTESTATION: { + mergeDsseAttestation(other.getDsseAttestation()); + break; + } + case DETAILS_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + resourceUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + noteName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + kind_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + remediation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getVulnerabilityFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 8; + break; + } // case 66 + case 74: { + input.readMessage( + getBuildFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 9; + break; + } // case 74 + case 82: { + input.readMessage( + getImageFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 10; + break; + } // case 82 + case 90: { + input.readMessage( + getPackageFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 11; + break; + } // case 90 + case 98: { + input.readMessage( + getDeploymentFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 12; + break; + } // case 98 + case 106: { + input.readMessage( + getDiscoveryFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 13; + break; + } // case 106 + case 114: { + input.readMessage( + getAttestationFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 14; + break; + } // case 114 + case 122: { + input.readMessage( + getUpgradeFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 15; + break; + } // case 122 + case 130: { + input.readMessage( + getComplianceFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 16; + break; + } // case 130 + case 138: { + input.readMessage( + getDsseAttestationFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 17; + break; + } // case 138 + case 146: { + input.readMessage( + getEnvelopeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 146 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int detailsCase_ = 0; + private java.lang.Object details_; + public DetailsCase + getDetailsCase() { + return DetailsCase.forNumber( + detailsCase_); + } + + public Builder clearDetails() { + detailsCase_ = 0; + details_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Output only. The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Output only. The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object resourceUri_ = ""; + /** + *
+     * Required. Immutable. A URI that represents the resource for which the
+     * occurrence applies. For example,
+     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+     * 
+ * + * string resource_uri = 2; + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Immutable. A URI that represents the resource for which the
+     * occurrence applies. For example,
+     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+     * 
+ * + * string resource_uri = 2; + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString + getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Immutable. A URI that represents the resource for which the
+     * occurrence applies. For example,
+     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+     * 
+ * + * string resource_uri = 2; + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resourceUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. A URI that represents the resource for which the
+     * occurrence applies. For example,
+     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+     * 
+ * + * string resource_uri = 2; + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + resourceUri_ = getDefaultInstance().getResourceUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. A URI that represents the resource for which the
+     * occurrence applies. For example,
+     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+     * 
+ * + * string resource_uri = 2; + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resourceUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object noteName_ = ""; + /** + *
+     * Required. Immutable. The analysis note associated with this occurrence, in
+     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+     * used as a filter in list requests.
+     * 
+ * + * string note_name = 3; + * @return The noteName. + */ + public java.lang.String getNoteName() { + java.lang.Object ref = noteName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Immutable. The analysis note associated with this occurrence, in
+     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+     * used as a filter in list requests.
+     * 
+ * + * string note_name = 3; + * @return The bytes for noteName. + */ + public com.google.protobuf.ByteString + getNoteNameBytes() { + java.lang.Object ref = noteName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + noteName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Immutable. The analysis note associated with this occurrence, in
+     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+     * used as a filter in list requests.
+     * 
+ * + * string note_name = 3; + * @param value The noteName to set. + * @return This builder for chaining. + */ + public Builder setNoteName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + noteName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The analysis note associated with this occurrence, in
+     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+     * used as a filter in list requests.
+     * 
+ * + * string note_name = 3; + * @return This builder for chaining. + */ + public Builder clearNoteName() { + noteName_ = getDefaultInstance().getNoteName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The analysis note associated with this occurrence, in
+     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+     * used as a filter in list requests.
+     * 
+ * + * string note_name = 3; + * @param value The bytes for noteName to set. + * @return This builder for chaining. + */ + public Builder setNoteNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + noteName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int kind_ = 0; + /** + *
+     * Output only. This explicitly denotes which of the occurrence details are
+     * specified. This field can be used as a filter in list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+     * Output only. This explicitly denotes which of the occurrence details are
+     * specified. This field can be used as a filter in list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @param value The enum numeric value on the wire for kind to set. + * @return This builder for chaining. + */ + public Builder setKindValue(int value) { + kind_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. This explicitly denotes which of the occurrence details are
+     * specified. This field can be used as a filter in list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The kind. + */ + @java.lang.Override + public io.grafeas.v1.NoteKind getKind() { + io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); + return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; + } + /** + *
+     * Output only. This explicitly denotes which of the occurrence details are
+     * specified. This field can be used as a filter in list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(io.grafeas.v1.NoteKind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. This explicitly denotes which of the occurrence details are
+     * specified. This field can be used as a filter in list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return This builder for chaining. + */ + public Builder clearKind() { + bitField0_ = (bitField0_ & ~0x00000008); + kind_ = 0; + onChanged(); + return this; + } + + private java.lang.Object remediation_ = ""; + /** + *
+     * A description of actions that can be taken to remedy the note.
+     * 
+ * + * string remediation = 5; + * @return The remediation. + */ + public java.lang.String getRemediation() { + java.lang.Object ref = remediation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remediation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A description of actions that can be taken to remedy the note.
+     * 
+ * + * string remediation = 5; + * @return The bytes for remediation. + */ + public com.google.protobuf.ByteString + getRemediationBytes() { + java.lang.Object ref = remediation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remediation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A description of actions that can be taken to remedy the note.
+     * 
+ * + * string remediation = 5; + * @param value The remediation to set. + * @return This builder for chaining. + */ + public Builder setRemediation( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + remediation_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * A description of actions that can be taken to remedy the note.
+     * 
+ * + * string remediation = 5; + * @return This builder for chaining. + */ + public Builder clearRemediation() { + remediation_ = getDefaultInstance().getRemediation(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * A description of actions that can be taken to remedy the note.
+     * 
+ * + * string remediation = 5; + * @param value The bytes for remediation to set. + * @return This builder for chaining. + */ + public Builder setRemediationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + remediation_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence, io.grafeas.v1.VulnerabilityOccurrence.Builder, io.grafeas.v1.VulnerabilityOccurrenceOrBuilder> vulnerabilityBuilder_; + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + * @return Whether the vulnerability field is set. + */ + @java.lang.Override + public boolean hasVulnerability() { + return detailsCase_ == 8; + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + * @return The vulnerability. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence getVulnerability() { + if (vulnerabilityBuilder_ == null) { + if (detailsCase_ == 8) { + return (io.grafeas.v1.VulnerabilityOccurrence) details_; + } + return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 8) { + return vulnerabilityBuilder_.getMessage(); + } + return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + public Builder setVulnerability(io.grafeas.v1.VulnerabilityOccurrence value) { + if (vulnerabilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + vulnerabilityBuilder_.setMessage(value); + } + detailsCase_ = 8; + return this; + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + public Builder setVulnerability( + io.grafeas.v1.VulnerabilityOccurrence.Builder builderForValue) { + if (vulnerabilityBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + vulnerabilityBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 8; + return this; + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + public Builder mergeVulnerability(io.grafeas.v1.VulnerabilityOccurrence value) { + if (vulnerabilityBuilder_ == null) { + if (detailsCase_ == 8 && + details_ != io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.VulnerabilityOccurrence.newBuilder((io.grafeas.v1.VulnerabilityOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 8) { + vulnerabilityBuilder_.mergeFrom(value); + } else { + vulnerabilityBuilder_.setMessage(value); + } + } + detailsCase_ = 8; + return this; + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + public Builder clearVulnerability() { + if (vulnerabilityBuilder_ == null) { + if (detailsCase_ == 8) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 8) { + detailsCase_ = 0; + details_ = null; + } + vulnerabilityBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + public io.grafeas.v1.VulnerabilityOccurrence.Builder getVulnerabilityBuilder() { + return getVulnerabilityFieldBuilder().getBuilder(); + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrenceOrBuilder getVulnerabilityOrBuilder() { + if ((detailsCase_ == 8) && (vulnerabilityBuilder_ != null)) { + return vulnerabilityBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 8) { + return (io.grafeas.v1.VulnerabilityOccurrence) details_; + } + return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence, io.grafeas.v1.VulnerabilityOccurrence.Builder, io.grafeas.v1.VulnerabilityOccurrenceOrBuilder> + getVulnerabilityFieldBuilder() { + if (vulnerabilityBuilder_ == null) { + if (!(detailsCase_ == 8)) { + details_ = io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); + } + vulnerabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence, io.grafeas.v1.VulnerabilityOccurrence.Builder, io.grafeas.v1.VulnerabilityOccurrenceOrBuilder>( + (io.grafeas.v1.VulnerabilityOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 8; + onChanged(); + return vulnerabilityBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildOccurrence, io.grafeas.v1.BuildOccurrence.Builder, io.grafeas.v1.BuildOccurrenceOrBuilder> buildBuilder_; + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + * @return Whether the build field is set. + */ + @java.lang.Override + public boolean hasBuild() { + return detailsCase_ == 9; + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + * @return The build. + */ + @java.lang.Override + public io.grafeas.v1.BuildOccurrence getBuild() { + if (buildBuilder_ == null) { + if (detailsCase_ == 9) { + return (io.grafeas.v1.BuildOccurrence) details_; + } + return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 9) { + return buildBuilder_.getMessage(); + } + return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + public Builder setBuild(io.grafeas.v1.BuildOccurrence value) { + if (buildBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + buildBuilder_.setMessage(value); + } + detailsCase_ = 9; + return this; + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + public Builder setBuild( + io.grafeas.v1.BuildOccurrence.Builder builderForValue) { + if (buildBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + buildBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 9; + return this; + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + public Builder mergeBuild(io.grafeas.v1.BuildOccurrence value) { + if (buildBuilder_ == null) { + if (detailsCase_ == 9 && + details_ != io.grafeas.v1.BuildOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.BuildOccurrence.newBuilder((io.grafeas.v1.BuildOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 9) { + buildBuilder_.mergeFrom(value); + } else { + buildBuilder_.setMessage(value); + } + } + detailsCase_ = 9; + return this; + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + public Builder clearBuild() { + if (buildBuilder_ == null) { + if (detailsCase_ == 9) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 9) { + detailsCase_ = 0; + details_ = null; + } + buildBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + public io.grafeas.v1.BuildOccurrence.Builder getBuildBuilder() { + return getBuildFieldBuilder().getBuilder(); + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + @java.lang.Override + public io.grafeas.v1.BuildOccurrenceOrBuilder getBuildOrBuilder() { + if ((detailsCase_ == 9) && (buildBuilder_ != null)) { + return buildBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 9) { + return (io.grafeas.v1.BuildOccurrence) details_; + } + return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildOccurrence, io.grafeas.v1.BuildOccurrence.Builder, io.grafeas.v1.BuildOccurrenceOrBuilder> + getBuildFieldBuilder() { + if (buildBuilder_ == null) { + if (!(detailsCase_ == 9)) { + details_ = io.grafeas.v1.BuildOccurrence.getDefaultInstance(); + } + buildBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildOccurrence, io.grafeas.v1.BuildOccurrence.Builder, io.grafeas.v1.BuildOccurrenceOrBuilder>( + (io.grafeas.v1.BuildOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 9; + onChanged(); + return buildBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ImageOccurrence, io.grafeas.v1.ImageOccurrence.Builder, io.grafeas.v1.ImageOccurrenceOrBuilder> imageBuilder_; + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return detailsCase_ == 10; + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + * @return The image. + */ + @java.lang.Override + public io.grafeas.v1.ImageOccurrence getImage() { + if (imageBuilder_ == null) { + if (detailsCase_ == 10) { + return (io.grafeas.v1.ImageOccurrence) details_; + } + return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 10) { + return imageBuilder_.getMessage(); + } + return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + public Builder setImage(io.grafeas.v1.ImageOccurrence value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + imageBuilder_.setMessage(value); + } + detailsCase_ = 10; + return this; + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + public Builder setImage( + io.grafeas.v1.ImageOccurrence.Builder builderForValue) { + if (imageBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 10; + return this; + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + public Builder mergeImage(io.grafeas.v1.ImageOccurrence value) { + if (imageBuilder_ == null) { + if (detailsCase_ == 10 && + details_ != io.grafeas.v1.ImageOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.ImageOccurrence.newBuilder((io.grafeas.v1.ImageOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 10) { + imageBuilder_.mergeFrom(value); + } else { + imageBuilder_.setMessage(value); + } + } + detailsCase_ = 10; + return this; + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + public Builder clearImage() { + if (imageBuilder_ == null) { + if (detailsCase_ == 10) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 10) { + detailsCase_ = 0; + details_ = null; + } + imageBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + public io.grafeas.v1.ImageOccurrence.Builder getImageBuilder() { + return getImageFieldBuilder().getBuilder(); + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + @java.lang.Override + public io.grafeas.v1.ImageOccurrenceOrBuilder getImageOrBuilder() { + if ((detailsCase_ == 10) && (imageBuilder_ != null)) { + return imageBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 10) { + return (io.grafeas.v1.ImageOccurrence) details_; + } + return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ImageOccurrence, io.grafeas.v1.ImageOccurrence.Builder, io.grafeas.v1.ImageOccurrenceOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + if (!(detailsCase_ == 10)) { + details_ = io.grafeas.v1.ImageOccurrence.getDefaultInstance(); + } + imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ImageOccurrence, io.grafeas.v1.ImageOccurrence.Builder, io.grafeas.v1.ImageOccurrenceOrBuilder>( + (io.grafeas.v1.ImageOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 10; + onChanged(); + return imageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.PackageOccurrence, io.grafeas.v1.PackageOccurrence.Builder, io.grafeas.v1.PackageOccurrenceOrBuilder> packageBuilder_; + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + * @return Whether the package field is set. + */ + @java.lang.Override + public boolean hasPackage() { + return detailsCase_ == 11; + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + * @return The package. + */ + @java.lang.Override + public io.grafeas.v1.PackageOccurrence getPackage() { + if (packageBuilder_ == null) { + if (detailsCase_ == 11) { + return (io.grafeas.v1.PackageOccurrence) details_; + } + return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 11) { + return packageBuilder_.getMessage(); + } + return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + public Builder setPackage(io.grafeas.v1.PackageOccurrence value) { + if (packageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + packageBuilder_.setMessage(value); + } + detailsCase_ = 11; + return this; + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + public Builder setPackage( + io.grafeas.v1.PackageOccurrence.Builder builderForValue) { + if (packageBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + packageBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 11; + return this; + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + public Builder mergePackage(io.grafeas.v1.PackageOccurrence value) { + if (packageBuilder_ == null) { + if (detailsCase_ == 11 && + details_ != io.grafeas.v1.PackageOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.PackageOccurrence.newBuilder((io.grafeas.v1.PackageOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 11) { + packageBuilder_.mergeFrom(value); + } else { + packageBuilder_.setMessage(value); + } + } + detailsCase_ = 11; + return this; + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + public Builder clearPackage() { + if (packageBuilder_ == null) { + if (detailsCase_ == 11) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 11) { + detailsCase_ = 0; + details_ = null; + } + packageBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + public io.grafeas.v1.PackageOccurrence.Builder getPackageBuilder() { + return getPackageFieldBuilder().getBuilder(); + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + @java.lang.Override + public io.grafeas.v1.PackageOccurrenceOrBuilder getPackageOrBuilder() { + if ((detailsCase_ == 11) && (packageBuilder_ != null)) { + return packageBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 11) { + return (io.grafeas.v1.PackageOccurrence) details_; + } + return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.PackageOccurrence, io.grafeas.v1.PackageOccurrence.Builder, io.grafeas.v1.PackageOccurrenceOrBuilder> + getPackageFieldBuilder() { + if (packageBuilder_ == null) { + if (!(detailsCase_ == 11)) { + details_ = io.grafeas.v1.PackageOccurrence.getDefaultInstance(); + } + packageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.PackageOccurrence, io.grafeas.v1.PackageOccurrence.Builder, io.grafeas.v1.PackageOccurrenceOrBuilder>( + (io.grafeas.v1.PackageOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 11; + onChanged(); + return packageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DeploymentOccurrence, io.grafeas.v1.DeploymentOccurrence.Builder, io.grafeas.v1.DeploymentOccurrenceOrBuilder> deploymentBuilder_; + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + * @return Whether the deployment field is set. + */ + @java.lang.Override + public boolean hasDeployment() { + return detailsCase_ == 12; + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + * @return The deployment. + */ + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrence getDeployment() { + if (deploymentBuilder_ == null) { + if (detailsCase_ == 12) { + return (io.grafeas.v1.DeploymentOccurrence) details_; + } + return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 12) { + return deploymentBuilder_.getMessage(); + } + return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + public Builder setDeployment(io.grafeas.v1.DeploymentOccurrence value) { + if (deploymentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + deploymentBuilder_.setMessage(value); + } + detailsCase_ = 12; + return this; + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + public Builder setDeployment( + io.grafeas.v1.DeploymentOccurrence.Builder builderForValue) { + if (deploymentBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + deploymentBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 12; + return this; + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + public Builder mergeDeployment(io.grafeas.v1.DeploymentOccurrence value) { + if (deploymentBuilder_ == null) { + if (detailsCase_ == 12 && + details_ != io.grafeas.v1.DeploymentOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.DeploymentOccurrence.newBuilder((io.grafeas.v1.DeploymentOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 12) { + deploymentBuilder_.mergeFrom(value); + } else { + deploymentBuilder_.setMessage(value); + } + } + detailsCase_ = 12; + return this; + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + public Builder clearDeployment() { + if (deploymentBuilder_ == null) { + if (detailsCase_ == 12) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 12) { + detailsCase_ = 0; + details_ = null; + } + deploymentBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + public io.grafeas.v1.DeploymentOccurrence.Builder getDeploymentBuilder() { + return getDeploymentFieldBuilder().getBuilder(); + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrenceOrBuilder getDeploymentOrBuilder() { + if ((detailsCase_ == 12) && (deploymentBuilder_ != null)) { + return deploymentBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 12) { + return (io.grafeas.v1.DeploymentOccurrence) details_; + } + return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DeploymentOccurrence, io.grafeas.v1.DeploymentOccurrence.Builder, io.grafeas.v1.DeploymentOccurrenceOrBuilder> + getDeploymentFieldBuilder() { + if (deploymentBuilder_ == null) { + if (!(detailsCase_ == 12)) { + details_ = io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); + } + deploymentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DeploymentOccurrence, io.grafeas.v1.DeploymentOccurrence.Builder, io.grafeas.v1.DeploymentOccurrenceOrBuilder>( + (io.grafeas.v1.DeploymentOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 12; + onChanged(); + return deploymentBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryOccurrence, io.grafeas.v1.DiscoveryOccurrence.Builder, io.grafeas.v1.DiscoveryOccurrenceOrBuilder> discoveryBuilder_; + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + * @return Whether the discovery field is set. + */ + @java.lang.Override + public boolean hasDiscovery() { + return detailsCase_ == 13; + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + * @return The discovery. + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence getDiscovery() { + if (discoveryBuilder_ == null) { + if (detailsCase_ == 13) { + return (io.grafeas.v1.DiscoveryOccurrence) details_; + } + return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 13) { + return discoveryBuilder_.getMessage(); + } + return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + public Builder setDiscovery(io.grafeas.v1.DiscoveryOccurrence value) { + if (discoveryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + discoveryBuilder_.setMessage(value); + } + detailsCase_ = 13; + return this; + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + public Builder setDiscovery( + io.grafeas.v1.DiscoveryOccurrence.Builder builderForValue) { + if (discoveryBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + discoveryBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 13; + return this; + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + public Builder mergeDiscovery(io.grafeas.v1.DiscoveryOccurrence value) { + if (discoveryBuilder_ == null) { + if (detailsCase_ == 13 && + details_ != io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.DiscoveryOccurrence.newBuilder((io.grafeas.v1.DiscoveryOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 13) { + discoveryBuilder_.mergeFrom(value); + } else { + discoveryBuilder_.setMessage(value); + } + } + detailsCase_ = 13; + return this; + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + public Builder clearDiscovery() { + if (discoveryBuilder_ == null) { + if (detailsCase_ == 13) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 13) { + detailsCase_ = 0; + details_ = null; + } + discoveryBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + public io.grafeas.v1.DiscoveryOccurrence.Builder getDiscoveryBuilder() { + return getDiscoveryFieldBuilder().getBuilder(); + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrenceOrBuilder getDiscoveryOrBuilder() { + if ((detailsCase_ == 13) && (discoveryBuilder_ != null)) { + return discoveryBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 13) { + return (io.grafeas.v1.DiscoveryOccurrence) details_; + } + return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryOccurrence, io.grafeas.v1.DiscoveryOccurrence.Builder, io.grafeas.v1.DiscoveryOccurrenceOrBuilder> + getDiscoveryFieldBuilder() { + if (discoveryBuilder_ == null) { + if (!(detailsCase_ == 13)) { + details_ = io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); + } + discoveryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryOccurrence, io.grafeas.v1.DiscoveryOccurrence.Builder, io.grafeas.v1.DiscoveryOccurrenceOrBuilder>( + (io.grafeas.v1.DiscoveryOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 13; + onChanged(); + return discoveryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationOccurrence, io.grafeas.v1.AttestationOccurrence.Builder, io.grafeas.v1.AttestationOccurrenceOrBuilder> attestationBuilder_; + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + * @return Whether the attestation field is set. + */ + @java.lang.Override + public boolean hasAttestation() { + return detailsCase_ == 14; + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + * @return The attestation. + */ + @java.lang.Override + public io.grafeas.v1.AttestationOccurrence getAttestation() { + if (attestationBuilder_ == null) { + if (detailsCase_ == 14) { + return (io.grafeas.v1.AttestationOccurrence) details_; + } + return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 14) { + return attestationBuilder_.getMessage(); + } + return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + public Builder setAttestation(io.grafeas.v1.AttestationOccurrence value) { + if (attestationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + attestationBuilder_.setMessage(value); + } + detailsCase_ = 14; + return this; + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + public Builder setAttestation( + io.grafeas.v1.AttestationOccurrence.Builder builderForValue) { + if (attestationBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + attestationBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 14; + return this; + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + public Builder mergeAttestation(io.grafeas.v1.AttestationOccurrence value) { + if (attestationBuilder_ == null) { + if (detailsCase_ == 14 && + details_ != io.grafeas.v1.AttestationOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.AttestationOccurrence.newBuilder((io.grafeas.v1.AttestationOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 14) { + attestationBuilder_.mergeFrom(value); + } else { + attestationBuilder_.setMessage(value); + } + } + detailsCase_ = 14; + return this; + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + public Builder clearAttestation() { + if (attestationBuilder_ == null) { + if (detailsCase_ == 14) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 14) { + detailsCase_ = 0; + details_ = null; + } + attestationBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + public io.grafeas.v1.AttestationOccurrence.Builder getAttestationBuilder() { + return getAttestationFieldBuilder().getBuilder(); + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + @java.lang.Override + public io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder() { + if ((detailsCase_ == 14) && (attestationBuilder_ != null)) { + return attestationBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 14) { + return (io.grafeas.v1.AttestationOccurrence) details_; + } + return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationOccurrence, io.grafeas.v1.AttestationOccurrence.Builder, io.grafeas.v1.AttestationOccurrenceOrBuilder> + getAttestationFieldBuilder() { + if (attestationBuilder_ == null) { + if (!(detailsCase_ == 14)) { + details_ = io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); + } + attestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationOccurrence, io.grafeas.v1.AttestationOccurrence.Builder, io.grafeas.v1.AttestationOccurrenceOrBuilder>( + (io.grafeas.v1.AttestationOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 14; + onChanged(); + return attestationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeOccurrence, io.grafeas.v1.UpgradeOccurrence.Builder, io.grafeas.v1.UpgradeOccurrenceOrBuilder> upgradeBuilder_; + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * @return Whether the upgrade field is set. + */ + @java.lang.Override + public boolean hasUpgrade() { + return detailsCase_ == 15; + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * @return The upgrade. + */ + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrence getUpgrade() { + if (upgradeBuilder_ == null) { + if (detailsCase_ == 15) { + return (io.grafeas.v1.UpgradeOccurrence) details_; + } + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 15) { + return upgradeBuilder_.getMessage(); + } + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public Builder setUpgrade(io.grafeas.v1.UpgradeOccurrence value) { + if (upgradeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + upgradeBuilder_.setMessage(value); + } + detailsCase_ = 15; + return this; + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public Builder setUpgrade( + io.grafeas.v1.UpgradeOccurrence.Builder builderForValue) { + if (upgradeBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + upgradeBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 15; + return this; + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public Builder mergeUpgrade(io.grafeas.v1.UpgradeOccurrence value) { + if (upgradeBuilder_ == null) { + if (detailsCase_ == 15 && + details_ != io.grafeas.v1.UpgradeOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.UpgradeOccurrence.newBuilder((io.grafeas.v1.UpgradeOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 15) { + upgradeBuilder_.mergeFrom(value); + } else { + upgradeBuilder_.setMessage(value); + } + } + detailsCase_ = 15; + return this; + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public Builder clearUpgrade() { + if (upgradeBuilder_ == null) { + if (detailsCase_ == 15) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 15) { + detailsCase_ = 0; + details_ = null; + } + upgradeBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public io.grafeas.v1.UpgradeOccurrence.Builder getUpgradeBuilder() { + return getUpgradeFieldBuilder().getBuilder(); + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrenceOrBuilder getUpgradeOrBuilder() { + if ((detailsCase_ == 15) && (upgradeBuilder_ != null)) { + return upgradeBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 15) { + return (io.grafeas.v1.UpgradeOccurrence) details_; + } + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeOccurrence, io.grafeas.v1.UpgradeOccurrence.Builder, io.grafeas.v1.UpgradeOccurrenceOrBuilder> + getUpgradeFieldBuilder() { + if (upgradeBuilder_ == null) { + if (!(detailsCase_ == 15)) { + details_ = io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + upgradeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeOccurrence, io.grafeas.v1.UpgradeOccurrence.Builder, io.grafeas.v1.UpgradeOccurrenceOrBuilder>( + (io.grafeas.v1.UpgradeOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 15; + onChanged(); + return upgradeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceOccurrence, io.grafeas.v1.ComplianceOccurrence.Builder, io.grafeas.v1.ComplianceOccurrenceOrBuilder> complianceBuilder_; + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + * @return Whether the compliance field is set. + */ + @java.lang.Override + public boolean hasCompliance() { + return detailsCase_ == 16; + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + * @return The compliance. + */ + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrence getCompliance() { + if (complianceBuilder_ == null) { + if (detailsCase_ == 16) { + return (io.grafeas.v1.ComplianceOccurrence) details_; + } + return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 16) { + return complianceBuilder_.getMessage(); + } + return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + public Builder setCompliance(io.grafeas.v1.ComplianceOccurrence value) { + if (complianceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + complianceBuilder_.setMessage(value); + } + detailsCase_ = 16; + return this; + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + public Builder setCompliance( + io.grafeas.v1.ComplianceOccurrence.Builder builderForValue) { + if (complianceBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + complianceBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 16; + return this; + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + public Builder mergeCompliance(io.grafeas.v1.ComplianceOccurrence value) { + if (complianceBuilder_ == null) { + if (detailsCase_ == 16 && + details_ != io.grafeas.v1.ComplianceOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.ComplianceOccurrence.newBuilder((io.grafeas.v1.ComplianceOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 16) { + complianceBuilder_.mergeFrom(value); + } else { + complianceBuilder_.setMessage(value); + } + } + detailsCase_ = 16; + return this; + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + public Builder clearCompliance() { + if (complianceBuilder_ == null) { + if (detailsCase_ == 16) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 16) { + detailsCase_ = 0; + details_ = null; + } + complianceBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + public io.grafeas.v1.ComplianceOccurrence.Builder getComplianceBuilder() { + return getComplianceFieldBuilder().getBuilder(); + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrenceOrBuilder getComplianceOrBuilder() { + if ((detailsCase_ == 16) && (complianceBuilder_ != null)) { + return complianceBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 16) { + return (io.grafeas.v1.ComplianceOccurrence) details_; + } + return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceOccurrence, io.grafeas.v1.ComplianceOccurrence.Builder, io.grafeas.v1.ComplianceOccurrenceOrBuilder> + getComplianceFieldBuilder() { + if (complianceBuilder_ == null) { + if (!(detailsCase_ == 16)) { + details_ = io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); + } + complianceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceOccurrence, io.grafeas.v1.ComplianceOccurrence.Builder, io.grafeas.v1.ComplianceOccurrenceOrBuilder>( + (io.grafeas.v1.ComplianceOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 16; + onChanged(); + return complianceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationOccurrence, io.grafeas.v1.DSSEAttestationOccurrence.Builder, io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder> dsseAttestationBuilder_; + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + * @return Whether the dsseAttestation field is set. + */ + @java.lang.Override + public boolean hasDsseAttestation() { + return detailsCase_ == 17; + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + * @return The dsseAttestation. + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrence getDsseAttestation() { + if (dsseAttestationBuilder_ == null) { + if (detailsCase_ == 17) { + return (io.grafeas.v1.DSSEAttestationOccurrence) details_; + } + return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 17) { + return dsseAttestationBuilder_.getMessage(); + } + return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + public Builder setDsseAttestation(io.grafeas.v1.DSSEAttestationOccurrence value) { + if (dsseAttestationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + dsseAttestationBuilder_.setMessage(value); + } + detailsCase_ = 17; + return this; + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + public Builder setDsseAttestation( + io.grafeas.v1.DSSEAttestationOccurrence.Builder builderForValue) { + if (dsseAttestationBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + dsseAttestationBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 17; + return this; + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + public Builder mergeDsseAttestation(io.grafeas.v1.DSSEAttestationOccurrence value) { + if (dsseAttestationBuilder_ == null) { + if (detailsCase_ == 17 && + details_ != io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.DSSEAttestationOccurrence.newBuilder((io.grafeas.v1.DSSEAttestationOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 17) { + dsseAttestationBuilder_.mergeFrom(value); + } else { + dsseAttestationBuilder_.setMessage(value); + } + } + detailsCase_ = 17; + return this; + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + public Builder clearDsseAttestation() { + if (dsseAttestationBuilder_ == null) { + if (detailsCase_ == 17) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 17) { + detailsCase_ = 0; + details_ = null; + } + dsseAttestationBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + public io.grafeas.v1.DSSEAttestationOccurrence.Builder getDsseAttestationBuilder() { + return getDsseAttestationFieldBuilder().getBuilder(); + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder getDsseAttestationOrBuilder() { + if ((detailsCase_ == 17) && (dsseAttestationBuilder_ != null)) { + return dsseAttestationBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 17) { + return (io.grafeas.v1.DSSEAttestationOccurrence) details_; + } + return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationOccurrence, io.grafeas.v1.DSSEAttestationOccurrence.Builder, io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder> + getDsseAttestationFieldBuilder() { + if (dsseAttestationBuilder_ == null) { + if (!(detailsCase_ == 17)) { + details_ = io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); + } + dsseAttestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationOccurrence, io.grafeas.v1.DSSEAttestationOccurrence.Builder, io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder>( + (io.grafeas.v1.DSSEAttestationOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 17; + onChanged(); + return dsseAttestationBuilder_; + } + + private io.grafeas.v1.Envelope envelope_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> envelopeBuilder_; + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + * @return Whether the envelope field is set. + */ + public boolean hasEnvelope() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + * @return The envelope. + */ + public io.grafeas.v1.Envelope getEnvelope() { + if (envelopeBuilder_ == null) { + return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } else { + return envelopeBuilder_.getMessage(); + } + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + public Builder setEnvelope(io.grafeas.v1.Envelope value) { + if (envelopeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + envelope_ = value; + } else { + envelopeBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + public Builder setEnvelope( + io.grafeas.v1.Envelope.Builder builderForValue) { + if (envelopeBuilder_ == null) { + envelope_ = builderForValue.build(); + } else { + envelopeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + public Builder mergeEnvelope(io.grafeas.v1.Envelope value) { + if (envelopeBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) && + envelope_ != null && + envelope_ != io.grafeas.v1.Envelope.getDefaultInstance()) { + getEnvelopeBuilder().mergeFrom(value); + } else { + envelope_ = value; + } + } else { + envelopeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + public Builder clearEnvelope() { + bitField0_ = (bitField0_ & ~0x00020000); + envelope_ = null; + if (envelopeBuilder_ != null) { + envelopeBuilder_.dispose(); + envelopeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + public io.grafeas.v1.Envelope.Builder getEnvelopeBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getEnvelopeFieldBuilder().getBuilder(); + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { + if (envelopeBuilder_ != null) { + return envelopeBuilder_.getMessageOrBuilder(); + } else { + return envelope_ == null ? + io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> + getEnvelopeFieldBuilder() { + if (envelopeBuilder_ == null) { + envelopeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder>( + getEnvelope(), + getParentForChildren(), + isClean()); + envelope_ = null; + } + return envelopeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Occurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Occurrence) + private static final io.grafeas.v1.Occurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Occurrence(); + } + + public static io.grafeas.v1.Occurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Occurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Occurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java new file mode 100644 index 000000000000..b4dc17a5f67a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class OccurrenceName implements ResourceName { + private static final PathTemplate PROJECT_OCCURRENCE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/occurrences/{occurrence}"); + private volatile Map fieldValuesMap; + private final String project; + private final String occurrence; + + @Deprecated + protected OccurrenceName() { + project = null; + occurrence = null; + } + + private OccurrenceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + occurrence = Preconditions.checkNotNull(builder.getOccurrence()); + } + + public String getProject() { + return project; + } + + public String getOccurrence() { + return occurrence; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static OccurrenceName of(String project, String occurrence) { + return newBuilder().setProject(project).setOccurrence(occurrence).build(); + } + + public static String format(String project, String occurrence) { + return newBuilder().setProject(project).setOccurrence(occurrence).build().toString(); + } + + public static OccurrenceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_OCCURRENCE.validatedMatch( + formattedString, "OccurrenceName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("occurrence")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (OccurrenceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_OCCURRENCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (occurrence != null) { + fieldMapBuilder.put("occurrence", occurrence); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_OCCURRENCE.instantiate("project", project, "occurrence", occurrence); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + OccurrenceName that = ((OccurrenceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.occurrence, that.occurrence); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(occurrence); + return h; + } + + /** Builder for projects/{project}/occurrences/{occurrence}. */ + public static class Builder { + private String project; + private String occurrence; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getOccurrence() { + return occurrence; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setOccurrence(String occurrence) { + this.occurrence = occurrence; + return this; + } + + private Builder(OccurrenceName occurrenceName) { + this.project = occurrenceName.project; + this.occurrence = occurrenceName.occurrence; + } + + public OccurrenceName build() { + return new OccurrenceName(this); + } + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java new file mode 100644 index 000000000000..bbc9843777f1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java @@ -0,0 +1,476 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface OccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Occurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Output only. The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required. Immutable. A URI that represents the resource for which the
+   * occurrence applies. For example,
+   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+   * 
+ * + * string resource_uri = 2; + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + /** + *
+   * Required. Immutable. A URI that represents the resource for which the
+   * occurrence applies. For example,
+   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+   * 
+ * + * string resource_uri = 2; + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString + getResourceUriBytes(); + + /** + *
+   * Required. Immutable. The analysis note associated with this occurrence, in
+   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+   * used as a filter in list requests.
+   * 
+ * + * string note_name = 3; + * @return The noteName. + */ + java.lang.String getNoteName(); + /** + *
+   * Required. Immutable. The analysis note associated with this occurrence, in
+   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+   * used as a filter in list requests.
+   * 
+ * + * string note_name = 3; + * @return The bytes for noteName. + */ + com.google.protobuf.ByteString + getNoteNameBytes(); + + /** + *
+   * Output only. This explicitly denotes which of the occurrence details are
+   * specified. This field can be used as a filter in list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + int getKindValue(); + /** + *
+   * Output only. This explicitly denotes which of the occurrence details are
+   * specified. This field can be used as a filter in list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The kind. + */ + io.grafeas.v1.NoteKind getKind(); + + /** + *
+   * A description of actions that can be taken to remedy the note.
+   * 
+ * + * string remediation = 5; + * @return The remediation. + */ + java.lang.String getRemediation(); + /** + *
+   * A description of actions that can be taken to remedy the note.
+   * 
+ * + * string remediation = 5; + * @return The bytes for remediation. + */ + com.google.protobuf.ByteString + getRemediationBytes(); + + /** + *
+   * Output only. The time this occurrence was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time this occurrence was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time this occurrence was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time this occurrence was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The time this occurrence was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The time this occurrence was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * Describes a security vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + * @return Whether the vulnerability field is set. + */ + boolean hasVulnerability(); + /** + *
+   * Describes a security vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + * @return The vulnerability. + */ + io.grafeas.v1.VulnerabilityOccurrence getVulnerability(); + /** + *
+   * Describes a security vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + io.grafeas.v1.VulnerabilityOccurrenceOrBuilder getVulnerabilityOrBuilder(); + + /** + *
+   * Describes a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + * @return Whether the build field is set. + */ + boolean hasBuild(); + /** + *
+   * Describes a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + * @return The build. + */ + io.grafeas.v1.BuildOccurrence getBuild(); + /** + *
+   * Describes a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + io.grafeas.v1.BuildOccurrenceOrBuilder getBuildOrBuilder(); + + /** + *
+   * Describes how this resource derives from the basis in the associated
+   * note.
+   * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + * @return Whether the image field is set. + */ + boolean hasImage(); + /** + *
+   * Describes how this resource derives from the basis in the associated
+   * note.
+   * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + * @return The image. + */ + io.grafeas.v1.ImageOccurrence getImage(); + /** + *
+   * Describes how this resource derives from the basis in the associated
+   * note.
+   * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + io.grafeas.v1.ImageOccurrenceOrBuilder getImageOrBuilder(); + + /** + *
+   * Describes the installation of a package on the linked resource.
+   * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + * @return Whether the package field is set. + */ + boolean hasPackage(); + /** + *
+   * Describes the installation of a package on the linked resource.
+   * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + * @return The package. + */ + io.grafeas.v1.PackageOccurrence getPackage(); + /** + *
+   * Describes the installation of a package on the linked resource.
+   * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + io.grafeas.v1.PackageOccurrenceOrBuilder getPackageOrBuilder(); + + /** + *
+   * Describes the deployment of an artifact on a runtime.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + * @return Whether the deployment field is set. + */ + boolean hasDeployment(); + /** + *
+   * Describes the deployment of an artifact on a runtime.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + * @return The deployment. + */ + io.grafeas.v1.DeploymentOccurrence getDeployment(); + /** + *
+   * Describes the deployment of an artifact on a runtime.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + io.grafeas.v1.DeploymentOccurrenceOrBuilder getDeploymentOrBuilder(); + + /** + *
+   * Describes when a resource was discovered.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + * @return Whether the discovery field is set. + */ + boolean hasDiscovery(); + /** + *
+   * Describes when a resource was discovered.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + * @return The discovery. + */ + io.grafeas.v1.DiscoveryOccurrence getDiscovery(); + /** + *
+   * Describes when a resource was discovered.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + io.grafeas.v1.DiscoveryOccurrenceOrBuilder getDiscoveryOrBuilder(); + + /** + *
+   * Describes an attestation of an artifact.
+   * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + * @return Whether the attestation field is set. + */ + boolean hasAttestation(); + /** + *
+   * Describes an attestation of an artifact.
+   * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + * @return The attestation. + */ + io.grafeas.v1.AttestationOccurrence getAttestation(); + /** + *
+   * Describes an attestation of an artifact.
+   * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder(); + + /** + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * @return Whether the upgrade field is set. + */ + boolean hasUpgrade(); + /** + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * @return The upgrade. + */ + io.grafeas.v1.UpgradeOccurrence getUpgrade(); + /** + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + io.grafeas.v1.UpgradeOccurrenceOrBuilder getUpgradeOrBuilder(); + + /** + *
+   * Describes a compliance violation on a linked resource.
+   * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + * @return Whether the compliance field is set. + */ + boolean hasCompliance(); + /** + *
+   * Describes a compliance violation on a linked resource.
+   * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + * @return The compliance. + */ + io.grafeas.v1.ComplianceOccurrence getCompliance(); + /** + *
+   * Describes a compliance violation on a linked resource.
+   * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + io.grafeas.v1.ComplianceOccurrenceOrBuilder getComplianceOrBuilder(); + + /** + *
+   * Describes an attestation of an artifact using dsse.
+   * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + * @return Whether the dsseAttestation field is set. + */ + boolean hasDsseAttestation(); + /** + *
+   * Describes an attestation of an artifact using dsse.
+   * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + * @return The dsseAttestation. + */ + io.grafeas.v1.DSSEAttestationOccurrence getDsseAttestation(); + /** + *
+   * Describes an attestation of an artifact using dsse.
+   * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder getDsseAttestationOrBuilder(); + + /** + *
+   * https://github.com/secure-systems-lab/dsse
+   * 
+ * + * .grafeas.v1.Envelope envelope = 18; + * @return Whether the envelope field is set. + */ + boolean hasEnvelope(); + /** + *
+   * https://github.com/secure-systems-lab/dsse
+   * 
+ * + * .grafeas.v1.Envelope envelope = 18; + * @return The envelope. + */ + io.grafeas.v1.Envelope getEnvelope(); + /** + *
+   * https://github.com/secure-systems-lab/dsse
+   * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder(); + + public io.grafeas.v1.Occurrence.DetailsCase getDetailsCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java new file mode 100644 index 000000000000..d25d6b95e71b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +public final class Package { + private Package() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Distribution_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Distribution_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Location_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Location_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_PackageNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_PackageNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_PackageOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Version_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Version_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\030grafeas/v1/package.proto\022\ngrafeas.v1\032\037" + + "google/api/field_behavior.proto\032\027grafeas" + + "/v1/common.proto\"\267\001\n\014Distribution\022\024\n\007cpe" + + "_uri\030\001 \001(\tB\003\340A\002\022.\n\014architecture\030\002 \001(\0162\030." + + "grafeas.v1.Architecture\022+\n\016latest_versio" + + "n\030\003 \001(\0132\023.grafeas.v1.Version\022\022\n\nmaintain" + + "er\030\004 \001(\t\022\013\n\003url\030\005 \001(\t\022\023\n\013description\030\006 \001" + + "(\t\"O\n\010Location\022\017\n\007cpe_uri\030\001 \001(\t\022$\n\007versi" + + "on\030\002 \001(\0132\023.grafeas.v1.Version\022\014\n\004path\030\003 " + + "\001(\t\"\320\002\n\013PackageNote\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A" + + "\005\022.\n\014distribution\030\n \003(\0132\030.grafeas.v1.Dis" + + "tribution\022\024\n\014package_type\030\013 \001(\t\022\017\n\007cpe_u" + + "ri\030\014 \001(\t\022.\n\014architecture\030\r \001(\0162\030.grafeas" + + ".v1.Architecture\022$\n\007version\030\016 \001(\0132\023.graf" + + "eas.v1.Version\022\022\n\nmaintainer\030\017 \001(\t\022\013\n\003ur" + + "l\030\020 \001(\t\022\023\n\013description\030\021 \001(\t\022$\n\007license\030" + + "\022 \001(\0132\023.grafeas.v1.License\022\"\n\006digest\030\023 \003" + + "(\0132\022.grafeas.v1.Digest\"\210\002\n\021PackageOccurr" + + "ence\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\003\022&\n\010location\030\002" + + " \003(\0132\024.grafeas.v1.Location\022\031\n\014package_ty" + + "pe\030\003 \001(\tB\003\340A\003\022\024\n\007cpe_uri\030\004 \001(\tB\003\340A\003\0223\n\014a" + + "rchitecture\030\005 \001(\0162\030.grafeas.v1.Architect" + + "ureB\003\340A\003\022$\n\007license\030\006 \001(\0132\023.grafeas.v1.L" + + "icense\022)\n\007version\030\007 \001(\0132\023.grafeas.v1.Ver" + + "sionB\003\340A\003\"\340\001\n\007Version\022\r\n\005epoch\030\001 \001(\005\022\014\n\004" + + "name\030\002 \001(\t\022\020\n\010revision\030\003 \001(\t\022\021\n\tinclusiv" + + "e\030\006 \001(\010\022-\n\004kind\030\004 \001(\0162\037.grafeas.v1.Versi" + + "on.VersionKind\022\021\n\tfull_name\030\005 \001(\t\"Q\n\013Ver" + + "sionKind\022\034\n\030VERSION_KIND_UNSPECIFIED\020\000\022\n" + + "\n\006NORMAL\020\001\022\013\n\007MINIMUM\020\002\022\013\n\007MAXIMUM\020\003*>\n\014" + + "Architecture\022\034\n\030ARCHITECTURE_UNSPECIFIED" + + "\020\000\022\007\n\003X86\020\001\022\007\n\003X64\020\002BQ\n\rio.grafeas.v1P\001Z" + + "8google.golang.org/genproto/googleapis/g" + + "rafeas/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + io.grafeas.v1.Common.getDescriptor(), + }); + internal_static_grafeas_v1_Distribution_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_Distribution_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Distribution_descriptor, + new java.lang.String[] { "CpeUri", "Architecture", "LatestVersion", "Maintainer", "Url", "Description", }); + internal_static_grafeas_v1_Location_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Location_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Location_descriptor, + new java.lang.String[] { "CpeUri", "Version", "Path", }); + internal_static_grafeas_v1_PackageNote_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_PackageNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_PackageNote_descriptor, + new java.lang.String[] { "Name", "Distribution", "PackageType", "CpeUri", "Architecture", "Version", "Maintainer", "Url", "Description", "License", "Digest", }); + internal_static_grafeas_v1_PackageOccurrence_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_PackageOccurrence_descriptor, + new java.lang.String[] { "Name", "Location", "PackageType", "CpeUri", "Architecture", "License", "Version", }); + internal_static_grafeas_v1_Version_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grafeas_v1_Version_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Version_descriptor, + new java.lang.String[] { "Epoch", "Name", "Revision", "Inclusive", "Kind", "FullName", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + io.grafeas.v1.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java new file mode 100644 index 000000000000..0ef9a8e9eee2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java @@ -0,0 +1,2942 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +/** + *
+ * PackageNote represents a particular package version.
+ * 
+ * + * Protobuf type {@code grafeas.v1.PackageNote} + */ +public final class PackageNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.PackageNote) + PackageNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use PackageNote.newBuilder() to construct. + private PackageNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PackageNote() { + name_ = ""; + distribution_ = java.util.Collections.emptyList(); + packageType_ = ""; + cpeUri_ = ""; + architecture_ = 0; + maintainer_ = ""; + url_ = ""; + description_ = ""; + digest_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PackageNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.PackageNote.class, io.grafeas.v1.PackageNote.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISTRIBUTION_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private java.util.List distribution_; + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + @java.lang.Override + public java.util.List getDistributionList() { + return distribution_; + } + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + @java.lang.Override + public java.util.List + getDistributionOrBuilderList() { + return distribution_; + } + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + @java.lang.Override + public int getDistributionCount() { + return distribution_.size(); + } + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + @java.lang.Override + public io.grafeas.v1.Distribution getDistribution(int index) { + return distribution_.get(index); + } + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + @java.lang.Override + public io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder( + int index) { + return distribution_.get(index); + } + + public static final int PACKAGE_TYPE_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object packageType_ = ""; + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 11; + * @return The packageType. + */ + @java.lang.Override + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } + } + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 11; + * @return The bytes for packageType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CPE_URI_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private volatile java.lang.Object cpeUri_ = ""; + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 12; + * @return The cpeUri. + */ + @java.lang.Override + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } + } + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 12; + * @return The bytes for cpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 13; + private int architecture_ = 0; + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override public int getArchitectureValue() { + return architecture_; + } + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @return The architecture. + */ + @java.lang.Override public io.grafeas.v1.Architecture getArchitecture() { + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); + return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; + } + + public static final int VERSION_FIELD_NUMBER = 14; + private io.grafeas.v1.Version version_; + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 14; + * @return Whether the version field is set. + */ + @java.lang.Override + public boolean hasVersion() { + return version_ != null; + } + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 14; + * @return The version. + */ + @java.lang.Override + public io.grafeas.v1.Version getVersion() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 14; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + + public static final int MAINTAINER_FIELD_NUMBER = 15; + @SuppressWarnings("serial") + private volatile java.lang.Object maintainer_ = ""; + /** + *
+   * A freeform text denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 15; + * @return The maintainer. + */ + @java.lang.Override + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + maintainer_ = s; + return s; + } + } + /** + *
+   * A freeform text denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 15; + * @return The bytes for maintainer. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 16; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+   * The homepage for this package.
+   * 
+ * + * string url = 16; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+   * The homepage for this package.
+   * 
+ * + * string url = 16; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 17; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * The description of this package.
+   * 
+ * + * string description = 17; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The description of this package.
+   * 
+ * + * string description = 17; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LICENSE_FIELD_NUMBER = 18; + private io.grafeas.v1.License license_; + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 18; + * @return Whether the license field is set. + */ + @java.lang.Override + public boolean hasLicense() { + return license_ != null; + } + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 18; + * @return The license. + */ + @java.lang.Override + public io.grafeas.v1.License getLicense() { + return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; + } + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 18; + */ + @java.lang.Override + public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { + return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; + } + + public static final int DIGEST_FIELD_NUMBER = 19; + @SuppressWarnings("serial") + private java.util.List digest_; + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + @java.lang.Override + public java.util.List getDigestList() { + return digest_; + } + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + @java.lang.Override + public java.util.List + getDigestOrBuilderList() { + return digest_; + } + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + @java.lang.Override + public int getDigestCount() { + return digest_.size(); + } + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + @java.lang.Override + public io.grafeas.v1.Digest getDigest(int index) { + return digest_.get(index); + } + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + @java.lang.Override + public io.grafeas.v1.DigestOrBuilder getDigestOrBuilder( + int index) { + return digest_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < distribution_.size(); i++) { + output.writeMessage(10, distribution_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, packageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, cpeUri_); + } + if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { + output.writeEnum(13, architecture_); + } + if (version_ != null) { + output.writeMessage(14, getVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, maintainer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, description_); + } + if (license_ != null) { + output.writeMessage(18, getLicense()); + } + for (int i = 0; i < digest_.size(); i++) { + output.writeMessage(19, digest_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < distribution_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, distribution_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, packageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, cpeUri_); + } + if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(13, architecture_); + } + if (version_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, maintainer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, description_); + } + if (license_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getLicense()); + } + for (int i = 0; i < digest_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, digest_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.PackageNote)) { + return super.equals(obj); + } + io.grafeas.v1.PackageNote other = (io.grafeas.v1.PackageNote) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDistributionList() + .equals(other.getDistributionList())) return false; + if (!getPackageType() + .equals(other.getPackageType())) return false; + if (!getCpeUri() + .equals(other.getCpeUri())) return false; + if (architecture_ != other.architecture_) return false; + if (hasVersion() != other.hasVersion()) return false; + if (hasVersion()) { + if (!getVersion() + .equals(other.getVersion())) return false; + } + if (!getMaintainer() + .equals(other.getMaintainer())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (hasLicense() != other.hasLicense()) return false; + if (hasLicense()) { + if (!getLicense() + .equals(other.getLicense())) return false; + } + if (!getDigestList() + .equals(other.getDigestList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getDistributionCount() > 0) { + hash = (37 * hash) + DISTRIBUTION_FIELD_NUMBER; + hash = (53 * hash) + getDistributionList().hashCode(); + } + hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPackageType().hashCode(); + hash = (37 * hash) + CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCpeUri().hashCode(); + hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + architecture_; + if (hasVersion()) { + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + } + hash = (37 * hash) + MAINTAINER_FIELD_NUMBER; + hash = (53 * hash) + getMaintainer().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasLicense()) { + hash = (37 * hash) + LICENSE_FIELD_NUMBER; + hash = (53 * hash) + getLicense().hashCode(); + } + if (getDigestCount() > 0) { + hash = (37 * hash) + DIGEST_FIELD_NUMBER; + hash = (53 * hash) + getDigestList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.PackageNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.PackageNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.PackageNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.PackageNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.PackageNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.PackageNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.PackageNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.PackageNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.PackageNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.PackageNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.PackageNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.PackageNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.PackageNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PackageNote represents a particular package version.
+   * 
+ * + * Protobuf type {@code grafeas.v1.PackageNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.PackageNote) + io.grafeas.v1.PackageNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.PackageNote.class, io.grafeas.v1.PackageNote.Builder.class); + } + + // Construct using io.grafeas.v1.PackageNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (distributionBuilder_ == null) { + distribution_ = java.util.Collections.emptyList(); + } else { + distribution_ = null; + distributionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + packageType_ = ""; + cpeUri_ = ""; + architecture_ = 0; + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + maintainer_ = ""; + url_ = ""; + description_ = ""; + license_ = null; + if (licenseBuilder_ != null) { + licenseBuilder_.dispose(); + licenseBuilder_ = null; + } + if (digestBuilder_ == null) { + digest_ = java.util.Collections.emptyList(); + } else { + digest_ = null; + digestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.PackageNote getDefaultInstanceForType() { + return io.grafeas.v1.PackageNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.PackageNote build() { + io.grafeas.v1.PackageNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.PackageNote buildPartial() { + io.grafeas.v1.PackageNote result = new io.grafeas.v1.PackageNote(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.PackageNote result) { + if (distributionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + distribution_ = java.util.Collections.unmodifiableList(distribution_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.distribution_ = distribution_; + } else { + result.distribution_ = distributionBuilder_.build(); + } + if (digestBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + digest_ = java.util.Collections.unmodifiableList(digest_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.digest_ = digest_; + } else { + result.digest_ = digestBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.PackageNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.packageType_ = packageType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cpeUri_ = cpeUri_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.architecture_ = architecture_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.version_ = versionBuilder_ == null + ? version_ + : versionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.maintainer_ = maintainer_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.license_ = licenseBuilder_ == null + ? license_ + : licenseBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.PackageNote) { + return mergeFrom((io.grafeas.v1.PackageNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.PackageNote other) { + if (other == io.grafeas.v1.PackageNote.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (distributionBuilder_ == null) { + if (!other.distribution_.isEmpty()) { + if (distribution_.isEmpty()) { + distribution_ = other.distribution_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDistributionIsMutable(); + distribution_.addAll(other.distribution_); + } + onChanged(); + } + } else { + if (!other.distribution_.isEmpty()) { + if (distributionBuilder_.isEmpty()) { + distributionBuilder_.dispose(); + distributionBuilder_ = null; + distribution_ = other.distribution_; + bitField0_ = (bitField0_ & ~0x00000002); + distributionBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDistributionFieldBuilder() : null; + } else { + distributionBuilder_.addAllMessages(other.distribution_); + } + } + } + if (!other.getPackageType().isEmpty()) { + packageType_ = other.packageType_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.architecture_ != 0) { + setArchitectureValue(other.getArchitectureValue()); + } + if (other.hasVersion()) { + mergeVersion(other.getVersion()); + } + if (!other.getMaintainer().isEmpty()) { + maintainer_ = other.maintainer_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasLicense()) { + mergeLicense(other.getLicense()); + } + if (digestBuilder_ == null) { + if (!other.digest_.isEmpty()) { + if (digest_.isEmpty()) { + digest_ = other.digest_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureDigestIsMutable(); + digest_.addAll(other.digest_); + } + onChanged(); + } + } else { + if (!other.digest_.isEmpty()) { + if (digestBuilder_.isEmpty()) { + digestBuilder_.dispose(); + digestBuilder_ = null; + digest_ = other.digest_; + bitField0_ = (bitField0_ & ~0x00000400); + digestBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDigestFieldBuilder() : null; + } else { + digestBuilder_.addAllMessages(other.digest_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 82: { + io.grafeas.v1.Distribution m = + input.readMessage( + io.grafeas.v1.Distribution.parser(), + extensionRegistry); + if (distributionBuilder_ == null) { + ensureDistributionIsMutable(); + distribution_.add(m); + } else { + distributionBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: { + packageType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 90 + case 98: { + cpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 98 + case 104: { + architecture_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 104 + case 114: { + input.readMessage( + getVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 114 + case 122: { + maintainer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 122 + case 130: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 130 + case 138: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 138 + case 146: { + input.readMessage( + getLicenseFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 146 + case 154: { + io.grafeas.v1.Digest m = + input.readMessage( + io.grafeas.v1.Digest.parser(), + extensionRegistry); + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + digest_.add(m); + } else { + digestBuilder_.addMessage(m); + } + break; + } // case 154 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List distribution_ = + java.util.Collections.emptyList(); + private void ensureDistributionIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + distribution_ = new java.util.ArrayList(distribution_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Distribution, io.grafeas.v1.Distribution.Builder, io.grafeas.v1.DistributionOrBuilder> distributionBuilder_; + + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public java.util.List getDistributionList() { + if (distributionBuilder_ == null) { + return java.util.Collections.unmodifiableList(distribution_); + } else { + return distributionBuilder_.getMessageList(); + } + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public int getDistributionCount() { + if (distributionBuilder_ == null) { + return distribution_.size(); + } else { + return distributionBuilder_.getCount(); + } + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public io.grafeas.v1.Distribution getDistribution(int index) { + if (distributionBuilder_ == null) { + return distribution_.get(index); + } else { + return distributionBuilder_.getMessage(index); + } + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder setDistribution( + int index, io.grafeas.v1.Distribution value) { + if (distributionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDistributionIsMutable(); + distribution_.set(index, value); + onChanged(); + } else { + distributionBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder setDistribution( + int index, io.grafeas.v1.Distribution.Builder builderForValue) { + if (distributionBuilder_ == null) { + ensureDistributionIsMutable(); + distribution_.set(index, builderForValue.build()); + onChanged(); + } else { + distributionBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder addDistribution(io.grafeas.v1.Distribution value) { + if (distributionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDistributionIsMutable(); + distribution_.add(value); + onChanged(); + } else { + distributionBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder addDistribution( + int index, io.grafeas.v1.Distribution value) { + if (distributionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDistributionIsMutable(); + distribution_.add(index, value); + onChanged(); + } else { + distributionBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder addDistribution( + io.grafeas.v1.Distribution.Builder builderForValue) { + if (distributionBuilder_ == null) { + ensureDistributionIsMutable(); + distribution_.add(builderForValue.build()); + onChanged(); + } else { + distributionBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder addDistribution( + int index, io.grafeas.v1.Distribution.Builder builderForValue) { + if (distributionBuilder_ == null) { + ensureDistributionIsMutable(); + distribution_.add(index, builderForValue.build()); + onChanged(); + } else { + distributionBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder addAllDistribution( + java.lang.Iterable values) { + if (distributionBuilder_ == null) { + ensureDistributionIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, distribution_); + onChanged(); + } else { + distributionBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder clearDistribution() { + if (distributionBuilder_ == null) { + distribution_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + distributionBuilder_.clear(); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder removeDistribution(int index) { + if (distributionBuilder_ == null) { + ensureDistributionIsMutable(); + distribution_.remove(index); + onChanged(); + } else { + distributionBuilder_.remove(index); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public io.grafeas.v1.Distribution.Builder getDistributionBuilder( + int index) { + return getDistributionFieldBuilder().getBuilder(index); + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder( + int index) { + if (distributionBuilder_ == null) { + return distribution_.get(index); } else { + return distributionBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public java.util.List + getDistributionOrBuilderList() { + if (distributionBuilder_ != null) { + return distributionBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(distribution_); + } + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public io.grafeas.v1.Distribution.Builder addDistributionBuilder() { + return getDistributionFieldBuilder().addBuilder( + io.grafeas.v1.Distribution.getDefaultInstance()); + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public io.grafeas.v1.Distribution.Builder addDistributionBuilder( + int index) { + return getDistributionFieldBuilder().addBuilder( + index, io.grafeas.v1.Distribution.getDefaultInstance()); + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public java.util.List + getDistributionBuilderList() { + return getDistributionFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Distribution, io.grafeas.v1.Distribution.Builder, io.grafeas.v1.DistributionOrBuilder> + getDistributionFieldBuilder() { + if (distributionBuilder_ == null) { + distributionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Distribution, io.grafeas.v1.Distribution.Builder, io.grafeas.v1.DistributionOrBuilder>( + distribution_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + distribution_ = null; + } + return distributionBuilder_; + } + + private java.lang.Object packageType_ = ""; + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 11; + * @return The packageType. + */ + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 11; + * @return The bytes for packageType. + */ + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 11; + * @param value The packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + packageType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 11; + * @return This builder for chaining. + */ + public Builder clearPackageType() { + packageType_ = getDefaultInstance().getPackageType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 11; + * @param value The bytes for packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + packageType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object cpeUri_ = ""; + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 12; + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 12; + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 12; + * @param value The cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 12; + * @return This builder for chaining. + */ + public Builder clearCpeUri() { + cpeUri_ = getDefaultInstance().getCpeUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 12; + * @param value The bytes for cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int architecture_ = 0; + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override public int getArchitectureValue() { + return architecture_; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @param value The enum numeric value on the wire for architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitectureValue(int value) { + architecture_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @return The architecture. + */ + @java.lang.Override + public io.grafeas.v1.Architecture getArchitecture() { + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); + return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @param value The architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitecture(io.grafeas.v1.Architecture value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + architecture_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @return This builder for chaining. + */ + public Builder clearArchitecture() { + bitField0_ = (bitField0_ & ~0x00000010); + architecture_ = 0; + onChanged(); + return this; + } + + private io.grafeas.v1.Version version_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + * @return Whether the version field is set. + */ + public boolean hasVersion() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + * @return The version. + */ + public io.grafeas.v1.Version getVersion() { + if (versionBuilder_ == null) { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } else { + return versionBuilder_.getMessage(); + } + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + public Builder setVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + } else { + versionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + public Builder setVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (versionBuilder_ == null) { + version_ = builderForValue.build(); + } else { + versionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + public Builder mergeVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + version_ != null && + version_ != io.grafeas.v1.Version.getDefaultInstance()) { + getVersionBuilder().mergeFrom(value); + } else { + version_ = value; + } + } else { + versionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + public Builder clearVersion() { + bitField0_ = (bitField0_ & ~0x00000020); + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + public io.grafeas.v1.Version.Builder getVersionBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getVersionFieldBuilder().getBuilder(); + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + if (versionBuilder_ != null) { + return versionBuilder_.getMessageOrBuilder(); + } else { + return version_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : version_; + } + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getVersionFieldBuilder() { + if (versionBuilder_ == null) { + versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getVersion(), + getParentForChildren(), + isClean()); + version_ = null; + } + return versionBuilder_; + } + + private java.lang.Object maintainer_ = ""; + /** + *
+     * A freeform text denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 15; + * @return The maintainer. + */ + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + maintainer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A freeform text denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 15; + * @return The bytes for maintainer. + */ + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A freeform text denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 15; + * @param value The maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainer( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + maintainer_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * A freeform text denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 15; + * @return This builder for chaining. + */ + public Builder clearMaintainer() { + maintainer_ = getDefaultInstance().getMaintainer(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * A freeform text denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 15; + * @param value The bytes for maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + maintainer_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+     * The homepage for this package.
+     * 
+ * + * string url = 16; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The homepage for this package.
+     * 
+ * + * string url = 16; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The homepage for this package.
+     * 
+ * + * string url = 16; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The homepage for this package.
+     * 
+ * + * string url = 16; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + *
+     * The homepage for this package.
+     * 
+ * + * string url = 16; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The description of this package.
+     * 
+ * + * string description = 17; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The description of this package.
+     * 
+ * + * string description = 17; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The description of this package.
+     * 
+ * + * string description = 17; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * The description of this package.
+     * 
+ * + * string description = 17; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * The description of this package.
+     * 
+ * + * string description = 17; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private io.grafeas.v1.License license_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> licenseBuilder_; + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + * @return Whether the license field is set. + */ + public boolean hasLicense() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + * @return The license. + */ + public io.grafeas.v1.License getLicense() { + if (licenseBuilder_ == null) { + return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; + } else { + return licenseBuilder_.getMessage(); + } + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + */ + public Builder setLicense(io.grafeas.v1.License value) { + if (licenseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + license_ = value; + } else { + licenseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + */ + public Builder setLicense( + io.grafeas.v1.License.Builder builderForValue) { + if (licenseBuilder_ == null) { + license_ = builderForValue.build(); + } else { + licenseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + */ + public Builder mergeLicense(io.grafeas.v1.License value) { + if (licenseBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) && + license_ != null && + license_ != io.grafeas.v1.License.getDefaultInstance()) { + getLicenseBuilder().mergeFrom(value); + } else { + license_ = value; + } + } else { + licenseBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + */ + public Builder clearLicense() { + bitField0_ = (bitField0_ & ~0x00000200); + license_ = null; + if (licenseBuilder_ != null) { + licenseBuilder_.dispose(); + licenseBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + */ + public io.grafeas.v1.License.Builder getLicenseBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getLicenseFieldBuilder().getBuilder(); + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + */ + public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { + if (licenseBuilder_ != null) { + return licenseBuilder_.getMessageOrBuilder(); + } else { + return license_ == null ? + io.grafeas.v1.License.getDefaultInstance() : license_; + } + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> + getLicenseFieldBuilder() { + if (licenseBuilder_ == null) { + licenseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder>( + getLicense(), + getParentForChildren(), + isClean()); + license_ = null; + } + return licenseBuilder_; + } + + private java.util.List digest_ = + java.util.Collections.emptyList(); + private void ensureDigestIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + digest_ = new java.util.ArrayList(digest_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder> digestBuilder_; + + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public java.util.List getDigestList() { + if (digestBuilder_ == null) { + return java.util.Collections.unmodifiableList(digest_); + } else { + return digestBuilder_.getMessageList(); + } + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public int getDigestCount() { + if (digestBuilder_ == null) { + return digest_.size(); + } else { + return digestBuilder_.getCount(); + } + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public io.grafeas.v1.Digest getDigest(int index) { + if (digestBuilder_ == null) { + return digest_.get(index); + } else { + return digestBuilder_.getMessage(index); + } + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder setDigest( + int index, io.grafeas.v1.Digest value) { + if (digestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDigestIsMutable(); + digest_.set(index, value); + onChanged(); + } else { + digestBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder setDigest( + int index, io.grafeas.v1.Digest.Builder builderForValue) { + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + digest_.set(index, builderForValue.build()); + onChanged(); + } else { + digestBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder addDigest(io.grafeas.v1.Digest value) { + if (digestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDigestIsMutable(); + digest_.add(value); + onChanged(); + } else { + digestBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder addDigest( + int index, io.grafeas.v1.Digest value) { + if (digestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDigestIsMutable(); + digest_.add(index, value); + onChanged(); + } else { + digestBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder addDigest( + io.grafeas.v1.Digest.Builder builderForValue) { + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + digest_.add(builderForValue.build()); + onChanged(); + } else { + digestBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder addDigest( + int index, io.grafeas.v1.Digest.Builder builderForValue) { + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + digest_.add(index, builderForValue.build()); + onChanged(); + } else { + digestBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder addAllDigest( + java.lang.Iterable values) { + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, digest_); + onChanged(); + } else { + digestBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder clearDigest() { + if (digestBuilder_ == null) { + digest_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + digestBuilder_.clear(); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder removeDigest(int index) { + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + digest_.remove(index); + onChanged(); + } else { + digestBuilder_.remove(index); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public io.grafeas.v1.Digest.Builder getDigestBuilder( + int index) { + return getDigestFieldBuilder().getBuilder(index); + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public io.grafeas.v1.DigestOrBuilder getDigestOrBuilder( + int index) { + if (digestBuilder_ == null) { + return digest_.get(index); } else { + return digestBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public java.util.List + getDigestOrBuilderList() { + if (digestBuilder_ != null) { + return digestBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(digest_); + } + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public io.grafeas.v1.Digest.Builder addDigestBuilder() { + return getDigestFieldBuilder().addBuilder( + io.grafeas.v1.Digest.getDefaultInstance()); + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public io.grafeas.v1.Digest.Builder addDigestBuilder( + int index) { + return getDigestFieldBuilder().addBuilder( + index, io.grafeas.v1.Digest.getDefaultInstance()); + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public java.util.List + getDigestBuilderList() { + return getDigestFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder> + getDigestFieldBuilder() { + if (digestBuilder_ == null) { + digestBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder>( + digest_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + digest_ = null; + } + return digestBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.PackageNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.PackageNote) + private static final io.grafeas.v1.PackageNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.PackageNote(); + } + + public static io.grafeas.v1.PackageNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PackageNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.PackageNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java new file mode 100644 index 000000000000..e9bfeaf13aee --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java @@ -0,0 +1,308 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +public interface PackageNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.PackageNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + java.util.List + getDistributionList(); + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + io.grafeas.v1.Distribution getDistribution(int index); + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + int getDistributionCount(); + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + java.util.List + getDistributionOrBuilderList(); + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder( + int index); + + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 11; + * @return The packageType. + */ + java.lang.String getPackageType(); + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 11; + * @return The bytes for packageType. + */ + com.google.protobuf.ByteString + getPackageTypeBytes(); + + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 12; + * @return The cpeUri. + */ + java.lang.String getCpeUri(); + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 12; + * @return The bytes for cpeUri. + */ + com.google.protobuf.ByteString + getCpeUriBytes(); + + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @return The enum numeric value on the wire for architecture. + */ + int getArchitectureValue(); + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @return The architecture. + */ + io.grafeas.v1.Architecture getArchitecture(); + + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 14; + * @return Whether the version field is set. + */ + boolean hasVersion(); + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 14; + * @return The version. + */ + io.grafeas.v1.Version getVersion(); + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 14; + */ + io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); + + /** + *
+   * A freeform text denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 15; + * @return The maintainer. + */ + java.lang.String getMaintainer(); + /** + *
+   * A freeform text denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 15; + * @return The bytes for maintainer. + */ + com.google.protobuf.ByteString + getMaintainerBytes(); + + /** + *
+   * The homepage for this package.
+   * 
+ * + * string url = 16; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+   * The homepage for this package.
+   * 
+ * + * string url = 16; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+   * The description of this package.
+   * 
+ * + * string description = 17; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The description of this package.
+   * 
+ * + * string description = 17; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 18; + * @return Whether the license field is set. + */ + boolean hasLicense(); + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 18; + * @return The license. + */ + io.grafeas.v1.License getLicense(); + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 18; + */ + io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder(); + + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + java.util.List + getDigestList(); + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + io.grafeas.v1.Digest getDigest(int index); + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + int getDigestCount(); + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + java.util.List + getDigestOrBuilderList(); + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + io.grafeas.v1.DigestOrBuilder getDigestOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java new file mode 100644 index 000000000000..c5383f689414 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java @@ -0,0 +1,1985 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +/** + *
+ * Details on how a particular software package was installed on a system.
+ * 
+ * + * Protobuf type {@code grafeas.v1.PackageOccurrence} + */ +public final class PackageOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.PackageOccurrence) + PackageOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use PackageOccurrence.newBuilder() to construct. + private PackageOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PackageOccurrence() { + name_ = ""; + location_ = java.util.Collections.emptyList(); + packageType_ = ""; + cpeUri_ = ""; + architecture_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PackageOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.PackageOccurrence.class, io.grafeas.v1.PackageOccurrence.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the installed package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the installed package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List location_; + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + @java.lang.Override + public java.util.List getLocationList() { + return location_; + } + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + @java.lang.Override + public java.util.List + getLocationOrBuilderList() { + return location_; + } + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + @java.lang.Override + public int getLocationCount() { + return location_.size(); + } + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + @java.lang.Override + public io.grafeas.v1.Location getLocation(int index) { + return location_.get(index); + } + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + @java.lang.Override + public io.grafeas.v1.LocationOrBuilder getLocationOrBuilder( + int index) { + return location_.get(index); + } + + public static final int PACKAGE_TYPE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object packageType_ = ""; + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The packageType. + */ + @java.lang.Override + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } + } + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for packageType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CPE_URI_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object cpeUri_ = ""; + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The cpeUri. + */ + @java.lang.Override + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } + } + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for cpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 5; + private int architecture_ = 0; + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override public int getArchitectureValue() { + return architecture_; + } + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The architecture. + */ + @java.lang.Override public io.grafeas.v1.Architecture getArchitecture() { + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); + return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; + } + + public static final int LICENSE_FIELD_NUMBER = 6; + private io.grafeas.v1.License license_; + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 6; + * @return Whether the license field is set. + */ + @java.lang.Override + public boolean hasLicense() { + return license_ != null; + } + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 6; + * @return The license. + */ + @java.lang.Override + public io.grafeas.v1.License getLicense() { + return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; + } + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 6; + */ + @java.lang.Override + public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { + return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; + } + + public static final int VERSION_FIELD_NUMBER = 7; + private io.grafeas.v1.Version version_; + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the version field is set. + */ + @java.lang.Override + public boolean hasVersion() { + return version_ != null; + } + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The version. + */ + @java.lang.Override + public io.grafeas.v1.Version getVersion() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < location_.size(); i++) { + output.writeMessage(2, location_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, packageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cpeUri_); + } + if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, architecture_); + } + if (license_ != null) { + output.writeMessage(6, getLicense()); + } + if (version_ != null) { + output.writeMessage(7, getVersion()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < location_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, location_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, packageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cpeUri_); + } + if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, architecture_); + } + if (license_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getLicense()); + } + if (version_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getVersion()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.PackageOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.PackageOccurrence other = (io.grafeas.v1.PackageOccurrence) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getLocationList() + .equals(other.getLocationList())) return false; + if (!getPackageType() + .equals(other.getPackageType())) return false; + if (!getCpeUri() + .equals(other.getCpeUri())) return false; + if (architecture_ != other.architecture_) return false; + if (hasLicense() != other.hasLicense()) return false; + if (hasLicense()) { + if (!getLicense() + .equals(other.getLicense())) return false; + } + if (hasVersion() != other.hasVersion()) return false; + if (hasVersion()) { + if (!getVersion() + .equals(other.getVersion())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getLocationCount() > 0) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocationList().hashCode(); + } + hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPackageType().hashCode(); + hash = (37 * hash) + CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCpeUri().hashCode(); + hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + architecture_; + if (hasLicense()) { + hash = (37 * hash) + LICENSE_FIELD_NUMBER; + hash = (53 * hash) + getLicense().hashCode(); + } + if (hasVersion()) { + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.PackageOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.PackageOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.PackageOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.PackageOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.PackageOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.PackageOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.PackageOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.PackageOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.PackageOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.PackageOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.PackageOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.PackageOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.PackageOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Details on how a particular software package was installed on a system.
+   * 
+ * + * Protobuf type {@code grafeas.v1.PackageOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.PackageOccurrence) + io.grafeas.v1.PackageOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.PackageOccurrence.class, io.grafeas.v1.PackageOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.PackageOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (locationBuilder_ == null) { + location_ = java.util.Collections.emptyList(); + } else { + location_ = null; + locationBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + packageType_ = ""; + cpeUri_ = ""; + architecture_ = 0; + license_ = null; + if (licenseBuilder_ != null) { + licenseBuilder_.dispose(); + licenseBuilder_ = null; + } + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.PackageOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.PackageOccurrence build() { + io.grafeas.v1.PackageOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.PackageOccurrence buildPartial() { + io.grafeas.v1.PackageOccurrence result = new io.grafeas.v1.PackageOccurrence(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.PackageOccurrence result) { + if (locationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + location_ = java.util.Collections.unmodifiableList(location_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.location_ = location_; + } else { + result.location_ = locationBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.PackageOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.packageType_ = packageType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cpeUri_ = cpeUri_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.architecture_ = architecture_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.license_ = licenseBuilder_ == null + ? license_ + : licenseBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.version_ = versionBuilder_ == null + ? version_ + : versionBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.PackageOccurrence) { + return mergeFrom((io.grafeas.v1.PackageOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.PackageOccurrence other) { + if (other == io.grafeas.v1.PackageOccurrence.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (locationBuilder_ == null) { + if (!other.location_.isEmpty()) { + if (location_.isEmpty()) { + location_ = other.location_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLocationIsMutable(); + location_.addAll(other.location_); + } + onChanged(); + } + } else { + if (!other.location_.isEmpty()) { + if (locationBuilder_.isEmpty()) { + locationBuilder_.dispose(); + locationBuilder_ = null; + location_ = other.location_; + bitField0_ = (bitField0_ & ~0x00000002); + locationBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLocationFieldBuilder() : null; + } else { + locationBuilder_.addAllMessages(other.location_); + } + } + } + if (!other.getPackageType().isEmpty()) { + packageType_ = other.packageType_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.architecture_ != 0) { + setArchitectureValue(other.getArchitectureValue()); + } + if (other.hasLicense()) { + mergeLicense(other.getLicense()); + } + if (other.hasVersion()) { + mergeVersion(other.getVersion()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + io.grafeas.v1.Location m = + input.readMessage( + io.grafeas.v1.Location.parser(), + extensionRegistry); + if (locationBuilder_ == null) { + ensureLocationIsMutable(); + location_.add(m); + } else { + locationBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + packageType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + cpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + architecture_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + input.readMessage( + getLicenseFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the installed package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the installed package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the installed package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the installed package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the installed package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List location_ = + java.util.Collections.emptyList(); + private void ensureLocationIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + location_ = new java.util.ArrayList(location_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Location, io.grafeas.v1.Location.Builder, io.grafeas.v1.LocationOrBuilder> locationBuilder_; + + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public java.util.List getLocationList() { + if (locationBuilder_ == null) { + return java.util.Collections.unmodifiableList(location_); + } else { + return locationBuilder_.getMessageList(); + } + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public int getLocationCount() { + if (locationBuilder_ == null) { + return location_.size(); + } else { + return locationBuilder_.getCount(); + } + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public io.grafeas.v1.Location getLocation(int index) { + if (locationBuilder_ == null) { + return location_.get(index); + } else { + return locationBuilder_.getMessage(index); + } + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder setLocation( + int index, io.grafeas.v1.Location value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationIsMutable(); + location_.set(index, value); + onChanged(); + } else { + locationBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder setLocation( + int index, io.grafeas.v1.Location.Builder builderForValue) { + if (locationBuilder_ == null) { + ensureLocationIsMutable(); + location_.set(index, builderForValue.build()); + onChanged(); + } else { + locationBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder addLocation(io.grafeas.v1.Location value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationIsMutable(); + location_.add(value); + onChanged(); + } else { + locationBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder addLocation( + int index, io.grafeas.v1.Location value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationIsMutable(); + location_.add(index, value); + onChanged(); + } else { + locationBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder addLocation( + io.grafeas.v1.Location.Builder builderForValue) { + if (locationBuilder_ == null) { + ensureLocationIsMutable(); + location_.add(builderForValue.build()); + onChanged(); + } else { + locationBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder addLocation( + int index, io.grafeas.v1.Location.Builder builderForValue) { + if (locationBuilder_ == null) { + ensureLocationIsMutable(); + location_.add(index, builderForValue.build()); + onChanged(); + } else { + locationBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder addAllLocation( + java.lang.Iterable values) { + if (locationBuilder_ == null) { + ensureLocationIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, location_); + onChanged(); + } else { + locationBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder clearLocation() { + if (locationBuilder_ == null) { + location_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + locationBuilder_.clear(); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder removeLocation(int index) { + if (locationBuilder_ == null) { + ensureLocationIsMutable(); + location_.remove(index); + onChanged(); + } else { + locationBuilder_.remove(index); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public io.grafeas.v1.Location.Builder getLocationBuilder( + int index) { + return getLocationFieldBuilder().getBuilder(index); + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public io.grafeas.v1.LocationOrBuilder getLocationOrBuilder( + int index) { + if (locationBuilder_ == null) { + return location_.get(index); } else { + return locationBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public java.util.List + getLocationOrBuilderList() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(location_); + } + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public io.grafeas.v1.Location.Builder addLocationBuilder() { + return getLocationFieldBuilder().addBuilder( + io.grafeas.v1.Location.getDefaultInstance()); + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public io.grafeas.v1.Location.Builder addLocationBuilder( + int index) { + return getLocationFieldBuilder().addBuilder( + index, io.grafeas.v1.Location.getDefaultInstance()); + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public java.util.List + getLocationBuilderList() { + return getLocationFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Location, io.grafeas.v1.Location.Builder, io.grafeas.v1.LocationOrBuilder> + getLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Location, io.grafeas.v1.Location.Builder, io.grafeas.v1.LocationOrBuilder>( + location_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + location_ = null; + } + return locationBuilder_; + } + + private java.lang.Object packageType_ = ""; + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The packageType. + */ + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for packageType. + */ + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + packageType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearPackageType() { + packageType_ = getDefaultInstance().getPackageType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + packageType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object cpeUri_ = ""; + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearCpeUri() { + cpeUri_ = getDefaultInstance().getCpeUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int architecture_ = 0; + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override public int getArchitectureValue() { + return architecture_; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitectureValue(int value) { + architecture_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The architecture. + */ + @java.lang.Override + public io.grafeas.v1.Architecture getArchitecture() { + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); + return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitecture(io.grafeas.v1.Architecture value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + architecture_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearArchitecture() { + bitField0_ = (bitField0_ & ~0x00000010); + architecture_ = 0; + onChanged(); + return this; + } + + private io.grafeas.v1.License license_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> licenseBuilder_; + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + * @return Whether the license field is set. + */ + public boolean hasLicense() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + * @return The license. + */ + public io.grafeas.v1.License getLicense() { + if (licenseBuilder_ == null) { + return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; + } else { + return licenseBuilder_.getMessage(); + } + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + */ + public Builder setLicense(io.grafeas.v1.License value) { + if (licenseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + license_ = value; + } else { + licenseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + */ + public Builder setLicense( + io.grafeas.v1.License.Builder builderForValue) { + if (licenseBuilder_ == null) { + license_ = builderForValue.build(); + } else { + licenseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + */ + public Builder mergeLicense(io.grafeas.v1.License value) { + if (licenseBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + license_ != null && + license_ != io.grafeas.v1.License.getDefaultInstance()) { + getLicenseBuilder().mergeFrom(value); + } else { + license_ = value; + } + } else { + licenseBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + */ + public Builder clearLicense() { + bitField0_ = (bitField0_ & ~0x00000020); + license_ = null; + if (licenseBuilder_ != null) { + licenseBuilder_.dispose(); + licenseBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + */ + public io.grafeas.v1.License.Builder getLicenseBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getLicenseFieldBuilder().getBuilder(); + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + */ + public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { + if (licenseBuilder_ != null) { + return licenseBuilder_.getMessageOrBuilder(); + } else { + return license_ == null ? + io.grafeas.v1.License.getDefaultInstance() : license_; + } + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> + getLicenseFieldBuilder() { + if (licenseBuilder_ == null) { + licenseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder>( + getLicense(), + getParentForChildren(), + isClean()); + license_ = null; + } + return licenseBuilder_; + } + + private io.grafeas.v1.Version version_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the version field is set. + */ + public boolean hasVersion() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The version. + */ + public io.grafeas.v1.Version getVersion() { + if (versionBuilder_ == null) { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } else { + return versionBuilder_.getMessage(); + } + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + } else { + versionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (versionBuilder_ == null) { + version_ = builderForValue.build(); + } else { + versionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + version_ != null && + version_ != io.grafeas.v1.Version.getDefaultInstance()) { + getVersionBuilder().mergeFrom(value); + } else { + version_ = value; + } + } else { + versionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearVersion() { + bitField0_ = (bitField0_ & ~0x00000040); + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public io.grafeas.v1.Version.Builder getVersionBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getVersionFieldBuilder().getBuilder(); + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + if (versionBuilder_ != null) { + return versionBuilder_.getMessageOrBuilder(); + } else { + return version_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : version_; + } + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getVersionFieldBuilder() { + if (versionBuilder_ == null) { + versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getVersion(), + getParentForChildren(), + isClean()); + version_ = null; + } + return versionBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.PackageOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.PackageOccurrence) + private static final io.grafeas.v1.PackageOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.PackageOccurrence(); + } + + public static io.grafeas.v1.PackageOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PackageOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.PackageOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java new file mode 100644 index 000000000000..52fa9a813313 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java @@ -0,0 +1,199 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +public interface PackageOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.PackageOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the installed package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the installed package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + java.util.List + getLocationList(); + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + io.grafeas.v1.Location getLocation(int index); + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + int getLocationCount(); + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + java.util.List + getLocationOrBuilderList(); + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + io.grafeas.v1.LocationOrBuilder getLocationOrBuilder( + int index); + + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The packageType. + */ + java.lang.String getPackageType(); + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for packageType. + */ + com.google.protobuf.ByteString + getPackageTypeBytes(); + + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The cpeUri. + */ + java.lang.String getCpeUri(); + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for cpeUri. + */ + com.google.protobuf.ByteString + getCpeUriBytes(); + + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for architecture. + */ + int getArchitectureValue(); + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The architecture. + */ + io.grafeas.v1.Architecture getArchitecture(); + + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 6; + * @return Whether the license field is set. + */ + boolean hasLicense(); + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 6; + * @return The license. + */ + io.grafeas.v1.License getLicense(); + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 6; + */ + io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder(); + + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the version field is set. + */ + boolean hasVersion(); + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The version. + */ + io.grafeas.v1.Version getVersion(); + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java new file mode 100644 index 000000000000..8cfc04621ecb --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProjectName implements ResourceName { + private static final PathTemplate PROJECT = + PathTemplate.createWithoutUrlEncoding("projects/{project}"); + private volatile Map fieldValuesMap; + private final String project; + + @Deprecated + protected ProjectName() { + project = null; + } + + private ProjectName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProjectName of(String project) { + return newBuilder().setProject(project).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + public static ProjectName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT.validatedMatch( + formattedString, "ProjectName.parse: formattedString not in valid format"); + return of(matchMap.get("project")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProjectName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT.instantiate("project", project); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ProjectName that = ((ProjectName) o); + return Objects.equals(this.project, that.project); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** Builder for projects/{project}. */ + public static class Builder { + private String project; + + protected Builder() {} + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder(ProjectName projectName) { + this.project = projectName.project; + } + + public ProjectName build() { + return new ProjectName(this); + } + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java new file mode 100644 index 000000000000..2e04badc87e5 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java @@ -0,0 +1,746 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Selects a repo using a Google Cloud Platform project ID (e.g.,
+ * winged-cargo-31) and a repo name within that project.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ProjectRepoId} + */ +public final class ProjectRepoId extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ProjectRepoId) + ProjectRepoIdOrBuilder { +private static final long serialVersionUID = 0L; + // Use ProjectRepoId.newBuilder() to construct. + private ProjectRepoId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProjectRepoId() { + projectId_ = ""; + repoName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProjectRepoId(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ProjectRepoId.class, io.grafeas.v1.ProjectRepoId.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + *
+   * The ID of the project.
+   * 
+ * + * string project_id = 1; + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + *
+   * The ID of the project.
+   * 
+ * + * string project_id = 1; + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPO_NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object repoName_ = ""; + /** + *
+   * The name of the repo. Leave empty for the default repo.
+   * 
+ * + * string repo_name = 2; + * @return The repoName. + */ + @java.lang.Override + public java.lang.String getRepoName() { + java.lang.Object ref = repoName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repoName_ = s; + return s; + } + } + /** + *
+   * The name of the repo. Leave empty for the default repo.
+   * 
+ * + * string repo_name = 2; + * @return The bytes for repoName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRepoNameBytes() { + java.lang.Object ref = repoName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + repoName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repoName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, repoName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repoName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, repoName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ProjectRepoId)) { + return super.equals(obj); + } + io.grafeas.v1.ProjectRepoId other = (io.grafeas.v1.ProjectRepoId) obj; + + if (!getProjectId() + .equals(other.getProjectId())) return false; + if (!getRepoName() + .equals(other.getRepoName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + REPO_NAME_FIELD_NUMBER; + hash = (53 * hash) + getRepoName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ProjectRepoId parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ProjectRepoId parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ProjectRepoId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ProjectRepoId parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ProjectRepoId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ProjectRepoId parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ProjectRepoId parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ProjectRepoId parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ProjectRepoId parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ProjectRepoId parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ProjectRepoId parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ProjectRepoId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ProjectRepoId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Selects a repo using a Google Cloud Platform project ID (e.g.,
+   * winged-cargo-31) and a repo name within that project.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ProjectRepoId} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ProjectRepoId) + io.grafeas.v1.ProjectRepoIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ProjectRepoId.class, io.grafeas.v1.ProjectRepoId.Builder.class); + } + + // Construct using io.grafeas.v1.ProjectRepoId.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + repoName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ProjectRepoId getDefaultInstanceForType() { + return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ProjectRepoId build() { + io.grafeas.v1.ProjectRepoId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ProjectRepoId buildPartial() { + io.grafeas.v1.ProjectRepoId result = new io.grafeas.v1.ProjectRepoId(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.ProjectRepoId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.repoName_ = repoName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ProjectRepoId) { + return mergeFrom((io.grafeas.v1.ProjectRepoId)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ProjectRepoId other) { + if (other == io.grafeas.v1.ProjectRepoId.getDefaultInstance()) return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRepoName().isEmpty()) { + repoName_ = other.repoName_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + repoName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object projectId_ = ""; + /** + *
+     * The ID of the project.
+     * 
+ * + * string project_id = 1; + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the project.
+     * 
+ * + * string project_id = 1; + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the project.
+     * 
+ * + * string project_id = 1; + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the project.
+     * 
+ * + * string project_id = 1; + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID of the project.
+     * 
+ * + * string project_id = 1; + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object repoName_ = ""; + /** + *
+     * The name of the repo. Leave empty for the default repo.
+     * 
+ * + * string repo_name = 2; + * @return The repoName. + */ + public java.lang.String getRepoName() { + java.lang.Object ref = repoName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repoName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the repo. Leave empty for the default repo.
+     * 
+ * + * string repo_name = 2; + * @return The bytes for repoName. + */ + public com.google.protobuf.ByteString + getRepoNameBytes() { + java.lang.Object ref = repoName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + repoName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the repo. Leave empty for the default repo.
+     * 
+ * + * string repo_name = 2; + * @param value The repoName to set. + * @return This builder for chaining. + */ + public Builder setRepoName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + repoName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The name of the repo. Leave empty for the default repo.
+     * 
+ * + * string repo_name = 2; + * @return This builder for chaining. + */ + public Builder clearRepoName() { + repoName_ = getDefaultInstance().getRepoName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The name of the repo. Leave empty for the default repo.
+     * 
+ * + * string repo_name = 2; + * @param value The bytes for repoName to set. + * @return This builder for chaining. + */ + public Builder setRepoNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + repoName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ProjectRepoId) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ProjectRepoId) + private static final io.grafeas.v1.ProjectRepoId DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ProjectRepoId(); + } + + public static io.grafeas.v1.ProjectRepoId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProjectRepoId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ProjectRepoId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java new file mode 100644 index 000000000000..3c9ea6025916 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface ProjectRepoIdOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ProjectRepoId) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the project.
+   * 
+ * + * string project_id = 1; + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + *
+   * The ID of the project.
+   * 
+ * + * string project_id = 1; + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString + getProjectIdBytes(); + + /** + *
+   * The name of the repo. Leave empty for the default repo.
+   * 
+ * + * string repo_name = 2; + * @return The repoName. + */ + java.lang.String getRepoName(); + /** + *
+   * The name of the repo. Leave empty for the default repo.
+   * 
+ * + * string repo_name = 2; + * @return The bytes for repoName. + */ + com.google.protobuf.ByteString + getRepoNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java new file mode 100644 index 000000000000..97c8f268ca63 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java @@ -0,0 +1,266 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public final class Provenance { + private Provenance() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BuildProvenance_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Source_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Source_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Source_FileHashesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Source_FileHashesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_FileHashes_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_FileHashes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Hash_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Hash_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Command_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Command_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Artifact_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Artifact_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SourceContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SourceContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SourceContext_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_AliasContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_AliasContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_GerritSourceContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_GitSourceContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_RepoId_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_RepoId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ProjectRepoId_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033grafeas/v1/provenance.proto\022\ngrafeas.v" + + "1\032\037google/protobuf/timestamp.proto\"\220\004\n\017B" + + "uildProvenance\022\n\n\002id\030\001 \001(\t\022\022\n\nproject_id" + + "\030\002 \001(\t\022%\n\010commands\030\003 \003(\0132\023.grafeas.v1.Co" + + "mmand\022-\n\017built_artifacts\030\004 \003(\0132\024.grafeas" + + ".v1.Artifact\022/\n\013create_time\030\005 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022.\n\nstart_time\030\006 \001(" + + "\0132\032.google.protobuf.Timestamp\022,\n\010end_tim" + + "e\030\007 \001(\0132\032.google.protobuf.Timestamp\022\017\n\007c" + + "reator\030\010 \001(\t\022\020\n\010logs_uri\030\t \001(\t\022-\n\021source" + + "_provenance\030\n \001(\0132\022.grafeas.v1.Source\022\022\n" + + "\ntrigger_id\030\013 \001(\t\022D\n\rbuild_options\030\014 \003(\013" + + "2-.grafeas.v1.BuildProvenance.BuildOptio" + + "nsEntry\022\027\n\017builder_version\030\r \001(\t\0323\n\021Buil" + + "dOptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001\"\225\002\n\006Source\022#\n\033artifact_storage_sou" + + "rce_uri\030\001 \001(\t\0227\n\013file_hashes\030\002 \003(\0132\".gra" + + "feas.v1.Source.FileHashesEntry\022*\n\007contex" + + "t\030\003 \001(\0132\031.grafeas.v1.SourceContext\0226\n\023ad" + + "ditional_contexts\030\004 \003(\0132\031.grafeas.v1.Sou" + + "rceContext\032I\n\017FileHashesEntry\022\013\n\003key\030\001 \001" + + "(\t\022%\n\005value\030\002 \001(\0132\026.grafeas.v1.FileHashe" + + "s:\0028\001\"1\n\nFileHashes\022#\n\tfile_hash\030\001 \003(\0132\020" + + ".grafeas.v1.Hash\"#\n\004Hash\022\014\n\004type\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\014\"]\n\007Command\022\014\n\004name\030\001 \001(\t\022\013" + + "\n\003env\030\002 \003(\t\022\014\n\004args\030\003 \003(\t\022\013\n\003dir\030\004 \001(\t\022\n" + + "\n\002id\030\005 \001(\t\022\020\n\010wait_for\030\006 \003(\t\"7\n\010Artifact" + + "\022\020\n\010checksum\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\r\n\005names\030" + + "\003 \003(\t\"\232\002\n\rSourceContext\0228\n\ncloud_repo\030\001 " + + "\001(\0132\".grafeas.v1.CloudRepoSourceContextH" + + "\000\0221\n\006gerrit\030\002 \001(\0132\037.grafeas.v1.GerritSou" + + "rceContextH\000\022+\n\003git\030\003 \001(\0132\034.grafeas.v1.G" + + "itSourceContextH\000\0225\n\006labels\030\004 \003(\0132%.graf" + + "eas.v1.SourceContext.LabelsEntry\032-\n\013Labe" + + "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B" + + "\t\n\007context\"\212\001\n\014AliasContext\022+\n\004kind\030\001 \001(" + + "\0162\035.grafeas.v1.AliasContext.Kind\022\014\n\004name" + + "\030\002 \001(\t\"?\n\004Kind\022\024\n\020KIND_UNSPECIFIED\020\000\022\t\n\005" + + "FIXED\020\001\022\013\n\007MOVABLE\020\002\022\t\n\005OTHER\020\004\"\223\001\n\026Clou" + + "dRepoSourceContext\022#\n\007repo_id\030\001 \001(\0132\022.gr" + + "afeas.v1.RepoId\022\025\n\013revision_id\030\002 \001(\tH\000\0221" + + "\n\ralias_context\030\003 \001(\0132\030.grafeas.v1.Alias" + + "ContextH\000B\n\n\010revision\"\225\001\n\023GerritSourceCo" + + "ntext\022\020\n\010host_uri\030\001 \001(\t\022\026\n\016gerrit_projec" + + "t\030\002 \001(\t\022\025\n\013revision_id\030\003 \001(\tH\000\0221\n\ralias_" + + "context\030\004 \001(\0132\030.grafeas.v1.AliasContextH" + + "\000B\n\n\010revision\"4\n\020GitSourceContext\022\013\n\003url" + + "\030\001 \001(\t\022\023\n\013revision_id\030\002 \001(\t\"S\n\006RepoId\0224\n" + + "\017project_repo_id\030\001 \001(\0132\031.grafeas.v1.Proj" + + "ectRepoIdH\000\022\r\n\003uid\030\002 \001(\tH\000B\004\n\002id\"6\n\rProj" + + "ectRepoId\022\022\n\nproject_id\030\001 \001(\t\022\021\n\trepo_na" + + "me\030\002 \001(\tBQ\n\rio.grafeas.v1P\001Z8google.gola" + + "ng.org/genproto/googleapis/grafeas/v1;gr" + + "afeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_grafeas_v1_BuildProvenance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BuildProvenance_descriptor, + new java.lang.String[] { "Id", "ProjectId", "Commands", "BuiltArtifacts", "CreateTime", "StartTime", "EndTime", "Creator", "LogsUri", "SourceProvenance", "TriggerId", "BuildOptions", "BuilderVersion", }); + internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor = + internal_static_grafeas_v1_BuildProvenance_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grafeas_v1_Source_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Source_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Source_descriptor, + new java.lang.String[] { "ArtifactStorageSourceUri", "FileHashes", "Context", "AdditionalContexts", }); + internal_static_grafeas_v1_Source_FileHashesEntry_descriptor = + internal_static_grafeas_v1_Source_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_Source_FileHashesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Source_FileHashesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grafeas_v1_FileHashes_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_FileHashes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_FileHashes_descriptor, + new java.lang.String[] { "FileHash", }); + internal_static_grafeas_v1_Hash_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_Hash_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Hash_descriptor, + new java.lang.String[] { "Type", "Value", }); + internal_static_grafeas_v1_Command_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grafeas_v1_Command_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Command_descriptor, + new java.lang.String[] { "Name", "Env", "Args", "Dir", "Id", "WaitFor", }); + internal_static_grafeas_v1_Artifact_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_grafeas_v1_Artifact_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Artifact_descriptor, + new java.lang.String[] { "Checksum", "Id", "Names", }); + internal_static_grafeas_v1_SourceContext_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_grafeas_v1_SourceContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SourceContext_descriptor, + new java.lang.String[] { "CloudRepo", "Gerrit", "Git", "Labels", "Context", }); + internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor = + internal_static_grafeas_v1_SourceContext_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_SourceContext_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grafeas_v1_AliasContext_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_grafeas_v1_AliasContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_AliasContext_descriptor, + new java.lang.String[] { "Kind", "Name", }); + internal_static_grafeas_v1_CloudRepoSourceContext_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_CloudRepoSourceContext_descriptor, + new java.lang.String[] { "RepoId", "RevisionId", "AliasContext", "Revision", }); + internal_static_grafeas_v1_GerritSourceContext_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_GerritSourceContext_descriptor, + new java.lang.String[] { "HostUri", "GerritProject", "RevisionId", "AliasContext", "Revision", }); + internal_static_grafeas_v1_GitSourceContext_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_GitSourceContext_descriptor, + new java.lang.String[] { "Url", "RevisionId", }); + internal_static_grafeas_v1_RepoId_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_grafeas_v1_RepoId_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_RepoId_descriptor, + new java.lang.String[] { "ProjectRepoId", "Uid", "Id", }); + internal_static_grafeas_v1_ProjectRepoId_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ProjectRepoId_descriptor, + new java.lang.String[] { "ProjectId", "RepoName", }); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java new file mode 100644 index 000000000000..eb956626b15c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java @@ -0,0 +1,1954 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Steps taken to build the artifact.
+ * For a TaskRun, typically each container corresponds to one step in the
+ * recipe.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Recipe} + */ +public final class Recipe extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Recipe) + RecipeOrBuilder { +private static final long serialVersionUID = 0L; + // Use Recipe.newBuilder() to construct. + private Recipe(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Recipe() { + type_ = ""; + entryPoint_ = ""; + arguments_ = java.util.Collections.emptyList(); + environment_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Recipe(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Recipe.class, io.grafeas.v1.Recipe.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + *
+   * URI indicating what type of recipe was performed. It determines the meaning
+   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+   * 
+ * + * string type = 1; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * URI indicating what type of recipe was performed. It determines the meaning
+   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+   * 
+ * + * string type = 1; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFINED_IN_MATERIAL_FIELD_NUMBER = 2; + private long definedInMaterial_ = 0L; + /** + *
+   * Index in materials containing the recipe steps that are not implied by
+   * recipe.type. For example, if the recipe type were "make", then this would
+   * point to the source containing the Makefile, not the make program itself.
+   * Set to -1 if the recipe doesn't come from a material, as zero is default
+   * unset value for int64.
+   * 
+ * + * int64 defined_in_material = 2; + * @return The definedInMaterial. + */ + @java.lang.Override + public long getDefinedInMaterial() { + return definedInMaterial_; + } + + public static final int ENTRY_POINT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object entryPoint_ = ""; + /** + *
+   * String identifying the entry point into the build.
+   * This is often a path to a configuration file and/or a target label within
+   * that file. The syntax and meaning are defined by recipe.type. For example,
+   * if the recipe type were "make", then this would reference the directory in
+   * which to run make as well as which target to use.
+   * 
+ * + * string entry_point = 3; + * @return The entryPoint. + */ + @java.lang.Override + public java.lang.String getEntryPoint() { + java.lang.Object ref = entryPoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryPoint_ = s; + return s; + } + } + /** + *
+   * String identifying the entry point into the build.
+   * This is often a path to a configuration file and/or a target label within
+   * that file. The syntax and meaning are defined by recipe.type. For example,
+   * if the recipe type were "make", then this would reference the directory in
+   * which to run make as well as which target to use.
+   * 
+ * + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEntryPointBytes() { + java.lang.Object ref = entryPoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entryPoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARGUMENTS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List arguments_; + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + @java.lang.Override + public java.util.List getArgumentsList() { + return arguments_; + } + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + @java.lang.Override + public java.util.List + getArgumentsOrBuilderList() { + return arguments_; + } + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + @java.lang.Override + public int getArgumentsCount() { + return arguments_.size(); + } + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + @java.lang.Override + public com.google.protobuf.Any getArguments(int index) { + return arguments_.get(index); + } + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder( + int index) { + return arguments_.get(index); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List environment_; + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + @java.lang.Override + public java.util.List getEnvironmentList() { + return environment_; + } + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + @java.lang.Override + public java.util.List + getEnvironmentOrBuilderList() { + return environment_; + } + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + @java.lang.Override + public int getEnvironmentCount() { + return environment_.size(); + } + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + @java.lang.Override + public com.google.protobuf.Any getEnvironment(int index) { + return environment_.get(index); + } + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder( + int index) { + return environment_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (definedInMaterial_ != 0L) { + output.writeInt64(2, definedInMaterial_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entryPoint_); + } + for (int i = 0; i < arguments_.size(); i++) { + output.writeMessage(4, arguments_.get(i)); + } + for (int i = 0; i < environment_.size(); i++) { + output.writeMessage(5, environment_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (definedInMaterial_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, definedInMaterial_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entryPoint_); + } + for (int i = 0; i < arguments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, arguments_.get(i)); + } + for (int i = 0; i < environment_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, environment_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Recipe)) { + return super.equals(obj); + } + io.grafeas.v1.Recipe other = (io.grafeas.v1.Recipe) obj; + + if (!getType() + .equals(other.getType())) return false; + if (getDefinedInMaterial() + != other.getDefinedInMaterial()) return false; + if (!getEntryPoint() + .equals(other.getEntryPoint())) return false; + if (!getArgumentsList() + .equals(other.getArgumentsList())) return false; + if (!getEnvironmentList() + .equals(other.getEnvironmentList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + DEFINED_IN_MATERIAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDefinedInMaterial()); + hash = (37 * hash) + ENTRY_POINT_FIELD_NUMBER; + hash = (53 * hash) + getEntryPoint().hashCode(); + if (getArgumentsCount() > 0) { + hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getArgumentsList().hashCode(); + } + if (getEnvironmentCount() > 0) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironmentList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Recipe parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Recipe parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Recipe parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Recipe parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Recipe parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Recipe parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Recipe parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Recipe parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Recipe parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Recipe parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Recipe parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Recipe parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Recipe prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Steps taken to build the artifact.
+   * For a TaskRun, typically each container corresponds to one step in the
+   * recipe.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Recipe} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Recipe) + io.grafeas.v1.RecipeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Recipe.class, io.grafeas.v1.Recipe.Builder.class); + } + + // Construct using io.grafeas.v1.Recipe.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + definedInMaterial_ = 0L; + entryPoint_ = ""; + if (argumentsBuilder_ == null) { + arguments_ = java.util.Collections.emptyList(); + } else { + arguments_ = null; + argumentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (environmentBuilder_ == null) { + environment_ = java.util.Collections.emptyList(); + } else { + environment_ = null; + environmentBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Recipe getDefaultInstanceForType() { + return io.grafeas.v1.Recipe.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Recipe build() { + io.grafeas.v1.Recipe result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Recipe buildPartial() { + io.grafeas.v1.Recipe result = new io.grafeas.v1.Recipe(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.Recipe result) { + if (argumentsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + arguments_ = java.util.Collections.unmodifiableList(arguments_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.arguments_ = arguments_; + } else { + result.arguments_ = argumentsBuilder_.build(); + } + if (environmentBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + environment_ = java.util.Collections.unmodifiableList(environment_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.environment_ = environment_; + } else { + result.environment_ = environmentBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.Recipe result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.definedInMaterial_ = definedInMaterial_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.entryPoint_ = entryPoint_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Recipe) { + return mergeFrom((io.grafeas.v1.Recipe)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Recipe other) { + if (other == io.grafeas.v1.Recipe.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getDefinedInMaterial() != 0L) { + setDefinedInMaterial(other.getDefinedInMaterial()); + } + if (!other.getEntryPoint().isEmpty()) { + entryPoint_ = other.entryPoint_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (argumentsBuilder_ == null) { + if (!other.arguments_.isEmpty()) { + if (arguments_.isEmpty()) { + arguments_ = other.arguments_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureArgumentsIsMutable(); + arguments_.addAll(other.arguments_); + } + onChanged(); + } + } else { + if (!other.arguments_.isEmpty()) { + if (argumentsBuilder_.isEmpty()) { + argumentsBuilder_.dispose(); + argumentsBuilder_ = null; + arguments_ = other.arguments_; + bitField0_ = (bitField0_ & ~0x00000008); + argumentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getArgumentsFieldBuilder() : null; + } else { + argumentsBuilder_.addAllMessages(other.arguments_); + } + } + } + if (environmentBuilder_ == null) { + if (!other.environment_.isEmpty()) { + if (environment_.isEmpty()) { + environment_ = other.environment_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureEnvironmentIsMutable(); + environment_.addAll(other.environment_); + } + onChanged(); + } + } else { + if (!other.environment_.isEmpty()) { + if (environmentBuilder_.isEmpty()) { + environmentBuilder_.dispose(); + environmentBuilder_ = null; + environment_ = other.environment_; + bitField0_ = (bitField0_ & ~0x00000010); + environmentBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEnvironmentFieldBuilder() : null; + } else { + environmentBuilder_.addAllMessages(other.environment_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + definedInMaterial_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + entryPoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.google.protobuf.Any m = + input.readMessage( + com.google.protobuf.Any.parser(), + extensionRegistry); + if (argumentsBuilder_ == null) { + ensureArgumentsIsMutable(); + arguments_.add(m); + } else { + argumentsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + com.google.protobuf.Any m = + input.readMessage( + com.google.protobuf.Any.parser(), + extensionRegistry); + if (environmentBuilder_ == null) { + ensureEnvironmentIsMutable(); + environment_.add(m); + } else { + environmentBuilder_.addMessage(m); + } + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + *
+     * URI indicating what type of recipe was performed. It determines the meaning
+     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+     * 
+ * + * string type = 1; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * URI indicating what type of recipe was performed. It determines the meaning
+     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+     * 
+ * + * string type = 1; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * URI indicating what type of recipe was performed. It determines the meaning
+     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+     * 
+ * + * string type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * URI indicating what type of recipe was performed. It determines the meaning
+     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+     * 
+ * + * string type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * URI indicating what type of recipe was performed. It determines the meaning
+     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+     * 
+ * + * string type = 1; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long definedInMaterial_ ; + /** + *
+     * Index in materials containing the recipe steps that are not implied by
+     * recipe.type. For example, if the recipe type were "make", then this would
+     * point to the source containing the Makefile, not the make program itself.
+     * Set to -1 if the recipe doesn't come from a material, as zero is default
+     * unset value for int64.
+     * 
+ * + * int64 defined_in_material = 2; + * @return The definedInMaterial. + */ + @java.lang.Override + public long getDefinedInMaterial() { + return definedInMaterial_; + } + /** + *
+     * Index in materials containing the recipe steps that are not implied by
+     * recipe.type. For example, if the recipe type were "make", then this would
+     * point to the source containing the Makefile, not the make program itself.
+     * Set to -1 if the recipe doesn't come from a material, as zero is default
+     * unset value for int64.
+     * 
+ * + * int64 defined_in_material = 2; + * @param value The definedInMaterial to set. + * @return This builder for chaining. + */ + public Builder setDefinedInMaterial(long value) { + + definedInMaterial_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Index in materials containing the recipe steps that are not implied by
+     * recipe.type. For example, if the recipe type were "make", then this would
+     * point to the source containing the Makefile, not the make program itself.
+     * Set to -1 if the recipe doesn't come from a material, as zero is default
+     * unset value for int64.
+     * 
+ * + * int64 defined_in_material = 2; + * @return This builder for chaining. + */ + public Builder clearDefinedInMaterial() { + bitField0_ = (bitField0_ & ~0x00000002); + definedInMaterial_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object entryPoint_ = ""; + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For example,
+     * if the recipe type were "make", then this would reference the directory in
+     * which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @return The entryPoint. + */ + public java.lang.String getEntryPoint() { + java.lang.Object ref = entryPoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryPoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For example,
+     * if the recipe type were "make", then this would reference the directory in
+     * which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + public com.google.protobuf.ByteString + getEntryPointBytes() { + java.lang.Object ref = entryPoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entryPoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For example,
+     * if the recipe type were "make", then this would reference the directory in
+     * which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @param value The entryPoint to set. + * @return This builder for chaining. + */ + public Builder setEntryPoint( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + entryPoint_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For example,
+     * if the recipe type were "make", then this would reference the directory in
+     * which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @return This builder for chaining. + */ + public Builder clearEntryPoint() { + entryPoint_ = getDefaultInstance().getEntryPoint(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For example,
+     * if the recipe type were "make", then this would reference the directory in
+     * which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @param value The bytes for entryPoint to set. + * @return This builder for chaining. + */ + public Builder setEntryPointBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + entryPoint_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List arguments_ = + java.util.Collections.emptyList(); + private void ensureArgumentsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + arguments_ = new java.util.ArrayList(arguments_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> argumentsBuilder_; + + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public java.util.List getArgumentsList() { + if (argumentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(arguments_); + } else { + return argumentsBuilder_.getMessageList(); + } + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public int getArgumentsCount() { + if (argumentsBuilder_ == null) { + return arguments_.size(); + } else { + return argumentsBuilder_.getCount(); + } + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public com.google.protobuf.Any getArguments(int index) { + if (argumentsBuilder_ == null) { + return arguments_.get(index); + } else { + return argumentsBuilder_.getMessage(index); + } + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder setArguments( + int index, com.google.protobuf.Any value) { + if (argumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgumentsIsMutable(); + arguments_.set(index, value); + onChanged(); + } else { + argumentsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder setArguments( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (argumentsBuilder_ == null) { + ensureArgumentsIsMutable(); + arguments_.set(index, builderForValue.build()); + onChanged(); + } else { + argumentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder addArguments(com.google.protobuf.Any value) { + if (argumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgumentsIsMutable(); + arguments_.add(value); + onChanged(); + } else { + argumentsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder addArguments( + int index, com.google.protobuf.Any value) { + if (argumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgumentsIsMutable(); + arguments_.add(index, value); + onChanged(); + } else { + argumentsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder addArguments( + com.google.protobuf.Any.Builder builderForValue) { + if (argumentsBuilder_ == null) { + ensureArgumentsIsMutable(); + arguments_.add(builderForValue.build()); + onChanged(); + } else { + argumentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder addArguments( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (argumentsBuilder_ == null) { + ensureArgumentsIsMutable(); + arguments_.add(index, builderForValue.build()); + onChanged(); + } else { + argumentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder addAllArguments( + java.lang.Iterable values) { + if (argumentsBuilder_ == null) { + ensureArgumentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, arguments_); + onChanged(); + } else { + argumentsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder clearArguments() { + if (argumentsBuilder_ == null) { + arguments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + argumentsBuilder_.clear(); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder removeArguments(int index) { + if (argumentsBuilder_ == null) { + ensureArgumentsIsMutable(); + arguments_.remove(index); + onChanged(); + } else { + argumentsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public com.google.protobuf.Any.Builder getArgumentsBuilder( + int index) { + return getArgumentsFieldBuilder().getBuilder(index); + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder( + int index) { + if (argumentsBuilder_ == null) { + return arguments_.get(index); } else { + return argumentsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public java.util.List + getArgumentsOrBuilderList() { + if (argumentsBuilder_ != null) { + return argumentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(arguments_); + } + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public com.google.protobuf.Any.Builder addArgumentsBuilder() { + return getArgumentsFieldBuilder().addBuilder( + com.google.protobuf.Any.getDefaultInstance()); + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public com.google.protobuf.Any.Builder addArgumentsBuilder( + int index) { + return getArgumentsFieldBuilder().addBuilder( + index, com.google.protobuf.Any.getDefaultInstance()); + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public java.util.List + getArgumentsBuilderList() { + return getArgumentsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getArgumentsFieldBuilder() { + if (argumentsBuilder_ == null) { + argumentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + arguments_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + arguments_ = null; + } + return argumentsBuilder_; + } + + private java.util.List environment_ = + java.util.Collections.emptyList(); + private void ensureEnvironmentIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + environment_ = new java.util.ArrayList(environment_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> environmentBuilder_; + + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public java.util.List getEnvironmentList() { + if (environmentBuilder_ == null) { + return java.util.Collections.unmodifiableList(environment_); + } else { + return environmentBuilder_.getMessageList(); + } + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public int getEnvironmentCount() { + if (environmentBuilder_ == null) { + return environment_.size(); + } else { + return environmentBuilder_.getCount(); + } + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public com.google.protobuf.Any getEnvironment(int index) { + if (environmentBuilder_ == null) { + return environment_.get(index); + } else { + return environmentBuilder_.getMessage(index); + } + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder setEnvironment( + int index, com.google.protobuf.Any value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentIsMutable(); + environment_.set(index, value); + onChanged(); + } else { + environmentBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder setEnvironment( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (environmentBuilder_ == null) { + ensureEnvironmentIsMutable(); + environment_.set(index, builderForValue.build()); + onChanged(); + } else { + environmentBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder addEnvironment(com.google.protobuf.Any value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentIsMutable(); + environment_.add(value); + onChanged(); + } else { + environmentBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder addEnvironment( + int index, com.google.protobuf.Any value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentIsMutable(); + environment_.add(index, value); + onChanged(); + } else { + environmentBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder addEnvironment( + com.google.protobuf.Any.Builder builderForValue) { + if (environmentBuilder_ == null) { + ensureEnvironmentIsMutable(); + environment_.add(builderForValue.build()); + onChanged(); + } else { + environmentBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder addEnvironment( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (environmentBuilder_ == null) { + ensureEnvironmentIsMutable(); + environment_.add(index, builderForValue.build()); + onChanged(); + } else { + environmentBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder addAllEnvironment( + java.lang.Iterable values) { + if (environmentBuilder_ == null) { + ensureEnvironmentIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, environment_); + onChanged(); + } else { + environmentBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder clearEnvironment() { + if (environmentBuilder_ == null) { + environment_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + environmentBuilder_.clear(); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder removeEnvironment(int index) { + if (environmentBuilder_ == null) { + ensureEnvironmentIsMutable(); + environment_.remove(index); + onChanged(); + } else { + environmentBuilder_.remove(index); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public com.google.protobuf.Any.Builder getEnvironmentBuilder( + int index) { + return getEnvironmentFieldBuilder().getBuilder(index); + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder( + int index) { + if (environmentBuilder_ == null) { + return environment_.get(index); } else { + return environmentBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public java.util.List + getEnvironmentOrBuilderList() { + if (environmentBuilder_ != null) { + return environmentBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(environment_); + } + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public com.google.protobuf.Any.Builder addEnvironmentBuilder() { + return getEnvironmentFieldBuilder().addBuilder( + com.google.protobuf.Any.getDefaultInstance()); + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public com.google.protobuf.Any.Builder addEnvironmentBuilder( + int index) { + return getEnvironmentFieldBuilder().addBuilder( + index, com.google.protobuf.Any.getDefaultInstance()); + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public java.util.List + getEnvironmentBuilderList() { + return getEnvironmentFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getEnvironmentFieldBuilder() { + if (environmentBuilder_ == null) { + environmentBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + environment_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + environment_ = null; + } + return environmentBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Recipe) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Recipe) + private static final io.grafeas.v1.Recipe DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Recipe(); + } + + public static io.grafeas.v1.Recipe getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Recipe parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Recipe getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java new file mode 100644 index 000000000000..c45233e0a691 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java @@ -0,0 +1,201 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +public interface RecipeOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Recipe) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * URI indicating what type of recipe was performed. It determines the meaning
+   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+   * 
+ * + * string type = 1; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * URI indicating what type of recipe was performed. It determines the meaning
+   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+   * 
+ * + * string type = 1; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+   * Index in materials containing the recipe steps that are not implied by
+   * recipe.type. For example, if the recipe type were "make", then this would
+   * point to the source containing the Makefile, not the make program itself.
+   * Set to -1 if the recipe doesn't come from a material, as zero is default
+   * unset value for int64.
+   * 
+ * + * int64 defined_in_material = 2; + * @return The definedInMaterial. + */ + long getDefinedInMaterial(); + + /** + *
+   * String identifying the entry point into the build.
+   * This is often a path to a configuration file and/or a target label within
+   * that file. The syntax and meaning are defined by recipe.type. For example,
+   * if the recipe type were "make", then this would reference the directory in
+   * which to run make as well as which target to use.
+   * 
+ * + * string entry_point = 3; + * @return The entryPoint. + */ + java.lang.String getEntryPoint(); + /** + *
+   * String identifying the entry point into the build.
+   * This is often a path to a configuration file and/or a target label within
+   * that file. The syntax and meaning are defined by recipe.type. For example,
+   * if the recipe type were "make", then this would reference the directory in
+   * which to run make as well as which target to use.
+   * 
+ * + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + com.google.protobuf.ByteString + getEntryPointBytes(); + + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + java.util.List + getArgumentsList(); + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + com.google.protobuf.Any getArguments(int index); + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + int getArgumentsCount(); + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + java.util.List + getArgumentsOrBuilderList(); + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder( + int index); + + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + java.util.List + getEnvironmentList(); + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + com.google.protobuf.Any getEnvironment(int index); + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + int getEnvironmentCount(); + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + java.util.List + getEnvironmentOrBuilderList(); + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java new file mode 100644 index 000000000000..6f36de79b4d2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java @@ -0,0 +1,744 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + *
+ * Metadata for any related URL information.
+ * 
+ * + * Protobuf type {@code grafeas.v1.RelatedUrl} + */ +public final class RelatedUrl extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.RelatedUrl) + RelatedUrlOrBuilder { +private static final long serialVersionUID = 0L; + // Use RelatedUrl.newBuilder() to construct. + private RelatedUrl(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RelatedUrl() { + url_ = ""; + label_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RelatedUrl(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.RelatedUrl.class, io.grafeas.v1.RelatedUrl.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+   * Specific URL associated with the resource.
+   * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+   * Specific URL associated with the resource.
+   * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABEL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object label_ = ""; + /** + *
+   * Label to describe usage of the URL.
+   * 
+ * + * string label = 2; + * @return The label. + */ + @java.lang.Override + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } + } + /** + *
+   * Label to describe usage of the URL.
+   * 
+ * + * string label = 2; + * @return The bytes for label. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, label_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, label_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.RelatedUrl)) { + return super.equals(obj); + } + io.grafeas.v1.RelatedUrl other = (io.grafeas.v1.RelatedUrl) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getLabel() + .equals(other.getLabel())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.RelatedUrl parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.RelatedUrl parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.RelatedUrl parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.RelatedUrl parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.RelatedUrl parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.RelatedUrl parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.RelatedUrl parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.RelatedUrl parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.RelatedUrl parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.RelatedUrl parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.RelatedUrl parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.RelatedUrl parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.RelatedUrl prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Metadata for any related URL information.
+   * 
+ * + * Protobuf type {@code grafeas.v1.RelatedUrl} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.RelatedUrl) + io.grafeas.v1.RelatedUrlOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.RelatedUrl.class, io.grafeas.v1.RelatedUrl.Builder.class); + } + + // Construct using io.grafeas.v1.RelatedUrl.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + url_ = ""; + label_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.RelatedUrl getDefaultInstanceForType() { + return io.grafeas.v1.RelatedUrl.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.RelatedUrl build() { + io.grafeas.v1.RelatedUrl result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.RelatedUrl buildPartial() { + io.grafeas.v1.RelatedUrl result = new io.grafeas.v1.RelatedUrl(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.RelatedUrl result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.label_ = label_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.RelatedUrl) { + return mergeFrom((io.grafeas.v1.RelatedUrl)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.RelatedUrl other) { + if (other == io.grafeas.v1.RelatedUrl.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLabel().isEmpty()) { + label_ = other.label_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + label_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object url_ = ""; + /** + *
+     * Specific URL associated with the resource.
+     * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Specific URL associated with the resource.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Specific URL associated with the resource.
+     * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Specific URL associated with the resource.
+     * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Specific URL associated with the resource.
+     * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object label_ = ""; + /** + *
+     * Label to describe usage of the URL.
+     * 
+ * + * string label = 2; + * @return The label. + */ + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Label to describe usage of the URL.
+     * 
+ * + * string label = 2; + * @return The bytes for label. + */ + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Label to describe usage of the URL.
+     * 
+ * + * string label = 2; + * @param value The label to set. + * @return This builder for chaining. + */ + public Builder setLabel( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + label_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Label to describe usage of the URL.
+     * 
+ * + * string label = 2; + * @return This builder for chaining. + */ + public Builder clearLabel() { + label_ = getDefaultInstance().getLabel(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Label to describe usage of the URL.
+     * 
+ * + * string label = 2; + * @param value The bytes for label to set. + * @return This builder for chaining. + */ + public Builder setLabelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + label_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.RelatedUrl) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.RelatedUrl) + private static final io.grafeas.v1.RelatedUrl DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.RelatedUrl(); + } + + public static io.grafeas.v1.RelatedUrl getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelatedUrl parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.RelatedUrl getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java new file mode 100644 index 000000000000..f90406db3f4f --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public interface RelatedUrlOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.RelatedUrl) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Specific URL associated with the resource.
+   * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+   * Specific URL associated with the resource.
+   * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+   * Label to describe usage of the URL.
+   * 
+ * + * string label = 2; + * @return The label. + */ + java.lang.String getLabel(); + /** + *
+   * Label to describe usage of the URL.
+   * 
+ * + * string label = 2; + * @return The bytes for label. + */ + com.google.protobuf.ByteString + getLabelBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java new file mode 100644 index 000000000000..0ee53da9cea2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java @@ -0,0 +1,955 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * A unique identifier for a Cloud Repo.
+ * 
+ * + * Protobuf type {@code grafeas.v1.RepoId} + */ +public final class RepoId extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.RepoId) + RepoIdOrBuilder { +private static final long serialVersionUID = 0L; + // Use RepoId.newBuilder() to construct. + private RepoId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RepoId() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RepoId(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.RepoId.class, io.grafeas.v1.RepoId.Builder.class); + } + + private int idCase_ = 0; + private java.lang.Object id_; + public enum IdCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PROJECT_REPO_ID(1), + UID(2), + ID_NOT_SET(0); + private final int value; + private IdCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IdCase valueOf(int value) { + return forNumber(value); + } + + public static IdCase forNumber(int value) { + switch (value) { + case 1: return PROJECT_REPO_ID; + case 2: return UID; + case 0: return ID_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public IdCase + getIdCase() { + return IdCase.forNumber( + idCase_); + } + + public static final int PROJECT_REPO_ID_FIELD_NUMBER = 1; + /** + *
+   * A combination of a project ID and a repo name.
+   * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + * @return Whether the projectRepoId field is set. + */ + @java.lang.Override + public boolean hasProjectRepoId() { + return idCase_ == 1; + } + /** + *
+   * A combination of a project ID and a repo name.
+   * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + * @return The projectRepoId. + */ + @java.lang.Override + public io.grafeas.v1.ProjectRepoId getProjectRepoId() { + if (idCase_ == 1) { + return (io.grafeas.v1.ProjectRepoId) id_; + } + return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); + } + /** + *
+   * A combination of a project ID and a repo name.
+   * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + @java.lang.Override + public io.grafeas.v1.ProjectRepoIdOrBuilder getProjectRepoIdOrBuilder() { + if (idCase_ == 1) { + return (io.grafeas.v1.ProjectRepoId) id_; + } + return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); + } + + public static final int UID_FIELD_NUMBER = 2; + /** + *
+   * A server-assigned, globally unique identifier.
+   * 
+ * + * string uid = 2; + * @return Whether the uid field is set. + */ + public boolean hasUid() { + return idCase_ == 2; + } + /** + *
+   * A server-assigned, globally unique identifier.
+   * 
+ * + * string uid = 2; + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 2) { + id_ = s; + } + return s; + } + } + /** + *
+   * A server-assigned, globally unique identifier.
+   * 
+ * + * string uid = 2; + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (idCase_ == 2) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (idCase_ == 1) { + output.writeMessage(1, (io.grafeas.v1.ProjectRepoId) id_); + } + if (idCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (idCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (io.grafeas.v1.ProjectRepoId) id_); + } + if (idCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.RepoId)) { + return super.equals(obj); + } + io.grafeas.v1.RepoId other = (io.grafeas.v1.RepoId) obj; + + if (!getIdCase().equals(other.getIdCase())) return false; + switch (idCase_) { + case 1: + if (!getProjectRepoId() + .equals(other.getProjectRepoId())) return false; + break; + case 2: + if (!getUid() + .equals(other.getUid())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (idCase_) { + case 1: + hash = (37 * hash) + PROJECT_REPO_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectRepoId().hashCode(); + break; + case 2: + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.RepoId parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.RepoId parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.RepoId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.RepoId parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.RepoId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.RepoId parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.RepoId parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.RepoId parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.RepoId parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.RepoId parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.RepoId parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.RepoId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.RepoId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A unique identifier for a Cloud Repo.
+   * 
+ * + * Protobuf type {@code grafeas.v1.RepoId} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.RepoId) + io.grafeas.v1.RepoIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.RepoId.class, io.grafeas.v1.RepoId.Builder.class); + } + + // Construct using io.grafeas.v1.RepoId.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (projectRepoIdBuilder_ != null) { + projectRepoIdBuilder_.clear(); + } + idCase_ = 0; + id_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.RepoId getDefaultInstanceForType() { + return io.grafeas.v1.RepoId.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.RepoId build() { + io.grafeas.v1.RepoId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.RepoId buildPartial() { + io.grafeas.v1.RepoId result = new io.grafeas.v1.RepoId(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.RepoId result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(io.grafeas.v1.RepoId result) { + result.idCase_ = idCase_; + result.id_ = this.id_; + if (idCase_ == 1 && + projectRepoIdBuilder_ != null) { + result.id_ = projectRepoIdBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.RepoId) { + return mergeFrom((io.grafeas.v1.RepoId)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.RepoId other) { + if (other == io.grafeas.v1.RepoId.getDefaultInstance()) return this; + switch (other.getIdCase()) { + case PROJECT_REPO_ID: { + mergeProjectRepoId(other.getProjectRepoId()); + break; + } + case UID: { + idCase_ = 2; + id_ = other.id_; + onChanged(); + break; + } + case ID_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getProjectRepoIdFieldBuilder().getBuilder(), + extensionRegistry); + idCase_ = 1; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + idCase_ = 2; + id_ = s; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int idCase_ = 0; + private java.lang.Object id_; + public IdCase + getIdCase() { + return IdCase.forNumber( + idCase_); + } + + public Builder clearId() { + idCase_ = 0; + id_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ProjectRepoId, io.grafeas.v1.ProjectRepoId.Builder, io.grafeas.v1.ProjectRepoIdOrBuilder> projectRepoIdBuilder_; + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + * @return Whether the projectRepoId field is set. + */ + @java.lang.Override + public boolean hasProjectRepoId() { + return idCase_ == 1; + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + * @return The projectRepoId. + */ + @java.lang.Override + public io.grafeas.v1.ProjectRepoId getProjectRepoId() { + if (projectRepoIdBuilder_ == null) { + if (idCase_ == 1) { + return (io.grafeas.v1.ProjectRepoId) id_; + } + return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); + } else { + if (idCase_ == 1) { + return projectRepoIdBuilder_.getMessage(); + } + return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); + } + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + public Builder setProjectRepoId(io.grafeas.v1.ProjectRepoId value) { + if (projectRepoIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + onChanged(); + } else { + projectRepoIdBuilder_.setMessage(value); + } + idCase_ = 1; + return this; + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + public Builder setProjectRepoId( + io.grafeas.v1.ProjectRepoId.Builder builderForValue) { + if (projectRepoIdBuilder_ == null) { + id_ = builderForValue.build(); + onChanged(); + } else { + projectRepoIdBuilder_.setMessage(builderForValue.build()); + } + idCase_ = 1; + return this; + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + public Builder mergeProjectRepoId(io.grafeas.v1.ProjectRepoId value) { + if (projectRepoIdBuilder_ == null) { + if (idCase_ == 1 && + id_ != io.grafeas.v1.ProjectRepoId.getDefaultInstance()) { + id_ = io.grafeas.v1.ProjectRepoId.newBuilder((io.grafeas.v1.ProjectRepoId) id_) + .mergeFrom(value).buildPartial(); + } else { + id_ = value; + } + onChanged(); + } else { + if (idCase_ == 1) { + projectRepoIdBuilder_.mergeFrom(value); + } else { + projectRepoIdBuilder_.setMessage(value); + } + } + idCase_ = 1; + return this; + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + public Builder clearProjectRepoId() { + if (projectRepoIdBuilder_ == null) { + if (idCase_ == 1) { + idCase_ = 0; + id_ = null; + onChanged(); + } + } else { + if (idCase_ == 1) { + idCase_ = 0; + id_ = null; + } + projectRepoIdBuilder_.clear(); + } + return this; + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + public io.grafeas.v1.ProjectRepoId.Builder getProjectRepoIdBuilder() { + return getProjectRepoIdFieldBuilder().getBuilder(); + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + @java.lang.Override + public io.grafeas.v1.ProjectRepoIdOrBuilder getProjectRepoIdOrBuilder() { + if ((idCase_ == 1) && (projectRepoIdBuilder_ != null)) { + return projectRepoIdBuilder_.getMessageOrBuilder(); + } else { + if (idCase_ == 1) { + return (io.grafeas.v1.ProjectRepoId) id_; + } + return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); + } + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ProjectRepoId, io.grafeas.v1.ProjectRepoId.Builder, io.grafeas.v1.ProjectRepoIdOrBuilder> + getProjectRepoIdFieldBuilder() { + if (projectRepoIdBuilder_ == null) { + if (!(idCase_ == 1)) { + id_ = io.grafeas.v1.ProjectRepoId.getDefaultInstance(); + } + projectRepoIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ProjectRepoId, io.grafeas.v1.ProjectRepoId.Builder, io.grafeas.v1.ProjectRepoIdOrBuilder>( + (io.grafeas.v1.ProjectRepoId) id_, + getParentForChildren(), + isClean()); + id_ = null; + } + idCase_ = 1; + onChanged(); + return projectRepoIdBuilder_; + } + + /** + *
+     * A server-assigned, globally unique identifier.
+     * 
+ * + * string uid = 2; + * @return Whether the uid field is set. + */ + @java.lang.Override + public boolean hasUid() { + return idCase_ == 2; + } + /** + *
+     * A server-assigned, globally unique identifier.
+     * 
+ * + * string uid = 2; + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 2) { + id_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A server-assigned, globally unique identifier.
+     * 
+ * + * string uid = 2; + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (idCase_ == 2) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A server-assigned, globally unique identifier.
+     * 
+ * + * string uid = 2; + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + idCase_ = 2; + id_ = value; + onChanged(); + return this; + } + /** + *
+     * A server-assigned, globally unique identifier.
+     * 
+ * + * string uid = 2; + * @return This builder for chaining. + */ + public Builder clearUid() { + if (idCase_ == 2) { + idCase_ = 0; + id_ = null; + onChanged(); + } + return this; + } + /** + *
+     * A server-assigned, globally unique identifier.
+     * 
+ * + * string uid = 2; + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + idCase_ = 2; + id_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.RepoId) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.RepoId) + private static final io.grafeas.v1.RepoId DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.RepoId(); + } + + public static io.grafeas.v1.RepoId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RepoId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.RepoId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java new file mode 100644 index 000000000000..0bc7c33ef942 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java @@ -0,0 +1,67 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface RepoIdOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.RepoId) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A combination of a project ID and a repo name.
+   * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + * @return Whether the projectRepoId field is set. + */ + boolean hasProjectRepoId(); + /** + *
+   * A combination of a project ID and a repo name.
+   * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + * @return The projectRepoId. + */ + io.grafeas.v1.ProjectRepoId getProjectRepoId(); + /** + *
+   * A combination of a project ID and a repo name.
+   * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + io.grafeas.v1.ProjectRepoIdOrBuilder getProjectRepoIdOrBuilder(); + + /** + *
+   * A server-assigned, globally unique identifier.
+   * 
+ * + * string uid = 2; + * @return Whether the uid field is set. + */ + boolean hasUid(); + /** + *
+   * A server-assigned, globally unique identifier.
+   * 
+ * + * string uid = 2; + * @return The uid. + */ + java.lang.String getUid(); + /** + *
+   * A server-assigned, globally unique identifier.
+   * 
+ * + * string uid = 2; + * @return The bytes for uid. + */ + com.google.protobuf.ByteString + getUidBytes(); + + public io.grafeas.v1.RepoId.IdCase getIdCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java new file mode 100644 index 000000000000..5201a5381fd1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java @@ -0,0 +1,201 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/severity.proto + +package io.grafeas.v1; + +/** + *
+ * Note provider assigned severity/impact ranking.
+ * 
+ * + * Protobuf enum {@code grafeas.v1.Severity} + */ +public enum Severity + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unknown.
+   * 
+ * + * SEVERITY_UNSPECIFIED = 0; + */ + SEVERITY_UNSPECIFIED(0), + /** + *
+   * Minimal severity.
+   * 
+ * + * MINIMAL = 1; + */ + MINIMAL(1), + /** + *
+   * Low severity.
+   * 
+ * + * LOW = 2; + */ + LOW(2), + /** + *
+   * Medium severity.
+   * 
+ * + * MEDIUM = 3; + */ + MEDIUM(3), + /** + *
+   * High severity.
+   * 
+ * + * HIGH = 4; + */ + HIGH(4), + /** + *
+   * Critical severity.
+   * 
+ * + * CRITICAL = 5; + */ + CRITICAL(5), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unknown.
+   * 
+ * + * SEVERITY_UNSPECIFIED = 0; + */ + public static final int SEVERITY_UNSPECIFIED_VALUE = 0; + /** + *
+   * Minimal severity.
+   * 
+ * + * MINIMAL = 1; + */ + public static final int MINIMAL_VALUE = 1; + /** + *
+   * Low severity.
+   * 
+ * + * LOW = 2; + */ + public static final int LOW_VALUE = 2; + /** + *
+   * Medium severity.
+   * 
+ * + * MEDIUM = 3; + */ + public static final int MEDIUM_VALUE = 3; + /** + *
+   * High severity.
+   * 
+ * + * HIGH = 4; + */ + public static final int HIGH_VALUE = 4; + /** + *
+   * Critical severity.
+   * 
+ * + * CRITICAL = 5; + */ + public static final int CRITICAL_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Severity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Severity forNumber(int value) { + switch (value) { + case 0: return SEVERITY_UNSPECIFIED; + case 1: return MINIMAL; + case 2: return LOW; + case 3: return MEDIUM; + case 4: return HIGH; + case 5: return CRITICAL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Severity> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Severity findValueByNumber(int number) { + return Severity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.SeverityOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final Severity[] VALUES = values(); + + public static Severity valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Severity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.Severity) +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java new file mode 100644 index 000000000000..2181e45065aa --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java @@ -0,0 +1,40 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/severity.proto + +package io.grafeas.v1; + +public final class SeverityOuterClass { + private SeverityOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031grafeas/v1/severity.proto\022\ngrafeas.v1*" + + "^\n\010Severity\022\030\n\024SEVERITY_UNSPECIFIED\020\000\022\013\n" + + "\007MINIMAL\020\001\022\007\n\003LOW\020\002\022\n\n\006MEDIUM\020\003\022\010\n\004HIGH\020" + + "\004\022\014\n\010CRITICAL\020\005BQ\n\rio.grafeas.v1P\001Z8goog" + + "le.golang.org/genproto/googleapis/grafea" + + "s/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java new file mode 100644 index 000000000000..66964ee7bd73 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java @@ -0,0 +1,812 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + *
+ * Verifiers (e.g. Kritis implementations) MUST verify signatures
+ * with respect to the trust anchors defined in policy (e.g. a Kritis policy).
+ * Typically this means that the verifier has been configured with a map from
+ * `public_key_id` to public key material (and any required parameters, e.g.
+ * signing algorithm).
+ * In particular, verification implementations MUST NOT treat the signature
+ * `public_key_id` as anything more than a key lookup hint. The `public_key_id`
+ * DOES NOT validate or authenticate a public key; it only provides a mechanism
+ * for quickly selecting a public key ALREADY CONFIGURED on the verifier through
+ * a trusted channel. Verification implementations MUST reject signatures in any
+ * of the following circumstances:
+ *   * The `public_key_id` is not recognized by the verifier.
+ *   * The public key that `public_key_id` refers to does not verify the
+ *     signature with respect to the payload.
+ * The `signature` contents SHOULD NOT be "attached" (where the payload is
+ * included with the serialized `signature` bytes). Verifiers MUST ignore any
+ * "attached" payload and only verify signatures with respect to explicitly
+ * provided payload (e.g. a `payload` field on the proto message that holds
+ * this Signature, or the canonical serialization of the proto message that
+ * holds this signature).
+ * 
+ * + * Protobuf type {@code grafeas.v1.Signature} + */ +public final class Signature extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Signature) + SignatureOrBuilder { +private static final long serialVersionUID = 0L; + // Use Signature.newBuilder() to construct. + private Signature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Signature() { + signature_ = com.google.protobuf.ByteString.EMPTY; + publicKeyId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Signature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Signature.class, io.grafeas.v1.Signature.Builder.class); + } + + public static final int SIGNATURE_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+   * The content of the signature, an opaque bytestring.
+   * The payload that this signature verifies MUST be unambiguously provided
+   * with the Signature during verification. A wrapper message might provide
+   * the payload explicitly. Alternatively, a message might have a canonical
+   * serialization that can always be unambiguously computed to derive the
+   * payload.
+   * 
+ * + * bytes signature = 1; + * @return The signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSignature() { + return signature_; + } + + public static final int PUBLIC_KEY_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object publicKeyId_ = ""; + /** + *
+   * The identifier for the public key that verifies this signature.
+   *   * The `public_key_id` is required.
+   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+   *     such as a cryptographic digest.
+   * Examples of valid `public_key_id`s:
+   * OpenPGP V4 public key fingerprint:
+   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+   * details on this scheme.
+   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+   * serialization):
+   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+   * 
+ * + * string public_key_id = 2; + * @return The publicKeyId. + */ + @java.lang.Override + public java.lang.String getPublicKeyId() { + java.lang.Object ref = publicKeyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKeyId_ = s; + return s; + } + } + /** + *
+   * The identifier for the public key that verifies this signature.
+   *   * The `public_key_id` is required.
+   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+   *     such as a cryptographic digest.
+   * Examples of valid `public_key_id`s:
+   * OpenPGP V4 public key fingerprint:
+   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+   * details on this scheme.
+   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+   * serialization):
+   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+   * 
+ * + * string public_key_id = 2; + * @return The bytes for publicKeyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPublicKeyIdBytes() { + java.lang.Object ref = publicKeyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKeyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!signature_.isEmpty()) { + output.writeBytes(1, signature_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, publicKeyId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!signature_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, signature_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, publicKeyId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Signature)) { + return super.equals(obj); + } + io.grafeas.v1.Signature other = (io.grafeas.v1.Signature) obj; + + if (!getSignature() + .equals(other.getSignature())) return false; + if (!getPublicKeyId() + .equals(other.getPublicKeyId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getSignature().hashCode(); + hash = (37 * hash) + PUBLIC_KEY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPublicKeyId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Signature parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Signature parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Signature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Signature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Signature parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Signature parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Signature parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Signature parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Signature parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Signature parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Signature parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Signature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Signature prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Verifiers (e.g. Kritis implementations) MUST verify signatures
+   * with respect to the trust anchors defined in policy (e.g. a Kritis policy).
+   * Typically this means that the verifier has been configured with a map from
+   * `public_key_id` to public key material (and any required parameters, e.g.
+   * signing algorithm).
+   * In particular, verification implementations MUST NOT treat the signature
+   * `public_key_id` as anything more than a key lookup hint. The `public_key_id`
+   * DOES NOT validate or authenticate a public key; it only provides a mechanism
+   * for quickly selecting a public key ALREADY CONFIGURED on the verifier through
+   * a trusted channel. Verification implementations MUST reject signatures in any
+   * of the following circumstances:
+   *   * The `public_key_id` is not recognized by the verifier.
+   *   * The public key that `public_key_id` refers to does not verify the
+   *     signature with respect to the payload.
+   * The `signature` contents SHOULD NOT be "attached" (where the payload is
+   * included with the serialized `signature` bytes). Verifiers MUST ignore any
+   * "attached" payload and only verify signatures with respect to explicitly
+   * provided payload (e.g. a `payload` field on the proto message that holds
+   * this Signature, or the canonical serialization of the proto message that
+   * holds this signature).
+   * 
+ * + * Protobuf type {@code grafeas.v1.Signature} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Signature) + io.grafeas.v1.SignatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Signature.class, io.grafeas.v1.Signature.Builder.class); + } + + // Construct using io.grafeas.v1.Signature.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + signature_ = com.google.protobuf.ByteString.EMPTY; + publicKeyId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Signature getDefaultInstanceForType() { + return io.grafeas.v1.Signature.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Signature build() { + io.grafeas.v1.Signature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Signature buildPartial() { + io.grafeas.v1.Signature result = new io.grafeas.v1.Signature(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Signature result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.signature_ = signature_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.publicKeyId_ = publicKeyId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Signature) { + return mergeFrom((io.grafeas.v1.Signature)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Signature other) { + if (other == io.grafeas.v1.Signature.getDefaultInstance()) return this; + if (other.getSignature() != com.google.protobuf.ByteString.EMPTY) { + setSignature(other.getSignature()); + } + if (!other.getPublicKeyId().isEmpty()) { + publicKeyId_ = other.publicKeyId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + signature_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + publicKeyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * The content of the signature, an opaque bytestring.
+     * The payload that this signature verifies MUST be unambiguously provided
+     * with the Signature during verification. A wrapper message might provide
+     * the payload explicitly. Alternatively, a message might have a canonical
+     * serialization that can always be unambiguously computed to derive the
+     * payload.
+     * 
+ * + * bytes signature = 1; + * @return The signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSignature() { + return signature_; + } + /** + *
+     * The content of the signature, an opaque bytestring.
+     * The payload that this signature verifies MUST be unambiguously provided
+     * with the Signature during verification. A wrapper message might provide
+     * the payload explicitly. Alternatively, a message might have a canonical
+     * serialization that can always be unambiguously computed to derive the
+     * payload.
+     * 
+ * + * bytes signature = 1; + * @param value The signature to set. + * @return This builder for chaining. + */ + public Builder setSignature(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + signature_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The content of the signature, an opaque bytestring.
+     * The payload that this signature verifies MUST be unambiguously provided
+     * with the Signature during verification. A wrapper message might provide
+     * the payload explicitly. Alternatively, a message might have a canonical
+     * serialization that can always be unambiguously computed to derive the
+     * payload.
+     * 
+ * + * bytes signature = 1; + * @return This builder for chaining. + */ + public Builder clearSignature() { + bitField0_ = (bitField0_ & ~0x00000001); + signature_ = getDefaultInstance().getSignature(); + onChanged(); + return this; + } + + private java.lang.Object publicKeyId_ = ""; + /** + *
+     * The identifier for the public key that verifies this signature.
+     *   * The `public_key_id` is required.
+     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+     *     such as a cryptographic digest.
+     * Examples of valid `public_key_id`s:
+     * OpenPGP V4 public key fingerprint:
+     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+     * details on this scheme.
+     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+     * serialization):
+     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+     * 
+ * + * string public_key_id = 2; + * @return The publicKeyId. + */ + public java.lang.String getPublicKeyId() { + java.lang.Object ref = publicKeyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKeyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The identifier for the public key that verifies this signature.
+     *   * The `public_key_id` is required.
+     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+     *     such as a cryptographic digest.
+     * Examples of valid `public_key_id`s:
+     * OpenPGP V4 public key fingerprint:
+     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+     * details on this scheme.
+     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+     * serialization):
+     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+     * 
+ * + * string public_key_id = 2; + * @return The bytes for publicKeyId. + */ + public com.google.protobuf.ByteString + getPublicKeyIdBytes() { + java.lang.Object ref = publicKeyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKeyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The identifier for the public key that verifies this signature.
+     *   * The `public_key_id` is required.
+     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+     *     such as a cryptographic digest.
+     * Examples of valid `public_key_id`s:
+     * OpenPGP V4 public key fingerprint:
+     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+     * details on this scheme.
+     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+     * serialization):
+     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+     * 
+ * + * string public_key_id = 2; + * @param value The publicKeyId to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + publicKeyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The identifier for the public key that verifies this signature.
+     *   * The `public_key_id` is required.
+     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+     *     such as a cryptographic digest.
+     * Examples of valid `public_key_id`s:
+     * OpenPGP V4 public key fingerprint:
+     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+     * details on this scheme.
+     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+     * serialization):
+     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+     * 
+ * + * string public_key_id = 2; + * @return This builder for chaining. + */ + public Builder clearPublicKeyId() { + publicKeyId_ = getDefaultInstance().getPublicKeyId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The identifier for the public key that verifies this signature.
+     *   * The `public_key_id` is required.
+     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+     *     such as a cryptographic digest.
+     * Examples of valid `public_key_id`s:
+     * OpenPGP V4 public key fingerprint:
+     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+     * details on this scheme.
+     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+     * serialization):
+     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+     * 
+ * + * string public_key_id = 2; + * @param value The bytes for publicKeyId to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + publicKeyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Signature) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Signature) + private static final io.grafeas.v1.Signature DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Signature(); + } + + public static io.grafeas.v1.Signature getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Signature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Signature getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java new file mode 100644 index 000000000000..abe4d6a9a8d9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java @@ -0,0 +1,70 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public interface SignatureOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Signature) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The content of the signature, an opaque bytestring.
+   * The payload that this signature verifies MUST be unambiguously provided
+   * with the Signature during verification. A wrapper message might provide
+   * the payload explicitly. Alternatively, a message might have a canonical
+   * serialization that can always be unambiguously computed to derive the
+   * payload.
+   * 
+ * + * bytes signature = 1; + * @return The signature. + */ + com.google.protobuf.ByteString getSignature(); + + /** + *
+   * The identifier for the public key that verifies this signature.
+   *   * The `public_key_id` is required.
+   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+   *     such as a cryptographic digest.
+   * Examples of valid `public_key_id`s:
+   * OpenPGP V4 public key fingerprint:
+   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+   * details on this scheme.
+   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+   * serialization):
+   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+   * 
+ * + * string public_key_id = 2; + * @return The publicKeyId. + */ + java.lang.String getPublicKeyId(); + /** + *
+   * The identifier for the public key that verifies this signature.
+   *   * The `public_key_id` is required.
+   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+   *     such as a cryptographic digest.
+   * Examples of valid `public_key_id`s:
+   * OpenPGP V4 public key fingerprint:
+   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+   * details on this scheme.
+   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+   * serialization):
+   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+   * 
+ * + * string public_key_id = 2; + * @return The bytes for publicKeyId. + */ + com.google.protobuf.ByteString + getPublicKeyIdBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java new file mode 100644 index 000000000000..e4dd833a02bd --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java @@ -0,0 +1,6801 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/slsa_provenance.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.SlsaProvenance} + */ +public final class SlsaProvenance extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance) + SlsaProvenanceOrBuilder { +private static final long serialVersionUID = 0L; + // Use SlsaProvenance.newBuilder() to construct. + private SlsaProvenance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaProvenance() { + materials_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaProvenance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.class, io.grafeas.v1.SlsaProvenance.Builder.class); + } + + public interface SlsaRecipeOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaRecipe) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * URI indicating what type of recipe was performed. It determines the
+     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+     * materials.
+     * 
+ * + * string type = 1; + * @return The type. + */ + java.lang.String getType(); + /** + *
+     * URI indicating what type of recipe was performed. It determines the
+     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+     * materials.
+     * 
+ * + * string type = 1; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+     * Index in materials containing the recipe steps that are not implied by
+     * recipe.type. For example, if the recipe type were "make", then this would
+     * point to the source containing the Makefile, not the make program itself.
+     * Set to -1 if the recipe doesn't come from a material, as zero is default
+     * unset value for int64.
+     * 
+ * + * int64 defined_in_material = 2; + * @return The definedInMaterial. + */ + long getDefinedInMaterial(); + + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For
+     * example, if the recipe type were "make", then this would reference the
+     * directory in which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @return The entryPoint. + */ + java.lang.String getEntryPoint(); + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For
+     * example, if the recipe type were "make", then this would reference the
+     * directory in which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + com.google.protobuf.ByteString + getEntryPointBytes(); + + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+     * recipe type were "make", then this might be the flags passed to make
+     * aside from the target, which is captured in recipe.entryPoint. Depending
+     * on the recipe Type, the structure may be different.
+     * 
+ * + * .google.protobuf.Any arguments = 4; + * @return Whether the arguments field is set. + */ + boolean hasArguments(); + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+     * recipe type were "make", then this might be the flags passed to make
+     * aside from the target, which is captured in recipe.entryPoint. Depending
+     * on the recipe Type, the structure may be different.
+     * 
+ * + * .google.protobuf.Any arguments = 4; + * @return The arguments. + */ + com.google.protobuf.Any getArguments(); + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+     * recipe type were "make", then this might be the flags passed to make
+     * aside from the target, which is captured in recipe.entryPoint. Depending
+     * on the recipe Type, the structure may be different.
+     * 
+ * + * .google.protobuf.Any arguments = 4; + */ + com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder(); + + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating
+     * the recipe. Usually only needed for reproducing the build but not
+     * evaluated as part of policy. Depending on the recipe Type, the structure
+     * may be different.
+     * 
+ * + * .google.protobuf.Any environment = 5; + * @return Whether the environment field is set. + */ + boolean hasEnvironment(); + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating
+     * the recipe. Usually only needed for reproducing the build but not
+     * evaluated as part of policy. Depending on the recipe Type, the structure
+     * may be different.
+     * 
+ * + * .google.protobuf.Any environment = 5; + * @return The environment. + */ + com.google.protobuf.Any getEnvironment(); + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating
+     * the recipe. Usually only needed for reproducing the build but not
+     * evaluated as part of policy. Depending on the recipe Type, the structure
+     * may be different.
+     * 
+ * + * .google.protobuf.Any environment = 5; + */ + com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder(); + } + /** + *
+   * Steps taken to build the artifact.
+   * For a TaskRun, typically each container corresponds to one step in the
+   * recipe.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaRecipe} + */ + public static final class SlsaRecipe extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaRecipe) + SlsaRecipeOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaRecipe.newBuilder() to construct. + private SlsaRecipe(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaRecipe() { + type_ = ""; + entryPoint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaRecipe(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaRecipe.class, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + *
+     * URI indicating what type of recipe was performed. It determines the
+     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+     * materials.
+     * 
+ * + * string type = 1; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+     * URI indicating what type of recipe was performed. It determines the
+     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+     * materials.
+     * 
+ * + * string type = 1; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFINED_IN_MATERIAL_FIELD_NUMBER = 2; + private long definedInMaterial_ = 0L; + /** + *
+     * Index in materials containing the recipe steps that are not implied by
+     * recipe.type. For example, if the recipe type were "make", then this would
+     * point to the source containing the Makefile, not the make program itself.
+     * Set to -1 if the recipe doesn't come from a material, as zero is default
+     * unset value for int64.
+     * 
+ * + * int64 defined_in_material = 2; + * @return The definedInMaterial. + */ + @java.lang.Override + public long getDefinedInMaterial() { + return definedInMaterial_; + } + + public static final int ENTRY_POINT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object entryPoint_ = ""; + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For
+     * example, if the recipe type were "make", then this would reference the
+     * directory in which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @return The entryPoint. + */ + @java.lang.Override + public java.lang.String getEntryPoint() { + java.lang.Object ref = entryPoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryPoint_ = s; + return s; + } + } + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For
+     * example, if the recipe type were "make", then this would reference the
+     * directory in which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEntryPointBytes() { + java.lang.Object ref = entryPoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entryPoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARGUMENTS_FIELD_NUMBER = 4; + private com.google.protobuf.Any arguments_; + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+     * recipe type were "make", then this might be the flags passed to make
+     * aside from the target, which is captured in recipe.entryPoint. Depending
+     * on the recipe Type, the structure may be different.
+     * 
+ * + * .google.protobuf.Any arguments = 4; + * @return Whether the arguments field is set. + */ + @java.lang.Override + public boolean hasArguments() { + return arguments_ != null; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+     * recipe type were "make", then this might be the flags passed to make
+     * aside from the target, which is captured in recipe.entryPoint. Depending
+     * on the recipe Type, the structure may be different.
+     * 
+ * + * .google.protobuf.Any arguments = 4; + * @return The arguments. + */ + @java.lang.Override + public com.google.protobuf.Any getArguments() { + return arguments_ == null ? com.google.protobuf.Any.getDefaultInstance() : arguments_; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+     * recipe type were "make", then this might be the flags passed to make
+     * aside from the target, which is captured in recipe.entryPoint. Depending
+     * on the recipe Type, the structure may be different.
+     * 
+ * + * .google.protobuf.Any arguments = 4; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder() { + return arguments_ == null ? com.google.protobuf.Any.getDefaultInstance() : arguments_; + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 5; + private com.google.protobuf.Any environment_; + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating
+     * the recipe. Usually only needed for reproducing the build but not
+     * evaluated as part of policy. Depending on the recipe Type, the structure
+     * may be different.
+     * 
+ * + * .google.protobuf.Any environment = 5; + * @return Whether the environment field is set. + */ + @java.lang.Override + public boolean hasEnvironment() { + return environment_ != null; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating
+     * the recipe. Usually only needed for reproducing the build but not
+     * evaluated as part of policy. Depending on the recipe Type, the structure
+     * may be different.
+     * 
+ * + * .google.protobuf.Any environment = 5; + * @return The environment. + */ + @java.lang.Override + public com.google.protobuf.Any getEnvironment() { + return environment_ == null ? com.google.protobuf.Any.getDefaultInstance() : environment_; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating
+     * the recipe. Usually only needed for reproducing the build but not
+     * evaluated as part of policy. Depending on the recipe Type, the structure
+     * may be different.
+     * 
+ * + * .google.protobuf.Any environment = 5; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder() { + return environment_ == null ? com.google.protobuf.Any.getDefaultInstance() : environment_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (definedInMaterial_ != 0L) { + output.writeInt64(2, definedInMaterial_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entryPoint_); + } + if (arguments_ != null) { + output.writeMessage(4, getArguments()); + } + if (environment_ != null) { + output.writeMessage(5, getEnvironment()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (definedInMaterial_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, definedInMaterial_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entryPoint_); + } + if (arguments_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getArguments()); + } + if (environment_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getEnvironment()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaRecipe)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenance.SlsaRecipe other = (io.grafeas.v1.SlsaProvenance.SlsaRecipe) obj; + + if (!getType() + .equals(other.getType())) return false; + if (getDefinedInMaterial() + != other.getDefinedInMaterial()) return false; + if (!getEntryPoint() + .equals(other.getEntryPoint())) return false; + if (hasArguments() != other.hasArguments()) return false; + if (hasArguments()) { + if (!getArguments() + .equals(other.getArguments())) return false; + } + if (hasEnvironment() != other.hasEnvironment()) return false; + if (hasEnvironment()) { + if (!getEnvironment() + .equals(other.getEnvironment())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + DEFINED_IN_MATERIAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDefinedInMaterial()); + hash = (37 * hash) + ENTRY_POINT_FIELD_NUMBER; + hash = (53 * hash) + getEntryPoint().hashCode(); + if (hasArguments()) { + hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getArguments().hashCode(); + } + if (hasEnvironment()) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaRecipe prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Steps taken to build the artifact.
+     * For a TaskRun, typically each container corresponds to one step in the
+     * recipe.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaRecipe} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaRecipe) + io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaRecipe.class, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenance.SlsaRecipe.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + definedInMaterial_ = 0L; + entryPoint_ = ""; + arguments_ = null; + if (argumentsBuilder_ != null) { + argumentsBuilder_.dispose(); + argumentsBuilder_ = null; + } + environment_ = null; + if (environmentBuilder_ != null) { + environmentBuilder_.dispose(); + environmentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaRecipe getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaRecipe build() { + io.grafeas.v1.SlsaProvenance.SlsaRecipe result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaRecipe buildPartial() { + io.grafeas.v1.SlsaProvenance.SlsaRecipe result = new io.grafeas.v1.SlsaProvenance.SlsaRecipe(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaRecipe result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.definedInMaterial_ = definedInMaterial_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.entryPoint_ = entryPoint_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.arguments_ = argumentsBuilder_ == null + ? arguments_ + : argumentsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.environment_ = environmentBuilder_ == null + ? environment_ + : environmentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaRecipe) { + return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaRecipe)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaRecipe other) { + if (other == io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getDefinedInMaterial() != 0L) { + setDefinedInMaterial(other.getDefinedInMaterial()); + } + if (!other.getEntryPoint().isEmpty()) { + entryPoint_ = other.entryPoint_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasArguments()) { + mergeArguments(other.getArguments()); + } + if (other.hasEnvironment()) { + mergeEnvironment(other.getEnvironment()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + definedInMaterial_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + entryPoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getArgumentsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getEnvironmentFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + *
+       * URI indicating what type of recipe was performed. It determines the
+       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+       * materials.
+       * 
+ * + * string type = 1; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * URI indicating what type of recipe was performed. It determines the
+       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+       * materials.
+       * 
+ * + * string type = 1; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * URI indicating what type of recipe was performed. It determines the
+       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+       * materials.
+       * 
+ * + * string type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * URI indicating what type of recipe was performed. It determines the
+       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+       * materials.
+       * 
+ * + * string type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * URI indicating what type of recipe was performed. It determines the
+       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+       * materials.
+       * 
+ * + * string type = 1; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long definedInMaterial_ ; + /** + *
+       * Index in materials containing the recipe steps that are not implied by
+       * recipe.type. For example, if the recipe type were "make", then this would
+       * point to the source containing the Makefile, not the make program itself.
+       * Set to -1 if the recipe doesn't come from a material, as zero is default
+       * unset value for int64.
+       * 
+ * + * int64 defined_in_material = 2; + * @return The definedInMaterial. + */ + @java.lang.Override + public long getDefinedInMaterial() { + return definedInMaterial_; + } + /** + *
+       * Index in materials containing the recipe steps that are not implied by
+       * recipe.type. For example, if the recipe type were "make", then this would
+       * point to the source containing the Makefile, not the make program itself.
+       * Set to -1 if the recipe doesn't come from a material, as zero is default
+       * unset value for int64.
+       * 
+ * + * int64 defined_in_material = 2; + * @param value The definedInMaterial to set. + * @return This builder for chaining. + */ + public Builder setDefinedInMaterial(long value) { + + definedInMaterial_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Index in materials containing the recipe steps that are not implied by
+       * recipe.type. For example, if the recipe type were "make", then this would
+       * point to the source containing the Makefile, not the make program itself.
+       * Set to -1 if the recipe doesn't come from a material, as zero is default
+       * unset value for int64.
+       * 
+ * + * int64 defined_in_material = 2; + * @return This builder for chaining. + */ + public Builder clearDefinedInMaterial() { + bitField0_ = (bitField0_ & ~0x00000002); + definedInMaterial_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object entryPoint_ = ""; + /** + *
+       * String identifying the entry point into the build.
+       * This is often a path to a configuration file and/or a target label within
+       * that file. The syntax and meaning are defined by recipe.type. For
+       * example, if the recipe type were "make", then this would reference the
+       * directory in which to run make as well as which target to use.
+       * 
+ * + * string entry_point = 3; + * @return The entryPoint. + */ + public java.lang.String getEntryPoint() { + java.lang.Object ref = entryPoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryPoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * String identifying the entry point into the build.
+       * This is often a path to a configuration file and/or a target label within
+       * that file. The syntax and meaning are defined by recipe.type. For
+       * example, if the recipe type were "make", then this would reference the
+       * directory in which to run make as well as which target to use.
+       * 
+ * + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + public com.google.protobuf.ByteString + getEntryPointBytes() { + java.lang.Object ref = entryPoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entryPoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * String identifying the entry point into the build.
+       * This is often a path to a configuration file and/or a target label within
+       * that file. The syntax and meaning are defined by recipe.type. For
+       * example, if the recipe type were "make", then this would reference the
+       * directory in which to run make as well as which target to use.
+       * 
+ * + * string entry_point = 3; + * @param value The entryPoint to set. + * @return This builder for chaining. + */ + public Builder setEntryPoint( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + entryPoint_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * String identifying the entry point into the build.
+       * This is often a path to a configuration file and/or a target label within
+       * that file. The syntax and meaning are defined by recipe.type. For
+       * example, if the recipe type were "make", then this would reference the
+       * directory in which to run make as well as which target to use.
+       * 
+ * + * string entry_point = 3; + * @return This builder for chaining. + */ + public Builder clearEntryPoint() { + entryPoint_ = getDefaultInstance().getEntryPoint(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * String identifying the entry point into the build.
+       * This is often a path to a configuration file and/or a target label within
+       * that file. The syntax and meaning are defined by recipe.type. For
+       * example, if the recipe type were "make", then this would reference the
+       * directory in which to run make as well as which target to use.
+       * 
+ * + * string entry_point = 3; + * @param value The bytes for entryPoint to set. + * @return This builder for chaining. + */ + public Builder setEntryPointBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + entryPoint_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Any arguments_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> argumentsBuilder_; + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + * @return Whether the arguments field is set. + */ + public boolean hasArguments() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + * @return The arguments. + */ + public com.google.protobuf.Any getArguments() { + if (argumentsBuilder_ == null) { + return arguments_ == null ? com.google.protobuf.Any.getDefaultInstance() : arguments_; + } else { + return argumentsBuilder_.getMessage(); + } + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + */ + public Builder setArguments(com.google.protobuf.Any value) { + if (argumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + arguments_ = value; + } else { + argumentsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + */ + public Builder setArguments( + com.google.protobuf.Any.Builder builderForValue) { + if (argumentsBuilder_ == null) { + arguments_ = builderForValue.build(); + } else { + argumentsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + */ + public Builder mergeArguments(com.google.protobuf.Any value) { + if (argumentsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + arguments_ != null && + arguments_ != com.google.protobuf.Any.getDefaultInstance()) { + getArgumentsBuilder().mergeFrom(value); + } else { + arguments_ = value; + } + } else { + argumentsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + */ + public Builder clearArguments() { + bitField0_ = (bitField0_ & ~0x00000008); + arguments_ = null; + if (argumentsBuilder_ != null) { + argumentsBuilder_.dispose(); + argumentsBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + */ + public com.google.protobuf.Any.Builder getArgumentsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getArgumentsFieldBuilder().getBuilder(); + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + */ + public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder() { + if (argumentsBuilder_ != null) { + return argumentsBuilder_.getMessageOrBuilder(); + } else { + return arguments_ == null ? + com.google.protobuf.Any.getDefaultInstance() : arguments_; + } + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getArgumentsFieldBuilder() { + if (argumentsBuilder_ == null) { + argumentsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getArguments(), + getParentForChildren(), + isClean()); + arguments_ = null; + } + return argumentsBuilder_; + } + + private com.google.protobuf.Any environment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> environmentBuilder_; + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + * @return Whether the environment field is set. + */ + public boolean hasEnvironment() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + * @return The environment. + */ + public com.google.protobuf.Any getEnvironment() { + if (environmentBuilder_ == null) { + return environment_ == null ? com.google.protobuf.Any.getDefaultInstance() : environment_; + } else { + return environmentBuilder_.getMessage(); + } + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + */ + public Builder setEnvironment(com.google.protobuf.Any value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + } else { + environmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + */ + public Builder setEnvironment( + com.google.protobuf.Any.Builder builderForValue) { + if (environmentBuilder_ == null) { + environment_ = builderForValue.build(); + } else { + environmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + */ + public Builder mergeEnvironment(com.google.protobuf.Any value) { + if (environmentBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + environment_ != null && + environment_ != com.google.protobuf.Any.getDefaultInstance()) { + getEnvironmentBuilder().mergeFrom(value); + } else { + environment_ = value; + } + } else { + environmentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + */ + public Builder clearEnvironment() { + bitField0_ = (bitField0_ & ~0x00000010); + environment_ = null; + if (environmentBuilder_ != null) { + environmentBuilder_.dispose(); + environmentBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + */ + public com.google.protobuf.Any.Builder getEnvironmentBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getEnvironmentFieldBuilder().getBuilder(); + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + */ + public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder() { + if (environmentBuilder_ != null) { + return environmentBuilder_.getMessageOrBuilder(); + } else { + return environment_ == null ? + com.google.protobuf.Any.getDefaultInstance() : environment_; + } + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getEnvironmentFieldBuilder() { + if (environmentBuilder_ == null) { + environmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getEnvironment(), + getParentForChildren(), + isClean()); + environment_ = null; + } + return environmentBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaRecipe) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaRecipe) + private static final io.grafeas.v1.SlsaProvenance.SlsaRecipe DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaRecipe(); + } + + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaRecipe parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaRecipe getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaCompletenessOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaCompleteness) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * If true, the builder claims that recipe.arguments is complete, meaning
+     * that all external inputs are properly captured in the recipe.
+     * 
+ * + * bool arguments = 1; + * @return The arguments. + */ + boolean getArguments(); + + /** + *
+     * If true, the builder claims that recipe.environment is claimed to be
+     * complete.
+     * 
+ * + * bool environment = 2; + * @return The environment. + */ + boolean getEnvironment(); + + /** + *
+     * If true, the builder claims that materials are complete, usually through
+     * some controls to prevent network access. Sometimes called "hermetic".
+     * 
+ * + * bool materials = 3; + * @return The materials. + */ + boolean getMaterials(); + } + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaCompleteness} + */ + public static final class SlsaCompleteness extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaCompleteness) + SlsaCompletenessOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaCompleteness.newBuilder() to construct. + private SlsaCompleteness(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaCompleteness() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaCompleteness(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder.class); + } + + public static final int ARGUMENTS_FIELD_NUMBER = 1; + private boolean arguments_ = false; + /** + *
+     * If true, the builder claims that recipe.arguments is complete, meaning
+     * that all external inputs are properly captured in the recipe.
+     * 
+ * + * bool arguments = 1; + * @return The arguments. + */ + @java.lang.Override + public boolean getArguments() { + return arguments_; + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 2; + private boolean environment_ = false; + /** + *
+     * If true, the builder claims that recipe.environment is claimed to be
+     * complete.
+     * 
+ * + * bool environment = 2; + * @return The environment. + */ + @java.lang.Override + public boolean getEnvironment() { + return environment_; + } + + public static final int MATERIALS_FIELD_NUMBER = 3; + private boolean materials_ = false; + /** + *
+     * If true, the builder claims that materials are complete, usually through
+     * some controls to prevent network access. Sometimes called "hermetic".
+     * 
+ * + * bool materials = 3; + * @return The materials. + */ + @java.lang.Override + public boolean getMaterials() { + return materials_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (arguments_ != false) { + output.writeBool(1, arguments_); + } + if (environment_ != false) { + output.writeBool(2, environment_); + } + if (materials_ != false) { + output.writeBool(3, materials_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (arguments_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, arguments_); + } + if (environment_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, environment_); + } + if (materials_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, materials_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaCompleteness)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenance.SlsaCompleteness other = (io.grafeas.v1.SlsaProvenance.SlsaCompleteness) obj; + + if (getArguments() + != other.getArguments()) return false; + if (getEnvironment() + != other.getEnvironment()) return false; + if (getMaterials() + != other.getMaterials()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getArguments()); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnvironment()); + hash = (37 * hash) + MATERIALS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMaterials()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaCompleteness prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaCompleteness} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaCompleteness) + io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenance.SlsaCompleteness.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + arguments_ = false; + environment_ = false; + materials_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaCompleteness build() { + io.grafeas.v1.SlsaProvenance.SlsaCompleteness result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaCompleteness buildPartial() { + io.grafeas.v1.SlsaProvenance.SlsaCompleteness result = new io.grafeas.v1.SlsaProvenance.SlsaCompleteness(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaCompleteness result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.arguments_ = arguments_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.environment_ = environment_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.materials_ = materials_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaCompleteness) { + return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaCompleteness)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaCompleteness other) { + if (other == io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance()) return this; + if (other.getArguments() != false) { + setArguments(other.getArguments()); + } + if (other.getEnvironment() != false) { + setEnvironment(other.getEnvironment()); + } + if (other.getMaterials() != false) { + setMaterials(other.getMaterials()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + arguments_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + environment_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + materials_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean arguments_ ; + /** + *
+       * If true, the builder claims that recipe.arguments is complete, meaning
+       * that all external inputs are properly captured in the recipe.
+       * 
+ * + * bool arguments = 1; + * @return The arguments. + */ + @java.lang.Override + public boolean getArguments() { + return arguments_; + } + /** + *
+       * If true, the builder claims that recipe.arguments is complete, meaning
+       * that all external inputs are properly captured in the recipe.
+       * 
+ * + * bool arguments = 1; + * @param value The arguments to set. + * @return This builder for chaining. + */ + public Builder setArguments(boolean value) { + + arguments_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * If true, the builder claims that recipe.arguments is complete, meaning
+       * that all external inputs are properly captured in the recipe.
+       * 
+ * + * bool arguments = 1; + * @return This builder for chaining. + */ + public Builder clearArguments() { + bitField0_ = (bitField0_ & ~0x00000001); + arguments_ = false; + onChanged(); + return this; + } + + private boolean environment_ ; + /** + *
+       * If true, the builder claims that recipe.environment is claimed to be
+       * complete.
+       * 
+ * + * bool environment = 2; + * @return The environment. + */ + @java.lang.Override + public boolean getEnvironment() { + return environment_; + } + /** + *
+       * If true, the builder claims that recipe.environment is claimed to be
+       * complete.
+       * 
+ * + * bool environment = 2; + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(boolean value) { + + environment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * If true, the builder claims that recipe.environment is claimed to be
+       * complete.
+       * 
+ * + * bool environment = 2; + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + bitField0_ = (bitField0_ & ~0x00000002); + environment_ = false; + onChanged(); + return this; + } + + private boolean materials_ ; + /** + *
+       * If true, the builder claims that materials are complete, usually through
+       * some controls to prevent network access. Sometimes called "hermetic".
+       * 
+ * + * bool materials = 3; + * @return The materials. + */ + @java.lang.Override + public boolean getMaterials() { + return materials_; + } + /** + *
+       * If true, the builder claims that materials are complete, usually through
+       * some controls to prevent network access. Sometimes called "hermetic".
+       * 
+ * + * bool materials = 3; + * @param value The materials to set. + * @return This builder for chaining. + */ + public Builder setMaterials(boolean value) { + + materials_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * If true, the builder claims that materials are complete, usually through
+       * some controls to prevent network access. Sometimes called "hermetic".
+       * 
+ * + * bool materials = 3; + * @return This builder for chaining. + */ + public Builder clearMaterials() { + bitField0_ = (bitField0_ & ~0x00000004); + materials_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaCompleteness) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaCompleteness) + private static final io.grafeas.v1.SlsaProvenance.SlsaCompleteness DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaCompleteness(); + } + + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaCompleteness parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Identifies the particular build invocation, which can be useful for
+     * finding associated logs or other ad-hoc analysis. The value SHOULD be
+     * globally unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + java.lang.String getBuildInvocationId(); + /** + *
+     * Identifies the particular build invocation, which can be useful for
+     * finding associated logs or other ad-hoc analysis. The value SHOULD be
+     * globally unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + com.google.protobuf.ByteString + getBuildInvocationIdBytes(); + + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + boolean hasBuildStartedOn(); + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + com.google.protobuf.Timestamp getBuildStartedOn(); + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder(); + + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + boolean hasBuildFinishedOn(); + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + com.google.protobuf.Timestamp getBuildFinishedOn(); + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder(); + + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + * @return Whether the completeness field is set. + */ + boolean hasCompleteness(); + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + * @return The completeness. + */ + io.grafeas.v1.SlsaProvenance.SlsaCompleteness getCompleteness(); + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder getCompletenessOrBuilder(); + + /** + *
+     * If true, the builder claims that running the recipe on materials will
+     * produce bit-for-bit identical output.
+     * 
+ * + * bool reproducible = 5; + * @return The reproducible. + */ + boolean getReproducible(); + } + /** + *
+   * Other properties of the build.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaMetadata} + */ + public static final class SlsaMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaMetadata) + SlsaMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaMetadata.newBuilder() to construct. + private SlsaMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaMetadata() { + buildInvocationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaMetadata.class, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder.class); + } + + public static final int BUILD_INVOCATION_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object buildInvocationId_ = ""; + /** + *
+     * Identifies the particular build invocation, which can be useful for
+     * finding associated logs or other ad-hoc analysis. The value SHOULD be
+     * globally unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + @java.lang.Override + public java.lang.String getBuildInvocationId() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildInvocationId_ = s; + return s; + } + } + /** + *
+     * Identifies the particular build invocation, which can be useful for
+     * finding associated logs or other ad-hoc analysis. The value SHOULD be
+     * globally unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBuildInvocationIdBytes() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildInvocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUILD_STARTED_ON_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp buildStartedOn_; + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + @java.lang.Override + public boolean hasBuildStartedOn() { + return buildStartedOn_ != null; + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getBuildStartedOn() { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + + public static final int BUILD_FINISHED_ON_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp buildFinishedOn_; + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + @java.lang.Override + public boolean hasBuildFinishedOn() { + return buildFinishedOn_ != null; + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getBuildFinishedOn() { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + + public static final int COMPLETENESS_FIELD_NUMBER = 4; + private io.grafeas.v1.SlsaProvenance.SlsaCompleteness completeness_; + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + * @return Whether the completeness field is set. + */ + @java.lang.Override + public boolean hasCompleteness() { + return completeness_ != null; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + * @return The completeness. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getCompleteness() { + return completeness_ == null ? io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { + return completeness_ == null ? io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; + } + + public static final int REPRODUCIBLE_FIELD_NUMBER = 5; + private boolean reproducible_ = false; + /** + *
+     * If true, the builder claims that running the recipe on materials will
+     * produce bit-for-bit identical output.
+     * 
+ * + * bool reproducible = 5; + * @return The reproducible. + */ + @java.lang.Override + public boolean getReproducible() { + return reproducible_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, buildInvocationId_); + } + if (buildStartedOn_ != null) { + output.writeMessage(2, getBuildStartedOn()); + } + if (buildFinishedOn_ != null) { + output.writeMessage(3, getBuildFinishedOn()); + } + if (completeness_ != null) { + output.writeMessage(4, getCompleteness()); + } + if (reproducible_ != false) { + output.writeBool(5, reproducible_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, buildInvocationId_); + } + if (buildStartedOn_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBuildStartedOn()); + } + if (buildFinishedOn_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getBuildFinishedOn()); + } + if (completeness_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCompleteness()); + } + if (reproducible_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, reproducible_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaMetadata)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenance.SlsaMetadata other = (io.grafeas.v1.SlsaProvenance.SlsaMetadata) obj; + + if (!getBuildInvocationId() + .equals(other.getBuildInvocationId())) return false; + if (hasBuildStartedOn() != other.hasBuildStartedOn()) return false; + if (hasBuildStartedOn()) { + if (!getBuildStartedOn() + .equals(other.getBuildStartedOn())) return false; + } + if (hasBuildFinishedOn() != other.hasBuildFinishedOn()) return false; + if (hasBuildFinishedOn()) { + if (!getBuildFinishedOn() + .equals(other.getBuildFinishedOn())) return false; + } + if (hasCompleteness() != other.hasCompleteness()) return false; + if (hasCompleteness()) { + if (!getCompleteness() + .equals(other.getCompleteness())) return false; + } + if (getReproducible() + != other.getReproducible()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BUILD_INVOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getBuildInvocationId().hashCode(); + if (hasBuildStartedOn()) { + hash = (37 * hash) + BUILD_STARTED_ON_FIELD_NUMBER; + hash = (53 * hash) + getBuildStartedOn().hashCode(); + } + if (hasBuildFinishedOn()) { + hash = (37 * hash) + BUILD_FINISHED_ON_FIELD_NUMBER; + hash = (53 * hash) + getBuildFinishedOn().hashCode(); + } + if (hasCompleteness()) { + hash = (37 * hash) + COMPLETENESS_FIELD_NUMBER; + hash = (53 * hash) + getCompleteness().hashCode(); + } + hash = (37 * hash) + REPRODUCIBLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReproducible()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Other properties of the build.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaMetadata) + io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaMetadata.class, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenance.SlsaMetadata.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + buildInvocationId_ = ""; + buildStartedOn_ = null; + if (buildStartedOnBuilder_ != null) { + buildStartedOnBuilder_.dispose(); + buildStartedOnBuilder_ = null; + } + buildFinishedOn_ = null; + if (buildFinishedOnBuilder_ != null) { + buildFinishedOnBuilder_.dispose(); + buildFinishedOnBuilder_ = null; + } + completeness_ = null; + if (completenessBuilder_ != null) { + completenessBuilder_.dispose(); + completenessBuilder_ = null; + } + reproducible_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaMetadata getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaMetadata build() { + io.grafeas.v1.SlsaProvenance.SlsaMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaMetadata buildPartial() { + io.grafeas.v1.SlsaProvenance.SlsaMetadata result = new io.grafeas.v1.SlsaProvenance.SlsaMetadata(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.buildInvocationId_ = buildInvocationId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.buildStartedOn_ = buildStartedOnBuilder_ == null + ? buildStartedOn_ + : buildStartedOnBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.buildFinishedOn_ = buildFinishedOnBuilder_ == null + ? buildFinishedOn_ + : buildFinishedOnBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.completeness_ = completenessBuilder_ == null + ? completeness_ + : completenessBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.reproducible_ = reproducible_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaMetadata) { + return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaMetadata other) { + if (other == io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance()) return this; + if (!other.getBuildInvocationId().isEmpty()) { + buildInvocationId_ = other.buildInvocationId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasBuildStartedOn()) { + mergeBuildStartedOn(other.getBuildStartedOn()); + } + if (other.hasBuildFinishedOn()) { + mergeBuildFinishedOn(other.getBuildFinishedOn()); + } + if (other.hasCompleteness()) { + mergeCompleteness(other.getCompleteness()); + } + if (other.getReproducible() != false) { + setReproducible(other.getReproducible()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + buildInvocationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getBuildStartedOnFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getBuildFinishedOnFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getCompletenessFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + reproducible_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object buildInvocationId_ = ""; + /** + *
+       * Identifies the particular build invocation, which can be useful for
+       * finding associated logs or other ad-hoc analysis. The value SHOULD be
+       * globally unique, per in-toto Provenance spec.
+       * 
+ * + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + public java.lang.String getBuildInvocationId() { + java.lang.Object ref = buildInvocationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildInvocationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Identifies the particular build invocation, which can be useful for
+       * finding associated logs or other ad-hoc analysis. The value SHOULD be
+       * globally unique, per in-toto Provenance spec.
+       * 
+ * + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + public com.google.protobuf.ByteString + getBuildInvocationIdBytes() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildInvocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Identifies the particular build invocation, which can be useful for
+       * finding associated logs or other ad-hoc analysis. The value SHOULD be
+       * globally unique, per in-toto Provenance spec.
+       * 
+ * + * string build_invocation_id = 1; + * @param value The buildInvocationId to set. + * @return This builder for chaining. + */ + public Builder setBuildInvocationId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + buildInvocationId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Identifies the particular build invocation, which can be useful for
+       * finding associated logs or other ad-hoc analysis. The value SHOULD be
+       * globally unique, per in-toto Provenance spec.
+       * 
+ * + * string build_invocation_id = 1; + * @return This builder for chaining. + */ + public Builder clearBuildInvocationId() { + buildInvocationId_ = getDefaultInstance().getBuildInvocationId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Identifies the particular build invocation, which can be useful for
+       * finding associated logs or other ad-hoc analysis. The value SHOULD be
+       * globally unique, per in-toto Provenance spec.
+       * 
+ * + * string build_invocation_id = 1; + * @param value The bytes for buildInvocationId to set. + * @return This builder for chaining. + */ + public Builder setBuildInvocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + buildInvocationId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp buildStartedOn_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildStartedOnBuilder_; + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + public boolean hasBuildStartedOn() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + public com.google.protobuf.Timestamp getBuildStartedOn() { + if (buildStartedOnBuilder_ == null) { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } else { + return buildStartedOnBuilder_.getMessage(); + } + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder setBuildStartedOn(com.google.protobuf.Timestamp value) { + if (buildStartedOnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + buildStartedOn_ = value; + } else { + buildStartedOnBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder setBuildStartedOn( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (buildStartedOnBuilder_ == null) { + buildStartedOn_ = builderForValue.build(); + } else { + buildStartedOnBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder mergeBuildStartedOn(com.google.protobuf.Timestamp value) { + if (buildStartedOnBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + buildStartedOn_ != null && + buildStartedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getBuildStartedOnBuilder().mergeFrom(value); + } else { + buildStartedOn_ = value; + } + } else { + buildStartedOnBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder clearBuildStartedOn() { + bitField0_ = (bitField0_ & ~0x00000002); + buildStartedOn_ = null; + if (buildStartedOnBuilder_ != null) { + buildStartedOnBuilder_.dispose(); + buildStartedOnBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public com.google.protobuf.Timestamp.Builder getBuildStartedOnBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBuildStartedOnFieldBuilder().getBuilder(); + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { + if (buildStartedOnBuilder_ != null) { + return buildStartedOnBuilder_.getMessageOrBuilder(); + } else { + return buildStartedOn_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getBuildStartedOnFieldBuilder() { + if (buildStartedOnBuilder_ == null) { + buildStartedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getBuildStartedOn(), + getParentForChildren(), + isClean()); + buildStartedOn_ = null; + } + return buildStartedOnBuilder_; + } + + private com.google.protobuf.Timestamp buildFinishedOn_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildFinishedOnBuilder_; + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + public boolean hasBuildFinishedOn() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + public com.google.protobuf.Timestamp getBuildFinishedOn() { + if (buildFinishedOnBuilder_ == null) { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } else { + return buildFinishedOnBuilder_.getMessage(); + } + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder setBuildFinishedOn(com.google.protobuf.Timestamp value) { + if (buildFinishedOnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + buildFinishedOn_ = value; + } else { + buildFinishedOnBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder setBuildFinishedOn( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (buildFinishedOnBuilder_ == null) { + buildFinishedOn_ = builderForValue.build(); + } else { + buildFinishedOnBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder mergeBuildFinishedOn(com.google.protobuf.Timestamp value) { + if (buildFinishedOnBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + buildFinishedOn_ != null && + buildFinishedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getBuildFinishedOnBuilder().mergeFrom(value); + } else { + buildFinishedOn_ = value; + } + } else { + buildFinishedOnBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder clearBuildFinishedOn() { + bitField0_ = (bitField0_ & ~0x00000004); + buildFinishedOn_ = null; + if (buildFinishedOnBuilder_ != null) { + buildFinishedOnBuilder_.dispose(); + buildFinishedOnBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public com.google.protobuf.Timestamp.Builder getBuildFinishedOnBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBuildFinishedOnFieldBuilder().getBuilder(); + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { + if (buildFinishedOnBuilder_ != null) { + return buildFinishedOnBuilder_.getMessageOrBuilder(); + } else { + return buildFinishedOn_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getBuildFinishedOnFieldBuilder() { + if (buildFinishedOnBuilder_ == null) { + buildFinishedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getBuildFinishedOn(), + getParentForChildren(), + isClean()); + buildFinishedOn_ = null; + } + return buildFinishedOnBuilder_; + } + + private io.grafeas.v1.SlsaProvenance.SlsaCompleteness completeness_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaCompleteness, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder> completenessBuilder_; + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + * @return Whether the completeness field is set. + */ + public boolean hasCompleteness() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + * @return The completeness. + */ + public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getCompleteness() { + if (completenessBuilder_ == null) { + return completeness_ == null ? io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; + } else { + return completenessBuilder_.getMessage(); + } + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + public Builder setCompleteness(io.grafeas.v1.SlsaProvenance.SlsaCompleteness value) { + if (completenessBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + completeness_ = value; + } else { + completenessBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + public Builder setCompleteness( + io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder builderForValue) { + if (completenessBuilder_ == null) { + completeness_ = builderForValue.build(); + } else { + completenessBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + public Builder mergeCompleteness(io.grafeas.v1.SlsaProvenance.SlsaCompleteness value) { + if (completenessBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + completeness_ != null && + completeness_ != io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance()) { + getCompletenessBuilder().mergeFrom(value); + } else { + completeness_ = value; + } + } else { + completenessBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + public Builder clearCompleteness() { + bitField0_ = (bitField0_ & ~0x00000008); + completeness_ = null; + if (completenessBuilder_ != null) { + completenessBuilder_.dispose(); + completenessBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + public io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder getCompletenessBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCompletenessFieldBuilder().getBuilder(); + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + public io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { + if (completenessBuilder_ != null) { + return completenessBuilder_.getMessageOrBuilder(); + } else { + return completeness_ == null ? + io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; + } + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaCompleteness, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder> + getCompletenessFieldBuilder() { + if (completenessBuilder_ == null) { + completenessBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaCompleteness, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder>( + getCompleteness(), + getParentForChildren(), + isClean()); + completeness_ = null; + } + return completenessBuilder_; + } + + private boolean reproducible_ ; + /** + *
+       * If true, the builder claims that running the recipe on materials will
+       * produce bit-for-bit identical output.
+       * 
+ * + * bool reproducible = 5; + * @return The reproducible. + */ + @java.lang.Override + public boolean getReproducible() { + return reproducible_; + } + /** + *
+       * If true, the builder claims that running the recipe on materials will
+       * produce bit-for-bit identical output.
+       * 
+ * + * bool reproducible = 5; + * @param value The reproducible to set. + * @return This builder for chaining. + */ + public Builder setReproducible(boolean value) { + + reproducible_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * If true, the builder claims that running the recipe on materials will
+       * produce bit-for-bit identical output.
+       * 
+ * + * bool reproducible = 5; + * @return This builder for chaining. + */ + public Builder clearReproducible() { + bitField0_ = (bitField0_ & ~0x00000010); + reproducible_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaMetadata) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaMetadata) + private static final io.grafeas.v1.SlsaProvenance.SlsaMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaMetadata(); + } + + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaBuilderOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaBuilder) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + } + /** + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaBuilder} + */ + public static final class SlsaBuilder extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaBuilder) + SlsaBuilderOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaBuilder.newBuilder() to construct. + private SlsaBuilder(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaBuilder() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaBuilder(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaBuilder.class, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaBuilder)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenance.SlsaBuilder other = (io.grafeas.v1.SlsaProvenance.SlsaBuilder) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaBuilder prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaBuilder} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaBuilder) + io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaBuilder.class, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenance.SlsaBuilder.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaBuilder getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaBuilder build() { + io.grafeas.v1.SlsaProvenance.SlsaBuilder result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaBuilder buildPartial() { + io.grafeas.v1.SlsaProvenance.SlsaBuilder result = new io.grafeas.v1.SlsaProvenance.SlsaBuilder(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaBuilder result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaBuilder) { + return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaBuilder)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaBuilder other) { + if (other == io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaBuilder) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaBuilder) + private static final io.grafeas.v1.SlsaProvenance.SlsaBuilder DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaBuilder(); + } + + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaBuilder parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaBuilder getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MaterialOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.Material) + com.google.protobuf.MessageOrBuilder { + + /** + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + * map<string, string> digest = 2; + */ + int getDigestCount(); + /** + * map<string, string> digest = 2; + */ + boolean containsDigest( + java.lang.String key); + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getDigest(); + /** + * map<string, string> digest = 2; + */ + java.util.Map + getDigestMap(); + /** + * map<string, string> digest = 2; + */ + /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * map<string, string> digest = 2; + */ + java.lang.String getDigestOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code grafeas.v1.SlsaProvenance.Material} + */ + public static final class Material extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.Material) + MaterialOrBuilder { + private static final long serialVersionUID = 0L; + // Use Material.newBuilder() to construct. + private Material(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Material() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Material(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.Material.class, io.grafeas.v1.SlsaProvenance.Material.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIGEST_FIELD_NUMBER = 2; + private static final class DigestDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetDigest(), + DigestDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + for (java.util.Map.Entry entry + : internalGetDigest().getMap().entrySet()) { + com.google.protobuf.MapEntry + digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, digest__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenance.Material)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenance.Material other = (io.grafeas.v1.SlsaProvenance.Material) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (!internalGetDigest().equals( + other.internalGetDigest())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (!internalGetDigest().getMap().isEmpty()) { + hash = (37 * hash) + DIGEST_FIELD_NUMBER; + hash = (53 * hash) + internalGetDigest().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.Material parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.Material parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.Material prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.SlsaProvenance.Material} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.Material) + io.grafeas.v1.SlsaProvenance.MaterialOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.Material.class, io.grafeas.v1.SlsaProvenance.Material.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenance.Material.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + internalGetMutableDigest().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.Material getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.Material build() { + io.grafeas.v1.SlsaProvenance.Material result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.Material buildPartial() { + io.grafeas.v1.SlsaProvenance.Material result = new io.grafeas.v1.SlsaProvenance.Material(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenance.Material result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.digest_ = internalGetDigest(); + result.digest_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenance.Material) { + return mergeFrom((io.grafeas.v1.SlsaProvenance.Material)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.Material other) { + if (other == io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableDigest().mergeFrom( + other.internalGetDigest()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + digest__ = input.readMessage( + DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableDigest().getMutableMap().put( + digest__.getKey(), digest__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + private com.google.protobuf.MapField + internalGetMutableDigest() { + if (digest_ == null) { + digest_ = com.google.protobuf.MapField.newMapField( + DigestDefaultEntryHolder.defaultEntry); + } + if (!digest_.isMutable()) { + digest_ = digest_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearDigest() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableDigest().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> digest = 2; + */ + public Builder removeDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableDigest().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableDigest() { + bitField0_ |= 0x00000002; + return internalGetMutableDigest().getMutableMap(); + } + /** + * map<string, string> digest = 2; + */ + public Builder putDigest( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableDigest().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * map<string, string> digest = 2; + */ + public Builder putAllDigest( + java.util.Map values) { + internalGetMutableDigest().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.Material) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.Material) + private static final io.grafeas.v1.SlsaProvenance.Material DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.Material(); + } + + public static io.grafeas.v1.SlsaProvenance.Material getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Material parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.Material getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int BUILDER_FIELD_NUMBER = 1; + private io.grafeas.v1.SlsaProvenance.SlsaBuilder builder_; + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + * @return Whether the builder field is set. + */ + @java.lang.Override + public boolean hasBuilder() { + return builder_ != null; + } + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + * @return The builder. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaBuilder getBuilder() { + return builder_ == null ? io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; + } + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder getBuilderOrBuilder() { + return builder_ == null ? io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; + } + + public static final int RECIPE_FIELD_NUMBER = 2; + private io.grafeas.v1.SlsaProvenance.SlsaRecipe recipe_; + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + * @return Whether the recipe field is set. + */ + @java.lang.Override + public boolean hasRecipe() { + return recipe_ != null; + } + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + * @return The recipe. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaRecipe getRecipe() { + return recipe_ == null ? io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; + } + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder getRecipeOrBuilder() { + return recipe_ == null ? io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; + } + + public static final int METADATA_FIELD_NUMBER = 3; + private io.grafeas.v1.SlsaProvenance.SlsaMetadata metadata_; + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + * @return The metadata. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaMetadata getMetadata() { + return metadata_ == null ? io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; + } + + public static final int MATERIALS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List materials_; + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + @java.lang.Override + public java.util.List getMaterialsList() { + return materials_; + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + @java.lang.Override + public java.util.List + getMaterialsOrBuilderList() { + return materials_; + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + @java.lang.Override + public int getMaterialsCount() { + return materials_.size(); + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.Material getMaterials(int index) { + return materials_.get(index); + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.MaterialOrBuilder getMaterialsOrBuilder( + int index) { + return materials_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (builder_ != null) { + output.writeMessage(1, getBuilder()); + } + if (recipe_ != null) { + output.writeMessage(2, getRecipe()); + } + if (metadata_ != null) { + output.writeMessage(3, getMetadata()); + } + for (int i = 0; i < materials_.size(); i++) { + output.writeMessage(4, materials_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (builder_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBuilder()); + } + if (recipe_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRecipe()); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getMetadata()); + } + for (int i = 0; i < materials_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, materials_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenance)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenance other = (io.grafeas.v1.SlsaProvenance) obj; + + if (hasBuilder() != other.hasBuilder()) return false; + if (hasBuilder()) { + if (!getBuilder() + .equals(other.getBuilder())) return false; + } + if (hasRecipe() != other.hasRecipe()) return false; + if (hasRecipe()) { + if (!getRecipe() + .equals(other.getRecipe())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getMaterialsList() + .equals(other.getMaterialsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBuilder()) { + hash = (37 * hash) + BUILDER_FIELD_NUMBER; + hash = (53 * hash) + getBuilder().hashCode(); + } + if (hasRecipe()) { + hash = (37 * hash) + RECIPE_FIELD_NUMBER; + hash = (53 * hash) + getRecipe().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (getMaterialsCount() > 0) { + hash = (37 * hash) + MATERIALS_FIELD_NUMBER; + hash = (53 * hash) + getMaterialsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenance parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.SlsaProvenance} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance) + io.grafeas.v1.SlsaProvenanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.class, io.grafeas.v1.SlsaProvenance.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenance.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + builder_ = null; + if (builderBuilder_ != null) { + builderBuilder_.dispose(); + builderBuilder_ = null; + } + recipe_ = null; + if (recipeBuilder_ != null) { + recipeBuilder_.dispose(); + recipeBuilder_ = null; + } + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + if (materialsBuilder_ == null) { + materials_ = java.util.Collections.emptyList(); + } else { + materials_ = null; + materialsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance build() { + io.grafeas.v1.SlsaProvenance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance buildPartial() { + io.grafeas.v1.SlsaProvenance result = new io.grafeas.v1.SlsaProvenance(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.SlsaProvenance result) { + if (materialsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + materials_ = java.util.Collections.unmodifiableList(materials_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.materials_ = materials_; + } else { + result.materials_ = materialsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.builder_ = builderBuilder_ == null + ? builder_ + : builderBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.recipe_ = recipeBuilder_ == null + ? recipe_ + : recipeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenance) { + return mergeFrom((io.grafeas.v1.SlsaProvenance)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenance other) { + if (other == io.grafeas.v1.SlsaProvenance.getDefaultInstance()) return this; + if (other.hasBuilder()) { + mergeBuilder(other.getBuilder()); + } + if (other.hasRecipe()) { + mergeRecipe(other.getRecipe()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (materialsBuilder_ == null) { + if (!other.materials_.isEmpty()) { + if (materials_.isEmpty()) { + materials_ = other.materials_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureMaterialsIsMutable(); + materials_.addAll(other.materials_); + } + onChanged(); + } + } else { + if (!other.materials_.isEmpty()) { + if (materialsBuilder_.isEmpty()) { + materialsBuilder_.dispose(); + materialsBuilder_ = null; + materials_ = other.materials_; + bitField0_ = (bitField0_ & ~0x00000008); + materialsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMaterialsFieldBuilder() : null; + } else { + materialsBuilder_.addAllMessages(other.materials_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getBuilderFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getRecipeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + io.grafeas.v1.SlsaProvenance.Material m = + input.readMessage( + io.grafeas.v1.SlsaProvenance.Material.parser(), + extensionRegistry); + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.add(m); + } else { + materialsBuilder_.addMessage(m); + } + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.SlsaProvenance.SlsaBuilder builder_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaBuilder, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder> builderBuilder_; + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + * @return Whether the builder field is set. + */ + public boolean hasBuilder() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + * @return The builder. + */ + public io.grafeas.v1.SlsaProvenance.SlsaBuilder getBuilder() { + if (builderBuilder_ == null) { + return builder_ == null ? io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; + } else { + return builderBuilder_.getMessage(); + } + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + public Builder setBuilder(io.grafeas.v1.SlsaProvenance.SlsaBuilder value) { + if (builderBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + builder_ = value; + } else { + builderBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + public Builder setBuilder( + io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder builderForValue) { + if (builderBuilder_ == null) { + builder_ = builderForValue.build(); + } else { + builderBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + public Builder mergeBuilder(io.grafeas.v1.SlsaProvenance.SlsaBuilder value) { + if (builderBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + builder_ != null && + builder_ != io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance()) { + getBuilderBuilder().mergeFrom(value); + } else { + builder_ = value; + } + } else { + builderBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + public Builder clearBuilder() { + bitField0_ = (bitField0_ & ~0x00000001); + builder_ = null; + if (builderBuilder_ != null) { + builderBuilder_.dispose(); + builderBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + public io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder getBuilderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBuilderFieldBuilder().getBuilder(); + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + public io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder getBuilderOrBuilder() { + if (builderBuilder_ != null) { + return builderBuilder_.getMessageOrBuilder(); + } else { + return builder_ == null ? + io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; + } + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaBuilder, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder> + getBuilderFieldBuilder() { + if (builderBuilder_ == null) { + builderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaBuilder, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder>( + getBuilder(), + getParentForChildren(), + isClean()); + builder_ = null; + } + return builderBuilder_; + } + + private io.grafeas.v1.SlsaProvenance.SlsaRecipe recipe_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaRecipe, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder, io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder> recipeBuilder_; + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + * @return Whether the recipe field is set. + */ + public boolean hasRecipe() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + * @return The recipe. + */ + public io.grafeas.v1.SlsaProvenance.SlsaRecipe getRecipe() { + if (recipeBuilder_ == null) { + return recipe_ == null ? io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; + } else { + return recipeBuilder_.getMessage(); + } + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + public Builder setRecipe(io.grafeas.v1.SlsaProvenance.SlsaRecipe value) { + if (recipeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + recipe_ = value; + } else { + recipeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + public Builder setRecipe( + io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder builderForValue) { + if (recipeBuilder_ == null) { + recipe_ = builderForValue.build(); + } else { + recipeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + public Builder mergeRecipe(io.grafeas.v1.SlsaProvenance.SlsaRecipe value) { + if (recipeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + recipe_ != null && + recipe_ != io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance()) { + getRecipeBuilder().mergeFrom(value); + } else { + recipe_ = value; + } + } else { + recipeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + public Builder clearRecipe() { + bitField0_ = (bitField0_ & ~0x00000002); + recipe_ = null; + if (recipeBuilder_ != null) { + recipeBuilder_.dispose(); + recipeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + public io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder getRecipeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRecipeFieldBuilder().getBuilder(); + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + public io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder getRecipeOrBuilder() { + if (recipeBuilder_ != null) { + return recipeBuilder_.getMessageOrBuilder(); + } else { + return recipe_ == null ? + io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; + } + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaRecipe, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder, io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder> + getRecipeFieldBuilder() { + if (recipeBuilder_ == null) { + recipeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaRecipe, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder, io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder>( + getRecipe(), + getParentForChildren(), + isClean()); + recipe_ = null; + } + return recipeBuilder_; + } + + private io.grafeas.v1.SlsaProvenance.SlsaMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaMetadata, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder> metadataBuilder_; + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + * @return The metadata. + */ + public io.grafeas.v1.SlsaProvenance.SlsaMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + public Builder setMetadata(io.grafeas.v1.SlsaProvenance.SlsaMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + public Builder setMetadata( + io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + public Builder mergeMetadata(io.grafeas.v1.SlsaProvenance.SlsaMetadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + metadata_ != null && + metadata_ != io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + public io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + public io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; + } + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaMetadata, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaMetadata, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private java.util.List materials_ = + java.util.Collections.emptyList(); + private void ensureMaterialsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + materials_ = new java.util.ArrayList(materials_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.Material, io.grafeas.v1.SlsaProvenance.Material.Builder, io.grafeas.v1.SlsaProvenance.MaterialOrBuilder> materialsBuilder_; + + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public java.util.List getMaterialsList() { + if (materialsBuilder_ == null) { + return java.util.Collections.unmodifiableList(materials_); + } else { + return materialsBuilder_.getMessageList(); + } + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public int getMaterialsCount() { + if (materialsBuilder_ == null) { + return materials_.size(); + } else { + return materialsBuilder_.getCount(); + } + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public io.grafeas.v1.SlsaProvenance.Material getMaterials(int index) { + if (materialsBuilder_ == null) { + return materials_.get(index); + } else { + return materialsBuilder_.getMessage(index); + } + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder setMaterials( + int index, io.grafeas.v1.SlsaProvenance.Material value) { + if (materialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaterialsIsMutable(); + materials_.set(index, value); + onChanged(); + } else { + materialsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder setMaterials( + int index, io.grafeas.v1.SlsaProvenance.Material.Builder builderForValue) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.set(index, builderForValue.build()); + onChanged(); + } else { + materialsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder addMaterials(io.grafeas.v1.SlsaProvenance.Material value) { + if (materialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaterialsIsMutable(); + materials_.add(value); + onChanged(); + } else { + materialsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder addMaterials( + int index, io.grafeas.v1.SlsaProvenance.Material value) { + if (materialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaterialsIsMutable(); + materials_.add(index, value); + onChanged(); + } else { + materialsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder addMaterials( + io.grafeas.v1.SlsaProvenance.Material.Builder builderForValue) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.add(builderForValue.build()); + onChanged(); + } else { + materialsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder addMaterials( + int index, io.grafeas.v1.SlsaProvenance.Material.Builder builderForValue) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.add(index, builderForValue.build()); + onChanged(); + } else { + materialsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder addAllMaterials( + java.lang.Iterable values) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, materials_); + onChanged(); + } else { + materialsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder clearMaterials() { + if (materialsBuilder_ == null) { + materials_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + materialsBuilder_.clear(); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder removeMaterials(int index) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.remove(index); + onChanged(); + } else { + materialsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public io.grafeas.v1.SlsaProvenance.Material.Builder getMaterialsBuilder( + int index) { + return getMaterialsFieldBuilder().getBuilder(index); + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public io.grafeas.v1.SlsaProvenance.MaterialOrBuilder getMaterialsOrBuilder( + int index) { + if (materialsBuilder_ == null) { + return materials_.get(index); } else { + return materialsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public java.util.List + getMaterialsOrBuilderList() { + if (materialsBuilder_ != null) { + return materialsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(materials_); + } + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public io.grafeas.v1.SlsaProvenance.Material.Builder addMaterialsBuilder() { + return getMaterialsFieldBuilder().addBuilder( + io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance()); + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public io.grafeas.v1.SlsaProvenance.Material.Builder addMaterialsBuilder( + int index) { + return getMaterialsFieldBuilder().addBuilder( + index, io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance()); + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public java.util.List + getMaterialsBuilderList() { + return getMaterialsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.Material, io.grafeas.v1.SlsaProvenance.Material.Builder, io.grafeas.v1.SlsaProvenance.MaterialOrBuilder> + getMaterialsFieldBuilder() { + if (materialsBuilder_ == null) { + materialsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.Material, io.grafeas.v1.SlsaProvenance.Material.Builder, io.grafeas.v1.SlsaProvenance.MaterialOrBuilder>( + materials_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + materials_ = null; + } + return materialsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance) + private static final io.grafeas.v1.SlsaProvenance DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance(); + } + + public static io.grafeas.v1.SlsaProvenance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaProvenance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java new file mode 100644 index 000000000000..d7b66088f1c3 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java @@ -0,0 +1,146 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/slsa_provenance.proto + +package io.grafeas.v1; + +public interface SlsaProvenanceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + * @return Whether the builder field is set. + */ + boolean hasBuilder(); + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + * @return The builder. + */ + io.grafeas.v1.SlsaProvenance.SlsaBuilder getBuilder(); + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder getBuilderOrBuilder(); + + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + * @return Whether the recipe field is set. + */ + boolean hasRecipe(); + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + * @return The recipe. + */ + io.grafeas.v1.SlsaProvenance.SlsaRecipe getRecipe(); + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder getRecipeOrBuilder(); + + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + * @return The metadata. + */ + io.grafeas.v1.SlsaProvenance.SlsaMetadata getMetadata(); + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder getMetadataOrBuilder(); + + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + java.util.List + getMaterialsList(); + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + io.grafeas.v1.SlsaProvenance.Material getMaterials(int index); + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + int getMaterialsCount(); + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + java.util.List + getMaterialsOrBuilderList(); + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + io.grafeas.v1.SlsaProvenance.MaterialOrBuilder getMaterialsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java new file mode 100644 index 000000000000..f58193641147 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java @@ -0,0 +1,143 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/slsa_provenance.proto + +package io.grafeas.v1; + +public final class SlsaProvenanceProto { + private SlsaProvenanceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenance_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n grafeas/v1/slsa_provenance.proto\022\ngraf" + + "eas.v1\032\031google/protobuf/any.proto\032\037googl" + + "e/protobuf/timestamp.proto\"\376\006\n\016SlsaProve" + + "nance\0227\n\007builder\030\001 \001(\0132&.grafeas.v1.Slsa" + + "Provenance.SlsaBuilder\0225\n\006recipe\030\002 \001(\0132%" + + ".grafeas.v1.SlsaProvenance.SlsaRecipe\0229\n" + + "\010metadata\030\003 \001(\0132\'.grafeas.v1.SlsaProvena" + + "nce.SlsaMetadata\0226\n\tmaterials\030\004 \003(\0132#.gr" + + "afeas.v1.SlsaProvenance.Material\032\240\001\n\nSls" + + "aRecipe\022\014\n\004type\030\001 \001(\t\022\033\n\023defined_in_mate" + + "rial\030\002 \001(\003\022\023\n\013entry_point\030\003 \001(\t\022\'\n\targum" + + "ents\030\004 \001(\0132\024.google.protobuf.Any\022)\n\013envi" + + "ronment\030\005 \001(\0132\024.google.protobuf.Any\032M\n\020S" + + "lsaCompleteness\022\021\n\targuments\030\001 \001(\010\022\023\n\013en" + + "vironment\030\002 \001(\010\022\021\n\tmaterials\030\003 \001(\010\032\361\001\n\014S" + + "lsaMetadata\022\033\n\023build_invocation_id\030\001 \001(\t" + + "\0224\n\020build_started_on\030\002 \001(\0132\032.google.prot" + + "obuf.Timestamp\0225\n\021build_finished_on\030\003 \001(" + + "\0132\032.google.protobuf.Timestamp\022A\n\014complet" + + "eness\030\004 \001(\0132+.grafeas.v1.SlsaProvenance." + + "SlsaCompleteness\022\024\n\014reproducible\030\005 \001(\010\032\031" + + "\n\013SlsaBuilder\022\n\n\002id\030\001 \001(\t\032\207\001\n\010Material\022\013" + + "\n\003uri\030\001 \001(\t\022?\n\006digest\030\002 \003(\0132/.grafeas.v1" + + ".SlsaProvenance.Material.DigestEntry\032-\n\013" + + "DigestEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + + "\0028\001Bf\n\rio.grafeas.v1B\023SlsaProvenanceProt" + + "oP\001Z8google.golang.org/genproto/googleap" + + "is/grafeas/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.AnyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_grafeas_v1_SlsaProvenance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenance_descriptor, + new java.lang.String[] { "Builder", "Recipe", "Metadata", "Materials", }); + internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor = + internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor, + new java.lang.String[] { "Type", "DefinedInMaterial", "EntryPoint", "Arguments", "Environment", }); + internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor = + internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor, + new java.lang.String[] { "Arguments", "Environment", "Materials", }); + internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor = + internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(2); + internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor, + new java.lang.String[] { "BuildInvocationId", "BuildStartedOn", "BuildFinishedOn", "Completeness", "Reproducible", }); + internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor = + internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(3); + internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor, + new java.lang.String[] { "Id", }); + internal_static_grafeas_v1_SlsaProvenance_Material_descriptor = + internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(4); + internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenance_Material_descriptor, + new java.lang.String[] { "Uri", "Digest", }); + internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor = + internal_static_grafeas_v1_SlsaProvenance_Material_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java new file mode 100644 index 000000000000..41831c9804aa --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java @@ -0,0 +1,6962 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/slsa_provenance_zero_two.proto + +package io.grafeas.v1; + +/** + *
+ * See full explanation of fields at slsa.dev/provenance/v0.2.
+ * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo} + */ +public final class SlsaProvenanceZeroTwo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo) + SlsaProvenanceZeroTwoOrBuilder { +private static final long serialVersionUID = 0L; + // Use SlsaProvenanceZeroTwo.newBuilder() to construct. + private SlsaProvenanceZeroTwo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaProvenanceZeroTwo() { + buildType_ = ""; + materials_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaProvenanceZeroTwo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.class, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder.class); + } + + public interface SlsaBuilderOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + } + /** + *
+   * Identifies the entity that executed the recipe, which is trusted to have
+   * correctly performed the operation and populated this provenance.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder} + */ + public static final class SlsaBuilder extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) + SlsaBuilderOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaBuilder.newBuilder() to construct. + private SlsaBuilder(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaBuilder() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaBuilder(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Identifies the entity that executed the recipe, which is trusted to have
+     * correctly performed the operation and populated this provenance.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder build() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder buildPartial() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) { + return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder other) { + if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) + private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder(); + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaBuilder parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaMaterialOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) + com.google.protobuf.MessageOrBuilder { + + /** + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + * map<string, string> digest = 2; + */ + int getDigestCount(); + /** + * map<string, string> digest = 2; + */ + boolean containsDigest( + java.lang.String key); + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getDigest(); + /** + * map<string, string> digest = 2; + */ + java.util.Map + getDigestMap(); + /** + * map<string, string> digest = 2; + */ + /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * map<string, string> digest = 2; + */ + java.lang.String getDigestOrThrow( + java.lang.String key); + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial} + */ + public static final class SlsaMaterial extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) + SlsaMaterialOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaMaterial.newBuilder() to construct. + private SlsaMaterial(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaMaterial() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaMaterial(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIGEST_FIELD_NUMBER = 2; + private static final class DigestDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetDigest(), + DigestDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + for (java.util.Map.Entry entry + : internalGetDigest().getMap().entrySet()) { + com.google.protobuf.MapEntry + digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, digest__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (!internalGetDigest().equals( + other.internalGetDigest())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (!internalGetDigest().getMap().isEmpty()) { + hash = (37 * hash) + DIGEST_FIELD_NUMBER; + hash = (53 * hash) + internalGetDigest().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + internalGetMutableDigest().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial build() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial buildPartial() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.digest_ = internalGetDigest(); + result.digest_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) { + return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial other) { + if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableDigest().mergeFrom( + other.internalGetDigest()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + digest__ = input.readMessage( + DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableDigest().getMutableMap().put( + digest__.getKey(), digest__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + private com.google.protobuf.MapField + internalGetMutableDigest() { + if (digest_ == null) { + digest_ = com.google.protobuf.MapField.newMapField( + DigestDefaultEntryHolder.defaultEntry); + } + if (!digest_.isMutable()) { + digest_ = digest_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearDigest() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableDigest().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> digest = 2; + */ + public Builder removeDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableDigest().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableDigest() { + bitField0_ |= 0x00000002; + return internalGetMutableDigest().getMutableMap(); + } + /** + * map<string, string> digest = 2; + */ + public Builder putDigest( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableDigest().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * map<string, string> digest = 2; + */ + public Builder putAllDigest( + java.util.Map values) { + internalGetMutableDigest().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) + private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial(); + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaMaterial parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaInvocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) + com.google.protobuf.MessageOrBuilder { + + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + * @return Whether the configSource field is set. + */ + boolean hasConfigSource(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + * @return The configSource. + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getConfigSource(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder getConfigSourceOrBuilder(); + + /** + * .google.protobuf.Struct parameters = 2; + * @return Whether the parameters field is set. + */ + boolean hasParameters(); + /** + * .google.protobuf.Struct parameters = 2; + * @return The parameters. + */ + com.google.protobuf.Struct getParameters(); + /** + * .google.protobuf.Struct parameters = 2; + */ + com.google.protobuf.StructOrBuilder getParametersOrBuilder(); + + /** + * .google.protobuf.Struct environment = 3; + * @return Whether the environment field is set. + */ + boolean hasEnvironment(); + /** + * .google.protobuf.Struct environment = 3; + * @return The environment. + */ + com.google.protobuf.Struct getEnvironment(); + /** + * .google.protobuf.Struct environment = 3; + */ + com.google.protobuf.StructOrBuilder getEnvironmentOrBuilder(); + } + /** + *
+   * Identifies the event that kicked off the build.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation} + */ + public static final class SlsaInvocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) + SlsaInvocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaInvocation.newBuilder() to construct. + private SlsaInvocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaInvocation() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaInvocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder.class); + } + + public static final int CONFIG_SOURCE_FIELD_NUMBER = 1; + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource configSource_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + * @return Whether the configSource field is set. + */ + @java.lang.Override + public boolean hasConfigSource() { + return configSource_ != null; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + * @return The configSource. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getConfigSource() { + return configSource_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder getConfigSourceOrBuilder() { + return configSource_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; + } + + public static final int PARAMETERS_FIELD_NUMBER = 2; + private com.google.protobuf.Struct parameters_; + /** + * .google.protobuf.Struct parameters = 2; + * @return Whether the parameters field is set. + */ + @java.lang.Override + public boolean hasParameters() { + return parameters_ != null; + } + /** + * .google.protobuf.Struct parameters = 2; + * @return The parameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getParameters() { + return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; + } + /** + * .google.protobuf.Struct parameters = 2; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { + return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 3; + private com.google.protobuf.Struct environment_; + /** + * .google.protobuf.Struct environment = 3; + * @return Whether the environment field is set. + */ + @java.lang.Override + public boolean hasEnvironment() { + return environment_ != null; + } + /** + * .google.protobuf.Struct environment = 3; + * @return The environment. + */ + @java.lang.Override + public com.google.protobuf.Struct getEnvironment() { + return environment_ == null ? com.google.protobuf.Struct.getDefaultInstance() : environment_; + } + /** + * .google.protobuf.Struct environment = 3; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getEnvironmentOrBuilder() { + return environment_ == null ? com.google.protobuf.Struct.getDefaultInstance() : environment_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (configSource_ != null) { + output.writeMessage(1, getConfigSource()); + } + if (parameters_ != null) { + output.writeMessage(2, getParameters()); + } + if (environment_ != null) { + output.writeMessage(3, getEnvironment()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (configSource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConfigSource()); + } + if (parameters_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getParameters()); + } + if (environment_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getEnvironment()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) obj; + + if (hasConfigSource() != other.hasConfigSource()) return false; + if (hasConfigSource()) { + if (!getConfigSource() + .equals(other.getConfigSource())) return false; + } + if (hasParameters() != other.hasParameters()) return false; + if (hasParameters()) { + if (!getParameters() + .equals(other.getParameters())) return false; + } + if (hasEnvironment() != other.hasEnvironment()) return false; + if (hasEnvironment()) { + if (!getEnvironment() + .equals(other.getEnvironment())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasConfigSource()) { + hash = (37 * hash) + CONFIG_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getConfigSource().hashCode(); + } + if (hasParameters()) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParameters().hashCode(); + } + if (hasEnvironment()) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Identifies the event that kicked off the build.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + configSource_ = null; + if (configSourceBuilder_ != null) { + configSourceBuilder_.dispose(); + configSourceBuilder_ = null; + } + parameters_ = null; + if (parametersBuilder_ != null) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + } + environment_ = null; + if (environmentBuilder_ != null) { + environmentBuilder_.dispose(); + environmentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation build() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation buildPartial() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.configSource_ = configSourceBuilder_ == null + ? configSource_ + : configSourceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parameters_ = parametersBuilder_ == null + ? parameters_ + : parametersBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.environment_ = environmentBuilder_ == null + ? environment_ + : environmentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) { + return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation other) { + if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance()) return this; + if (other.hasConfigSource()) { + mergeConfigSource(other.getConfigSource()); + } + if (other.hasParameters()) { + mergeParameters(other.getParameters()); + } + if (other.hasEnvironment()) { + mergeEnvironment(other.getEnvironment()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getConfigSourceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getParametersFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getEnvironmentFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource configSource_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder> configSourceBuilder_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + * @return Whether the configSource field is set. + */ + public boolean hasConfigSource() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + * @return The configSource. + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getConfigSource() { + if (configSourceBuilder_ == null) { + return configSource_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; + } else { + return configSourceBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + public Builder setConfigSource(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource value) { + if (configSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configSource_ = value; + } else { + configSourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + public Builder setConfigSource( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder builderForValue) { + if (configSourceBuilder_ == null) { + configSource_ = builderForValue.build(); + } else { + configSourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + public Builder mergeConfigSource(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource value) { + if (configSourceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + configSource_ != null && + configSource_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance()) { + getConfigSourceBuilder().mergeFrom(value); + } else { + configSource_ = value; + } + } else { + configSourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + public Builder clearConfigSource() { + bitField0_ = (bitField0_ & ~0x00000001); + configSource_ = null; + if (configSourceBuilder_ != null) { + configSourceBuilder_.dispose(); + configSourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder getConfigSourceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConfigSourceFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder getConfigSourceOrBuilder() { + if (configSourceBuilder_ != null) { + return configSourceBuilder_.getMessageOrBuilder(); + } else { + return configSource_ == null ? + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder> + getConfigSourceFieldBuilder() { + if (configSourceBuilder_ == null) { + configSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder>( + getConfigSource(), + getParentForChildren(), + isClean()); + configSource_ = null; + } + return configSourceBuilder_; + } + + private com.google.protobuf.Struct parameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> parametersBuilder_; + /** + * .google.protobuf.Struct parameters = 2; + * @return Whether the parameters field is set. + */ + public boolean hasParameters() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .google.protobuf.Struct parameters = 2; + * @return The parameters. + */ + public com.google.protobuf.Struct getParameters() { + if (parametersBuilder_ == null) { + return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; + } else { + return parametersBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Struct parameters = 2; + */ + public Builder setParameters(com.google.protobuf.Struct value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parameters_ = value; + } else { + parametersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct parameters = 2; + */ + public Builder setParameters( + com.google.protobuf.Struct.Builder builderForValue) { + if (parametersBuilder_ == null) { + parameters_ = builderForValue.build(); + } else { + parametersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct parameters = 2; + */ + public Builder mergeParameters(com.google.protobuf.Struct value) { + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + parameters_ != null && + parameters_ != com.google.protobuf.Struct.getDefaultInstance()) { + getParametersBuilder().mergeFrom(value); + } else { + parameters_ = value; + } + } else { + parametersBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct parameters = 2; + */ + public Builder clearParameters() { + bitField0_ = (bitField0_ & ~0x00000002); + parameters_ = null; + if (parametersBuilder_ != null) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Struct parameters = 2; + */ + public com.google.protobuf.Struct.Builder getParametersBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getParametersFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Struct parameters = 2; + */ + public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilder(); + } else { + return parameters_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : parameters_; + } + } + /** + * .google.protobuf.Struct parameters = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getParameters(), + getParentForChildren(), + isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + private com.google.protobuf.Struct environment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> environmentBuilder_; + /** + * .google.protobuf.Struct environment = 3; + * @return Whether the environment field is set. + */ + public boolean hasEnvironment() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .google.protobuf.Struct environment = 3; + * @return The environment. + */ + public com.google.protobuf.Struct getEnvironment() { + if (environmentBuilder_ == null) { + return environment_ == null ? com.google.protobuf.Struct.getDefaultInstance() : environment_; + } else { + return environmentBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Struct environment = 3; + */ + public Builder setEnvironment(com.google.protobuf.Struct value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + } else { + environmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct environment = 3; + */ + public Builder setEnvironment( + com.google.protobuf.Struct.Builder builderForValue) { + if (environmentBuilder_ == null) { + environment_ = builderForValue.build(); + } else { + environmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct environment = 3; + */ + public Builder mergeEnvironment(com.google.protobuf.Struct value) { + if (environmentBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + environment_ != null && + environment_ != com.google.protobuf.Struct.getDefaultInstance()) { + getEnvironmentBuilder().mergeFrom(value); + } else { + environment_ = value; + } + } else { + environmentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct environment = 3; + */ + public Builder clearEnvironment() { + bitField0_ = (bitField0_ & ~0x00000004); + environment_ = null; + if (environmentBuilder_ != null) { + environmentBuilder_.dispose(); + environmentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Struct environment = 3; + */ + public com.google.protobuf.Struct.Builder getEnvironmentBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEnvironmentFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Struct environment = 3; + */ + public com.google.protobuf.StructOrBuilder getEnvironmentOrBuilder() { + if (environmentBuilder_ != null) { + return environmentBuilder_.getMessageOrBuilder(); + } else { + return environment_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : environment_; + } + } + /** + * .google.protobuf.Struct environment = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getEnvironmentFieldBuilder() { + if (environmentBuilder_ == null) { + environmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getEnvironment(), + getParentForChildren(), + isClean()); + environment_ = null; + } + return environmentBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) + private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation(); + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaInvocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaConfigSourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) + com.google.protobuf.MessageOrBuilder { + + /** + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + * map<string, string> digest = 2; + */ + int getDigestCount(); + /** + * map<string, string> digest = 2; + */ + boolean containsDigest( + java.lang.String key); + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getDigest(); + /** + * map<string, string> digest = 2; + */ + java.util.Map + getDigestMap(); + /** + * map<string, string> digest = 2; + */ + /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * map<string, string> digest = 2; + */ + java.lang.String getDigestOrThrow( + java.lang.String key); + + /** + * string entry_point = 3; + * @return The entryPoint. + */ + java.lang.String getEntryPoint(); + /** + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + com.google.protobuf.ByteString + getEntryPointBytes(); + } + /** + *
+   * Describes where the config file that kicked off the build came from.
+   * This is effectively a pointer to the source where buildConfig came from.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource} + */ + public static final class SlsaConfigSource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) + SlsaConfigSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaConfigSource.newBuilder() to construct. + private SlsaConfigSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaConfigSource() { + uri_ = ""; + entryPoint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaConfigSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIGEST_FIELD_NUMBER = 2; + private static final class DigestDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ENTRY_POINT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object entryPoint_ = ""; + /** + * string entry_point = 3; + * @return The entryPoint. + */ + @java.lang.Override + public java.lang.String getEntryPoint() { + java.lang.Object ref = entryPoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryPoint_ = s; + return s; + } + } + /** + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEntryPointBytes() { + java.lang.Object ref = entryPoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entryPoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetDigest(), + DigestDefaultEntryHolder.defaultEntry, + 2); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entryPoint_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + for (java.util.Map.Entry entry + : internalGetDigest().getMap().entrySet()) { + com.google.protobuf.MapEntry + digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, digest__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entryPoint_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (!internalGetDigest().equals( + other.internalGetDigest())) return false; + if (!getEntryPoint() + .equals(other.getEntryPoint())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (!internalGetDigest().getMap().isEmpty()) { + hash = (37 * hash) + DIGEST_FIELD_NUMBER; + hash = (53 * hash) + internalGetDigest().hashCode(); + } + hash = (37 * hash) + ENTRY_POINT_FIELD_NUMBER; + hash = (53 * hash) + getEntryPoint().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Describes where the config file that kicked off the build came from.
+     * This is effectively a pointer to the source where buildConfig came from.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + internalGetMutableDigest().clear(); + entryPoint_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource build() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource buildPartial() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.digest_ = internalGetDigest(); + result.digest_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.entryPoint_ = entryPoint_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) { + return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource other) { + if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableDigest().mergeFrom( + other.internalGetDigest()); + bitField0_ |= 0x00000002; + if (!other.getEntryPoint().isEmpty()) { + entryPoint_ = other.entryPoint_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + digest__ = input.readMessage( + DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableDigest().getMutableMap().put( + digest__.getKey(), digest__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + entryPoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + private com.google.protobuf.MapField + internalGetMutableDigest() { + if (digest_ == null) { + digest_ = com.google.protobuf.MapField.newMapField( + DigestDefaultEntryHolder.defaultEntry); + } + if (!digest_.isMutable()) { + digest_ = digest_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearDigest() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableDigest().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> digest = 2; + */ + public Builder removeDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableDigest().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableDigest() { + bitField0_ |= 0x00000002; + return internalGetMutableDigest().getMutableMap(); + } + /** + * map<string, string> digest = 2; + */ + public Builder putDigest( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableDigest().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * map<string, string> digest = 2; + */ + public Builder putAllDigest( + java.util.Map values) { + internalGetMutableDigest().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private java.lang.Object entryPoint_ = ""; + /** + * string entry_point = 3; + * @return The entryPoint. + */ + public java.lang.String getEntryPoint() { + java.lang.Object ref = entryPoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryPoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + public com.google.protobuf.ByteString + getEntryPointBytes() { + java.lang.Object ref = entryPoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entryPoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string entry_point = 3; + * @param value The entryPoint to set. + * @return This builder for chaining. + */ + public Builder setEntryPoint( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + entryPoint_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string entry_point = 3; + * @return This builder for chaining. + */ + public Builder clearEntryPoint() { + entryPoint_ = getDefaultInstance().getEntryPoint(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string entry_point = 3; + * @param value The bytes for entryPoint to set. + * @return This builder for chaining. + */ + public Builder setEntryPointBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + entryPoint_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) + private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource(); + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaConfigSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + java.lang.String getBuildInvocationId(); + /** + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + com.google.protobuf.ByteString + getBuildInvocationIdBytes(); + + /** + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + boolean hasBuildStartedOn(); + /** + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + com.google.protobuf.Timestamp getBuildStartedOn(); + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder(); + + /** + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + boolean hasBuildFinishedOn(); + /** + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + com.google.protobuf.Timestamp getBuildFinishedOn(); + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder(); + + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + * @return Whether the completeness field is set. + */ + boolean hasCompleteness(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + * @return The completeness. + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getCompleteness(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder getCompletenessOrBuilder(); + + /** + * bool reproducible = 5; + * @return The reproducible. + */ + boolean getReproducible(); + } + /** + *
+   * Other properties of the build.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata} + */ + public static final class SlsaMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) + SlsaMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaMetadata.newBuilder() to construct. + private SlsaMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaMetadata() { + buildInvocationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder.class); + } + + public static final int BUILD_INVOCATION_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object buildInvocationId_ = ""; + /** + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + @java.lang.Override + public java.lang.String getBuildInvocationId() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildInvocationId_ = s; + return s; + } + } + /** + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBuildInvocationIdBytes() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildInvocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUILD_STARTED_ON_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp buildStartedOn_; + /** + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + @java.lang.Override + public boolean hasBuildStartedOn() { + return buildStartedOn_ != null; + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getBuildStartedOn() { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + + public static final int BUILD_FINISHED_ON_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp buildFinishedOn_; + /** + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + @java.lang.Override + public boolean hasBuildFinishedOn() { + return buildFinishedOn_ != null; + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getBuildFinishedOn() { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + + public static final int COMPLETENESS_FIELD_NUMBER = 4; + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + * @return Whether the completeness field is set. + */ + @java.lang.Override + public boolean hasCompleteness() { + return completeness_ != null; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + * @return The completeness. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getCompleteness() { + return completeness_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { + return completeness_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; + } + + public static final int REPRODUCIBLE_FIELD_NUMBER = 5; + private boolean reproducible_ = false; + /** + * bool reproducible = 5; + * @return The reproducible. + */ + @java.lang.Override + public boolean getReproducible() { + return reproducible_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, buildInvocationId_); + } + if (buildStartedOn_ != null) { + output.writeMessage(2, getBuildStartedOn()); + } + if (buildFinishedOn_ != null) { + output.writeMessage(3, getBuildFinishedOn()); + } + if (completeness_ != null) { + output.writeMessage(4, getCompleteness()); + } + if (reproducible_ != false) { + output.writeBool(5, reproducible_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, buildInvocationId_); + } + if (buildStartedOn_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBuildStartedOn()); + } + if (buildFinishedOn_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getBuildFinishedOn()); + } + if (completeness_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCompleteness()); + } + if (reproducible_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, reproducible_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) obj; + + if (!getBuildInvocationId() + .equals(other.getBuildInvocationId())) return false; + if (hasBuildStartedOn() != other.hasBuildStartedOn()) return false; + if (hasBuildStartedOn()) { + if (!getBuildStartedOn() + .equals(other.getBuildStartedOn())) return false; + } + if (hasBuildFinishedOn() != other.hasBuildFinishedOn()) return false; + if (hasBuildFinishedOn()) { + if (!getBuildFinishedOn() + .equals(other.getBuildFinishedOn())) return false; + } + if (hasCompleteness() != other.hasCompleteness()) return false; + if (hasCompleteness()) { + if (!getCompleteness() + .equals(other.getCompleteness())) return false; + } + if (getReproducible() + != other.getReproducible()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BUILD_INVOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getBuildInvocationId().hashCode(); + if (hasBuildStartedOn()) { + hash = (37 * hash) + BUILD_STARTED_ON_FIELD_NUMBER; + hash = (53 * hash) + getBuildStartedOn().hashCode(); + } + if (hasBuildFinishedOn()) { + hash = (37 * hash) + BUILD_FINISHED_ON_FIELD_NUMBER; + hash = (53 * hash) + getBuildFinishedOn().hashCode(); + } + if (hasCompleteness()) { + hash = (37 * hash) + COMPLETENESS_FIELD_NUMBER; + hash = (53 * hash) + getCompleteness().hashCode(); + } + hash = (37 * hash) + REPRODUCIBLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReproducible()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Other properties of the build.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + buildInvocationId_ = ""; + buildStartedOn_ = null; + if (buildStartedOnBuilder_ != null) { + buildStartedOnBuilder_.dispose(); + buildStartedOnBuilder_ = null; + } + buildFinishedOn_ = null; + if (buildFinishedOnBuilder_ != null) { + buildFinishedOnBuilder_.dispose(); + buildFinishedOnBuilder_ = null; + } + completeness_ = null; + if (completenessBuilder_ != null) { + completenessBuilder_.dispose(); + completenessBuilder_ = null; + } + reproducible_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata build() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata buildPartial() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.buildInvocationId_ = buildInvocationId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.buildStartedOn_ = buildStartedOnBuilder_ == null + ? buildStartedOn_ + : buildStartedOnBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.buildFinishedOn_ = buildFinishedOnBuilder_ == null + ? buildFinishedOn_ + : buildFinishedOnBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.completeness_ = completenessBuilder_ == null + ? completeness_ + : completenessBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.reproducible_ = reproducible_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) { + return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata other) { + if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance()) return this; + if (!other.getBuildInvocationId().isEmpty()) { + buildInvocationId_ = other.buildInvocationId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasBuildStartedOn()) { + mergeBuildStartedOn(other.getBuildStartedOn()); + } + if (other.hasBuildFinishedOn()) { + mergeBuildFinishedOn(other.getBuildFinishedOn()); + } + if (other.hasCompleteness()) { + mergeCompleteness(other.getCompleteness()); + } + if (other.getReproducible() != false) { + setReproducible(other.getReproducible()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + buildInvocationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getBuildStartedOnFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getBuildFinishedOnFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getCompletenessFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + reproducible_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object buildInvocationId_ = ""; + /** + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + public java.lang.String getBuildInvocationId() { + java.lang.Object ref = buildInvocationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildInvocationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + public com.google.protobuf.ByteString + getBuildInvocationIdBytes() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildInvocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string build_invocation_id = 1; + * @param value The buildInvocationId to set. + * @return This builder for chaining. + */ + public Builder setBuildInvocationId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + buildInvocationId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string build_invocation_id = 1; + * @return This builder for chaining. + */ + public Builder clearBuildInvocationId() { + buildInvocationId_ = getDefaultInstance().getBuildInvocationId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string build_invocation_id = 1; + * @param value The bytes for buildInvocationId to set. + * @return This builder for chaining. + */ + public Builder setBuildInvocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + buildInvocationId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp buildStartedOn_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildStartedOnBuilder_; + /** + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + public boolean hasBuildStartedOn() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + public com.google.protobuf.Timestamp getBuildStartedOn() { + if (buildStartedOnBuilder_ == null) { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } else { + return buildStartedOnBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder setBuildStartedOn(com.google.protobuf.Timestamp value) { + if (buildStartedOnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + buildStartedOn_ = value; + } else { + buildStartedOnBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder setBuildStartedOn( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (buildStartedOnBuilder_ == null) { + buildStartedOn_ = builderForValue.build(); + } else { + buildStartedOnBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder mergeBuildStartedOn(com.google.protobuf.Timestamp value) { + if (buildStartedOnBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + buildStartedOn_ != null && + buildStartedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getBuildStartedOnBuilder().mergeFrom(value); + } else { + buildStartedOn_ = value; + } + } else { + buildStartedOnBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder clearBuildStartedOn() { + bitField0_ = (bitField0_ & ~0x00000002); + buildStartedOn_ = null; + if (buildStartedOnBuilder_ != null) { + buildStartedOnBuilder_.dispose(); + buildStartedOnBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + public com.google.protobuf.Timestamp.Builder getBuildStartedOnBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBuildStartedOnFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { + if (buildStartedOnBuilder_ != null) { + return buildStartedOnBuilder_.getMessageOrBuilder(); + } else { + return buildStartedOn_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getBuildStartedOnFieldBuilder() { + if (buildStartedOnBuilder_ == null) { + buildStartedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getBuildStartedOn(), + getParentForChildren(), + isClean()); + buildStartedOn_ = null; + } + return buildStartedOnBuilder_; + } + + private com.google.protobuf.Timestamp buildFinishedOn_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildFinishedOnBuilder_; + /** + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + public boolean hasBuildFinishedOn() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + public com.google.protobuf.Timestamp getBuildFinishedOn() { + if (buildFinishedOnBuilder_ == null) { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } else { + return buildFinishedOnBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder setBuildFinishedOn(com.google.protobuf.Timestamp value) { + if (buildFinishedOnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + buildFinishedOn_ = value; + } else { + buildFinishedOnBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder setBuildFinishedOn( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (buildFinishedOnBuilder_ == null) { + buildFinishedOn_ = builderForValue.build(); + } else { + buildFinishedOnBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder mergeBuildFinishedOn(com.google.protobuf.Timestamp value) { + if (buildFinishedOnBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + buildFinishedOn_ != null && + buildFinishedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getBuildFinishedOnBuilder().mergeFrom(value); + } else { + buildFinishedOn_ = value; + } + } else { + buildFinishedOnBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder clearBuildFinishedOn() { + bitField0_ = (bitField0_ & ~0x00000004); + buildFinishedOn_ = null; + if (buildFinishedOnBuilder_ != null) { + buildFinishedOnBuilder_.dispose(); + buildFinishedOnBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public com.google.protobuf.Timestamp.Builder getBuildFinishedOnBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBuildFinishedOnFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { + if (buildFinishedOnBuilder_ != null) { + return buildFinishedOnBuilder_.getMessageOrBuilder(); + } else { + return buildFinishedOn_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getBuildFinishedOnFieldBuilder() { + if (buildFinishedOnBuilder_ == null) { + buildFinishedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getBuildFinishedOn(), + getParentForChildren(), + isClean()); + buildFinishedOn_ = null; + } + return buildFinishedOnBuilder_; + } + + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder> completenessBuilder_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + * @return Whether the completeness field is set. + */ + public boolean hasCompleteness() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + * @return The completeness. + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getCompleteness() { + if (completenessBuilder_ == null) { + return completeness_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; + } else { + return completenessBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + public Builder setCompleteness(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness value) { + if (completenessBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + completeness_ = value; + } else { + completenessBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + public Builder setCompleteness( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder builderForValue) { + if (completenessBuilder_ == null) { + completeness_ = builderForValue.build(); + } else { + completenessBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + public Builder mergeCompleteness(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness value) { + if (completenessBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + completeness_ != null && + completeness_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance()) { + getCompletenessBuilder().mergeFrom(value); + } else { + completeness_ = value; + } + } else { + completenessBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + public Builder clearCompleteness() { + bitField0_ = (bitField0_ & ~0x00000008); + completeness_ = null; + if (completenessBuilder_ != null) { + completenessBuilder_.dispose(); + completenessBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder getCompletenessBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCompletenessFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { + if (completenessBuilder_ != null) { + return completenessBuilder_.getMessageOrBuilder(); + } else { + return completeness_ == null ? + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder> + getCompletenessFieldBuilder() { + if (completenessBuilder_ == null) { + completenessBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder>( + getCompleteness(), + getParentForChildren(), + isClean()); + completeness_ = null; + } + return completenessBuilder_; + } + + private boolean reproducible_ ; + /** + * bool reproducible = 5; + * @return The reproducible. + */ + @java.lang.Override + public boolean getReproducible() { + return reproducible_; + } + /** + * bool reproducible = 5; + * @param value The reproducible to set. + * @return This builder for chaining. + */ + public Builder setReproducible(boolean value) { + + reproducible_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * bool reproducible = 5; + * @return This builder for chaining. + */ + public Builder clearReproducible() { + bitField0_ = (bitField0_ & ~0x00000010); + reproducible_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) + private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata(); + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaCompletenessOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) + com.google.protobuf.MessageOrBuilder { + + /** + * bool parameters = 1; + * @return The parameters. + */ + boolean getParameters(); + + /** + * bool environment = 2; + * @return The environment. + */ + boolean getEnvironment(); + + /** + * bool materials = 3; + * @return The materials. + */ + boolean getMaterials(); + } + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness} + */ + public static final class SlsaCompleteness extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) + SlsaCompletenessOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaCompleteness.newBuilder() to construct. + private SlsaCompleteness(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaCompleteness() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaCompleteness(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder.class); + } + + public static final int PARAMETERS_FIELD_NUMBER = 1; + private boolean parameters_ = false; + /** + * bool parameters = 1; + * @return The parameters. + */ + @java.lang.Override + public boolean getParameters() { + return parameters_; + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 2; + private boolean environment_ = false; + /** + * bool environment = 2; + * @return The environment. + */ + @java.lang.Override + public boolean getEnvironment() { + return environment_; + } + + public static final int MATERIALS_FIELD_NUMBER = 3; + private boolean materials_ = false; + /** + * bool materials = 3; + * @return The materials. + */ + @java.lang.Override + public boolean getMaterials() { + return materials_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (parameters_ != false) { + output.writeBool(1, parameters_); + } + if (environment_ != false) { + output.writeBool(2, environment_); + } + if (materials_ != false) { + output.writeBool(3, materials_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (parameters_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, parameters_); + } + if (environment_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, environment_); + } + if (materials_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, materials_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) obj; + + if (getParameters() + != other.getParameters()) return false; + if (getEnvironment() + != other.getEnvironment()) return false; + if (getMaterials() + != other.getMaterials()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getParameters()); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnvironment()); + hash = (37 * hash) + MATERIALS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMaterials()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parameters_ = false; + environment_ = false; + materials_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness build() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness buildPartial() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parameters_ = parameters_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.environment_ = environment_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.materials_ = materials_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) { + return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness other) { + if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance()) return this; + if (other.getParameters() != false) { + setParameters(other.getParameters()); + } + if (other.getEnvironment() != false) { + setEnvironment(other.getEnvironment()); + } + if (other.getMaterials() != false) { + setMaterials(other.getMaterials()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + parameters_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + environment_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + materials_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean parameters_ ; + /** + * bool parameters = 1; + * @return The parameters. + */ + @java.lang.Override + public boolean getParameters() { + return parameters_; + } + /** + * bool parameters = 1; + * @param value The parameters to set. + * @return This builder for chaining. + */ + public Builder setParameters(boolean value) { + + parameters_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool parameters = 1; + * @return This builder for chaining. + */ + public Builder clearParameters() { + bitField0_ = (bitField0_ & ~0x00000001); + parameters_ = false; + onChanged(); + return this; + } + + private boolean environment_ ; + /** + * bool environment = 2; + * @return The environment. + */ + @java.lang.Override + public boolean getEnvironment() { + return environment_; + } + /** + * bool environment = 2; + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(boolean value) { + + environment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool environment = 2; + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + bitField0_ = (bitField0_ & ~0x00000002); + environment_ = false; + onChanged(); + return this; + } + + private boolean materials_ ; + /** + * bool materials = 3; + * @return The materials. + */ + @java.lang.Override + public boolean getMaterials() { + return materials_; + } + /** + * bool materials = 3; + * @param value The materials to set. + * @return This builder for chaining. + */ + public Builder setMaterials(boolean value) { + + materials_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool materials = 3; + * @return This builder for chaining. + */ + public Builder clearMaterials() { + bitField0_ = (bitField0_ & ~0x00000004); + materials_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) + private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness(); + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaCompleteness parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int BUILDER_FIELD_NUMBER = 1; + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + * @return Whether the builder field is set. + */ + @java.lang.Override + public boolean hasBuilder() { + return builder_ != null; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + * @return The builder. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getBuilder() { + return builder_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder getBuilderOrBuilder() { + return builder_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; + } + + public static final int BUILD_TYPE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object buildType_ = ""; + /** + * string build_type = 2; + * @return The buildType. + */ + @java.lang.Override + public java.lang.String getBuildType() { + java.lang.Object ref = buildType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildType_ = s; + return s; + } + } + /** + * string build_type = 2; + * @return The bytes for buildType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBuildTypeBytes() { + java.lang.Object ref = buildType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INVOCATION_FIELD_NUMBER = 3; + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + * @return Whether the invocation field is set. + */ + @java.lang.Override + public boolean hasInvocation() { + return invocation_ != null; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + * @return The invocation. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getInvocation() { + return invocation_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder getInvocationOrBuilder() { + return invocation_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; + } + + public static final int BUILD_CONFIG_FIELD_NUMBER = 4; + private com.google.protobuf.Struct buildConfig_; + /** + * .google.protobuf.Struct build_config = 4; + * @return Whether the buildConfig field is set. + */ + @java.lang.Override + public boolean hasBuildConfig() { + return buildConfig_ != null; + } + /** + * .google.protobuf.Struct build_config = 4; + * @return The buildConfig. + */ + @java.lang.Override + public com.google.protobuf.Struct getBuildConfig() { + return buildConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; + } + /** + * .google.protobuf.Struct build_config = 4; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getBuildConfigOrBuilder() { + return buildConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; + } + + public static final int METADATA_FIELD_NUMBER = 5; + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + * @return The metadata. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getMetadata() { + return metadata_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; + } + + public static final int MATERIALS_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private java.util.List materials_; + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + @java.lang.Override + public java.util.List getMaterialsList() { + return materials_; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + @java.lang.Override + public java.util.List + getMaterialsOrBuilderList() { + return materials_; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + @java.lang.Override + public int getMaterialsCount() { + return materials_.size(); + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getMaterials(int index) { + return materials_.get(index); + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder getMaterialsOrBuilder( + int index) { + return materials_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (builder_ != null) { + output.writeMessage(1, getBuilder()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, buildType_); + } + if (invocation_ != null) { + output.writeMessage(3, getInvocation()); + } + if (buildConfig_ != null) { + output.writeMessage(4, getBuildConfig()); + } + if (metadata_ != null) { + output.writeMessage(5, getMetadata()); + } + for (int i = 0; i < materials_.size(); i++) { + output.writeMessage(6, materials_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (builder_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBuilder()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, buildType_); + } + if (invocation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getInvocation()); + } + if (buildConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getBuildConfig()); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getMetadata()); + } + for (int i = 0; i < materials_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, materials_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenanceZeroTwo other = (io.grafeas.v1.SlsaProvenanceZeroTwo) obj; + + if (hasBuilder() != other.hasBuilder()) return false; + if (hasBuilder()) { + if (!getBuilder() + .equals(other.getBuilder())) return false; + } + if (!getBuildType() + .equals(other.getBuildType())) return false; + if (hasInvocation() != other.hasInvocation()) return false; + if (hasInvocation()) { + if (!getInvocation() + .equals(other.getInvocation())) return false; + } + if (hasBuildConfig() != other.hasBuildConfig()) return false; + if (hasBuildConfig()) { + if (!getBuildConfig() + .equals(other.getBuildConfig())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getMaterialsList() + .equals(other.getMaterialsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBuilder()) { + hash = (37 * hash) + BUILDER_FIELD_NUMBER; + hash = (53 * hash) + getBuilder().hashCode(); + } + hash = (37 * hash) + BUILD_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getBuildType().hashCode(); + if (hasInvocation()) { + hash = (37 * hash) + INVOCATION_FIELD_NUMBER; + hash = (53 * hash) + getInvocation().hashCode(); + } + if (hasBuildConfig()) { + hash = (37 * hash) + BUILD_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBuildConfig().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (getMaterialsCount() > 0) { + hash = (37 * hash) + MATERIALS_FIELD_NUMBER; + hash = (53 * hash) + getMaterialsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * See full explanation of fields at slsa.dev/provenance/v0.2.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo) + io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.class, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + builder_ = null; + if (builderBuilder_ != null) { + builderBuilder_.dispose(); + builderBuilder_ = null; + } + buildType_ = ""; + invocation_ = null; + if (invocationBuilder_ != null) { + invocationBuilder_.dispose(); + invocationBuilder_ = null; + } + buildConfig_ = null; + if (buildConfigBuilder_ != null) { + buildConfigBuilder_.dispose(); + buildConfigBuilder_ = null; + } + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + if (materialsBuilder_ == null) { + materials_ = java.util.Collections.emptyList(); + } else { + materials_ = null; + materialsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo build() { + io.grafeas.v1.SlsaProvenanceZeroTwo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo buildPartial() { + io.grafeas.v1.SlsaProvenanceZeroTwo result = new io.grafeas.v1.SlsaProvenanceZeroTwo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.SlsaProvenanceZeroTwo result) { + if (materialsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + materials_ = java.util.Collections.unmodifiableList(materials_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.materials_ = materials_; + } else { + result.materials_ = materialsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.builder_ = builderBuilder_ == null + ? builder_ + : builderBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.buildType_ = buildType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.invocation_ = invocationBuilder_ == null + ? invocation_ + : invocationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.buildConfig_ = buildConfigBuilder_ == null + ? buildConfig_ + : buildConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo) { + return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo other) { + if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance()) return this; + if (other.hasBuilder()) { + mergeBuilder(other.getBuilder()); + } + if (!other.getBuildType().isEmpty()) { + buildType_ = other.buildType_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasInvocation()) { + mergeInvocation(other.getInvocation()); + } + if (other.hasBuildConfig()) { + mergeBuildConfig(other.getBuildConfig()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (materialsBuilder_ == null) { + if (!other.materials_.isEmpty()) { + if (materials_.isEmpty()) { + materials_ = other.materials_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureMaterialsIsMutable(); + materials_.addAll(other.materials_); + } + onChanged(); + } + } else { + if (!other.materials_.isEmpty()) { + if (materialsBuilder_.isEmpty()) { + materialsBuilder_.dispose(); + materialsBuilder_ = null; + materials_ = other.materials_; + bitField0_ = (bitField0_ & ~0x00000020); + materialsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMaterialsFieldBuilder() : null; + } else { + materialsBuilder_.addAllMessages(other.materials_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getBuilderFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + buildType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getInvocationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getBuildConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial m = + input.readMessage( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.parser(), + extensionRegistry); + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.add(m); + } else { + materialsBuilder_.addMessage(m); + } + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder> builderBuilder_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + * @return Whether the builder field is set. + */ + public boolean hasBuilder() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + * @return The builder. + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getBuilder() { + if (builderBuilder_ == null) { + return builder_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; + } else { + return builderBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + public Builder setBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder value) { + if (builderBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + builder_ = value; + } else { + builderBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + public Builder setBuilder( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder builderForValue) { + if (builderBuilder_ == null) { + builder_ = builderForValue.build(); + } else { + builderBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + public Builder mergeBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder value) { + if (builderBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + builder_ != null && + builder_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance()) { + getBuilderBuilder().mergeFrom(value); + } else { + builder_ = value; + } + } else { + builderBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + public Builder clearBuilder() { + bitField0_ = (bitField0_ & ~0x00000001); + builder_ = null; + if (builderBuilder_ != null) { + builderBuilder_.dispose(); + builderBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder getBuilderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBuilderFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder getBuilderOrBuilder() { + if (builderBuilder_ != null) { + return builderBuilder_.getMessageOrBuilder(); + } else { + return builder_ == null ? + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder> + getBuilderFieldBuilder() { + if (builderBuilder_ == null) { + builderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder>( + getBuilder(), + getParentForChildren(), + isClean()); + builder_ = null; + } + return builderBuilder_; + } + + private java.lang.Object buildType_ = ""; + /** + * string build_type = 2; + * @return The buildType. + */ + public java.lang.String getBuildType() { + java.lang.Object ref = buildType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string build_type = 2; + * @return The bytes for buildType. + */ + public com.google.protobuf.ByteString + getBuildTypeBytes() { + java.lang.Object ref = buildType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string build_type = 2; + * @param value The buildType to set. + * @return This builder for chaining. + */ + public Builder setBuildType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + buildType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string build_type = 2; + * @return This builder for chaining. + */ + public Builder clearBuildType() { + buildType_ = getDefaultInstance().getBuildType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string build_type = 2; + * @param value The bytes for buildType to set. + * @return This builder for chaining. + */ + public Builder setBuildTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + buildType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder> invocationBuilder_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + * @return Whether the invocation field is set. + */ + public boolean hasInvocation() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + * @return The invocation. + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getInvocation() { + if (invocationBuilder_ == null) { + return invocation_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; + } else { + return invocationBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + public Builder setInvocation(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation value) { + if (invocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + invocation_ = value; + } else { + invocationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + public Builder setInvocation( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder builderForValue) { + if (invocationBuilder_ == null) { + invocation_ = builderForValue.build(); + } else { + invocationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + public Builder mergeInvocation(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation value) { + if (invocationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + invocation_ != null && + invocation_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance()) { + getInvocationBuilder().mergeFrom(value); + } else { + invocation_ = value; + } + } else { + invocationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + public Builder clearInvocation() { + bitField0_ = (bitField0_ & ~0x00000004); + invocation_ = null; + if (invocationBuilder_ != null) { + invocationBuilder_.dispose(); + invocationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder getInvocationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getInvocationFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder getInvocationOrBuilder() { + if (invocationBuilder_ != null) { + return invocationBuilder_.getMessageOrBuilder(); + } else { + return invocation_ == null ? + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder> + getInvocationFieldBuilder() { + if (invocationBuilder_ == null) { + invocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder>( + getInvocation(), + getParentForChildren(), + isClean()); + invocation_ = null; + } + return invocationBuilder_; + } + + private com.google.protobuf.Struct buildConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> buildConfigBuilder_; + /** + * .google.protobuf.Struct build_config = 4; + * @return Whether the buildConfig field is set. + */ + public boolean hasBuildConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .google.protobuf.Struct build_config = 4; + * @return The buildConfig. + */ + public com.google.protobuf.Struct getBuildConfig() { + if (buildConfigBuilder_ == null) { + return buildConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; + } else { + return buildConfigBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Struct build_config = 4; + */ + public Builder setBuildConfig(com.google.protobuf.Struct value) { + if (buildConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + buildConfig_ = value; + } else { + buildConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct build_config = 4; + */ + public Builder setBuildConfig( + com.google.protobuf.Struct.Builder builderForValue) { + if (buildConfigBuilder_ == null) { + buildConfig_ = builderForValue.build(); + } else { + buildConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct build_config = 4; + */ + public Builder mergeBuildConfig(com.google.protobuf.Struct value) { + if (buildConfigBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + buildConfig_ != null && + buildConfig_ != com.google.protobuf.Struct.getDefaultInstance()) { + getBuildConfigBuilder().mergeFrom(value); + } else { + buildConfig_ = value; + } + } else { + buildConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct build_config = 4; + */ + public Builder clearBuildConfig() { + bitField0_ = (bitField0_ & ~0x00000008); + buildConfig_ = null; + if (buildConfigBuilder_ != null) { + buildConfigBuilder_.dispose(); + buildConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Struct build_config = 4; + */ + public com.google.protobuf.Struct.Builder getBuildConfigBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getBuildConfigFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Struct build_config = 4; + */ + public com.google.protobuf.StructOrBuilder getBuildConfigOrBuilder() { + if (buildConfigBuilder_ != null) { + return buildConfigBuilder_.getMessageOrBuilder(); + } else { + return buildConfig_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; + } + } + /** + * .google.protobuf.Struct build_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getBuildConfigFieldBuilder() { + if (buildConfigBuilder_ == null) { + buildConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getBuildConfig(), + getParentForChildren(), + isClean()); + buildConfig_ = null; + } + return buildConfigBuilder_; + } + + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder> metadataBuilder_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + * @return The metadata. + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + public Builder setMetadata(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + public Builder setMetadata( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + public Builder mergeMetadata(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + metadata_ != null && + metadata_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000010); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private java.util.List materials_ = + java.util.Collections.emptyList(); + private void ensureMaterialsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + materials_ = new java.util.ArrayList(materials_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder> materialsBuilder_; + + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public java.util.List getMaterialsList() { + if (materialsBuilder_ == null) { + return java.util.Collections.unmodifiableList(materials_); + } else { + return materialsBuilder_.getMessageList(); + } + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public int getMaterialsCount() { + if (materialsBuilder_ == null) { + return materials_.size(); + } else { + return materialsBuilder_.getCount(); + } + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getMaterials(int index) { + if (materialsBuilder_ == null) { + return materials_.get(index); + } else { + return materialsBuilder_.getMessage(index); + } + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder setMaterials( + int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial value) { + if (materialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaterialsIsMutable(); + materials_.set(index, value); + onChanged(); + } else { + materialsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder setMaterials( + int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder builderForValue) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.set(index, builderForValue.build()); + onChanged(); + } else { + materialsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder addMaterials(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial value) { + if (materialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaterialsIsMutable(); + materials_.add(value); + onChanged(); + } else { + materialsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder addMaterials( + int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial value) { + if (materialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaterialsIsMutable(); + materials_.add(index, value); + onChanged(); + } else { + materialsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder addMaterials( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder builderForValue) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.add(builderForValue.build()); + onChanged(); + } else { + materialsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder addMaterials( + int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder builderForValue) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.add(index, builderForValue.build()); + onChanged(); + } else { + materialsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder addAllMaterials( + java.lang.Iterable values) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, materials_); + onChanged(); + } else { + materialsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder clearMaterials() { + if (materialsBuilder_ == null) { + materials_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + materialsBuilder_.clear(); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder removeMaterials(int index) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.remove(index); + onChanged(); + } else { + materialsBuilder_.remove(index); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder getMaterialsBuilder( + int index) { + return getMaterialsFieldBuilder().getBuilder(index); + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder getMaterialsOrBuilder( + int index) { + if (materialsBuilder_ == null) { + return materials_.get(index); } else { + return materialsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public java.util.List + getMaterialsOrBuilderList() { + if (materialsBuilder_ != null) { + return materialsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(materials_); + } + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder addMaterialsBuilder() { + return getMaterialsFieldBuilder().addBuilder( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder addMaterialsBuilder( + int index) { + return getMaterialsFieldBuilder().addBuilder( + index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public java.util.List + getMaterialsBuilderList() { + return getMaterialsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder> + getMaterialsFieldBuilder() { + if (materialsBuilder_ == null) { + materialsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder>( + materials_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + materials_ = null; + } + return materialsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo) + private static final io.grafeas.v1.SlsaProvenanceZeroTwo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo(); + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaProvenanceZeroTwo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java new file mode 100644 index 000000000000..42e35172f0ca --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java @@ -0,0 +1,105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/slsa_provenance_zero_two.proto + +package io.grafeas.v1; + +public interface SlsaProvenanceZeroTwoOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo) + com.google.protobuf.MessageOrBuilder { + + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + * @return Whether the builder field is set. + */ + boolean hasBuilder(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + * @return The builder. + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getBuilder(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder getBuilderOrBuilder(); + + /** + * string build_type = 2; + * @return The buildType. + */ + java.lang.String getBuildType(); + /** + * string build_type = 2; + * @return The bytes for buildType. + */ + com.google.protobuf.ByteString + getBuildTypeBytes(); + + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + * @return Whether the invocation field is set. + */ + boolean hasInvocation(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + * @return The invocation. + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getInvocation(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder getInvocationOrBuilder(); + + /** + * .google.protobuf.Struct build_config = 4; + * @return Whether the buildConfig field is set. + */ + boolean hasBuildConfig(); + /** + * .google.protobuf.Struct build_config = 4; + * @return The buildConfig. + */ + com.google.protobuf.Struct getBuildConfig(); + /** + * .google.protobuf.Struct build_config = 4; + */ + com.google.protobuf.StructOrBuilder getBuildConfigOrBuilder(); + + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + * @return The metadata. + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getMetadata(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder getMetadataOrBuilder(); + + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + java.util.List + getMaterialsList(); + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getMaterials(int index); + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + int getMaterialsCount(); + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + java.util.List + getMaterialsOrBuilderList(); + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder getMaterialsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java new file mode 100644 index 000000000000..eec7126b0270 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java @@ -0,0 +1,174 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/slsa_provenance_zero_two.proto + +package io.grafeas.v1; + +public final class SlsaProvenanceZeroTwoProto { + private SlsaProvenanceZeroTwoProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n)grafeas/v1/slsa_provenance_zero_two.pr" + + "oto\022\ngrafeas.v1\032\034google/protobuf/struct." + + "proto\032\037google/protobuf/timestamp.proto\"\323" + + "\t\n\025SlsaProvenanceZeroTwo\022>\n\007builder\030\001 \001(" + + "\0132-.grafeas.v1.SlsaProvenanceZeroTwo.Sls" + + "aBuilder\022\022\n\nbuild_type\030\002 \001(\t\022D\n\ninvocati" + + "on\030\003 \001(\01320.grafeas.v1.SlsaProvenanceZero" + + "Two.SlsaInvocation\022-\n\014build_config\030\004 \001(\013" + + "2\027.google.protobuf.Struct\022@\n\010metadata\030\005 " + + "\001(\0132..grafeas.v1.SlsaProvenanceZeroTwo.S" + + "lsaMetadata\022A\n\tmaterials\030\006 \003(\0132..grafeas" + + ".v1.SlsaProvenanceZeroTwo.SlsaMaterial\032\031" + + "\n\013SlsaBuilder\022\n\n\002id\030\001 \001(\t\032\226\001\n\014SlsaMateri" + + "al\022\013\n\003uri\030\001 \001(\t\022J\n\006digest\030\002 \003(\0132:.grafea" + + "s.v1.SlsaProvenanceZeroTwo.SlsaMaterial." + + "DigestEntry\032-\n\013DigestEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001\032\266\001\n\016SlsaInvocation\022I\n" + + "\rconfig_source\030\001 \001(\01322.grafeas.v1.SlsaPr" + + "ovenanceZeroTwo.SlsaConfigSource\022+\n\npara" + + "meters\030\002 \001(\0132\027.google.protobuf.Struct\022,\n" + + "\013environment\030\003 \001(\0132\027.google.protobuf.Str" + + "uct\032\263\001\n\020SlsaConfigSource\022\013\n\003uri\030\001 \001(\t\022N\n" + + "\006digest\030\002 \003(\0132>.grafeas.v1.SlsaProvenanc" + + "eZeroTwo.SlsaConfigSource.DigestEntry\022\023\n" + + "\013entry_point\030\003 \001(\t\032-\n\013DigestEntry\022\013\n\003key" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032\370\001\n\014SlsaMetada" + + "ta\022\033\n\023build_invocation_id\030\001 \001(\t\0224\n\020build" + + "_started_on\030\002 \001(\0132\032.google.protobuf.Time" + + "stamp\0225\n\021build_finished_on\030\003 \001(\0132\032.googl" + + "e.protobuf.Timestamp\022H\n\014completeness\030\004 \001" + + "(\01322.grafeas.v1.SlsaProvenanceZeroTwo.Sl" + + "saCompleteness\022\024\n\014reproducible\030\005 \001(\010\032N\n\020" + + "SlsaCompleteness\022\022\n\nparameters\030\001 \001(\010\022\023\n\013" + + "environment\030\002 \001(\010\022\021\n\tmaterials\030\003 \001(\010Bm\n\r" + + "io.grafeas.v1B\032SlsaProvenanceZeroTwoProt" + + "oP\001Z8google.golang.org/genproto/googleap" + + "is/grafeas/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor, + new java.lang.String[] { "Builder", "BuildType", "Invocation", "BuildConfig", "Metadata", "Materials", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor, + new java.lang.String[] { "Id", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor, + new java.lang.String[] { "Uri", "Digest", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(2); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor, + new java.lang.String[] { "ConfigSource", "Parameters", "Environment", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(3); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor, + new java.lang.String[] { "Uri", "Digest", "EntryPoint", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(4); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor, + new java.lang.String[] { "BuildInvocationId", "BuildStartedOn", "BuildFinishedOn", "Completeness", "Reproducible", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(5); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor, + new java.lang.String[] { "Parameters", "Environment", "Materials", }); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java new file mode 100644 index 000000000000..17dcda68fad0 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java @@ -0,0 +1,1709 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Source describes the location of the source used for the build.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Source} + */ +public final class Source extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Source) + SourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use Source.newBuilder() to construct. + private Source(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Source() { + artifactStorageSourceUri_ = ""; + additionalContexts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Source(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetFileHashes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Source.class, io.grafeas.v1.Source.Builder.class); + } + + public static final int ARTIFACT_STORAGE_SOURCE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object artifactStorageSourceUri_ = ""; + /** + *
+   * If provided, the input binary artifacts for the build came from this
+   * location.
+   * 
+ * + * string artifact_storage_source_uri = 1; + * @return The artifactStorageSourceUri. + */ + @java.lang.Override + public java.lang.String getArtifactStorageSourceUri() { + java.lang.Object ref = artifactStorageSourceUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactStorageSourceUri_ = s; + return s; + } + } + /** + *
+   * If provided, the input binary artifacts for the build came from this
+   * location.
+   * 
+ * + * string artifact_storage_source_uri = 1; + * @return The bytes for artifactStorageSourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getArtifactStorageSourceUriBytes() { + java.lang.Object ref = artifactStorageSourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + artifactStorageSourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_HASHES_FIELD_NUMBER = 2; + private static final class FileHashesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, io.grafeas.v1.FileHashes> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_FileHashesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + io.grafeas.v1.FileHashes.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, io.grafeas.v1.FileHashes> fileHashes_; + private com.google.protobuf.MapField + internalGetFileHashes() { + if (fileHashes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FileHashesDefaultEntryHolder.defaultEntry); + } + return fileHashes_; + } + public int getFileHashesCount() { + return internalGetFileHashes().getMap().size(); + } + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public boolean containsFileHashes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetFileHashes().getMap().containsKey(key); + } + /** + * Use {@link #getFileHashesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFileHashes() { + return getFileHashesMap(); + } + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public java.util.Map getFileHashesMap() { + return internalGetFileHashes().getMap(); + } + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public /* nullable */ +io.grafeas.v1.FileHashes getFileHashesOrDefault( + java.lang.String key, + /* nullable */ +io.grafeas.v1.FileHashes defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetFileHashes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public io.grafeas.v1.FileHashes getFileHashesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetFileHashes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CONTEXT_FIELD_NUMBER = 3; + private io.grafeas.v1.SourceContext context_; + /** + *
+   * If provided, the source code used for the build came from this location.
+   * 
+ * + * .grafeas.v1.SourceContext context = 3; + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + *
+   * If provided, the source code used for the build came from this location.
+   * 
+ * + * .grafeas.v1.SourceContext context = 3; + * @return The context. + */ + @java.lang.Override + public io.grafeas.v1.SourceContext getContext() { + return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_; + } + /** + *
+   * If provided, the source code used for the build came from this location.
+   * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + @java.lang.Override + public io.grafeas.v1.SourceContextOrBuilder getContextOrBuilder() { + return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_; + } + + public static final int ADDITIONAL_CONTEXTS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List additionalContexts_; + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + @java.lang.Override + public java.util.List getAdditionalContextsList() { + return additionalContexts_; + } + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + @java.lang.Override + public java.util.List + getAdditionalContextsOrBuilderList() { + return additionalContexts_; + } + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + @java.lang.Override + public int getAdditionalContextsCount() { + return additionalContexts_.size(); + } + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + @java.lang.Override + public io.grafeas.v1.SourceContext getAdditionalContexts(int index) { + return additionalContexts_.get(index); + } + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + @java.lang.Override + public io.grafeas.v1.SourceContextOrBuilder getAdditionalContextsOrBuilder( + int index) { + return additionalContexts_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorageSourceUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, artifactStorageSourceUri_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetFileHashes(), + FileHashesDefaultEntryHolder.defaultEntry, + 2); + if (context_ != null) { + output.writeMessage(3, getContext()); + } + for (int i = 0; i < additionalContexts_.size(); i++) { + output.writeMessage(4, additionalContexts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorageSourceUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, artifactStorageSourceUri_); + } + for (java.util.Map.Entry entry + : internalGetFileHashes().getMap().entrySet()) { + com.google.protobuf.MapEntry + fileHashes__ = FileHashesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, fileHashes__); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getContext()); + } + for (int i = 0; i < additionalContexts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, additionalContexts_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Source)) { + return super.equals(obj); + } + io.grafeas.v1.Source other = (io.grafeas.v1.Source) obj; + + if (!getArtifactStorageSourceUri() + .equals(other.getArtifactStorageSourceUri())) return false; + if (!internalGetFileHashes().equals( + other.internalGetFileHashes())) return false; + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (!getAdditionalContextsList() + .equals(other.getAdditionalContextsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ARTIFACT_STORAGE_SOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getArtifactStorageSourceUri().hashCode(); + if (!internalGetFileHashes().getMap().isEmpty()) { + hash = (37 * hash) + FILE_HASHES_FIELD_NUMBER; + hash = (53 * hash) + internalGetFileHashes().hashCode(); + } + if (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + if (getAdditionalContextsCount() > 0) { + hash = (37 * hash) + ADDITIONAL_CONTEXTS_FIELD_NUMBER; + hash = (53 * hash) + getAdditionalContextsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Source parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Source parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Source parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Source parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Source parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Source parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Source parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Source parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Source parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Source parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Source parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Source parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Source prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Source describes the location of the source used for the build.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Source} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Source) + io.grafeas.v1.SourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetFileHashes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableFileHashes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Source.class, io.grafeas.v1.Source.Builder.class); + } + + // Construct using io.grafeas.v1.Source.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + artifactStorageSourceUri_ = ""; + internalGetMutableFileHashes().clear(); + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + if (additionalContextsBuilder_ == null) { + additionalContexts_ = java.util.Collections.emptyList(); + } else { + additionalContexts_ = null; + additionalContextsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Source getDefaultInstanceForType() { + return io.grafeas.v1.Source.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Source build() { + io.grafeas.v1.Source result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Source buildPartial() { + io.grafeas.v1.Source result = new io.grafeas.v1.Source(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.Source result) { + if (additionalContextsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + additionalContexts_ = java.util.Collections.unmodifiableList(additionalContexts_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.additionalContexts_ = additionalContexts_; + } else { + result.additionalContexts_ = additionalContextsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.Source result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.artifactStorageSourceUri_ = artifactStorageSourceUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fileHashes_ = internalGetFileHashes(); + result.fileHashes_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.context_ = contextBuilder_ == null + ? context_ + : contextBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Source) { + return mergeFrom((io.grafeas.v1.Source)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Source other) { + if (other == io.grafeas.v1.Source.getDefaultInstance()) return this; + if (!other.getArtifactStorageSourceUri().isEmpty()) { + artifactStorageSourceUri_ = other.artifactStorageSourceUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableFileHashes().mergeFrom( + other.internalGetFileHashes()); + bitField0_ |= 0x00000002; + if (other.hasContext()) { + mergeContext(other.getContext()); + } + if (additionalContextsBuilder_ == null) { + if (!other.additionalContexts_.isEmpty()) { + if (additionalContexts_.isEmpty()) { + additionalContexts_ = other.additionalContexts_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureAdditionalContextsIsMutable(); + additionalContexts_.addAll(other.additionalContexts_); + } + onChanged(); + } + } else { + if (!other.additionalContexts_.isEmpty()) { + if (additionalContextsBuilder_.isEmpty()) { + additionalContextsBuilder_.dispose(); + additionalContextsBuilder_ = null; + additionalContexts_ = other.additionalContexts_; + bitField0_ = (bitField0_ & ~0x00000008); + additionalContextsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAdditionalContextsFieldBuilder() : null; + } else { + additionalContextsBuilder_.addAllMessages(other.additionalContexts_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + artifactStorageSourceUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + fileHashes__ = input.readMessage( + FileHashesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableFileHashes().getMutableMap().put( + fileHashes__.getKey(), fileHashes__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getContextFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + io.grafeas.v1.SourceContext m = + input.readMessage( + io.grafeas.v1.SourceContext.parser(), + extensionRegistry); + if (additionalContextsBuilder_ == null) { + ensureAdditionalContextsIsMutable(); + additionalContexts_.add(m); + } else { + additionalContextsBuilder_.addMessage(m); + } + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object artifactStorageSourceUri_ = ""; + /** + *
+     * If provided, the input binary artifacts for the build came from this
+     * location.
+     * 
+ * + * string artifact_storage_source_uri = 1; + * @return The artifactStorageSourceUri. + */ + public java.lang.String getArtifactStorageSourceUri() { + java.lang.Object ref = artifactStorageSourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactStorageSourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * If provided, the input binary artifacts for the build came from this
+     * location.
+     * 
+ * + * string artifact_storage_source_uri = 1; + * @return The bytes for artifactStorageSourceUri. + */ + public com.google.protobuf.ByteString + getArtifactStorageSourceUriBytes() { + java.lang.Object ref = artifactStorageSourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + artifactStorageSourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * If provided, the input binary artifacts for the build came from this
+     * location.
+     * 
+ * + * string artifact_storage_source_uri = 1; + * @param value The artifactStorageSourceUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactStorageSourceUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + artifactStorageSourceUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * If provided, the input binary artifacts for the build came from this
+     * location.
+     * 
+ * + * string artifact_storage_source_uri = 1; + * @return This builder for chaining. + */ + public Builder clearArtifactStorageSourceUri() { + artifactStorageSourceUri_ = getDefaultInstance().getArtifactStorageSourceUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * If provided, the input binary artifacts for the build came from this
+     * location.
+     * 
+ * + * string artifact_storage_source_uri = 1; + * @param value The bytes for artifactStorageSourceUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactStorageSourceUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + artifactStorageSourceUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, io.grafeas.v1.FileHashes> fileHashes_; + private com.google.protobuf.MapField + internalGetFileHashes() { + if (fileHashes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FileHashesDefaultEntryHolder.defaultEntry); + } + return fileHashes_; + } + private com.google.protobuf.MapField + internalGetMutableFileHashes() { + if (fileHashes_ == null) { + fileHashes_ = com.google.protobuf.MapField.newMapField( + FileHashesDefaultEntryHolder.defaultEntry); + } + if (!fileHashes_.isMutable()) { + fileHashes_ = fileHashes_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return fileHashes_; + } + public int getFileHashesCount() { + return internalGetFileHashes().getMap().size(); + } + /** + *
+     * Hash(es) of the build source, which can be used to verify that the original
+     * source integrity was maintained in the build.
+     * The keys to this map are file paths used as build source and the values
+     * contain the hash values for those files.
+     * If the build source came in a single package such as a gzipped tarfile
+     * (.tar.gz), the FileHash will be for the single path to that file.
+     * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public boolean containsFileHashes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetFileHashes().getMap().containsKey(key); + } + /** + * Use {@link #getFileHashesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFileHashes() { + return getFileHashesMap(); + } + /** + *
+     * Hash(es) of the build source, which can be used to verify that the original
+     * source integrity was maintained in the build.
+     * The keys to this map are file paths used as build source and the values
+     * contain the hash values for those files.
+     * If the build source came in a single package such as a gzipped tarfile
+     * (.tar.gz), the FileHash will be for the single path to that file.
+     * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public java.util.Map getFileHashesMap() { + return internalGetFileHashes().getMap(); + } + /** + *
+     * Hash(es) of the build source, which can be used to verify that the original
+     * source integrity was maintained in the build.
+     * The keys to this map are file paths used as build source and the values
+     * contain the hash values for those files.
+     * If the build source came in a single package such as a gzipped tarfile
+     * (.tar.gz), the FileHash will be for the single path to that file.
+     * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public /* nullable */ +io.grafeas.v1.FileHashes getFileHashesOrDefault( + java.lang.String key, + /* nullable */ +io.grafeas.v1.FileHashes defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetFileHashes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Hash(es) of the build source, which can be used to verify that the original
+     * source integrity was maintained in the build.
+     * The keys to this map are file paths used as build source and the values
+     * contain the hash values for those files.
+     * If the build source came in a single package such as a gzipped tarfile
+     * (.tar.gz), the FileHash will be for the single path to that file.
+     * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public io.grafeas.v1.FileHashes getFileHashesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetFileHashes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearFileHashes() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableFileHashes().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Hash(es) of the build source, which can be used to verify that the original
+     * source integrity was maintained in the build.
+     * The keys to this map are file paths used as build source and the values
+     * contain the hash values for those files.
+     * If the build source came in a single package such as a gzipped tarfile
+     * (.tar.gz), the FileHash will be for the single path to that file.
+     * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + public Builder removeFileHashes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableFileHashes().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableFileHashes() { + bitField0_ |= 0x00000002; + return internalGetMutableFileHashes().getMutableMap(); + } + /** + *
+     * Hash(es) of the build source, which can be used to verify that the original
+     * source integrity was maintained in the build.
+     * The keys to this map are file paths used as build source and the values
+     * contain the hash values for those files.
+     * If the build source came in a single package such as a gzipped tarfile
+     * (.tar.gz), the FileHash will be for the single path to that file.
+     * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + public Builder putFileHashes( + java.lang.String key, + io.grafeas.v1.FileHashes value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableFileHashes().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Hash(es) of the build source, which can be used to verify that the original
+     * source integrity was maintained in the build.
+     * The keys to this map are file paths used as build source and the values
+     * contain the hash values for those files.
+     * If the build source came in a single package such as a gzipped tarfile
+     * (.tar.gz), the FileHash will be for the single path to that file.
+     * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + public Builder putAllFileHashes( + java.util.Map values) { + internalGetMutableFileHashes().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private io.grafeas.v1.SourceContext context_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> contextBuilder_; + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + * @return Whether the context field is set. + */ + public boolean hasContext() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + * @return The context. + */ + public io.grafeas.v1.SourceContext getContext() { + if (contextBuilder_ == null) { + return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_; + } else { + return contextBuilder_.getMessage(); + } + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + public Builder setContext(io.grafeas.v1.SourceContext value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + } else { + contextBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + public Builder setContext( + io.grafeas.v1.SourceContext.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + public Builder mergeContext(io.grafeas.v1.SourceContext value) { + if (contextBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + context_ != null && + context_ != io.grafeas.v1.SourceContext.getDefaultInstance()) { + getContextBuilder().mergeFrom(value); + } else { + context_ = value; + } + } else { + contextBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + public Builder clearContext() { + bitField0_ = (bitField0_ & ~0x00000004); + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + public io.grafeas.v1.SourceContext.Builder getContextBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + public io.grafeas.v1.SourceContextOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + io.grafeas.v1.SourceContext.getDefaultInstance() : context_; + } + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> + getContextFieldBuilder() { + if (contextBuilder_ == null) { + contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder>( + getContext(), + getParentForChildren(), + isClean()); + context_ = null; + } + return contextBuilder_; + } + + private java.util.List additionalContexts_ = + java.util.Collections.emptyList(); + private void ensureAdditionalContextsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + additionalContexts_ = new java.util.ArrayList(additionalContexts_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> additionalContextsBuilder_; + + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public java.util.List getAdditionalContextsList() { + if (additionalContextsBuilder_ == null) { + return java.util.Collections.unmodifiableList(additionalContexts_); + } else { + return additionalContextsBuilder_.getMessageList(); + } + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public int getAdditionalContextsCount() { + if (additionalContextsBuilder_ == null) { + return additionalContexts_.size(); + } else { + return additionalContextsBuilder_.getCount(); + } + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public io.grafeas.v1.SourceContext getAdditionalContexts(int index) { + if (additionalContextsBuilder_ == null) { + return additionalContexts_.get(index); + } else { + return additionalContextsBuilder_.getMessage(index); + } + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder setAdditionalContexts( + int index, io.grafeas.v1.SourceContext value) { + if (additionalContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalContextsIsMutable(); + additionalContexts_.set(index, value); + onChanged(); + } else { + additionalContextsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder setAdditionalContexts( + int index, io.grafeas.v1.SourceContext.Builder builderForValue) { + if (additionalContextsBuilder_ == null) { + ensureAdditionalContextsIsMutable(); + additionalContexts_.set(index, builderForValue.build()); + onChanged(); + } else { + additionalContextsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder addAdditionalContexts(io.grafeas.v1.SourceContext value) { + if (additionalContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalContextsIsMutable(); + additionalContexts_.add(value); + onChanged(); + } else { + additionalContextsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder addAdditionalContexts( + int index, io.grafeas.v1.SourceContext value) { + if (additionalContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalContextsIsMutable(); + additionalContexts_.add(index, value); + onChanged(); + } else { + additionalContextsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder addAdditionalContexts( + io.grafeas.v1.SourceContext.Builder builderForValue) { + if (additionalContextsBuilder_ == null) { + ensureAdditionalContextsIsMutable(); + additionalContexts_.add(builderForValue.build()); + onChanged(); + } else { + additionalContextsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder addAdditionalContexts( + int index, io.grafeas.v1.SourceContext.Builder builderForValue) { + if (additionalContextsBuilder_ == null) { + ensureAdditionalContextsIsMutable(); + additionalContexts_.add(index, builderForValue.build()); + onChanged(); + } else { + additionalContextsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder addAllAdditionalContexts( + java.lang.Iterable values) { + if (additionalContextsBuilder_ == null) { + ensureAdditionalContextsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, additionalContexts_); + onChanged(); + } else { + additionalContextsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder clearAdditionalContexts() { + if (additionalContextsBuilder_ == null) { + additionalContexts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + additionalContextsBuilder_.clear(); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder removeAdditionalContexts(int index) { + if (additionalContextsBuilder_ == null) { + ensureAdditionalContextsIsMutable(); + additionalContexts_.remove(index); + onChanged(); + } else { + additionalContextsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public io.grafeas.v1.SourceContext.Builder getAdditionalContextsBuilder( + int index) { + return getAdditionalContextsFieldBuilder().getBuilder(index); + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public io.grafeas.v1.SourceContextOrBuilder getAdditionalContextsOrBuilder( + int index) { + if (additionalContextsBuilder_ == null) { + return additionalContexts_.get(index); } else { + return additionalContextsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public java.util.List + getAdditionalContextsOrBuilderList() { + if (additionalContextsBuilder_ != null) { + return additionalContextsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(additionalContexts_); + } + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public io.grafeas.v1.SourceContext.Builder addAdditionalContextsBuilder() { + return getAdditionalContextsFieldBuilder().addBuilder( + io.grafeas.v1.SourceContext.getDefaultInstance()); + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public io.grafeas.v1.SourceContext.Builder addAdditionalContextsBuilder( + int index) { + return getAdditionalContextsFieldBuilder().addBuilder( + index, io.grafeas.v1.SourceContext.getDefaultInstance()); + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public java.util.List + getAdditionalContextsBuilderList() { + return getAdditionalContextsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> + getAdditionalContextsFieldBuilder() { + if (additionalContextsBuilder_ == null) { + additionalContextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder>( + additionalContexts_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + additionalContexts_ = null; + } + return additionalContextsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Source) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Source) + private static final io.grafeas.v1.Source DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Source(); + } + + public static io.grafeas.v1.Source getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Source parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Source getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java new file mode 100644 index 000000000000..bb5845b66bc9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java @@ -0,0 +1,1583 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * A SourceContext is a reference to a tree of files. A SourceContext together
+ * with a path point to a unique revision of a single file or directory.
+ * 
+ * + * Protobuf type {@code grafeas.v1.SourceContext} + */ +public final class SourceContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SourceContext) + SourceContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use SourceContext.newBuilder() to construct. + private SourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SourceContext() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SourceContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SourceContext.class, io.grafeas.v1.SourceContext.Builder.class); + } + + private int contextCase_ = 0; + private java.lang.Object context_; + public enum ContextCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLOUD_REPO(1), + GERRIT(2), + GIT(3), + CONTEXT_NOT_SET(0); + private final int value; + private ContextCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContextCase valueOf(int value) { + return forNumber(value); + } + + public static ContextCase forNumber(int value) { + switch (value) { + case 1: return CLOUD_REPO; + case 2: return GERRIT; + case 3: return GIT; + case 0: return CONTEXT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ContextCase + getContextCase() { + return ContextCase.forNumber( + contextCase_); + } + + public static final int CLOUD_REPO_FIELD_NUMBER = 1; + /** + *
+   * A SourceContext referring to a revision in a Google Cloud Source Repo.
+   * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + * @return Whether the cloudRepo field is set. + */ + @java.lang.Override + public boolean hasCloudRepo() { + return contextCase_ == 1; + } + /** + *
+   * A SourceContext referring to a revision in a Google Cloud Source Repo.
+   * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + * @return The cloudRepo. + */ + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContext getCloudRepo() { + if (contextCase_ == 1) { + return (io.grafeas.v1.CloudRepoSourceContext) context_; + } + return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); + } + /** + *
+   * A SourceContext referring to a revision in a Google Cloud Source Repo.
+   * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder() { + if (contextCase_ == 1) { + return (io.grafeas.v1.CloudRepoSourceContext) context_; + } + return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); + } + + public static final int GERRIT_FIELD_NUMBER = 2; + /** + *
+   * A SourceContext referring to a Gerrit project.
+   * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + * @return Whether the gerrit field is set. + */ + @java.lang.Override + public boolean hasGerrit() { + return contextCase_ == 2; + } + /** + *
+   * A SourceContext referring to a Gerrit project.
+   * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + * @return The gerrit. + */ + @java.lang.Override + public io.grafeas.v1.GerritSourceContext getGerrit() { + if (contextCase_ == 2) { + return (io.grafeas.v1.GerritSourceContext) context_; + } + return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); + } + /** + *
+   * A SourceContext referring to a Gerrit project.
+   * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + @java.lang.Override + public io.grafeas.v1.GerritSourceContextOrBuilder getGerritOrBuilder() { + if (contextCase_ == 2) { + return (io.grafeas.v1.GerritSourceContext) context_; + } + return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); + } + + public static final int GIT_FIELD_NUMBER = 3; + /** + *
+   * A SourceContext referring to any third party Git repo (e.g., GitHub).
+   * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + * @return Whether the git field is set. + */ + @java.lang.Override + public boolean hasGit() { + return contextCase_ == 3; + } + /** + *
+   * A SourceContext referring to any third party Git repo (e.g., GitHub).
+   * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + * @return The git. + */ + @java.lang.Override + public io.grafeas.v1.GitSourceContext getGit() { + if (contextCase_ == 3) { + return (io.grafeas.v1.GitSourceContext) context_; + } + return io.grafeas.v1.GitSourceContext.getDefaultInstance(); + } + /** + *
+   * A SourceContext referring to any third party Git repo (e.g., GitHub).
+   * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + @java.lang.Override + public io.grafeas.v1.GitSourceContextOrBuilder getGitOrBuilder() { + if (contextCase_ == 3) { + return (io.grafeas.v1.GitSourceContext) context_; + } + return io.grafeas.v1.GitSourceContext.getDefaultInstance(); + } + + public static final int LABELS_FIELD_NUMBER = 4; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (contextCase_ == 1) { + output.writeMessage(1, (io.grafeas.v1.CloudRepoSourceContext) context_); + } + if (contextCase_ == 2) { + output.writeMessage(2, (io.grafeas.v1.GerritSourceContext) context_); + } + if (contextCase_ == 3) { + output.writeMessage(3, (io.grafeas.v1.GitSourceContext) context_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 4); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (contextCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (io.grafeas.v1.CloudRepoSourceContext) context_); + } + if (contextCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (io.grafeas.v1.GerritSourceContext) context_); + } + if (contextCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (io.grafeas.v1.GitSourceContext) context_); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, labels__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SourceContext)) { + return super.equals(obj); + } + io.grafeas.v1.SourceContext other = (io.grafeas.v1.SourceContext) obj; + + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!getContextCase().equals(other.getContextCase())) return false; + switch (contextCase_) { + case 1: + if (!getCloudRepo() + .equals(other.getCloudRepo())) return false; + break; + case 2: + if (!getGerrit() + .equals(other.getGerrit())) return false; + break; + case 3: + if (!getGit() + .equals(other.getGit())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + switch (contextCase_) { + case 1: + hash = (37 * hash) + CLOUD_REPO_FIELD_NUMBER; + hash = (53 * hash) + getCloudRepo().hashCode(); + break; + case 2: + hash = (37 * hash) + GERRIT_FIELD_NUMBER; + hash = (53 * hash) + getGerrit().hashCode(); + break; + case 3: + hash = (37 * hash) + GIT_FIELD_NUMBER; + hash = (53 * hash) + getGit().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SourceContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SourceContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SourceContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SourceContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SourceContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SourceContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SourceContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SourceContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SourceContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SourceContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SourceContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SourceContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SourceContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A SourceContext is a reference to a tree of files. A SourceContext together
+   * with a path point to a unique revision of a single file or directory.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SourceContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SourceContext) + io.grafeas.v1.SourceContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SourceContext.class, io.grafeas.v1.SourceContext.Builder.class); + } + + // Construct using io.grafeas.v1.SourceContext.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (cloudRepoBuilder_ != null) { + cloudRepoBuilder_.clear(); + } + if (gerritBuilder_ != null) { + gerritBuilder_.clear(); + } + if (gitBuilder_ != null) { + gitBuilder_.clear(); + } + internalGetMutableLabels().clear(); + contextCase_ = 0; + context_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SourceContext getDefaultInstanceForType() { + return io.grafeas.v1.SourceContext.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SourceContext build() { + io.grafeas.v1.SourceContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SourceContext buildPartial() { + io.grafeas.v1.SourceContext result = new io.grafeas.v1.SourceContext(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SourceContext result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + } + + private void buildPartialOneofs(io.grafeas.v1.SourceContext result) { + result.contextCase_ = contextCase_; + result.context_ = this.context_; + if (contextCase_ == 1 && + cloudRepoBuilder_ != null) { + result.context_ = cloudRepoBuilder_.build(); + } + if (contextCase_ == 2 && + gerritBuilder_ != null) { + result.context_ = gerritBuilder_.build(); + } + if (contextCase_ == 3 && + gitBuilder_ != null) { + result.context_ = gitBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SourceContext) { + return mergeFrom((io.grafeas.v1.SourceContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SourceContext other) { + if (other == io.grafeas.v1.SourceContext.getDefaultInstance()) return this; + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + bitField0_ |= 0x00000008; + switch (other.getContextCase()) { + case CLOUD_REPO: { + mergeCloudRepo(other.getCloudRepo()); + break; + } + case GERRIT: { + mergeGerrit(other.getGerrit()); + break; + } + case GIT: { + mergeGit(other.getGit()); + break; + } + case CONTEXT_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCloudRepoFieldBuilder().getBuilder(), + extensionRegistry); + contextCase_ = 1; + break; + } // case 10 + case 18: { + input.readMessage( + getGerritFieldBuilder().getBuilder(), + extensionRegistry); + contextCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + getGitFieldBuilder().getBuilder(), + extensionRegistry); + contextCase_ = 3; + break; + } // case 26 + case 34: { + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLabels().getMutableMap().put( + labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int contextCase_ = 0; + private java.lang.Object context_; + public ContextCase + getContextCase() { + return ContextCase.forNumber( + contextCase_); + } + + public Builder clearContext() { + contextCase_ = 0; + context_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CloudRepoSourceContext, io.grafeas.v1.CloudRepoSourceContext.Builder, io.grafeas.v1.CloudRepoSourceContextOrBuilder> cloudRepoBuilder_; + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + * @return Whether the cloudRepo field is set. + */ + @java.lang.Override + public boolean hasCloudRepo() { + return contextCase_ == 1; + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + * @return The cloudRepo. + */ + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContext getCloudRepo() { + if (cloudRepoBuilder_ == null) { + if (contextCase_ == 1) { + return (io.grafeas.v1.CloudRepoSourceContext) context_; + } + return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); + } else { + if (contextCase_ == 1) { + return cloudRepoBuilder_.getMessage(); + } + return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); + } + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + public Builder setCloudRepo(io.grafeas.v1.CloudRepoSourceContext value) { + if (cloudRepoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + cloudRepoBuilder_.setMessage(value); + } + contextCase_ = 1; + return this; + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + public Builder setCloudRepo( + io.grafeas.v1.CloudRepoSourceContext.Builder builderForValue) { + if (cloudRepoBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + cloudRepoBuilder_.setMessage(builderForValue.build()); + } + contextCase_ = 1; + return this; + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + public Builder mergeCloudRepo(io.grafeas.v1.CloudRepoSourceContext value) { + if (cloudRepoBuilder_ == null) { + if (contextCase_ == 1 && + context_ != io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance()) { + context_ = io.grafeas.v1.CloudRepoSourceContext.newBuilder((io.grafeas.v1.CloudRepoSourceContext) context_) + .mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + if (contextCase_ == 1) { + cloudRepoBuilder_.mergeFrom(value); + } else { + cloudRepoBuilder_.setMessage(value); + } + } + contextCase_ = 1; + return this; + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + public Builder clearCloudRepo() { + if (cloudRepoBuilder_ == null) { + if (contextCase_ == 1) { + contextCase_ = 0; + context_ = null; + onChanged(); + } + } else { + if (contextCase_ == 1) { + contextCase_ = 0; + context_ = null; + } + cloudRepoBuilder_.clear(); + } + return this; + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + public io.grafeas.v1.CloudRepoSourceContext.Builder getCloudRepoBuilder() { + return getCloudRepoFieldBuilder().getBuilder(); + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder() { + if ((contextCase_ == 1) && (cloudRepoBuilder_ != null)) { + return cloudRepoBuilder_.getMessageOrBuilder(); + } else { + if (contextCase_ == 1) { + return (io.grafeas.v1.CloudRepoSourceContext) context_; + } + return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); + } + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CloudRepoSourceContext, io.grafeas.v1.CloudRepoSourceContext.Builder, io.grafeas.v1.CloudRepoSourceContextOrBuilder> + getCloudRepoFieldBuilder() { + if (cloudRepoBuilder_ == null) { + if (!(contextCase_ == 1)) { + context_ = io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); + } + cloudRepoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CloudRepoSourceContext, io.grafeas.v1.CloudRepoSourceContext.Builder, io.grafeas.v1.CloudRepoSourceContextOrBuilder>( + (io.grafeas.v1.CloudRepoSourceContext) context_, + getParentForChildren(), + isClean()); + context_ = null; + } + contextCase_ = 1; + onChanged(); + return cloudRepoBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.GerritSourceContext, io.grafeas.v1.GerritSourceContext.Builder, io.grafeas.v1.GerritSourceContextOrBuilder> gerritBuilder_; + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + * @return Whether the gerrit field is set. + */ + @java.lang.Override + public boolean hasGerrit() { + return contextCase_ == 2; + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + * @return The gerrit. + */ + @java.lang.Override + public io.grafeas.v1.GerritSourceContext getGerrit() { + if (gerritBuilder_ == null) { + if (contextCase_ == 2) { + return (io.grafeas.v1.GerritSourceContext) context_; + } + return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); + } else { + if (contextCase_ == 2) { + return gerritBuilder_.getMessage(); + } + return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); + } + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + public Builder setGerrit(io.grafeas.v1.GerritSourceContext value) { + if (gerritBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + gerritBuilder_.setMessage(value); + } + contextCase_ = 2; + return this; + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + public Builder setGerrit( + io.grafeas.v1.GerritSourceContext.Builder builderForValue) { + if (gerritBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + gerritBuilder_.setMessage(builderForValue.build()); + } + contextCase_ = 2; + return this; + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + public Builder mergeGerrit(io.grafeas.v1.GerritSourceContext value) { + if (gerritBuilder_ == null) { + if (contextCase_ == 2 && + context_ != io.grafeas.v1.GerritSourceContext.getDefaultInstance()) { + context_ = io.grafeas.v1.GerritSourceContext.newBuilder((io.grafeas.v1.GerritSourceContext) context_) + .mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + if (contextCase_ == 2) { + gerritBuilder_.mergeFrom(value); + } else { + gerritBuilder_.setMessage(value); + } + } + contextCase_ = 2; + return this; + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + public Builder clearGerrit() { + if (gerritBuilder_ == null) { + if (contextCase_ == 2) { + contextCase_ = 0; + context_ = null; + onChanged(); + } + } else { + if (contextCase_ == 2) { + contextCase_ = 0; + context_ = null; + } + gerritBuilder_.clear(); + } + return this; + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + public io.grafeas.v1.GerritSourceContext.Builder getGerritBuilder() { + return getGerritFieldBuilder().getBuilder(); + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + @java.lang.Override + public io.grafeas.v1.GerritSourceContextOrBuilder getGerritOrBuilder() { + if ((contextCase_ == 2) && (gerritBuilder_ != null)) { + return gerritBuilder_.getMessageOrBuilder(); + } else { + if (contextCase_ == 2) { + return (io.grafeas.v1.GerritSourceContext) context_; + } + return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); + } + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.GerritSourceContext, io.grafeas.v1.GerritSourceContext.Builder, io.grafeas.v1.GerritSourceContextOrBuilder> + getGerritFieldBuilder() { + if (gerritBuilder_ == null) { + if (!(contextCase_ == 2)) { + context_ = io.grafeas.v1.GerritSourceContext.getDefaultInstance(); + } + gerritBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.GerritSourceContext, io.grafeas.v1.GerritSourceContext.Builder, io.grafeas.v1.GerritSourceContextOrBuilder>( + (io.grafeas.v1.GerritSourceContext) context_, + getParentForChildren(), + isClean()); + context_ = null; + } + contextCase_ = 2; + onChanged(); + return gerritBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.GitSourceContext, io.grafeas.v1.GitSourceContext.Builder, io.grafeas.v1.GitSourceContextOrBuilder> gitBuilder_; + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + * @return Whether the git field is set. + */ + @java.lang.Override + public boolean hasGit() { + return contextCase_ == 3; + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + * @return The git. + */ + @java.lang.Override + public io.grafeas.v1.GitSourceContext getGit() { + if (gitBuilder_ == null) { + if (contextCase_ == 3) { + return (io.grafeas.v1.GitSourceContext) context_; + } + return io.grafeas.v1.GitSourceContext.getDefaultInstance(); + } else { + if (contextCase_ == 3) { + return gitBuilder_.getMessage(); + } + return io.grafeas.v1.GitSourceContext.getDefaultInstance(); + } + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + public Builder setGit(io.grafeas.v1.GitSourceContext value) { + if (gitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + gitBuilder_.setMessage(value); + } + contextCase_ = 3; + return this; + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + public Builder setGit( + io.grafeas.v1.GitSourceContext.Builder builderForValue) { + if (gitBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + gitBuilder_.setMessage(builderForValue.build()); + } + contextCase_ = 3; + return this; + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + public Builder mergeGit(io.grafeas.v1.GitSourceContext value) { + if (gitBuilder_ == null) { + if (contextCase_ == 3 && + context_ != io.grafeas.v1.GitSourceContext.getDefaultInstance()) { + context_ = io.grafeas.v1.GitSourceContext.newBuilder((io.grafeas.v1.GitSourceContext) context_) + .mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + if (contextCase_ == 3) { + gitBuilder_.mergeFrom(value); + } else { + gitBuilder_.setMessage(value); + } + } + contextCase_ = 3; + return this; + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + public Builder clearGit() { + if (gitBuilder_ == null) { + if (contextCase_ == 3) { + contextCase_ = 0; + context_ = null; + onChanged(); + } + } else { + if (contextCase_ == 3) { + contextCase_ = 0; + context_ = null; + } + gitBuilder_.clear(); + } + return this; + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + public io.grafeas.v1.GitSourceContext.Builder getGitBuilder() { + return getGitFieldBuilder().getBuilder(); + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + @java.lang.Override + public io.grafeas.v1.GitSourceContextOrBuilder getGitOrBuilder() { + if ((contextCase_ == 3) && (gitBuilder_ != null)) { + return gitBuilder_.getMessageOrBuilder(); + } else { + if (contextCase_ == 3) { + return (io.grafeas.v1.GitSourceContext) context_; + } + return io.grafeas.v1.GitSourceContext.getDefaultInstance(); + } + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.GitSourceContext, io.grafeas.v1.GitSourceContext.Builder, io.grafeas.v1.GitSourceContextOrBuilder> + getGitFieldBuilder() { + if (gitBuilder_ == null) { + if (!(contextCase_ == 3)) { + context_ = io.grafeas.v1.GitSourceContext.getDefaultInstance(); + } + gitBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.GitSourceContext, io.grafeas.v1.GitSourceContext.Builder, io.grafeas.v1.GitSourceContextOrBuilder>( + (io.grafeas.v1.GitSourceContext) context_, + getParentForChildren(), + isClean()); + context_ = null; + } + contextCase_ = 3; + onChanged(); + return gitBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * Labels with user defined metadata.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * Labels with user defined metadata.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * Labels with user defined metadata.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Labels with user defined metadata.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Labels with user defined metadata.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * Labels with user defined metadata.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableLabels().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + *
+     * Labels with user defined metadata.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000008; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SourceContext) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SourceContext) + private static final io.grafeas.v1.SourceContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SourceContext(); + } + + public static io.grafeas.v1.SourceContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SourceContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SourceContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java new file mode 100644 index 000000000000..3c735c2fd76a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java @@ -0,0 +1,146 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface SourceContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SourceContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A SourceContext referring to a revision in a Google Cloud Source Repo.
+   * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + * @return Whether the cloudRepo field is set. + */ + boolean hasCloudRepo(); + /** + *
+   * A SourceContext referring to a revision in a Google Cloud Source Repo.
+   * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + * @return The cloudRepo. + */ + io.grafeas.v1.CloudRepoSourceContext getCloudRepo(); + /** + *
+   * A SourceContext referring to a revision in a Google Cloud Source Repo.
+   * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + io.grafeas.v1.CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder(); + + /** + *
+   * A SourceContext referring to a Gerrit project.
+   * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + * @return Whether the gerrit field is set. + */ + boolean hasGerrit(); + /** + *
+   * A SourceContext referring to a Gerrit project.
+   * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + * @return The gerrit. + */ + io.grafeas.v1.GerritSourceContext getGerrit(); + /** + *
+   * A SourceContext referring to a Gerrit project.
+   * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + io.grafeas.v1.GerritSourceContextOrBuilder getGerritOrBuilder(); + + /** + *
+   * A SourceContext referring to any third party Git repo (e.g., GitHub).
+   * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + * @return Whether the git field is set. + */ + boolean hasGit(); + /** + *
+   * A SourceContext referring to any third party Git repo (e.g., GitHub).
+   * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + * @return The git. + */ + io.grafeas.v1.GitSourceContext getGit(); + /** + *
+   * A SourceContext referring to any third party Git repo (e.g., GitHub).
+   * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + io.grafeas.v1.GitSourceContextOrBuilder getGitOrBuilder(); + + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow( + java.lang.String key); + + public io.grafeas.v1.SourceContext.ContextCase getContextCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java new file mode 100644 index 000000000000..875eea1d4768 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java @@ -0,0 +1,196 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface SourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Source) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If provided, the input binary artifacts for the build came from this
+   * location.
+   * 
+ * + * string artifact_storage_source_uri = 1; + * @return The artifactStorageSourceUri. + */ + java.lang.String getArtifactStorageSourceUri(); + /** + *
+   * If provided, the input binary artifacts for the build came from this
+   * location.
+   * 
+ * + * string artifact_storage_source_uri = 1; + * @return The bytes for artifactStorageSourceUri. + */ + com.google.protobuf.ByteString + getArtifactStorageSourceUriBytes(); + + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + int getFileHashesCount(); + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + boolean containsFileHashes( + java.lang.String key); + /** + * Use {@link #getFileHashesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getFileHashes(); + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + java.util.Map + getFileHashesMap(); + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + /* nullable */ +io.grafeas.v1.FileHashes getFileHashesOrDefault( + java.lang.String key, + /* nullable */ +io.grafeas.v1.FileHashes defaultValue); + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + io.grafeas.v1.FileHashes getFileHashesOrThrow( + java.lang.String key); + + /** + *
+   * If provided, the source code used for the build came from this location.
+   * 
+ * + * .grafeas.v1.SourceContext context = 3; + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + *
+   * If provided, the source code used for the build came from this location.
+   * 
+ * + * .grafeas.v1.SourceContext context = 3; + * @return The context. + */ + io.grafeas.v1.SourceContext getContext(); + /** + *
+   * If provided, the source code used for the build came from this location.
+   * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + io.grafeas.v1.SourceContextOrBuilder getContextOrBuilder(); + + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + java.util.List + getAdditionalContextsList(); + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + io.grafeas.v1.SourceContext getAdditionalContexts(int index); + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + int getAdditionalContextsCount(); + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + java.util.List + getAdditionalContextsOrBuilderList(); + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + io.grafeas.v1.SourceContextOrBuilder getAdditionalContextsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java new file mode 100644 index 000000000000..b5d14fc26d97 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java @@ -0,0 +1,900 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_statement.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.Subject} + */ +public final class Subject extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Subject) + SubjectOrBuilder { +private static final long serialVersionUID = 0L; + // Use Subject.newBuilder() to construct. + private Subject(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Subject() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Subject(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Subject.class, io.grafeas.v1.Subject.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIGEST_FIELD_NUMBER = 2; + private static final class DigestDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_DigestEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetDigest(), + DigestDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (java.util.Map.Entry entry + : internalGetDigest().getMap().entrySet()) { + com.google.protobuf.MapEntry + digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, digest__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Subject)) { + return super.equals(obj); + } + io.grafeas.v1.Subject other = (io.grafeas.v1.Subject) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!internalGetDigest().equals( + other.internalGetDigest())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (!internalGetDigest().getMap().isEmpty()) { + hash = (37 * hash) + DIGEST_FIELD_NUMBER; + hash = (53 * hash) + internalGetDigest().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Subject parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Subject parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Subject parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Subject parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Subject parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Subject parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Subject parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Subject parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Subject parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Subject parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Subject parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Subject parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Subject prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.Subject} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Subject) + io.grafeas.v1.SubjectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Subject.class, io.grafeas.v1.Subject.Builder.class); + } + + // Construct using io.grafeas.v1.Subject.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + internalGetMutableDigest().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Subject getDefaultInstanceForType() { + return io.grafeas.v1.Subject.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Subject build() { + io.grafeas.v1.Subject result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Subject buildPartial() { + io.grafeas.v1.Subject result = new io.grafeas.v1.Subject(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Subject result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.digest_ = internalGetDigest(); + result.digest_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Subject) { + return mergeFrom((io.grafeas.v1.Subject)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Subject other) { + if (other == io.grafeas.v1.Subject.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableDigest().mergeFrom( + other.internalGetDigest()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + digest__ = input.readMessage( + DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableDigest().getMutableMap().put( + digest__.getKey(), digest__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + private com.google.protobuf.MapField + internalGetMutableDigest() { + if (digest_ == null) { + digest_ = com.google.protobuf.MapField.newMapField( + DigestDefaultEntryHolder.defaultEntry); + } + if (!digest_.isMutable()) { + digest_ = digest_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + *
+     * `"<ALGORITHM>": "<HEX_VALUE>"`
+     * Algorithms can be e.g. sha256, sha512
+     * See
+     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+     * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + *
+     * `"<ALGORITHM>": "<HEX_VALUE>"`
+     * Algorithms can be e.g. sha256, sha512
+     * See
+     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+     * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + *
+     * `"<ALGORITHM>": "<HEX_VALUE>"`
+     * Algorithms can be e.g. sha256, sha512
+     * See
+     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+     * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * `"<ALGORITHM>": "<HEX_VALUE>"`
+     * Algorithms can be e.g. sha256, sha512
+     * See
+     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+     * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearDigest() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableDigest().getMutableMap() + .clear(); + return this; + } + /** + *
+     * `"<ALGORITHM>": "<HEX_VALUE>"`
+     * Algorithms can be e.g. sha256, sha512
+     * See
+     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+     * 
+ * + * map<string, string> digest = 2; + */ + public Builder removeDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableDigest().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableDigest() { + bitField0_ |= 0x00000002; + return internalGetMutableDigest().getMutableMap(); + } + /** + *
+     * `"<ALGORITHM>": "<HEX_VALUE>"`
+     * Algorithms can be e.g. sha256, sha512
+     * See
+     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+     * 
+ * + * map<string, string> digest = 2; + */ + public Builder putDigest( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableDigest().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * `"<ALGORITHM>": "<HEX_VALUE>"`
+     * Algorithms can be e.g. sha256, sha512
+     * See
+     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+     * 
+ * + * map<string, string> digest = 2; + */ + public Builder putAllDigest( + java.util.Map values) { + internalGetMutableDigest().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Subject) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Subject) + private static final io.grafeas.v1.Subject DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Subject(); + } + + public static io.grafeas.v1.Subject getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Subject parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Subject getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java new file mode 100644 index 000000000000..b196d4c7afe9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java @@ -0,0 +1,90 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_statement.proto + +package io.grafeas.v1; + +public interface SubjectOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Subject) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + int getDigestCount(); + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + boolean containsDigest( + java.lang.String key); + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getDigest(); + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + java.util.Map + getDigestMap(); + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + java.lang.String getDigestOrThrow( + java.lang.String key); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java new file mode 100644 index 000000000000..3f5c80409510 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to update a note.
+ * 
+ * + * Protobuf type {@code grafeas.v1.UpdateNoteRequest} + */ +public final class UpdateNoteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.UpdateNoteRequest) + UpdateNoteRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateNoteRequest.newBuilder() to construct. + private UpdateNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateNoteRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateNoteRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpdateNoteRequest.class, io.grafeas.v1.UpdateNoteRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTE_FIELD_NUMBER = 2; + private io.grafeas.v1.Note note_; + /** + *
+   * The updated note.
+   * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the note field is set. + */ + @java.lang.Override + public boolean hasNote() { + return note_ != null; + } + /** + *
+   * The updated note.
+   * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The note. + */ + @java.lang.Override + public io.grafeas.v1.Note getNote() { + return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; + } + /** + *
+   * The updated note.
+   * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { + return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (note_ != null) { + output.writeMessage(2, getNote()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (note_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getNote()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.UpdateNoteRequest)) { + return super.equals(obj); + } + io.grafeas.v1.UpdateNoteRequest other = (io.grafeas.v1.UpdateNoteRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasNote() != other.hasNote()) return false; + if (hasNote()) { + if (!getNote() + .equals(other.getNote())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasNote()) { + hash = (37 * hash) + NOTE_FIELD_NUMBER; + hash = (53 * hash) + getNote().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpdateNoteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpdateNoteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.UpdateNoteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to update a note.
+   * 
+ * + * Protobuf type {@code grafeas.v1.UpdateNoteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.UpdateNoteRequest) + io.grafeas.v1.UpdateNoteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpdateNoteRequest.class, io.grafeas.v1.UpdateNoteRequest.Builder.class); + } + + // Construct using io.grafeas.v1.UpdateNoteRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + note_ = null; + if (noteBuilder_ != null) { + noteBuilder_.dispose(); + noteBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.UpdateNoteRequest getDefaultInstanceForType() { + return io.grafeas.v1.UpdateNoteRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.UpdateNoteRequest build() { + io.grafeas.v1.UpdateNoteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.UpdateNoteRequest buildPartial() { + io.grafeas.v1.UpdateNoteRequest result = new io.grafeas.v1.UpdateNoteRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.UpdateNoteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.note_ = noteBuilder_ == null + ? note_ + : noteBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null + ? updateMask_ + : updateMaskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.UpdateNoteRequest) { + return mergeFrom((io.grafeas.v1.UpdateNoteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.UpdateNoteRequest other) { + if (other == io.grafeas.v1.UpdateNoteRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasNote()) { + mergeNote(other.getNote()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getNoteFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getUpdateMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.grafeas.v1.Note note_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> noteBuilder_; + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the note field is set. + */ + public boolean hasNote() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The note. + */ + public io.grafeas.v1.Note getNote() { + if (noteBuilder_ == null) { + return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; + } else { + return noteBuilder_.getMessage(); + } + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNote(io.grafeas.v1.Note value) { + if (noteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + note_ = value; + } else { + noteBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNote( + io.grafeas.v1.Note.Builder builderForValue) { + if (noteBuilder_ == null) { + note_ = builderForValue.build(); + } else { + noteBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeNote(io.grafeas.v1.Note value) { + if (noteBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + note_ != null && + note_ != io.grafeas.v1.Note.getDefaultInstance()) { + getNoteBuilder().mergeFrom(value); + } else { + note_ = value; + } + } else { + noteBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearNote() { + bitField0_ = (bitField0_ & ~0x00000002); + note_ = null; + if (noteBuilder_ != null) { + noteBuilder_.dispose(); + noteBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Note.Builder getNoteBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNoteFieldBuilder().getBuilder(); + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { + if (noteBuilder_ != null) { + return noteBuilder_.getMessageOrBuilder(); + } else { + return note_ == null ? + io.grafeas.v1.Note.getDefaultInstance() : note_; + } + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> + getNoteFieldBuilder() { + if (noteBuilder_ == null) { + noteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( + getNote(), + getParentForChildren(), + isClean()); + note_ = null; + } + return noteBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + updateMask_ != null && + updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000004); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.UpdateNoteRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.UpdateNoteRequest) + private static final io.grafeas.v1.UpdateNoteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.UpdateNoteRequest(); + } + + public static io.grafeas.v1.UpdateNoteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateNoteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.UpdateNoteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java new file mode 100644 index 000000000000..4d7ef876c432 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface UpdateNoteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.UpdateNoteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The updated note.
+   * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the note field is set. + */ + boolean hasNote(); + /** + *
+   * The updated note.
+   * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The note. + */ + io.grafeas.v1.Note getNote(); + /** + *
+   * The updated note.
+   * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + io.grafeas.v1.NoteOrBuilder getNoteOrBuilder(); + + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java new file mode 100644 index 000000000000..f6f6febe0d11 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to update an occurrence.
+ * 
+ * + * Protobuf type {@code grafeas.v1.UpdateOccurrenceRequest} + */ +public final class UpdateOccurrenceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.UpdateOccurrenceRequest) + UpdateOccurrenceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateOccurrenceRequest.newBuilder() to construct. + private UpdateOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateOccurrenceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateOccurrenceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpdateOccurrenceRequest.class, io.grafeas.v1.UpdateOccurrenceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OCCURRENCE_FIELD_NUMBER = 2; + private io.grafeas.v1.Occurrence occurrence_; + /** + *
+   * The updated occurrence.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the occurrence field is set. + */ + @java.lang.Override + public boolean hasOccurrence() { + return occurrence_ != null; + } + /** + *
+   * The updated occurrence.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The occurrence. + */ + @java.lang.Override + public io.grafeas.v1.Occurrence getOccurrence() { + return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } + /** + *
+   * The updated occurrence.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { + return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (occurrence_ != null) { + output.writeMessage(2, getOccurrence()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (occurrence_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOccurrence()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.UpdateOccurrenceRequest)) { + return super.equals(obj); + } + io.grafeas.v1.UpdateOccurrenceRequest other = (io.grafeas.v1.UpdateOccurrenceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasOccurrence() != other.hasOccurrence()) return false; + if (hasOccurrence()) { + if (!getOccurrence() + .equals(other.getOccurrence())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasOccurrence()) { + hash = (37 * hash) + OCCURRENCE_FIELD_NUMBER; + hash = (53 * hash) + getOccurrence().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.UpdateOccurrenceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to update an occurrence.
+   * 
+ * + * Protobuf type {@code grafeas.v1.UpdateOccurrenceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.UpdateOccurrenceRequest) + io.grafeas.v1.UpdateOccurrenceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpdateOccurrenceRequest.class, io.grafeas.v1.UpdateOccurrenceRequest.Builder.class); + } + + // Construct using io.grafeas.v1.UpdateOccurrenceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + occurrence_ = null; + if (occurrenceBuilder_ != null) { + occurrenceBuilder_.dispose(); + occurrenceBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.UpdateOccurrenceRequest getDefaultInstanceForType() { + return io.grafeas.v1.UpdateOccurrenceRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.UpdateOccurrenceRequest build() { + io.grafeas.v1.UpdateOccurrenceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.UpdateOccurrenceRequest buildPartial() { + io.grafeas.v1.UpdateOccurrenceRequest result = new io.grafeas.v1.UpdateOccurrenceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.UpdateOccurrenceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.occurrence_ = occurrenceBuilder_ == null + ? occurrence_ + : occurrenceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null + ? updateMask_ + : updateMaskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.UpdateOccurrenceRequest) { + return mergeFrom((io.grafeas.v1.UpdateOccurrenceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.UpdateOccurrenceRequest other) { + if (other == io.grafeas.v1.UpdateOccurrenceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasOccurrence()) { + mergeOccurrence(other.getOccurrence()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getOccurrenceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getUpdateMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.grafeas.v1.Occurrence occurrence_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrenceBuilder_; + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the occurrence field is set. + */ + public boolean hasOccurrence() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The occurrence. + */ + public io.grafeas.v1.Occurrence getOccurrence() { + if (occurrenceBuilder_ == null) { + return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } else { + return occurrenceBuilder_.getMessage(); + } + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOccurrence(io.grafeas.v1.Occurrence value) { + if (occurrenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + occurrence_ = value; + } else { + occurrenceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOccurrence( + io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrenceBuilder_ == null) { + occurrence_ = builderForValue.build(); + } else { + occurrenceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeOccurrence(io.grafeas.v1.Occurrence value) { + if (occurrenceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + occurrence_ != null && + occurrence_ != io.grafeas.v1.Occurrence.getDefaultInstance()) { + getOccurrenceBuilder().mergeFrom(value); + } else { + occurrence_ = value; + } + } else { + occurrenceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearOccurrence() { + bitField0_ = (bitField0_ & ~0x00000002); + occurrence_ = null; + if (occurrenceBuilder_ != null) { + occurrenceBuilder_.dispose(); + occurrenceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Occurrence.Builder getOccurrenceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOccurrenceFieldBuilder().getBuilder(); + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { + if (occurrenceBuilder_ != null) { + return occurrenceBuilder_.getMessageOrBuilder(); + } else { + return occurrence_ == null ? + io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> + getOccurrenceFieldBuilder() { + if (occurrenceBuilder_ == null) { + occurrenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( + getOccurrence(), + getParentForChildren(), + isClean()); + occurrence_ = null; + } + return occurrenceBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + updateMask_ != null && + updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000004); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.UpdateOccurrenceRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.UpdateOccurrenceRequest) + private static final io.grafeas.v1.UpdateOccurrenceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.UpdateOccurrenceRequest(); + } + + public static io.grafeas.v1.UpdateOccurrenceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateOccurrenceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.UpdateOccurrenceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java new file mode 100644 index 000000000000..ccec13dc04a7 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface UpdateOccurrenceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.UpdateOccurrenceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The updated occurrence.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the occurrence field is set. + */ + boolean hasOccurrence(); + /** + *
+   * The updated occurrence.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The occurrence. + */ + io.grafeas.v1.Occurrence getOccurrence(); + /** + *
+   * The updated occurrence.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder(); + + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java new file mode 100644 index 000000000000..4872b0e752da --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java @@ -0,0 +1,130 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +public final class Upgrade { + private Upgrade() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_UpgradeNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_UpgradeDistribution_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_WindowsUpdate_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_UpgradeOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\030grafeas/v1/upgrade.proto\022\ngrafeas.v1\032\037" + + "google/protobuf/timestamp.proto\032\030grafeas" + + "/v1/package.proto\"\257\001\n\013UpgradeNote\022\017\n\007pac" + + "kage\030\001 \001(\t\022$\n\007version\030\002 \001(\0132\023.grafeas.v1" + + ".Version\0226\n\rdistributions\030\003 \003(\0132\037.grafea" + + "s.v1.UpgradeDistribution\0221\n\016windows_upda" + + "te\030\004 \001(\0132\031.grafeas.v1.WindowsUpdate\"]\n\023U" + + "pgradeDistribution\022\017\n\007cpe_uri\030\001 \001(\t\022\026\n\016c" + + "lassification\030\002 \001(\t\022\020\n\010severity\030\003 \001(\t\022\013\n" + + "\003cve\030\004 \003(\t\"\354\002\n\rWindowsUpdate\0224\n\010identity" + + "\030\001 \001(\0132\".grafeas.v1.WindowsUpdate.Identi" + + "ty\022\r\n\005title\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\0226" + + "\n\ncategories\030\004 \003(\0132\".grafeas.v1.WindowsU" + + "pdate.Category\022\026\n\016kb_article_ids\030\005 \003(\t\022\023" + + "\n\013support_url\030\006 \001(\t\022<\n\030last_published_ti" + + "mestamp\030\007 \001(\0132\032.google.protobuf.Timestam" + + "p\032/\n\010Identity\022\021\n\tupdate_id\030\001 \001(\t\022\020\n\010revi" + + "sion\030\002 \001(\005\032-\n\010Category\022\023\n\013category_id\030\001 " + + "\001(\t\022\014\n\004name\030\002 \001(\t\"\273\001\n\021UpgradeOccurrence\022" + + "\017\n\007package\030\001 \001(\t\022+\n\016parsed_version\030\003 \001(\013" + + "2\023.grafeas.v1.Version\0225\n\014distribution\030\004 " + + "\001(\0132\037.grafeas.v1.UpgradeDistribution\0221\n\016" + + "windows_update\030\005 \001(\0132\031.grafeas.v1.Window" + + "sUpdateBQ\n\rio.grafeas.v1P\001Z8google.golan" + + "g.org/genproto/googleapis/grafeas/v1;gra" + + "feas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + io.grafeas.v1.Package.getDescriptor(), + }); + internal_static_grafeas_v1_UpgradeNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_UpgradeNote_descriptor, + new java.lang.String[] { "Package", "Version", "Distributions", "WindowsUpdate", }); + internal_static_grafeas_v1_UpgradeDistribution_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_UpgradeDistribution_descriptor, + new java.lang.String[] { "CpeUri", "Classification", "Severity", "Cve", }); + internal_static_grafeas_v1_WindowsUpdate_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_WindowsUpdate_descriptor, + new java.lang.String[] { "Identity", "Title", "Description", "Categories", "KbArticleIds", "SupportUrl", "LastPublishedTimestamp", }); + internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor = + internal_static_grafeas_v1_WindowsUpdate_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor, + new java.lang.String[] { "UpdateId", "Revision", }); + internal_static_grafeas_v1_WindowsUpdate_Category_descriptor = + internal_static_grafeas_v1_WindowsUpdate_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_WindowsUpdate_Category_descriptor, + new java.lang.String[] { "CategoryId", "Name", }); + internal_static_grafeas_v1_UpgradeOccurrence_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_UpgradeOccurrence_descriptor, + new java.lang.String[] { "Package", "ParsedVersion", "Distribution", "WindowsUpdate", }); + com.google.protobuf.TimestampProto.getDescriptor(); + io.grafeas.v1.Package.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java new file mode 100644 index 000000000000..0a867618fecf --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java @@ -0,0 +1,1177 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +/** + *
+ * The Upgrade Distribution represents metadata about the Upgrade for each
+ * operating system (CPE). Some distributions have additional metadata around
+ * updates, classifying them into various categories and severities.
+ * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeDistribution} + */ +public final class UpgradeDistribution extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeDistribution) + UpgradeDistributionOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpgradeDistribution.newBuilder() to construct. + private UpgradeDistribution(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpgradeDistribution() { + cpeUri_ = ""; + classification_ = ""; + severity_ = ""; + cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpgradeDistribution(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeDistribution.class, io.grafeas.v1.UpgradeDistribution.Builder.class); + } + + public static final int CPE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cpeUri_ = ""; + /** + *
+   * Required - The specific operating system this metadata applies to. See
+   * https://cpe.mitre.org/specification/.
+   * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + @java.lang.Override + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } + } + /** + *
+   * Required - The specific operating system this metadata applies to. See
+   * https://cpe.mitre.org/specification/.
+   * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLASSIFICATION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object classification_ = ""; + /** + *
+   * The operating system classification of this Upgrade, as specified by the
+   * upstream operating system upgrade feed. For Windows the classification is
+   * one of the category_ids listed at
+   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+   * 
+ * + * string classification = 2; + * @return The classification. + */ + @java.lang.Override + public java.lang.String getClassification() { + java.lang.Object ref = classification_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + classification_ = s; + return s; + } + } + /** + *
+   * The operating system classification of this Upgrade, as specified by the
+   * upstream operating system upgrade feed. For Windows the classification is
+   * one of the category_ids listed at
+   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+   * 
+ * + * string classification = 2; + * @return The bytes for classification. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getClassificationBytes() { + java.lang.Object ref = classification_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + classification_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEVERITY_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object severity_ = ""; + /** + *
+   * The severity as specified by the upstream operating system.
+   * 
+ * + * string severity = 3; + * @return The severity. + */ + @java.lang.Override + public java.lang.String getSeverity() { + java.lang.Object ref = severity_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + severity_ = s; + return s; + } + } + /** + *
+   * The severity as specified by the upstream operating system.
+   * 
+ * + * string severity = 3; + * @return The bytes for severity. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSeverityBytes() { + java.lang.Object ref = severity_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + severity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CVE_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList cve_; + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @return A list containing the cve. + */ + public com.google.protobuf.ProtocolStringList + getCveList() { + return cve_; + } + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @return The count of cve. + */ + public int getCveCount() { + return cve_.size(); + } + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @param index The index of the element to return. + * @return The cve at the given index. + */ + public java.lang.String getCve(int index) { + return cve_.get(index); + } + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @param index The index of the value to return. + * @return The bytes of the cve at the given index. + */ + public com.google.protobuf.ByteString + getCveBytes(int index) { + return cve_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(classification_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, classification_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severity_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, severity_); + } + for (int i = 0; i < cve_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cve_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(classification_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, classification_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severity_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, severity_); + } + { + int dataSize = 0; + for (int i = 0; i < cve_.size(); i++) { + dataSize += computeStringSizeNoTag(cve_.getRaw(i)); + } + size += dataSize; + size += 1 * getCveList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.UpgradeDistribution)) { + return super.equals(obj); + } + io.grafeas.v1.UpgradeDistribution other = (io.grafeas.v1.UpgradeDistribution) obj; + + if (!getCpeUri() + .equals(other.getCpeUri())) return false; + if (!getClassification() + .equals(other.getClassification())) return false; + if (!getSeverity() + .equals(other.getSeverity())) return false; + if (!getCveList() + .equals(other.getCveList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCpeUri().hashCode(); + hash = (37 * hash) + CLASSIFICATION_FIELD_NUMBER; + hash = (53 * hash) + getClassification().hashCode(); + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + getSeverity().hashCode(); + if (getCveCount() > 0) { + hash = (37 * hash) + CVE_FIELD_NUMBER; + hash = (53 * hash) + getCveList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.UpgradeDistribution parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpgradeDistribution parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeDistribution parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.UpgradeDistribution prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The Upgrade Distribution represents metadata about the Upgrade for each
+   * operating system (CPE). Some distributions have additional metadata around
+   * updates, classifying them into various categories and severities.
+   * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeDistribution} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeDistribution) + io.grafeas.v1.UpgradeDistributionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeDistribution.class, io.grafeas.v1.UpgradeDistribution.Builder.class); + } + + // Construct using io.grafeas.v1.UpgradeDistribution.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cpeUri_ = ""; + classification_ = ""; + severity_ = ""; + cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeDistribution getDefaultInstanceForType() { + return io.grafeas.v1.UpgradeDistribution.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.UpgradeDistribution build() { + io.grafeas.v1.UpgradeDistribution result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeDistribution buildPartial() { + io.grafeas.v1.UpgradeDistribution result = new io.grafeas.v1.UpgradeDistribution(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.UpgradeDistribution result) { + if (((bitField0_ & 0x00000008) != 0)) { + cve_ = cve_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.cve_ = cve_; + } + + private void buildPartial0(io.grafeas.v1.UpgradeDistribution result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cpeUri_ = cpeUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.classification_ = classification_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.severity_ = severity_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.UpgradeDistribution) { + return mergeFrom((io.grafeas.v1.UpgradeDistribution)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.UpgradeDistribution other) { + if (other == io.grafeas.v1.UpgradeDistribution.getDefaultInstance()) return this; + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getClassification().isEmpty()) { + classification_ = other.classification_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSeverity().isEmpty()) { + severity_ = other.severity_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.cve_.isEmpty()) { + if (cve_.isEmpty()) { + cve_ = other.cve_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureCveIsMutable(); + cve_.addAll(other.cve_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + classification_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + severity_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + ensureCveIsMutable(); + cve_.add(s); + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cpeUri_ = ""; + /** + *
+     * Required - The specific operating system this metadata applies to. See
+     * https://cpe.mitre.org/specification/.
+     * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required - The specific operating system this metadata applies to. See
+     * https://cpe.mitre.org/specification/.
+     * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required - The specific operating system this metadata applies to. See
+     * https://cpe.mitre.org/specification/.
+     * 
+ * + * string cpe_uri = 1; + * @param value The cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required - The specific operating system this metadata applies to. See
+     * https://cpe.mitre.org/specification/.
+     * 
+ * + * string cpe_uri = 1; + * @return This builder for chaining. + */ + public Builder clearCpeUri() { + cpeUri_ = getDefaultInstance().getCpeUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required - The specific operating system this metadata applies to. See
+     * https://cpe.mitre.org/specification/.
+     * 
+ * + * string cpe_uri = 1; + * @param value The bytes for cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object classification_ = ""; + /** + *
+     * The operating system classification of this Upgrade, as specified by the
+     * upstream operating system upgrade feed. For Windows the classification is
+     * one of the category_ids listed at
+     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+     * 
+ * + * string classification = 2; + * @return The classification. + */ + public java.lang.String getClassification() { + java.lang.Object ref = classification_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + classification_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The operating system classification of this Upgrade, as specified by the
+     * upstream operating system upgrade feed. For Windows the classification is
+     * one of the category_ids listed at
+     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+     * 
+ * + * string classification = 2; + * @return The bytes for classification. + */ + public com.google.protobuf.ByteString + getClassificationBytes() { + java.lang.Object ref = classification_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + classification_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The operating system classification of this Upgrade, as specified by the
+     * upstream operating system upgrade feed. For Windows the classification is
+     * one of the category_ids listed at
+     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+     * 
+ * + * string classification = 2; + * @param value The classification to set. + * @return This builder for chaining. + */ + public Builder setClassification( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + classification_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The operating system classification of this Upgrade, as specified by the
+     * upstream operating system upgrade feed. For Windows the classification is
+     * one of the category_ids listed at
+     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+     * 
+ * + * string classification = 2; + * @return This builder for chaining. + */ + public Builder clearClassification() { + classification_ = getDefaultInstance().getClassification(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The operating system classification of this Upgrade, as specified by the
+     * upstream operating system upgrade feed. For Windows the classification is
+     * one of the category_ids listed at
+     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+     * 
+ * + * string classification = 2; + * @param value The bytes for classification to set. + * @return This builder for chaining. + */ + public Builder setClassificationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + classification_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object severity_ = ""; + /** + *
+     * The severity as specified by the upstream operating system.
+     * 
+ * + * string severity = 3; + * @return The severity. + */ + public java.lang.String getSeverity() { + java.lang.Object ref = severity_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + severity_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The severity as specified by the upstream operating system.
+     * 
+ * + * string severity = 3; + * @return The bytes for severity. + */ + public com.google.protobuf.ByteString + getSeverityBytes() { + java.lang.Object ref = severity_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + severity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The severity as specified by the upstream operating system.
+     * 
+ * + * string severity = 3; + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + severity_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The severity as specified by the upstream operating system.
+     * 
+ * + * string severity = 3; + * @return This builder for chaining. + */ + public Builder clearSeverity() { + severity_ = getDefaultInstance().getSeverity(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The severity as specified by the upstream operating system.
+     * 
+ * + * string severity = 3; + * @param value The bytes for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + severity_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureCveIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + cve_ = new com.google.protobuf.LazyStringArrayList(cve_); + bitField0_ |= 0x00000008; + } + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @return A list containing the cve. + */ + public com.google.protobuf.ProtocolStringList + getCveList() { + return cve_.getUnmodifiableView(); + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @return The count of cve. + */ + public int getCveCount() { + return cve_.size(); + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @param index The index of the element to return. + * @return The cve at the given index. + */ + public java.lang.String getCve(int index) { + return cve_.get(index); + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @param index The index of the value to return. + * @return The bytes of the cve at the given index. + */ + public com.google.protobuf.ByteString + getCveBytes(int index) { + return cve_.getByteString(index); + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @param index The index to set the value at. + * @param value The cve to set. + * @return This builder for chaining. + */ + public Builder setCve( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureCveIsMutable(); + cve_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @param value The cve to add. + * @return This builder for chaining. + */ + public Builder addCve( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureCveIsMutable(); + cve_.add(value); + onChanged(); + return this; + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @param values The cve to add. + * @return This builder for chaining. + */ + public Builder addAllCve( + java.lang.Iterable values) { + ensureCveIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, cve_); + onChanged(); + return this; + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @return This builder for chaining. + */ + public Builder clearCve() { + cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @param value The bytes of the cve to add. + * @return This builder for chaining. + */ + public Builder addCveBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureCveIsMutable(); + cve_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.UpgradeDistribution) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeDistribution) + private static final io.grafeas.v1.UpgradeDistribution DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeDistribution(); + } + + public static io.grafeas.v1.UpgradeDistribution getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeDistribution parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeDistribution getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java new file mode 100644 index 000000000000..ae654ff74cbf --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java @@ -0,0 +1,118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +public interface UpgradeDistributionOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.UpgradeDistribution) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required - The specific operating system this metadata applies to. See
+   * https://cpe.mitre.org/specification/.
+   * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + java.lang.String getCpeUri(); + /** + *
+   * Required - The specific operating system this metadata applies to. See
+   * https://cpe.mitre.org/specification/.
+   * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + com.google.protobuf.ByteString + getCpeUriBytes(); + + /** + *
+   * The operating system classification of this Upgrade, as specified by the
+   * upstream operating system upgrade feed. For Windows the classification is
+   * one of the category_ids listed at
+   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+   * 
+ * + * string classification = 2; + * @return The classification. + */ + java.lang.String getClassification(); + /** + *
+   * The operating system classification of this Upgrade, as specified by the
+   * upstream operating system upgrade feed. For Windows the classification is
+   * one of the category_ids listed at
+   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+   * 
+ * + * string classification = 2; + * @return The bytes for classification. + */ + com.google.protobuf.ByteString + getClassificationBytes(); + + /** + *
+   * The severity as specified by the upstream operating system.
+   * 
+ * + * string severity = 3; + * @return The severity. + */ + java.lang.String getSeverity(); + /** + *
+   * The severity as specified by the upstream operating system.
+   * 
+ * + * string severity = 3; + * @return The bytes for severity. + */ + com.google.protobuf.ByteString + getSeverityBytes(); + + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @return A list containing the cve. + */ + java.util.List + getCveList(); + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @return The count of cve. + */ + int getCveCount(); + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @param index The index of the element to return. + * @return The cve at the given index. + */ + java.lang.String getCve(int index); + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @param index The index of the value to return. + * @return The bytes of the cve at the given index. + */ + com.google.protobuf.ByteString + getCveBytes(int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java new file mode 100644 index 000000000000..98cf3755164e --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java @@ -0,0 +1,1502 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +/** + *
+ * An Upgrade Note represents a potential upgrade of a package to a given
+ * version. For each package version combination (i.e. bash 4.0, bash 4.1,
+ * bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field
+ * represents the information related to the update.
+ * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeNote} + */ +public final class UpgradeNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeNote) + UpgradeNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpgradeNote.newBuilder() to construct. + private UpgradeNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpgradeNote() { + package_ = ""; + distributions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpgradeNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeNote.class, io.grafeas.v1.UpgradeNote.Builder.class); + } + + public static final int PACKAGE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object package_ = ""; + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The package. + */ + @java.lang.Override + public java.lang.String getPackage() { + java.lang.Object ref = package_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + package_ = s; + return s; + } + } + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The bytes for package. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPackageBytes() { + java.lang.Object ref = package_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + package_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + private io.grafeas.v1.Version version_; + /** + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return Whether the version field is set. + */ + @java.lang.Override + public boolean hasVersion() { + return version_ != null; + } + /** + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return The version. + */ + @java.lang.Override + public io.grafeas.v1.Version getVersion() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + /** + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + + public static final int DISTRIBUTIONS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List distributions_; + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + @java.lang.Override + public java.util.List getDistributionsList() { + return distributions_; + } + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + @java.lang.Override + public java.util.List + getDistributionsOrBuilderList() { + return distributions_; + } + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + @java.lang.Override + public int getDistributionsCount() { + return distributions_.size(); + } + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + @java.lang.Override + public io.grafeas.v1.UpgradeDistribution getDistributions(int index) { + return distributions_.get(index); + } + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + @java.lang.Override + public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder( + int index) { + return distributions_.get(index); + } + + public static final int WINDOWS_UPDATE_FIELD_NUMBER = 4; + private io.grafeas.v1.WindowsUpdate windowsUpdate_; + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * @return Whether the windowsUpdate field is set. + */ + @java.lang.Override + public boolean hasWindowsUpdate() { + return windowsUpdate_ != null; + } + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * @return The windowsUpdate. + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { + return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { + return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, package_); + } + if (version_ != null) { + output.writeMessage(2, getVersion()); + } + for (int i = 0; i < distributions_.size(); i++) { + output.writeMessage(3, distributions_.get(i)); + } + if (windowsUpdate_ != null) { + output.writeMessage(4, getWindowsUpdate()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, package_); + } + if (version_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getVersion()); + } + for (int i = 0; i < distributions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, distributions_.get(i)); + } + if (windowsUpdate_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getWindowsUpdate()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.UpgradeNote)) { + return super.equals(obj); + } + io.grafeas.v1.UpgradeNote other = (io.grafeas.v1.UpgradeNote) obj; + + if (!getPackage() + .equals(other.getPackage())) return false; + if (hasVersion() != other.hasVersion()) return false; + if (hasVersion()) { + if (!getVersion() + .equals(other.getVersion())) return false; + } + if (!getDistributionsList() + .equals(other.getDistributionsList())) return false; + if (hasWindowsUpdate() != other.hasWindowsUpdate()) return false; + if (hasWindowsUpdate()) { + if (!getWindowsUpdate() + .equals(other.getWindowsUpdate())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPackage().hashCode(); + if (hasVersion()) { + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + } + if (getDistributionsCount() > 0) { + hash = (37 * hash) + DISTRIBUTIONS_FIELD_NUMBER; + hash = (53 * hash) + getDistributionsList().hashCode(); + } + if (hasWindowsUpdate()) { + hash = (37 * hash) + WINDOWS_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getWindowsUpdate().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.UpgradeNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpgradeNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpgradeNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.UpgradeNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An Upgrade Note represents a potential upgrade of a package to a given
+   * version. For each package version combination (i.e. bash 4.0, bash 4.1,
+   * bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field
+   * represents the information related to the update.
+   * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeNote) + io.grafeas.v1.UpgradeNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeNote.class, io.grafeas.v1.UpgradeNote.Builder.class); + } + + // Construct using io.grafeas.v1.UpgradeNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + package_ = ""; + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + if (distributionsBuilder_ == null) { + distributions_ = java.util.Collections.emptyList(); + } else { + distributions_ = null; + distributionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + windowsUpdate_ = null; + if (windowsUpdateBuilder_ != null) { + windowsUpdateBuilder_.dispose(); + windowsUpdateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeNote getDefaultInstanceForType() { + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.UpgradeNote build() { + io.grafeas.v1.UpgradeNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeNote buildPartial() { + io.grafeas.v1.UpgradeNote result = new io.grafeas.v1.UpgradeNote(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.UpgradeNote result) { + if (distributionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + distributions_ = java.util.Collections.unmodifiableList(distributions_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.distributions_ = distributions_; + } else { + result.distributions_ = distributionsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.UpgradeNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.package_ = package_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.version_ = versionBuilder_ == null + ? version_ + : versionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.windowsUpdate_ = windowsUpdateBuilder_ == null + ? windowsUpdate_ + : windowsUpdateBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.UpgradeNote) { + return mergeFrom((io.grafeas.v1.UpgradeNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.UpgradeNote other) { + if (other == io.grafeas.v1.UpgradeNote.getDefaultInstance()) return this; + if (!other.getPackage().isEmpty()) { + package_ = other.package_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasVersion()) { + mergeVersion(other.getVersion()); + } + if (distributionsBuilder_ == null) { + if (!other.distributions_.isEmpty()) { + if (distributions_.isEmpty()) { + distributions_ = other.distributions_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDistributionsIsMutable(); + distributions_.addAll(other.distributions_); + } + onChanged(); + } + } else { + if (!other.distributions_.isEmpty()) { + if (distributionsBuilder_.isEmpty()) { + distributionsBuilder_.dispose(); + distributionsBuilder_ = null; + distributions_ = other.distributions_; + bitField0_ = (bitField0_ & ~0x00000004); + distributionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDistributionsFieldBuilder() : null; + } else { + distributionsBuilder_.addAllMessages(other.distributions_); + } + } + } + if (other.hasWindowsUpdate()) { + mergeWindowsUpdate(other.getWindowsUpdate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + package_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + io.grafeas.v1.UpgradeDistribution m = + input.readMessage( + io.grafeas.v1.UpgradeDistribution.parser(), + extensionRegistry); + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + distributions_.add(m); + } else { + distributionsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: { + input.readMessage( + getWindowsUpdateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object package_ = ""; + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @return The package. + */ + public java.lang.String getPackage() { + java.lang.Object ref = package_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + package_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @return The bytes for package. + */ + public com.google.protobuf.ByteString + getPackageBytes() { + java.lang.Object ref = package_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + package_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @param value The package to set. + * @return This builder for chaining. + */ + public Builder setPackage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + package_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @return This builder for chaining. + */ + public Builder clearPackage() { + package_ = getDefaultInstance().getPackage(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @param value The bytes for package to set. + * @return This builder for chaining. + */ + public Builder setPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + package_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.grafeas.v1.Version version_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + * @return Whether the version field is set. + */ + public boolean hasVersion() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + * @return The version. + */ + public io.grafeas.v1.Version getVersion() { + if (versionBuilder_ == null) { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } else { + return versionBuilder_.getMessage(); + } + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder setVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + } else { + versionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder setVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (versionBuilder_ == null) { + version_ = builderForValue.build(); + } else { + versionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder mergeVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + version_ != null && + version_ != io.grafeas.v1.Version.getDefaultInstance()) { + getVersionBuilder().mergeFrom(value); + } else { + version_ = value; + } + } else { + versionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder clearVersion() { + bitField0_ = (bitField0_ & ~0x00000002); + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public io.grafeas.v1.Version.Builder getVersionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getVersionFieldBuilder().getBuilder(); + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + if (versionBuilder_ != null) { + return versionBuilder_.getMessageOrBuilder(); + } else { + return version_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : version_; + } + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getVersionFieldBuilder() { + if (versionBuilder_ == null) { + versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getVersion(), + getParentForChildren(), + isClean()); + version_ = null; + } + return versionBuilder_; + } + + private java.util.List distributions_ = + java.util.Collections.emptyList(); + private void ensureDistributionsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + distributions_ = new java.util.ArrayList(distributions_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> distributionsBuilder_; + + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public java.util.List getDistributionsList() { + if (distributionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(distributions_); + } else { + return distributionsBuilder_.getMessageList(); + } + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public int getDistributionsCount() { + if (distributionsBuilder_ == null) { + return distributions_.size(); + } else { + return distributionsBuilder_.getCount(); + } + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistribution getDistributions(int index) { + if (distributionsBuilder_ == null) { + return distributions_.get(index); + } else { + return distributionsBuilder_.getMessage(index); + } + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder setDistributions( + int index, io.grafeas.v1.UpgradeDistribution value) { + if (distributionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDistributionsIsMutable(); + distributions_.set(index, value); + onChanged(); + } else { + distributionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder setDistributions( + int index, io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + distributions_.set(index, builderForValue.build()); + onChanged(); + } else { + distributionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder addDistributions(io.grafeas.v1.UpgradeDistribution value) { + if (distributionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDistributionsIsMutable(); + distributions_.add(value); + onChanged(); + } else { + distributionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder addDistributions( + int index, io.grafeas.v1.UpgradeDistribution value) { + if (distributionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDistributionsIsMutable(); + distributions_.add(index, value); + onChanged(); + } else { + distributionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder addDistributions( + io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + distributions_.add(builderForValue.build()); + onChanged(); + } else { + distributionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder addDistributions( + int index, io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + distributions_.add(index, builderForValue.build()); + onChanged(); + } else { + distributionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder addAllDistributions( + java.lang.Iterable values) { + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, distributions_); + onChanged(); + } else { + distributionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder clearDistributions() { + if (distributionsBuilder_ == null) { + distributions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + distributionsBuilder_.clear(); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder removeDistributions(int index) { + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + distributions_.remove(index); + onChanged(); + } else { + distributionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistribution.Builder getDistributionsBuilder( + int index) { + return getDistributionsFieldBuilder().getBuilder(index); + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder( + int index) { + if (distributionsBuilder_ == null) { + return distributions_.get(index); } else { + return distributionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public java.util.List + getDistributionsOrBuilderList() { + if (distributionsBuilder_ != null) { + return distributionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(distributions_); + } + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistribution.Builder addDistributionsBuilder() { + return getDistributionsFieldBuilder().addBuilder( + io.grafeas.v1.UpgradeDistribution.getDefaultInstance()); + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistribution.Builder addDistributionsBuilder( + int index) { + return getDistributionsFieldBuilder().addBuilder( + index, io.grafeas.v1.UpgradeDistribution.getDefaultInstance()); + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public java.util.List + getDistributionsBuilderList() { + return getDistributionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> + getDistributionsFieldBuilder() { + if (distributionsBuilder_ == null) { + distributionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder>( + distributions_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + distributions_ = null; + } + return distributionsBuilder_; + } + + private io.grafeas.v1.WindowsUpdate windowsUpdate_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> windowsUpdateBuilder_; + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * @return Whether the windowsUpdate field is set. + */ + public boolean hasWindowsUpdate() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * @return The windowsUpdate. + */ + public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { + if (windowsUpdateBuilder_ == null) { + return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } else { + return windowsUpdateBuilder_.getMessage(); + } + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public Builder setWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { + if (windowsUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + windowsUpdate_ = value; + } else { + windowsUpdateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public Builder setWindowsUpdate( + io.grafeas.v1.WindowsUpdate.Builder builderForValue) { + if (windowsUpdateBuilder_ == null) { + windowsUpdate_ = builderForValue.build(); + } else { + windowsUpdateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public Builder mergeWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { + if (windowsUpdateBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + windowsUpdate_ != null && + windowsUpdate_ != io.grafeas.v1.WindowsUpdate.getDefaultInstance()) { + getWindowsUpdateBuilder().mergeFrom(value); + } else { + windowsUpdate_ = value; + } + } else { + windowsUpdateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public Builder clearWindowsUpdate() { + bitField0_ = (bitField0_ & ~0x00000008); + windowsUpdate_ = null; + if (windowsUpdateBuilder_ != null) { + windowsUpdateBuilder_.dispose(); + windowsUpdateBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public io.grafeas.v1.WindowsUpdate.Builder getWindowsUpdateBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getWindowsUpdateFieldBuilder().getBuilder(); + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { + if (windowsUpdateBuilder_ != null) { + return windowsUpdateBuilder_.getMessageOrBuilder(); + } else { + return windowsUpdate_ == null ? + io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> + getWindowsUpdateFieldBuilder() { + if (windowsUpdateBuilder_ == null) { + windowsUpdateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder>( + getWindowsUpdate(), + getParentForChildren(), + isClean()); + windowsUpdate_ = null; + } + return windowsUpdateBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.UpgradeNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeNote) + private static final io.grafeas.v1.UpgradeNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeNote(); + } + + public static io.grafeas.v1.UpgradeNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java new file mode 100644 index 000000000000..5ba319277bdd --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java @@ -0,0 +1,130 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +public interface UpgradeNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.UpgradeNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The package. + */ + java.lang.String getPackage(); + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The bytes for package. + */ + com.google.protobuf.ByteString + getPackageBytes(); + + /** + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return Whether the version field is set. + */ + boolean hasVersion(); + /** + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return The version. + */ + io.grafeas.v1.Version getVersion(); + /** + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + */ + io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); + + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + java.util.List + getDistributionsList(); + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + io.grafeas.v1.UpgradeDistribution getDistributions(int index); + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + int getDistributionsCount(); + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + java.util.List + getDistributionsOrBuilderList(); + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder( + int index); + + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * @return Whether the windowsUpdate field is set. + */ + boolean hasWindowsUpdate(); + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * @return The windowsUpdate. + */ + io.grafeas.v1.WindowsUpdate getWindowsUpdate(); + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java new file mode 100644 index 000000000000..c82c44559daa --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java @@ -0,0 +1,1311 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +/** + *
+ * An Upgrade Occurrence represents that a specific resource_url could install a
+ * specific upgrade. This presence is supplied via local sources (i.e. it is
+ * present in the mirror and the running system has noticed its availability).
+ * For Windows, both distribution and windows_update contain information for the
+ * Windows update.
+ * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeOccurrence} + */ +public final class UpgradeOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeOccurrence) + UpgradeOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpgradeOccurrence.newBuilder() to construct. + private UpgradeOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpgradeOccurrence() { + package_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpgradeOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeOccurrence.class, io.grafeas.v1.UpgradeOccurrence.Builder.class); + } + + public static final int PACKAGE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object package_ = ""; + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The package. + */ + @java.lang.Override + public java.lang.String getPackage() { + java.lang.Object ref = package_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + package_ = s; + return s; + } + } + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The bytes for package. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPackageBytes() { + java.lang.Object ref = package_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + package_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARSED_VERSION_FIELD_NUMBER = 3; + private io.grafeas.v1.Version parsedVersion_; + /** + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * @return Whether the parsedVersion field is set. + */ + @java.lang.Override + public boolean hasParsedVersion() { + return parsedVersion_ != null; + } + /** + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * @return The parsedVersion. + */ + @java.lang.Override + public io.grafeas.v1.Version getParsedVersion() { + return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; + } + /** + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder() { + return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; + } + + public static final int DISTRIBUTION_FIELD_NUMBER = 4; + private io.grafeas.v1.UpgradeDistribution distribution_; + /** + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * @return Whether the distribution field is set. + */ + @java.lang.Override + public boolean hasDistribution() { + return distribution_ != null; + } + /** + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * @return The distribution. + */ + @java.lang.Override + public io.grafeas.v1.UpgradeDistribution getDistribution() { + return distribution_ == null ? io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; + } + /** + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + @java.lang.Override + public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder() { + return distribution_ == null ? io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; + } + + public static final int WINDOWS_UPDATE_FIELD_NUMBER = 5; + private io.grafeas.v1.WindowsUpdate windowsUpdate_; + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * @return Whether the windowsUpdate field is set. + */ + @java.lang.Override + public boolean hasWindowsUpdate() { + return windowsUpdate_ != null; + } + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * @return The windowsUpdate. + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { + return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { + return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, package_); + } + if (parsedVersion_ != null) { + output.writeMessage(3, getParsedVersion()); + } + if (distribution_ != null) { + output.writeMessage(4, getDistribution()); + } + if (windowsUpdate_ != null) { + output.writeMessage(5, getWindowsUpdate()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, package_); + } + if (parsedVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getParsedVersion()); + } + if (distribution_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getDistribution()); + } + if (windowsUpdate_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getWindowsUpdate()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.UpgradeOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.UpgradeOccurrence other = (io.grafeas.v1.UpgradeOccurrence) obj; + + if (!getPackage() + .equals(other.getPackage())) return false; + if (hasParsedVersion() != other.hasParsedVersion()) return false; + if (hasParsedVersion()) { + if (!getParsedVersion() + .equals(other.getParsedVersion())) return false; + } + if (hasDistribution() != other.hasDistribution()) return false; + if (hasDistribution()) { + if (!getDistribution() + .equals(other.getDistribution())) return false; + } + if (hasWindowsUpdate() != other.hasWindowsUpdate()) return false; + if (hasWindowsUpdate()) { + if (!getWindowsUpdate() + .equals(other.getWindowsUpdate())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPackage().hashCode(); + if (hasParsedVersion()) { + hash = (37 * hash) + PARSED_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getParsedVersion().hashCode(); + } + if (hasDistribution()) { + hash = (37 * hash) + DISTRIBUTION_FIELD_NUMBER; + hash = (53 * hash) + getDistribution().hashCode(); + } + if (hasWindowsUpdate()) { + hash = (37 * hash) + WINDOWS_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getWindowsUpdate().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpgradeOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.UpgradeOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An Upgrade Occurrence represents that a specific resource_url could install a
+   * specific upgrade. This presence is supplied via local sources (i.e. it is
+   * present in the mirror and the running system has noticed its availability).
+   * For Windows, both distribution and windows_update contain information for the
+   * Windows update.
+   * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeOccurrence) + io.grafeas.v1.UpgradeOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeOccurrence.class, io.grafeas.v1.UpgradeOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.UpgradeOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + package_ = ""; + parsedVersion_ = null; + if (parsedVersionBuilder_ != null) { + parsedVersionBuilder_.dispose(); + parsedVersionBuilder_ = null; + } + distribution_ = null; + if (distributionBuilder_ != null) { + distributionBuilder_.dispose(); + distributionBuilder_ = null; + } + windowsUpdate_ = null; + if (windowsUpdateBuilder_ != null) { + windowsUpdateBuilder_.dispose(); + windowsUpdateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrence build() { + io.grafeas.v1.UpgradeOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrence buildPartial() { + io.grafeas.v1.UpgradeOccurrence result = new io.grafeas.v1.UpgradeOccurrence(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.UpgradeOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.package_ = package_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parsedVersion_ = parsedVersionBuilder_ == null + ? parsedVersion_ + : parsedVersionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.distribution_ = distributionBuilder_ == null + ? distribution_ + : distributionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.windowsUpdate_ = windowsUpdateBuilder_ == null + ? windowsUpdate_ + : windowsUpdateBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.UpgradeOccurrence) { + return mergeFrom((io.grafeas.v1.UpgradeOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.UpgradeOccurrence other) { + if (other == io.grafeas.v1.UpgradeOccurrence.getDefaultInstance()) return this; + if (!other.getPackage().isEmpty()) { + package_ = other.package_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasParsedVersion()) { + mergeParsedVersion(other.getParsedVersion()); + } + if (other.hasDistribution()) { + mergeDistribution(other.getDistribution()); + } + if (other.hasWindowsUpdate()) { + mergeWindowsUpdate(other.getWindowsUpdate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + package_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: { + input.readMessage( + getParsedVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: { + input.readMessage( + getDistributionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: { + input.readMessage( + getWindowsUpdateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object package_ = ""; + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @return The package. + */ + public java.lang.String getPackage() { + java.lang.Object ref = package_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + package_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @return The bytes for package. + */ + public com.google.protobuf.ByteString + getPackageBytes() { + java.lang.Object ref = package_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + package_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @param value The package to set. + * @return This builder for chaining. + */ + public Builder setPackage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + package_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @return This builder for chaining. + */ + public Builder clearPackage() { + package_ = getDefaultInstance().getPackage(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @param value The bytes for package to set. + * @return This builder for chaining. + */ + public Builder setPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + package_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.grafeas.v1.Version parsedVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> parsedVersionBuilder_; + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * @return Whether the parsedVersion field is set. + */ + public boolean hasParsedVersion() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * @return The parsedVersion. + */ + public io.grafeas.v1.Version getParsedVersion() { + if (parsedVersionBuilder_ == null) { + return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; + } else { + return parsedVersionBuilder_.getMessage(); + } + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public Builder setParsedVersion(io.grafeas.v1.Version value) { + if (parsedVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parsedVersion_ = value; + } else { + parsedVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public Builder setParsedVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (parsedVersionBuilder_ == null) { + parsedVersion_ = builderForValue.build(); + } else { + parsedVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public Builder mergeParsedVersion(io.grafeas.v1.Version value) { + if (parsedVersionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + parsedVersion_ != null && + parsedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { + getParsedVersionBuilder().mergeFrom(value); + } else { + parsedVersion_ = value; + } + } else { + parsedVersionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public Builder clearParsedVersion() { + bitField0_ = (bitField0_ & ~0x00000002); + parsedVersion_ = null; + if (parsedVersionBuilder_ != null) { + parsedVersionBuilder_.dispose(); + parsedVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public io.grafeas.v1.Version.Builder getParsedVersionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getParsedVersionFieldBuilder().getBuilder(); + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder() { + if (parsedVersionBuilder_ != null) { + return parsedVersionBuilder_.getMessageOrBuilder(); + } else { + return parsedVersion_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; + } + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getParsedVersionFieldBuilder() { + if (parsedVersionBuilder_ == null) { + parsedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getParsedVersion(), + getParentForChildren(), + isClean()); + parsedVersion_ = null; + } + return parsedVersionBuilder_; + } + + private io.grafeas.v1.UpgradeDistribution distribution_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> distributionBuilder_; + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * @return Whether the distribution field is set. + */ + public boolean hasDistribution() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * @return The distribution. + */ + public io.grafeas.v1.UpgradeDistribution getDistribution() { + if (distributionBuilder_ == null) { + return distribution_ == null ? io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; + } else { + return distributionBuilder_.getMessage(); + } + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public Builder setDistribution(io.grafeas.v1.UpgradeDistribution value) { + if (distributionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + distribution_ = value; + } else { + distributionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public Builder setDistribution( + io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { + if (distributionBuilder_ == null) { + distribution_ = builderForValue.build(); + } else { + distributionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public Builder mergeDistribution(io.grafeas.v1.UpgradeDistribution value) { + if (distributionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + distribution_ != null && + distribution_ != io.grafeas.v1.UpgradeDistribution.getDefaultInstance()) { + getDistributionBuilder().mergeFrom(value); + } else { + distribution_ = value; + } + } else { + distributionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public Builder clearDistribution() { + bitField0_ = (bitField0_ & ~0x00000004); + distribution_ = null; + if (distributionBuilder_ != null) { + distributionBuilder_.dispose(); + distributionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public io.grafeas.v1.UpgradeDistribution.Builder getDistributionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDistributionFieldBuilder().getBuilder(); + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder() { + if (distributionBuilder_ != null) { + return distributionBuilder_.getMessageOrBuilder(); + } else { + return distribution_ == null ? + io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; + } + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> + getDistributionFieldBuilder() { + if (distributionBuilder_ == null) { + distributionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder>( + getDistribution(), + getParentForChildren(), + isClean()); + distribution_ = null; + } + return distributionBuilder_; + } + + private io.grafeas.v1.WindowsUpdate windowsUpdate_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> windowsUpdateBuilder_; + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * @return Whether the windowsUpdate field is set. + */ + public boolean hasWindowsUpdate() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * @return The windowsUpdate. + */ + public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { + if (windowsUpdateBuilder_ == null) { + return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } else { + return windowsUpdateBuilder_.getMessage(); + } + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public Builder setWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { + if (windowsUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + windowsUpdate_ = value; + } else { + windowsUpdateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public Builder setWindowsUpdate( + io.grafeas.v1.WindowsUpdate.Builder builderForValue) { + if (windowsUpdateBuilder_ == null) { + windowsUpdate_ = builderForValue.build(); + } else { + windowsUpdateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public Builder mergeWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { + if (windowsUpdateBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + windowsUpdate_ != null && + windowsUpdate_ != io.grafeas.v1.WindowsUpdate.getDefaultInstance()) { + getWindowsUpdateBuilder().mergeFrom(value); + } else { + windowsUpdate_ = value; + } + } else { + windowsUpdateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public Builder clearWindowsUpdate() { + bitField0_ = (bitField0_ & ~0x00000008); + windowsUpdate_ = null; + if (windowsUpdateBuilder_ != null) { + windowsUpdateBuilder_.dispose(); + windowsUpdateBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public io.grafeas.v1.WindowsUpdate.Builder getWindowsUpdateBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getWindowsUpdateFieldBuilder().getBuilder(); + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { + if (windowsUpdateBuilder_ != null) { + return windowsUpdateBuilder_.getMessageOrBuilder(); + } else { + return windowsUpdate_ == null ? + io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> + getWindowsUpdateFieldBuilder() { + if (windowsUpdateBuilder_ == null) { + windowsUpdateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder>( + getWindowsUpdate(), + getParentForChildren(), + isClean()); + windowsUpdate_ = null; + } + return windowsUpdateBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.UpgradeOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeOccurrence) + private static final io.grafeas.v1.UpgradeOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeOccurrence(); + } + + public static io.grafeas.v1.UpgradeOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java new file mode 100644 index 000000000000..0b38a1018b82 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +public interface UpgradeOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.UpgradeOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The package. + */ + java.lang.String getPackage(); + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The bytes for package. + */ + com.google.protobuf.ByteString + getPackageBytes(); + + /** + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * @return Whether the parsedVersion field is set. + */ + boolean hasParsedVersion(); + /** + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * @return The parsedVersion. + */ + io.grafeas.v1.Version getParsedVersion(); + /** + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder(); + + /** + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * @return Whether the distribution field is set. + */ + boolean hasDistribution(); + /** + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * @return The distribution. + */ + io.grafeas.v1.UpgradeDistribution getDistribution(); + /** + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder(); + + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * @return Whether the windowsUpdate field is set. + */ + boolean hasWindowsUpdate(); + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * @return The windowsUpdate. + */ + io.grafeas.v1.WindowsUpdate getWindowsUpdate(); + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java new file mode 100644 index 000000000000..327a4d2a0671 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java @@ -0,0 +1,1398 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +/** + *
+ * Version contains structured information about the version of a package.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Version} + */ +public final class Version extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Version) + VersionOrBuilder { +private static final long serialVersionUID = 0L; + // Use Version.newBuilder() to construct. + private Version(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Version() { + name_ = ""; + revision_ = ""; + kind_ = 0; + fullName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Version(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Version.class, io.grafeas.v1.Version.Builder.class); + } + + /** + *
+   * Whether this is an ordinary package version or a sentinel MIN/MAX version.
+   * 
+ * + * Protobuf enum {@code grafeas.v1.Version.VersionKind} + */ + public enum VersionKind + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown.
+     * 
+ * + * VERSION_KIND_UNSPECIFIED = 0; + */ + VERSION_KIND_UNSPECIFIED(0), + /** + *
+     * A standard package version.
+     * 
+ * + * NORMAL = 1; + */ + NORMAL(1), + /** + *
+     * A special version representing negative infinity.
+     * 
+ * + * MINIMUM = 2; + */ + MINIMUM(2), + /** + *
+     * A special version representing positive infinity.
+     * 
+ * + * MAXIMUM = 3; + */ + MAXIMUM(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unknown.
+     * 
+ * + * VERSION_KIND_UNSPECIFIED = 0; + */ + public static final int VERSION_KIND_UNSPECIFIED_VALUE = 0; + /** + *
+     * A standard package version.
+     * 
+ * + * NORMAL = 1; + */ + public static final int NORMAL_VALUE = 1; + /** + *
+     * A special version representing negative infinity.
+     * 
+ * + * MINIMUM = 2; + */ + public static final int MINIMUM_VALUE = 2; + /** + *
+     * A special version representing positive infinity.
+     * 
+ * + * MAXIMUM = 3; + */ + public static final int MAXIMUM_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VersionKind valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static VersionKind forNumber(int value) { + switch (value) { + case 0: return VERSION_KIND_UNSPECIFIED; + case 1: return NORMAL; + case 2: return MINIMUM; + case 3: return MAXIMUM; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + VersionKind> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public VersionKind findValueByNumber(int number) { + return VersionKind.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.Version.getDescriptor().getEnumTypes().get(0); + } + + private static final VersionKind[] VALUES = values(); + + public static VersionKind valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private VersionKind(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.Version.VersionKind) + } + + public static final int EPOCH_FIELD_NUMBER = 1; + private int epoch_ = 0; + /** + *
+   * Used to correct mistakes in the version numbering scheme.
+   * 
+ * + * int32 epoch = 1; + * @return The epoch. + */ + @java.lang.Override + public int getEpoch() { + return epoch_; + } + + public static final int NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required only when version kind is NORMAL. The main part of the version
+   * name.
+   * 
+ * + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required only when version kind is NORMAL. The main part of the version
+   * name.
+   * 
+ * + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object revision_ = ""; + /** + *
+   * The iteration of the package build from the above version.
+   * 
+ * + * string revision = 3; + * @return The revision. + */ + @java.lang.Override + public java.lang.String getRevision() { + java.lang.Object ref = revision_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revision_ = s; + return s; + } + } + /** + *
+   * The iteration of the package build from the above version.
+   * 
+ * + * string revision = 3; + * @return The bytes for revision. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRevisionBytes() { + java.lang.Object ref = revision_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INCLUSIVE_FIELD_NUMBER = 6; + private boolean inclusive_ = false; + /** + *
+   * Whether this version is specifying part of an inclusive range. Grafeas
+   * does not have the capability to specify version ranges; instead we have
+   * fields that specify start version and end versions. At times this is
+   * insufficient - we also need to specify whether the version is included in
+   * the range or is excluded from the range. This boolean is expected to be set
+   * to true when the version is included in a range.
+   * 
+ * + * bool inclusive = 6; + * @return The inclusive. + */ + @java.lang.Override + public boolean getInclusive() { + return inclusive_; + } + + public static final int KIND_FIELD_NUMBER = 4; + private int kind_ = 0; + /** + *
+   * Required. Distinguishes between sentinel MIN/MAX versions and normal
+   * versions.
+   * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+   * Required. Distinguishes between sentinel MIN/MAX versions and normal
+   * versions.
+   * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @return The kind. + */ + @java.lang.Override public io.grafeas.v1.Version.VersionKind getKind() { + io.grafeas.v1.Version.VersionKind result = io.grafeas.v1.Version.VersionKind.forNumber(kind_); + return result == null ? io.grafeas.v1.Version.VersionKind.UNRECOGNIZED : result; + } + + public static final int FULL_NAME_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object fullName_ = ""; + /** + *
+   * Human readable version string. This string is of the form
+   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+   * 
+ * + * string full_name = 5; + * @return The fullName. + */ + @java.lang.Override + public java.lang.String getFullName() { + java.lang.Object ref = fullName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullName_ = s; + return s; + } + } + /** + *
+   * Human readable version string. This string is of the form
+   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+   * 
+ * + * string full_name = 5; + * @return The bytes for fullName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFullNameBytes() { + java.lang.Object ref = fullName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (epoch_ != 0) { + output.writeInt32(1, epoch_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, revision_); + } + if (kind_ != io.grafeas.v1.Version.VersionKind.VERSION_KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(4, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fullName_); + } + if (inclusive_ != false) { + output.writeBool(6, inclusive_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (epoch_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, epoch_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, revision_); + } + if (kind_ != io.grafeas.v1.Version.VersionKind.VERSION_KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, fullName_); + } + if (inclusive_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, inclusive_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Version)) { + return super.equals(obj); + } + io.grafeas.v1.Version other = (io.grafeas.v1.Version) obj; + + if (getEpoch() + != other.getEpoch()) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getRevision() + .equals(other.getRevision())) return false; + if (getInclusive() + != other.getInclusive()) return false; + if (kind_ != other.kind_) return false; + if (!getFullName() + .equals(other.getFullName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EPOCH_FIELD_NUMBER; + hash = (53 * hash) + getEpoch(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REVISION_FIELD_NUMBER; + hash = (53 * hash) + getRevision().hashCode(); + hash = (37 * hash) + INCLUSIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getInclusive()); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + kind_; + hash = (37 * hash) + FULL_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFullName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Version parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Version parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Version parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Version parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Version parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Version parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Version parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Version parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Version parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Version parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Version parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Version parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Version prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Version contains structured information about the version of a package.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Version} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Version) + io.grafeas.v1.VersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Version.class, io.grafeas.v1.Version.Builder.class); + } + + // Construct using io.grafeas.v1.Version.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + epoch_ = 0; + name_ = ""; + revision_ = ""; + inclusive_ = false; + kind_ = 0; + fullName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Version getDefaultInstanceForType() { + return io.grafeas.v1.Version.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Version build() { + io.grafeas.v1.Version result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Version buildPartial() { + io.grafeas.v1.Version result = new io.grafeas.v1.Version(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Version result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.epoch_ = epoch_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.revision_ = revision_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.inclusive_ = inclusive_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.fullName_ = fullName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Version) { + return mergeFrom((io.grafeas.v1.Version)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Version other) { + if (other == io.grafeas.v1.Version.getDefaultInstance()) return this; + if (other.getEpoch() != 0) { + setEpoch(other.getEpoch()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRevision().isEmpty()) { + revision_ = other.revision_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getInclusive() != false) { + setInclusive(other.getInclusive()); + } + if (other.kind_ != 0) { + setKindValue(other.getKindValue()); + } + if (!other.getFullName().isEmpty()) { + fullName_ = other.fullName_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + epoch_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + revision_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + kind_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 32 + case 42: { + fullName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 48: { + inclusive_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 48 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int epoch_ ; + /** + *
+     * Used to correct mistakes in the version numbering scheme.
+     * 
+ * + * int32 epoch = 1; + * @return The epoch. + */ + @java.lang.Override + public int getEpoch() { + return epoch_; + } + /** + *
+     * Used to correct mistakes in the version numbering scheme.
+     * 
+ * + * int32 epoch = 1; + * @param value The epoch to set. + * @return This builder for chaining. + */ + public Builder setEpoch(int value) { + + epoch_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Used to correct mistakes in the version numbering scheme.
+     * 
+ * + * int32 epoch = 1; + * @return This builder for chaining. + */ + public Builder clearEpoch() { + bitField0_ = (bitField0_ & ~0x00000001); + epoch_ = 0; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required only when version kind is NORMAL. The main part of the version
+     * name.
+     * 
+ * + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required only when version kind is NORMAL. The main part of the version
+     * name.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required only when version kind is NORMAL. The main part of the version
+     * name.
+     * 
+ * + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required only when version kind is NORMAL. The main part of the version
+     * name.
+     * 
+ * + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Required only when version kind is NORMAL. The main part of the version
+     * name.
+     * 
+ * + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object revision_ = ""; + /** + *
+     * The iteration of the package build from the above version.
+     * 
+ * + * string revision = 3; + * @return The revision. + */ + public java.lang.String getRevision() { + java.lang.Object ref = revision_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revision_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The iteration of the package build from the above version.
+     * 
+ * + * string revision = 3; + * @return The bytes for revision. + */ + public com.google.protobuf.ByteString + getRevisionBytes() { + java.lang.Object ref = revision_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The iteration of the package build from the above version.
+     * 
+ * + * string revision = 3; + * @param value The revision to set. + * @return This builder for chaining. + */ + public Builder setRevision( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + revision_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The iteration of the package build from the above version.
+     * 
+ * + * string revision = 3; + * @return This builder for chaining. + */ + public Builder clearRevision() { + revision_ = getDefaultInstance().getRevision(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The iteration of the package build from the above version.
+     * 
+ * + * string revision = 3; + * @param value The bytes for revision to set. + * @return This builder for chaining. + */ + public Builder setRevisionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + revision_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean inclusive_ ; + /** + *
+     * Whether this version is specifying part of an inclusive range. Grafeas
+     * does not have the capability to specify version ranges; instead we have
+     * fields that specify start version and end versions. At times this is
+     * insufficient - we also need to specify whether the version is included in
+     * the range or is excluded from the range. This boolean is expected to be set
+     * to true when the version is included in a range.
+     * 
+ * + * bool inclusive = 6; + * @return The inclusive. + */ + @java.lang.Override + public boolean getInclusive() { + return inclusive_; + } + /** + *
+     * Whether this version is specifying part of an inclusive range. Grafeas
+     * does not have the capability to specify version ranges; instead we have
+     * fields that specify start version and end versions. At times this is
+     * insufficient - we also need to specify whether the version is included in
+     * the range or is excluded from the range. This boolean is expected to be set
+     * to true when the version is included in a range.
+     * 
+ * + * bool inclusive = 6; + * @param value The inclusive to set. + * @return This builder for chaining. + */ + public Builder setInclusive(boolean value) { + + inclusive_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Whether this version is specifying part of an inclusive range. Grafeas
+     * does not have the capability to specify version ranges; instead we have
+     * fields that specify start version and end versions. At times this is
+     * insufficient - we also need to specify whether the version is included in
+     * the range or is excluded from the range. This boolean is expected to be set
+     * to true when the version is included in a range.
+     * 
+ * + * bool inclusive = 6; + * @return This builder for chaining. + */ + public Builder clearInclusive() { + bitField0_ = (bitField0_ & ~0x00000008); + inclusive_ = false; + onChanged(); + return this; + } + + private int kind_ = 0; + /** + *
+     * Required. Distinguishes between sentinel MIN/MAX versions and normal
+     * versions.
+     * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+     * Required. Distinguishes between sentinel MIN/MAX versions and normal
+     * versions.
+     * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @param value The enum numeric value on the wire for kind to set. + * @return This builder for chaining. + */ + public Builder setKindValue(int value) { + kind_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Required. Distinguishes between sentinel MIN/MAX versions and normal
+     * versions.
+     * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @return The kind. + */ + @java.lang.Override + public io.grafeas.v1.Version.VersionKind getKind() { + io.grafeas.v1.Version.VersionKind result = io.grafeas.v1.Version.VersionKind.forNumber(kind_); + return result == null ? io.grafeas.v1.Version.VersionKind.UNRECOGNIZED : result; + } + /** + *
+     * Required. Distinguishes between sentinel MIN/MAX versions and normal
+     * versions.
+     * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(io.grafeas.v1.Version.VersionKind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Required. Distinguishes between sentinel MIN/MAX versions and normal
+     * versions.
+     * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @return This builder for chaining. + */ + public Builder clearKind() { + bitField0_ = (bitField0_ & ~0x00000010); + kind_ = 0; + onChanged(); + return this; + } + + private java.lang.Object fullName_ = ""; + /** + *
+     * Human readable version string. This string is of the form
+     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+     * 
+ * + * string full_name = 5; + * @return The fullName. + */ + public java.lang.String getFullName() { + java.lang.Object ref = fullName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Human readable version string. This string is of the form
+     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+     * 
+ * + * string full_name = 5; + * @return The bytes for fullName. + */ + public com.google.protobuf.ByteString + getFullNameBytes() { + java.lang.Object ref = fullName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Human readable version string. This string is of the form
+     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+     * 
+ * + * string full_name = 5; + * @param value The fullName to set. + * @return This builder for chaining. + */ + public Builder setFullName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fullName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Human readable version string. This string is of the form
+     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+     * 
+ * + * string full_name = 5; + * @return This builder for chaining. + */ + public Builder clearFullName() { + fullName_ = getDefaultInstance().getFullName(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Human readable version string. This string is of the form
+     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+     * 
+ * + * string full_name = 5; + * @param value The bytes for fullName to set. + * @return This builder for chaining. + */ + public Builder setFullNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fullName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Version) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Version) + private static final io.grafeas.v1.Version DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Version(); + } + + public static io.grafeas.v1.Version getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Version parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Version getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java new file mode 100644 index 000000000000..07895ef1f299 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +public interface VersionOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Version) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Used to correct mistakes in the version numbering scheme.
+   * 
+ * + * int32 epoch = 1; + * @return The epoch. + */ + int getEpoch(); + + /** + *
+   * Required only when version kind is NORMAL. The main part of the version
+   * name.
+   * 
+ * + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required only when version kind is NORMAL. The main part of the version
+   * name.
+   * 
+ * + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The iteration of the package build from the above version.
+   * 
+ * + * string revision = 3; + * @return The revision. + */ + java.lang.String getRevision(); + /** + *
+   * The iteration of the package build from the above version.
+   * 
+ * + * string revision = 3; + * @return The bytes for revision. + */ + com.google.protobuf.ByteString + getRevisionBytes(); + + /** + *
+   * Whether this version is specifying part of an inclusive range. Grafeas
+   * does not have the capability to specify version ranges; instead we have
+   * fields that specify start version and end versions. At times this is
+   * insufficient - we also need to specify whether the version is included in
+   * the range or is excluded from the range. This boolean is expected to be set
+   * to true when the version is included in a range.
+   * 
+ * + * bool inclusive = 6; + * @return The inclusive. + */ + boolean getInclusive(); + + /** + *
+   * Required. Distinguishes between sentinel MIN/MAX versions and normal
+   * versions.
+   * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + int getKindValue(); + /** + *
+   * Required. Distinguishes between sentinel MIN/MAX versions and normal
+   * versions.
+   * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @return The kind. + */ + io.grafeas.v1.Version.VersionKind getKind(); + + /** + *
+   * Human readable version string. This string is of the form
+   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+   * 
+ * + * string full_name = 5; + * @return The fullName. + */ + java.lang.String getFullName(); + /** + *
+   * Human readable version string. This string is of the form
+   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+   * 
+ * + * string full_name = 5; + * @return The bytes for fullName. + */ + com.google.protobuf.ByteString + getFullNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java new file mode 100644 index 000000000000..c98eefd77fd0 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java @@ -0,0 +1,171 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vulnerability.proto + +package io.grafeas.v1; + +public final class Vulnerability { + private Vulnerability() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\036grafeas/v1/vulnerability.proto\022\ngrafea" + + "s.v1\032\037google/api/field_behavior.proto\032\037g" + + "oogle/protobuf/timestamp.proto\032\027grafeas/" + + "v1/common.proto\032\025grafeas/v1/cvss.proto\032\030" + + "grafeas/v1/package.proto\032\031grafeas/v1/sev" + + "erity.proto\"\354\007\n\021VulnerabilityNote\022\022\n\ncvs" + + "s_score\030\001 \001(\002\022&\n\010severity\030\002 \001(\0162\024.grafea" + + "s.v1.Severity\0225\n\007details\030\003 \003(\0132$.grafeas" + + ".v1.VulnerabilityNote.Detail\022#\n\007cvss_v3\030" + + "\004 \001(\0132\022.grafeas.v1.CVSSv3\022D\n\017windows_det" + + "ails\030\005 \003(\0132+.grafeas.v1.VulnerabilityNot" + + "e.WindowsDetail\0226\n\022source_update_time\030\006 " + + "\001(\0132\032.google.protobuf.Timestamp\022-\n\014cvss_" + + "version\030\007 \001(\0162\027.grafeas.v1.CVSSVersion\022!" + + "\n\007cvss_v2\030\010 \001(\0132\020.grafeas.v1.CVSS\032\255\003\n\006De" + + "tail\022\025\n\rseverity_name\030\001 \001(\t\022\023\n\013descripti" + + "on\030\002 \001(\t\022\024\n\014package_type\030\003 \001(\t\022\030\n\020affect" + + "ed_cpe_uri\030\004 \001(\t\022\030\n\020affected_package\030\005 \001" + + "(\t\0223\n\026affected_version_start\030\006 \001(\0132\023.gra" + + "feas.v1.Version\0221\n\024affected_version_end\030" + + "\007 \001(\0132\023.grafeas.v1.Version\022\025\n\rfixed_cpe_" + + "uri\030\010 \001(\t\022\025\n\rfixed_package\030\t \001(\t\022*\n\rfixe" + + "d_version\030\n \001(\0132\023.grafeas.v1.Version\022\023\n\013" + + "is_obsolete\030\013 \001(\010\0226\n\022source_update_time\030" + + "\014 \001(\0132\032.google.protobuf.Timestamp\022\016\n\006sou" + + "rce\030\r \001(\t\022\016\n\006vendor\030\016 \001(\t\032\276\001\n\rWindowsDet" + + "ail\022\017\n\007cpe_uri\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\023\n\013de" + + "scription\030\003 \001(\t\022M\n\nfixing_kbs\030\004 \003(\01329.gr" + + "afeas.v1.VulnerabilityNote.WindowsDetail" + + ".KnowledgeBase\032*\n\rKnowledgeBase\022\014\n\004name\030" + + "\001 \001(\t\022\013\n\003url\030\002 \001(\t\"\257\006\n\027VulnerabilityOccu" + + "rrence\022\014\n\004type\030\001 \001(\t\022&\n\010severity\030\002 \001(\0162\024" + + ".grafeas.v1.Severity\022\022\n\ncvss_score\030\003 \001(\002" + + "\022 \n\006cvssv3\030\n \001(\0132\020.grafeas.v1.CVSS\022G\n\rpa" + + "ckage_issue\030\004 \003(\01320.grafeas.v1.Vulnerabi" + + "lityOccurrence.PackageIssue\022\031\n\021short_des" + + "cription\030\005 \001(\t\022\030\n\020long_description\030\006 \001(\t" + + "\022,\n\014related_urls\030\007 \003(\0132\026.grafeas.v1.Rela" + + "tedUrl\0220\n\022effective_severity\030\010 \001(\0162\024.gra" + + "feas.v1.Severity\022\025\n\rfix_available\030\t \001(\010\022" + + "-\n\014cvss_version\030\013 \001(\0162\027.grafeas.v1.CVSSV" + + "ersion\022!\n\007cvss_v2\030\014 \001(\0132\020.grafeas.v1.CVS" + + "S\032\340\002\n\014PackageIssue\022\030\n\020affected_cpe_uri\030\001" + + " \001(\t\022\030\n\020affected_package\030\002 \001(\t\022-\n\020affect" + + "ed_version\030\003 \001(\0132\023.grafeas.v1.Version\022\025\n" + + "\rfixed_cpe_uri\030\004 \001(\t\022\025\n\rfixed_package\030\005 " + + "\001(\t\022*\n\rfixed_version\030\006 \001(\0132\023.grafeas.v1." + + "Version\022\025\n\rfix_available\030\007 \001(\010\022\024\n\014packag" + + "e_type\030\010 \001(\t\0225\n\022effective_severity\030\t \001(\016" + + "2\024.grafeas.v1.SeverityB\003\340A\003\022/\n\rfile_loca" + + "tion\030\n \003(\0132\030.grafeas.v1.FileLocationBQ\n\r" + + "io.grafeas.v1P\001Z8google.golang.org/genpr" + + "oto/googleapis/grafeas/v1;grafeas\242\002\003GRAb" + + "\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + io.grafeas.v1.Common.getDescriptor(), + io.grafeas.v1.CVSSProto.getDescriptor(), + io.grafeas.v1.Package.getDescriptor(), + io.grafeas.v1.SeverityOuterClass.getDescriptor(), + }); + internal_static_grafeas_v1_VulnerabilityNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityNote_descriptor, + new java.lang.String[] { "CvssScore", "Severity", "Details", "CvssV3", "WindowsDetails", "SourceUpdateTime", "CvssVersion", "CvssV2", }); + internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor = + internal_static_grafeas_v1_VulnerabilityNote_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor, + new java.lang.String[] { "SeverityName", "Description", "PackageType", "AffectedCpeUri", "AffectedPackage", "AffectedVersionStart", "AffectedVersionEnd", "FixedCpeUri", "FixedPackage", "FixedVersion", "IsObsolete", "SourceUpdateTime", "Source", "Vendor", }); + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor = + internal_static_grafeas_v1_VulnerabilityNote_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor, + new java.lang.String[] { "CpeUri", "Name", "Description", "FixingKbs", }); + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor = + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor, + new java.lang.String[] { "Name", "Url", }); + internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor, + new java.lang.String[] { "Type", "Severity", "CvssScore", "Cvssv3", "PackageIssue", "ShortDescription", "LongDescription", "RelatedUrls", "EffectiveSeverity", "FixAvailable", "CvssVersion", "CvssV2", }); + internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor = + internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor, + new java.lang.String[] { "AffectedCpeUri", "AffectedPackage", "AffectedVersion", "FixedCpeUri", "FixedPackage", "FixedVersion", "FixAvailable", "PackageType", "EffectiveSeverity", "FileLocation", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + io.grafeas.v1.Common.getDescriptor(); + io.grafeas.v1.CVSSProto.getDescriptor(); + io.grafeas.v1.Package.getDescriptor(); + io.grafeas.v1.SeverityOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java new file mode 100644 index 000000000000..30c6784762cc --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java @@ -0,0 +1,8231 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vulnerability.proto + +package io.grafeas.v1; + +/** + *
+ * A security vulnerability that can be found in resources.
+ * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityNote} + */ +public final class VulnerabilityNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote) + VulnerabilityNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use VulnerabilityNote.newBuilder() to construct. + private VulnerabilityNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VulnerabilityNote() { + severity_ = 0; + details_ = java.util.Collections.emptyList(); + windowsDetails_ = java.util.Collections.emptyList(); + cvssVersion_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VulnerabilityNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.class, io.grafeas.v1.VulnerabilityNote.Builder.class); + } + + public interface DetailOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote.Detail) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The distro assigned severity of this vulnerability.
+     * 
+ * + * string severity_name = 1; + * @return The severityName. + */ + java.lang.String getSeverityName(); + /** + *
+     * The distro assigned severity of this vulnerability.
+     * 
+ * + * string severity_name = 1; + * @return The bytes for severityName. + */ + com.google.protobuf.ByteString + getSeverityNameBytes(); + + /** + *
+     * A vendor-specific description of this vulnerability.
+     * 
+ * + * string description = 2; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+     * A vendor-specific description of this vulnerability.
+     * 
+ * + * string description = 2; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3; + * @return The packageType. + */ + java.lang.String getPackageType(); + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3; + * @return The bytes for packageType. + */ + com.google.protobuf.ByteString + getPackageTypeBytes(); + + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string affected_cpe_uri = 4; + * @return The affectedCpeUri. + */ + java.lang.String getAffectedCpeUri(); + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string affected_cpe_uri = 4; + * @return The bytes for affectedCpeUri. + */ + com.google.protobuf.ByteString + getAffectedCpeUriBytes(); + + /** + *
+     * Required. The package this vulnerability affects.
+     * 
+ * + * string affected_package = 5; + * @return The affectedPackage. + */ + java.lang.String getAffectedPackage(); + /** + *
+     * Required. The package this vulnerability affects.
+     * 
+ * + * string affected_package = 5; + * @return The bytes for affectedPackage. + */ + com.google.protobuf.ByteString + getAffectedPackageBytes(); + + /** + *
+     * The version number at the start of an interval in which this
+     * vulnerability exists. A vulnerability can affect a package between
+     * version numbers that are disjoint sets of intervals (example:
+     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+     * represented in its own Detail. If a specific affected version is provided
+     * by a vulnerability database, affected_version_start and
+     * affected_version_end will be the same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + * @return Whether the affectedVersionStart field is set. + */ + boolean hasAffectedVersionStart(); + /** + *
+     * The version number at the start of an interval in which this
+     * vulnerability exists. A vulnerability can affect a package between
+     * version numbers that are disjoint sets of intervals (example:
+     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+     * represented in its own Detail. If a specific affected version is provided
+     * by a vulnerability database, affected_version_start and
+     * affected_version_end will be the same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + * @return The affectedVersionStart. + */ + io.grafeas.v1.Version getAffectedVersionStart(); + /** + *
+     * The version number at the start of an interval in which this
+     * vulnerability exists. A vulnerability can affect a package between
+     * version numbers that are disjoint sets of intervals (example:
+     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+     * represented in its own Detail. If a specific affected version is provided
+     * by a vulnerability database, affected_version_start and
+     * affected_version_end will be the same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + io.grafeas.v1.VersionOrBuilder getAffectedVersionStartOrBuilder(); + + /** + *
+     * The version number at the end of an interval in which this vulnerability
+     * exists. A vulnerability can affect a package between version numbers
+     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+     * own Detail. If a specific affected version is provided by a vulnerability
+     * database, affected_version_start and affected_version_end will be the
+     * same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + * @return Whether the affectedVersionEnd field is set. + */ + boolean hasAffectedVersionEnd(); + /** + *
+     * The version number at the end of an interval in which this vulnerability
+     * exists. A vulnerability can affect a package between version numbers
+     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+     * own Detail. If a specific affected version is provided by a vulnerability
+     * database, affected_version_start and affected_version_end will be the
+     * same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + * @return The affectedVersionEnd. + */ + io.grafeas.v1.Version getAffectedVersionEnd(); + /** + *
+     * The version number at the end of an interval in which this vulnerability
+     * exists. A vulnerability can affect a package between version numbers
+     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+     * own Detail. If a specific affected version is provided by a vulnerability
+     * database, affected_version_start and affected_version_end will be the
+     * same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + io.grafeas.v1.VersionOrBuilder getAffectedVersionEndOrBuilder(); + + /** + *
+     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+     * to update to that contains a fix for this vulnerability. It is possible
+     * for this to be different from the affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 8; + * @return The fixedCpeUri. + */ + java.lang.String getFixedCpeUri(); + /** + *
+     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+     * to update to that contains a fix for this vulnerability. It is possible
+     * for this to be different from the affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 8; + * @return The bytes for fixedCpeUri. + */ + com.google.protobuf.ByteString + getFixedCpeUriBytes(); + + /** + *
+     * The distro recommended package to update to that contains a fix for this
+     * vulnerability. It is possible for this to be different from the
+     * affected_package.
+     * 
+ * + * string fixed_package = 9; + * @return The fixedPackage. + */ + java.lang.String getFixedPackage(); + /** + *
+     * The distro recommended package to update to that contains a fix for this
+     * vulnerability. It is possible for this to be different from the
+     * affected_package.
+     * 
+ * + * string fixed_package = 9; + * @return The bytes for fixedPackage. + */ + com.google.protobuf.ByteString + getFixedPackageBytes(); + + /** + *
+     * The distro recommended version to update to that contains a
+     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+     * such version is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 10; + * @return Whether the fixedVersion field is set. + */ + boolean hasFixedVersion(); + /** + *
+     * The distro recommended version to update to that contains a
+     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+     * such version is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 10; + * @return The fixedVersion. + */ + io.grafeas.v1.Version getFixedVersion(); + /** + *
+     * The distro recommended version to update to that contains a
+     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+     * such version is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder(); + + /** + *
+     * Whether this detail is obsolete. Occurrences are expected not to point to
+     * obsolete details.
+     * 
+ * + * bool is_obsolete = 11; + * @return The isObsolete. + */ + boolean getIsObsolete(); + + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * @return Whether the sourceUpdateTime field is set. + */ + boolean hasSourceUpdateTime(); + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * @return The sourceUpdateTime. + */ + com.google.protobuf.Timestamp getSourceUpdateTime(); + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder(); + + /** + *
+     * The source from which the information in this Detail was obtained.
+     * 
+ * + * string source = 13; + * @return The source. + */ + java.lang.String getSource(); + /** + *
+     * The source from which the information in this Detail was obtained.
+     * 
+ * + * string source = 13; + * @return The bytes for source. + */ + com.google.protobuf.ByteString + getSourceBytes(); + + /** + *
+     * The name of the vendor of the product.
+     * 
+ * + * string vendor = 14; + * @return The vendor. + */ + java.lang.String getVendor(); + /** + *
+     * The name of the vendor of the product.
+     * 
+ * + * string vendor = 14; + * @return The bytes for vendor. + */ + com.google.protobuf.ByteString + getVendorBytes(); + } + /** + *
+   * A detail for a distro and package affected by this vulnerability and its
+   * associated fix (if one is available).
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityNote.Detail} + */ + public static final class Detail extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote.Detail) + DetailOrBuilder { + private static final long serialVersionUID = 0L; + // Use Detail.newBuilder() to construct. + private Detail(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Detail() { + severityName_ = ""; + description_ = ""; + packageType_ = ""; + affectedCpeUri_ = ""; + affectedPackage_ = ""; + fixedCpeUri_ = ""; + fixedPackage_ = ""; + source_ = ""; + vendor_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Detail(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.Detail.class, io.grafeas.v1.VulnerabilityNote.Detail.Builder.class); + } + + public static final int SEVERITY_NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object severityName_ = ""; + /** + *
+     * The distro assigned severity of this vulnerability.
+     * 
+ * + * string severity_name = 1; + * @return The severityName. + */ + @java.lang.Override + public java.lang.String getSeverityName() { + java.lang.Object ref = severityName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + severityName_ = s; + return s; + } + } + /** + *
+     * The distro assigned severity of this vulnerability.
+     * 
+ * + * string severity_name = 1; + * @return The bytes for severityName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSeverityNameBytes() { + java.lang.Object ref = severityName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + severityName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+     * A vendor-specific description of this vulnerability.
+     * 
+ * + * string description = 2; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+     * A vendor-specific description of this vulnerability.
+     * 
+ * + * string description = 2; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PACKAGE_TYPE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object packageType_ = ""; + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3; + * @return The packageType. + */ + @java.lang.Override + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3; + * @return The bytes for packageType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AFFECTED_CPE_URI_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object affectedCpeUri_ = ""; + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string affected_cpe_uri = 4; + * @return The affectedCpeUri. + */ + @java.lang.Override + public java.lang.String getAffectedCpeUri() { + java.lang.Object ref = affectedCpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedCpeUri_ = s; + return s; + } + } + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string affected_cpe_uri = 4; + * @return The bytes for affectedCpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAffectedCpeUriBytes() { + java.lang.Object ref = affectedCpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AFFECTED_PACKAGE_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object affectedPackage_ = ""; + /** + *
+     * Required. The package this vulnerability affects.
+     * 
+ * + * string affected_package = 5; + * @return The affectedPackage. + */ + @java.lang.Override + public java.lang.String getAffectedPackage() { + java.lang.Object ref = affectedPackage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedPackage_ = s; + return s; + } + } + /** + *
+     * Required. The package this vulnerability affects.
+     * 
+ * + * string affected_package = 5; + * @return The bytes for affectedPackage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAffectedPackageBytes() { + java.lang.Object ref = affectedPackage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AFFECTED_VERSION_START_FIELD_NUMBER = 6; + private io.grafeas.v1.Version affectedVersionStart_; + /** + *
+     * The version number at the start of an interval in which this
+     * vulnerability exists. A vulnerability can affect a package between
+     * version numbers that are disjoint sets of intervals (example:
+     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+     * represented in its own Detail. If a specific affected version is provided
+     * by a vulnerability database, affected_version_start and
+     * affected_version_end will be the same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + * @return Whether the affectedVersionStart field is set. + */ + @java.lang.Override + public boolean hasAffectedVersionStart() { + return affectedVersionStart_ != null; + } + /** + *
+     * The version number at the start of an interval in which this
+     * vulnerability exists. A vulnerability can affect a package between
+     * version numbers that are disjoint sets of intervals (example:
+     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+     * represented in its own Detail. If a specific affected version is provided
+     * by a vulnerability database, affected_version_start and
+     * affected_version_end will be the same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + * @return The affectedVersionStart. + */ + @java.lang.Override + public io.grafeas.v1.Version getAffectedVersionStart() { + return affectedVersionStart_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; + } + /** + *
+     * The version number at the start of an interval in which this
+     * vulnerability exists. A vulnerability can affect a package between
+     * version numbers that are disjoint sets of intervals (example:
+     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+     * represented in its own Detail. If a specific affected version is provided
+     * by a vulnerability database, affected_version_start and
+     * affected_version_end will be the same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getAffectedVersionStartOrBuilder() { + return affectedVersionStart_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; + } + + public static final int AFFECTED_VERSION_END_FIELD_NUMBER = 7; + private io.grafeas.v1.Version affectedVersionEnd_; + /** + *
+     * The version number at the end of an interval in which this vulnerability
+     * exists. A vulnerability can affect a package between version numbers
+     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+     * own Detail. If a specific affected version is provided by a vulnerability
+     * database, affected_version_start and affected_version_end will be the
+     * same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + * @return Whether the affectedVersionEnd field is set. + */ + @java.lang.Override + public boolean hasAffectedVersionEnd() { + return affectedVersionEnd_ != null; + } + /** + *
+     * The version number at the end of an interval in which this vulnerability
+     * exists. A vulnerability can affect a package between version numbers
+     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+     * own Detail. If a specific affected version is provided by a vulnerability
+     * database, affected_version_start and affected_version_end will be the
+     * same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + * @return The affectedVersionEnd. + */ + @java.lang.Override + public io.grafeas.v1.Version getAffectedVersionEnd() { + return affectedVersionEnd_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; + } + /** + *
+     * The version number at the end of an interval in which this vulnerability
+     * exists. A vulnerability can affect a package between version numbers
+     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+     * own Detail. If a specific affected version is provided by a vulnerability
+     * database, affected_version_start and affected_version_end will be the
+     * same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getAffectedVersionEndOrBuilder() { + return affectedVersionEnd_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; + } + + public static final int FIXED_CPE_URI_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object fixedCpeUri_ = ""; + /** + *
+     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+     * to update to that contains a fix for this vulnerability. It is possible
+     * for this to be different from the affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 8; + * @return The fixedCpeUri. + */ + @java.lang.Override + public java.lang.String getFixedCpeUri() { + java.lang.Object ref = fixedCpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedCpeUri_ = s; + return s; + } + } + /** + *
+     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+     * to update to that contains a fix for this vulnerability. It is possible
+     * for this to be different from the affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 8; + * @return The bytes for fixedCpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFixedCpeUriBytes() { + java.lang.Object ref = fixedCpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIXED_PACKAGE_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private volatile java.lang.Object fixedPackage_ = ""; + /** + *
+     * The distro recommended package to update to that contains a fix for this
+     * vulnerability. It is possible for this to be different from the
+     * affected_package.
+     * 
+ * + * string fixed_package = 9; + * @return The fixedPackage. + */ + @java.lang.Override + public java.lang.String getFixedPackage() { + java.lang.Object ref = fixedPackage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedPackage_ = s; + return s; + } + } + /** + *
+     * The distro recommended package to update to that contains a fix for this
+     * vulnerability. It is possible for this to be different from the
+     * affected_package.
+     * 
+ * + * string fixed_package = 9; + * @return The bytes for fixedPackage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFixedPackageBytes() { + java.lang.Object ref = fixedPackage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIXED_VERSION_FIELD_NUMBER = 10; + private io.grafeas.v1.Version fixedVersion_; + /** + *
+     * The distro recommended version to update to that contains a
+     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+     * such version is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 10; + * @return Whether the fixedVersion field is set. + */ + @java.lang.Override + public boolean hasFixedVersion() { + return fixedVersion_ != null; + } + /** + *
+     * The distro recommended version to update to that contains a
+     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+     * such version is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 10; + * @return The fixedVersion. + */ + @java.lang.Override + public io.grafeas.v1.Version getFixedVersion() { + return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } + /** + *
+     * The distro recommended version to update to that contains a
+     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+     * such version is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { + return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } + + public static final int IS_OBSOLETE_FIELD_NUMBER = 11; + private boolean isObsolete_ = false; + /** + *
+     * Whether this detail is obsolete. Occurrences are expected not to point to
+     * obsolete details.
+     * 
+ * + * bool is_obsolete = 11; + * @return The isObsolete. + */ + @java.lang.Override + public boolean getIsObsolete() { + return isObsolete_; + } + + public static final int SOURCE_UPDATE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp sourceUpdateTime_; + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * @return Whether the sourceUpdateTime field is set. + */ + @java.lang.Override + public boolean hasSourceUpdateTime() { + return sourceUpdateTime_ != null; + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * @return The sourceUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSourceUpdateTime() { + return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { + return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } + + public static final int SOURCE_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private volatile java.lang.Object source_ = ""; + /** + *
+     * The source from which the information in this Detail was obtained.
+     * 
+ * + * string source = 13; + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } + } + /** + *
+     * The source from which the information in this Detail was obtained.
+     * 
+ * + * string source = 13; + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VENDOR_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private volatile java.lang.Object vendor_ = ""; + /** + *
+     * The name of the vendor of the product.
+     * 
+ * + * string vendor = 14; + * @return The vendor. + */ + @java.lang.Override + public java.lang.String getVendor() { + java.lang.Object ref = vendor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vendor_ = s; + return s; + } + } + /** + *
+     * The name of the vendor of the product.
+     * 
+ * + * string vendor = 14; + * @return The bytes for vendor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVendorBytes() { + java.lang.Object ref = vendor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + vendor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severityName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, severityName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, packageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, affectedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, affectedPackage_); + } + if (affectedVersionStart_ != null) { + output.writeMessage(6, getAffectedVersionStart()); + } + if (affectedVersionEnd_ != null) { + output.writeMessage(7, getAffectedVersionEnd()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, fixedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, fixedPackage_); + } + if (fixedVersion_ != null) { + output.writeMessage(10, getFixedVersion()); + } + if (isObsolete_ != false) { + output.writeBool(11, isObsolete_); + } + if (sourceUpdateTime_ != null) { + output.writeMessage(12, getSourceUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, source_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vendor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, vendor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severityName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, severityName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, packageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, affectedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, affectedPackage_); + } + if (affectedVersionStart_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getAffectedVersionStart()); + } + if (affectedVersionEnd_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getAffectedVersionEnd()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, fixedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, fixedPackage_); + } + if (fixedVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getFixedVersion()); + } + if (isObsolete_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(11, isObsolete_); + } + if (sourceUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getSourceUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, source_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vendor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, vendor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityNote.Detail)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityNote.Detail other = (io.grafeas.v1.VulnerabilityNote.Detail) obj; + + if (!getSeverityName() + .equals(other.getSeverityName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getPackageType() + .equals(other.getPackageType())) return false; + if (!getAffectedCpeUri() + .equals(other.getAffectedCpeUri())) return false; + if (!getAffectedPackage() + .equals(other.getAffectedPackage())) return false; + if (hasAffectedVersionStart() != other.hasAffectedVersionStart()) return false; + if (hasAffectedVersionStart()) { + if (!getAffectedVersionStart() + .equals(other.getAffectedVersionStart())) return false; + } + if (hasAffectedVersionEnd() != other.hasAffectedVersionEnd()) return false; + if (hasAffectedVersionEnd()) { + if (!getAffectedVersionEnd() + .equals(other.getAffectedVersionEnd())) return false; + } + if (!getFixedCpeUri() + .equals(other.getFixedCpeUri())) return false; + if (!getFixedPackage() + .equals(other.getFixedPackage())) return false; + if (hasFixedVersion() != other.hasFixedVersion()) return false; + if (hasFixedVersion()) { + if (!getFixedVersion() + .equals(other.getFixedVersion())) return false; + } + if (getIsObsolete() + != other.getIsObsolete()) return false; + if (hasSourceUpdateTime() != other.hasSourceUpdateTime()) return false; + if (hasSourceUpdateTime()) { + if (!getSourceUpdateTime() + .equals(other.getSourceUpdateTime())) return false; + } + if (!getSource() + .equals(other.getSource())) return false; + if (!getVendor() + .equals(other.getVendor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SEVERITY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getSeverityName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPackageType().hashCode(); + hash = (37 * hash) + AFFECTED_CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getAffectedCpeUri().hashCode(); + hash = (37 * hash) + AFFECTED_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getAffectedPackage().hashCode(); + if (hasAffectedVersionStart()) { + hash = (37 * hash) + AFFECTED_VERSION_START_FIELD_NUMBER; + hash = (53 * hash) + getAffectedVersionStart().hashCode(); + } + if (hasAffectedVersionEnd()) { + hash = (37 * hash) + AFFECTED_VERSION_END_FIELD_NUMBER; + hash = (53 * hash) + getAffectedVersionEnd().hashCode(); + } + hash = (37 * hash) + FIXED_CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getFixedCpeUri().hashCode(); + hash = (37 * hash) + FIXED_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getFixedPackage().hashCode(); + if (hasFixedVersion()) { + hash = (37 * hash) + FIXED_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getFixedVersion().hashCode(); + } + hash = (37 * hash) + IS_OBSOLETE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsObsolete()); + if (hasSourceUpdateTime()) { + hash = (37 * hash) + SOURCE_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSourceUpdateTime().hashCode(); + } + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + hash = (37 * hash) + VENDOR_FIELD_NUMBER; + hash = (53 * hash) + getVendor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote.Detail prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A detail for a distro and package affected by this vulnerability and its
+     * associated fix (if one is available).
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityNote.Detail} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote.Detail) + io.grafeas.v1.VulnerabilityNote.DetailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.Detail.class, io.grafeas.v1.VulnerabilityNote.Detail.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityNote.Detail.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + severityName_ = ""; + description_ = ""; + packageType_ = ""; + affectedCpeUri_ = ""; + affectedPackage_ = ""; + affectedVersionStart_ = null; + if (affectedVersionStartBuilder_ != null) { + affectedVersionStartBuilder_.dispose(); + affectedVersionStartBuilder_ = null; + } + affectedVersionEnd_ = null; + if (affectedVersionEndBuilder_ != null) { + affectedVersionEndBuilder_.dispose(); + affectedVersionEndBuilder_ = null; + } + fixedCpeUri_ = ""; + fixedPackage_ = ""; + fixedVersion_ = null; + if (fixedVersionBuilder_ != null) { + fixedVersionBuilder_.dispose(); + fixedVersionBuilder_ = null; + } + isObsolete_ = false; + sourceUpdateTime_ = null; + if (sourceUpdateTimeBuilder_ != null) { + sourceUpdateTimeBuilder_.dispose(); + sourceUpdateTimeBuilder_ = null; + } + source_ = ""; + vendor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.Detail getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.Detail build() { + io.grafeas.v1.VulnerabilityNote.Detail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.Detail buildPartial() { + io.grafeas.v1.VulnerabilityNote.Detail result = new io.grafeas.v1.VulnerabilityNote.Detail(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityNote.Detail result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.severityName_ = severityName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.packageType_ = packageType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.affectedCpeUri_ = affectedCpeUri_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.affectedPackage_ = affectedPackage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.affectedVersionStart_ = affectedVersionStartBuilder_ == null + ? affectedVersionStart_ + : affectedVersionStartBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.affectedVersionEnd_ = affectedVersionEndBuilder_ == null + ? affectedVersionEnd_ + : affectedVersionEndBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.fixedCpeUri_ = fixedCpeUri_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.fixedPackage_ = fixedPackage_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.fixedVersion_ = fixedVersionBuilder_ == null + ? fixedVersion_ + : fixedVersionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.isObsolete_ = isObsolete_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.sourceUpdateTime_ = sourceUpdateTimeBuilder_ == null + ? sourceUpdateTime_ + : sourceUpdateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.source_ = source_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.vendor_ = vendor_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityNote.Detail) { + return mergeFrom((io.grafeas.v1.VulnerabilityNote.Detail)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote.Detail other) { + if (other == io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance()) return this; + if (!other.getSeverityName().isEmpty()) { + severityName_ = other.severityName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPackageType().isEmpty()) { + packageType_ = other.packageType_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getAffectedCpeUri().isEmpty()) { + affectedCpeUri_ = other.affectedCpeUri_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getAffectedPackage().isEmpty()) { + affectedPackage_ = other.affectedPackage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasAffectedVersionStart()) { + mergeAffectedVersionStart(other.getAffectedVersionStart()); + } + if (other.hasAffectedVersionEnd()) { + mergeAffectedVersionEnd(other.getAffectedVersionEnd()); + } + if (!other.getFixedCpeUri().isEmpty()) { + fixedCpeUri_ = other.fixedCpeUri_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getFixedPackage().isEmpty()) { + fixedPackage_ = other.fixedPackage_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasFixedVersion()) { + mergeFixedVersion(other.getFixedVersion()); + } + if (other.getIsObsolete() != false) { + setIsObsolete(other.getIsObsolete()); + } + if (other.hasSourceUpdateTime()) { + mergeSourceUpdateTime(other.getSourceUpdateTime()); + } + if (!other.getSource().isEmpty()) { + source_ = other.source_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (!other.getVendor().isEmpty()) { + vendor_ = other.vendor_; + bitField0_ |= 0x00002000; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + severityName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + packageType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + affectedCpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + affectedPackage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getAffectedVersionStartFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getAffectedVersionEndFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + fixedCpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + fixedPackage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: { + input.readMessage( + getFixedVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 88: { + isObsolete_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 98: { + input.readMessage( + getSourceUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: { + vendor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 114 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object severityName_ = ""; + /** + *
+       * The distro assigned severity of this vulnerability.
+       * 
+ * + * string severity_name = 1; + * @return The severityName. + */ + public java.lang.String getSeverityName() { + java.lang.Object ref = severityName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + severityName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The distro assigned severity of this vulnerability.
+       * 
+ * + * string severity_name = 1; + * @return The bytes for severityName. + */ + public com.google.protobuf.ByteString + getSeverityNameBytes() { + java.lang.Object ref = severityName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + severityName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The distro assigned severity of this vulnerability.
+       * 
+ * + * string severity_name = 1; + * @param value The severityName to set. + * @return This builder for chaining. + */ + public Builder setSeverityName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + severityName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The distro assigned severity of this vulnerability.
+       * 
+ * + * string severity_name = 1; + * @return This builder for chaining. + */ + public Builder clearSeverityName() { + severityName_ = getDefaultInstance().getSeverityName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The distro assigned severity of this vulnerability.
+       * 
+ * + * string severity_name = 1; + * @param value The bytes for severityName to set. + * @return This builder for chaining. + */ + public Builder setSeverityNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + severityName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+       * A vendor-specific description of this vulnerability.
+       * 
+ * + * string description = 2; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A vendor-specific description of this vulnerability.
+       * 
+ * + * string description = 2; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A vendor-specific description of this vulnerability.
+       * 
+ * + * string description = 2; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * A vendor-specific description of this vulnerability.
+       * 
+ * + * string description = 2; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * A vendor-specific description of this vulnerability.
+       * 
+ * + * string description = 2; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object packageType_ = ""; + /** + *
+       * The type of package; whether native or non native (e.g., ruby gems,
+       * node.js packages, etc.).
+       * 
+ * + * string package_type = 3; + * @return The packageType. + */ + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The type of package; whether native or non native (e.g., ruby gems,
+       * node.js packages, etc.).
+       * 
+ * + * string package_type = 3; + * @return The bytes for packageType. + */ + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The type of package; whether native or non native (e.g., ruby gems,
+       * node.js packages, etc.).
+       * 
+ * + * string package_type = 3; + * @param value The packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + packageType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The type of package; whether native or non native (e.g., ruby gems,
+       * node.js packages, etc.).
+       * 
+ * + * string package_type = 3; + * @return This builder for chaining. + */ + public Builder clearPackageType() { + packageType_ = getDefaultInstance().getPackageType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * The type of package; whether native or non native (e.g., ruby gems,
+       * node.js packages, etc.).
+       * 
+ * + * string package_type = 3; + * @param value The bytes for packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + packageType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object affectedCpeUri_ = ""; + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string affected_cpe_uri = 4; + * @return The affectedCpeUri. + */ + public java.lang.String getAffectedCpeUri() { + java.lang.Object ref = affectedCpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedCpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string affected_cpe_uri = 4; + * @return The bytes for affectedCpeUri. + */ + public com.google.protobuf.ByteString + getAffectedCpeUriBytes() { + java.lang.Object ref = affectedCpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string affected_cpe_uri = 4; + * @param value The affectedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setAffectedCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + affectedCpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string affected_cpe_uri = 4; + * @return This builder for chaining. + */ + public Builder clearAffectedCpeUri() { + affectedCpeUri_ = getDefaultInstance().getAffectedCpeUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string affected_cpe_uri = 4; + * @param value The bytes for affectedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setAffectedCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + affectedCpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object affectedPackage_ = ""; + /** + *
+       * Required. The package this vulnerability affects.
+       * 
+ * + * string affected_package = 5; + * @return The affectedPackage. + */ + public java.lang.String getAffectedPackage() { + java.lang.Object ref = affectedPackage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedPackage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The package this vulnerability affects.
+       * 
+ * + * string affected_package = 5; + * @return The bytes for affectedPackage. + */ + public com.google.protobuf.ByteString + getAffectedPackageBytes() { + java.lang.Object ref = affectedPackage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The package this vulnerability affects.
+       * 
+ * + * string affected_package = 5; + * @param value The affectedPackage to set. + * @return This builder for chaining. + */ + public Builder setAffectedPackage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + affectedPackage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * Required. The package this vulnerability affects.
+       * 
+ * + * string affected_package = 5; + * @return This builder for chaining. + */ + public Builder clearAffectedPackage() { + affectedPackage_ = getDefaultInstance().getAffectedPackage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+       * Required. The package this vulnerability affects.
+       * 
+ * + * string affected_package = 5; + * @param value The bytes for affectedPackage to set. + * @return This builder for chaining. + */ + public Builder setAffectedPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + affectedPackage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private io.grafeas.v1.Version affectedVersionStart_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> affectedVersionStartBuilder_; + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + * @return Whether the affectedVersionStart field is set. + */ + public boolean hasAffectedVersionStart() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + * @return The affectedVersionStart. + */ + public io.grafeas.v1.Version getAffectedVersionStart() { + if (affectedVersionStartBuilder_ == null) { + return affectedVersionStart_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; + } else { + return affectedVersionStartBuilder_.getMessage(); + } + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + public Builder setAffectedVersionStart(io.grafeas.v1.Version value) { + if (affectedVersionStartBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + affectedVersionStart_ = value; + } else { + affectedVersionStartBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + public Builder setAffectedVersionStart( + io.grafeas.v1.Version.Builder builderForValue) { + if (affectedVersionStartBuilder_ == null) { + affectedVersionStart_ = builderForValue.build(); + } else { + affectedVersionStartBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + public Builder mergeAffectedVersionStart(io.grafeas.v1.Version value) { + if (affectedVersionStartBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + affectedVersionStart_ != null && + affectedVersionStart_ != io.grafeas.v1.Version.getDefaultInstance()) { + getAffectedVersionStartBuilder().mergeFrom(value); + } else { + affectedVersionStart_ = value; + } + } else { + affectedVersionStartBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + public Builder clearAffectedVersionStart() { + bitField0_ = (bitField0_ & ~0x00000020); + affectedVersionStart_ = null; + if (affectedVersionStartBuilder_ != null) { + affectedVersionStartBuilder_.dispose(); + affectedVersionStartBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + public io.grafeas.v1.Version.Builder getAffectedVersionStartBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getAffectedVersionStartFieldBuilder().getBuilder(); + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + public io.grafeas.v1.VersionOrBuilder getAffectedVersionStartOrBuilder() { + if (affectedVersionStartBuilder_ != null) { + return affectedVersionStartBuilder_.getMessageOrBuilder(); + } else { + return affectedVersionStart_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; + } + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getAffectedVersionStartFieldBuilder() { + if (affectedVersionStartBuilder_ == null) { + affectedVersionStartBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getAffectedVersionStart(), + getParentForChildren(), + isClean()); + affectedVersionStart_ = null; + } + return affectedVersionStartBuilder_; + } + + private io.grafeas.v1.Version affectedVersionEnd_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> affectedVersionEndBuilder_; + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + * @return Whether the affectedVersionEnd field is set. + */ + public boolean hasAffectedVersionEnd() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + * @return The affectedVersionEnd. + */ + public io.grafeas.v1.Version getAffectedVersionEnd() { + if (affectedVersionEndBuilder_ == null) { + return affectedVersionEnd_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; + } else { + return affectedVersionEndBuilder_.getMessage(); + } + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + public Builder setAffectedVersionEnd(io.grafeas.v1.Version value) { + if (affectedVersionEndBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + affectedVersionEnd_ = value; + } else { + affectedVersionEndBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + public Builder setAffectedVersionEnd( + io.grafeas.v1.Version.Builder builderForValue) { + if (affectedVersionEndBuilder_ == null) { + affectedVersionEnd_ = builderForValue.build(); + } else { + affectedVersionEndBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + public Builder mergeAffectedVersionEnd(io.grafeas.v1.Version value) { + if (affectedVersionEndBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + affectedVersionEnd_ != null && + affectedVersionEnd_ != io.grafeas.v1.Version.getDefaultInstance()) { + getAffectedVersionEndBuilder().mergeFrom(value); + } else { + affectedVersionEnd_ = value; + } + } else { + affectedVersionEndBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + public Builder clearAffectedVersionEnd() { + bitField0_ = (bitField0_ & ~0x00000040); + affectedVersionEnd_ = null; + if (affectedVersionEndBuilder_ != null) { + affectedVersionEndBuilder_.dispose(); + affectedVersionEndBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + public io.grafeas.v1.Version.Builder getAffectedVersionEndBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getAffectedVersionEndFieldBuilder().getBuilder(); + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + public io.grafeas.v1.VersionOrBuilder getAffectedVersionEndOrBuilder() { + if (affectedVersionEndBuilder_ != null) { + return affectedVersionEndBuilder_.getMessageOrBuilder(); + } else { + return affectedVersionEnd_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; + } + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getAffectedVersionEndFieldBuilder() { + if (affectedVersionEndBuilder_ == null) { + affectedVersionEndBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getAffectedVersionEnd(), + getParentForChildren(), + isClean()); + affectedVersionEnd_ = null; + } + return affectedVersionEndBuilder_; + } + + private java.lang.Object fixedCpeUri_ = ""; + /** + *
+       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+       * to update to that contains a fix for this vulnerability. It is possible
+       * for this to be different from the affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 8; + * @return The fixedCpeUri. + */ + public java.lang.String getFixedCpeUri() { + java.lang.Object ref = fixedCpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedCpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+       * to update to that contains a fix for this vulnerability. It is possible
+       * for this to be different from the affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 8; + * @return The bytes for fixedCpeUri. + */ + public com.google.protobuf.ByteString + getFixedCpeUriBytes() { + java.lang.Object ref = fixedCpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+       * to update to that contains a fix for this vulnerability. It is possible
+       * for this to be different from the affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 8; + * @param value The fixedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setFixedCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fixedCpeUri_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+       * to update to that contains a fix for this vulnerability. It is possible
+       * for this to be different from the affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 8; + * @return This builder for chaining. + */ + public Builder clearFixedCpeUri() { + fixedCpeUri_ = getDefaultInstance().getFixedCpeUri(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + *
+       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+       * to update to that contains a fix for this vulnerability. It is possible
+       * for this to be different from the affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 8; + * @param value The bytes for fixedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setFixedCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fixedCpeUri_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object fixedPackage_ = ""; + /** + *
+       * The distro recommended package to update to that contains a fix for this
+       * vulnerability. It is possible for this to be different from the
+       * affected_package.
+       * 
+ * + * string fixed_package = 9; + * @return The fixedPackage. + */ + public java.lang.String getFixedPackage() { + java.lang.Object ref = fixedPackage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedPackage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The distro recommended package to update to that contains a fix for this
+       * vulnerability. It is possible for this to be different from the
+       * affected_package.
+       * 
+ * + * string fixed_package = 9; + * @return The bytes for fixedPackage. + */ + public com.google.protobuf.ByteString + getFixedPackageBytes() { + java.lang.Object ref = fixedPackage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The distro recommended package to update to that contains a fix for this
+       * vulnerability. It is possible for this to be different from the
+       * affected_package.
+       * 
+ * + * string fixed_package = 9; + * @param value The fixedPackage to set. + * @return This builder for chaining. + */ + public Builder setFixedPackage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fixedPackage_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+       * The distro recommended package to update to that contains a fix for this
+       * vulnerability. It is possible for this to be different from the
+       * affected_package.
+       * 
+ * + * string fixed_package = 9; + * @return This builder for chaining. + */ + public Builder clearFixedPackage() { + fixedPackage_ = getDefaultInstance().getFixedPackage(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+       * The distro recommended package to update to that contains a fix for this
+       * vulnerability. It is possible for this to be different from the
+       * affected_package.
+       * 
+ * + * string fixed_package = 9; + * @param value The bytes for fixedPackage to set. + * @return This builder for chaining. + */ + public Builder setFixedPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fixedPackage_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private io.grafeas.v1.Version fixedVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> fixedVersionBuilder_; + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + * @return Whether the fixedVersion field is set. + */ + public boolean hasFixedVersion() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + * @return The fixedVersion. + */ + public io.grafeas.v1.Version getFixedVersion() { + if (fixedVersionBuilder_ == null) { + return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } else { + return fixedVersionBuilder_.getMessage(); + } + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + public Builder setFixedVersion(io.grafeas.v1.Version value) { + if (fixedVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fixedVersion_ = value; + } else { + fixedVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + public Builder setFixedVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (fixedVersionBuilder_ == null) { + fixedVersion_ = builderForValue.build(); + } else { + fixedVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + public Builder mergeFixedVersion(io.grafeas.v1.Version value) { + if (fixedVersionBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) && + fixedVersion_ != null && + fixedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { + getFixedVersionBuilder().mergeFrom(value); + } else { + fixedVersion_ = value; + } + } else { + fixedVersionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + public Builder clearFixedVersion() { + bitField0_ = (bitField0_ & ~0x00000200); + fixedVersion_ = null; + if (fixedVersionBuilder_ != null) { + fixedVersionBuilder_.dispose(); + fixedVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + public io.grafeas.v1.Version.Builder getFixedVersionBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getFixedVersionFieldBuilder().getBuilder(); + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { + if (fixedVersionBuilder_ != null) { + return fixedVersionBuilder_.getMessageOrBuilder(); + } else { + return fixedVersion_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getFixedVersionFieldBuilder() { + if (fixedVersionBuilder_ == null) { + fixedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getFixedVersion(), + getParentForChildren(), + isClean()); + fixedVersion_ = null; + } + return fixedVersionBuilder_; + } + + private boolean isObsolete_ ; + /** + *
+       * Whether this detail is obsolete. Occurrences are expected not to point to
+       * obsolete details.
+       * 
+ * + * bool is_obsolete = 11; + * @return The isObsolete. + */ + @java.lang.Override + public boolean getIsObsolete() { + return isObsolete_; + } + /** + *
+       * Whether this detail is obsolete. Occurrences are expected not to point to
+       * obsolete details.
+       * 
+ * + * bool is_obsolete = 11; + * @param value The isObsolete to set. + * @return This builder for chaining. + */ + public Builder setIsObsolete(boolean value) { + + isObsolete_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+       * Whether this detail is obsolete. Occurrences are expected not to point to
+       * obsolete details.
+       * 
+ * + * bool is_obsolete = 11; + * @return This builder for chaining. + */ + public Builder clearIsObsolete() { + bitField0_ = (bitField0_ & ~0x00000400); + isObsolete_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp sourceUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> sourceUpdateTimeBuilder_; + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * @return Whether the sourceUpdateTime field is set. + */ + public boolean hasSourceUpdateTime() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * @return The sourceUpdateTime. + */ + public com.google.protobuf.Timestamp getSourceUpdateTime() { + if (sourceUpdateTimeBuilder_ == null) { + return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } else { + return sourceUpdateTimeBuilder_.getMessage(); + } + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public Builder setSourceUpdateTime(com.google.protobuf.Timestamp value) { + if (sourceUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceUpdateTime_ = value; + } else { + sourceUpdateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public Builder setSourceUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTime_ = builderForValue.build(); + } else { + sourceUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public Builder mergeSourceUpdateTime(com.google.protobuf.Timestamp value) { + if (sourceUpdateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) && + sourceUpdateTime_ != null && + sourceUpdateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getSourceUpdateTimeBuilder().mergeFrom(value); + } else { + sourceUpdateTime_ = value; + } + } else { + sourceUpdateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public Builder clearSourceUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000800); + sourceUpdateTime_ = null; + if (sourceUpdateTimeBuilder_ != null) { + sourceUpdateTimeBuilder_.dispose(); + sourceUpdateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public com.google.protobuf.Timestamp.Builder getSourceUpdateTimeBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getSourceUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { + if (sourceUpdateTimeBuilder_ != null) { + return sourceUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return sourceUpdateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getSourceUpdateTimeFieldBuilder() { + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getSourceUpdateTime(), + getParentForChildren(), + isClean()); + sourceUpdateTime_ = null; + } + return sourceUpdateTimeBuilder_; + } + + private java.lang.Object source_ = ""; + /** + *
+       * The source from which the information in this Detail was obtained.
+       * 
+ * + * string source = 13; + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The source from which the information in this Detail was obtained.
+       * 
+ * + * string source = 13; + * @return The bytes for source. + */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The source from which the information in this Detail was obtained.
+       * 
+ * + * string source = 13; + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + source_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+       * The source from which the information in this Detail was obtained.
+       * 
+ * + * string source = 13; + * @return This builder for chaining. + */ + public Builder clearSource() { + source_ = getDefaultInstance().getSource(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + *
+       * The source from which the information in this Detail was obtained.
+       * 
+ * + * string source = 13; + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + source_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private java.lang.Object vendor_ = ""; + /** + *
+       * The name of the vendor of the product.
+       * 
+ * + * string vendor = 14; + * @return The vendor. + */ + public java.lang.String getVendor() { + java.lang.Object ref = vendor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vendor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the vendor of the product.
+       * 
+ * + * string vendor = 14; + * @return The bytes for vendor. + */ + public com.google.protobuf.ByteString + getVendorBytes() { + java.lang.Object ref = vendor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + vendor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the vendor of the product.
+       * 
+ * + * string vendor = 14; + * @param value The vendor to set. + * @return This builder for chaining. + */ + public Builder setVendor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + vendor_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+       * The name of the vendor of the product.
+       * 
+ * + * string vendor = 14; + * @return This builder for chaining. + */ + public Builder clearVendor() { + vendor_ = getDefaultInstance().getVendor(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + *
+       * The name of the vendor of the product.
+       * 
+ * + * string vendor = 14; + * @param value The bytes for vendor to set. + * @return This builder for chaining. + */ + public Builder setVendorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + vendor_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote.Detail) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote.Detail) + private static final io.grafeas.v1.VulnerabilityNote.Detail DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote.Detail(); + } + + public static io.grafeas.v1.VulnerabilityNote.Detail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Detail parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.Detail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WindowsDetailOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote.WindowsDetail) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + java.lang.String getCpeUri(); + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + com.google.protobuf.ByteString + getCpeUriBytes(); + + /** + *
+     * Required. The name of this vulnerability.
+     * 
+ * + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Required. The name of this vulnerability.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * The description of this vulnerability.
+     * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+     * The description of this vulnerability.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + java.util.List + getFixingKbsList(); + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getFixingKbs(int index); + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + int getFixingKbsCount(); + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + java.util.List + getFixingKbsOrBuilderList(); + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder getFixingKbsOrBuilder( + int index); + } + /** + * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail} + */ + public static final class WindowsDetail extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote.WindowsDetail) + WindowsDetailOrBuilder { + private static final long serialVersionUID = 0L; + // Use WindowsDetail.newBuilder() to construct. + private WindowsDetail(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WindowsDetail() { + cpeUri_ = ""; + name_ = ""; + description_ = ""; + fixingKbs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WindowsDetail(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder.class); + } + + public interface KnowledgeBaseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+       * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+       * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+       * A link to the KB in the [Windows update catalog]
+       * (https://www.catalog.update.microsoft.com/).
+       * 
+ * + * string url = 2; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+       * A link to the KB in the [Windows update catalog]
+       * (https://www.catalog.update.microsoft.com/).
+       * 
+ * + * string url = 2; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + } + /** + * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} + */ + public static final class KnowledgeBase extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) + KnowledgeBaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use KnowledgeBase.newBuilder() to construct. + private KnowledgeBase(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KnowledgeBase() { + name_ = ""; + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KnowledgeBase(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+       * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+       * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+       * A link to the KB in the [Windows update catalog]
+       * (https://www.catalog.update.microsoft.com/).
+       * 
+ * + * string url = 2; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+       * A link to the KB in the [Windows update catalog]
+       * (https://www.catalog.update.microsoft.com/).
+       * 
+ * + * string url = 2; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase other = (io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + url_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase build() { + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase buildPartial() { + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase result = new io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.url_ = url_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) { + return mergeFrom((io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase other) { + if (other == io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+         * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+         * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+         * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+         * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+         * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+         * A link to the KB in the [Windows update catalog]
+         * (https://www.catalog.update.microsoft.com/).
+         * 
+ * + * string url = 2; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+         * A link to the KB in the [Windows update catalog]
+         * (https://www.catalog.update.microsoft.com/).
+         * 
+ * + * string url = 2; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+         * A link to the KB in the [Windows update catalog]
+         * (https://www.catalog.update.microsoft.com/).
+         * 
+ * + * string url = 2; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+         * A link to the KB in the [Windows update catalog]
+         * (https://www.catalog.update.microsoft.com/).
+         * 
+ * + * string url = 2; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+         * A link to the KB in the [Windows update catalog]
+         * (https://www.catalog.update.microsoft.com/).
+         * 
+ * + * string url = 2; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) + private static final io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase(); + } + + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KnowledgeBase parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int CPE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cpeUri_ = ""; + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + @java.lang.Override + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } + } + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+     * Required. The name of this vulnerability.
+     * 
+ * + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+     * Required. The name of this vulnerability.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+     * The description of this vulnerability.
+     * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+     * The description of this vulnerability.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIXING_KBS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List fixingKbs_; + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + @java.lang.Override + public java.util.List getFixingKbsList() { + return fixingKbs_; + } + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + @java.lang.Override + public java.util.List + getFixingKbsOrBuilderList() { + return fixingKbs_; + } + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + @java.lang.Override + public int getFixingKbsCount() { + return fixingKbs_.size(); + } + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getFixingKbs(int index) { + return fixingKbs_.get(index); + } + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder getFixingKbsOrBuilder( + int index) { + return fixingKbs_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + for (int i = 0; i < fixingKbs_.size(); i++) { + output.writeMessage(4, fixingKbs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + for (int i = 0; i < fixingKbs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, fixingKbs_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityNote.WindowsDetail other = (io.grafeas.v1.VulnerabilityNote.WindowsDetail) obj; + + if (!getCpeUri() + .equals(other.getCpeUri())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getFixingKbsList() + .equals(other.getFixingKbsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCpeUri().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getFixingKbsCount() > 0) { + hash = (37 * hash) + FIXING_KBS_FIELD_NUMBER; + hash = (53 * hash) + getFixingKbsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote.WindowsDetail prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote.WindowsDetail) + io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityNote.WindowsDetail.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cpeUri_ = ""; + name_ = ""; + description_ = ""; + if (fixingKbsBuilder_ == null) { + fixingKbs_ = java.util.Collections.emptyList(); + } else { + fixingKbs_ = null; + fixingKbsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail build() { + io.grafeas.v1.VulnerabilityNote.WindowsDetail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail buildPartial() { + io.grafeas.v1.VulnerabilityNote.WindowsDetail result = new io.grafeas.v1.VulnerabilityNote.WindowsDetail(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityNote.WindowsDetail result) { + if (fixingKbsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + fixingKbs_ = java.util.Collections.unmodifiableList(fixingKbs_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.fixingKbs_ = fixingKbs_; + } else { + result.fixingKbs_ = fixingKbsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityNote.WindowsDetail result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cpeUri_ = cpeUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail) { + return mergeFrom((io.grafeas.v1.VulnerabilityNote.WindowsDetail)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote.WindowsDetail other) { + if (other == io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance()) return this; + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (fixingKbsBuilder_ == null) { + if (!other.fixingKbs_.isEmpty()) { + if (fixingKbs_.isEmpty()) { + fixingKbs_ = other.fixingKbs_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureFixingKbsIsMutable(); + fixingKbs_.addAll(other.fixingKbs_); + } + onChanged(); + } + } else { + if (!other.fixingKbs_.isEmpty()) { + if (fixingKbsBuilder_.isEmpty()) { + fixingKbsBuilder_.dispose(); + fixingKbsBuilder_ = null; + fixingKbs_ = other.fixingKbs_; + bitField0_ = (bitField0_ & ~0x00000008); + fixingKbsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFixingKbsFieldBuilder() : null; + } else { + fixingKbsBuilder_.addAllMessages(other.fixingKbs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase m = + input.readMessage( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.parser(), + extensionRegistry); + if (fixingKbsBuilder_ == null) { + ensureFixingKbsIsMutable(); + fixingKbs_.add(m); + } else { + fixingKbsBuilder_.addMessage(m); + } + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cpeUri_ = ""; + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string cpe_uri = 1; + * @param value The cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string cpe_uri = 1; + * @return This builder for chaining. + */ + public Builder clearCpeUri() { + cpeUri_ = getDefaultInstance().getCpeUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string cpe_uri = 1; + * @param value The bytes for cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Required. The name of this vulnerability.
+       * 
+ * + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The name of this vulnerability.
+       * 
+ * + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The name of this vulnerability.
+       * 
+ * + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Required. The name of this vulnerability.
+       * 
+ * + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * Required. The name of this vulnerability.
+       * 
+ * + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+       * The description of this vulnerability.
+       * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The description of this vulnerability.
+       * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The description of this vulnerability.
+       * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The description of this vulnerability.
+       * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * The description of this vulnerability.
+       * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List fixingKbs_ = + java.util.Collections.emptyList(); + private void ensureFixingKbsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + fixingKbs_ = new java.util.ArrayList(fixingKbs_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder> fixingKbsBuilder_; + + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public java.util.List getFixingKbsList() { + if (fixingKbsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fixingKbs_); + } else { + return fixingKbsBuilder_.getMessageList(); + } + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public int getFixingKbsCount() { + if (fixingKbsBuilder_ == null) { + return fixingKbs_.size(); + } else { + return fixingKbsBuilder_.getCount(); + } + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getFixingKbs(int index) { + if (fixingKbsBuilder_ == null) { + return fixingKbs_.get(index); + } else { + return fixingKbsBuilder_.getMessage(index); + } + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder setFixingKbs( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase value) { + if (fixingKbsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFixingKbsIsMutable(); + fixingKbs_.set(index, value); + onChanged(); + } else { + fixingKbsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder setFixingKbs( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder builderForValue) { + if (fixingKbsBuilder_ == null) { + ensureFixingKbsIsMutable(); + fixingKbs_.set(index, builderForValue.build()); + onChanged(); + } else { + fixingKbsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder addFixingKbs(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase value) { + if (fixingKbsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFixingKbsIsMutable(); + fixingKbs_.add(value); + onChanged(); + } else { + fixingKbsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder addFixingKbs( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase value) { + if (fixingKbsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFixingKbsIsMutable(); + fixingKbs_.add(index, value); + onChanged(); + } else { + fixingKbsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder addFixingKbs( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder builderForValue) { + if (fixingKbsBuilder_ == null) { + ensureFixingKbsIsMutable(); + fixingKbs_.add(builderForValue.build()); + onChanged(); + } else { + fixingKbsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder addFixingKbs( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder builderForValue) { + if (fixingKbsBuilder_ == null) { + ensureFixingKbsIsMutable(); + fixingKbs_.add(index, builderForValue.build()); + onChanged(); + } else { + fixingKbsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder addAllFixingKbs( + java.lang.Iterable values) { + if (fixingKbsBuilder_ == null) { + ensureFixingKbsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fixingKbs_); + onChanged(); + } else { + fixingKbsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder clearFixingKbs() { + if (fixingKbsBuilder_ == null) { + fixingKbs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + fixingKbsBuilder_.clear(); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder removeFixingKbs(int index) { + if (fixingKbsBuilder_ == null) { + ensureFixingKbsIsMutable(); + fixingKbs_.remove(index); + onChanged(); + } else { + fixingKbsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder getFixingKbsBuilder( + int index) { + return getFixingKbsFieldBuilder().getBuilder(index); + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder getFixingKbsOrBuilder( + int index) { + if (fixingKbsBuilder_ == null) { + return fixingKbs_.get(index); } else { + return fixingKbsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public java.util.List + getFixingKbsOrBuilderList() { + if (fixingKbsBuilder_ != null) { + return fixingKbsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fixingKbs_); + } + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder addFixingKbsBuilder() { + return getFixingKbsFieldBuilder().addBuilder( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance()); + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder addFixingKbsBuilder( + int index) { + return getFixingKbsFieldBuilder().addBuilder( + index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance()); + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public java.util.List + getFixingKbsBuilderList() { + return getFixingKbsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder> + getFixingKbsFieldBuilder() { + if (fixingKbsBuilder_ == null) { + fixingKbsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder>( + fixingKbs_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + fixingKbs_ = null; + } + return fixingKbsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote.WindowsDetail) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote.WindowsDetail) + private static final io.grafeas.v1.VulnerabilityNote.WindowsDetail DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote.WindowsDetail(); + } + + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WindowsDetail parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int CVSS_SCORE_FIELD_NUMBER = 1; + private float cvssScore_ = 0F; + /** + *
+   * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
+   * where 0 indicates low severity and 10 indicates high severity.
+   * 
+ * + * float cvss_score = 1; + * @return The cvssScore. + */ + @java.lang.Override + public float getCvssScore() { + return cvssScore_; + } + + public static final int SEVERITY_FIELD_NUMBER = 2; + private int severity_ = 0; + /** + *
+   * The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override public int getSeverityValue() { + return severity_; + } + /** + *
+   * The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + @java.lang.Override public io.grafeas.v1.Severity getSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + + public static final int DETAILS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List details_; + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + @java.lang.Override + public java.util.List getDetailsList() { + return details_; + } + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + @java.lang.Override + public java.util.List + getDetailsOrBuilderList() { + return details_; + } + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + @java.lang.Override + public int getDetailsCount() { + return details_.size(); + } + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.Detail getDetails(int index) { + return details_.get(index); + } + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.DetailOrBuilder getDetailsOrBuilder( + int index) { + return details_.get(index); + } + + public static final int CVSS_V3_FIELD_NUMBER = 4; + private io.grafeas.v1.CVSSv3 cvssV3_; + /** + *
+   * The full description of the CVSSv3 for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + * @return Whether the cvssV3 field is set. + */ + @java.lang.Override + public boolean hasCvssV3() { + return cvssV3_ != null; + } + /** + *
+   * The full description of the CVSSv3 for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + * @return The cvssV3. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3 getCvssV3() { + return cvssV3_ == null ? io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; + } + /** + *
+   * The full description of the CVSSv3 for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3OrBuilder getCvssV3OrBuilder() { + return cvssV3_ == null ? io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; + } + + public static final int WINDOWS_DETAILS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List windowsDetails_; + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + @java.lang.Override + public java.util.List getWindowsDetailsList() { + return windowsDetails_; + } + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + @java.lang.Override + public java.util.List + getWindowsDetailsOrBuilderList() { + return windowsDetails_; + } + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + @java.lang.Override + public int getWindowsDetailsCount() { + return windowsDetails_.size(); + } + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail getWindowsDetails(int index) { + return windowsDetails_.get(index); + } + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder getWindowsDetailsOrBuilder( + int index) { + return windowsDetails_.get(index); + } + + public static final int SOURCE_UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp sourceUpdateTime_; + /** + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * @return Whether the sourceUpdateTime field is set. + */ + @java.lang.Override + public boolean hasSourceUpdateTime() { + return sourceUpdateTime_ != null; + } + /** + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * @return The sourceUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSourceUpdateTime() { + return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } + /** + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { + return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } + + public static final int CVSS_VERSION_FIELD_NUMBER = 7; + private int cvssVersion_ = 0; + /** + *
+   * CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @return The enum numeric value on the wire for cvssVersion. + */ + @java.lang.Override public int getCvssVersionValue() { + return cvssVersion_; + } + /** + *
+   * CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @return The cvssVersion. + */ + @java.lang.Override public io.grafeas.v1.CVSSVersion getCvssVersion() { + io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); + return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; + } + + public static final int CVSS_V2_FIELD_NUMBER = 8; + private io.grafeas.v1.CVSS cvssV2_; + /** + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * @return Whether the cvssV2 field is set. + */ + @java.lang.Override + public boolean hasCvssV2() { + return cvssV2_ != null; + } + /** + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * @return The cvssV2. + */ + @java.lang.Override + public io.grafeas.v1.CVSS getCvssV2() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + /** + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + @java.lang.Override + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { + output.writeFloat(1, cvssScore_); + } + if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + output.writeEnum(2, severity_); + } + for (int i = 0; i < details_.size(); i++) { + output.writeMessage(3, details_.get(i)); + } + if (cvssV3_ != null) { + output.writeMessage(4, getCvssV3()); + } + for (int i = 0; i < windowsDetails_.size(); i++) { + output.writeMessage(5, windowsDetails_.get(i)); + } + if (sourceUpdateTime_ != null) { + output.writeMessage(6, getSourceUpdateTime()); + } + if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { + output.writeEnum(7, cvssVersion_); + } + if (cvssV2_ != null) { + output.writeMessage(8, getCvssV2()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, cvssScore_); + } + if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, severity_); + } + for (int i = 0; i < details_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, details_.get(i)); + } + if (cvssV3_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCvssV3()); + } + for (int i = 0; i < windowsDetails_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, windowsDetails_.get(i)); + } + if (sourceUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getSourceUpdateTime()); + } + if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, cvssVersion_); + } + if (cvssV2_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getCvssV2()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityNote)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityNote other = (io.grafeas.v1.VulnerabilityNote) obj; + + if (java.lang.Float.floatToIntBits(getCvssScore()) + != java.lang.Float.floatToIntBits( + other.getCvssScore())) return false; + if (severity_ != other.severity_) return false; + if (!getDetailsList() + .equals(other.getDetailsList())) return false; + if (hasCvssV3() != other.hasCvssV3()) return false; + if (hasCvssV3()) { + if (!getCvssV3() + .equals(other.getCvssV3())) return false; + } + if (!getWindowsDetailsList() + .equals(other.getWindowsDetailsList())) return false; + if (hasSourceUpdateTime() != other.hasSourceUpdateTime()) return false; + if (hasSourceUpdateTime()) { + if (!getSourceUpdateTime() + .equals(other.getSourceUpdateTime())) return false; + } + if (cvssVersion_ != other.cvssVersion_) return false; + if (hasCvssV2() != other.hasCvssV2()) return false; + if (hasCvssV2()) { + if (!getCvssV2() + .equals(other.getCvssV2())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CVSS_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getCvssScore()); + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + severity_; + if (getDetailsCount() > 0) { + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetailsList().hashCode(); + } + if (hasCvssV3()) { + hash = (37 * hash) + CVSS_V3_FIELD_NUMBER; + hash = (53 * hash) + getCvssV3().hashCode(); + } + if (getWindowsDetailsCount() > 0) { + hash = (37 * hash) + WINDOWS_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getWindowsDetailsList().hashCode(); + } + if (hasSourceUpdateTime()) { + hash = (37 * hash) + SOURCE_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSourceUpdateTime().hashCode(); + } + hash = (37 * hash) + CVSS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + cvssVersion_; + if (hasCvssV2()) { + hash = (37 * hash) + CVSS_V2_FIELD_NUMBER; + hash = (53 * hash) + getCvssV2().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A security vulnerability that can be found in resources.
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote) + io.grafeas.v1.VulnerabilityNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.class, io.grafeas.v1.VulnerabilityNote.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cvssScore_ = 0F; + severity_ = 0; + if (detailsBuilder_ == null) { + details_ = java.util.Collections.emptyList(); + } else { + details_ = null; + detailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + cvssV3_ = null; + if (cvssV3Builder_ != null) { + cvssV3Builder_.dispose(); + cvssV3Builder_ = null; + } + if (windowsDetailsBuilder_ == null) { + windowsDetails_ = java.util.Collections.emptyList(); + } else { + windowsDetails_ = null; + windowsDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + sourceUpdateTime_ = null; + if (sourceUpdateTimeBuilder_ != null) { + sourceUpdateTimeBuilder_.dispose(); + sourceUpdateTimeBuilder_ = null; + } + cvssVersion_ = 0; + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote build() { + io.grafeas.v1.VulnerabilityNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote buildPartial() { + io.grafeas.v1.VulnerabilityNote result = new io.grafeas.v1.VulnerabilityNote(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityNote result) { + if (detailsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + details_ = java.util.Collections.unmodifiableList(details_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.details_ = details_; + } else { + result.details_ = detailsBuilder_.build(); + } + if (windowsDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + windowsDetails_ = java.util.Collections.unmodifiableList(windowsDetails_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.windowsDetails_ = windowsDetails_; + } else { + result.windowsDetails_ = windowsDetailsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cvssScore_ = cvssScore_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.severity_ = severity_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cvssV3_ = cvssV3Builder_ == null + ? cvssV3_ + : cvssV3Builder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.sourceUpdateTime_ = sourceUpdateTimeBuilder_ == null + ? sourceUpdateTime_ + : sourceUpdateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.cvssVersion_ = cvssVersion_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.cvssV2_ = cvssV2Builder_ == null + ? cvssV2_ + : cvssV2Builder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityNote) { + return mergeFrom((io.grafeas.v1.VulnerabilityNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote other) { + if (other == io.grafeas.v1.VulnerabilityNote.getDefaultInstance()) return this; + if (other.getCvssScore() != 0F) { + setCvssScore(other.getCvssScore()); + } + if (other.severity_ != 0) { + setSeverityValue(other.getSeverityValue()); + } + if (detailsBuilder_ == null) { + if (!other.details_.isEmpty()) { + if (details_.isEmpty()) { + details_ = other.details_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDetailsIsMutable(); + details_.addAll(other.details_); + } + onChanged(); + } + } else { + if (!other.details_.isEmpty()) { + if (detailsBuilder_.isEmpty()) { + detailsBuilder_.dispose(); + detailsBuilder_ = null; + details_ = other.details_; + bitField0_ = (bitField0_ & ~0x00000004); + detailsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDetailsFieldBuilder() : null; + } else { + detailsBuilder_.addAllMessages(other.details_); + } + } + } + if (other.hasCvssV3()) { + mergeCvssV3(other.getCvssV3()); + } + if (windowsDetailsBuilder_ == null) { + if (!other.windowsDetails_.isEmpty()) { + if (windowsDetails_.isEmpty()) { + windowsDetails_ = other.windowsDetails_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureWindowsDetailsIsMutable(); + windowsDetails_.addAll(other.windowsDetails_); + } + onChanged(); + } + } else { + if (!other.windowsDetails_.isEmpty()) { + if (windowsDetailsBuilder_.isEmpty()) { + windowsDetailsBuilder_.dispose(); + windowsDetailsBuilder_ = null; + windowsDetails_ = other.windowsDetails_; + bitField0_ = (bitField0_ & ~0x00000010); + windowsDetailsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWindowsDetailsFieldBuilder() : null; + } else { + windowsDetailsBuilder_.addAllMessages(other.windowsDetails_); + } + } + } + if (other.hasSourceUpdateTime()) { + mergeSourceUpdateTime(other.getSourceUpdateTime()); + } + if (other.cvssVersion_ != 0) { + setCvssVersionValue(other.getCvssVersionValue()); + } + if (other.hasCvssV2()) { + mergeCvssV2(other.getCvssV2()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + cvssScore_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 16: { + severity_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + io.grafeas.v1.VulnerabilityNote.Detail m = + input.readMessage( + io.grafeas.v1.VulnerabilityNote.Detail.parser(), + extensionRegistry); + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.add(m); + } else { + detailsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: { + input.readMessage( + getCvssV3FieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + io.grafeas.v1.VulnerabilityNote.WindowsDetail m = + input.readMessage( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.parser(), + extensionRegistry); + if (windowsDetailsBuilder_ == null) { + ensureWindowsDetailsIsMutable(); + windowsDetails_.add(m); + } else { + windowsDetailsBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: { + input.readMessage( + getSourceUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + cvssVersion_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + input.readMessage( + getCvssV2FieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private float cvssScore_ ; + /** + *
+     * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
+     * where 0 indicates low severity and 10 indicates high severity.
+     * 
+ * + * float cvss_score = 1; + * @return The cvssScore. + */ + @java.lang.Override + public float getCvssScore() { + return cvssScore_; + } + /** + *
+     * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
+     * where 0 indicates low severity and 10 indicates high severity.
+     * 
+ * + * float cvss_score = 1; + * @param value The cvssScore to set. + * @return This builder for chaining. + */ + public Builder setCvssScore(float value) { + + cvssScore_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
+     * where 0 indicates low severity and 10 indicates high severity.
+     * 
+ * + * float cvss_score = 1; + * @return This builder for chaining. + */ + public Builder clearCvssScore() { + bitField0_ = (bitField0_ & ~0x00000001); + cvssScore_ = 0F; + onChanged(); + return this; + } + + private int severity_ = 0; + /** + *
+     * The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override public int getSeverityValue() { + return severity_; + } + /** + *
+     * The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @param value The enum numeric value on the wire for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityValue(int value) { + severity_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + @java.lang.Override + public io.grafeas.v1.Severity getSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + /** + *
+     * The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity(io.grafeas.v1.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + severity_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return This builder for chaining. + */ + public Builder clearSeverity() { + bitField0_ = (bitField0_ & ~0x00000002); + severity_ = 0; + onChanged(); + return this; + } + + private java.util.List details_ = + java.util.Collections.emptyList(); + private void ensureDetailsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + details_ = new java.util.ArrayList(details_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.Detail, io.grafeas.v1.VulnerabilityNote.Detail.Builder, io.grafeas.v1.VulnerabilityNote.DetailOrBuilder> detailsBuilder_; + + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public java.util.List getDetailsList() { + if (detailsBuilder_ == null) { + return java.util.Collections.unmodifiableList(details_); + } else { + return detailsBuilder_.getMessageList(); + } + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public int getDetailsCount() { + if (detailsBuilder_ == null) { + return details_.size(); + } else { + return detailsBuilder_.getCount(); + } + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public io.grafeas.v1.VulnerabilityNote.Detail getDetails(int index) { + if (detailsBuilder_ == null) { + return details_.get(index); + } else { + return detailsBuilder_.getMessage(index); + } + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder setDetails( + int index, io.grafeas.v1.VulnerabilityNote.Detail value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetailsIsMutable(); + details_.set(index, value); + onChanged(); + } else { + detailsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder setDetails( + int index, io.grafeas.v1.VulnerabilityNote.Detail.Builder builderForValue) { + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.set(index, builderForValue.build()); + onChanged(); + } else { + detailsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder addDetails(io.grafeas.v1.VulnerabilityNote.Detail value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetailsIsMutable(); + details_.add(value); + onChanged(); + } else { + detailsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder addDetails( + int index, io.grafeas.v1.VulnerabilityNote.Detail value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetailsIsMutable(); + details_.add(index, value); + onChanged(); + } else { + detailsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder addDetails( + io.grafeas.v1.VulnerabilityNote.Detail.Builder builderForValue) { + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.add(builderForValue.build()); + onChanged(); + } else { + detailsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder addDetails( + int index, io.grafeas.v1.VulnerabilityNote.Detail.Builder builderForValue) { + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.add(index, builderForValue.build()); + onChanged(); + } else { + detailsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder addAllDetails( + java.lang.Iterable values) { + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, details_); + onChanged(); + } else { + detailsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder clearDetails() { + if (detailsBuilder_ == null) { + details_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + detailsBuilder_.clear(); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder removeDetails(int index) { + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.remove(index); + onChanged(); + } else { + detailsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public io.grafeas.v1.VulnerabilityNote.Detail.Builder getDetailsBuilder( + int index) { + return getDetailsFieldBuilder().getBuilder(index); + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public io.grafeas.v1.VulnerabilityNote.DetailOrBuilder getDetailsOrBuilder( + int index) { + if (detailsBuilder_ == null) { + return details_.get(index); } else { + return detailsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public java.util.List + getDetailsOrBuilderList() { + if (detailsBuilder_ != null) { + return detailsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(details_); + } + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public io.grafeas.v1.VulnerabilityNote.Detail.Builder addDetailsBuilder() { + return getDetailsFieldBuilder().addBuilder( + io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance()); + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public io.grafeas.v1.VulnerabilityNote.Detail.Builder addDetailsBuilder( + int index) { + return getDetailsFieldBuilder().addBuilder( + index, io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance()); + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public java.util.List + getDetailsBuilderList() { + return getDetailsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.Detail, io.grafeas.v1.VulnerabilityNote.Detail.Builder, io.grafeas.v1.VulnerabilityNote.DetailOrBuilder> + getDetailsFieldBuilder() { + if (detailsBuilder_ == null) { + detailsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.Detail, io.grafeas.v1.VulnerabilityNote.Detail.Builder, io.grafeas.v1.VulnerabilityNote.DetailOrBuilder>( + details_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + details_ = null; + } + return detailsBuilder_; + } + + private io.grafeas.v1.CVSSv3 cvssV3_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSSv3, io.grafeas.v1.CVSSv3.Builder, io.grafeas.v1.CVSSv3OrBuilder> cvssV3Builder_; + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + * @return Whether the cvssV3 field is set. + */ + public boolean hasCvssV3() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + * @return The cvssV3. + */ + public io.grafeas.v1.CVSSv3 getCvssV3() { + if (cvssV3Builder_ == null) { + return cvssV3_ == null ? io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; + } else { + return cvssV3Builder_.getMessage(); + } + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + public Builder setCvssV3(io.grafeas.v1.CVSSv3 value) { + if (cvssV3Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cvssV3_ = value; + } else { + cvssV3Builder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + public Builder setCvssV3( + io.grafeas.v1.CVSSv3.Builder builderForValue) { + if (cvssV3Builder_ == null) { + cvssV3_ = builderForValue.build(); + } else { + cvssV3Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + public Builder mergeCvssV3(io.grafeas.v1.CVSSv3 value) { + if (cvssV3Builder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + cvssV3_ != null && + cvssV3_ != io.grafeas.v1.CVSSv3.getDefaultInstance()) { + getCvssV3Builder().mergeFrom(value); + } else { + cvssV3_ = value; + } + } else { + cvssV3Builder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + public Builder clearCvssV3() { + bitField0_ = (bitField0_ & ~0x00000008); + cvssV3_ = null; + if (cvssV3Builder_ != null) { + cvssV3Builder_.dispose(); + cvssV3Builder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + public io.grafeas.v1.CVSSv3.Builder getCvssV3Builder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCvssV3FieldBuilder().getBuilder(); + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + public io.grafeas.v1.CVSSv3OrBuilder getCvssV3OrBuilder() { + if (cvssV3Builder_ != null) { + return cvssV3Builder_.getMessageOrBuilder(); + } else { + return cvssV3_ == null ? + io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; + } + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSSv3, io.grafeas.v1.CVSSv3.Builder, io.grafeas.v1.CVSSv3OrBuilder> + getCvssV3FieldBuilder() { + if (cvssV3Builder_ == null) { + cvssV3Builder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSSv3, io.grafeas.v1.CVSSv3.Builder, io.grafeas.v1.CVSSv3OrBuilder>( + getCvssV3(), + getParentForChildren(), + isClean()); + cvssV3_ = null; + } + return cvssV3Builder_; + } + + private java.util.List windowsDetails_ = + java.util.Collections.emptyList(); + private void ensureWindowsDetailsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + windowsDetails_ = new java.util.ArrayList(windowsDetails_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.WindowsDetail, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder> windowsDetailsBuilder_; + + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public java.util.List getWindowsDetailsList() { + if (windowsDetailsBuilder_ == null) { + return java.util.Collections.unmodifiableList(windowsDetails_); + } else { + return windowsDetailsBuilder_.getMessageList(); + } + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public int getWindowsDetailsCount() { + if (windowsDetailsBuilder_ == null) { + return windowsDetails_.size(); + } else { + return windowsDetailsBuilder_.getCount(); + } + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail getWindowsDetails(int index) { + if (windowsDetailsBuilder_ == null) { + return windowsDetails_.get(index); + } else { + return windowsDetailsBuilder_.getMessage(index); + } + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder setWindowsDetails( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail value) { + if (windowsDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWindowsDetailsIsMutable(); + windowsDetails_.set(index, value); + onChanged(); + } else { + windowsDetailsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder setWindowsDetails( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder builderForValue) { + if (windowsDetailsBuilder_ == null) { + ensureWindowsDetailsIsMutable(); + windowsDetails_.set(index, builderForValue.build()); + onChanged(); + } else { + windowsDetailsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder addWindowsDetails(io.grafeas.v1.VulnerabilityNote.WindowsDetail value) { + if (windowsDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWindowsDetailsIsMutable(); + windowsDetails_.add(value); + onChanged(); + } else { + windowsDetailsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder addWindowsDetails( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail value) { + if (windowsDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWindowsDetailsIsMutable(); + windowsDetails_.add(index, value); + onChanged(); + } else { + windowsDetailsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder addWindowsDetails( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder builderForValue) { + if (windowsDetailsBuilder_ == null) { + ensureWindowsDetailsIsMutable(); + windowsDetails_.add(builderForValue.build()); + onChanged(); + } else { + windowsDetailsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder addWindowsDetails( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder builderForValue) { + if (windowsDetailsBuilder_ == null) { + ensureWindowsDetailsIsMutable(); + windowsDetails_.add(index, builderForValue.build()); + onChanged(); + } else { + windowsDetailsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder addAllWindowsDetails( + java.lang.Iterable values) { + if (windowsDetailsBuilder_ == null) { + ensureWindowsDetailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, windowsDetails_); + onChanged(); + } else { + windowsDetailsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder clearWindowsDetails() { + if (windowsDetailsBuilder_ == null) { + windowsDetails_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + windowsDetailsBuilder_.clear(); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder removeWindowsDetails(int index) { + if (windowsDetailsBuilder_ == null) { + ensureWindowsDetailsIsMutable(); + windowsDetails_.remove(index); + onChanged(); + } else { + windowsDetailsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder getWindowsDetailsBuilder( + int index) { + return getWindowsDetailsFieldBuilder().getBuilder(index); + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder getWindowsDetailsOrBuilder( + int index) { + if (windowsDetailsBuilder_ == null) { + return windowsDetails_.get(index); } else { + return windowsDetailsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public java.util.List + getWindowsDetailsOrBuilderList() { + if (windowsDetailsBuilder_ != null) { + return windowsDetailsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(windowsDetails_); + } + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder addWindowsDetailsBuilder() { + return getWindowsDetailsFieldBuilder().addBuilder( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance()); + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder addWindowsDetailsBuilder( + int index) { + return getWindowsDetailsFieldBuilder().addBuilder( + index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance()); + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public java.util.List + getWindowsDetailsBuilderList() { + return getWindowsDetailsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.WindowsDetail, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder> + getWindowsDetailsFieldBuilder() { + if (windowsDetailsBuilder_ == null) { + windowsDetailsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.WindowsDetail, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder>( + windowsDetails_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + windowsDetails_ = null; + } + return windowsDetailsBuilder_; + } + + private com.google.protobuf.Timestamp sourceUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> sourceUpdateTimeBuilder_; + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * @return Whether the sourceUpdateTime field is set. + */ + public boolean hasSourceUpdateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * @return The sourceUpdateTime. + */ + public com.google.protobuf.Timestamp getSourceUpdateTime() { + if (sourceUpdateTimeBuilder_ == null) { + return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } else { + return sourceUpdateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public Builder setSourceUpdateTime(com.google.protobuf.Timestamp value) { + if (sourceUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceUpdateTime_ = value; + } else { + sourceUpdateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public Builder setSourceUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTime_ = builderForValue.build(); + } else { + sourceUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public Builder mergeSourceUpdateTime(com.google.protobuf.Timestamp value) { + if (sourceUpdateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + sourceUpdateTime_ != null && + sourceUpdateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getSourceUpdateTimeBuilder().mergeFrom(value); + } else { + sourceUpdateTime_ = value; + } + } else { + sourceUpdateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public Builder clearSourceUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + sourceUpdateTime_ = null; + if (sourceUpdateTimeBuilder_ != null) { + sourceUpdateTimeBuilder_.dispose(); + sourceUpdateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getSourceUpdateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getSourceUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { + if (sourceUpdateTimeBuilder_ != null) { + return sourceUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return sourceUpdateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getSourceUpdateTimeFieldBuilder() { + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getSourceUpdateTime(), + getParentForChildren(), + isClean()); + sourceUpdateTime_ = null; + } + return sourceUpdateTimeBuilder_; + } + + private int cvssVersion_ = 0; + /** + *
+     * CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @return The enum numeric value on the wire for cvssVersion. + */ + @java.lang.Override public int getCvssVersionValue() { + return cvssVersion_; + } + /** + *
+     * CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @param value The enum numeric value on the wire for cvssVersion to set. + * @return This builder for chaining. + */ + public Builder setCvssVersionValue(int value) { + cvssVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @return The cvssVersion. + */ + @java.lang.Override + public io.grafeas.v1.CVSSVersion getCvssVersion() { + io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); + return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; + } + /** + *
+     * CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @param value The cvssVersion to set. + * @return This builder for chaining. + */ + public Builder setCvssVersion(io.grafeas.v1.CVSSVersion value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + cvssVersion_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @return This builder for chaining. + */ + public Builder clearCvssVersion() { + bitField0_ = (bitField0_ & ~0x00000040); + cvssVersion_ = 0; + onChanged(); + return this; + } + + private io.grafeas.v1.CVSS cvssV2_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> cvssV2Builder_; + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * @return Whether the cvssV2 field is set. + */ + public boolean hasCvssV2() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * @return The cvssV2. + */ + public io.grafeas.v1.CVSS getCvssV2() { + if (cvssV2Builder_ == null) { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } else { + return cvssV2Builder_.getMessage(); + } + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder setCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cvssV2_ = value; + } else { + cvssV2Builder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder setCvssV2( + io.grafeas.v1.CVSS.Builder builderForValue) { + if (cvssV2Builder_ == null) { + cvssV2_ = builderForValue.build(); + } else { + cvssV2Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder mergeCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + cvssV2_ != null && + cvssV2_ != io.grafeas.v1.CVSS.getDefaultInstance()) { + getCvssV2Builder().mergeFrom(value); + } else { + cvssV2_ = value; + } + } else { + cvssV2Builder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder clearCvssV2() { + bitField0_ = (bitField0_ & ~0x00000080); + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public io.grafeas.v1.CVSS.Builder getCvssV2Builder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCvssV2FieldBuilder().getBuilder(); + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + if (cvssV2Builder_ != null) { + return cvssV2Builder_.getMessageOrBuilder(); + } else { + return cvssV2_ == null ? + io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> + getCvssV2FieldBuilder() { + if (cvssV2Builder_ == null) { + cvssV2Builder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( + getCvssV2(), + getParentForChildren(), + isClean()); + cvssV2_ = null; + } + return cvssV2Builder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote) + private static final io.grafeas.v1.VulnerabilityNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote(); + } + + public static io.grafeas.v1.VulnerabilityNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VulnerabilityNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java new file mode 100644 index 000000000000..1e1b884465be --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java @@ -0,0 +1,248 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vulnerability.proto + +package io.grafeas.v1; + +public interface VulnerabilityNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
+   * where 0 indicates low severity and 10 indicates high severity.
+   * 
+ * + * float cvss_score = 1; + * @return The cvssScore. + */ + float getCvssScore(); + + /** + *
+   * The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + int getSeverityValue(); + /** + *
+   * The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + io.grafeas.v1.Severity getSeverity(); + + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + java.util.List + getDetailsList(); + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + io.grafeas.v1.VulnerabilityNote.Detail getDetails(int index); + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + int getDetailsCount(); + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + java.util.List + getDetailsOrBuilderList(); + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + io.grafeas.v1.VulnerabilityNote.DetailOrBuilder getDetailsOrBuilder( + int index); + + /** + *
+   * The full description of the CVSSv3 for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + * @return Whether the cvssV3 field is set. + */ + boolean hasCvssV3(); + /** + *
+   * The full description of the CVSSv3 for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + * @return The cvssV3. + */ + io.grafeas.v1.CVSSv3 getCvssV3(); + /** + *
+   * The full description of the CVSSv3 for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + io.grafeas.v1.CVSSv3OrBuilder getCvssV3OrBuilder(); + + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + java.util.List + getWindowsDetailsList(); + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + io.grafeas.v1.VulnerabilityNote.WindowsDetail getWindowsDetails(int index); + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + int getWindowsDetailsCount(); + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + java.util.List + getWindowsDetailsOrBuilderList(); + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder getWindowsDetailsOrBuilder( + int index); + + /** + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * @return Whether the sourceUpdateTime field is set. + */ + boolean hasSourceUpdateTime(); + /** + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * @return The sourceUpdateTime. + */ + com.google.protobuf.Timestamp getSourceUpdateTime(); + /** + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder(); + + /** + *
+   * CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @return The enum numeric value on the wire for cvssVersion. + */ + int getCvssVersionValue(); + /** + *
+   * CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @return The cvssVersion. + */ + io.grafeas.v1.CVSSVersion getCvssVersion(); + + /** + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * @return Whether the cvssV2 field is set. + */ + boolean hasCvssV2(); + /** + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * @return The cvssV2. + */ + io.grafeas.v1.CVSS getCvssV2(); + /** + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java new file mode 100644 index 000000000000..94bc5e1bf8fe --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java @@ -0,0 +1,5542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vulnerability.proto + +package io.grafeas.v1; + +/** + *
+ * An occurrence of a severity vulnerability on a resource.
+ * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence} + */ +public final class VulnerabilityOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityOccurrence) + VulnerabilityOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use VulnerabilityOccurrence.newBuilder() to construct. + private VulnerabilityOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VulnerabilityOccurrence() { + type_ = ""; + severity_ = 0; + packageIssue_ = java.util.Collections.emptyList(); + shortDescription_ = ""; + longDescription_ = ""; + relatedUrls_ = java.util.Collections.emptyList(); + effectiveSeverity_ = 0; + cvssVersion_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VulnerabilityOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityOccurrence.class, io.grafeas.v1.VulnerabilityOccurrence.Builder.class); + } + + public interface PackageIssueOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityOccurrence.PackageIssue) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability was found in.
+     * 
+ * + * string affected_cpe_uri = 1; + * @return The affectedCpeUri. + */ + java.lang.String getAffectedCpeUri(); + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability was found in.
+     * 
+ * + * string affected_cpe_uri = 1; + * @return The bytes for affectedCpeUri. + */ + com.google.protobuf.ByteString + getAffectedCpeUriBytes(); + + /** + *
+     * Required. The package this vulnerability was found in.
+     * 
+ * + * string affected_package = 2; + * @return The affectedPackage. + */ + java.lang.String getAffectedPackage(); + /** + *
+     * Required. The package this vulnerability was found in.
+     * 
+ * + * string affected_package = 2; + * @return The bytes for affectedPackage. + */ + com.google.protobuf.ByteString + getAffectedPackageBytes(); + + /** + *
+     * Required. The version of the package that is installed on the resource
+     * affected by this vulnerability.
+     * 
+ * + * .grafeas.v1.Version affected_version = 3; + * @return Whether the affectedVersion field is set. + */ + boolean hasAffectedVersion(); + /** + *
+     * Required. The version of the package that is installed on the resource
+     * affected by this vulnerability.
+     * 
+ * + * .grafeas.v1.Version affected_version = 3; + * @return The affectedVersion. + */ + io.grafeas.v1.Version getAffectedVersion(); + /** + *
+     * Required. The version of the package that is installed on the resource
+     * affected by this vulnerability.
+     * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + io.grafeas.v1.VersionOrBuilder getAffectedVersionOrBuilder(); + + /** + *
+     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+     * was fixed in. It is possible for this to be different from the
+     * affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 4; + * @return The fixedCpeUri. + */ + java.lang.String getFixedCpeUri(); + /** + *
+     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+     * was fixed in. It is possible for this to be different from the
+     * affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 4; + * @return The bytes for fixedCpeUri. + */ + com.google.protobuf.ByteString + getFixedCpeUriBytes(); + + /** + *
+     * The package this vulnerability was fixed in. It is possible for this to
+     * be different from the affected_package.
+     * 
+ * + * string fixed_package = 5; + * @return The fixedPackage. + */ + java.lang.String getFixedPackage(); + /** + *
+     * The package this vulnerability was fixed in. It is possible for this to
+     * be different from the affected_package.
+     * 
+ * + * string fixed_package = 5; + * @return The bytes for fixedPackage. + */ + com.google.protobuf.ByteString + getFixedPackageBytes(); + + /** + *
+     * Required. The version of the package this vulnerability was fixed in.
+     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 6; + * @return Whether the fixedVersion field is set. + */ + boolean hasFixedVersion(); + /** + *
+     * Required. The version of the package this vulnerability was fixed in.
+     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 6; + * @return The fixedVersion. + */ + io.grafeas.v1.Version getFixedVersion(); + /** + *
+     * Required. The version of the package this vulnerability was fixed in.
+     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder(); + + /** + *
+     * Output only. Whether a fix is available for this package.
+     * 
+ * + * bool fix_available = 7; + * @return The fixAvailable. + */ + boolean getFixAvailable(); + + /** + *
+     * The type of package (e.g. OS, MAVEN, GO).
+     * 
+ * + * string package_type = 8; + * @return The packageType. + */ + java.lang.String getPackageType(); + /** + *
+     * The type of package (e.g. OS, MAVEN, GO).
+     * 
+ * + * string package_type = 8; + * @return The bytes for packageType. + */ + com.google.protobuf.ByteString + getPackageTypeBytes(); + + /** + *
+     * The distro or language system assigned severity for this vulnerability
+     * when that is available and note provider assigned severity when it is not
+     * available.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for effectiveSeverity. + */ + int getEffectiveSeverityValue(); + /** + *
+     * The distro or language system assigned severity for this vulnerability
+     * when that is available and note provider assigned severity when it is not
+     * available.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The effectiveSeverity. + */ + io.grafeas.v1.Severity getEffectiveSeverity(); + + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + java.util.List + getFileLocationList(); + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + io.grafeas.v1.FileLocation getFileLocation(int index); + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + int getFileLocationCount(); + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + java.util.List + getFileLocationOrBuilderList(); + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + io.grafeas.v1.FileLocationOrBuilder getFileLocationOrBuilder( + int index); + } + /** + *
+   * A detail for a distro and package this vulnerability occurrence was found
+   * in and its associated fix (if one is available).
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.PackageIssue} + */ + public static final class PackageIssue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityOccurrence.PackageIssue) + PackageIssueOrBuilder { + private static final long serialVersionUID = 0L; + // Use PackageIssue.newBuilder() to construct. + private PackageIssue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PackageIssue() { + affectedCpeUri_ = ""; + affectedPackage_ = ""; + fixedCpeUri_ = ""; + fixedPackage_ = ""; + packageType_ = ""; + effectiveSeverity_ = 0; + fileLocation_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PackageIssue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.class, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder.class); + } + + public static final int AFFECTED_CPE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object affectedCpeUri_ = ""; + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability was found in.
+     * 
+ * + * string affected_cpe_uri = 1; + * @return The affectedCpeUri. + */ + @java.lang.Override + public java.lang.String getAffectedCpeUri() { + java.lang.Object ref = affectedCpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedCpeUri_ = s; + return s; + } + } + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability was found in.
+     * 
+ * + * string affected_cpe_uri = 1; + * @return The bytes for affectedCpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAffectedCpeUriBytes() { + java.lang.Object ref = affectedCpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AFFECTED_PACKAGE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object affectedPackage_ = ""; + /** + *
+     * Required. The package this vulnerability was found in.
+     * 
+ * + * string affected_package = 2; + * @return The affectedPackage. + */ + @java.lang.Override + public java.lang.String getAffectedPackage() { + java.lang.Object ref = affectedPackage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedPackage_ = s; + return s; + } + } + /** + *
+     * Required. The package this vulnerability was found in.
+     * 
+ * + * string affected_package = 2; + * @return The bytes for affectedPackage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAffectedPackageBytes() { + java.lang.Object ref = affectedPackage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AFFECTED_VERSION_FIELD_NUMBER = 3; + private io.grafeas.v1.Version affectedVersion_; + /** + *
+     * Required. The version of the package that is installed on the resource
+     * affected by this vulnerability.
+     * 
+ * + * .grafeas.v1.Version affected_version = 3; + * @return Whether the affectedVersion field is set. + */ + @java.lang.Override + public boolean hasAffectedVersion() { + return affectedVersion_ != null; + } + /** + *
+     * Required. The version of the package that is installed on the resource
+     * affected by this vulnerability.
+     * 
+ * + * .grafeas.v1.Version affected_version = 3; + * @return The affectedVersion. + */ + @java.lang.Override + public io.grafeas.v1.Version getAffectedVersion() { + return affectedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; + } + /** + *
+     * Required. The version of the package that is installed on the resource
+     * affected by this vulnerability.
+     * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getAffectedVersionOrBuilder() { + return affectedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; + } + + public static final int FIXED_CPE_URI_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object fixedCpeUri_ = ""; + /** + *
+     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+     * was fixed in. It is possible for this to be different from the
+     * affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 4; + * @return The fixedCpeUri. + */ + @java.lang.Override + public java.lang.String getFixedCpeUri() { + java.lang.Object ref = fixedCpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedCpeUri_ = s; + return s; + } + } + /** + *
+     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+     * was fixed in. It is possible for this to be different from the
+     * affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 4; + * @return The bytes for fixedCpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFixedCpeUriBytes() { + java.lang.Object ref = fixedCpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIXED_PACKAGE_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object fixedPackage_ = ""; + /** + *
+     * The package this vulnerability was fixed in. It is possible for this to
+     * be different from the affected_package.
+     * 
+ * + * string fixed_package = 5; + * @return The fixedPackage. + */ + @java.lang.Override + public java.lang.String getFixedPackage() { + java.lang.Object ref = fixedPackage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedPackage_ = s; + return s; + } + } + /** + *
+     * The package this vulnerability was fixed in. It is possible for this to
+     * be different from the affected_package.
+     * 
+ * + * string fixed_package = 5; + * @return The bytes for fixedPackage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFixedPackageBytes() { + java.lang.Object ref = fixedPackage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIXED_VERSION_FIELD_NUMBER = 6; + private io.grafeas.v1.Version fixedVersion_; + /** + *
+     * Required. The version of the package this vulnerability was fixed in.
+     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 6; + * @return Whether the fixedVersion field is set. + */ + @java.lang.Override + public boolean hasFixedVersion() { + return fixedVersion_ != null; + } + /** + *
+     * Required. The version of the package this vulnerability was fixed in.
+     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 6; + * @return The fixedVersion. + */ + @java.lang.Override + public io.grafeas.v1.Version getFixedVersion() { + return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } + /** + *
+     * Required. The version of the package this vulnerability was fixed in.
+     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { + return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } + + public static final int FIX_AVAILABLE_FIELD_NUMBER = 7; + private boolean fixAvailable_ = false; + /** + *
+     * Output only. Whether a fix is available for this package.
+     * 
+ * + * bool fix_available = 7; + * @return The fixAvailable. + */ + @java.lang.Override + public boolean getFixAvailable() { + return fixAvailable_; + } + + public static final int PACKAGE_TYPE_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object packageType_ = ""; + /** + *
+     * The type of package (e.g. OS, MAVEN, GO).
+     * 
+ * + * string package_type = 8; + * @return The packageType. + */ + @java.lang.Override + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } + } + /** + *
+     * The type of package (e.g. OS, MAVEN, GO).
+     * 
+ * + * string package_type = 8; + * @return The bytes for packageType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EFFECTIVE_SEVERITY_FIELD_NUMBER = 9; + private int effectiveSeverity_ = 0; + /** + *
+     * The distro or language system assigned severity for this vulnerability
+     * when that is available and note provider assigned severity when it is not
+     * available.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for effectiveSeverity. + */ + @java.lang.Override public int getEffectiveSeverityValue() { + return effectiveSeverity_; + } + /** + *
+     * The distro or language system assigned severity for this vulnerability
+     * when that is available and note provider assigned severity when it is not
+     * available.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The effectiveSeverity. + */ + @java.lang.Override public io.grafeas.v1.Severity getEffectiveSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + + public static final int FILE_LOCATION_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private java.util.List fileLocation_; + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + @java.lang.Override + public java.util.List getFileLocationList() { + return fileLocation_; + } + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + @java.lang.Override + public java.util.List + getFileLocationOrBuilderList() { + return fileLocation_; + } + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + @java.lang.Override + public int getFileLocationCount() { + return fileLocation_.size(); + } + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + @java.lang.Override + public io.grafeas.v1.FileLocation getFileLocation(int index) { + return fileLocation_.get(index); + } + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + @java.lang.Override + public io.grafeas.v1.FileLocationOrBuilder getFileLocationOrBuilder( + int index) { + return fileLocation_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, affectedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, affectedPackage_); + } + if (affectedVersion_ != null) { + output.writeMessage(3, getAffectedVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, fixedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fixedPackage_); + } + if (fixedVersion_ != null) { + output.writeMessage(6, getFixedVersion()); + } + if (fixAvailable_ != false) { + output.writeBool(7, fixAvailable_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, packageType_); + } + if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + output.writeEnum(9, effectiveSeverity_); + } + for (int i = 0; i < fileLocation_.size(); i++) { + output.writeMessage(10, fileLocation_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, affectedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, affectedPackage_); + } + if (affectedVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getAffectedVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, fixedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, fixedPackage_); + } + if (fixedVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getFixedVersion()); + } + if (fixAvailable_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, fixAvailable_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, packageType_); + } + if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, effectiveSeverity_); + } + for (int i = 0; i < fileLocation_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, fileLocation_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityOccurrence.PackageIssue)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue other = (io.grafeas.v1.VulnerabilityOccurrence.PackageIssue) obj; + + if (!getAffectedCpeUri() + .equals(other.getAffectedCpeUri())) return false; + if (!getAffectedPackage() + .equals(other.getAffectedPackage())) return false; + if (hasAffectedVersion() != other.hasAffectedVersion()) return false; + if (hasAffectedVersion()) { + if (!getAffectedVersion() + .equals(other.getAffectedVersion())) return false; + } + if (!getFixedCpeUri() + .equals(other.getFixedCpeUri())) return false; + if (!getFixedPackage() + .equals(other.getFixedPackage())) return false; + if (hasFixedVersion() != other.hasFixedVersion()) return false; + if (hasFixedVersion()) { + if (!getFixedVersion() + .equals(other.getFixedVersion())) return false; + } + if (getFixAvailable() + != other.getFixAvailable()) return false; + if (!getPackageType() + .equals(other.getPackageType())) return false; + if (effectiveSeverity_ != other.effectiveSeverity_) return false; + if (!getFileLocationList() + .equals(other.getFileLocationList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AFFECTED_CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getAffectedCpeUri().hashCode(); + hash = (37 * hash) + AFFECTED_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getAffectedPackage().hashCode(); + if (hasAffectedVersion()) { + hash = (37 * hash) + AFFECTED_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getAffectedVersion().hashCode(); + } + hash = (37 * hash) + FIXED_CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getFixedCpeUri().hashCode(); + hash = (37 * hash) + FIXED_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getFixedPackage().hashCode(); + if (hasFixedVersion()) { + hash = (37 * hash) + FIXED_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getFixedVersion().hashCode(); + } + hash = (37 * hash) + FIX_AVAILABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFixAvailable()); + hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPackageType().hashCode(); + hash = (37 * hash) + EFFECTIVE_SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + effectiveSeverity_; + if (getFileLocationCount() > 0) { + hash = (37 * hash) + FILE_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getFileLocationList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A detail for a distro and package this vulnerability occurrence was found
+     * in and its associated fix (if one is available).
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.PackageIssue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityOccurrence.PackageIssue) + io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.class, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + affectedCpeUri_ = ""; + affectedPackage_ = ""; + affectedVersion_ = null; + if (affectedVersionBuilder_ != null) { + affectedVersionBuilder_.dispose(); + affectedVersionBuilder_ = null; + } + fixedCpeUri_ = ""; + fixedPackage_ = ""; + fixedVersion_ = null; + if (fixedVersionBuilder_ != null) { + fixedVersionBuilder_.dispose(); + fixedVersionBuilder_ = null; + } + fixAvailable_ = false; + packageType_ = ""; + effectiveSeverity_ = 0; + if (fileLocationBuilder_ == null) { + fileLocation_ = java.util.Collections.emptyList(); + } else { + fileLocation_ = null; + fileLocationBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue build() { + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue buildPartial() { + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result = new io.grafeas.v1.VulnerabilityOccurrence.PackageIssue(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result) { + if (fileLocationBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + fileLocation_ = java.util.Collections.unmodifiableList(fileLocation_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.fileLocation_ = fileLocation_; + } else { + result.fileLocation_ = fileLocationBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.affectedCpeUri_ = affectedCpeUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.affectedPackage_ = affectedPackage_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.affectedVersion_ = affectedVersionBuilder_ == null + ? affectedVersion_ + : affectedVersionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.fixedCpeUri_ = fixedCpeUri_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.fixedPackage_ = fixedPackage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.fixedVersion_ = fixedVersionBuilder_ == null + ? fixedVersion_ + : fixedVersionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.fixAvailable_ = fixAvailable_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.packageType_ = packageType_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.effectiveSeverity_ = effectiveSeverity_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityOccurrence.PackageIssue) { + return mergeFrom((io.grafeas.v1.VulnerabilityOccurrence.PackageIssue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue other) { + if (other == io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance()) return this; + if (!other.getAffectedCpeUri().isEmpty()) { + affectedCpeUri_ = other.affectedCpeUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAffectedPackage().isEmpty()) { + affectedPackage_ = other.affectedPackage_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAffectedVersion()) { + mergeAffectedVersion(other.getAffectedVersion()); + } + if (!other.getFixedCpeUri().isEmpty()) { + fixedCpeUri_ = other.fixedCpeUri_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getFixedPackage().isEmpty()) { + fixedPackage_ = other.fixedPackage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasFixedVersion()) { + mergeFixedVersion(other.getFixedVersion()); + } + if (other.getFixAvailable() != false) { + setFixAvailable(other.getFixAvailable()); + } + if (!other.getPackageType().isEmpty()) { + packageType_ = other.packageType_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.effectiveSeverity_ != 0) { + setEffectiveSeverityValue(other.getEffectiveSeverityValue()); + } + if (fileLocationBuilder_ == null) { + if (!other.fileLocation_.isEmpty()) { + if (fileLocation_.isEmpty()) { + fileLocation_ = other.fileLocation_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureFileLocationIsMutable(); + fileLocation_.addAll(other.fileLocation_); + } + onChanged(); + } + } else { + if (!other.fileLocation_.isEmpty()) { + if (fileLocationBuilder_.isEmpty()) { + fileLocationBuilder_.dispose(); + fileLocationBuilder_ = null; + fileLocation_ = other.fileLocation_; + bitField0_ = (bitField0_ & ~0x00000200); + fileLocationBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFileLocationFieldBuilder() : null; + } else { + fileLocationBuilder_.addAllMessages(other.fileLocation_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + affectedCpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + affectedPackage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getAffectedVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + fixedCpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + fixedPackage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getFixedVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + fixAvailable_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + packageType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: { + effectiveSeverity_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: { + io.grafeas.v1.FileLocation m = + input.readMessage( + io.grafeas.v1.FileLocation.parser(), + extensionRegistry); + if (fileLocationBuilder_ == null) { + ensureFileLocationIsMutable(); + fileLocation_.add(m); + } else { + fileLocationBuilder_.addMessage(m); + } + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object affectedCpeUri_ = ""; + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability was found in.
+       * 
+ * + * string affected_cpe_uri = 1; + * @return The affectedCpeUri. + */ + public java.lang.String getAffectedCpeUri() { + java.lang.Object ref = affectedCpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedCpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability was found in.
+       * 
+ * + * string affected_cpe_uri = 1; + * @return The bytes for affectedCpeUri. + */ + public com.google.protobuf.ByteString + getAffectedCpeUriBytes() { + java.lang.Object ref = affectedCpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability was found in.
+       * 
+ * + * string affected_cpe_uri = 1; + * @param value The affectedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setAffectedCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + affectedCpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability was found in.
+       * 
+ * + * string affected_cpe_uri = 1; + * @return This builder for chaining. + */ + public Builder clearAffectedCpeUri() { + affectedCpeUri_ = getDefaultInstance().getAffectedCpeUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability was found in.
+       * 
+ * + * string affected_cpe_uri = 1; + * @param value The bytes for affectedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setAffectedCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + affectedCpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object affectedPackage_ = ""; + /** + *
+       * Required. The package this vulnerability was found in.
+       * 
+ * + * string affected_package = 2; + * @return The affectedPackage. + */ + public java.lang.String getAffectedPackage() { + java.lang.Object ref = affectedPackage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedPackage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The package this vulnerability was found in.
+       * 
+ * + * string affected_package = 2; + * @return The bytes for affectedPackage. + */ + public com.google.protobuf.ByteString + getAffectedPackageBytes() { + java.lang.Object ref = affectedPackage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The package this vulnerability was found in.
+       * 
+ * + * string affected_package = 2; + * @param value The affectedPackage to set. + * @return This builder for chaining. + */ + public Builder setAffectedPackage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + affectedPackage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Required. The package this vulnerability was found in.
+       * 
+ * + * string affected_package = 2; + * @return This builder for chaining. + */ + public Builder clearAffectedPackage() { + affectedPackage_ = getDefaultInstance().getAffectedPackage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * Required. The package this vulnerability was found in.
+       * 
+ * + * string affected_package = 2; + * @param value The bytes for affectedPackage to set. + * @return This builder for chaining. + */ + public Builder setAffectedPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + affectedPackage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.grafeas.v1.Version affectedVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> affectedVersionBuilder_; + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + * @return Whether the affectedVersion field is set. + */ + public boolean hasAffectedVersion() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + * @return The affectedVersion. + */ + public io.grafeas.v1.Version getAffectedVersion() { + if (affectedVersionBuilder_ == null) { + return affectedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; + } else { + return affectedVersionBuilder_.getMessage(); + } + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + public Builder setAffectedVersion(io.grafeas.v1.Version value) { + if (affectedVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + affectedVersion_ = value; + } else { + affectedVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + public Builder setAffectedVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (affectedVersionBuilder_ == null) { + affectedVersion_ = builderForValue.build(); + } else { + affectedVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + public Builder mergeAffectedVersion(io.grafeas.v1.Version value) { + if (affectedVersionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + affectedVersion_ != null && + affectedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { + getAffectedVersionBuilder().mergeFrom(value); + } else { + affectedVersion_ = value; + } + } else { + affectedVersionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + public Builder clearAffectedVersion() { + bitField0_ = (bitField0_ & ~0x00000004); + affectedVersion_ = null; + if (affectedVersionBuilder_ != null) { + affectedVersionBuilder_.dispose(); + affectedVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + public io.grafeas.v1.Version.Builder getAffectedVersionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAffectedVersionFieldBuilder().getBuilder(); + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + public io.grafeas.v1.VersionOrBuilder getAffectedVersionOrBuilder() { + if (affectedVersionBuilder_ != null) { + return affectedVersionBuilder_.getMessageOrBuilder(); + } else { + return affectedVersion_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; + } + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getAffectedVersionFieldBuilder() { + if (affectedVersionBuilder_ == null) { + affectedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getAffectedVersion(), + getParentForChildren(), + isClean()); + affectedVersion_ = null; + } + return affectedVersionBuilder_; + } + + private java.lang.Object fixedCpeUri_ = ""; + /** + *
+       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+       * was fixed in. It is possible for this to be different from the
+       * affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 4; + * @return The fixedCpeUri. + */ + public java.lang.String getFixedCpeUri() { + java.lang.Object ref = fixedCpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedCpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+       * was fixed in. It is possible for this to be different from the
+       * affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 4; + * @return The bytes for fixedCpeUri. + */ + public com.google.protobuf.ByteString + getFixedCpeUriBytes() { + java.lang.Object ref = fixedCpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+       * was fixed in. It is possible for this to be different from the
+       * affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 4; + * @param value The fixedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setFixedCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fixedCpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+       * was fixed in. It is possible for this to be different from the
+       * affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 4; + * @return This builder for chaining. + */ + public Builder clearFixedCpeUri() { + fixedCpeUri_ = getDefaultInstance().getFixedCpeUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+       * was fixed in. It is possible for this to be different from the
+       * affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 4; + * @param value The bytes for fixedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setFixedCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fixedCpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object fixedPackage_ = ""; + /** + *
+       * The package this vulnerability was fixed in. It is possible for this to
+       * be different from the affected_package.
+       * 
+ * + * string fixed_package = 5; + * @return The fixedPackage. + */ + public java.lang.String getFixedPackage() { + java.lang.Object ref = fixedPackage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedPackage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The package this vulnerability was fixed in. It is possible for this to
+       * be different from the affected_package.
+       * 
+ * + * string fixed_package = 5; + * @return The bytes for fixedPackage. + */ + public com.google.protobuf.ByteString + getFixedPackageBytes() { + java.lang.Object ref = fixedPackage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The package this vulnerability was fixed in. It is possible for this to
+       * be different from the affected_package.
+       * 
+ * + * string fixed_package = 5; + * @param value The fixedPackage to set. + * @return This builder for chaining. + */ + public Builder setFixedPackage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fixedPackage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * The package this vulnerability was fixed in. It is possible for this to
+       * be different from the affected_package.
+       * 
+ * + * string fixed_package = 5; + * @return This builder for chaining. + */ + public Builder clearFixedPackage() { + fixedPackage_ = getDefaultInstance().getFixedPackage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+       * The package this vulnerability was fixed in. It is possible for this to
+       * be different from the affected_package.
+       * 
+ * + * string fixed_package = 5; + * @param value The bytes for fixedPackage to set. + * @return This builder for chaining. + */ + public Builder setFixedPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fixedPackage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private io.grafeas.v1.Version fixedVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> fixedVersionBuilder_; + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + * @return Whether the fixedVersion field is set. + */ + public boolean hasFixedVersion() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + * @return The fixedVersion. + */ + public io.grafeas.v1.Version getFixedVersion() { + if (fixedVersionBuilder_ == null) { + return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } else { + return fixedVersionBuilder_.getMessage(); + } + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + public Builder setFixedVersion(io.grafeas.v1.Version value) { + if (fixedVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fixedVersion_ = value; + } else { + fixedVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + public Builder setFixedVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (fixedVersionBuilder_ == null) { + fixedVersion_ = builderForValue.build(); + } else { + fixedVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + public Builder mergeFixedVersion(io.grafeas.v1.Version value) { + if (fixedVersionBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + fixedVersion_ != null && + fixedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { + getFixedVersionBuilder().mergeFrom(value); + } else { + fixedVersion_ = value; + } + } else { + fixedVersionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + public Builder clearFixedVersion() { + bitField0_ = (bitField0_ & ~0x00000020); + fixedVersion_ = null; + if (fixedVersionBuilder_ != null) { + fixedVersionBuilder_.dispose(); + fixedVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + public io.grafeas.v1.Version.Builder getFixedVersionBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getFixedVersionFieldBuilder().getBuilder(); + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { + if (fixedVersionBuilder_ != null) { + return fixedVersionBuilder_.getMessageOrBuilder(); + } else { + return fixedVersion_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getFixedVersionFieldBuilder() { + if (fixedVersionBuilder_ == null) { + fixedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getFixedVersion(), + getParentForChildren(), + isClean()); + fixedVersion_ = null; + } + return fixedVersionBuilder_; + } + + private boolean fixAvailable_ ; + /** + *
+       * Output only. Whether a fix is available for this package.
+       * 
+ * + * bool fix_available = 7; + * @return The fixAvailable. + */ + @java.lang.Override + public boolean getFixAvailable() { + return fixAvailable_; + } + /** + *
+       * Output only. Whether a fix is available for this package.
+       * 
+ * + * bool fix_available = 7; + * @param value The fixAvailable to set. + * @return This builder for chaining. + */ + public Builder setFixAvailable(boolean value) { + + fixAvailable_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * Output only. Whether a fix is available for this package.
+       * 
+ * + * bool fix_available = 7; + * @return This builder for chaining. + */ + public Builder clearFixAvailable() { + bitField0_ = (bitField0_ & ~0x00000040); + fixAvailable_ = false; + onChanged(); + return this; + } + + private java.lang.Object packageType_ = ""; + /** + *
+       * The type of package (e.g. OS, MAVEN, GO).
+       * 
+ * + * string package_type = 8; + * @return The packageType. + */ + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The type of package (e.g. OS, MAVEN, GO).
+       * 
+ * + * string package_type = 8; + * @return The bytes for packageType. + */ + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The type of package (e.g. OS, MAVEN, GO).
+       * 
+ * + * string package_type = 8; + * @param value The packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + packageType_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+       * The type of package (e.g. OS, MAVEN, GO).
+       * 
+ * + * string package_type = 8; + * @return This builder for chaining. + */ + public Builder clearPackageType() { + packageType_ = getDefaultInstance().getPackageType(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + *
+       * The type of package (e.g. OS, MAVEN, GO).
+       * 
+ * + * string package_type = 8; + * @param value The bytes for packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + packageType_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private int effectiveSeverity_ = 0; + /** + *
+       * The distro or language system assigned severity for this vulnerability
+       * when that is available and note provider assigned severity when it is not
+       * available.
+       * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for effectiveSeverity. + */ + @java.lang.Override public int getEffectiveSeverityValue() { + return effectiveSeverity_; + } + /** + *
+       * The distro or language system assigned severity for this vulnerability
+       * when that is available and note provider assigned severity when it is not
+       * available.
+       * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for effectiveSeverity to set. + * @return This builder for chaining. + */ + public Builder setEffectiveSeverityValue(int value) { + effectiveSeverity_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+       * The distro or language system assigned severity for this vulnerability
+       * when that is available and note provider assigned severity when it is not
+       * available.
+       * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The effectiveSeverity. + */ + @java.lang.Override + public io.grafeas.v1.Severity getEffectiveSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + /** + *
+       * The distro or language system assigned severity for this vulnerability
+       * when that is available and note provider assigned severity when it is not
+       * available.
+       * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The effectiveSeverity to set. + * @return This builder for chaining. + */ + public Builder setEffectiveSeverity(io.grafeas.v1.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + effectiveSeverity_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The distro or language system assigned severity for this vulnerability
+       * when that is available and note provider assigned severity when it is not
+       * available.
+       * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearEffectiveSeverity() { + bitField0_ = (bitField0_ & ~0x00000100); + effectiveSeverity_ = 0; + onChanged(); + return this; + } + + private java.util.List fileLocation_ = + java.util.Collections.emptyList(); + private void ensureFileLocationIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + fileLocation_ = new java.util.ArrayList(fileLocation_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.FileLocation, io.grafeas.v1.FileLocation.Builder, io.grafeas.v1.FileLocationOrBuilder> fileLocationBuilder_; + + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public java.util.List getFileLocationList() { + if (fileLocationBuilder_ == null) { + return java.util.Collections.unmodifiableList(fileLocation_); + } else { + return fileLocationBuilder_.getMessageList(); + } + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public int getFileLocationCount() { + if (fileLocationBuilder_ == null) { + return fileLocation_.size(); + } else { + return fileLocationBuilder_.getCount(); + } + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public io.grafeas.v1.FileLocation getFileLocation(int index) { + if (fileLocationBuilder_ == null) { + return fileLocation_.get(index); + } else { + return fileLocationBuilder_.getMessage(index); + } + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder setFileLocation( + int index, io.grafeas.v1.FileLocation value) { + if (fileLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileLocationIsMutable(); + fileLocation_.set(index, value); + onChanged(); + } else { + fileLocationBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder setFileLocation( + int index, io.grafeas.v1.FileLocation.Builder builderForValue) { + if (fileLocationBuilder_ == null) { + ensureFileLocationIsMutable(); + fileLocation_.set(index, builderForValue.build()); + onChanged(); + } else { + fileLocationBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder addFileLocation(io.grafeas.v1.FileLocation value) { + if (fileLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileLocationIsMutable(); + fileLocation_.add(value); + onChanged(); + } else { + fileLocationBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder addFileLocation( + int index, io.grafeas.v1.FileLocation value) { + if (fileLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileLocationIsMutable(); + fileLocation_.add(index, value); + onChanged(); + } else { + fileLocationBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder addFileLocation( + io.grafeas.v1.FileLocation.Builder builderForValue) { + if (fileLocationBuilder_ == null) { + ensureFileLocationIsMutable(); + fileLocation_.add(builderForValue.build()); + onChanged(); + } else { + fileLocationBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder addFileLocation( + int index, io.grafeas.v1.FileLocation.Builder builderForValue) { + if (fileLocationBuilder_ == null) { + ensureFileLocationIsMutable(); + fileLocation_.add(index, builderForValue.build()); + onChanged(); + } else { + fileLocationBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder addAllFileLocation( + java.lang.Iterable values) { + if (fileLocationBuilder_ == null) { + ensureFileLocationIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fileLocation_); + onChanged(); + } else { + fileLocationBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder clearFileLocation() { + if (fileLocationBuilder_ == null) { + fileLocation_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + fileLocationBuilder_.clear(); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder removeFileLocation(int index) { + if (fileLocationBuilder_ == null) { + ensureFileLocationIsMutable(); + fileLocation_.remove(index); + onChanged(); + } else { + fileLocationBuilder_.remove(index); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public io.grafeas.v1.FileLocation.Builder getFileLocationBuilder( + int index) { + return getFileLocationFieldBuilder().getBuilder(index); + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public io.grafeas.v1.FileLocationOrBuilder getFileLocationOrBuilder( + int index) { + if (fileLocationBuilder_ == null) { + return fileLocation_.get(index); } else { + return fileLocationBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public java.util.List + getFileLocationOrBuilderList() { + if (fileLocationBuilder_ != null) { + return fileLocationBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fileLocation_); + } + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public io.grafeas.v1.FileLocation.Builder addFileLocationBuilder() { + return getFileLocationFieldBuilder().addBuilder( + io.grafeas.v1.FileLocation.getDefaultInstance()); + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public io.grafeas.v1.FileLocation.Builder addFileLocationBuilder( + int index) { + return getFileLocationFieldBuilder().addBuilder( + index, io.grafeas.v1.FileLocation.getDefaultInstance()); + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public java.util.List + getFileLocationBuilderList() { + return getFileLocationFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.FileLocation, io.grafeas.v1.FileLocation.Builder, io.grafeas.v1.FileLocationOrBuilder> + getFileLocationFieldBuilder() { + if (fileLocationBuilder_ == null) { + fileLocationBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.FileLocation, io.grafeas.v1.FileLocation.Builder, io.grafeas.v1.FileLocationOrBuilder>( + fileLocation_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + fileLocation_ = null; + } + return fileLocationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityOccurrence.PackageIssue) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityOccurrence.PackageIssue) + private static final io.grafeas.v1.VulnerabilityOccurrence.PackageIssue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityOccurrence.PackageIssue(); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PackageIssue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems, node.js
+   * packages, etc.).
+   * 
+ * + * string type = 1; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems, node.js
+   * packages, etc.).
+   * 
+ * + * string type = 1; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEVERITY_FIELD_NUMBER = 2; + private int severity_ = 0; + /** + *
+   * Output only. The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override public int getSeverityValue() { + return severity_; + } + /** + *
+   * Output only. The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + @java.lang.Override public io.grafeas.v1.Severity getSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + + public static final int CVSS_SCORE_FIELD_NUMBER = 3; + private float cvssScore_ = 0F; + /** + *
+   * Output only. The CVSS score of this vulnerability. CVSS score is on a
+   * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
+   * severity.
+   * 
+ * + * float cvss_score = 3; + * @return The cvssScore. + */ + @java.lang.Override + public float getCvssScore() { + return cvssScore_; + } + + public static final int CVSSV3_FIELD_NUMBER = 10; + private io.grafeas.v1.CVSS cvssv3_; + /** + *
+   * The cvss v3 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + * @return Whether the cvssv3 field is set. + */ + @java.lang.Override + public boolean hasCvssv3() { + return cvssv3_ != null; + } + /** + *
+   * The cvss v3 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + * @return The cvssv3. + */ + @java.lang.Override + public io.grafeas.v1.CVSS getCvssv3() { + return cvssv3_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; + } + /** + *
+   * The cvss v3 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + @java.lang.Override + public io.grafeas.v1.CVSSOrBuilder getCvssv3OrBuilder() { + return cvssv3_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; + } + + public static final int PACKAGE_ISSUE_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List packageIssue_; + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + @java.lang.Override + public java.util.List getPackageIssueList() { + return packageIssue_; + } + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + @java.lang.Override + public java.util.List + getPackageIssueOrBuilderList() { + return packageIssue_; + } + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + @java.lang.Override + public int getPackageIssueCount() { + return packageIssue_.size(); + } + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getPackageIssue(int index) { + return packageIssue_.get(index); + } + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder getPackageIssueOrBuilder( + int index) { + return packageIssue_.get(index); + } + + public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object shortDescription_ = ""; + /** + *
+   * Output only. A one sentence description of this vulnerability.
+   * 
+ * + * string short_description = 5; + * @return The shortDescription. + */ + @java.lang.Override + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } + } + /** + *
+   * Output only. A one sentence description of this vulnerability.
+   * 
+ * + * string short_description = 5; + * @return The bytes for shortDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LONG_DESCRIPTION_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object longDescription_ = ""; + /** + *
+   * Output only. A detailed description of this vulnerability.
+   * 
+ * + * string long_description = 6; + * @return The longDescription. + */ + @java.lang.Override + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } + } + /** + *
+   * Output only. A detailed description of this vulnerability.
+   * 
+ * + * string long_description = 6; + * @return The bytes for longDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATED_URLS_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private java.util.List relatedUrls_; + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + @java.lang.Override + public java.util.List getRelatedUrlsList() { + return relatedUrls_; + } + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + @java.lang.Override + public java.util.List + getRelatedUrlsOrBuilderList() { + return relatedUrls_; + } + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + @java.lang.Override + public int getRelatedUrlsCount() { + return relatedUrls_.size(); + } + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrl getRelatedUrls(int index) { + return relatedUrls_.get(index); + } + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlsOrBuilder( + int index) { + return relatedUrls_.get(index); + } + + public static final int EFFECTIVE_SEVERITY_FIELD_NUMBER = 8; + private int effectiveSeverity_ = 0; + /** + *
+   * The distro assigned severity for this vulnerability when it is available,
+   * otherwise this is the note provider assigned severity.
+   * When there are multiple PackageIssues for this vulnerability, they can have
+   * different effective severities because some might be provided by the distro
+   * while others are provided by the language ecosystem for a language pack.
+   * For this reason, it is advised to use the effective severity on the
+   * PackageIssue level. In the case where multiple PackageIssues have differing
+   * effective severities, this field should be the highest severity for any of
+   * the PackageIssues.
+   * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @return The enum numeric value on the wire for effectiveSeverity. + */ + @java.lang.Override public int getEffectiveSeverityValue() { + return effectiveSeverity_; + } + /** + *
+   * The distro assigned severity for this vulnerability when it is available,
+   * otherwise this is the note provider assigned severity.
+   * When there are multiple PackageIssues for this vulnerability, they can have
+   * different effective severities because some might be provided by the distro
+   * while others are provided by the language ecosystem for a language pack.
+   * For this reason, it is advised to use the effective severity on the
+   * PackageIssue level. In the case where multiple PackageIssues have differing
+   * effective severities, this field should be the highest severity for any of
+   * the PackageIssues.
+   * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @return The effectiveSeverity. + */ + @java.lang.Override public io.grafeas.v1.Severity getEffectiveSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + + public static final int FIX_AVAILABLE_FIELD_NUMBER = 9; + private boolean fixAvailable_ = false; + /** + *
+   * Output only. Whether at least one of the affected packages has a fix
+   * available.
+   * 
+ * + * bool fix_available = 9; + * @return The fixAvailable. + */ + @java.lang.Override + public boolean getFixAvailable() { + return fixAvailable_; + } + + public static final int CVSS_VERSION_FIELD_NUMBER = 11; + private int cvssVersion_ = 0; + /** + *
+   * Output only. CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @return The enum numeric value on the wire for cvssVersion. + */ + @java.lang.Override public int getCvssVersionValue() { + return cvssVersion_; + } + /** + *
+   * Output only. CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @return The cvssVersion. + */ + @java.lang.Override public io.grafeas.v1.CVSSVersion getCvssVersion() { + io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); + return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; + } + + public static final int CVSS_V2_FIELD_NUMBER = 12; + private io.grafeas.v1.CVSS cvssV2_; + /** + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * @return Whether the cvssV2 field is set. + */ + @java.lang.Override + public boolean hasCvssV2() { + return cvssV2_ != null; + } + /** + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * @return The cvssV2. + */ + @java.lang.Override + public io.grafeas.v1.CVSS getCvssV2() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + /** + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + @java.lang.Override + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + output.writeEnum(2, severity_); + } + if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { + output.writeFloat(3, cvssScore_); + } + for (int i = 0; i < packageIssue_.size(); i++) { + output.writeMessage(4, packageIssue_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, longDescription_); + } + for (int i = 0; i < relatedUrls_.size(); i++) { + output.writeMessage(7, relatedUrls_.get(i)); + } + if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + output.writeEnum(8, effectiveSeverity_); + } + if (fixAvailable_ != false) { + output.writeBool(9, fixAvailable_); + } + if (cvssv3_ != null) { + output.writeMessage(10, getCvssv3()); + } + if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { + output.writeEnum(11, cvssVersion_); + } + if (cvssV2_ != null) { + output.writeMessage(12, getCvssV2()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, severity_); + } + if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, cvssScore_); + } + for (int i = 0; i < packageIssue_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, packageIssue_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, longDescription_); + } + for (int i = 0; i < relatedUrls_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, relatedUrls_.get(i)); + } + if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, effectiveSeverity_); + } + if (fixAvailable_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, fixAvailable_); + } + if (cvssv3_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getCvssv3()); + } + if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, cvssVersion_); + } + if (cvssV2_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getCvssV2()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityOccurrence other = (io.grafeas.v1.VulnerabilityOccurrence) obj; + + if (!getType() + .equals(other.getType())) return false; + if (severity_ != other.severity_) return false; + if (java.lang.Float.floatToIntBits(getCvssScore()) + != java.lang.Float.floatToIntBits( + other.getCvssScore())) return false; + if (hasCvssv3() != other.hasCvssv3()) return false; + if (hasCvssv3()) { + if (!getCvssv3() + .equals(other.getCvssv3())) return false; + } + if (!getPackageIssueList() + .equals(other.getPackageIssueList())) return false; + if (!getShortDescription() + .equals(other.getShortDescription())) return false; + if (!getLongDescription() + .equals(other.getLongDescription())) return false; + if (!getRelatedUrlsList() + .equals(other.getRelatedUrlsList())) return false; + if (effectiveSeverity_ != other.effectiveSeverity_) return false; + if (getFixAvailable() + != other.getFixAvailable()) return false; + if (cvssVersion_ != other.cvssVersion_) return false; + if (hasCvssV2() != other.hasCvssV2()) return false; + if (hasCvssV2()) { + if (!getCvssV2() + .equals(other.getCvssV2())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + severity_; + hash = (37 * hash) + CVSS_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getCvssScore()); + if (hasCvssv3()) { + hash = (37 * hash) + CVSSV3_FIELD_NUMBER; + hash = (53 * hash) + getCvssv3().hashCode(); + } + if (getPackageIssueCount() > 0) { + hash = (37 * hash) + PACKAGE_ISSUE_FIELD_NUMBER; + hash = (53 * hash) + getPackageIssueList().hashCode(); + } + hash = (37 * hash) + SHORT_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getShortDescription().hashCode(); + hash = (37 * hash) + LONG_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getLongDescription().hashCode(); + if (getRelatedUrlsCount() > 0) { + hash = (37 * hash) + RELATED_URLS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedUrlsList().hashCode(); + } + hash = (37 * hash) + EFFECTIVE_SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + effectiveSeverity_; + hash = (37 * hash) + FIX_AVAILABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFixAvailable()); + hash = (37 * hash) + CVSS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + cvssVersion_; + if (hasCvssV2()) { + hash = (37 * hash) + CVSS_V2_FIELD_NUMBER; + hash = (53 * hash) + getCvssV2().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An occurrence of a severity vulnerability on a resource.
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityOccurrence) + io.grafeas.v1.VulnerabilityOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityOccurrence.class, io.grafeas.v1.VulnerabilityOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + severity_ = 0; + cvssScore_ = 0F; + cvssv3_ = null; + if (cvssv3Builder_ != null) { + cvssv3Builder_.dispose(); + cvssv3Builder_ = null; + } + if (packageIssueBuilder_ == null) { + packageIssue_ = java.util.Collections.emptyList(); + } else { + packageIssue_ = null; + packageIssueBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + shortDescription_ = ""; + longDescription_ = ""; + if (relatedUrlsBuilder_ == null) { + relatedUrls_ = java.util.Collections.emptyList(); + } else { + relatedUrls_ = null; + relatedUrlsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + effectiveSeverity_ = 0; + fixAvailable_ = false; + cvssVersion_ = 0; + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence build() { + io.grafeas.v1.VulnerabilityOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence buildPartial() { + io.grafeas.v1.VulnerabilityOccurrence result = new io.grafeas.v1.VulnerabilityOccurrence(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityOccurrence result) { + if (packageIssueBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + packageIssue_ = java.util.Collections.unmodifiableList(packageIssue_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.packageIssue_ = packageIssue_; + } else { + result.packageIssue_ = packageIssueBuilder_.build(); + } + if (relatedUrlsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + relatedUrls_ = java.util.Collections.unmodifiableList(relatedUrls_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.relatedUrls_ = relatedUrls_; + } else { + result.relatedUrls_ = relatedUrlsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.severity_ = severity_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cvssScore_ = cvssScore_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cvssv3_ = cvssv3Builder_ == null + ? cvssv3_ + : cvssv3Builder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.shortDescription_ = shortDescription_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.longDescription_ = longDescription_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.effectiveSeverity_ = effectiveSeverity_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.fixAvailable_ = fixAvailable_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.cvssVersion_ = cvssVersion_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.cvssV2_ = cvssV2Builder_ == null + ? cvssV2_ + : cvssV2Builder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityOccurrence) { + return mergeFrom((io.grafeas.v1.VulnerabilityOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence other) { + if (other == io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.severity_ != 0) { + setSeverityValue(other.getSeverityValue()); + } + if (other.getCvssScore() != 0F) { + setCvssScore(other.getCvssScore()); + } + if (other.hasCvssv3()) { + mergeCvssv3(other.getCvssv3()); + } + if (packageIssueBuilder_ == null) { + if (!other.packageIssue_.isEmpty()) { + if (packageIssue_.isEmpty()) { + packageIssue_ = other.packageIssue_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensurePackageIssueIsMutable(); + packageIssue_.addAll(other.packageIssue_); + } + onChanged(); + } + } else { + if (!other.packageIssue_.isEmpty()) { + if (packageIssueBuilder_.isEmpty()) { + packageIssueBuilder_.dispose(); + packageIssueBuilder_ = null; + packageIssue_ = other.packageIssue_; + bitField0_ = (bitField0_ & ~0x00000010); + packageIssueBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPackageIssueFieldBuilder() : null; + } else { + packageIssueBuilder_.addAllMessages(other.packageIssue_); + } + } + } + if (!other.getShortDescription().isEmpty()) { + shortDescription_ = other.shortDescription_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getLongDescription().isEmpty()) { + longDescription_ = other.longDescription_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (relatedUrlsBuilder_ == null) { + if (!other.relatedUrls_.isEmpty()) { + if (relatedUrls_.isEmpty()) { + relatedUrls_ = other.relatedUrls_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureRelatedUrlsIsMutable(); + relatedUrls_.addAll(other.relatedUrls_); + } + onChanged(); + } + } else { + if (!other.relatedUrls_.isEmpty()) { + if (relatedUrlsBuilder_.isEmpty()) { + relatedUrlsBuilder_.dispose(); + relatedUrlsBuilder_ = null; + relatedUrls_ = other.relatedUrls_; + bitField0_ = (bitField0_ & ~0x00000080); + relatedUrlsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRelatedUrlsFieldBuilder() : null; + } else { + relatedUrlsBuilder_.addAllMessages(other.relatedUrls_); + } + } + } + if (other.effectiveSeverity_ != 0) { + setEffectiveSeverityValue(other.getEffectiveSeverityValue()); + } + if (other.getFixAvailable() != false) { + setFixAvailable(other.getFixAvailable()); + } + if (other.cvssVersion_ != 0) { + setCvssVersionValue(other.getCvssVersionValue()); + } + if (other.hasCvssV2()) { + mergeCvssV2(other.getCvssV2()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + severity_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 29: { + cvssScore_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 34: { + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue m = + input.readMessage( + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.parser(), + extensionRegistry); + if (packageIssueBuilder_ == null) { + ensurePackageIssueIsMutable(); + packageIssue_.add(m); + } else { + packageIssueBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + shortDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: { + longDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 58: { + io.grafeas.v1.RelatedUrl m = + input.readMessage( + io.grafeas.v1.RelatedUrl.parser(), + extensionRegistry); + if (relatedUrlsBuilder_ == null) { + ensureRelatedUrlsIsMutable(); + relatedUrls_.add(m); + } else { + relatedUrlsBuilder_.addMessage(m); + } + break; + } // case 58 + case 64: { + effectiveSeverity_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 64 + case 72: { + fixAvailable_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 72 + case 82: { + input.readMessage( + getCvssv3FieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 82 + case 88: { + cvssVersion_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 98: { + input.readMessage( + getCvssV2FieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 98 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems, node.js
+     * packages, etc.).
+     * 
+ * + * string type = 1; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems, node.js
+     * packages, etc.).
+     * 
+ * + * string type = 1; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems, node.js
+     * packages, etc.).
+     * 
+ * + * string type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems, node.js
+     * packages, etc.).
+     * 
+ * + * string type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems, node.js
+     * packages, etc.).
+     * 
+ * + * string type = 1; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int severity_ = 0; + /** + *
+     * Output only. The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override public int getSeverityValue() { + return severity_; + } + /** + *
+     * Output only. The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @param value The enum numeric value on the wire for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityValue(int value) { + severity_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + @java.lang.Override + public io.grafeas.v1.Severity getSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity(io.grafeas.v1.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + severity_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return This builder for chaining. + */ + public Builder clearSeverity() { + bitField0_ = (bitField0_ & ~0x00000002); + severity_ = 0; + onChanged(); + return this; + } + + private float cvssScore_ ; + /** + *
+     * Output only. The CVSS score of this vulnerability. CVSS score is on a
+     * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
+     * severity.
+     * 
+ * + * float cvss_score = 3; + * @return The cvssScore. + */ + @java.lang.Override + public float getCvssScore() { + return cvssScore_; + } + /** + *
+     * Output only. The CVSS score of this vulnerability. CVSS score is on a
+     * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
+     * severity.
+     * 
+ * + * float cvss_score = 3; + * @param value The cvssScore to set. + * @return This builder for chaining. + */ + public Builder setCvssScore(float value) { + + cvssScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The CVSS score of this vulnerability. CVSS score is on a
+     * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
+     * severity.
+     * 
+ * + * float cvss_score = 3; + * @return This builder for chaining. + */ + public Builder clearCvssScore() { + bitField0_ = (bitField0_ & ~0x00000004); + cvssScore_ = 0F; + onChanged(); + return this; + } + + private io.grafeas.v1.CVSS cvssv3_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> cvssv3Builder_; + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + * @return Whether the cvssv3 field is set. + */ + public boolean hasCvssv3() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + * @return The cvssv3. + */ + public io.grafeas.v1.CVSS getCvssv3() { + if (cvssv3Builder_ == null) { + return cvssv3_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; + } else { + return cvssv3Builder_.getMessage(); + } + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + public Builder setCvssv3(io.grafeas.v1.CVSS value) { + if (cvssv3Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cvssv3_ = value; + } else { + cvssv3Builder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + public Builder setCvssv3( + io.grafeas.v1.CVSS.Builder builderForValue) { + if (cvssv3Builder_ == null) { + cvssv3_ = builderForValue.build(); + } else { + cvssv3Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + public Builder mergeCvssv3(io.grafeas.v1.CVSS value) { + if (cvssv3Builder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + cvssv3_ != null && + cvssv3_ != io.grafeas.v1.CVSS.getDefaultInstance()) { + getCvssv3Builder().mergeFrom(value); + } else { + cvssv3_ = value; + } + } else { + cvssv3Builder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + public Builder clearCvssv3() { + bitField0_ = (bitField0_ & ~0x00000008); + cvssv3_ = null; + if (cvssv3Builder_ != null) { + cvssv3Builder_.dispose(); + cvssv3Builder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + public io.grafeas.v1.CVSS.Builder getCvssv3Builder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCvssv3FieldBuilder().getBuilder(); + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + public io.grafeas.v1.CVSSOrBuilder getCvssv3OrBuilder() { + if (cvssv3Builder_ != null) { + return cvssv3Builder_.getMessageOrBuilder(); + } else { + return cvssv3_ == null ? + io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; + } + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> + getCvssv3FieldBuilder() { + if (cvssv3Builder_ == null) { + cvssv3Builder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( + getCvssv3(), + getParentForChildren(), + isClean()); + cvssv3_ = null; + } + return cvssv3Builder_; + } + + private java.util.List packageIssue_ = + java.util.Collections.emptyList(); + private void ensurePackageIssueIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + packageIssue_ = new java.util.ArrayList(packageIssue_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder, io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder> packageIssueBuilder_; + + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public java.util.List getPackageIssueList() { + if (packageIssueBuilder_ == null) { + return java.util.Collections.unmodifiableList(packageIssue_); + } else { + return packageIssueBuilder_.getMessageList(); + } + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public int getPackageIssueCount() { + if (packageIssueBuilder_ == null) { + return packageIssue_.size(); + } else { + return packageIssueBuilder_.getCount(); + } + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getPackageIssue(int index) { + if (packageIssueBuilder_ == null) { + return packageIssue_.get(index); + } else { + return packageIssueBuilder_.getMessage(index); + } + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder setPackageIssue( + int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue value) { + if (packageIssueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageIssueIsMutable(); + packageIssue_.set(index, value); + onChanged(); + } else { + packageIssueBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder setPackageIssue( + int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder builderForValue) { + if (packageIssueBuilder_ == null) { + ensurePackageIssueIsMutable(); + packageIssue_.set(index, builderForValue.build()); + onChanged(); + } else { + packageIssueBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder addPackageIssue(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue value) { + if (packageIssueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageIssueIsMutable(); + packageIssue_.add(value); + onChanged(); + } else { + packageIssueBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder addPackageIssue( + int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue value) { + if (packageIssueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageIssueIsMutable(); + packageIssue_.add(index, value); + onChanged(); + } else { + packageIssueBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder addPackageIssue( + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder builderForValue) { + if (packageIssueBuilder_ == null) { + ensurePackageIssueIsMutable(); + packageIssue_.add(builderForValue.build()); + onChanged(); + } else { + packageIssueBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder addPackageIssue( + int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder builderForValue) { + if (packageIssueBuilder_ == null) { + ensurePackageIssueIsMutable(); + packageIssue_.add(index, builderForValue.build()); + onChanged(); + } else { + packageIssueBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder addAllPackageIssue( + java.lang.Iterable values) { + if (packageIssueBuilder_ == null) { + ensurePackageIssueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, packageIssue_); + onChanged(); + } else { + packageIssueBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder clearPackageIssue() { + if (packageIssueBuilder_ == null) { + packageIssue_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + packageIssueBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder removePackageIssue(int index) { + if (packageIssueBuilder_ == null) { + ensurePackageIssueIsMutable(); + packageIssue_.remove(index); + onChanged(); + } else { + packageIssueBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder getPackageIssueBuilder( + int index) { + return getPackageIssueFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder getPackageIssueOrBuilder( + int index) { + if (packageIssueBuilder_ == null) { + return packageIssue_.get(index); } else { + return packageIssueBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public java.util.List + getPackageIssueOrBuilderList() { + if (packageIssueBuilder_ != null) { + return packageIssueBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(packageIssue_); + } + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder addPackageIssueBuilder() { + return getPackageIssueFieldBuilder().addBuilder( + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance()); + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder addPackageIssueBuilder( + int index) { + return getPackageIssueFieldBuilder().addBuilder( + index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance()); + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public java.util.List + getPackageIssueBuilderList() { + return getPackageIssueFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder, io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder> + getPackageIssueFieldBuilder() { + if (packageIssueBuilder_ == null) { + packageIssueBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder, io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder>( + packageIssue_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + packageIssue_ = null; + } + return packageIssueBuilder_; + } + + private java.lang.Object shortDescription_ = ""; + /** + *
+     * Output only. A one sentence description of this vulnerability.
+     * 
+ * + * string short_description = 5; + * @return The shortDescription. + */ + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. A one sentence description of this vulnerability.
+     * 
+ * + * string short_description = 5; + * @return The bytes for shortDescription. + */ + public com.google.protobuf.ByteString + getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. A one sentence description of this vulnerability.
+     * 
+ * + * string short_description = 5; + * @param value The shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + shortDescription_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. A one sentence description of this vulnerability.
+     * 
+ * + * string short_description = 5; + * @return This builder for chaining. + */ + public Builder clearShortDescription() { + shortDescription_ = getDefaultInstance().getShortDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Output only. A one sentence description of this vulnerability.
+     * 
+ * + * string short_description = 5; + * @param value The bytes for shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + shortDescription_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object longDescription_ = ""; + /** + *
+     * Output only. A detailed description of this vulnerability.
+     * 
+ * + * string long_description = 6; + * @return The longDescription. + */ + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. A detailed description of this vulnerability.
+     * 
+ * + * string long_description = 6; + * @return The bytes for longDescription. + */ + public com.google.protobuf.ByteString + getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. A detailed description of this vulnerability.
+     * 
+ * + * string long_description = 6; + * @param value The longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + longDescription_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. A detailed description of this vulnerability.
+     * 
+ * + * string long_description = 6; + * @return This builder for chaining. + */ + public Builder clearLongDescription() { + longDescription_ = getDefaultInstance().getLongDescription(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * Output only. A detailed description of this vulnerability.
+     * 
+ * + * string long_description = 6; + * @param value The bytes for longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + longDescription_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.util.List relatedUrls_ = + java.util.Collections.emptyList(); + private void ensureRelatedUrlsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + relatedUrls_ = new java.util.ArrayList(relatedUrls_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> relatedUrlsBuilder_; + + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public java.util.List getRelatedUrlsList() { + if (relatedUrlsBuilder_ == null) { + return java.util.Collections.unmodifiableList(relatedUrls_); + } else { + return relatedUrlsBuilder_.getMessageList(); + } + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public int getRelatedUrlsCount() { + if (relatedUrlsBuilder_ == null) { + return relatedUrls_.size(); + } else { + return relatedUrlsBuilder_.getCount(); + } + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public io.grafeas.v1.RelatedUrl getRelatedUrls(int index) { + if (relatedUrlsBuilder_ == null) { + return relatedUrls_.get(index); + } else { + return relatedUrlsBuilder_.getMessage(index); + } + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder setRelatedUrls( + int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrlsIsMutable(); + relatedUrls_.set(index, value); + onChanged(); + } else { + relatedUrlsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder setRelatedUrls( + int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrlsBuilder_ == null) { + ensureRelatedUrlsIsMutable(); + relatedUrls_.set(index, builderForValue.build()); + onChanged(); + } else { + relatedUrlsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder addRelatedUrls(io.grafeas.v1.RelatedUrl value) { + if (relatedUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrlsIsMutable(); + relatedUrls_.add(value); + onChanged(); + } else { + relatedUrlsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder addRelatedUrls( + int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrlsIsMutable(); + relatedUrls_.add(index, value); + onChanged(); + } else { + relatedUrlsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder addRelatedUrls( + io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrlsBuilder_ == null) { + ensureRelatedUrlsIsMutable(); + relatedUrls_.add(builderForValue.build()); + onChanged(); + } else { + relatedUrlsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder addRelatedUrls( + int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrlsBuilder_ == null) { + ensureRelatedUrlsIsMutable(); + relatedUrls_.add(index, builderForValue.build()); + onChanged(); + } else { + relatedUrlsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder addAllRelatedUrls( + java.lang.Iterable values) { + if (relatedUrlsBuilder_ == null) { + ensureRelatedUrlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relatedUrls_); + onChanged(); + } else { + relatedUrlsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder clearRelatedUrls() { + if (relatedUrlsBuilder_ == null) { + relatedUrls_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + relatedUrlsBuilder_.clear(); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder removeRelatedUrls(int index) { + if (relatedUrlsBuilder_ == null) { + ensureRelatedUrlsIsMutable(); + relatedUrls_.remove(index); + onChanged(); + } else { + relatedUrlsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public io.grafeas.v1.RelatedUrl.Builder getRelatedUrlsBuilder( + int index) { + return getRelatedUrlsFieldBuilder().getBuilder(index); + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlsOrBuilder( + int index) { + if (relatedUrlsBuilder_ == null) { + return relatedUrls_.get(index); } else { + return relatedUrlsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public java.util.List + getRelatedUrlsOrBuilderList() { + if (relatedUrlsBuilder_ != null) { + return relatedUrlsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relatedUrls_); + } + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlsBuilder() { + return getRelatedUrlsFieldBuilder().addBuilder( + io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlsBuilder( + int index) { + return getRelatedUrlsFieldBuilder().addBuilder( + index, io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public java.util.List + getRelatedUrlsBuilderList() { + return getRelatedUrlsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> + getRelatedUrlsFieldBuilder() { + if (relatedUrlsBuilder_ == null) { + relatedUrlsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder>( + relatedUrls_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + relatedUrls_ = null; + } + return relatedUrlsBuilder_; + } + + private int effectiveSeverity_ = 0; + /** + *
+     * The distro assigned severity for this vulnerability when it is available,
+     * otherwise this is the note provider assigned severity.
+     * When there are multiple PackageIssues for this vulnerability, they can have
+     * different effective severities because some might be provided by the distro
+     * while others are provided by the language ecosystem for a language pack.
+     * For this reason, it is advised to use the effective severity on the
+     * PackageIssue level. In the case where multiple PackageIssues have differing
+     * effective severities, this field should be the highest severity for any of
+     * the PackageIssues.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @return The enum numeric value on the wire for effectiveSeverity. + */ + @java.lang.Override public int getEffectiveSeverityValue() { + return effectiveSeverity_; + } + /** + *
+     * The distro assigned severity for this vulnerability when it is available,
+     * otherwise this is the note provider assigned severity.
+     * When there are multiple PackageIssues for this vulnerability, they can have
+     * different effective severities because some might be provided by the distro
+     * while others are provided by the language ecosystem for a language pack.
+     * For this reason, it is advised to use the effective severity on the
+     * PackageIssue level. In the case where multiple PackageIssues have differing
+     * effective severities, this field should be the highest severity for any of
+     * the PackageIssues.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @param value The enum numeric value on the wire for effectiveSeverity to set. + * @return This builder for chaining. + */ + public Builder setEffectiveSeverityValue(int value) { + effectiveSeverity_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * The distro assigned severity for this vulnerability when it is available,
+     * otherwise this is the note provider assigned severity.
+     * When there are multiple PackageIssues for this vulnerability, they can have
+     * different effective severities because some might be provided by the distro
+     * while others are provided by the language ecosystem for a language pack.
+     * For this reason, it is advised to use the effective severity on the
+     * PackageIssue level. In the case where multiple PackageIssues have differing
+     * effective severities, this field should be the highest severity for any of
+     * the PackageIssues.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @return The effectiveSeverity. + */ + @java.lang.Override + public io.grafeas.v1.Severity getEffectiveSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + /** + *
+     * The distro assigned severity for this vulnerability when it is available,
+     * otherwise this is the note provider assigned severity.
+     * When there are multiple PackageIssues for this vulnerability, they can have
+     * different effective severities because some might be provided by the distro
+     * while others are provided by the language ecosystem for a language pack.
+     * For this reason, it is advised to use the effective severity on the
+     * PackageIssue level. In the case where multiple PackageIssues have differing
+     * effective severities, this field should be the highest severity for any of
+     * the PackageIssues.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @param value The effectiveSeverity to set. + * @return This builder for chaining. + */ + public Builder setEffectiveSeverity(io.grafeas.v1.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + effectiveSeverity_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The distro assigned severity for this vulnerability when it is available,
+     * otherwise this is the note provider assigned severity.
+     * When there are multiple PackageIssues for this vulnerability, they can have
+     * different effective severities because some might be provided by the distro
+     * while others are provided by the language ecosystem for a language pack.
+     * For this reason, it is advised to use the effective severity on the
+     * PackageIssue level. In the case where multiple PackageIssues have differing
+     * effective severities, this field should be the highest severity for any of
+     * the PackageIssues.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @return This builder for chaining. + */ + public Builder clearEffectiveSeverity() { + bitField0_ = (bitField0_ & ~0x00000100); + effectiveSeverity_ = 0; + onChanged(); + return this; + } + + private boolean fixAvailable_ ; + /** + *
+     * Output only. Whether at least one of the affected packages has a fix
+     * available.
+     * 
+ * + * bool fix_available = 9; + * @return The fixAvailable. + */ + @java.lang.Override + public boolean getFixAvailable() { + return fixAvailable_; + } + /** + *
+     * Output only. Whether at least one of the affected packages has a fix
+     * available.
+     * 
+ * + * bool fix_available = 9; + * @param value The fixAvailable to set. + * @return This builder for chaining. + */ + public Builder setFixAvailable(boolean value) { + + fixAvailable_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Output only. Whether at least one of the affected packages has a fix
+     * available.
+     * 
+ * + * bool fix_available = 9; + * @return This builder for chaining. + */ + public Builder clearFixAvailable() { + bitField0_ = (bitField0_ & ~0x00000200); + fixAvailable_ = false; + onChanged(); + return this; + } + + private int cvssVersion_ = 0; + /** + *
+     * Output only. CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @return The enum numeric value on the wire for cvssVersion. + */ + @java.lang.Override public int getCvssVersionValue() { + return cvssVersion_; + } + /** + *
+     * Output only. CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @param value The enum numeric value on the wire for cvssVersion to set. + * @return This builder for chaining. + */ + public Builder setCvssVersionValue(int value) { + cvssVersion_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * Output only. CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @return The cvssVersion. + */ + @java.lang.Override + public io.grafeas.v1.CVSSVersion getCvssVersion() { + io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); + return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; + } + /** + *
+     * Output only. CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @param value The cvssVersion to set. + * @return This builder for chaining. + */ + public Builder setCvssVersion(io.grafeas.v1.CVSSVersion value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + cvssVersion_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @return This builder for chaining. + */ + public Builder clearCvssVersion() { + bitField0_ = (bitField0_ & ~0x00000400); + cvssVersion_ = 0; + onChanged(); + return this; + } + + private io.grafeas.v1.CVSS cvssV2_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> cvssV2Builder_; + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * @return Whether the cvssV2 field is set. + */ + public boolean hasCvssV2() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * @return The cvssV2. + */ + public io.grafeas.v1.CVSS getCvssV2() { + if (cvssV2Builder_ == null) { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } else { + return cvssV2Builder_.getMessage(); + } + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder setCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cvssV2_ = value; + } else { + cvssV2Builder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder setCvssV2( + io.grafeas.v1.CVSS.Builder builderForValue) { + if (cvssV2Builder_ == null) { + cvssV2_ = builderForValue.build(); + } else { + cvssV2Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder mergeCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (((bitField0_ & 0x00000800) != 0) && + cvssV2_ != null && + cvssV2_ != io.grafeas.v1.CVSS.getDefaultInstance()) { + getCvssV2Builder().mergeFrom(value); + } else { + cvssV2_ = value; + } + } else { + cvssV2Builder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder clearCvssV2() { + bitField0_ = (bitField0_ & ~0x00000800); + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public io.grafeas.v1.CVSS.Builder getCvssV2Builder() { + bitField0_ |= 0x00000800; + onChanged(); + return getCvssV2FieldBuilder().getBuilder(); + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + if (cvssV2Builder_ != null) { + return cvssV2Builder_.getMessageOrBuilder(); + } else { + return cvssV2_ == null ? + io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> + getCvssV2FieldBuilder() { + if (cvssV2Builder_ == null) { + cvssV2Builder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( + getCvssV2(), + getParentForChildren(), + isClean()); + cvssV2_ = null; + } + return cvssV2Builder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityOccurrence) + private static final io.grafeas.v1.VulnerabilityOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityOccurrence(); + } + + public static io.grafeas.v1.VulnerabilityOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VulnerabilityOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java new file mode 100644 index 000000000000..5f02f3065344 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java @@ -0,0 +1,314 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vulnerability.proto + +package io.grafeas.v1; + +public interface VulnerabilityOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems, node.js
+   * packages, etc.).
+   * 
+ * + * string type = 1; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems, node.js
+   * packages, etc.).
+   * 
+ * + * string type = 1; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+   * Output only. The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + int getSeverityValue(); + /** + *
+   * Output only. The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + io.grafeas.v1.Severity getSeverity(); + + /** + *
+   * Output only. The CVSS score of this vulnerability. CVSS score is on a
+   * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
+   * severity.
+   * 
+ * + * float cvss_score = 3; + * @return The cvssScore. + */ + float getCvssScore(); + + /** + *
+   * The cvss v3 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + * @return Whether the cvssv3 field is set. + */ + boolean hasCvssv3(); + /** + *
+   * The cvss v3 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + * @return The cvssv3. + */ + io.grafeas.v1.CVSS getCvssv3(); + /** + *
+   * The cvss v3 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + io.grafeas.v1.CVSSOrBuilder getCvssv3OrBuilder(); + + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + java.util.List + getPackageIssueList(); + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getPackageIssue(int index); + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + int getPackageIssueCount(); + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + java.util.List + getPackageIssueOrBuilderList(); + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder getPackageIssueOrBuilder( + int index); + + /** + *
+   * Output only. A one sentence description of this vulnerability.
+   * 
+ * + * string short_description = 5; + * @return The shortDescription. + */ + java.lang.String getShortDescription(); + /** + *
+   * Output only. A one sentence description of this vulnerability.
+   * 
+ * + * string short_description = 5; + * @return The bytes for shortDescription. + */ + com.google.protobuf.ByteString + getShortDescriptionBytes(); + + /** + *
+   * Output only. A detailed description of this vulnerability.
+   * 
+ * + * string long_description = 6; + * @return The longDescription. + */ + java.lang.String getLongDescription(); + /** + *
+   * Output only. A detailed description of this vulnerability.
+   * 
+ * + * string long_description = 6; + * @return The bytes for longDescription. + */ + com.google.protobuf.ByteString + getLongDescriptionBytes(); + + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + java.util.List + getRelatedUrlsList(); + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + io.grafeas.v1.RelatedUrl getRelatedUrls(int index); + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + int getRelatedUrlsCount(); + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + java.util.List + getRelatedUrlsOrBuilderList(); + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlsOrBuilder( + int index); + + /** + *
+   * The distro assigned severity for this vulnerability when it is available,
+   * otherwise this is the note provider assigned severity.
+   * When there are multiple PackageIssues for this vulnerability, they can have
+   * different effective severities because some might be provided by the distro
+   * while others are provided by the language ecosystem for a language pack.
+   * For this reason, it is advised to use the effective severity on the
+   * PackageIssue level. In the case where multiple PackageIssues have differing
+   * effective severities, this field should be the highest severity for any of
+   * the PackageIssues.
+   * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @return The enum numeric value on the wire for effectiveSeverity. + */ + int getEffectiveSeverityValue(); + /** + *
+   * The distro assigned severity for this vulnerability when it is available,
+   * otherwise this is the note provider assigned severity.
+   * When there are multiple PackageIssues for this vulnerability, they can have
+   * different effective severities because some might be provided by the distro
+   * while others are provided by the language ecosystem for a language pack.
+   * For this reason, it is advised to use the effective severity on the
+   * PackageIssue level. In the case where multiple PackageIssues have differing
+   * effective severities, this field should be the highest severity for any of
+   * the PackageIssues.
+   * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @return The effectiveSeverity. + */ + io.grafeas.v1.Severity getEffectiveSeverity(); + + /** + *
+   * Output only. Whether at least one of the affected packages has a fix
+   * available.
+   * 
+ * + * bool fix_available = 9; + * @return The fixAvailable. + */ + boolean getFixAvailable(); + + /** + *
+   * Output only. CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @return The enum numeric value on the wire for cvssVersion. + */ + int getCvssVersionValue(); + /** + *
+   * Output only. CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @return The cvssVersion. + */ + io.grafeas.v1.CVSSVersion getCvssVersion(); + + /** + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * @return Whether the cvssV2 field is set. + */ + boolean hasCvssV2(); + /** + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * @return The cvssV2. + */ + io.grafeas.v1.CVSS getCvssV2(); + /** + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java new file mode 100644 index 000000000000..1491d466fd35 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java @@ -0,0 +1,3538 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +/** + *
+ * Windows Update represents the metadata about the update for the Windows
+ * operating system. The fields in this message come from the Windows Update API
+ * documented at
+ * https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate.
+ * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate} + */ +public final class WindowsUpdate extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.WindowsUpdate) + WindowsUpdateOrBuilder { +private static final long serialVersionUID = 0L; + // Use WindowsUpdate.newBuilder() to construct. + private WindowsUpdate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WindowsUpdate() { + title_ = ""; + description_ = ""; + categories_ = java.util.Collections.emptyList(); + kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + supportUrl_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WindowsUpdate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.class, io.grafeas.v1.WindowsUpdate.Builder.class); + } + + public interface IdentityOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.WindowsUpdate.Identity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The revision independent identifier of the update.
+     * 
+ * + * string update_id = 1; + * @return The updateId. + */ + java.lang.String getUpdateId(); + /** + *
+     * The revision independent identifier of the update.
+     * 
+ * + * string update_id = 1; + * @return The bytes for updateId. + */ + com.google.protobuf.ByteString + getUpdateIdBytes(); + + /** + *
+     * The revision number of the update.
+     * 
+ * + * int32 revision = 2; + * @return The revision. + */ + int getRevision(); + } + /** + *
+   * The unique identifier of the update.
+   * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate.Identity} + */ + public static final class Identity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.WindowsUpdate.Identity) + IdentityOrBuilder { + private static final long serialVersionUID = 0L; + // Use Identity.newBuilder() to construct. + private Identity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Identity() { + updateId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Identity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.Identity.class, io.grafeas.v1.WindowsUpdate.Identity.Builder.class); + } + + public static final int UPDATE_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object updateId_ = ""; + /** + *
+     * The revision independent identifier of the update.
+     * 
+ * + * string update_id = 1; + * @return The updateId. + */ + @java.lang.Override + public java.lang.String getUpdateId() { + java.lang.Object ref = updateId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + updateId_ = s; + return s; + } + } + /** + *
+     * The revision independent identifier of the update.
+     * 
+ * + * string update_id = 1; + * @return The bytes for updateId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUpdateIdBytes() { + java.lang.Object ref = updateId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + updateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_FIELD_NUMBER = 2; + private int revision_ = 0; + /** + *
+     * The revision number of the update.
+     * 
+ * + * int32 revision = 2; + * @return The revision. + */ + @java.lang.Override + public int getRevision() { + return revision_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, updateId_); + } + if (revision_ != 0) { + output.writeInt32(2, revision_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, updateId_); + } + if (revision_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, revision_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.WindowsUpdate.Identity)) { + return super.equals(obj); + } + io.grafeas.v1.WindowsUpdate.Identity other = (io.grafeas.v1.WindowsUpdate.Identity) obj; + + if (!getUpdateId() + .equals(other.getUpdateId())) return false; + if (getRevision() + != other.getRevision()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + UPDATE_ID_FIELD_NUMBER; + hash = (53 * hash) + getUpdateId().hashCode(); + hash = (37 * hash) + REVISION_FIELD_NUMBER; + hash = (53 * hash) + getRevision(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.WindowsUpdate.Identity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * The unique identifier of the update.
+     * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate.Identity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.WindowsUpdate.Identity) + io.grafeas.v1.WindowsUpdate.IdentityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.Identity.class, io.grafeas.v1.WindowsUpdate.Identity.Builder.class); + } + + // Construct using io.grafeas.v1.WindowsUpdate.Identity.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateId_ = ""; + revision_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Identity getDefaultInstanceForType() { + return io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Identity build() { + io.grafeas.v1.WindowsUpdate.Identity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Identity buildPartial() { + io.grafeas.v1.WindowsUpdate.Identity result = new io.grafeas.v1.WindowsUpdate.Identity(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.WindowsUpdate.Identity result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateId_ = updateId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.revision_ = revision_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.WindowsUpdate.Identity) { + return mergeFrom((io.grafeas.v1.WindowsUpdate.Identity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.WindowsUpdate.Identity other) { + if (other == io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance()) return this; + if (!other.getUpdateId().isEmpty()) { + updateId_ = other.updateId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getRevision() != 0) { + setRevision(other.getRevision()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + updateId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + revision_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object updateId_ = ""; + /** + *
+       * The revision independent identifier of the update.
+       * 
+ * + * string update_id = 1; + * @return The updateId. + */ + public java.lang.String getUpdateId() { + java.lang.Object ref = updateId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + updateId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The revision independent identifier of the update.
+       * 
+ * + * string update_id = 1; + * @return The bytes for updateId. + */ + public com.google.protobuf.ByteString + getUpdateIdBytes() { + java.lang.Object ref = updateId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + updateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The revision independent identifier of the update.
+       * 
+ * + * string update_id = 1; + * @param value The updateId to set. + * @return This builder for chaining. + */ + public Builder setUpdateId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + updateId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The revision independent identifier of the update.
+       * 
+ * + * string update_id = 1; + * @return This builder for chaining. + */ + public Builder clearUpdateId() { + updateId_ = getDefaultInstance().getUpdateId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The revision independent identifier of the update.
+       * 
+ * + * string update_id = 1; + * @param value The bytes for updateId to set. + * @return This builder for chaining. + */ + public Builder setUpdateIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + updateId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int revision_ ; + /** + *
+       * The revision number of the update.
+       * 
+ * + * int32 revision = 2; + * @return The revision. + */ + @java.lang.Override + public int getRevision() { + return revision_; + } + /** + *
+       * The revision number of the update.
+       * 
+ * + * int32 revision = 2; + * @param value The revision to set. + * @return This builder for chaining. + */ + public Builder setRevision(int value) { + + revision_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The revision number of the update.
+       * 
+ * + * int32 revision = 2; + * @return This builder for chaining. + */ + public Builder clearRevision() { + bitField0_ = (bitField0_ & ~0x00000002); + revision_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.WindowsUpdate.Identity) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate.Identity) + private static final io.grafeas.v1.WindowsUpdate.Identity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.WindowsUpdate.Identity(); + } + + public static io.grafeas.v1.WindowsUpdate.Identity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Identity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Identity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CategoryOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.WindowsUpdate.Category) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The identifier of the category.
+     * 
+ * + * string category_id = 1; + * @return The categoryId. + */ + java.lang.String getCategoryId(); + /** + *
+     * The identifier of the category.
+     * 
+ * + * string category_id = 1; + * @return The bytes for categoryId. + */ + com.google.protobuf.ByteString + getCategoryIdBytes(); + + /** + *
+     * The localized name of the category.
+     * 
+ * + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * The localized name of the category.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + } + /** + *
+   * The category to which the update belongs.
+   * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate.Category} + */ + public static final class Category extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.WindowsUpdate.Category) + CategoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Category.newBuilder() to construct. + private Category(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Category() { + categoryId_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Category(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.Category.class, io.grafeas.v1.WindowsUpdate.Category.Builder.class); + } + + public static final int CATEGORY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object categoryId_ = ""; + /** + *
+     * The identifier of the category.
+     * 
+ * + * string category_id = 1; + * @return The categoryId. + */ + @java.lang.Override + public java.lang.String getCategoryId() { + java.lang.Object ref = categoryId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + categoryId_ = s; + return s; + } + } + /** + *
+     * The identifier of the category.
+     * 
+ * + * string category_id = 1; + * @return The bytes for categoryId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCategoryIdBytes() { + java.lang.Object ref = categoryId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + categoryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+     * The localized name of the category.
+     * 
+ * + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+     * The localized name of the category.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(categoryId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, categoryId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(categoryId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, categoryId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.WindowsUpdate.Category)) { + return super.equals(obj); + } + io.grafeas.v1.WindowsUpdate.Category other = (io.grafeas.v1.WindowsUpdate.Category) obj; + + if (!getCategoryId() + .equals(other.getCategoryId())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CATEGORY_ID_FIELD_NUMBER; + hash = (53 * hash) + getCategoryId().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Category parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate.Category parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.WindowsUpdate.Category prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * The category to which the update belongs.
+     * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate.Category} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.WindowsUpdate.Category) + io.grafeas.v1.WindowsUpdate.CategoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.Category.class, io.grafeas.v1.WindowsUpdate.Category.Builder.class); + } + + // Construct using io.grafeas.v1.WindowsUpdate.Category.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + categoryId_ = ""; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Category getDefaultInstanceForType() { + return io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Category build() { + io.grafeas.v1.WindowsUpdate.Category result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Category buildPartial() { + io.grafeas.v1.WindowsUpdate.Category result = new io.grafeas.v1.WindowsUpdate.Category(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.WindowsUpdate.Category result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.categoryId_ = categoryId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.WindowsUpdate.Category) { + return mergeFrom((io.grafeas.v1.WindowsUpdate.Category)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.WindowsUpdate.Category other) { + if (other == io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance()) return this; + if (!other.getCategoryId().isEmpty()) { + categoryId_ = other.categoryId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + categoryId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object categoryId_ = ""; + /** + *
+       * The identifier of the category.
+       * 
+ * + * string category_id = 1; + * @return The categoryId. + */ + public java.lang.String getCategoryId() { + java.lang.Object ref = categoryId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + categoryId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The identifier of the category.
+       * 
+ * + * string category_id = 1; + * @return The bytes for categoryId. + */ + public com.google.protobuf.ByteString + getCategoryIdBytes() { + java.lang.Object ref = categoryId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + categoryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The identifier of the category.
+       * 
+ * + * string category_id = 1; + * @param value The categoryId to set. + * @return This builder for chaining. + */ + public Builder setCategoryId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + categoryId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The identifier of the category.
+       * 
+ * + * string category_id = 1; + * @return This builder for chaining. + */ + public Builder clearCategoryId() { + categoryId_ = getDefaultInstance().getCategoryId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The identifier of the category.
+       * 
+ * + * string category_id = 1; + * @param value The bytes for categoryId to set. + * @return This builder for chaining. + */ + public Builder setCategoryIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + categoryId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * The localized name of the category.
+       * 
+ * + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The localized name of the category.
+       * 
+ * + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The localized name of the category.
+       * 
+ * + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The localized name of the category.
+       * 
+ * + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * The localized name of the category.
+       * 
+ * + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.WindowsUpdate.Category) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate.Category) + private static final io.grafeas.v1.WindowsUpdate.Category DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.WindowsUpdate.Category(); + } + + public static io.grafeas.v1.WindowsUpdate.Category getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Category parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Category getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int IDENTITY_FIELD_NUMBER = 1; + private io.grafeas.v1.WindowsUpdate.Identity identity_; + /** + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * @return Whether the identity field is set. + */ + @java.lang.Override + public boolean hasIdentity() { + return identity_ != null; + } + /** + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * @return The identity. + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Identity getIdentity() { + return identity_ == null ? io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; + } + /** + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.IdentityOrBuilder getIdentityOrBuilder() { + return identity_ == null ? io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; + } + + public static final int TITLE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + *
+   * The localized title of the update.
+   * 
+ * + * string title = 2; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + *
+   * The localized title of the update.
+   * 
+ * + * string title = 2; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * The localized description of the update.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The localized description of the update.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CATEGORIES_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List categories_; + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + @java.lang.Override + public java.util.List getCategoriesList() { + return categories_; + } + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + @java.lang.Override + public java.util.List + getCategoriesOrBuilderList() { + return categories_; + } + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + @java.lang.Override + public int getCategoriesCount() { + return categories_.size(); + } + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Category getCategories(int index) { + return categories_.get(index); + } + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.CategoryOrBuilder getCategoriesOrBuilder( + int index) { + return categories_.get(index); + } + + public static final int KB_ARTICLE_IDS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList kbArticleIds_; + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @return A list containing the kbArticleIds. + */ + public com.google.protobuf.ProtocolStringList + getKbArticleIdsList() { + return kbArticleIds_; + } + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @return The count of kbArticleIds. + */ + public int getKbArticleIdsCount() { + return kbArticleIds_.size(); + } + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @param index The index of the element to return. + * @return The kbArticleIds at the given index. + */ + public java.lang.String getKbArticleIds(int index) { + return kbArticleIds_.get(index); + } + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @param index The index of the value to return. + * @return The bytes of the kbArticleIds at the given index. + */ + public com.google.protobuf.ByteString + getKbArticleIdsBytes(int index) { + return kbArticleIds_.getByteString(index); + } + + public static final int SUPPORT_URL_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object supportUrl_ = ""; + /** + *
+   * The hyperlink to the support information for the update.
+   * 
+ * + * string support_url = 6; + * @return The supportUrl. + */ + @java.lang.Override + public java.lang.String getSupportUrl() { + java.lang.Object ref = supportUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + supportUrl_ = s; + return s; + } + } + /** + *
+   * The hyperlink to the support information for the update.
+   * 
+ * + * string support_url = 6; + * @return The bytes for supportUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSupportUrlBytes() { + java.lang.Object ref = supportUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + supportUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_PUBLISHED_TIMESTAMP_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp lastPublishedTimestamp_; + /** + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * @return Whether the lastPublishedTimestamp field is set. + */ + @java.lang.Override + public boolean hasLastPublishedTimestamp() { + return lastPublishedTimestamp_ != null; + } + /** + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * @return The lastPublishedTimestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastPublishedTimestamp() { + return lastPublishedTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; + } + /** + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastPublishedTimestampOrBuilder() { + return lastPublishedTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (identity_ != null) { + output.writeMessage(1, getIdentity()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + for (int i = 0; i < categories_.size(); i++) { + output.writeMessage(4, categories_.get(i)); + } + for (int i = 0; i < kbArticleIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, kbArticleIds_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(supportUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, supportUrl_); + } + if (lastPublishedTimestamp_ != null) { + output.writeMessage(7, getLastPublishedTimestamp()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (identity_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getIdentity()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + for (int i = 0; i < categories_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, categories_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < kbArticleIds_.size(); i++) { + dataSize += computeStringSizeNoTag(kbArticleIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getKbArticleIdsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(supportUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, supportUrl_); + } + if (lastPublishedTimestamp_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getLastPublishedTimestamp()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.WindowsUpdate)) { + return super.equals(obj); + } + io.grafeas.v1.WindowsUpdate other = (io.grafeas.v1.WindowsUpdate) obj; + + if (hasIdentity() != other.hasIdentity()) return false; + if (hasIdentity()) { + if (!getIdentity() + .equals(other.getIdentity())) return false; + } + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getCategoriesList() + .equals(other.getCategoriesList())) return false; + if (!getKbArticleIdsList() + .equals(other.getKbArticleIdsList())) return false; + if (!getSupportUrl() + .equals(other.getSupportUrl())) return false; + if (hasLastPublishedTimestamp() != other.hasLastPublishedTimestamp()) return false; + if (hasLastPublishedTimestamp()) { + if (!getLastPublishedTimestamp() + .equals(other.getLastPublishedTimestamp())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasIdentity()) { + hash = (37 * hash) + IDENTITY_FIELD_NUMBER; + hash = (53 * hash) + getIdentity().hashCode(); + } + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getCategoriesCount() > 0) { + hash = (37 * hash) + CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + getCategoriesList().hashCode(); + } + if (getKbArticleIdsCount() > 0) { + hash = (37 * hash) + KB_ARTICLE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getKbArticleIdsList().hashCode(); + } + hash = (37 * hash) + SUPPORT_URL_FIELD_NUMBER; + hash = (53 * hash) + getSupportUrl().hashCode(); + if (hasLastPublishedTimestamp()) { + hash = (37 * hash) + LAST_PUBLISHED_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getLastPublishedTimestamp().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.WindowsUpdate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.WindowsUpdate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Windows Update represents the metadata about the update for the Windows
+   * operating system. The fields in this message come from the Windows Update API
+   * documented at
+   * https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate.
+   * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.WindowsUpdate) + io.grafeas.v1.WindowsUpdateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.class, io.grafeas.v1.WindowsUpdate.Builder.class); + } + + // Construct using io.grafeas.v1.WindowsUpdate.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + identity_ = null; + if (identityBuilder_ != null) { + identityBuilder_.dispose(); + identityBuilder_ = null; + } + title_ = ""; + description_ = ""; + if (categoriesBuilder_ == null) { + categories_ = java.util.Collections.emptyList(); + } else { + categories_ = null; + categoriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + supportUrl_ = ""; + lastPublishedTimestamp_ = null; + if (lastPublishedTimestampBuilder_ != null) { + lastPublishedTimestampBuilder_.dispose(); + lastPublishedTimestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate getDefaultInstanceForType() { + return io.grafeas.v1.WindowsUpdate.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate build() { + io.grafeas.v1.WindowsUpdate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate buildPartial() { + io.grafeas.v1.WindowsUpdate result = new io.grafeas.v1.WindowsUpdate(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.WindowsUpdate result) { + if (categoriesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + categories_ = java.util.Collections.unmodifiableList(categories_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.categories_ = categories_; + } else { + result.categories_ = categoriesBuilder_.build(); + } + if (((bitField0_ & 0x00000010) != 0)) { + kbArticleIds_ = kbArticleIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.kbArticleIds_ = kbArticleIds_; + } + + private void buildPartial0(io.grafeas.v1.WindowsUpdate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.identity_ = identityBuilder_ == null + ? identity_ + : identityBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.supportUrl_ = supportUrl_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.lastPublishedTimestamp_ = lastPublishedTimestampBuilder_ == null + ? lastPublishedTimestamp_ + : lastPublishedTimestampBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.WindowsUpdate) { + return mergeFrom((io.grafeas.v1.WindowsUpdate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.WindowsUpdate other) { + if (other == io.grafeas.v1.WindowsUpdate.getDefaultInstance()) return this; + if (other.hasIdentity()) { + mergeIdentity(other.getIdentity()); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (categoriesBuilder_ == null) { + if (!other.categories_.isEmpty()) { + if (categories_.isEmpty()) { + categories_ = other.categories_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureCategoriesIsMutable(); + categories_.addAll(other.categories_); + } + onChanged(); + } + } else { + if (!other.categories_.isEmpty()) { + if (categoriesBuilder_.isEmpty()) { + categoriesBuilder_.dispose(); + categoriesBuilder_ = null; + categories_ = other.categories_; + bitField0_ = (bitField0_ & ~0x00000008); + categoriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCategoriesFieldBuilder() : null; + } else { + categoriesBuilder_.addAllMessages(other.categories_); + } + } + } + if (!other.kbArticleIds_.isEmpty()) { + if (kbArticleIds_.isEmpty()) { + kbArticleIds_ = other.kbArticleIds_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureKbArticleIdsIsMutable(); + kbArticleIds_.addAll(other.kbArticleIds_); + } + onChanged(); + } + if (!other.getSupportUrl().isEmpty()) { + supportUrl_ = other.supportUrl_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasLastPublishedTimestamp()) { + mergeLastPublishedTimestamp(other.getLastPublishedTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getIdentityFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + io.grafeas.v1.WindowsUpdate.Category m = + input.readMessage( + io.grafeas.v1.WindowsUpdate.Category.parser(), + extensionRegistry); + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.add(m); + } else { + categoriesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + ensureKbArticleIdsIsMutable(); + kbArticleIds_.add(s); + break; + } // case 42 + case 50: { + supportUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getLastPublishedTimestampFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.WindowsUpdate.Identity identity_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Identity, io.grafeas.v1.WindowsUpdate.Identity.Builder, io.grafeas.v1.WindowsUpdate.IdentityOrBuilder> identityBuilder_; + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * @return Whether the identity field is set. + */ + public boolean hasIdentity() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * @return The identity. + */ + public io.grafeas.v1.WindowsUpdate.Identity getIdentity() { + if (identityBuilder_ == null) { + return identity_ == null ? io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; + } else { + return identityBuilder_.getMessage(); + } + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public Builder setIdentity(io.grafeas.v1.WindowsUpdate.Identity value) { + if (identityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + identity_ = value; + } else { + identityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public Builder setIdentity( + io.grafeas.v1.WindowsUpdate.Identity.Builder builderForValue) { + if (identityBuilder_ == null) { + identity_ = builderForValue.build(); + } else { + identityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public Builder mergeIdentity(io.grafeas.v1.WindowsUpdate.Identity value) { + if (identityBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + identity_ != null && + identity_ != io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance()) { + getIdentityBuilder().mergeFrom(value); + } else { + identity_ = value; + } + } else { + identityBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public Builder clearIdentity() { + bitField0_ = (bitField0_ & ~0x00000001); + identity_ = null; + if (identityBuilder_ != null) { + identityBuilder_.dispose(); + identityBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public io.grafeas.v1.WindowsUpdate.Identity.Builder getIdentityBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getIdentityFieldBuilder().getBuilder(); + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public io.grafeas.v1.WindowsUpdate.IdentityOrBuilder getIdentityOrBuilder() { + if (identityBuilder_ != null) { + return identityBuilder_.getMessageOrBuilder(); + } else { + return identity_ == null ? + io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; + } + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Identity, io.grafeas.v1.WindowsUpdate.Identity.Builder, io.grafeas.v1.WindowsUpdate.IdentityOrBuilder> + getIdentityFieldBuilder() { + if (identityBuilder_ == null) { + identityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Identity, io.grafeas.v1.WindowsUpdate.Identity.Builder, io.grafeas.v1.WindowsUpdate.IdentityOrBuilder>( + getIdentity(), + getParentForChildren(), + isClean()); + identity_ = null; + } + return identityBuilder_; + } + + private java.lang.Object title_ = ""; + /** + *
+     * The localized title of the update.
+     * 
+ * + * string title = 2; + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The localized title of the update.
+     * 
+ * + * string title = 2; + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The localized title of the update.
+     * 
+ * + * string title = 2; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The localized title of the update.
+     * 
+ * + * string title = 2; + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The localized title of the update.
+     * 
+ * + * string title = 2; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The localized description of the update.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The localized description of the update.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The localized description of the update.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The localized description of the update.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The localized description of the update.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List categories_ = + java.util.Collections.emptyList(); + private void ensureCategoriesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + categories_ = new java.util.ArrayList(categories_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Category, io.grafeas.v1.WindowsUpdate.Category.Builder, io.grafeas.v1.WindowsUpdate.CategoryOrBuilder> categoriesBuilder_; + + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public java.util.List getCategoriesList() { + if (categoriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(categories_); + } else { + return categoriesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public int getCategoriesCount() { + if (categoriesBuilder_ == null) { + return categories_.size(); + } else { + return categoriesBuilder_.getCount(); + } + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.Category getCategories(int index) { + if (categoriesBuilder_ == null) { + return categories_.get(index); + } else { + return categoriesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder setCategories( + int index, io.grafeas.v1.WindowsUpdate.Category value) { + if (categoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.set(index, value); + onChanged(); + } else { + categoriesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder setCategories( + int index, io.grafeas.v1.WindowsUpdate.Category.Builder builderForValue) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.set(index, builderForValue.build()); + onChanged(); + } else { + categoriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder addCategories(io.grafeas.v1.WindowsUpdate.Category value) { + if (categoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.add(value); + onChanged(); + } else { + categoriesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder addCategories( + int index, io.grafeas.v1.WindowsUpdate.Category value) { + if (categoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.add(index, value); + onChanged(); + } else { + categoriesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder addCategories( + io.grafeas.v1.WindowsUpdate.Category.Builder builderForValue) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.add(builderForValue.build()); + onChanged(); + } else { + categoriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder addCategories( + int index, io.grafeas.v1.WindowsUpdate.Category.Builder builderForValue) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.add(index, builderForValue.build()); + onChanged(); + } else { + categoriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder addAllCategories( + java.lang.Iterable values) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, categories_); + onChanged(); + } else { + categoriesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder clearCategories() { + if (categoriesBuilder_ == null) { + categories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + categoriesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder removeCategories(int index) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.remove(index); + onChanged(); + } else { + categoriesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.Category.Builder getCategoriesBuilder( + int index) { + return getCategoriesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.CategoryOrBuilder getCategoriesOrBuilder( + int index) { + if (categoriesBuilder_ == null) { + return categories_.get(index); } else { + return categoriesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public java.util.List + getCategoriesOrBuilderList() { + if (categoriesBuilder_ != null) { + return categoriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(categories_); + } + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.Category.Builder addCategoriesBuilder() { + return getCategoriesFieldBuilder().addBuilder( + io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance()); + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.Category.Builder addCategoriesBuilder( + int index) { + return getCategoriesFieldBuilder().addBuilder( + index, io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance()); + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public java.util.List + getCategoriesBuilderList() { + return getCategoriesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Category, io.grafeas.v1.WindowsUpdate.Category.Builder, io.grafeas.v1.WindowsUpdate.CategoryOrBuilder> + getCategoriesFieldBuilder() { + if (categoriesBuilder_ == null) { + categoriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Category, io.grafeas.v1.WindowsUpdate.Category.Builder, io.grafeas.v1.WindowsUpdate.CategoryOrBuilder>( + categories_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + categories_ = null; + } + return categoriesBuilder_; + } + + private com.google.protobuf.LazyStringList kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureKbArticleIdsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + kbArticleIds_ = new com.google.protobuf.LazyStringArrayList(kbArticleIds_); + bitField0_ |= 0x00000010; + } + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @return A list containing the kbArticleIds. + */ + public com.google.protobuf.ProtocolStringList + getKbArticleIdsList() { + return kbArticleIds_.getUnmodifiableView(); + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @return The count of kbArticleIds. + */ + public int getKbArticleIdsCount() { + return kbArticleIds_.size(); + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @param index The index of the element to return. + * @return The kbArticleIds at the given index. + */ + public java.lang.String getKbArticleIds(int index) { + return kbArticleIds_.get(index); + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @param index The index of the value to return. + * @return The bytes of the kbArticleIds at the given index. + */ + public com.google.protobuf.ByteString + getKbArticleIdsBytes(int index) { + return kbArticleIds_.getByteString(index); + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @param index The index to set the value at. + * @param value The kbArticleIds to set. + * @return This builder for chaining. + */ + public Builder setKbArticleIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureKbArticleIdsIsMutable(); + kbArticleIds_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @param value The kbArticleIds to add. + * @return This builder for chaining. + */ + public Builder addKbArticleIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureKbArticleIdsIsMutable(); + kbArticleIds_.add(value); + onChanged(); + return this; + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @param values The kbArticleIds to add. + * @return This builder for chaining. + */ + public Builder addAllKbArticleIds( + java.lang.Iterable values) { + ensureKbArticleIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, kbArticleIds_); + onChanged(); + return this; + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @return This builder for chaining. + */ + public Builder clearKbArticleIds() { + kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @param value The bytes of the kbArticleIds to add. + * @return This builder for chaining. + */ + public Builder addKbArticleIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureKbArticleIdsIsMutable(); + kbArticleIds_.add(value); + onChanged(); + return this; + } + + private java.lang.Object supportUrl_ = ""; + /** + *
+     * The hyperlink to the support information for the update.
+     * 
+ * + * string support_url = 6; + * @return The supportUrl. + */ + public java.lang.String getSupportUrl() { + java.lang.Object ref = supportUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + supportUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The hyperlink to the support information for the update.
+     * 
+ * + * string support_url = 6; + * @return The bytes for supportUrl. + */ + public com.google.protobuf.ByteString + getSupportUrlBytes() { + java.lang.Object ref = supportUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + supportUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The hyperlink to the support information for the update.
+     * 
+ * + * string support_url = 6; + * @param value The supportUrl to set. + * @return This builder for chaining. + */ + public Builder setSupportUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + supportUrl_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The hyperlink to the support information for the update.
+     * 
+ * + * string support_url = 6; + * @return This builder for chaining. + */ + public Builder clearSupportUrl() { + supportUrl_ = getDefaultInstance().getSupportUrl(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The hyperlink to the support information for the update.
+     * 
+ * + * string support_url = 6; + * @param value The bytes for supportUrl to set. + * @return This builder for chaining. + */ + public Builder setSupportUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + supportUrl_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastPublishedTimestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastPublishedTimestampBuilder_; + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * @return Whether the lastPublishedTimestamp field is set. + */ + public boolean hasLastPublishedTimestamp() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * @return The lastPublishedTimestamp. + */ + public com.google.protobuf.Timestamp getLastPublishedTimestamp() { + if (lastPublishedTimestampBuilder_ == null) { + return lastPublishedTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; + } else { + return lastPublishedTimestampBuilder_.getMessage(); + } + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public Builder setLastPublishedTimestamp(com.google.protobuf.Timestamp value) { + if (lastPublishedTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastPublishedTimestamp_ = value; + } else { + lastPublishedTimestampBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public Builder setLastPublishedTimestamp( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastPublishedTimestampBuilder_ == null) { + lastPublishedTimestamp_ = builderForValue.build(); + } else { + lastPublishedTimestampBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public Builder mergeLastPublishedTimestamp(com.google.protobuf.Timestamp value) { + if (lastPublishedTimestampBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + lastPublishedTimestamp_ != null && + lastPublishedTimestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLastPublishedTimestampBuilder().mergeFrom(value); + } else { + lastPublishedTimestamp_ = value; + } + } else { + lastPublishedTimestampBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public Builder clearLastPublishedTimestamp() { + bitField0_ = (bitField0_ & ~0x00000040); + lastPublishedTimestamp_ = null; + if (lastPublishedTimestampBuilder_ != null) { + lastPublishedTimestampBuilder_.dispose(); + lastPublishedTimestampBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public com.google.protobuf.Timestamp.Builder getLastPublishedTimestampBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getLastPublishedTimestampFieldBuilder().getBuilder(); + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public com.google.protobuf.TimestampOrBuilder getLastPublishedTimestampOrBuilder() { + if (lastPublishedTimestampBuilder_ != null) { + return lastPublishedTimestampBuilder_.getMessageOrBuilder(); + } else { + return lastPublishedTimestamp_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; + } + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getLastPublishedTimestampFieldBuilder() { + if (lastPublishedTimestampBuilder_ == null) { + lastPublishedTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getLastPublishedTimestamp(), + getParentForChildren(), + isClean()); + lastPublishedTimestamp_ = null; + } + return lastPublishedTimestampBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.WindowsUpdate) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate) + private static final io.grafeas.v1.WindowsUpdate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.WindowsUpdate(); + } + + public static io.grafeas.v1.WindowsUpdate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WindowsUpdate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java new file mode 100644 index 000000000000..730df0265e64 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java @@ -0,0 +1,212 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +public interface WindowsUpdateOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.WindowsUpdate) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * @return Whether the identity field is set. + */ + boolean hasIdentity(); + /** + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * @return The identity. + */ + io.grafeas.v1.WindowsUpdate.Identity getIdentity(); + /** + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + io.grafeas.v1.WindowsUpdate.IdentityOrBuilder getIdentityOrBuilder(); + + /** + *
+   * The localized title of the update.
+   * 
+ * + * string title = 2; + * @return The title. + */ + java.lang.String getTitle(); + /** + *
+   * The localized title of the update.
+   * 
+ * + * string title = 2; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + *
+   * The localized description of the update.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The localized description of the update.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + java.util.List + getCategoriesList(); + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + io.grafeas.v1.WindowsUpdate.Category getCategories(int index); + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + int getCategoriesCount(); + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + java.util.List + getCategoriesOrBuilderList(); + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + io.grafeas.v1.WindowsUpdate.CategoryOrBuilder getCategoriesOrBuilder( + int index); + + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @return A list containing the kbArticleIds. + */ + java.util.List + getKbArticleIdsList(); + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @return The count of kbArticleIds. + */ + int getKbArticleIdsCount(); + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @param index The index of the element to return. + * @return The kbArticleIds at the given index. + */ + java.lang.String getKbArticleIds(int index); + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @param index The index of the value to return. + * @return The bytes of the kbArticleIds at the given index. + */ + com.google.protobuf.ByteString + getKbArticleIdsBytes(int index); + + /** + *
+   * The hyperlink to the support information for the update.
+   * 
+ * + * string support_url = 6; + * @return The supportUrl. + */ + java.lang.String getSupportUrl(); + /** + *
+   * The hyperlink to the support information for the update.
+   * 
+ * + * string support_url = 6; + * @return The bytes for supportUrl. + */ + com.google.protobuf.ByteString + getSupportUrlBytes(); + + /** + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * @return Whether the lastPublishedTimestamp field is set. + */ + boolean hasLastPublishedTimestamp(); + /** + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * @return The lastPublishedTimestamp. + */ + com.google.protobuf.Timestamp getLastPublishedTimestamp(); + /** + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + com.google.protobuf.TimestampOrBuilder getLastPublishedTimestampOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json new file mode 100644 index 000000000000..2fad5f7d0feb --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json @@ -0,0 +1,60 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "grafeas.v1", + "libraryPackage": "io.grafeas.v1", + "services": { + "Grafeas": { + "clients": { + "grpc": { + "libraryClient": "GrafeasClient", + "rpcs": { + "BatchCreateNotes": { + "methods": ["batchCreateNotes", "batchCreateNotes", "batchCreateNotes", "batchCreateNotesCallable"] + }, + "BatchCreateOccurrences": { + "methods": ["batchCreateOccurrences", "batchCreateOccurrences", "batchCreateOccurrences", "batchCreateOccurrencesCallable"] + }, + "CreateNote": { + "methods": ["createNote", "createNote", "createNote", "createNoteCallable"] + }, + "CreateOccurrence": { + "methods": ["createOccurrence", "createOccurrence", "createOccurrence", "createOccurrenceCallable"] + }, + "DeleteNote": { + "methods": ["deleteNote", "deleteNote", "deleteNote", "deleteNoteCallable"] + }, + "DeleteOccurrence": { + "methods": ["deleteOccurrence", "deleteOccurrence", "deleteOccurrence", "deleteOccurrenceCallable"] + }, + "GetNote": { + "methods": ["getNote", "getNote", "getNote", "getNoteCallable"] + }, + "GetOccurrence": { + "methods": ["getOccurrence", "getOccurrence", "getOccurrence", "getOccurrenceCallable"] + }, + "GetOccurrenceNote": { + "methods": ["getOccurrenceNote", "getOccurrenceNote", "getOccurrenceNote", "getOccurrenceNoteCallable"] + }, + "ListNoteOccurrences": { + "methods": ["listNoteOccurrences", "listNoteOccurrences", "listNoteOccurrences", "listNoteOccurrencesPagedCallable", "listNoteOccurrencesCallable"] + }, + "ListNotes": { + "methods": ["listNotes", "listNotes", "listNotes", "listNotesPagedCallable", "listNotesCallable"] + }, + "ListOccurrences": { + "methods": ["listOccurrences", "listOccurrences", "listOccurrences", "listOccurrencesPagedCallable", "listOccurrencesCallable"] + }, + "UpdateNote": { + "methods": ["updateNote", "updateNote", "updateNote", "updateNoteCallable"] + }, + "UpdateOccurrence": { + "methods": ["updateOccurrence", "updateOccurrence", "updateOccurrence", "updateOccurrenceCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java new file mode 100644 index 000000000000..925587289f71 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Container Analysis API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= GrafeasClient ======================= + * + *

Service Description: [Grafeas](https://grafeas.io) API. + * + *

Retrieves analysis results of Cloud components such as Docker container images. + * + *

Analysis results are stored as a series of occurrences. An `Occurrence` contains information + * about a specific analysis instance on a resource. An occurrence refers to a `Note`. A note + * contains details describing the analysis and is generally stored in a separate project, called a + * `Provider`. Multiple occurrences can refer to the same note. + * + *

For example, an SSL vulnerability could affect multiple images. In this case, there would be + * one note for the vulnerability and an occurrence for each image with the vulnerability referring + * to that note. + * + *

Sample for GrafeasClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+ *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
+ *   Occurrence response = grafeasClient.getOccurrence(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package io.grafeas.v1; + +import javax.annotation.Generated; diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java new file mode 100644 index 000000000000..671d1b9faa7c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java @@ -0,0 +1,133 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1.stub; + +import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protobuf.Empty; +import io.grafeas.v1.BatchCreateNotesRequest; +import io.grafeas.v1.BatchCreateNotesResponse; +import io.grafeas.v1.BatchCreateOccurrencesRequest; +import io.grafeas.v1.BatchCreateOccurrencesResponse; +import io.grafeas.v1.CreateNoteRequest; +import io.grafeas.v1.CreateOccurrenceRequest; +import io.grafeas.v1.DeleteNoteRequest; +import io.grafeas.v1.DeleteOccurrenceRequest; +import io.grafeas.v1.GetNoteRequest; +import io.grafeas.v1.GetOccurrenceNoteRequest; +import io.grafeas.v1.GetOccurrenceRequest; +import io.grafeas.v1.ListNoteOccurrencesRequest; +import io.grafeas.v1.ListNoteOccurrencesResponse; +import io.grafeas.v1.ListNotesRequest; +import io.grafeas.v1.ListNotesResponse; +import io.grafeas.v1.ListOccurrencesRequest; +import io.grafeas.v1.ListOccurrencesResponse; +import io.grafeas.v1.Note; +import io.grafeas.v1.Occurrence; +import io.grafeas.v1.UpdateNoteRequest; +import io.grafeas.v1.UpdateOccurrenceRequest; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Grafeas service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class GrafeasStub implements BackgroundResource { + + public UnaryCallable getOccurrenceCallable() { + throw new UnsupportedOperationException("Not implemented: getOccurrenceCallable()"); + } + + public UnaryCallable + listOccurrencesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listOccurrencesPagedCallable()"); + } + + public UnaryCallable listOccurrencesCallable() { + throw new UnsupportedOperationException("Not implemented: listOccurrencesCallable()"); + } + + public UnaryCallable deleteOccurrenceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteOccurrenceCallable()"); + } + + public UnaryCallable createOccurrenceCallable() { + throw new UnsupportedOperationException("Not implemented: createOccurrenceCallable()"); + } + + public UnaryCallable + batchCreateOccurrencesCallable() { + throw new UnsupportedOperationException("Not implemented: batchCreateOccurrencesCallable()"); + } + + public UnaryCallable updateOccurrenceCallable() { + throw new UnsupportedOperationException("Not implemented: updateOccurrenceCallable()"); + } + + public UnaryCallable getOccurrenceNoteCallable() { + throw new UnsupportedOperationException("Not implemented: getOccurrenceNoteCallable()"); + } + + public UnaryCallable getNoteCallable() { + throw new UnsupportedOperationException("Not implemented: getNoteCallable()"); + } + + public UnaryCallable listNotesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNotesPagedCallable()"); + } + + public UnaryCallable listNotesCallable() { + throw new UnsupportedOperationException("Not implemented: listNotesCallable()"); + } + + public UnaryCallable deleteNoteCallable() { + throw new UnsupportedOperationException("Not implemented: deleteNoteCallable()"); + } + + public UnaryCallable createNoteCallable() { + throw new UnsupportedOperationException("Not implemented: createNoteCallable()"); + } + + public UnaryCallable + batchCreateNotesCallable() { + throw new UnsupportedOperationException("Not implemented: batchCreateNotesCallable()"); + } + + public UnaryCallable updateNoteCallable() { + throw new UnsupportedOperationException("Not implemented: updateNoteCallable()"); + } + + public UnaryCallable + listNoteOccurrencesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNoteOccurrencesPagedCallable()"); + } + + public UnaryCallable + listNoteOccurrencesCallable() { + throw new UnsupportedOperationException("Not implemented: listNoteOccurrencesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java new file mode 100644 index 000000000000..e240f1e74096 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java @@ -0,0 +1,819 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1.stub; + +import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import io.grafeas.v1.BatchCreateNotesRequest; +import io.grafeas.v1.BatchCreateNotesResponse; +import io.grafeas.v1.BatchCreateOccurrencesRequest; +import io.grafeas.v1.BatchCreateOccurrencesResponse; +import io.grafeas.v1.CreateNoteRequest; +import io.grafeas.v1.CreateOccurrenceRequest; +import io.grafeas.v1.DeleteNoteRequest; +import io.grafeas.v1.DeleteOccurrenceRequest; +import io.grafeas.v1.GetNoteRequest; +import io.grafeas.v1.GetOccurrenceNoteRequest; +import io.grafeas.v1.GetOccurrenceRequest; +import io.grafeas.v1.ListNoteOccurrencesRequest; +import io.grafeas.v1.ListNoteOccurrencesResponse; +import io.grafeas.v1.ListNotesRequest; +import io.grafeas.v1.ListNotesResponse; +import io.grafeas.v1.ListOccurrencesRequest; +import io.grafeas.v1.ListOccurrencesResponse; +import io.grafeas.v1.Note; +import io.grafeas.v1.Occurrence; +import io.grafeas.v1.UpdateNoteRequest; +import io.grafeas.v1.UpdateOccurrenceRequest; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link GrafeasStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (containeranalysis.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getOccurrence to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * GrafeasStubSettings.Builder grafeasSettingsBuilder = GrafeasStubSettings.newBuilder();
+ * grafeasSettingsBuilder
+ *     .getOccurrenceSettings()
+ *     .setRetrySettings(
+ *         grafeasSettingsBuilder
+ *             .getOccurrenceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * GrafeasStubSettings grafeasSettings = grafeasSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class GrafeasStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().build(); + + private final UnaryCallSettings getOccurrenceSettings; + private final PagedCallSettings< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> + listOccurrencesSettings; + private final UnaryCallSettings deleteOccurrenceSettings; + private final UnaryCallSettings createOccurrenceSettings; + private final UnaryCallSettings + batchCreateOccurrencesSettings; + private final UnaryCallSettings updateOccurrenceSettings; + private final UnaryCallSettings getOccurrenceNoteSettings; + private final UnaryCallSettings getNoteSettings; + private final PagedCallSettings + listNotesSettings; + private final UnaryCallSettings deleteNoteSettings; + private final UnaryCallSettings createNoteSettings; + private final UnaryCallSettings + batchCreateNotesSettings; + private final UnaryCallSettings updateNoteSettings; + private final PagedCallSettings< + ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> + listNoteOccurrencesSettings; + + private static final PagedListDescriptor< + ListOccurrencesRequest, ListOccurrencesResponse, Occurrence> + LIST_OCCURRENCES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListOccurrencesRequest injectToken( + ListOccurrencesRequest payload, String token) { + return ListOccurrencesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListOccurrencesRequest injectPageSize( + ListOccurrencesRequest payload, int pageSize) { + return ListOccurrencesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListOccurrencesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListOccurrencesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListOccurrencesResponse payload) { + return payload.getOccurrencesList() == null + ? ImmutableList.of() + : payload.getOccurrencesList(); + } + }; + + private static final PagedListDescriptor + LIST_NOTES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNotesRequest injectToken(ListNotesRequest payload, String token) { + return ListNotesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListNotesRequest injectPageSize(ListNotesRequest payload, int pageSize) { + return ListNotesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListNotesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNotesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListNotesResponse payload) { + return payload.getNotesList() == null + ? ImmutableList.of() + : payload.getNotesList(); + } + }; + + private static final PagedListDescriptor< + ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, Occurrence> + LIST_NOTE_OCCURRENCES_PAGE_STR_DESC = + new PagedListDescriptor< + ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, Occurrence>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNoteOccurrencesRequest injectToken( + ListNoteOccurrencesRequest payload, String token) { + return ListNoteOccurrencesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListNoteOccurrencesRequest injectPageSize( + ListNoteOccurrencesRequest payload, int pageSize) { + return ListNoteOccurrencesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListNoteOccurrencesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNoteOccurrencesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListNoteOccurrencesResponse payload) { + return payload.getOccurrencesList() == null + ? ImmutableList.of() + : payload.getOccurrencesList(); + } + }; + + private static final PagedListResponseFactory< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> + LIST_OCCURRENCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListOccurrencesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_OCCURRENCES_PAGE_STR_DESC, request, context); + return ListOccurrencesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListNotesRequest, ListNotesResponse, ListNotesPagedResponse> + LIST_NOTES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNotesRequest, ListNotesResponse, ListNotesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListNotesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_NOTES_PAGE_STR_DESC, request, context); + return ListNotesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> + LIST_NOTE_OCCURRENCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNoteOccurrencesRequest, + ListNoteOccurrencesResponse, + ListNoteOccurrencesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListNoteOccurrencesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_NOTE_OCCURRENCES_PAGE_STR_DESC, request, context); + return ListNoteOccurrencesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to getOccurrence. */ + public UnaryCallSettings getOccurrenceSettings() { + return getOccurrenceSettings; + } + + /** Returns the object with the settings used for calls to listOccurrences. */ + public PagedCallSettings< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> + listOccurrencesSettings() { + return listOccurrencesSettings; + } + + /** Returns the object with the settings used for calls to deleteOccurrence. */ + public UnaryCallSettings deleteOccurrenceSettings() { + return deleteOccurrenceSettings; + } + + /** Returns the object with the settings used for calls to createOccurrence. */ + public UnaryCallSettings createOccurrenceSettings() { + return createOccurrenceSettings; + } + + /** Returns the object with the settings used for calls to batchCreateOccurrences. */ + public UnaryCallSettings + batchCreateOccurrencesSettings() { + return batchCreateOccurrencesSettings; + } + + /** Returns the object with the settings used for calls to updateOccurrence. */ + public UnaryCallSettings updateOccurrenceSettings() { + return updateOccurrenceSettings; + } + + /** Returns the object with the settings used for calls to getOccurrenceNote. */ + public UnaryCallSettings getOccurrenceNoteSettings() { + return getOccurrenceNoteSettings; + } + + /** Returns the object with the settings used for calls to getNote. */ + public UnaryCallSettings getNoteSettings() { + return getNoteSettings; + } + + /** Returns the object with the settings used for calls to listNotes. */ + public PagedCallSettings + listNotesSettings() { + return listNotesSettings; + } + + /** Returns the object with the settings used for calls to deleteNote. */ + public UnaryCallSettings deleteNoteSettings() { + return deleteNoteSettings; + } + + /** Returns the object with the settings used for calls to createNote. */ + public UnaryCallSettings createNoteSettings() { + return createNoteSettings; + } + + /** Returns the object with the settings used for calls to batchCreateNotes. */ + public UnaryCallSettings + batchCreateNotesSettings() { + return batchCreateNotesSettings; + } + + /** Returns the object with the settings used for calls to updateNote. */ + public UnaryCallSettings updateNoteSettings() { + return updateNoteSettings; + } + + /** Returns the object with the settings used for calls to listNoteOccurrences. */ + public PagedCallSettings< + ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> + listNoteOccurrencesSettings() { + return listNoteOccurrencesSettings; + } + + public GrafeasStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcGrafeasStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "containeranalysis.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "containeranalysis.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(GrafeasStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected GrafeasStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getOccurrenceSettings = settingsBuilder.getOccurrenceSettings().build(); + listOccurrencesSettings = settingsBuilder.listOccurrencesSettings().build(); + deleteOccurrenceSettings = settingsBuilder.deleteOccurrenceSettings().build(); + createOccurrenceSettings = settingsBuilder.createOccurrenceSettings().build(); + batchCreateOccurrencesSettings = settingsBuilder.batchCreateOccurrencesSettings().build(); + updateOccurrenceSettings = settingsBuilder.updateOccurrenceSettings().build(); + getOccurrenceNoteSettings = settingsBuilder.getOccurrenceNoteSettings().build(); + getNoteSettings = settingsBuilder.getNoteSettings().build(); + listNotesSettings = settingsBuilder.listNotesSettings().build(); + deleteNoteSettings = settingsBuilder.deleteNoteSettings().build(); + createNoteSettings = settingsBuilder.createNoteSettings().build(); + batchCreateNotesSettings = settingsBuilder.batchCreateNotesSettings().build(); + updateNoteSettings = settingsBuilder.updateNoteSettings().build(); + listNoteOccurrencesSettings = settingsBuilder.listNoteOccurrencesSettings().build(); + } + + /** Builder for GrafeasStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder getOccurrenceSettings; + private final PagedCallSettings.Builder< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> + listOccurrencesSettings; + private final UnaryCallSettings.Builder + deleteOccurrenceSettings; + private final UnaryCallSettings.Builder + createOccurrenceSettings; + private final UnaryCallSettings.Builder< + BatchCreateOccurrencesRequest, BatchCreateOccurrencesResponse> + batchCreateOccurrencesSettings; + private final UnaryCallSettings.Builder + updateOccurrenceSettings; + private final UnaryCallSettings.Builder + getOccurrenceNoteSettings; + private final UnaryCallSettings.Builder getNoteSettings; + private final PagedCallSettings.Builder< + ListNotesRequest, ListNotesResponse, ListNotesPagedResponse> + listNotesSettings; + private final UnaryCallSettings.Builder deleteNoteSettings; + private final UnaryCallSettings.Builder createNoteSettings; + private final UnaryCallSettings.Builder + batchCreateNotesSettings; + private final UnaryCallSettings.Builder updateNoteSettings; + private final PagedCallSettings.Builder< + ListNoteOccurrencesRequest, + ListNoteOccurrencesResponse, + ListNoteOccurrencesPagedResponse> + listNoteOccurrencesSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + getOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listOccurrencesSettings = PagedCallSettings.newBuilder(LIST_OCCURRENCES_PAGE_STR_FACT); + deleteOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchCreateOccurrencesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getOccurrenceNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listNotesSettings = PagedCallSettings.newBuilder(LIST_NOTES_PAGE_STR_FACT); + deleteNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchCreateNotesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listNoteOccurrencesSettings = + PagedCallSettings.newBuilder(LIST_NOTE_OCCURRENCES_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getOccurrenceSettings, + listOccurrencesSettings, + deleteOccurrenceSettings, + createOccurrenceSettings, + batchCreateOccurrencesSettings, + updateOccurrenceSettings, + getOccurrenceNoteSettings, + getNoteSettings, + listNotesSettings, + deleteNoteSettings, + createNoteSettings, + batchCreateNotesSettings, + updateNoteSettings, + listNoteOccurrencesSettings); + initDefaults(this); + } + + protected Builder(GrafeasStubSettings settings) { + super(settings); + + getOccurrenceSettings = settings.getOccurrenceSettings.toBuilder(); + listOccurrencesSettings = settings.listOccurrencesSettings.toBuilder(); + deleteOccurrenceSettings = settings.deleteOccurrenceSettings.toBuilder(); + createOccurrenceSettings = settings.createOccurrenceSettings.toBuilder(); + batchCreateOccurrencesSettings = settings.batchCreateOccurrencesSettings.toBuilder(); + updateOccurrenceSettings = settings.updateOccurrenceSettings.toBuilder(); + getOccurrenceNoteSettings = settings.getOccurrenceNoteSettings.toBuilder(); + getNoteSettings = settings.getNoteSettings.toBuilder(); + listNotesSettings = settings.listNotesSettings.toBuilder(); + deleteNoteSettings = settings.deleteNoteSettings.toBuilder(); + createNoteSettings = settings.createNoteSettings.toBuilder(); + batchCreateNotesSettings = settings.batchCreateNotesSettings.toBuilder(); + updateNoteSettings = settings.updateNoteSettings.toBuilder(); + listNoteOccurrencesSettings = settings.listNoteOccurrencesSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getOccurrenceSettings, + listOccurrencesSettings, + deleteOccurrenceSettings, + createOccurrenceSettings, + batchCreateOccurrencesSettings, + updateOccurrenceSettings, + getOccurrenceNoteSettings, + getNoteSettings, + listNotesSettings, + deleteNoteSettings, + createNoteSettings, + batchCreateNotesSettings, + updateNoteSettings, + listNoteOccurrencesSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getOccurrenceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listOccurrencesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteOccurrenceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createOccurrenceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .batchCreateOccurrencesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateOccurrenceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getOccurrenceNoteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getNoteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listNotesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteNoteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createNoteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .batchCreateNotesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateNoteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listNoteOccurrencesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getOccurrence. */ + public UnaryCallSettings.Builder getOccurrenceSettings() { + return getOccurrenceSettings; + } + + /** Returns the builder for the settings used for calls to listOccurrences. */ + public PagedCallSettings.Builder< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> + listOccurrencesSettings() { + return listOccurrencesSettings; + } + + /** Returns the builder for the settings used for calls to deleteOccurrence. */ + public UnaryCallSettings.Builder deleteOccurrenceSettings() { + return deleteOccurrenceSettings; + } + + /** Returns the builder for the settings used for calls to createOccurrence. */ + public UnaryCallSettings.Builder + createOccurrenceSettings() { + return createOccurrenceSettings; + } + + /** Returns the builder for the settings used for calls to batchCreateOccurrences. */ + public UnaryCallSettings.Builder + batchCreateOccurrencesSettings() { + return batchCreateOccurrencesSettings; + } + + /** Returns the builder for the settings used for calls to updateOccurrence. */ + public UnaryCallSettings.Builder + updateOccurrenceSettings() { + return updateOccurrenceSettings; + } + + /** Returns the builder for the settings used for calls to getOccurrenceNote. */ + public UnaryCallSettings.Builder getOccurrenceNoteSettings() { + return getOccurrenceNoteSettings; + } + + /** Returns the builder for the settings used for calls to getNote. */ + public UnaryCallSettings.Builder getNoteSettings() { + return getNoteSettings; + } + + /** Returns the builder for the settings used for calls to listNotes. */ + public PagedCallSettings.Builder + listNotesSettings() { + return listNotesSettings; + } + + /** Returns the builder for the settings used for calls to deleteNote. */ + public UnaryCallSettings.Builder deleteNoteSettings() { + return deleteNoteSettings; + } + + /** Returns the builder for the settings used for calls to createNote. */ + public UnaryCallSettings.Builder createNoteSettings() { + return createNoteSettings; + } + + /** Returns the builder for the settings used for calls to batchCreateNotes. */ + public UnaryCallSettings.Builder + batchCreateNotesSettings() { + return batchCreateNotesSettings; + } + + /** Returns the builder for the settings used for calls to updateNote. */ + public UnaryCallSettings.Builder updateNoteSettings() { + return updateNoteSettings; + } + + /** Returns the builder for the settings used for calls to listNoteOccurrences. */ + public PagedCallSettings.Builder< + ListNoteOccurrencesRequest, + ListNoteOccurrencesResponse, + ListNoteOccurrencesPagedResponse> + listNoteOccurrencesSettings() { + return listNoteOccurrencesSettings; + } + + @Override + public GrafeasStubSettings build() throws IOException { + return new GrafeasStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java new file mode 100644 index 000000000000..b5a6c1879d69 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Grafeas service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcGrafeasCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java new file mode 100644 index 000000000000..ef18c902d9f3 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java @@ -0,0 +1,607 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1.stub; + +import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grafeas.v1.BatchCreateNotesRequest; +import io.grafeas.v1.BatchCreateNotesResponse; +import io.grafeas.v1.BatchCreateOccurrencesRequest; +import io.grafeas.v1.BatchCreateOccurrencesResponse; +import io.grafeas.v1.CreateNoteRequest; +import io.grafeas.v1.CreateOccurrenceRequest; +import io.grafeas.v1.DeleteNoteRequest; +import io.grafeas.v1.DeleteOccurrenceRequest; +import io.grafeas.v1.GetNoteRequest; +import io.grafeas.v1.GetOccurrenceNoteRequest; +import io.grafeas.v1.GetOccurrenceRequest; +import io.grafeas.v1.ListNoteOccurrencesRequest; +import io.grafeas.v1.ListNoteOccurrencesResponse; +import io.grafeas.v1.ListNotesRequest; +import io.grafeas.v1.ListNotesResponse; +import io.grafeas.v1.ListOccurrencesRequest; +import io.grafeas.v1.ListOccurrencesResponse; +import io.grafeas.v1.Note; +import io.grafeas.v1.Occurrence; +import io.grafeas.v1.UpdateNoteRequest; +import io.grafeas.v1.UpdateOccurrenceRequest; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Grafeas service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcGrafeasStub extends GrafeasStub { + private static final MethodDescriptor + getOccurrenceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/GetOccurrence") + .setRequestMarshaller( + ProtoUtils.marshaller(GetOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Occurrence.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listOccurrencesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/ListOccurrences") + .setRequestMarshaller( + ProtoUtils.marshaller(ListOccurrencesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListOccurrencesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteOccurrenceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/DeleteOccurrence") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createOccurrenceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/CreateOccurrence") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Occurrence.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + BatchCreateOccurrencesRequest, BatchCreateOccurrencesResponse> + batchCreateOccurrencesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/BatchCreateOccurrences") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchCreateOccurrencesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchCreateOccurrencesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateOccurrenceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/UpdateOccurrence") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Occurrence.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getOccurrenceNoteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/GetOccurrenceNote") + .setRequestMarshaller( + ProtoUtils.marshaller(GetOccurrenceNoteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getNoteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/GetNote") + .setRequestMarshaller(ProtoUtils.marshaller(GetNoteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listNotesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/ListNotes") + .setRequestMarshaller(ProtoUtils.marshaller(ListNotesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListNotesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteNoteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/DeleteNote") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteNoteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createNoteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/CreateNote") + .setRequestMarshaller(ProtoUtils.marshaller(CreateNoteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchCreateNotesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/BatchCreateNotes") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchCreateNotesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchCreateNotesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateNoteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/UpdateNote") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateNoteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listNoteOccurrencesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/ListNoteOccurrences") + .setRequestMarshaller( + ProtoUtils.marshaller(ListNoteOccurrencesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNoteOccurrencesResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable getOccurrenceCallable; + private final UnaryCallable + listOccurrencesCallable; + private final UnaryCallable + listOccurrencesPagedCallable; + private final UnaryCallable deleteOccurrenceCallable; + private final UnaryCallable createOccurrenceCallable; + private final UnaryCallable + batchCreateOccurrencesCallable; + private final UnaryCallable updateOccurrenceCallable; + private final UnaryCallable getOccurrenceNoteCallable; + private final UnaryCallable getNoteCallable; + private final UnaryCallable listNotesCallable; + private final UnaryCallable listNotesPagedCallable; + private final UnaryCallable deleteNoteCallable; + private final UnaryCallable createNoteCallable; + private final UnaryCallable + batchCreateNotesCallable; + private final UnaryCallable updateNoteCallable; + private final UnaryCallable + listNoteOccurrencesCallable; + private final UnaryCallable + listNoteOccurrencesPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcGrafeasStub create(GrafeasStubSettings settings) throws IOException { + return new GrpcGrafeasStub(settings, ClientContext.create(settings)); + } + + public static final GrpcGrafeasStub create(ClientContext clientContext) throws IOException { + return new GrpcGrafeasStub(GrafeasStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcGrafeasStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcGrafeasStub( + GrafeasStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcGrafeasStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcGrafeasStub(GrafeasStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcGrafeasCallableFactory()); + } + + /** + * Constructs an instance of GrpcGrafeasStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcGrafeasStub( + GrafeasStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings getOccurrenceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getOccurrenceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listOccurrencesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listOccurrencesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteOccurrenceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteOccurrenceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createOccurrenceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createOccurrenceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + batchCreateOccurrencesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(batchCreateOccurrencesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateOccurrenceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateOccurrenceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getOccurrenceNoteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getOccurrenceNoteMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getNoteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNoteMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listNotesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNotesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteNoteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteNoteMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createNoteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createNoteMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + batchCreateNotesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchCreateNotesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateNoteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateNoteMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listNoteOccurrencesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNoteOccurrencesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.getOccurrenceCallable = + callableFactory.createUnaryCallable( + getOccurrenceTransportSettings, settings.getOccurrenceSettings(), clientContext); + this.listOccurrencesCallable = + callableFactory.createUnaryCallable( + listOccurrencesTransportSettings, settings.listOccurrencesSettings(), clientContext); + this.listOccurrencesPagedCallable = + callableFactory.createPagedCallable( + listOccurrencesTransportSettings, settings.listOccurrencesSettings(), clientContext); + this.deleteOccurrenceCallable = + callableFactory.createUnaryCallable( + deleteOccurrenceTransportSettings, settings.deleteOccurrenceSettings(), clientContext); + this.createOccurrenceCallable = + callableFactory.createUnaryCallable( + createOccurrenceTransportSettings, settings.createOccurrenceSettings(), clientContext); + this.batchCreateOccurrencesCallable = + callableFactory.createUnaryCallable( + batchCreateOccurrencesTransportSettings, + settings.batchCreateOccurrencesSettings(), + clientContext); + this.updateOccurrenceCallable = + callableFactory.createUnaryCallable( + updateOccurrenceTransportSettings, settings.updateOccurrenceSettings(), clientContext); + this.getOccurrenceNoteCallable = + callableFactory.createUnaryCallable( + getOccurrenceNoteTransportSettings, + settings.getOccurrenceNoteSettings(), + clientContext); + this.getNoteCallable = + callableFactory.createUnaryCallable( + getNoteTransportSettings, settings.getNoteSettings(), clientContext); + this.listNotesCallable = + callableFactory.createUnaryCallable( + listNotesTransportSettings, settings.listNotesSettings(), clientContext); + this.listNotesPagedCallable = + callableFactory.createPagedCallable( + listNotesTransportSettings, settings.listNotesSettings(), clientContext); + this.deleteNoteCallable = + callableFactory.createUnaryCallable( + deleteNoteTransportSettings, settings.deleteNoteSettings(), clientContext); + this.createNoteCallable = + callableFactory.createUnaryCallable( + createNoteTransportSettings, settings.createNoteSettings(), clientContext); + this.batchCreateNotesCallable = + callableFactory.createUnaryCallable( + batchCreateNotesTransportSettings, settings.batchCreateNotesSettings(), clientContext); + this.updateNoteCallable = + callableFactory.createUnaryCallable( + updateNoteTransportSettings, settings.updateNoteSettings(), clientContext); + this.listNoteOccurrencesCallable = + callableFactory.createUnaryCallable( + listNoteOccurrencesTransportSettings, + settings.listNoteOccurrencesSettings(), + clientContext); + this.listNoteOccurrencesPagedCallable = + callableFactory.createPagedCallable( + listNoteOccurrencesTransportSettings, + settings.listNoteOccurrencesSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getOccurrenceCallable() { + return getOccurrenceCallable; + } + + @Override + public UnaryCallable listOccurrencesCallable() { + return listOccurrencesCallable; + } + + @Override + public UnaryCallable + listOccurrencesPagedCallable() { + return listOccurrencesPagedCallable; + } + + @Override + public UnaryCallable deleteOccurrenceCallable() { + return deleteOccurrenceCallable; + } + + @Override + public UnaryCallable createOccurrenceCallable() { + return createOccurrenceCallable; + } + + @Override + public UnaryCallable + batchCreateOccurrencesCallable() { + return batchCreateOccurrencesCallable; + } + + @Override + public UnaryCallable updateOccurrenceCallable() { + return updateOccurrenceCallable; + } + + @Override + public UnaryCallable getOccurrenceNoteCallable() { + return getOccurrenceNoteCallable; + } + + @Override + public UnaryCallable getNoteCallable() { + return getNoteCallable; + } + + @Override + public UnaryCallable listNotesCallable() { + return listNotesCallable; + } + + @Override + public UnaryCallable listNotesPagedCallable() { + return listNotesPagedCallable; + } + + @Override + public UnaryCallable deleteNoteCallable() { + return deleteNoteCallable; + } + + @Override + public UnaryCallable createNoteCallable() { + return createNoteCallable; + } + + @Override + public UnaryCallable + batchCreateNotesCallable() { + return batchCreateNotesCallable; + } + + @Override + public UnaryCallable updateNoteCallable() { + return updateNoteCallable; + } + + @Override + public UnaryCallable + listNoteOccurrencesCallable() { + return listNoteOccurrencesCallable; + } + + @Override + public UnaryCallable + listNoteOccurrencesPagedCallable() { + return listNoteOccurrencesPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto new file mode 100644 index 000000000000..f2854fe686b2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto @@ -0,0 +1,90 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "grafeas/v1/common.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// An attestation wrapper with a PGP-compatible signature. This message only +// supports `ATTACHED` signatures, where the payload that is signed is included +// alongside the signature itself in the same file. + +// Note kind that represents a logical attestation "role" or "authority". For +// example, an organization might have one `Authority` for "QA" and one for +// "build". This note is intended to act strictly as a grouping mechanism for +// the attached occurrences (Attestations). This grouping mechanism also +// provides a security boundary, since IAM ACLs gate the ability for a principle +// to attach an occurrence to a given note. It also provides a single point of +// lookup to find all attached attestation occurrences, even if they don't all +// live in the same project. +message AttestationNote { + // This submessage provides human-readable hints about the purpose of the + // authority. Because the name of a note acts as its resource reference, it is + // important to disambiguate the canonical name of the Note (which might be a + // UUID for security purposes) from "readable" names more suitable for debug + // output. Note that these hints should not be used to look up authorities in + // security sensitive contexts, such as when looking up attestations to + // verify. + message Hint { + // Required. The human readable name of this attestation authority, for + // example "qa". + string human_readable_name = 1; + } + + // Hint hints at the purpose of the attestation authority. + Hint hint = 1; +} + +message Jwt { + // The compact encoding of a JWS, which is always three base64 encoded strings + // joined by periods. For details, see: + // https://tools.ietf.org/html/rfc7515.html#section-3.1 + string compact_jwt = 1; +} + +// Occurrence that represents a single "attestation". The authenticity of an +// attestation can be verified using the attached signature. If the verifier +// trusts the public key of the signer, then verifying the signature is +// sufficient to establish trust. In this circumstance, the authority to which +// this attestation is attached is primarily useful for lookup (how to find +// this attestation if you already know the authority and artifact to be +// verified) and intent (for which authority this attestation was intended to +// sign. +message AttestationOccurrence { + // Required. The serialized payload that is verified by one or more + // `signatures`. + bytes serialized_payload = 1; + // One or more signatures over `serialized_payload`. Verifier implementations + // should consider this attestation message verified if at least one + // `signature` verifies `serialized_payload`. See `Signature` in common.proto + // for more details on signature structure and verification. + repeated Signature signatures = 2; + // One or more JWTs encoding a self-contained attestation. + // Each JWT encodes the payload that it verifies within the JWT itself. + // Verifier implementation SHOULD ignore the `serialized_payload` field + // when verifying these JWTs. + // If only JWTs are present on this AttestationOccurrence, then the + // `serialized_payload` SHOULD be left empty. + // Each JWT SHOULD encode a claim specific to the `resource_uri` of this + // Occurrence, but this is not validated by Grafeas metadata API + // implementations. The JWT itself is opaque to Grafeas. + repeated Jwt jwts = 3; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto new file mode 100644 index 000000000000..172637fd4596 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto @@ -0,0 +1,62 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "grafeas/v1/intoto_provenance.proto"; +import "grafeas/v1/intoto_statement.proto"; +import "grafeas/v1/provenance.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// Note holding the version of the provider's builder and the signature of the +// provenance message in the build details occurrence. +message BuildNote { + // Required. Immutable. Version of the builder which produced this build. + string builder_version = 1; +} + +// Details of a build occurrence. +message BuildOccurrence { + // The actual provenance for the build. + grafeas.v1.BuildProvenance provenance = 1; + + // Serialized JSON representation of the provenance, used in generating the + // build signature in the corresponding build note. After verifying the + // signature, `provenance_bytes` can be unmarshalled and compared to the + // provenance to confirm that it is unchanged. A base64-encoded string + // representation of the provenance bytes is used for the signature in order + // to interoperate with openssl which expects this format for signature + // verification. + // + // The serialized form is captured both to avoid ambiguity in how the + // provenance is marshalled to json as well to prevent incompatibilities with + // future changes. + string provenance_bytes = 2; + + // Deprecated. See InTotoStatement for the replacement. + // In-toto Provenance representation as defined in spec. + InTotoProvenance intoto_provenance = 3; + + // In-toto Statement representation as defined in spec. + // The intoto_statement can contain any type of provenance. The serialized + // payload of the statement can be stored and signed in the Occurrence's + // envelope. + InTotoStatement intoto_statement = 4; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto new file mode 100644 index 000000000000..80bd7869968a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto @@ -0,0 +1,150 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// Kind represents the kinds of notes supported. +enum NoteKind { + // Default value. This value is unused. + NOTE_KIND_UNSPECIFIED = 0; + // The note and occurrence represent a package vulnerability. + VULNERABILITY = 1; + // The note and occurrence assert build provenance. + BUILD = 2; + // This represents an image basis relationship. + IMAGE = 3; + // This represents a package installed via a package manager. + PACKAGE = 4; + // The note and occurrence track deployment events. + DEPLOYMENT = 5; + // The note and occurrence track the initial discovery status of a resource. + DISCOVERY = 6; + // This represents a logical "role" that can attest to artifacts. + ATTESTATION = 7; + // This represents an available package upgrade. + UPGRADE = 8; + // This represents a Compliance Note + COMPLIANCE = 9; + // This represents a DSSE attestation Note + DSSE_ATTESTATION = 10; +} + +// Metadata for any related URL information. +message RelatedUrl { + // Specific URL associated with the resource. + string url = 1; + // Label to describe usage of the URL. + string label = 2; +} + +// Verifiers (e.g. Kritis implementations) MUST verify signatures +// with respect to the trust anchors defined in policy (e.g. a Kritis policy). +// Typically this means that the verifier has been configured with a map from +// `public_key_id` to public key material (and any required parameters, e.g. +// signing algorithm). +// +// In particular, verification implementations MUST NOT treat the signature +// `public_key_id` as anything more than a key lookup hint. The `public_key_id` +// DOES NOT validate or authenticate a public key; it only provides a mechanism +// for quickly selecting a public key ALREADY CONFIGURED on the verifier through +// a trusted channel. Verification implementations MUST reject signatures in any +// of the following circumstances: +// * The `public_key_id` is not recognized by the verifier. +// * The public key that `public_key_id` refers to does not verify the +// signature with respect to the payload. +// +// The `signature` contents SHOULD NOT be "attached" (where the payload is +// included with the serialized `signature` bytes). Verifiers MUST ignore any +// "attached" payload and only verify signatures with respect to explicitly +// provided payload (e.g. a `payload` field on the proto message that holds +// this Signature, or the canonical serialization of the proto message that +// holds this signature). +message Signature { + // The content of the signature, an opaque bytestring. + // The payload that this signature verifies MUST be unambiguously provided + // with the Signature during verification. A wrapper message might provide + // the payload explicitly. Alternatively, a message might have a canonical + // serialization that can always be unambiguously computed to derive the + // payload. + bytes signature = 1; + + // The identifier for the public key that verifies this signature. + // * The `public_key_id` is required. + // * The `public_key_id` SHOULD be an RFC3986 conformant URI. + // * When possible, the `public_key_id` SHOULD be an immutable reference, + // such as a cryptographic digest. + // + // Examples of valid `public_key_id`s: + // + // OpenPGP V4 public key fingerprint: + // * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" + // See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more + // details on this scheme. + // + // RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER + // serialization): + // * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" + // * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" + string public_key_id = 2; +} + +// MUST match +// https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An +// authenticated message of arbitrary type. +message Envelope { + bytes payload = 1; + string payload_type = 2; + repeated EnvelopeSignature signatures = 3; +} + +message EnvelopeSignature { + bytes sig = 1; + string keyid = 2; +} + +// Indicates the location at which a package was found. +message FileLocation { + // For jars that are contained inside .war files, this filepath + // can indicate the path to war file combined with the path to jar file. + string file_path = 1; +} + +// License information. +message License { + // Often a single license can be used to represent the licensing terms. + // Sometimes it is necessary to include a choice of one or more licenses + // or some combination of license identifiers. + // Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", + // "GPL-2.0-or-later WITH Bison-exception-2.2". + string expression = 1; + + // Comments + string comments = 2; +} + +// Digest information. +message Digest { + // `SHA1`, `SHA512` etc. + string algo = 1; + + // Value of the digest. + bytes digest_bytes = 2; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto new file mode 100644 index 000000000000..688fa82596b1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto @@ -0,0 +1,82 @@ +// Copyright 2021 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "grafeas/v1/severity.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +message ComplianceNote { + // The title that identifies this compliance check. + string title = 1; + // A description about this compliance check. + string description = 2; + // The OS and config versions the benchmark applies to. + repeated grafeas.v1.ComplianceVersion version = 3; + // A rationale for the existence of this compliance check. + string rationale = 4; + // A description of remediation steps if the compliance check fails. + string remediation = 5; + // A compliance check that is a CIS benchmark. + message CisBenchmark { + int32 profile_level = 1; + grafeas.v1.Severity severity = 2; + } + oneof compliance_type { + CisBenchmark cis_benchmark = 6; + } + // Serialized scan instructions with a predefined format. + bytes scan_instructions = 7; +} + +// Describes the CIS benchmark version that is applicable to a given OS and +// os version. +message ComplianceVersion { + // The CPE URI (https://cpe.mitre.org/specification/) this benchmark is + // applicable to. + string cpe_uri = 1; + // The name of the document that defines this benchmark, e.g. "CIS + // Container-Optimized OS". + string benchmark_document = 3; + // The version of the benchmark. This is set to the version of the OS-specific + // CIS document the benchmark is defined in. + string version = 2; +} + +// An indication that the compliance checks in the associated ComplianceNote +// were not satisfied for particular resources or a specified reason. +message ComplianceOccurrence { + repeated NonCompliantFile non_compliant_files = 2; + string non_compliance_reason = 3; +} + +// Details about files that caused a compliance check to fail. +message NonCompliantFile { + // display_command is a single command that can be used to display a list of + // non compliant files. When there is no such command, we can also iterate a + // list of non compliant file using 'path'. + + // Empty if `display_command` is set. + string path = 1; + // Command to display the non-compliant files. + string display_command = 2; + // Explains why a file is non compliant for a CIS check. + string reason = 3; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto new file mode 100644 index 000000000000..181ec052fe42 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto @@ -0,0 +1,166 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; +option java_outer_classname = "CVSSProto"; + +// Common Vulnerability Scoring System version 3. +// For details, see https://www.first.org/cvss/specification-document +message CVSSv3 { + // The base score is a function of the base metric scores. + float base_score = 1; + + float exploitability_score = 2; + + float impact_score = 3; + + // Base Metrics + // Represents the intrinsic characteristics of a vulnerability that are + // constant over time and across user environments. + AttackVector attack_vector = 5; + AttackComplexity attack_complexity = 6; + PrivilegesRequired privileges_required = 7; + UserInteraction user_interaction = 8; + Scope scope = 9; + Impact confidentiality_impact = 10; + Impact integrity_impact = 11; + Impact availability_impact = 12; + + enum AttackVector { + ATTACK_VECTOR_UNSPECIFIED = 0; + ATTACK_VECTOR_NETWORK = 1; + ATTACK_VECTOR_ADJACENT = 2; + ATTACK_VECTOR_LOCAL = 3; + ATTACK_VECTOR_PHYSICAL = 4; + } + + enum AttackComplexity { + ATTACK_COMPLEXITY_UNSPECIFIED = 0; + ATTACK_COMPLEXITY_LOW = 1; + ATTACK_COMPLEXITY_HIGH = 2; + } + + enum PrivilegesRequired { + PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + PRIVILEGES_REQUIRED_NONE = 1; + PRIVILEGES_REQUIRED_LOW = 2; + PRIVILEGES_REQUIRED_HIGH = 3; + } + + enum UserInteraction { + USER_INTERACTION_UNSPECIFIED = 0; + USER_INTERACTION_NONE = 1; + USER_INTERACTION_REQUIRED = 2; + } + + enum Scope { + SCOPE_UNSPECIFIED = 0; + SCOPE_UNCHANGED = 1; + SCOPE_CHANGED = 2; + } + + enum Impact { + IMPACT_UNSPECIFIED = 0; + IMPACT_HIGH = 1; + IMPACT_LOW = 2; + IMPACT_NONE = 3; + } +} + +// Common Vulnerability Scoring System. +// For details, see https://www.first.org/cvss/specification-document +// This is a message we will try to use for storing various versions of CVSS +// rather than making a separate proto for storing a specific version. +message CVSS { + // The base score is a function of the base metric scores. + float base_score = 1; + + float exploitability_score = 2; + + float impact_score = 3; + + // Base Metrics + // Represents the intrinsic characteristics of a vulnerability that are + // constant over time and across user environments. + AttackVector attack_vector = 4; + AttackComplexity attack_complexity = 5; + Authentication authentication = 6; + PrivilegesRequired privileges_required = 7; + UserInteraction user_interaction = 8; + Scope scope = 9; + Impact confidentiality_impact = 10; + Impact integrity_impact = 11; + Impact availability_impact = 12; + + enum AttackVector { + ATTACK_VECTOR_UNSPECIFIED = 0; + ATTACK_VECTOR_NETWORK = 1; + ATTACK_VECTOR_ADJACENT = 2; + ATTACK_VECTOR_LOCAL = 3; + ATTACK_VECTOR_PHYSICAL = 4; + } + + enum AttackComplexity { + ATTACK_COMPLEXITY_UNSPECIFIED = 0; + ATTACK_COMPLEXITY_LOW = 1; + ATTACK_COMPLEXITY_HIGH = 2; + } + + enum Authentication { + AUTHENTICATION_UNSPECIFIED = 0; + AUTHENTICATION_MULTIPLE = 1; + AUTHENTICATION_SINGLE = 2; + AUTHENTICATION_NONE = 3; + } + + enum PrivilegesRequired { + PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + PRIVILEGES_REQUIRED_NONE = 1; + PRIVILEGES_REQUIRED_LOW = 2; + PRIVILEGES_REQUIRED_HIGH = 3; + } + + enum UserInteraction { + USER_INTERACTION_UNSPECIFIED = 0; + USER_INTERACTION_NONE = 1; + USER_INTERACTION_REQUIRED = 2; + } + + enum Scope { + SCOPE_UNSPECIFIED = 0; + SCOPE_UNCHANGED = 1; + SCOPE_CHANGED = 2; + } + + enum Impact { + IMPACT_UNSPECIFIED = 0; + IMPACT_HIGH = 1; + IMPACT_LOW = 2; + IMPACT_NONE = 3; + } +} + +// CVSS Version. +enum CVSSVersion { + CVSS_VERSION_UNSPECIFIED = 0; + CVSS_VERSION_2 = 1; + CVSS_VERSION_3 = 2; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto new file mode 100644 index 000000000000..5204004fd646 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto @@ -0,0 +1,66 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// An artifact that can be deployed in some runtime. +message DeploymentNote { + // Required. Resource URI for the artifact being deployed. + repeated string resource_uri = 1; +} + +// The period during which some deployable was active in a runtime. +message DeploymentOccurrence { + // Identity of the user that triggered this deployment. + string user_email = 1; + + // Required. Beginning of the lifetime of this deployment. + google.protobuf.Timestamp deploy_time = 2; + + // End of the lifetime of this deployment. + google.protobuf.Timestamp undeploy_time = 3; + + // Configuration used to create this deployment. + string config = 4; + + // Address of the runtime element hosting this deployment. + string address = 5; + + // Output only. Resource URI for the artifact being deployed taken from + // the deployable field with the same name. + repeated string resource_uri = 6; + + // Types of platforms. + enum Platform { + // Unknown. + PLATFORM_UNSPECIFIED = 0; + // Google Container Engine. + GKE = 1; + // Google App Engine: Flexible Environment. + FLEX = 2; + // Custom user-defined platform. + CUSTOM = 3; + } + // Platform hosting this deployment. + Platform platform = 7; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto new file mode 100644 index 000000000000..bfb94e4a3474 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto @@ -0,0 +1,104 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "grafeas/v1/common.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// A note that indicates a type of analysis a provider would perform. This note +// exists in a provider's project. A `Discovery` occurrence is created in a +// consumer's project at the start of analysis. +message DiscoveryNote { + // Required. Immutable. The kind of analysis that is handled by this + // discovery. + grafeas.v1.NoteKind analysis_kind = 1; +} + +// Provides information about the analysis status of a discovered resource. +message DiscoveryOccurrence { + // Whether the resource is continuously analyzed. + enum ContinuousAnalysis { + // Unknown. + CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; + // The resource is continuously analyzed. + ACTIVE = 1; + // The resource is ignored for continuous analysis. + INACTIVE = 2; + } + + // Whether the resource is continuously analyzed. + ContinuousAnalysis continuous_analysis = 1; + + // Analysis status for a resource. Currently for initial analysis only (not + // updated in continuous analysis). + enum AnalysisStatus { + option allow_alias = true; + + // Unknown. + ANALYSIS_STATUS_UNSPECIFIED = 0; + // Resource is known but no action has been taken yet. + PENDING = 1; + // Resource is being analyzed. + SCANNING = 2; + // Analysis has finished successfully. + FINISHED_SUCCESS = 3; + // Analysis has completed. + COMPLETE = 3; + // Analysis has finished unsuccessfully, the analysis itself is in a bad + // state. + FINISHED_FAILED = 4; + // The resource is known not to be supported. + FINISHED_UNSUPPORTED = 5; + } + + // The status of discovery for the resource. + AnalysisStatus analysis_status = 2; + + // Indicates which analysis completed successfully. Multiple types of + // analysis can be performed on a single resource. + message AnalysisCompleted { + repeated string analysis_type = 1; + } + + AnalysisCompleted analysis_completed = 7; + + // Indicates any errors encountered during analysis of a resource. There + // could be 0 or more of these errors. + repeated google.rpc.Status analysis_error = 8; + + // When an error is encountered this will contain a LocalizedMessage under + // details to show to the user. The LocalizedMessage is output only and + // populated by the API. + google.rpc.Status analysis_status_error = 3; + + // The CPE of the resource being scanned. + string cpe = 4; + + // The last time this resource was scanned. + google.protobuf.Timestamp last_scan_time = 5; + + // The time occurrences related to this discovery occurrence were archived. + google.protobuf.Timestamp archive_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto new file mode 100644 index 000000000000..34ba3df9f9be --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto @@ -0,0 +1,52 @@ +// Copyright 2021 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +syntax = "proto3"; + +package grafeas.v1; + +import "grafeas/v1/common.proto"; +import "grafeas/v1/intoto_statement.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +message DSSEAttestationNote { + // This submessage provides human-readable hints about the purpose of the + // authority. Because the name of a note acts as its resource reference, it is + // important to disambiguate the canonical name of the Note (which might be a + // UUID for security purposes) from "readable" names more suitable for debug + // output. Note that these hints should not be used to look up authorities in + // security sensitive contexts, such as when looking up attestations to + // verify. + message DSSEHint { + // Required. The human readable name of this attestation authority, for + // example "cloudbuild-prod". + string human_readable_name = 1; + } + // DSSEHint hints at the purpose of the attestation authority. + DSSEHint hint = 1; +} + +// Deprecated. Prefer to use a regular Occurrence, and populate the +// Envelope at the top level of the Occurrence. +message DSSEAttestationOccurrence { + // If doing something security critical, make sure to verify the signatures in + // this metadata. + Envelope envelope = 1; + oneof decoded_payload { + InTotoStatement statement = 2; + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto new file mode 100644 index 000000000000..5665fe3623e6 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto @@ -0,0 +1,544 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "grafeas/v1/attestation.proto"; +import "grafeas/v1/build.proto"; +import "grafeas/v1/common.proto"; +import "grafeas/v1/compliance.proto"; +import "grafeas/v1/deployment.proto"; +import "grafeas/v1/discovery.proto"; +import "grafeas/v1/dsse_attestation.proto"; +import "grafeas/v1/image.proto"; +import "grafeas/v1/package.proto"; +import "grafeas/v1/upgrade.proto"; +import "grafeas/v1/vulnerability.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; +option (google.api.resource_definition) = { + type: "grafeas.io/Project" + pattern: "projects/{project}" +}; + +// [Grafeas](https://grafeas.io) API. +// +// Retrieves analysis results of Cloud components such as Docker container +// images. +// +// Analysis results are stored as a series of occurrences. An `Occurrence` +// contains information about a specific analysis instance on a resource. An +// occurrence refers to a `Note`. A note contains details describing the +// analysis and is generally stored in a separate project, called a `Provider`. +// Multiple occurrences can refer to the same note. +// +// For example, an SSL vulnerability could affect multiple images. In this case, +// there would be one note for the vulnerability and an occurrence for each +// image with the vulnerability referring to that note. +service Grafeas { + option (google.api.default_host) = "containeranalysis.googleapis.com"; + + // Gets the specified occurrence. + rpc GetOccurrence(GetOccurrenceRequest) returns (Occurrence) { + option (google.api.http) = { + get: "/v1/{name=projects/*/occurrences/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists occurrences for the specified project. + rpc ListOccurrences(ListOccurrencesRequest) + returns (ListOccurrencesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/occurrences" + }; + option (google.api.method_signature) = "parent,filter"; + } + + // Deletes the specified occurrence. For example, use this method to delete an + // occurrence when the occurrence is no longer applicable for the given + // resource. + rpc DeleteOccurrence(DeleteOccurrenceRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/occurrences/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new occurrence. + rpc CreateOccurrence(CreateOccurrenceRequest) returns (Occurrence) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/occurrences" + body: "occurrence" + }; + option (google.api.method_signature) = "parent,occurrence"; + } + + // Creates new occurrences in batch. + rpc BatchCreateOccurrences(BatchCreateOccurrencesRequest) + returns (BatchCreateOccurrencesResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/occurrences:batchCreate" + body: "*" + }; + option (google.api.method_signature) = "parent,occurrences"; + } + + // Updates the specified occurrence. + rpc UpdateOccurrence(UpdateOccurrenceRequest) returns (Occurrence) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/occurrences/*}" + body: "occurrence" + }; + option (google.api.method_signature) = "name,occurrence,update_mask"; + } + + // Gets the note attached to the specified occurrence. Consumer projects can + // use this method to get a note that belongs to a provider project. + rpc GetOccurrenceNote(GetOccurrenceNoteRequest) returns (Note) { + option (google.api.http) = { + get: "/v1/{name=projects/*/occurrences/*}/notes" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the specified note. + rpc GetNote(GetNoteRequest) returns (Note) { + option (google.api.http) = { + get: "/v1/{name=projects/*/notes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists notes for the specified project. + rpc ListNotes(ListNotesRequest) returns (ListNotesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/notes" + }; + option (google.api.method_signature) = "parent,filter"; + } + + // Deletes the specified note. + rpc DeleteNote(DeleteNoteRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/notes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new note. + rpc CreateNote(CreateNoteRequest) returns (Note) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/notes" + body: "note" + }; + option (google.api.method_signature) = "parent,note_id,note"; + } + + // Creates new notes in batch. + rpc BatchCreateNotes(BatchCreateNotesRequest) + returns (BatchCreateNotesResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/notes:batchCreate" + body: "*" + }; + option (google.api.method_signature) = "parent,notes"; + } + + // Updates the specified note. + rpc UpdateNote(UpdateNoteRequest) returns (Note) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/notes/*}" + body: "note" + }; + option (google.api.method_signature) = "name,note,update_mask"; + } + + // Lists occurrences referencing the specified note. Provider projects can use + // this method to get all occurrences across consumer projects referencing the + // specified note. + rpc ListNoteOccurrences(ListNoteOccurrencesRequest) + returns (ListNoteOccurrencesResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/notes/*}/occurrences" + }; + option (google.api.method_signature) = "name,filter"; + } +} + +// An instance of an analysis type that has been found on a resource. +message Occurrence { + option (google.api.resource) = { + type: "grafeas.io/Occurrence" + pattern: "projects/{project}/occurrences/{occurrence}" + }; + + // Output only. The name of the occurrence in the form of + // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + string name = 1; + + // Required. Immutable. A URI that represents the resource for which the + // occurrence applies. For example, + // `https://gcr.io/project/image@sha256:123abc` for a Docker image. + string resource_uri = 2; + + // Required. Immutable. The analysis note associated with this occurrence, in + // the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be + // used as a filter in list requests. + string note_name = 3; + + // Output only. This explicitly denotes which of the occurrence details are + // specified. This field can be used as a filter in list requests. + grafeas.v1.NoteKind kind = 4; + + // A description of actions that can be taken to remedy the note. + string remediation = 5; + + // Output only. The time this occurrence was created. + google.protobuf.Timestamp create_time = 6; + + // Output only. The time this occurrence was last updated. + google.protobuf.Timestamp update_time = 7; + + // Required. Immutable. Describes the details of the note kind found on this + // resource. + oneof details { + // Describes a security vulnerability. + grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + // Describes a verifiable build. + grafeas.v1.BuildOccurrence build = 9; + // Describes how this resource derives from the basis in the associated + // note. + grafeas.v1.ImageOccurrence image = 10; + // Describes the installation of a package on the linked resource. + grafeas.v1.PackageOccurrence package = 11; + // Describes the deployment of an artifact on a runtime. + grafeas.v1.DeploymentOccurrence deployment = 12; + // Describes when a resource was discovered. + grafeas.v1.DiscoveryOccurrence discovery = 13; + // Describes an attestation of an artifact. + grafeas.v1.AttestationOccurrence attestation = 14; + // Describes an available package upgrade on the linked resource. + grafeas.v1.UpgradeOccurrence upgrade = 15; + // Describes a compliance violation on a linked resource. + grafeas.v1.ComplianceOccurrence compliance = 16; + // Describes an attestation of an artifact using dsse. + grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + } + + // https://github.com/secure-systems-lab/dsse + grafeas.v1.Envelope envelope = 18; +} + +// A type of analysis that can be done for a resource. +message Note { + option (google.api.resource) = { + type: "grafeas.io/Note" + pattern: "projects/{project}/notes/{note}" + }; + + // Output only. The name of the note in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1; + + // A one sentence description of this note. + string short_description = 2; + + // A detailed description of this note. + string long_description = 3; + + // Output only. The type of analysis. This field can be used as a filter in + // list requests. + grafeas.v1.NoteKind kind = 4; + + // URLs associated with this note. + repeated grafeas.v1.RelatedUrl related_url = 5; + + // Time of expiration for this note. Empty if note does not expire. + google.protobuf.Timestamp expiration_time = 6; + + // Output only. The time this note was created. This field can be used as a + // filter in list requests. + google.protobuf.Timestamp create_time = 7; + + // Output only. The time this note was last updated. This field can be used as + // a filter in list requests. + google.protobuf.Timestamp update_time = 8; + + // Other notes related to this note. + repeated string related_note_names = 9; + + // Required. Immutable. The type of analysis this note represents. + oneof type { + // A note describing a package vulnerability. + grafeas.v1.VulnerabilityNote vulnerability = 10; + // A note describing build provenance for a verifiable build. + grafeas.v1.BuildNote build = 11; + // A note describing a base image. + grafeas.v1.ImageNote image = 12; + // A note describing a package hosted by various package managers. + grafeas.v1.PackageNote package = 13; + // A note describing something that can be deployed. + grafeas.v1.DeploymentNote deployment = 14; + // A note describing the initial analysis of a resource. + grafeas.v1.DiscoveryNote discovery = 15; + // A note describing an attestation role. + grafeas.v1.AttestationNote attestation = 16; + // A note describing available package upgrades. + grafeas.v1.UpgradeNote upgrade = 17; + // A note describing a compliance check. + grafeas.v1.ComplianceNote compliance = 18; + // A note describing a dsse attestation note. + grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + } +} + +// Request to get an occurrence. +message GetOccurrenceRequest { + // The name of the occurrence in the form of + // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; +} + +// Request to list occurrences. +message ListOccurrencesRequest { + // The name of the project to list occurrences for in the form of + // `projects/[PROJECT_ID]`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; + + // The filter expression. + string filter = 2; + + // Number of occurrences to return in the list. Must be positive. Max allowed + // page size is 1000. If not specified, page size defaults to 20. + int32 page_size = 3; + + // Token to provide to skip to a particular spot in the list. + string page_token = 4; +} + +// Response for listing occurrences. +message ListOccurrencesResponse { + // The occurrences requested. + repeated Occurrence occurrences = 1; + // The next pagination token in the list response. It should be used as + // `page_token` for the following request. An empty value means no more + // results. + string next_page_token = 2; +} + +// Request to delete an occurrence. +message DeleteOccurrenceRequest { + // The name of the occurrence in the form of + // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; +} + +// Request to create a new occurrence. +message CreateOccurrenceRequest { + // The name of the project in the form of `projects/[PROJECT_ID]`, under which + // the occurrence is to be created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; + // The occurrence to create. + Occurrence occurrence = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to update an occurrence. +message UpdateOccurrenceRequest { + // The name of the occurrence in the form of + // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; + // The updated occurrence. + Occurrence occurrence = 2 [(google.api.field_behavior) = REQUIRED]; + // The fields to update. + google.protobuf.FieldMask update_mask = 3; +} + +// Request to get a note. +message GetNoteRequest { + // The name of the note in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; +} + +// Request to get the note to which the specified occurrence is attached. +message GetOccurrenceNoteRequest { + // The name of the occurrence in the form of + // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; +} + +// Request to list notes. +message ListNotesRequest { + // The name of the project to list notes for in the form of + // `projects/[PROJECT_ID]`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; + + // The filter expression. + string filter = 2; + + // Number of notes to return in the list. Must be positive. Max allowed page + // size is 1000. If not specified, page size defaults to 20. + int32 page_size = 3; + + // Token to provide to skip to a particular spot in the list. + string page_token = 4; +} + +// Response for listing notes. +message ListNotesResponse { + // The notes requested. + repeated Note notes = 1; + // The next pagination token in the list response. It should be used as + // `page_token` for the following request. An empty value means no more + // results. + string next_page_token = 2; +} + +// Request to delete a note. +message DeleteNoteRequest { + // The name of the note in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; +} + +// Request to create a new note. +message CreateNoteRequest { + // The name of the project in the form of `projects/[PROJECT_ID]`, under which + // the note is to be created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; + // The ID to use for this note. + string note_id = 2 [(google.api.field_behavior) = REQUIRED]; + // The note to create. + Note note = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to update a note. +message UpdateNoteRequest { + // The name of the note in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; + // The updated note. + Note note = 2 [(google.api.field_behavior) = REQUIRED]; + // The fields to update. + google.protobuf.FieldMask update_mask = 3; +} + +// Request to list occurrences for a note. +message ListNoteOccurrencesRequest { + // The name of the note to list occurrences for in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; + // The filter expression. + string filter = 2; + // Number of occurrences to return in the list. + int32 page_size = 3; + // Token to provide to skip to a particular spot in the list. + string page_token = 4; +} + +// Response for listing occurrences for a note. +message ListNoteOccurrencesResponse { + // The occurrences attached to the specified note. + repeated Occurrence occurrences = 1; + // Token to provide to skip to a particular spot in the list. + string next_page_token = 2; +} + +// Request to create notes in batch. +message BatchCreateNotesRequest { + // The name of the project in the form of `projects/[PROJECT_ID]`, under which + // the notes are to be created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; + + // The notes to create. Max allowed length is 1000. + map notes = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response for creating notes in batch. +message BatchCreateNotesResponse { + // The notes that were created. + repeated Note notes = 1; +} + +// Request to create occurrences in batch. +message BatchCreateOccurrencesRequest { + // The name of the project in the form of `projects/[PROJECT_ID]`, under which + // the occurrences are to be created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; + + // The occurrences to create. Max allowed length is 1000. + repeated Occurrence occurrences = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response for creating occurrences in batch. +message BatchCreateOccurrencesResponse { + // The occurrences that were created. + repeated Occurrence occurrences = 1; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto new file mode 100644 index 000000000000..9ac162cec22f --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto @@ -0,0 +1,83 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// Layer holds metadata specific to a layer of a Docker image. +message Layer { + // Required. The recovered Dockerfile directive used to construct this layer. + // See https://docs.docker.com/engine/reference/builder/ for more information. + string directive = 1; + + // The recovered arguments to the Dockerfile directive. + string arguments = 2; +} + +// A set of properties that uniquely identify a given Docker image. +message Fingerprint { + // Required. The layer ID of the final layer in the Docker image's v1 + // representation. + string v1_name = 1; + + // Required. The ordered list of v2 blobs that represent a given image. + repeated string v2_blob = 2; + + // Output only. The name of the image's v2 blobs computed via: + // [bottom] := v2_blob[bottom] + // [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) + // Only the name of the final blob is kept. + string v2_name = 3; +} + +// Basis describes the base image portion (Note) of the DockerImage +// relationship. Linked occurrences are derived from this or an equivalent image +// via: +// FROM +// Or an equivalent reference, e.g., a tag of the resource_url. +message ImageNote { + // Required. Immutable. The resource_url for the resource representing the + // basis of associated occurrence images. + string resource_url = 1; + + // Required. Immutable. The fingerprint of the base image. + Fingerprint fingerprint = 2; +} + +// Details of the derived image portion of the DockerImage relationship. This +// image would be produced from a Dockerfile with FROM . +message ImageOccurrence { + // Required. The fingerprint of the derived image. + Fingerprint fingerprint = 1; + + // Output only. The number of layers by which this image differs from the + // associated image basis. + int32 distance = 2; + + // This contains layer-specific metadata, if populated it has length + // "distance" and is ordered with [distance] being the layer immediately + // following the base image and [1] being the final layer. + repeated Layer layer_info = 3; + + // Output only. This contains the base image URL for the derived image + // occurrence. + string base_resource_url = 4; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto new file mode 100644 index 000000000000..78886b66e487 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto @@ -0,0 +1,113 @@ +// Copyright 2021 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; +option java_outer_classname = "InTotoProvenanceProto"; + +// Spec defined at +// https://github.com/in-toto/attestation/blob/main/spec/predicates/provenance.md + +// Steps taken to build the artifact. +// For a TaskRun, typically each container corresponds to one step in the +// recipe. +message Recipe { + // URI indicating what type of recipe was performed. It determines the meaning + // of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. + string type = 1; + // Index in materials containing the recipe steps that are not implied by + // recipe.type. For example, if the recipe type were "make", then this would + // point to the source containing the Makefile, not the make program itself. + // Set to -1 if the recipe doesn't come from a material, as zero is default + // unset value for int64. + int64 defined_in_material = 2; + // String identifying the entry point into the build. + // This is often a path to a configuration file and/or a target label within + // that file. The syntax and meaning are defined by recipe.type. For example, + // if the recipe type were "make", then this would reference the directory in + // which to run make as well as which target to use. + string entry_point = 3; + // Collection of all external inputs that influenced the build on top of + // recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe + // type were "make", then this might be the flags passed to make aside from + // the target, which is captured in recipe.entryPoint. Since the arguments + // field can greatly vary in structure, depending on the builder and recipe + // type, this is of form "Any". + repeated google.protobuf.Any arguments = 4; + // Any other builder-controlled inputs necessary for correctly evaluating the + // recipe. Usually only needed for reproducing the build but not evaluated as + // part of policy. Since the environment field can greatly vary in structure, + // depending on the builder and recipe type, this is of form "Any". + repeated google.protobuf.Any environment = 5; +} + +// Indicates that the builder claims certain fields in this message to be +// complete. +message Completeness { + // If true, the builder claims that recipe.arguments is complete, meaning that + // all external inputs are properly captured in the recipe. + bool arguments = 1; + // If true, the builder claims that recipe.environment is claimed to be + // complete. + bool environment = 2; + // If true, the builder claims that materials are complete, usually through + // some controls to prevent network access. Sometimes called "hermetic". + bool materials = 3; +} + +// Other properties of the build. +message Metadata { + // Identifies the particular build invocation, which can be useful for finding + // associated logs or other ad-hoc analysis. The value SHOULD be globally + // unique, per in-toto Provenance spec. + string build_invocation_id = 1; + // The timestamp of when the build started. + google.protobuf.Timestamp build_started_on = 2; + // The timestamp of when the build completed. + google.protobuf.Timestamp build_finished_on = 3; + // Indicates that the builder claims certain fields in this message to be + // complete. + Completeness completeness = 4; + // If true, the builder claims that running the recipe on materials will + // produce bit-for-bit identical output. + bool reproducible = 5; +} + +message BuilderConfig { + string id = 1; +} + +message InTotoProvenance { + BuilderConfig builder_config = 1; // required + // Identifies the configuration used for the build. + // When combined with materials, this SHOULD fully describe the build, + // such that re-running this recipe results in bit-for-bit identical output + // (if the build is reproducible). + Recipe recipe = 2; // required + Metadata metadata = 3; + // The collection of artifacts that influenced the build including sources, + // dependencies, build tools, base images, and so on. This is considered to be + // incomplete unless metadata.completeness.materials is true. Unset or null is + // equivalent to empty. + repeated string materials = 4; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto new file mode 100644 index 000000000000..1f798d0d65f1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto @@ -0,0 +1,52 @@ +// Copyright 2021 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "grafeas/v1/intoto_provenance.proto"; +import "grafeas/v1/slsa_provenance.proto"; +import "grafeas/v1/slsa_provenance_zero_two.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; +option java_outer_classname = "InTotoStatementProto"; + +// Spec defined at +// https://github.com/in-toto/attestation/tree/main/spec#statement The +// serialized InTotoStatement will be stored as Envelope.payload. +// Envelope.payloadType is always "application/vnd.in-toto+json". +message InTotoStatement { + // Always `https://in-toto.io/Statement/v0.1`. + string type = 1 [json_name = "_type"]; + repeated Subject subject = 2; + // `https://slsa.dev/provenance/v0.1` for SlsaProvenance. + string predicate_type = 3; + oneof predicate { + InTotoProvenance provenance = 4; + SlsaProvenance slsa_provenance = 5; + SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + } +} +message Subject { + string name = 1; + // `"": ""` + // Algorithms can be e.g. sha256, sha512 + // See + // https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet + map digest = 2; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto new file mode 100644 index 000000000000..61b21dbf0323 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto @@ -0,0 +1,192 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/api/field_behavior.proto"; +import "grafeas/v1/common.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// Instruction set architectures supported by various package managers. +enum Architecture { + // Unknown architecture. + ARCHITECTURE_UNSPECIFIED = 0; + // X86 architecture. + X86 = 1; + // X64 architecture. + X64 = 2; +} + +// This represents a particular channel of distribution for a given package. +// E.g., Debian's jessie-backports dpkg mirror. +message Distribution { + // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + // denoting the package manager version distributing a package. + string cpe_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // The CPU architecture for which packages in this distribution channel were + // built. + Architecture architecture = 2; + + // The latest available version of this package in this distribution channel. + Version latest_version = 3; + + // A freeform string denoting the maintainer of this package. + string maintainer = 4; + + // The distribution channel-specific homepage for this package. + string url = 5; + + // The distribution channel-specific description of this package. + string description = 6; +} + +// An occurrence of a particular package installation found within a system's +// filesystem. E.g., glibc was found in `/var/lib/dpkg/status`. +message Location { + // Deprecated. + // The CPE URI in [CPE format](https://cpe.mitre.org/specification/) + string cpe_uri = 1; + + // Deprecated. + // The version installed at this location. + Version version = 2; + + // The path from which we gathered that this package/version is installed. + string path = 3; +} + +// PackageNote represents a particular package version. +message PackageNote { + // The name of the package. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Deprecated. + // The various channels by which a package is distributed. + repeated Distribution distribution = 10; + + // The type of package; whether native or non native (e.g., ruby gems, + // node.js packages, etc.). + string package_type = 11; + + // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + // denoting the package manager version distributing a package. + // The cpe_uri will be blank for language packages. + string cpe_uri = 12; + + // The CPU architecture for which packages in this distribution channel were + // built. Architecture will be blank for language packages. + Architecture architecture = 13; + + // The version of the package. + Version version = 14; + + // A freeform text denoting the maintainer of this package. + string maintainer = 15; + + // The homepage for this package. + string url = 16; + + // The description of this package. + string description = 17; + + // Licenses that have been declared by the authors of the package. + License license = 18; + + // Hash value, typically a file digest, that allows unique + // identification a specific package. + repeated Digest digest = 19; +} + +// Details on how a particular software package was installed on a system. +message PackageOccurrence { + // The name of the installed package. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // All of the places within the filesystem versions of this package + // have been found. + repeated Location location = 2; + + // The type of package; whether native or non native (e.g., ruby gems, + // node.js packages, etc.). + string package_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + // denoting the package manager version distributing a package. + // The cpe_uri will be blank for language packages. + string cpe_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The CPU architecture for which packages in this distribution channel were + // built. Architecture will be blank for language packages. + Architecture architecture = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Licenses that have been declared by the authors of the package. + License license = 6; + + // The version of the package. + Version version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Version contains structured information about the version of a package. +message Version { + // Used to correct mistakes in the version numbering scheme. + int32 epoch = 1; + + // Required only when version kind is NORMAL. The main part of the version + // name. + string name = 2; + + // The iteration of the package build from the above version. + string revision = 3; + + // Whether this version is specifying part of an inclusive range. Grafeas + // does not have the capability to specify version ranges; instead we have + // fields that specify start version and end versions. At times this is + // insufficient - we also need to specify whether the version is included in + // the range or is excluded from the range. This boolean is expected to be set + // to true when the version is included in a range. + bool inclusive = 6; + + // Whether this is an ordinary package version or a sentinel MIN/MAX version. + enum VersionKind { + // Unknown. + VERSION_KIND_UNSPECIFIED = 0; + // A standard package version. + NORMAL = 1; + // A special version representing negative infinity. + MINIMUM = 2; + // A special version representing positive infinity. + MAXIMUM = 3; + } + + // Required. Distinguishes between sentinel MIN/MAX versions and normal + // versions. + VersionKind kind = 4; + + // Human readable version string. This string is of the form + // :- and is only set when kind is NORMAL. + string full_name = 5; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto new file mode 100644 index 000000000000..06b109785f8a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto @@ -0,0 +1,265 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// Provenance of a build. Contains all information needed to verify the full +// details about the build from source to completion. +message BuildProvenance { + // Required. Unique identifier of the build. + string id = 1; + + // ID of the project. + string project_id = 2; + + // Commands requested by the build. + repeated Command commands = 3; + + // Output of the build. + repeated Artifact built_artifacts = 4; + + // Time at which the build was created. + google.protobuf.Timestamp create_time = 5; + + // Time at which execution of the build was started. + google.protobuf.Timestamp start_time = 6; + + // Time at which execution of the build was finished. + google.protobuf.Timestamp end_time = 7; + + // E-mail address of the user who initiated this build. Note that this was the + // user's e-mail address at the time the build was initiated; this address may + // not represent the same end-user for all time. + string creator = 8; + + // URI where any logs for this provenance were written. + string logs_uri = 9; + + // Details of the Source input to the build. + Source source_provenance = 10; + + // Trigger identifier if the build was triggered automatically; empty if not. + string trigger_id = 11; + + // Special options applied to this build. This is a catch-all field where + // build providers can enter any desired additional details. + map build_options = 12; + + // Version string of the builder at the time this build was executed. + string builder_version = 13; +} + +// Source describes the location of the source used for the build. +message Source { + // If provided, the input binary artifacts for the build came from this + // location. + string artifact_storage_source_uri = 1; + + // Hash(es) of the build source, which can be used to verify that the original + // source integrity was maintained in the build. + // + // The keys to this map are file paths used as build source and the values + // contain the hash values for those files. + // + // If the build source came in a single package such as a gzipped tarfile + // (.tar.gz), the FileHash will be for the single path to that file. + map file_hashes = 2; + + // If provided, the source code used for the build came from this location. + SourceContext context = 3; + + // If provided, some of the source code used for the build may be found in + // these locations, in the case where the source repository had multiple + // remotes or submodules. This list will not include the context specified in + // the context field. + repeated SourceContext additional_contexts = 4; +} + +// Container message for hashes of byte content of files, used in source +// messages to verify integrity of source input to the build. +message FileHashes { + // Required. Collection of file hashes. + repeated Hash file_hash = 1; +} + +// Container message for hash values. +message Hash { + // Required. The type of hash that was performed, e.g. "SHA-256". + string type = 1; + // Required. The hash value. + bytes value = 2; +} + +// Command describes a step performed as part of the build pipeline. +message Command { + // Required. Name of the command, as presented on the command line, or if the + // command is packaged as a Docker container, as presented to `docker pull`. + string name = 1; + + // Environment variables set before running this command. + repeated string env = 2; + + // Command-line arguments used when executing this command. + repeated string args = 3; + + // Working directory (relative to project source root) used when running this + // command. + string dir = 4; + + // Optional unique identifier for this command, used in wait_for to reference + // this command as a dependency. + string id = 5; + + // The ID(s) of the command(s) that this command depends on. + repeated string wait_for = 6; +} + +// Artifact describes a build product. +message Artifact { + // Hash or checksum value of a binary, or Docker Registry 2.0 digest of a + // container. + string checksum = 1; + + // Artifact ID, if any; for container images, this will be a URL by digest + // like `gcr.io/projectID/imagename@sha256:123456`. + string id = 2; + + // Related artifact names. This may be the path to a binary or jar file, or in + // the case of a container build, the name used to push the container image to + // Google Container Registry, as presented to `docker push`. Note that a + // single Artifact ID can have multiple names, for example if two tags are + // applied to one image. + repeated string names = 3; +} + +// A SourceContext is a reference to a tree of files. A SourceContext together +// with a path point to a unique revision of a single file or directory. +message SourceContext { + // A SourceContext can refer any one of the following types of repositories. + oneof context { + // A SourceContext referring to a revision in a Google Cloud Source Repo. + CloudRepoSourceContext cloud_repo = 1; + + // A SourceContext referring to a Gerrit project. + GerritSourceContext gerrit = 2; + + // A SourceContext referring to any third party Git repo (e.g., GitHub). + GitSourceContext git = 3; + } + + // Labels with user defined metadata. + map labels = 4; +} + +// An alias to a repo revision. +message AliasContext { + // The type of an alias. + enum Kind { + // Unknown. + KIND_UNSPECIFIED = 0; + // Git tag. + FIXED = 1; + // Git branch. + MOVABLE = 2; + // Used to specify non-standard aliases. For example, if a Git repo has a + // ref named "refs/foo/bar". + OTHER = 4; + } + + // The alias kind. + Kind kind = 1; + + // The alias name. + string name = 2; +} + +// A CloudRepoSourceContext denotes a particular revision in a Google Cloud +// Source Repo. +message CloudRepoSourceContext { + // The ID of the repo. + RepoId repo_id = 1; + + // A revision in a Cloud Repo can be identified by either its revision ID or + // its alias. + oneof revision { + // A revision ID. + string revision_id = 2; + + // An alias, which may be a branch or tag. + AliasContext alias_context = 3; + } +} + +// A SourceContext referring to a Gerrit project. +message GerritSourceContext { + // The URI of a running Gerrit instance. + string host_uri = 1; + + // The full project name within the host. Projects may be nested, so + // "project/subproject" is a valid project name. The "repo name" is the + // hostURI/project. + string gerrit_project = 2; + + // A revision in a Gerrit project can be identified by either its revision ID + // or its alias. + oneof revision { + // A revision (commit) ID. + string revision_id = 3; + + // An alias, which may be a branch or tag. + AliasContext alias_context = 4; + } +} + +// A GitSourceContext denotes a particular revision in a third party Git +// repository (e.g., GitHub). +message GitSourceContext { + // Git repository URL. + string url = 1; + + // Git commit hash. + string revision_id = 2; +} + +// A unique identifier for a Cloud Repo. +message RepoId { + // A cloud repo can be identified by either its project ID and repository name + // combination, or its globally unique identifier. + oneof id { + // A combination of a project ID and a repo name. + ProjectRepoId project_repo_id = 1; + + // A server-assigned, globally unique identifier. + string uid = 2; + } +} + +// Selects a repo using a Google Cloud Platform project ID (e.g., +// winged-cargo-31) and a repo name within that project. +message ProjectRepoId { + // The ID of the project. + string project_id = 1; + + // The name of the repo. Leave empty for the default repo. + string repo_name = 2; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto new file mode 100644 index 000000000000..cc9cc384535a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto @@ -0,0 +1,38 @@ +// Copyright 2021 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// Note provider assigned severity/impact ranking. +enum Severity { + // Unknown. + SEVERITY_UNSPECIFIED = 0; + // Minimal severity. + MINIMAL = 1; + // Low severity. + LOW = 2; + // Medium severity. + MEDIUM = 3; + // High severity. + HIGH = 4; + // Critical severity. + CRITICAL = 5; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto new file mode 100644 index 000000000000..c038af064e0e --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto @@ -0,0 +1,115 @@ +// Copyright 2021 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; +option java_outer_classname = "SlsaProvenanceProto"; + +message SlsaProvenance { + // Steps taken to build the artifact. + // For a TaskRun, typically each container corresponds to one step in the + // recipe. + message SlsaRecipe { + // URI indicating what type of recipe was performed. It determines the + // meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and + // materials. + string type = 1; + // Index in materials containing the recipe steps that are not implied by + // recipe.type. For example, if the recipe type were "make", then this would + // point to the source containing the Makefile, not the make program itself. + // Set to -1 if the recipe doesn't come from a material, as zero is default + // unset value for int64. + int64 defined_in_material = 2; + // String identifying the entry point into the build. + // This is often a path to a configuration file and/or a target label within + // that file. The syntax and meaning are defined by recipe.type. For + // example, if the recipe type were "make", then this would reference the + // directory in which to run make as well as which target to use. + string entry_point = 3; + // Collection of all external inputs that influenced the build on top of + // recipe.definedInMaterial and recipe.entryPoint. For example, if the + // recipe type were "make", then this might be the flags passed to make + // aside from the target, which is captured in recipe.entryPoint. Depending + // on the recipe Type, the structure may be different. + google.protobuf.Any arguments = 4; + // Any other builder-controlled inputs necessary for correctly evaluating + // the recipe. Usually only needed for reproducing the build but not + // evaluated as part of policy. Depending on the recipe Type, the structure + // may be different. + google.protobuf.Any environment = 5; + } + + // Indicates that the builder claims certain fields in this message to be + // complete. + message SlsaCompleteness { + // If true, the builder claims that recipe.arguments is complete, meaning + // that all external inputs are properly captured in the recipe. + bool arguments = 1; + // If true, the builder claims that recipe.environment is claimed to be + // complete. + bool environment = 2; + // If true, the builder claims that materials are complete, usually through + // some controls to prevent network access. Sometimes called "hermetic". + bool materials = 3; + } + + // Other properties of the build. + message SlsaMetadata { + // Identifies the particular build invocation, which can be useful for + // finding associated logs or other ad-hoc analysis. The value SHOULD be + // globally unique, per in-toto Provenance spec. + string build_invocation_id = 1; + // The timestamp of when the build started. + google.protobuf.Timestamp build_started_on = 2; + // The timestamp of when the build completed. + google.protobuf.Timestamp build_finished_on = 3; + // Indicates that the builder claims certain fields in this message to be + // complete. + SlsaCompleteness completeness = 4; + // If true, the builder claims that running the recipe on materials will + // produce bit-for-bit identical output. + bool reproducible = 5; + } + + message SlsaBuilder { + string id = 1; + } + + message Material { + string uri = 1; + map digest = 2; + } + + SlsaBuilder builder = 1; // required + // Identifies the configuration used for the build. + // When combined with materials, this SHOULD fully describe the build, + // such that re-running this recipe results in bit-for-bit identical output + // (if the build is reproducible). + SlsaRecipe recipe = 2; // required + SlsaMetadata metadata = 3; + // The collection of artifacts that influenced the build including sources, + // dependencies, build tools, base images, and so on. This is considered to be + // incomplete unless metadata.completeness.materials is true. Unset or null is + // equivalent to empty. + repeated Material materials = 4; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto new file mode 100644 index 000000000000..11cdd1c0ba59 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto @@ -0,0 +1,82 @@ +// Copyright 2021 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; +option java_outer_classname = "SlsaProvenanceZeroTwoProto"; + +message SlsaProvenanceZeroTwo { + // See full explanation of fields at slsa.dev/provenance/v0.2. + + // Identifies the entity that executed the recipe, which is trusted to have + // correctly performed the operation and populated this provenance. + message SlsaBuilder { + string id = 1; + } + + // The collection of artifacts that influenced the build including sources, + // dependencies, build tools, base images, and so on. + message SlsaMaterial { + string uri = 1; + map digest = 2; + } + + // Identifies the event that kicked off the build. + message SlsaInvocation { + SlsaConfigSource config_source = 1; + google.protobuf.Struct parameters = 2; + google.protobuf.Struct environment = 3; + } + + // Describes where the config file that kicked off the build came from. + // This is effectively a pointer to the source where buildConfig came from. + message SlsaConfigSource { + string uri = 1; + map digest = 2; + string entry_point = 3; + } + + // Other properties of the build. + message SlsaMetadata { + string build_invocation_id = 1; + google.protobuf.Timestamp build_started_on = 2; + google.protobuf.Timestamp build_finished_on = 3; + SlsaCompleteness completeness = 4; + bool reproducible = 5; + } + + // Indicates that the builder claims certain fields in this message to be + // complete. + message SlsaCompleteness { + bool parameters = 1; + bool environment = 2; + bool materials = 3; + } + + SlsaBuilder builder = 1; + string build_type = 2; + SlsaInvocation invocation = 3; + google.protobuf.Struct build_config = 4; + SlsaMetadata metadata = 5; + repeated SlsaMaterial materials = 6; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto new file mode 100644 index 000000000000..89d389299199 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto @@ -0,0 +1,114 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/protobuf/timestamp.proto"; +import "grafeas/v1/package.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// An Upgrade Note represents a potential upgrade of a package to a given +// version. For each package version combination (i.e. bash 4.0, bash 4.1, +// bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field +// represents the information related to the update. +message UpgradeNote { + // Required for non-Windows OS. The package this Upgrade is for. + string package = 1; + // Required for non-Windows OS. The version of the package in machine + human + // readable form. + grafeas.v1.Version version = 2; + // Metadata about the upgrade for each specific operating system. + repeated UpgradeDistribution distributions = 3; + // Required for Windows OS. Represents the metadata about the Windows update. + WindowsUpdate windows_update = 4; +} + +// The Upgrade Distribution represents metadata about the Upgrade for each +// operating system (CPE). Some distributions have additional metadata around +// updates, classifying them into various categories and severities. +message UpgradeDistribution { + // Required - The specific operating system this metadata applies to. See + // https://cpe.mitre.org/specification/. + string cpe_uri = 1; + // The operating system classification of this Upgrade, as specified by the + // upstream operating system upgrade feed. For Windows the classification is + // one of the category_ids listed at + // https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) + string classification = 2; + // The severity as specified by the upstream operating system. + string severity = 3; + // The cve tied to this Upgrade. + repeated string cve = 4; +} + +// Windows Update represents the metadata about the update for the Windows +// operating system. The fields in this message come from the Windows Update API +// documented at +// https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate. +message WindowsUpdate { + // The unique identifier of the update. + message Identity { + // The revision independent identifier of the update. + string update_id = 1; + // The revision number of the update. + int32 revision = 2; + } + // Required - The unique identifier for the update. + Identity identity = 1; + // The localized title of the update. + string title = 2; + // The localized description of the update. + string description = 3; + // The category to which the update belongs. + message Category { + // The identifier of the category. + string category_id = 1; + // The localized name of the category. + string name = 2; + } + // The list of categories to which the update belongs. + repeated Category categories = 4; + // The Microsoft Knowledge Base article IDs that are associated with the + // update. + repeated string kb_article_ids = 5; + // The hyperlink to the support information for the update. + string support_url = 6; + // The last published timestamp of the update. + google.protobuf.Timestamp last_published_timestamp = 7; +} + +// An Upgrade Occurrence represents that a specific resource_url could install a +// specific upgrade. This presence is supplied via local sources (i.e. it is +// present in the mirror and the running system has noticed its availability). +// For Windows, both distribution and windows_update contain information for the +// Windows update. +message UpgradeOccurrence { + // Required for non-Windows OS. The package this Upgrade is for. + string package = 1; + // Required for non-Windows OS. The version of the package in a machine + + // human readable form. + grafeas.v1.Version parsed_version = 3; + // Metadata about the upgrade for available for the specific operating system + // for the resource_url. This allows efficient filtering, as well as + // making it easier to use the occurrence. + UpgradeDistribution distribution = 4; + // Required for Windows OS. Represents the metadata about the Windows update. + WindowsUpdate windows_update = 5; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto new file mode 100644 index 000000000000..99abf3be7a23 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto @@ -0,0 +1,257 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; +import "grafeas/v1/common.proto"; +import "grafeas/v1/cvss.proto"; +import "grafeas/v1/package.proto"; +import "grafeas/v1/severity.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// A security vulnerability that can be found in resources. +message VulnerabilityNote { + // The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 + // where 0 indicates low severity and 10 indicates high severity. + float cvss_score = 1; + + // The note provider assigned severity of this vulnerability. + grafeas.v1.Severity severity = 2; + + // Details of all known distros and packages affected by this vulnerability. + repeated Detail details = 3; + + // A detail for a distro and package affected by this vulnerability and its + // associated fix (if one is available). + message Detail { + // The distro assigned severity of this vulnerability. + string severity_name = 1; + + // A vendor-specific description of this vulnerability. + string description = 2; + + // The type of package; whether native or non native (e.g., ruby gems, + // node.js packages, etc.). + string package_type = 3; + + // Required. The [CPE URI](https://cpe.mitre.org/specification/) this + // vulnerability affects. + string affected_cpe_uri = 4; + + // Required. The package this vulnerability affects. + string affected_package = 5; + + // The version number at the start of an interval in which this + // vulnerability exists. A vulnerability can affect a package between + // version numbers that are disjoint sets of intervals (example: + // [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be + // represented in its own Detail. If a specific affected version is provided + // by a vulnerability database, affected_version_start and + // affected_version_end will be the same in that Detail. + grafeas.v1.Version affected_version_start = 6; + + // The version number at the end of an interval in which this vulnerability + // exists. A vulnerability can affect a package between version numbers + // that are disjoint sets of intervals (example: [1.0.0-1.1.0], + // [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its + // own Detail. If a specific affected version is provided by a vulnerability + // database, affected_version_start and affected_version_end will be the + // same in that Detail. + grafeas.v1.Version affected_version_end = 7; + + // The distro recommended [CPE URI](https://cpe.mitre.org/specification/) + // to update to that contains a fix for this vulnerability. It is possible + // for this to be different from the affected_cpe_uri. + string fixed_cpe_uri = 8; + + // The distro recommended package to update to that contains a fix for this + // vulnerability. It is possible for this to be different from the + // affected_package. + string fixed_package = 9; + + // The distro recommended version to update to that contains a + // fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no + // such version is yet available. + grafeas.v1.Version fixed_version = 10; + + // Whether this detail is obsolete. Occurrences are expected not to point to + // obsolete details. + bool is_obsolete = 11; + + // The time this information was last changed at the source. This is an + // upstream timestamp from the underlying information source - e.g. Ubuntu + // security tracker. + google.protobuf.Timestamp source_update_time = 12; + + // The source from which the information in this Detail was obtained. + string source = 13; + + // The name of the vendor of the product. + string vendor = 14; + } + + // The full description of the CVSSv3 for this vulnerability. + CVSSv3 cvss_v3 = 4; + + // Windows details get their own format because the information format and + // model don't match a normal detail. Specifically Windows updates are done as + // patches, thus Windows vulnerabilities really are a missing package, rather + // than a package being at an incorrect version. + repeated WindowsDetail windows_details = 5; + + message WindowsDetail { + // Required. The [CPE URI](https://cpe.mitre.org/specification/) this + // vulnerability affects. + string cpe_uri = 1; + + // Required. The name of this vulnerability. + string name = 2; + + // The description of this vulnerability. + string description = 3; + + // Required. The names of the KBs which have hotfixes to mitigate this + // vulnerability. Note that there may be multiple hotfixes (and thus + // multiple KBs) that mitigate a given vulnerability. Currently any listed + // KBs presence is considered a fix. + repeated KnowledgeBase fixing_kbs = 4; + + message KnowledgeBase { + // The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). + string name = 1; + // A link to the KB in the [Windows update catalog] + // (https://www.catalog.update.microsoft.com/). + string url = 2; + } + } + + // The time this information was last changed at the source. This is an + // upstream timestamp from the underlying information source - e.g. Ubuntu + // security tracker. + google.protobuf.Timestamp source_update_time = 6; + + // CVSS version used to populate cvss_score and severity. + grafeas.v1.CVSSVersion cvss_version = 7; + + // The full description of the v2 CVSS for this vulnerability. + CVSS cvss_v2 = 8; + + // Next free ID is 9. +} + +// An occurrence of a severity vulnerability on a resource. +message VulnerabilityOccurrence { + // The type of package; whether native or non native (e.g., ruby gems, node.js + // packages, etc.). + string type = 1; + + // Output only. The note provider assigned severity of this vulnerability. + grafeas.v1.Severity severity = 2; + + // Output only. The CVSS score of this vulnerability. CVSS score is on a + // scale of 0 - 10 where 0 indicates low severity and 10 indicates high + // severity. + float cvss_score = 3; + + // The cvss v3 score for the vulnerability. + CVSS cvssv3 = 10; + + // Required. The set of affected locations and their fixes (if available) + // within the associated resource. + repeated PackageIssue package_issue = 4; + + // A detail for a distro and package this vulnerability occurrence was found + // in and its associated fix (if one is available). + message PackageIssue { + // Required. The [CPE URI](https://cpe.mitre.org/specification/) this + // vulnerability was found in. + string affected_cpe_uri = 1; + + // Required. The package this vulnerability was found in. + string affected_package = 2; + + // Required. The version of the package that is installed on the resource + // affected by this vulnerability. + grafeas.v1.Version affected_version = 3; + + // The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability + // was fixed in. It is possible for this to be different from the + // affected_cpe_uri. + string fixed_cpe_uri = 4; + + // The package this vulnerability was fixed in. It is possible for this to + // be different from the affected_package. + string fixed_package = 5; + + // Required. The version of the package this vulnerability was fixed in. + // Setting this to VersionKind.MAXIMUM means no fix is yet available. + grafeas.v1.Version fixed_version = 6; + + // Output only. Whether a fix is available for this package. + bool fix_available = 7; + + // The type of package (e.g. OS, MAVEN, GO). + string package_type = 8; + + // The distro or language system assigned severity for this vulnerability + // when that is available and note provider assigned severity when it is not + // available. + grafeas.v1.Severity effective_severity = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The location at which this package was found. + repeated FileLocation file_location = 10; + } + + // Output only. A one sentence description of this vulnerability. + string short_description = 5; + + // Output only. A detailed description of this vulnerability. + string long_description = 6; + + // Output only. URLs related to this vulnerability. + repeated grafeas.v1.RelatedUrl related_urls = 7; + + // The distro assigned severity for this vulnerability when it is available, + // otherwise this is the note provider assigned severity. + // + // When there are multiple PackageIssues for this vulnerability, they can have + // different effective severities because some might be provided by the distro + // while others are provided by the language ecosystem for a language pack. + // For this reason, it is advised to use the effective severity on the + // PackageIssue level. In the case where multiple PackageIssues have differing + // effective severities, this field should be the highest severity for any of + // the PackageIssues. + grafeas.v1.Severity effective_severity = 8; + + // Output only. Whether at least one of the affected packages has a fix + // available. + bool fix_available = 9; + + // Output only. CVSS version used to populate cvss_score and severity. + grafeas.v1.CVSSVersion cvss_version = 11; + + // The cvss v2 score for the vulnerability. + CVSS cvss_v2 = 12; + + // Next free ID is 13. +} diff --git a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java new file mode 100644 index 000000000000..e13560330bca --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java @@ -0,0 +1,1350 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class GrafeasClientTest { + private static MockGrafeas mockGrafeas; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private GrafeasClient client; + + @BeforeClass + public static void startStaticServer() { + mockGrafeas = new MockGrafeas(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockGrafeas)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + GrafeasSettings settings = + GrafeasSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = GrafeasClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getOccurrenceTest() throws Exception { + Occurrence expectedResponse = + Occurrence.newBuilder() + .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) + .setResourceUri("resourceUri1234527870") + .setNoteName("noteName1580946845") + .setKind(NoteKind.forNumber(0)) + .setRemediation("remediation779381797") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEnvelope(Envelope.newBuilder().build()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + + Occurrence actualResponse = client.getOccurrence(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOccurrenceRequest actualRequest = ((GetOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOccurrenceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + client.getOccurrence(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOccurrenceTest2() throws Exception { + Occurrence expectedResponse = + Occurrence.newBuilder() + .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) + .setResourceUri("resourceUri1234527870") + .setNoteName("noteName1580946845") + .setKind(NoteKind.forNumber(0)) + .setRemediation("remediation779381797") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEnvelope(Envelope.newBuilder().build()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + + Occurrence actualResponse = client.getOccurrence(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOccurrenceRequest actualRequest = ((GetOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOccurrenceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + client.getOccurrence(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOccurrencesTest() throws Exception { + Occurrence responsesElement = Occurrence.newBuilder().build(); + ListOccurrencesResponse expectedResponse = + ListOccurrencesResponse.newBuilder() + .setNextPageToken("") + .addAllOccurrences(Arrays.asList(responsesElement)) + .build(); + mockGrafeas.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + String filter = "filter-1274492040"; + + ListOccurrencesPagedResponse pagedListResponse = client.listOccurrences(parent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOccurrencesRequest actualRequest = ((ListOccurrencesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOccurrencesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + String filter = "filter-1274492040"; + client.listOccurrences(parent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOccurrencesTest2() throws Exception { + Occurrence responsesElement = Occurrence.newBuilder().build(); + ListOccurrencesResponse expectedResponse = + ListOccurrencesResponse.newBuilder() + .setNextPageToken("") + .addAllOccurrences(Arrays.asList(responsesElement)) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String parent = "parent-995424086"; + String filter = "filter-1274492040"; + + ListOccurrencesPagedResponse pagedListResponse = client.listOccurrences(parent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOccurrencesRequest actualRequest = ((ListOccurrencesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOccurrencesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String parent = "parent-995424086"; + String filter = "filter-1274492040"; + client.listOccurrences(parent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteOccurrenceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockGrafeas.addResponse(expectedResponse); + + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + + client.deleteOccurrence(name); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteOccurrenceRequest actualRequest = ((DeleteOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteOccurrenceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + client.deleteOccurrence(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteOccurrenceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteOccurrence(name); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteOccurrenceRequest actualRequest = ((DeleteOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteOccurrenceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + client.deleteOccurrence(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createOccurrenceTest() throws Exception { + Occurrence expectedResponse = + Occurrence.newBuilder() + .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) + .setResourceUri("resourceUri1234527870") + .setNoteName("noteName1580946845") + .setKind(NoteKind.forNumber(0)) + .setRemediation("remediation779381797") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEnvelope(Envelope.newBuilder().build()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + Occurrence occurrence = Occurrence.newBuilder().build(); + + Occurrence actualResponse = client.createOccurrence(parent, occurrence); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateOccurrenceRequest actualRequest = ((CreateOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(occurrence, actualRequest.getOccurrence()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createOccurrenceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + Occurrence occurrence = Occurrence.newBuilder().build(); + client.createOccurrence(parent, occurrence); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createOccurrenceTest2() throws Exception { + Occurrence expectedResponse = + Occurrence.newBuilder() + .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) + .setResourceUri("resourceUri1234527870") + .setNoteName("noteName1580946845") + .setKind(NoteKind.forNumber(0)) + .setRemediation("remediation779381797") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEnvelope(Envelope.newBuilder().build()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Occurrence occurrence = Occurrence.newBuilder().build(); + + Occurrence actualResponse = client.createOccurrence(parent, occurrence); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateOccurrenceRequest actualRequest = ((CreateOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(occurrence, actualRequest.getOccurrence()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createOccurrenceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String parent = "parent-995424086"; + Occurrence occurrence = Occurrence.newBuilder().build(); + client.createOccurrence(parent, occurrence); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchCreateOccurrencesTest() throws Exception { + BatchCreateOccurrencesResponse expectedResponse = + BatchCreateOccurrencesResponse.newBuilder() + .addAllOccurrences(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + List occurrences = new ArrayList<>(); + + BatchCreateOccurrencesResponse actualResponse = + client.batchCreateOccurrences(parent, occurrences); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateOccurrencesRequest actualRequest = + ((BatchCreateOccurrencesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(occurrences, actualRequest.getOccurrencesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchCreateOccurrencesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + List occurrences = new ArrayList<>(); + client.batchCreateOccurrences(parent, occurrences); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchCreateOccurrencesTest2() throws Exception { + BatchCreateOccurrencesResponse expectedResponse = + BatchCreateOccurrencesResponse.newBuilder() + .addAllOccurrences(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String parent = "parent-995424086"; + List occurrences = new ArrayList<>(); + + BatchCreateOccurrencesResponse actualResponse = + client.batchCreateOccurrences(parent, occurrences); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateOccurrencesRequest actualRequest = + ((BatchCreateOccurrencesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(occurrences, actualRequest.getOccurrencesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchCreateOccurrencesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String parent = "parent-995424086"; + List occurrences = new ArrayList<>(); + client.batchCreateOccurrences(parent, occurrences); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateOccurrenceTest() throws Exception { + Occurrence expectedResponse = + Occurrence.newBuilder() + .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) + .setResourceUri("resourceUri1234527870") + .setNoteName("noteName1580946845") + .setKind(NoteKind.forNumber(0)) + .setRemediation("remediation779381797") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEnvelope(Envelope.newBuilder().build()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + Occurrence occurrence = Occurrence.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Occurrence actualResponse = client.updateOccurrence(name, occurrence, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateOccurrenceRequest actualRequest = ((UpdateOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(occurrence, actualRequest.getOccurrence()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateOccurrenceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + Occurrence occurrence = Occurrence.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateOccurrence(name, occurrence, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateOccurrenceTest2() throws Exception { + Occurrence expectedResponse = + Occurrence.newBuilder() + .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) + .setResourceUri("resourceUri1234527870") + .setNoteName("noteName1580946845") + .setKind(NoteKind.forNumber(0)) + .setRemediation("remediation779381797") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEnvelope(Envelope.newBuilder().build()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + Occurrence occurrence = Occurrence.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Occurrence actualResponse = client.updateOccurrence(name, occurrence, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateOccurrenceRequest actualRequest = ((UpdateOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(occurrence, actualRequest.getOccurrence()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateOccurrenceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + Occurrence occurrence = Occurrence.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateOccurrence(name, occurrence, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOccurrenceNoteTest() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + + Note actualResponse = client.getOccurrenceNote(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOccurrenceNoteRequest actualRequest = ((GetOccurrenceNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOccurrenceNoteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + client.getOccurrenceNote(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOccurrenceNoteTest2() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + + Note actualResponse = client.getOccurrenceNote(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOccurrenceNoteRequest actualRequest = ((GetOccurrenceNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOccurrenceNoteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + client.getOccurrenceNote(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNoteTest() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + + Note actualResponse = client.getNote(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNoteRequest actualRequest = ((GetNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNoteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + client.getNote(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNoteTest2() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + + Note actualResponse = client.getNote(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNoteRequest actualRequest = ((GetNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNoteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + client.getNote(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotesTest() throws Exception { + Note responsesElement = Note.newBuilder().build(); + ListNotesResponse expectedResponse = + ListNotesResponse.newBuilder() + .setNextPageToken("") + .addAllNotes(Arrays.asList(responsesElement)) + .build(); + mockGrafeas.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + String filter = "filter-1274492040"; + + ListNotesPagedResponse pagedListResponse = client.listNotes(parent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotesList().get(0), resources.get(0)); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotesRequest actualRequest = ((ListNotesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + String filter = "filter-1274492040"; + client.listNotes(parent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotesTest2() throws Exception { + Note responsesElement = Note.newBuilder().build(); + ListNotesResponse expectedResponse = + ListNotesResponse.newBuilder() + .setNextPageToken("") + .addAllNotes(Arrays.asList(responsesElement)) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String parent = "parent-995424086"; + String filter = "filter-1274492040"; + + ListNotesPagedResponse pagedListResponse = client.listNotes(parent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotesList().get(0), resources.get(0)); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotesRequest actualRequest = ((ListNotesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String parent = "parent-995424086"; + String filter = "filter-1274492040"; + client.listNotes(parent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteNoteTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockGrafeas.addResponse(expectedResponse); + + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + + client.deleteNote(name); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNoteRequest actualRequest = ((DeleteNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNoteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + client.deleteNote(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteNoteTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteNote(name); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNoteRequest actualRequest = ((DeleteNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNoteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + client.deleteNote(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNoteTest() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + String noteId = "noteId-1039694675"; + Note note = Note.newBuilder().build(); + + Note actualResponse = client.createNote(parent, noteId, note); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNoteRequest actualRequest = ((CreateNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(noteId, actualRequest.getNoteId()); + Assert.assertEquals(note, actualRequest.getNote()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNoteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + String noteId = "noteId-1039694675"; + Note note = Note.newBuilder().build(); + client.createNote(parent, noteId, note); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNoteTest2() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String parent = "parent-995424086"; + String noteId = "noteId-1039694675"; + Note note = Note.newBuilder().build(); + + Note actualResponse = client.createNote(parent, noteId, note); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNoteRequest actualRequest = ((CreateNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(noteId, actualRequest.getNoteId()); + Assert.assertEquals(note, actualRequest.getNote()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNoteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String parent = "parent-995424086"; + String noteId = "noteId-1039694675"; + Note note = Note.newBuilder().build(); + client.createNote(parent, noteId, note); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchCreateNotesTest() throws Exception { + BatchCreateNotesResponse expectedResponse = + BatchCreateNotesResponse.newBuilder().addAllNotes(new ArrayList()).build(); + mockGrafeas.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + Map notes = new HashMap<>(); + + BatchCreateNotesResponse actualResponse = client.batchCreateNotes(parent, notes); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateNotesRequest actualRequest = ((BatchCreateNotesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(notes, actualRequest.getNotesMap()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchCreateNotesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + Map notes = new HashMap<>(); + client.batchCreateNotes(parent, notes); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchCreateNotesTest2() throws Exception { + BatchCreateNotesResponse expectedResponse = + BatchCreateNotesResponse.newBuilder().addAllNotes(new ArrayList()).build(); + mockGrafeas.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Map notes = new HashMap<>(); + + BatchCreateNotesResponse actualResponse = client.batchCreateNotes(parent, notes); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateNotesRequest actualRequest = ((BatchCreateNotesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(notes, actualRequest.getNotesMap()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchCreateNotesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String parent = "parent-995424086"; + Map notes = new HashMap<>(); + client.batchCreateNotes(parent, notes); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateNoteTest() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + Note note = Note.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Note actualResponse = client.updateNote(name, note, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateNoteRequest actualRequest = ((UpdateNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(note, actualRequest.getNote()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateNoteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + Note note = Note.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateNote(name, note, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateNoteTest2() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + Note note = Note.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Note actualResponse = client.updateNote(name, note, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateNoteRequest actualRequest = ((UpdateNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(note, actualRequest.getNote()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateNoteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + Note note = Note.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateNote(name, note, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNoteOccurrencesTest() throws Exception { + Occurrence responsesElement = Occurrence.newBuilder().build(); + ListNoteOccurrencesResponse expectedResponse = + ListNoteOccurrencesResponse.newBuilder() + .setNextPageToken("") + .addAllOccurrences(Arrays.asList(responsesElement)) + .build(); + mockGrafeas.addResponse(expectedResponse); + + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + String filter = "filter-1274492040"; + + ListNoteOccurrencesPagedResponse pagedListResponse = client.listNoteOccurrences(name, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNoteOccurrencesRequest actualRequest = ((ListNoteOccurrencesRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNoteOccurrencesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + String filter = "filter-1274492040"; + client.listNoteOccurrences(name, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNoteOccurrencesTest2() throws Exception { + Occurrence responsesElement = Occurrence.newBuilder().build(); + ListNoteOccurrencesResponse expectedResponse = + ListNoteOccurrencesResponse.newBuilder() + .setNextPageToken("") + .addAllOccurrences(Arrays.asList(responsesElement)) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + String filter = "filter-1274492040"; + + ListNoteOccurrencesPagedResponse pagedListResponse = client.listNoteOccurrences(name, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNoteOccurrencesRequest actualRequest = ((ListNoteOccurrencesRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNoteOccurrencesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + String filter = "filter-1274492040"; + client.listNoteOccurrences(name, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java new file mode 100644 index 000000000000..bf0f38182e4c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockGrafeas implements MockGrpcService { + private final MockGrafeasImpl serviceImpl; + + public MockGrafeas() { + serviceImpl = new MockGrafeasImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java new file mode 100644 index 000000000000..66cfa3460def --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java @@ -0,0 +1,353 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import com.google.api.core.BetaApi; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grafeas.v1.GrafeasGrpc.GrafeasImplBase; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockGrafeasImpl extends GrafeasImplBase { + private List requests; + private Queue responses; + + public MockGrafeasImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void getOccurrence( + GetOccurrenceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Occurrence) { + requests.add(request); + responseObserver.onNext(((Occurrence) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetOccurrence, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Occurrence.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listOccurrences( + ListOccurrencesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListOccurrencesResponse) { + requests.add(request); + responseObserver.onNext(((ListOccurrencesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListOccurrences, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListOccurrencesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteOccurrence( + DeleteOccurrenceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteOccurrence, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createOccurrence( + CreateOccurrenceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Occurrence) { + requests.add(request); + responseObserver.onNext(((Occurrence) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateOccurrence, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Occurrence.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchCreateOccurrences( + BatchCreateOccurrencesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchCreateOccurrencesResponse) { + requests.add(request); + responseObserver.onNext(((BatchCreateOccurrencesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchCreateOccurrences, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchCreateOccurrencesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateOccurrence( + UpdateOccurrenceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Occurrence) { + requests.add(request); + responseObserver.onNext(((Occurrence) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateOccurrence, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Occurrence.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getOccurrenceNote( + GetOccurrenceNoteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Note) { + requests.add(request); + responseObserver.onNext(((Note) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetOccurrenceNote, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Note.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getNote(GetNoteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Note) { + requests.add(request); + responseObserver.onNext(((Note) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetNote, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Note.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listNotes( + ListNotesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNotesResponse) { + requests.add(request); + responseObserver.onNext(((ListNotesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListNotes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNotesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteNote(DeleteNoteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteNote, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createNote(CreateNoteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Note) { + requests.add(request); + responseObserver.onNext(((Note) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateNote, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Note.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchCreateNotes( + BatchCreateNotesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchCreateNotesResponse) { + requests.add(request); + responseObserver.onNext(((BatchCreateNotesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchCreateNotes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchCreateNotesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateNote(UpdateNoteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Note) { + requests.add(request); + responseObserver.onNext(((Note) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateNote, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Note.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listNoteOccurrences( + ListNoteOccurrencesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNoteOccurrencesResponse) { + requests.add(request); + responseObserver.onNext(((ListNoteOccurrencesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListNoteOccurrences, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNoteOccurrencesResponse.class.getName(), + Exception.class.getName()))); + } + } +} From 729aab9bb80a6b6329afd0e0c56bbc0e223de1a6 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 2 Mar 2023 23:25:43 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- java-grafeas/README.md | 2 - .../java/io/grafeas/v1/Vulnerability.java | 84 +- .../java/io/grafeas/v1/VulnerabilityNote.java | 250 + .../v1/VulnerabilityNoteOrBuilder.java | 35 + .../grafeas/v1/VulnerabilityOccurrence.java | 250 + .../v1/VulnerabilityOccurrenceOrBuilder.java | 35 + .../main/proto/grafeas/v1/vulnerability.proto | 10 +- .../main/java/io/grafeas/v1/AliasContext.java | 866 -- .../io/grafeas/v1/AliasContextOrBuilder.java | 48 - .../main/java/io/grafeas/v1/Architecture.java | 150 - .../src/main/java/io/grafeas/v1/Artifact.java | 1047 --- .../java/io/grafeas/v1/ArtifactOrBuilder.java | 110 - .../main/java/io/grafeas/v1/Attestation.java | 91 - .../java/io/grafeas/v1/AttestationNote.java | 1279 --- .../grafeas/v1/AttestationNoteOrBuilder.java | 36 - .../io/grafeas/v1/AttestationOccurrence.java | 1658 ---- .../v1/AttestationOccurrenceOrBuilder.java | 163 - .../grafeas/v1/BatchCreateNotesRequest.java | 910 -- .../v1/BatchCreateNotesRequestOrBuilder.java | 85 - .../grafeas/v1/BatchCreateNotesResponse.java | 862 -- .../v1/BatchCreateNotesResponseOrBuilder.java | 53 - .../v1/BatchCreateOccurrencesRequest.java | 1033 --- ...atchCreateOccurrencesRequestOrBuilder.java | 75 - .../v1/BatchCreateOccurrencesResponse.java | 862 -- ...tchCreateOccurrencesResponseOrBuilder.java | 53 - .../v1/src/main/java/io/grafeas/v1/Build.java | 74 - .../main/java/io/grafeas/v1/BuildNote.java | 582 -- .../io/grafeas/v1/BuildNoteOrBuilder.java | 29 - .../java/io/grafeas/v1/BuildOccurrence.java | 1378 --- .../grafeas/v1/BuildOccurrenceOrBuilder.java | 140 - .../java/io/grafeas/v1/BuildProvenance.java | 3554 ------- .../grafeas/v1/BuildProvenanceOrBuilder.java | 388 - .../java/io/grafeas/v1/BuilderConfig.java | 544 -- .../io/grafeas/v1/BuilderConfigOrBuilder.java | 21 - .../v1/src/main/java/io/grafeas/v1/CVSS.java | 2394 ----- .../java/io/grafeas/v1/CVSSOrBuilder.java | 142 - .../main/java/io/grafeas/v1/CVSSProto.java | 128 - .../main/java/io/grafeas/v1/CVSSVersion.java | 126 - .../src/main/java/io/grafeas/v1/CVSSv3.java | 2170 ----- .../java/io/grafeas/v1/CVSSv3OrBuilder.java | 131 - .../io/grafeas/v1/CloudRepoSourceContext.java | 1186 --- .../v1/CloudRepoSourceContextOrBuilder.java | 94 - .../src/main/java/io/grafeas/v1/Command.java | 1632 ---- .../java/io/grafeas/v1/CommandOrBuilder.java | 198 - .../src/main/java/io/grafeas/v1/Common.java | 129 - .../main/java/io/grafeas/v1/Completeness.java | 679 -- .../io/grafeas/v1/CompletenessOrBuilder.java | 42 - .../main/java/io/grafeas/v1/Compliance.java | 111 - .../java/io/grafeas/v1/ComplianceNote.java | 2467 ----- .../grafeas/v1/ComplianceNoteOrBuilder.java | 160 - .../io/grafeas/v1/ComplianceOccurrence.java | 908 -- .../v1/ComplianceOccurrenceOrBuilder.java | 45 - .../java/io/grafeas/v1/ComplianceVersion.java | 931 -- .../v1/ComplianceVersionOrBuilder.java | 75 - .../java/io/grafeas/v1/CreateNoteRequest.java | 980 -- .../v1/CreateNoteRequestOrBuilder.java | 78 - .../grafeas/v1/CreateOccurrenceRequest.java | 816 -- .../v1/CreateOccurrenceRequestOrBuilder.java | 58 - .../io/grafeas/v1/DSSEAttestationNote.java | 1257 --- .../v1/DSSEAttestationNoteOrBuilder.java | 36 - .../grafeas/v1/DSSEAttestationOccurrence.java | 941 -- .../DSSEAttestationOccurrenceOrBuilder.java | 56 - .../java/io/grafeas/v1/DeleteNoteRequest.java | 587 -- .../v1/DeleteNoteRequestOrBuilder.java | 31 - .../grafeas/v1/DeleteOccurrenceRequest.java | 587 -- .../v1/DeleteOccurrenceRequestOrBuilder.java | 31 - .../main/java/io/grafeas/v1/Deployment.java | 72 - .../java/io/grafeas/v1/DeploymentNote.java | 653 -- .../grafeas/v1/DeploymentNoteOrBuilder.java | 50 - .../io/grafeas/v1/DeploymentOccurrence.java | 1900 ---- .../v1/DeploymentOccurrenceOrBuilder.java | 187 - .../src/main/java/io/grafeas/v1/Digest.java | 663 -- .../java/io/grafeas/v1/DigestOrBuilder.java | 39 - .../main/java/io/grafeas/v1/Discovery.java | 107 - .../java/io/grafeas/v1/DiscoveryNote.java | 549 -- .../io/grafeas/v1/DiscoveryNoteOrBuilder.java | 30 - .../io/grafeas/v1/DiscoveryOccurrence.java | 3178 ------- .../v1/DiscoveryOccurrenceOrBuilder.java | 218 - .../main/java/io/grafeas/v1/Distribution.java | 1439 --- .../io/grafeas/v1/DistributionOrBuilder.java | 139 - .../java/io/grafeas/v1/DsseAttestation.java | 83 - .../src/main/java/io/grafeas/v1/Envelope.java | 977 -- .../java/io/grafeas/v1/EnvelopeOrBuilder.java | 51 - .../java/io/grafeas/v1/EnvelopeSignature.java | 611 -- .../v1/EnvelopeSignatureOrBuilder.java | 27 - .../main/java/io/grafeas/v1/FileHashes.java | 864 -- .../io/grafeas/v1/FileHashesOrBuilder.java | 53 - .../main/java/io/grafeas/v1/FileLocation.java | 587 -- .../io/grafeas/v1/FileLocationOrBuilder.java | 31 - .../main/java/io/grafeas/v1/Fingerprint.java | 1009 -- .../io/grafeas/v1/FingerprintOrBuilder.java | 98 - .../io/grafeas/v1/GerritSourceContext.java | 1297 --- .../v1/GerritSourceContextOrBuilder.java | 111 - .../java/io/grafeas/v1/GetNoteRequest.java | 587 -- .../grafeas/v1/GetNoteRequestOrBuilder.java | 31 - .../grafeas/v1/GetOccurrenceNoteRequest.java | 587 -- .../v1/GetOccurrenceNoteRequestOrBuilder.java | 31 - .../io/grafeas/v1/GetOccurrenceRequest.java | 587 -- .../v1/GetOccurrenceRequestOrBuilder.java | 31 - .../java/io/grafeas/v1/GitSourceContext.java | 746 -- .../grafeas/v1/GitSourceContextOrBuilder.java | 49 - .../java/io/grafeas/v1/GrafeasClient.java | 2264 ----- .../main/java/io/grafeas/v1/GrafeasGrpc.java | 1491 --- .../java/io/grafeas/v1/GrafeasOuterClass.java | 487 - .../java/io/grafeas/v1/GrafeasSettings.java | 340 - .../v1/src/main/java/io/grafeas/v1/Hash.java | 663 -- .../java/io/grafeas/v1/HashOrBuilder.java | 39 - .../v1/src/main/java/io/grafeas/v1/Image.java | 90 - .../main/java/io/grafeas/v1/ImageNote.java | 824 -- .../io/grafeas/v1/ImageNoteOrBuilder.java | 58 - .../java/io/grafeas/v1/ImageOccurrence.java | 1398 --- .../grafeas/v1/ImageOccurrenceOrBuilder.java | 123 - .../java/io/grafeas/v1/InTotoProvenance.java | 1359 --- .../grafeas/v1/InTotoProvenanceOrBuilder.java | 140 - .../io/grafeas/v1/InTotoProvenanceProto.java | 115 - .../java/io/grafeas/v1/InTotoStatement.java | 1802 ---- .../grafeas/v1/InTotoStatementOrBuilder.java | 120 - .../io/grafeas/v1/InTotoStatementProto.java | 91 - .../v1/src/main/java/io/grafeas/v1/Jwt.java | 586 -- .../main/java/io/grafeas/v1/JwtOrBuilder.java | 33 - .../v1/src/main/java/io/grafeas/v1/Layer.java | 751 -- .../java/io/grafeas/v1/LayerOrBuilder.java | 51 - .../src/main/java/io/grafeas/v1/License.java | 772 -- .../java/io/grafeas/v1/LicenseOrBuilder.java | 57 - .../v1/ListNoteOccurrencesRequest.java | 997 -- .../ListNoteOccurrencesRequestOrBuilder.java | 81 - .../v1/ListNoteOccurrencesResponse.java | 1026 -- .../ListNoteOccurrencesResponseOrBuilder.java | 73 - .../java/io/grafeas/v1/ListNotesRequest.java | 1001 -- .../grafeas/v1/ListNotesRequestOrBuilder.java | 82 - .../java/io/grafeas/v1/ListNotesResponse.java | 1040 --- .../v1/ListNotesResponseOrBuilder.java | 77 - .../io/grafeas/v1/ListOccurrencesRequest.java | 1001 -- .../v1/ListOccurrencesRequestOrBuilder.java | 82 - .../grafeas/v1/ListOccurrencesResponse.java | 1040 --- .../v1/ListOccurrencesResponseOrBuilder.java | 77 - .../src/main/java/io/grafeas/v1/Location.java | 994 -- .../java/io/grafeas/v1/LocationOrBuilder.java | 81 - .../src/main/java/io/grafeas/v1/Metadata.java | 1380 --- .../java/io/grafeas/v1/MetadataOrBuilder.java | 128 - .../java/io/grafeas/v1/NonCompliantFile.java | 908 -- .../grafeas/v1/NonCompliantFileOrBuilder.java | 69 - .../v1/src/main/java/io/grafeas/v1/Note.java | 5068 ---------- .../src/main/java/io/grafeas/v1/NoteKind.java | 286 - .../src/main/java/io/grafeas/v1/NoteName.java | 191 - .../java/io/grafeas/v1/NoteOrBuilder.java | 536 -- .../main/java/io/grafeas/v1/Occurrence.java | 4569 --------- .../java/io/grafeas/v1/OccurrenceName.java | 192 - .../io/grafeas/v1/OccurrenceOrBuilder.java | 476 - .../src/main/java/io/grafeas/v1/Package.java | 132 - .../main/java/io/grafeas/v1/PackageNote.java | 2942 ------ .../io/grafeas/v1/PackageNoteOrBuilder.java | 308 - .../java/io/grafeas/v1/PackageOccurrence.java | 1985 ---- .../v1/PackageOccurrenceOrBuilder.java | 199 - .../main/java/io/grafeas/v1/ProjectName.java | 168 - .../java/io/grafeas/v1/ProjectRepoId.java | 746 -- .../io/grafeas/v1/ProjectRepoIdOrBuilder.java | 49 - .../main/java/io/grafeas/v1/Provenance.java | 266 - .../src/main/java/io/grafeas/v1/Recipe.java | 1954 ---- .../java/io/grafeas/v1/RecipeOrBuilder.java | 201 - .../main/java/io/grafeas/v1/RelatedUrl.java | 744 -- .../io/grafeas/v1/RelatedUrlOrBuilder.java | 49 - .../src/main/java/io/grafeas/v1/RepoId.java | 955 -- .../java/io/grafeas/v1/RepoIdOrBuilder.java | 67 - .../src/main/java/io/grafeas/v1/Severity.java | 201 - .../io/grafeas/v1/SeverityOuterClass.java | 40 - .../main/java/io/grafeas/v1/Signature.java | 812 -- .../io/grafeas/v1/SignatureOrBuilder.java | 70 - .../java/io/grafeas/v1/SlsaProvenance.java | 6801 -------------- .../grafeas/v1/SlsaProvenanceOrBuilder.java | 146 - .../io/grafeas/v1/SlsaProvenanceProto.java | 143 - .../io/grafeas/v1/SlsaProvenanceZeroTwo.java | 6962 -------------- .../v1/SlsaProvenanceZeroTwoOrBuilder.java | 105 - .../v1/SlsaProvenanceZeroTwoProto.java | 174 - .../src/main/java/io/grafeas/v1/Source.java | 1709 ---- .../java/io/grafeas/v1/SourceContext.java | 1583 ---- .../io/grafeas/v1/SourceContextOrBuilder.java | 146 - .../java/io/grafeas/v1/SourceOrBuilder.java | 196 - .../src/main/java/io/grafeas/v1/Subject.java | 900 -- .../java/io/grafeas/v1/SubjectOrBuilder.java | 90 - .../java/io/grafeas/v1/UpdateNoteRequest.java | 1045 --- .../v1/UpdateNoteRequestOrBuilder.java | 85 - .../grafeas/v1/UpdateOccurrenceRequest.java | 1045 --- .../v1/UpdateOccurrenceRequestOrBuilder.java | 85 - .../src/main/java/io/grafeas/v1/Upgrade.java | 130 - .../io/grafeas/v1/UpgradeDistribution.java | 1177 --- .../v1/UpgradeDistributionOrBuilder.java | 118 - .../main/java/io/grafeas/v1/UpgradeNote.java | 1502 --- .../io/grafeas/v1/UpgradeNoteOrBuilder.java | 130 - .../java/io/grafeas/v1/UpgradeOccurrence.java | 1311 --- .../v1/UpgradeOccurrenceOrBuilder.java | 119 - .../src/main/java/io/grafeas/v1/Version.java | 1398 --- .../java/io/grafeas/v1/VersionOrBuilder.java | 119 - .../java/io/grafeas/v1/Vulnerability.java | 171 - .../java/io/grafeas/v1/VulnerabilityNote.java | 8231 ----------------- .../v1/VulnerabilityNoteOrBuilder.java | 248 - .../grafeas/v1/VulnerabilityOccurrence.java | 5542 ----------- .../v1/VulnerabilityOccurrenceOrBuilder.java | 314 - .../java/io/grafeas/v1/WindowsUpdate.java | 3538 ------- .../io/grafeas/v1/WindowsUpdateOrBuilder.java | 212 - .../java/io/grafeas/v1/gapic_metadata.json | 60 - .../main/java/io/grafeas/v1/package-info.java | 54 - .../java/io/grafeas/v1/stub/GrafeasStub.java | 133 - .../grafeas/v1/stub/GrafeasStubSettings.java | 819 -- .../v1/stub/GrpcGrafeasCallableFactory.java | 113 - .../io/grafeas/v1/stub/GrpcGrafeasStub.java | 607 -- .../main/proto/grafeas/v1/attestation.proto | 90 - .../v1/src/main/proto/grafeas/v1/build.proto | 62 - .../v1/src/main/proto/grafeas/v1/common.proto | 150 - .../main/proto/grafeas/v1/compliance.proto | 82 - .../v1/src/main/proto/grafeas/v1/cvss.proto | 166 - .../main/proto/grafeas/v1/deployment.proto | 66 - .../src/main/proto/grafeas/v1/discovery.proto | 104 - .../proto/grafeas/v1/dsse_attestation.proto | 52 - .../src/main/proto/grafeas/v1/grafeas.proto | 544 -- .../v1/src/main/proto/grafeas/v1/image.proto | 83 - .../proto/grafeas/v1/intoto_provenance.proto | 113 - .../proto/grafeas/v1/intoto_statement.proto | 52 - .../src/main/proto/grafeas/v1/package.proto | 192 - .../main/proto/grafeas/v1/provenance.proto | 265 - .../src/main/proto/grafeas/v1/severity.proto | 38 - .../proto/grafeas/v1/slsa_provenance.proto | 115 - .../grafeas/v1/slsa_provenance_zero_two.proto | 82 - .../src/main/proto/grafeas/v1/upgrade.proto | 114 - .../main/proto/grafeas/v1/vulnerability.proto | 257 - .../java/io/grafeas/v1/GrafeasClientTest.java | 1350 --- .../test/java/io/grafeas/v1/MockGrafeas.java | 59 - .../java/io/grafeas/v1/MockGrafeasImpl.java | 353 - 228 files changed, 622 insertions(+), 151660 deletions(-) delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java diff --git a/java-grafeas/README.md b/java-grafeas/README.md index fc9b25185291..94a24aaa8ec0 100644 --- a/java-grafeas/README.md +++ b/java-grafeas/README.md @@ -14,7 +14,6 @@ Java idiomatic client for [Grafeas][product-docs]. If you are using Maven, add this to your pom.xml file: - ```xml @@ -35,7 +34,6 @@ If you are using SBT, add this to your dependencies: ```Scala libraryDependencies += "io.grafeas" % "grafeas" % "2.13.0" ``` - ## Authentication diff --git a/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java b/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java index 2f2571e9d91f..ace76866c42a 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java @@ -66,7 +66,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oogle/protobuf/timestamp.proto\032\027grafeas/" + "v1/common.proto\032\025grafeas/v1/cvss.proto\032\030" + "grafeas/v1/package.proto\032\031grafeas/v1/sev" - + "erity.proto\"\311\007\n\021VulnerabilityNote\022\022\n\ncvs" + + "erity.proto\"\354\007\n\021VulnerabilityNote\022\022\n\ncvs" + "s_score\030\001 \001(\002\022&\n\010severity\030\002 \001(\0162\024.grafea" + "s.v1.Severity\0225\n\007details\030\003 \003(\0132$.grafeas" + ".v1.VulnerabilityNote.Detail\022#\n\007cvss_v3\030" @@ -74,45 +74,47 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ails\030\005 \003(\0132+.grafeas.v1.VulnerabilityNot" + "e.WindowsDetail\0226\n\022source_update_time\030\006 " + "\001(\0132\032.google.protobuf.Timestamp\022-\n\014cvss_" - + "version\030\007 \001(\0162\027.grafeas.v1.CVSSVersion\032\255" - + "\003\n\006Detail\022\025\n\rseverity_name\030\001 \001(\t\022\023\n\013desc" - + "ription\030\002 \001(\t\022\024\n\014package_type\030\003 \001(\t\022\030\n\020a" - + "ffected_cpe_uri\030\004 \001(\t\022\030\n\020affected_packag" - + "e\030\005 \001(\t\0223\n\026affected_version_start\030\006 \001(\0132" - + "\023.grafeas.v1.Version\0221\n\024affected_version" - + "_end\030\007 \001(\0132\023.grafeas.v1.Version\022\025\n\rfixed" - + "_cpe_uri\030\010 \001(\t\022\025\n\rfixed_package\030\t \001(\t\022*\n" - + "\rfixed_version\030\n \001(\0132\023.grafeas.v1.Versio" - + "n\022\023\n\013is_obsolete\030\013 \001(\010\0226\n\022source_update_" - + "time\030\014 \001(\0132\032.google.protobuf.Timestamp\022\016" - + "\n\006source\030\r \001(\t\022\016\n\006vendor\030\016 \001(\t\032\276\001\n\rWindo" - + "wsDetail\022\017\n\007cpe_uri\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022" - + "\023\n\013description\030\003 \001(\t\022M\n\nfixing_kbs\030\004 \003(\013" - + "29.grafeas.v1.VulnerabilityNote.WindowsD" - + "etail.KnowledgeBase\032*\n\rKnowledgeBase\022\014\n\004" - + "name\030\001 \001(\t\022\013\n\003url\030\002 \001(\t\"\214\006\n\027Vulnerabilit" - + "yOccurrence\022\014\n\004type\030\001 \001(\t\022&\n\010severity\030\002 " - + "\001(\0162\024.grafeas.v1.Severity\022\022\n\ncvss_score\030" - + "\003 \001(\002\022 \n\006cvssv3\030\n \001(\0132\020.grafeas.v1.CVSS\022" - + "G\n\rpackage_issue\030\004 \003(\01320.grafeas.v1.Vuln" - + "erabilityOccurrence.PackageIssue\022\031\n\021shor" - + "t_description\030\005 \001(\t\022\030\n\020long_description\030" - + "\006 \001(\t\022,\n\014related_urls\030\007 \003(\0132\026.grafeas.v1" - + ".RelatedUrl\0220\n\022effective_severity\030\010 \001(\0162" - + "\024.grafeas.v1.Severity\022\025\n\rfix_available\030\t" - + " \001(\010\022-\n\014cvss_version\030\013 \001(\0162\027.grafeas.v1." - + "CVSSVersion\032\340\002\n\014PackageIssue\022\030\n\020affected" - + "_cpe_uri\030\001 \001(\t\022\030\n\020affected_package\030\002 \001(\t" - + "\022-\n\020affected_version\030\003 \001(\0132\023.grafeas.v1." - + "Version\022\025\n\rfixed_cpe_uri\030\004 \001(\t\022\025\n\rfixed_" - + "package\030\005 \001(\t\022*\n\rfixed_version\030\006 \001(\0132\023.g" - + "rafeas.v1.Version\022\025\n\rfix_available\030\007 \001(\010" - + "\022\024\n\014package_type\030\010 \001(\t\0225\n\022effective_seve" - + "rity\030\t \001(\0162\024.grafeas.v1.SeverityB\003\340A\003\022/\n" - + "\rfile_location\030\n \003(\0132\030.grafeas.v1.FileLo" - + "cationBQ\n\rio.grafeas.v1P\001Z8google.golang" - + ".org/genproto/googleapis/grafeas/v1;graf" - + "eas\242\002\003GRAb\006proto3" + + "version\030\007 \001(\0162\027.grafeas.v1.CVSSVersion\022!" + + "\n\007cvss_v2\030\010 \001(\0132\020.grafeas.v1.CVSS\032\255\003\n\006De" + + "tail\022\025\n\rseverity_name\030\001 \001(\t\022\023\n\013descripti" + + "on\030\002 \001(\t\022\024\n\014package_type\030\003 \001(\t\022\030\n\020affect" + + "ed_cpe_uri\030\004 \001(\t\022\030\n\020affected_package\030\005 \001" + + "(\t\0223\n\026affected_version_start\030\006 \001(\0132\023.gra" + + "feas.v1.Version\0221\n\024affected_version_end\030" + + "\007 \001(\0132\023.grafeas.v1.Version\022\025\n\rfixed_cpe_" + + "uri\030\010 \001(\t\022\025\n\rfixed_package\030\t \001(\t\022*\n\rfixe" + + "d_version\030\n \001(\0132\023.grafeas.v1.Version\022\023\n\013" + + "is_obsolete\030\013 \001(\010\0226\n\022source_update_time\030" + + "\014 \001(\0132\032.google.protobuf.Timestamp\022\016\n\006sou" + + "rce\030\r \001(\t\022\016\n\006vendor\030\016 \001(\t\032\276\001\n\rWindowsDet" + + "ail\022\017\n\007cpe_uri\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\023\n\013de" + + "scription\030\003 \001(\t\022M\n\nfixing_kbs\030\004 \003(\01329.gr" + + "afeas.v1.VulnerabilityNote.WindowsDetail" + + ".KnowledgeBase\032*\n\rKnowledgeBase\022\014\n\004name\030" + + "\001 \001(\t\022\013\n\003url\030\002 \001(\t\"\257\006\n\027VulnerabilityOccu" + + "rrence\022\014\n\004type\030\001 \001(\t\022&\n\010severity\030\002 \001(\0162\024" + + ".grafeas.v1.Severity\022\022\n\ncvss_score\030\003 \001(\002" + + "\022 \n\006cvssv3\030\n \001(\0132\020.grafeas.v1.CVSS\022G\n\rpa" + + "ckage_issue\030\004 \003(\01320.grafeas.v1.Vulnerabi" + + "lityOccurrence.PackageIssue\022\031\n\021short_des" + + "cription\030\005 \001(\t\022\030\n\020long_description\030\006 \001(\t" + + "\022,\n\014related_urls\030\007 \003(\0132\026.grafeas.v1.Rela" + + "tedUrl\0220\n\022effective_severity\030\010 \001(\0162\024.gra" + + "feas.v1.Severity\022\025\n\rfix_available\030\t \001(\010\022" + + "-\n\014cvss_version\030\013 \001(\0162\027.grafeas.v1.CVSSV" + + "ersion\022!\n\007cvss_v2\030\014 \001(\0132\020.grafeas.v1.CVS" + + "S\032\340\002\n\014PackageIssue\022\030\n\020affected_cpe_uri\030\001" + + " \001(\t\022\030\n\020affected_package\030\002 \001(\t\022-\n\020affect" + + "ed_version\030\003 \001(\0132\023.grafeas.v1.Version\022\025\n" + + "\rfixed_cpe_uri\030\004 \001(\t\022\025\n\rfixed_package\030\005 " + + "\001(\t\022*\n\rfixed_version\030\006 \001(\0132\023.grafeas.v1." + + "Version\022\025\n\rfix_available\030\007 \001(\010\022\024\n\014packag" + + "e_type\030\010 \001(\t\0225\n\022effective_severity\030\t \001(\016" + + "2\024.grafeas.v1.SeverityB\003\340A\003\022/\n\rfile_loca" + + "tion\030\n \003(\0132\030.grafeas.v1.FileLocationBQ\n\r" + + "io.grafeas.v1P\001Z8google.golang.org/genpr" + + "oto/googleapis/grafeas/v1;grafeas\242\002\003GRAb" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -138,6 +140,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WindowsDetails", "SourceUpdateTime", "CvssVersion", + "CvssV2", }); internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor = internal_static_grafeas_v1_VulnerabilityNote_descriptor.getNestedTypes().get(0); @@ -195,6 +198,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EffectiveSeverity", "FixAvailable", "CvssVersion", + "CvssV2", }); internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor = internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor.getNestedTypes().get(0); diff --git a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNote.java b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNote.java index 5cd7cd2dbcee..a2a528aaa593 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNote.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNote.java @@ -6901,6 +6901,52 @@ public io.grafeas.v1.CVSSVersion getCvssVersion() { return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; } + public static final int CVSS_V2_FIELD_NUMBER = 8; + private io.grafeas.v1.CVSS cvssV2_; + /** + * + * + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * + * @return Whether the cvssV2 field is set. + */ + @java.lang.Override + public boolean hasCvssV2() { + return cvssV2_ != null; + } + /** + * + * + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * + * @return The cvssV2. + */ + @java.lang.Override + public io.grafeas.v1.CVSS getCvssV2() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + /** + * + * + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + @java.lang.Override + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -6936,6 +6982,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { output.writeEnum(7, cvssVersion_); } + if (cvssV2_ != null) { + output.writeMessage(8, getCvssV2()); + } getUnknownFields().writeTo(output); } @@ -6966,6 +7015,9 @@ public int getSerializedSize() { if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, cvssVersion_); } + if (cvssV2_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCvssV2()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -6995,6 +7047,10 @@ public boolean equals(final java.lang.Object obj) { if (!getSourceUpdateTime().equals(other.getSourceUpdateTime())) return false; } if (cvssVersion_ != other.cvssVersion_) return false; + if (hasCvssV2() != other.hasCvssV2()) return false; + if (hasCvssV2()) { + if (!getCvssV2().equals(other.getCvssV2())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7028,6 +7084,10 @@ public int hashCode() { } hash = (37 * hash) + CVSS_VERSION_FIELD_NUMBER; hash = (53 * hash) + cvssVersion_; + if (hasCvssV2()) { + hash = (37 * hash) + CVSS_V2_FIELD_NUMBER; + hash = (53 * hash) + getCvssV2().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -7191,6 +7251,11 @@ public Builder clear() { sourceUpdateTimeBuilder_ = null; } cvssVersion_ = 0; + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } return this; } @@ -7263,6 +7328,9 @@ private void buildPartial0(io.grafeas.v1.VulnerabilityNote result) { if (((from_bitField0_ & 0x00000040) != 0)) { result.cvssVersion_ = cvssVersion_; } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.cvssV2_ = cvssV2Builder_ == null ? cvssV2_ : cvssV2Builder_.build(); + } } @java.lang.Override @@ -7379,6 +7447,9 @@ public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote other) { if (other.cvssVersion_ != 0) { setCvssVersionValue(other.getCvssVersionValue()); } + if (other.hasCvssV2()) { + mergeCvssV2(other.getCvssV2()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -7462,6 +7533,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000040; break; } // case 56 + case 66: + { + input.readMessage(getCvssV2FieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -8850,6 +8927,179 @@ public Builder clearCvssVersion() { return this; } + private io.grafeas.v1.CVSS cvssV2_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> + cvssV2Builder_; + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * + * @return Whether the cvssV2 field is set. + */ + public boolean hasCvssV2() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * + * @return The cvssV2. + */ + public io.grafeas.v1.CVSS getCvssV2() { + if (cvssV2Builder_ == null) { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } else { + return cvssV2Builder_.getMessage(); + } + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder setCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cvssV2_ = value; + } else { + cvssV2Builder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder setCvssV2(io.grafeas.v1.CVSS.Builder builderForValue) { + if (cvssV2Builder_ == null) { + cvssV2_ = builderForValue.build(); + } else { + cvssV2Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder mergeCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && cvssV2_ != null + && cvssV2_ != io.grafeas.v1.CVSS.getDefaultInstance()) { + getCvssV2Builder().mergeFrom(value); + } else { + cvssV2_ = value; + } + } else { + cvssV2Builder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder clearCvssV2() { + bitField0_ = (bitField0_ & ~0x00000080); + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public io.grafeas.v1.CVSS.Builder getCvssV2Builder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCvssV2FieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + if (cvssV2Builder_ != null) { + return cvssV2Builder_.getMessageOrBuilder(); + } else { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> + getCvssV2FieldBuilder() { + if (cvssV2Builder_ == null) { + cvssV2Builder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( + getCvssV2(), getParentForChildren(), isClean()); + cvssV2_ = null; + } + return cvssV2Builder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java index b8f01eba3129..7433f546f771 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java @@ -282,4 +282,39 @@ public interface VulnerabilityNoteOrBuilder * @return The cvssVersion. */ io.grafeas.v1.CVSSVersion getCvssVersion(); + + /** + * + * + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * + * @return Whether the cvssV2 field is set. + */ + boolean hasCvssV2(); + /** + * + * + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * + * @return The cvssV2. + */ + io.grafeas.v1.CVSS getCvssV2(); + /** + * + * + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder(); } diff --git a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java index 623f620cf8c4..9ecfc24ee89f 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java @@ -3565,6 +3565,52 @@ public io.grafeas.v1.CVSSVersion getCvssVersion() { return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; } + public static final int CVSS_V2_FIELD_NUMBER = 12; + private io.grafeas.v1.CVSS cvssV2_; + /** + * + * + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * + * @return Whether the cvssV2 field is set. + */ + @java.lang.Override + public boolean hasCvssV2() { + return cvssV2_ != null; + } + /** + * + * + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * + * @return The cvssV2. + */ + @java.lang.Override + public io.grafeas.v1.CVSS getCvssV2() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + /** + * + * + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + @java.lang.Override + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3612,6 +3658,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { output.writeEnum(11, cvssVersion_); } + if (cvssV2_ != null) { + output.writeMessage(12, getCvssV2()); + } getUnknownFields().writeTo(output); } @@ -3654,6 +3703,9 @@ public int getSerializedSize() { if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, cvssVersion_); } + if (cvssV2_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getCvssV2()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3684,6 +3736,10 @@ public boolean equals(final java.lang.Object obj) { if (effectiveSeverity_ != other.effectiveSeverity_) return false; if (getFixAvailable() != other.getFixAvailable()) return false; if (cvssVersion_ != other.cvssVersion_) return false; + if (hasCvssV2() != other.hasCvssV2()) return false; + if (hasCvssV2()) { + if (!getCvssV2().equals(other.getCvssV2())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3723,6 +3779,10 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFixAvailable()); hash = (37 * hash) + CVSS_VERSION_FIELD_NUMBER; hash = (53 * hash) + cvssVersion_; + if (hasCvssV2()) { + hash = (37 * hash) + CVSS_V2_FIELD_NUMBER; + hash = (53 * hash) + getCvssV2().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -3888,6 +3948,11 @@ public Builder clear() { effectiveSeverity_ = 0; fixAvailable_ = false; cvssVersion_ = 0; + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } return this; } @@ -3973,6 +4038,9 @@ private void buildPartial0(io.grafeas.v1.VulnerabilityOccurrence result) { if (((from_bitField0_ & 0x00000400) != 0)) { result.cvssVersion_ = cvssVersion_; } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.cvssV2_ = cvssV2Builder_ == null ? cvssV2_ : cvssV2Builder_.build(); + } } @java.lang.Override @@ -4107,6 +4175,9 @@ public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence other) { if (other.cvssVersion_ != 0) { setCvssVersionValue(other.getCvssVersionValue()); } + if (other.hasCvssV2()) { + mergeCvssV2(other.getCvssV2()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -4213,6 +4284,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000400; break; } // case 88 + case 98: + { + input.readMessage(getCvssV2FieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 98 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5872,6 +5949,179 @@ public Builder clearCvssVersion() { return this; } + private io.grafeas.v1.CVSS cvssV2_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> + cvssV2Builder_; + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * + * @return Whether the cvssV2 field is set. + */ + public boolean hasCvssV2() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * + * @return The cvssV2. + */ + public io.grafeas.v1.CVSS getCvssV2() { + if (cvssV2Builder_ == null) { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } else { + return cvssV2Builder_.getMessage(); + } + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder setCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cvssV2_ = value; + } else { + cvssV2Builder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder setCvssV2(io.grafeas.v1.CVSS.Builder builderForValue) { + if (cvssV2Builder_ == null) { + cvssV2_ = builderForValue.build(); + } else { + cvssV2Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder mergeCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && cvssV2_ != null + && cvssV2_ != io.grafeas.v1.CVSS.getDefaultInstance()) { + getCvssV2Builder().mergeFrom(value); + } else { + cvssV2_ = value; + } + } else { + cvssV2Builder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder clearCvssV2() { + bitField0_ = (bitField0_ & ~0x00000800); + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public io.grafeas.v1.CVSS.Builder getCvssV2Builder() { + bitField0_ |= 0x00000800; + onChanged(); + return getCvssV2FieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + if (cvssV2Builder_ != null) { + return cvssV2Builder_.getMessageOrBuilder(); + } else { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> + getCvssV2FieldBuilder() { + if (cvssV2Builder_ == null) { + cvssV2Builder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( + getCvssV2(), getParentForChildren(), isClean()); + cvssV2_ = null; + } + return cvssV2Builder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java index db22aee8bdbf..307f94b67cdf 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java @@ -363,4 +363,39 @@ public interface VulnerabilityOccurrenceOrBuilder * @return The cvssVersion. */ io.grafeas.v1.CVSSVersion getCvssVersion(); + + /** + * + * + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * + * @return Whether the cvssV2 field is set. + */ + boolean hasCvssV2(); + /** + * + * + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * + * @return The cvssV2. + */ + io.grafeas.v1.CVSS getCvssV2(); + /** + * + * + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder(); } diff --git a/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto b/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto index cea4558b1445..99abf3be7a23 100644 --- a/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto +++ b/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto @@ -152,7 +152,10 @@ message VulnerabilityNote { // CVSS version used to populate cvss_score and severity. grafeas.v1.CVSSVersion cvss_version = 7; - // Next free ID is 8. + // The full description of the v2 CVSS for this vulnerability. + CVSS cvss_v2 = 8; + + // Next free ID is 9. } // An occurrence of a severity vulnerability on a resource. @@ -247,5 +250,8 @@ message VulnerabilityOccurrence { // Output only. CVSS version used to populate cvss_score and severity. grafeas.v1.CVSSVersion cvss_version = 11; - // Next free ID is 12. + // The cvss v2 score for the vulnerability. + CVSS cvss_v2 = 12; + + // Next free ID is 13. } diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java deleted file mode 100644 index 12e573038b9c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java +++ /dev/null @@ -1,866 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * An alias to a repo revision.
- * 
- * - * Protobuf type {@code grafeas.v1.AliasContext} - */ -public final class AliasContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.AliasContext) - AliasContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use AliasContext.newBuilder() to construct. - private AliasContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AliasContext() { - kind_ = 0; - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AliasContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AliasContext.class, io.grafeas.v1.AliasContext.Builder.class); - } - - /** - *
-   * The type of an alias.
-   * 
- * - * Protobuf enum {@code grafeas.v1.AliasContext.Kind} - */ - public enum Kind - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown.
-     * 
- * - * KIND_UNSPECIFIED = 0; - */ - KIND_UNSPECIFIED(0), - /** - *
-     * Git tag.
-     * 
- * - * FIXED = 1; - */ - FIXED(1), - /** - *
-     * Git branch.
-     * 
- * - * MOVABLE = 2; - */ - MOVABLE(2), - /** - *
-     * Used to specify non-standard aliases. For example, if a Git repo has a
-     * ref named "refs/foo/bar".
-     * 
- * - * OTHER = 4; - */ - OTHER(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unknown.
-     * 
- * - * KIND_UNSPECIFIED = 0; - */ - public static final int KIND_UNSPECIFIED_VALUE = 0; - /** - *
-     * Git tag.
-     * 
- * - * FIXED = 1; - */ - public static final int FIXED_VALUE = 1; - /** - *
-     * Git branch.
-     * 
- * - * MOVABLE = 2; - */ - public static final int MOVABLE_VALUE = 2; - /** - *
-     * Used to specify non-standard aliases. For example, if a Git repo has a
-     * ref named "refs/foo/bar".
-     * 
- * - * OTHER = 4; - */ - public static final int OTHER_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Kind valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Kind forNumber(int value) { - switch (value) { - case 0: return KIND_UNSPECIFIED; - case 1: return FIXED; - case 2: return MOVABLE; - case 4: return OTHER; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Kind> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Kind findValueByNumber(int number) { - return Kind.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.AliasContext.getDescriptor().getEnumTypes().get(0); - } - - private static final Kind[] VALUES = values(); - - public static Kind valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Kind(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.AliasContext.Kind) - } - - public static final int KIND_FIELD_NUMBER = 1; - private int kind_ = 0; - /** - *
-   * The alias kind.
-   * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-   * The alias kind.
-   * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @return The kind. - */ - @java.lang.Override public io.grafeas.v1.AliasContext.Kind getKind() { - io.grafeas.v1.AliasContext.Kind result = io.grafeas.v1.AliasContext.Kind.forNumber(kind_); - return result == null ? io.grafeas.v1.AliasContext.Kind.UNRECOGNIZED : result; - } - - public static final int NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The alias name.
-   * 
- * - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The alias name.
-   * 
- * - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kind_ != io.grafeas.v1.AliasContext.Kind.KIND_UNSPECIFIED.getNumber()) { - output.writeEnum(1, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kind_ != io.grafeas.v1.AliasContext.Kind.KIND_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.AliasContext)) { - return super.equals(obj); - } - io.grafeas.v1.AliasContext other = (io.grafeas.v1.AliasContext) obj; - - if (kind_ != other.kind_) return false; - if (!getName() - .equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + KIND_FIELD_NUMBER; - hash = (53 * hash) + kind_; - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.AliasContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AliasContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AliasContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AliasContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AliasContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AliasContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AliasContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AliasContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AliasContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.AliasContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AliasContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AliasContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.AliasContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An alias to a repo revision.
-   * 
- * - * Protobuf type {@code grafeas.v1.AliasContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.AliasContext) - io.grafeas.v1.AliasContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AliasContext.class, io.grafeas.v1.AliasContext.Builder.class); - } - - // Construct using io.grafeas.v1.AliasContext.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - kind_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.AliasContext getDefaultInstanceForType() { - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.AliasContext build() { - io.grafeas.v1.AliasContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.AliasContext buildPartial() { - io.grafeas.v1.AliasContext result = new io.grafeas.v1.AliasContext(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.AliasContext result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.kind_ = kind_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.AliasContext) { - return mergeFrom((io.grafeas.v1.AliasContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.AliasContext other) { - if (other == io.grafeas.v1.AliasContext.getDefaultInstance()) return this; - if (other.kind_ != 0) { - setKindValue(other.getKindValue()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - kind_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int kind_ = 0; - /** - *
-     * The alias kind.
-     * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-     * The alias kind.
-     * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @param value The enum numeric value on the wire for kind to set. - * @return This builder for chaining. - */ - public Builder setKindValue(int value) { - kind_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The alias kind.
-     * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @return The kind. - */ - @java.lang.Override - public io.grafeas.v1.AliasContext.Kind getKind() { - io.grafeas.v1.AliasContext.Kind result = io.grafeas.v1.AliasContext.Kind.forNumber(kind_); - return result == null ? io.grafeas.v1.AliasContext.Kind.UNRECOGNIZED : result; - } - /** - *
-     * The alias kind.
-     * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @param value The kind to set. - * @return This builder for chaining. - */ - public Builder setKind(io.grafeas.v1.AliasContext.Kind value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - kind_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The alias kind.
-     * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @return This builder for chaining. - */ - public Builder clearKind() { - bitField0_ = (bitField0_ & ~0x00000001); - kind_ = 0; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * The alias name.
-     * 
- * - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The alias name.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The alias name.
-     * 
- * - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The alias name.
-     * 
- * - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The alias name.
-     * 
- * - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.AliasContext) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.AliasContext) - private static final io.grafeas.v1.AliasContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.AliasContext(); - } - - public static io.grafeas.v1.AliasContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AliasContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.AliasContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java deleted file mode 100644 index 18b16f1a420a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface AliasContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.AliasContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The alias kind.
-   * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @return The enum numeric value on the wire for kind. - */ - int getKindValue(); - /** - *
-   * The alias kind.
-   * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @return The kind. - */ - io.grafeas.v1.AliasContext.Kind getKind(); - - /** - *
-   * The alias name.
-   * 
- * - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The alias name.
-   * 
- * - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java deleted file mode 100644 index 740aa9f3ebd0..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java +++ /dev/null @@ -1,150 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -/** - *
- * Instruction set architectures supported by various package managers.
- * 
- * - * Protobuf enum {@code grafeas.v1.Architecture} - */ -public enum Architecture - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unknown architecture.
-   * 
- * - * ARCHITECTURE_UNSPECIFIED = 0; - */ - ARCHITECTURE_UNSPECIFIED(0), - /** - *
-   * X86 architecture.
-   * 
- * - * X86 = 1; - */ - X86(1), - /** - *
-   * X64 architecture.
-   * 
- * - * X64 = 2; - */ - X64(2), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unknown architecture.
-   * 
- * - * ARCHITECTURE_UNSPECIFIED = 0; - */ - public static final int ARCHITECTURE_UNSPECIFIED_VALUE = 0; - /** - *
-   * X86 architecture.
-   * 
- * - * X86 = 1; - */ - public static final int X86_VALUE = 1; - /** - *
-   * X64 architecture.
-   * 
- * - * X64 = 2; - */ - public static final int X64_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Architecture valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Architecture forNumber(int value) { - switch (value) { - case 0: return ARCHITECTURE_UNSPECIFIED; - case 1: return X86; - case 2: return X64; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Architecture> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Architecture findValueByNumber(int number) { - return Architecture.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.Package.getDescriptor().getEnumTypes().get(0); - } - - private static final Architecture[] VALUES = values(); - - public static Architecture valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Architecture(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.Architecture) -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java deleted file mode 100644 index f1fec349b1e6..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java +++ /dev/null @@ -1,1047 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * Artifact describes a build product.
- * 
- * - * Protobuf type {@code grafeas.v1.Artifact} - */ -public final class Artifact extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Artifact) - ArtifactOrBuilder { -private static final long serialVersionUID = 0L; - // Use Artifact.newBuilder() to construct. - private Artifact(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Artifact() { - checksum_ = ""; - id_ = ""; - names_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Artifact(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Artifact.class, io.grafeas.v1.Artifact.Builder.class); - } - - public static final int CHECKSUM_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object checksum_ = ""; - /** - *
-   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-   * container.
-   * 
- * - * string checksum = 1; - * @return The checksum. - */ - @java.lang.Override - public java.lang.String getChecksum() { - java.lang.Object ref = checksum_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - checksum_ = s; - return s; - } - } - /** - *
-   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-   * container.
-   * 
- * - * string checksum = 1; - * @return The bytes for checksum. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getChecksumBytes() { - java.lang.Object ref = checksum_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - checksum_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * Artifact ID, if any; for container images, this will be a URL by digest
-   * like `gcr.io/projectID/imagename@sha256:123456`.
-   * 
- * - * string id = 2; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * Artifact ID, if any; for container images, this will be a URL by digest
-   * like `gcr.io/projectID/imagename@sha256:123456`.
-   * 
- * - * string id = 2; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAMES_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList names_; - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @return A list containing the names. - */ - public com.google.protobuf.ProtocolStringList - getNamesList() { - return names_; - } - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @return The count of names. - */ - public int getNamesCount() { - return names_.size(); - } - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @param index The index of the element to return. - * @return The names at the given index. - */ - public java.lang.String getNames(int index) { - return names_.get(index); - } - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @param index The index of the value to return. - * @return The bytes of the names at the given index. - */ - public com.google.protobuf.ByteString - getNamesBytes(int index) { - return names_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(checksum_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, checksum_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); - } - for (int i = 0; i < names_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, names_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(checksum_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, checksum_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); - } - { - int dataSize = 0; - for (int i = 0; i < names_.size(); i++) { - dataSize += computeStringSizeNoTag(names_.getRaw(i)); - } - size += dataSize; - size += 1 * getNamesList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Artifact)) { - return super.equals(obj); - } - io.grafeas.v1.Artifact other = (io.grafeas.v1.Artifact) obj; - - if (!getChecksum() - .equals(other.getChecksum())) return false; - if (!getId() - .equals(other.getId())) return false; - if (!getNamesList() - .equals(other.getNamesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CHECKSUM_FIELD_NUMBER; - hash = (53 * hash) + getChecksum().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (getNamesCount() > 0) { - hash = (37 * hash) + NAMES_FIELD_NUMBER; - hash = (53 * hash) + getNamesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Artifact parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Artifact parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Artifact parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Artifact parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Artifact parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Artifact parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Artifact parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Artifact parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Artifact parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Artifact parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Artifact parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Artifact parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Artifact prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Artifact describes a build product.
-   * 
- * - * Protobuf type {@code grafeas.v1.Artifact} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Artifact) - io.grafeas.v1.ArtifactOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Artifact.class, io.grafeas.v1.Artifact.Builder.class); - } - - // Construct using io.grafeas.v1.Artifact.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - checksum_ = ""; - id_ = ""; - names_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Artifact getDefaultInstanceForType() { - return io.grafeas.v1.Artifact.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Artifact build() { - io.grafeas.v1.Artifact result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Artifact buildPartial() { - io.grafeas.v1.Artifact result = new io.grafeas.v1.Artifact(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.Artifact result) { - if (((bitField0_ & 0x00000004) != 0)) { - names_ = names_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.names_ = names_; - } - - private void buildPartial0(io.grafeas.v1.Artifact result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.checksum_ = checksum_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Artifact) { - return mergeFrom((io.grafeas.v1.Artifact)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Artifact other) { - if (other == io.grafeas.v1.Artifact.getDefaultInstance()) return this; - if (!other.getChecksum().isEmpty()) { - checksum_ = other.checksum_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.names_.isEmpty()) { - if (names_.isEmpty()) { - names_ = other.names_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureNamesIsMutable(); - names_.addAll(other.names_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - checksum_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - ensureNamesIsMutable(); - names_.add(s); - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object checksum_ = ""; - /** - *
-     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-     * container.
-     * 
- * - * string checksum = 1; - * @return The checksum. - */ - public java.lang.String getChecksum() { - java.lang.Object ref = checksum_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - checksum_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-     * container.
-     * 
- * - * string checksum = 1; - * @return The bytes for checksum. - */ - public com.google.protobuf.ByteString - getChecksumBytes() { - java.lang.Object ref = checksum_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - checksum_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-     * container.
-     * 
- * - * string checksum = 1; - * @param value The checksum to set. - * @return This builder for chaining. - */ - public Builder setChecksum( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - checksum_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-     * container.
-     * 
- * - * string checksum = 1; - * @return This builder for chaining. - */ - public Builder clearChecksum() { - checksum_ = getDefaultInstance().getChecksum(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-     * container.
-     * 
- * - * string checksum = 1; - * @param value The bytes for checksum to set. - * @return This builder for chaining. - */ - public Builder setChecksumBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - checksum_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object id_ = ""; - /** - *
-     * Artifact ID, if any; for container images, this will be a URL by digest
-     * like `gcr.io/projectID/imagename@sha256:123456`.
-     * 
- * - * string id = 2; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Artifact ID, if any; for container images, this will be a URL by digest
-     * like `gcr.io/projectID/imagename@sha256:123456`.
-     * 
- * - * string id = 2; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Artifact ID, if any; for container images, this will be a URL by digest
-     * like `gcr.io/projectID/imagename@sha256:123456`.
-     * 
- * - * string id = 2; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Artifact ID, if any; for container images, this will be a URL by digest
-     * like `gcr.io/projectID/imagename@sha256:123456`.
-     * 
- * - * string id = 2; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Artifact ID, if any; for container images, this will be a URL by digest
-     * like `gcr.io/projectID/imagename@sha256:123456`.
-     * 
- * - * string id = 2; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList names_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureNamesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - names_ = new com.google.protobuf.LazyStringArrayList(names_); - bitField0_ |= 0x00000004; - } - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @return A list containing the names. - */ - public com.google.protobuf.ProtocolStringList - getNamesList() { - return names_.getUnmodifiableView(); - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @return The count of names. - */ - public int getNamesCount() { - return names_.size(); - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @param index The index of the element to return. - * @return The names at the given index. - */ - public java.lang.String getNames(int index) { - return names_.get(index); - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @param index The index of the value to return. - * @return The bytes of the names at the given index. - */ - public com.google.protobuf.ByteString - getNamesBytes(int index) { - return names_.getByteString(index); - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @param index The index to set the value at. - * @param value The names to set. - * @return This builder for chaining. - */ - public Builder setNames( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureNamesIsMutable(); - names_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @param value The names to add. - * @return This builder for chaining. - */ - public Builder addNames( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureNamesIsMutable(); - names_.add(value); - onChanged(); - return this; - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @param values The names to add. - * @return This builder for chaining. - */ - public Builder addAllNames( - java.lang.Iterable values) { - ensureNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, names_); - onChanged(); - return this; - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @return This builder for chaining. - */ - public Builder clearNames() { - names_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @param value The bytes of the names to add. - * @return This builder for chaining. - */ - public Builder addNamesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureNamesIsMutable(); - names_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Artifact) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Artifact) - private static final io.grafeas.v1.Artifact DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Artifact(); - } - - public static io.grafeas.v1.Artifact getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Artifact parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Artifact getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java deleted file mode 100644 index c60add69d210..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface ArtifactOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Artifact) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-   * container.
-   * 
- * - * string checksum = 1; - * @return The checksum. - */ - java.lang.String getChecksum(); - /** - *
-   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-   * container.
-   * 
- * - * string checksum = 1; - * @return The bytes for checksum. - */ - com.google.protobuf.ByteString - getChecksumBytes(); - - /** - *
-   * Artifact ID, if any; for container images, this will be a URL by digest
-   * like `gcr.io/projectID/imagename@sha256:123456`.
-   * 
- * - * string id = 2; - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * Artifact ID, if any; for container images, this will be a URL by digest
-   * like `gcr.io/projectID/imagename@sha256:123456`.
-   * 
- * - * string id = 2; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @return A list containing the names. - */ - java.util.List - getNamesList(); - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @return The count of names. - */ - int getNamesCount(); - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @param index The index of the element to return. - * @return The names at the given index. - */ - java.lang.String getNames(int index); - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @param index The index of the value to return. - * @return The bytes of the names at the given index. - */ - com.google.protobuf.ByteString - getNamesBytes(int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java deleted file mode 100644 index ba5a83c6bff3..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/attestation.proto - -package io.grafeas.v1; - -public final class Attestation { - private Attestation() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_AttestationNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_AttestationNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_AttestationNote_Hint_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Jwt_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Jwt_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_AttestationOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\034grafeas/v1/attestation.proto\022\ngrafeas." + - "v1\032\027grafeas/v1/common.proto\"f\n\017Attestati" + - "onNote\022.\n\004hint\030\001 \001(\0132 .grafeas.v1.Attest" + - "ationNote.Hint\032#\n\004Hint\022\033\n\023human_readable" + - "_name\030\001 \001(\t\"\032\n\003Jwt\022\023\n\013compact_jwt\030\001 \001(\t\"" + - "}\n\025AttestationOccurrence\022\032\n\022serialized_p" + - "ayload\030\001 \001(\014\022)\n\nsignatures\030\002 \003(\0132\025.grafe" + - "as.v1.Signature\022\035\n\004jwts\030\003 \003(\0132\017.grafeas." + - "v1.JwtBQ\n\rio.grafeas.v1P\001Z8google.golang" + - ".org/genproto/googleapis/grafeas/v1;graf" + - "eas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.grafeas.v1.Common.getDescriptor(), - }); - internal_static_grafeas_v1_AttestationNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_AttestationNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_AttestationNote_descriptor, - new java.lang.String[] { "Hint", }); - internal_static_grafeas_v1_AttestationNote_Hint_descriptor = - internal_static_grafeas_v1_AttestationNote_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_AttestationNote_Hint_descriptor, - new java.lang.String[] { "HumanReadableName", }); - internal_static_grafeas_v1_Jwt_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Jwt_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Jwt_descriptor, - new java.lang.String[] { "CompactJwt", }); - internal_static_grafeas_v1_AttestationOccurrence_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_AttestationOccurrence_descriptor, - new java.lang.String[] { "SerializedPayload", "Signatures", "Jwts", }); - io.grafeas.v1.Common.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java deleted file mode 100644 index 05af36fada4c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java +++ /dev/null @@ -1,1279 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/attestation.proto - -package io.grafeas.v1; - -/** - *
- * Note kind that represents a logical attestation "role" or "authority". For
- * example, an organization might have one `Authority` for "QA" and one for
- * "build". This note is intended to act strictly as a grouping mechanism for
- * the attached occurrences (Attestations). This grouping mechanism also
- * provides a security boundary, since IAM ACLs gate the ability for a principle
- * to attach an occurrence to a given note. It also provides a single point of
- * lookup to find all attached attestation occurrences, even if they don't all
- * live in the same project.
- * 
- * - * Protobuf type {@code grafeas.v1.AttestationNote} - */ -public final class AttestationNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.AttestationNote) - AttestationNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use AttestationNote.newBuilder() to construct. - private AttestationNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AttestationNote() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AttestationNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AttestationNote.class, io.grafeas.v1.AttestationNote.Builder.class); - } - - public interface HintOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.AttestationNote.Hint) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "qa".
-     * 
- * - * string human_readable_name = 1; - * @return The humanReadableName. - */ - java.lang.String getHumanReadableName(); - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "qa".
-     * 
- * - * string human_readable_name = 1; - * @return The bytes for humanReadableName. - */ - com.google.protobuf.ByteString - getHumanReadableNameBytes(); - } - /** - *
-   * This submessage provides human-readable hints about the purpose of the
-   * authority. Because the name of a note acts as its resource reference, it is
-   * important to disambiguate the canonical name of the Note (which might be a
-   * UUID for security purposes) from "readable" names more suitable for debug
-   * output. Note that these hints should not be used to look up authorities in
-   * security sensitive contexts, such as when looking up attestations to
-   * verify.
-   * 
- * - * Protobuf type {@code grafeas.v1.AttestationNote.Hint} - */ - public static final class Hint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.AttestationNote.Hint) - HintOrBuilder { - private static final long serialVersionUID = 0L; - // Use Hint.newBuilder() to construct. - private Hint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Hint() { - humanReadableName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Hint(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AttestationNote.Hint.class, io.grafeas.v1.AttestationNote.Hint.Builder.class); - } - - public static final int HUMAN_READABLE_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object humanReadableName_ = ""; - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "qa".
-     * 
- * - * string human_readable_name = 1; - * @return The humanReadableName. - */ - @java.lang.Override - public java.lang.String getHumanReadableName() { - java.lang.Object ref = humanReadableName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - humanReadableName_ = s; - return s; - } - } - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "qa".
-     * 
- * - * string human_readable_name = 1; - * @return The bytes for humanReadableName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getHumanReadableNameBytes() { - java.lang.Object ref = humanReadableName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - humanReadableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, humanReadableName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, humanReadableName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.AttestationNote.Hint)) { - return super.equals(obj); - } - io.grafeas.v1.AttestationNote.Hint other = (io.grafeas.v1.AttestationNote.Hint) obj; - - if (!getHumanReadableName() - .equals(other.getHumanReadableName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HUMAN_READABLE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getHumanReadableName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote.Hint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationNote.Hint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.AttestationNote.Hint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * This submessage provides human-readable hints about the purpose of the
-     * authority. Because the name of a note acts as its resource reference, it is
-     * important to disambiguate the canonical name of the Note (which might be a
-     * UUID for security purposes) from "readable" names more suitable for debug
-     * output. Note that these hints should not be used to look up authorities in
-     * security sensitive contexts, such as when looking up attestations to
-     * verify.
-     * 
- * - * Protobuf type {@code grafeas.v1.AttestationNote.Hint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.AttestationNote.Hint) - io.grafeas.v1.AttestationNote.HintOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AttestationNote.Hint.class, io.grafeas.v1.AttestationNote.Hint.Builder.class); - } - - // Construct using io.grafeas.v1.AttestationNote.Hint.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - humanReadableName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote.Hint getDefaultInstanceForType() { - return io.grafeas.v1.AttestationNote.Hint.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote.Hint build() { - io.grafeas.v1.AttestationNote.Hint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote.Hint buildPartial() { - io.grafeas.v1.AttestationNote.Hint result = new io.grafeas.v1.AttestationNote.Hint(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.AttestationNote.Hint result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.humanReadableName_ = humanReadableName_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.AttestationNote.Hint) { - return mergeFrom((io.grafeas.v1.AttestationNote.Hint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.AttestationNote.Hint other) { - if (other == io.grafeas.v1.AttestationNote.Hint.getDefaultInstance()) return this; - if (!other.getHumanReadableName().isEmpty()) { - humanReadableName_ = other.humanReadableName_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - humanReadableName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object humanReadableName_ = ""; - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "qa".
-       * 
- * - * string human_readable_name = 1; - * @return The humanReadableName. - */ - public java.lang.String getHumanReadableName() { - java.lang.Object ref = humanReadableName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - humanReadableName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "qa".
-       * 
- * - * string human_readable_name = 1; - * @return The bytes for humanReadableName. - */ - public com.google.protobuf.ByteString - getHumanReadableNameBytes() { - java.lang.Object ref = humanReadableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - humanReadableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "qa".
-       * 
- * - * string human_readable_name = 1; - * @param value The humanReadableName to set. - * @return This builder for chaining. - */ - public Builder setHumanReadableName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - humanReadableName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "qa".
-       * 
- * - * string human_readable_name = 1; - * @return This builder for chaining. - */ - public Builder clearHumanReadableName() { - humanReadableName_ = getDefaultInstance().getHumanReadableName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "qa".
-       * 
- * - * string human_readable_name = 1; - * @param value The bytes for humanReadableName to set. - * @return This builder for chaining. - */ - public Builder setHumanReadableNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - humanReadableName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.AttestationNote.Hint) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.AttestationNote.Hint) - private static final io.grafeas.v1.AttestationNote.Hint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.AttestationNote.Hint(); - } - - public static io.grafeas.v1.AttestationNote.Hint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Hint parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote.Hint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int HINT_FIELD_NUMBER = 1; - private io.grafeas.v1.AttestationNote.Hint hint_; - /** - *
-   * Hint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - * @return Whether the hint field is set. - */ - @java.lang.Override - public boolean hasHint() { - return hint_ != null; - } - /** - *
-   * Hint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - * @return The hint. - */ - @java.lang.Override - public io.grafeas.v1.AttestationNote.Hint getHint() { - return hint_ == null ? io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; - } - /** - *
-   * Hint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - @java.lang.Override - public io.grafeas.v1.AttestationNote.HintOrBuilder getHintOrBuilder() { - return hint_ == null ? io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (hint_ != null) { - output.writeMessage(1, getHint()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (hint_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getHint()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.AttestationNote)) { - return super.equals(obj); - } - io.grafeas.v1.AttestationNote other = (io.grafeas.v1.AttestationNote) obj; - - if (hasHint() != other.hasHint()) return false; - if (hasHint()) { - if (!getHint() - .equals(other.getHint())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasHint()) { - hash = (37 * hash) + HINT_FIELD_NUMBER; - hash = (53 * hash) + getHint().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.AttestationNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.AttestationNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Note kind that represents a logical attestation "role" or "authority". For
-   * example, an organization might have one `Authority` for "QA" and one for
-   * "build". This note is intended to act strictly as a grouping mechanism for
-   * the attached occurrences (Attestations). This grouping mechanism also
-   * provides a security boundary, since IAM ACLs gate the ability for a principle
-   * to attach an occurrence to a given note. It also provides a single point of
-   * lookup to find all attached attestation occurrences, even if they don't all
-   * live in the same project.
-   * 
- * - * Protobuf type {@code grafeas.v1.AttestationNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.AttestationNote) - io.grafeas.v1.AttestationNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AttestationNote.class, io.grafeas.v1.AttestationNote.Builder.class); - } - - // Construct using io.grafeas.v1.AttestationNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - hint_ = null; - if (hintBuilder_ != null) { - hintBuilder_.dispose(); - hintBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote getDefaultInstanceForType() { - return io.grafeas.v1.AttestationNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote build() { - io.grafeas.v1.AttestationNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote buildPartial() { - io.grafeas.v1.AttestationNote result = new io.grafeas.v1.AttestationNote(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.AttestationNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.hint_ = hintBuilder_ == null - ? hint_ - : hintBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.AttestationNote) { - return mergeFrom((io.grafeas.v1.AttestationNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.AttestationNote other) { - if (other == io.grafeas.v1.AttestationNote.getDefaultInstance()) return this; - if (other.hasHint()) { - mergeHint(other.getHint()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getHintFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.AttestationNote.Hint hint_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationNote.Hint, io.grafeas.v1.AttestationNote.Hint.Builder, io.grafeas.v1.AttestationNote.HintOrBuilder> hintBuilder_; - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - * @return Whether the hint field is set. - */ - public boolean hasHint() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - * @return The hint. - */ - public io.grafeas.v1.AttestationNote.Hint getHint() { - if (hintBuilder_ == null) { - return hint_ == null ? io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; - } else { - return hintBuilder_.getMessage(); - } - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - public Builder setHint(io.grafeas.v1.AttestationNote.Hint value) { - if (hintBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hint_ = value; - } else { - hintBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - public Builder setHint( - io.grafeas.v1.AttestationNote.Hint.Builder builderForValue) { - if (hintBuilder_ == null) { - hint_ = builderForValue.build(); - } else { - hintBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - public Builder mergeHint(io.grafeas.v1.AttestationNote.Hint value) { - if (hintBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - hint_ != null && - hint_ != io.grafeas.v1.AttestationNote.Hint.getDefaultInstance()) { - getHintBuilder().mergeFrom(value); - } else { - hint_ = value; - } - } else { - hintBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - public Builder clearHint() { - bitField0_ = (bitField0_ & ~0x00000001); - hint_ = null; - if (hintBuilder_ != null) { - hintBuilder_.dispose(); - hintBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - public io.grafeas.v1.AttestationNote.Hint.Builder getHintBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getHintFieldBuilder().getBuilder(); - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - public io.grafeas.v1.AttestationNote.HintOrBuilder getHintOrBuilder() { - if (hintBuilder_ != null) { - return hintBuilder_.getMessageOrBuilder(); - } else { - return hint_ == null ? - io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; - } - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationNote.Hint, io.grafeas.v1.AttestationNote.Hint.Builder, io.grafeas.v1.AttestationNote.HintOrBuilder> - getHintFieldBuilder() { - if (hintBuilder_ == null) { - hintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationNote.Hint, io.grafeas.v1.AttestationNote.Hint.Builder, io.grafeas.v1.AttestationNote.HintOrBuilder>( - getHint(), - getParentForChildren(), - isClean()); - hint_ = null; - } - return hintBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.AttestationNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.AttestationNote) - private static final io.grafeas.v1.AttestationNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.AttestationNote(); - } - - public static io.grafeas.v1.AttestationNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AttestationNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java deleted file mode 100644 index 202623bd6817..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/attestation.proto - -package io.grafeas.v1; - -public interface AttestationNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.AttestationNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Hint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - * @return Whether the hint field is set. - */ - boolean hasHint(); - /** - *
-   * Hint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - * @return The hint. - */ - io.grafeas.v1.AttestationNote.Hint getHint(); - /** - *
-   * Hint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - io.grafeas.v1.AttestationNote.HintOrBuilder getHintOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java deleted file mode 100644 index 20b2893ff31b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java +++ /dev/null @@ -1,1658 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/attestation.proto - -package io.grafeas.v1; - -/** - *
- * Occurrence that represents a single "attestation". The authenticity of an
- * attestation can be verified using the attached signature. If the verifier
- * trusts the public key of the signer, then verifying the signature is
- * sufficient to establish trust. In this circumstance, the authority to which
- * this attestation is attached is primarily useful for lookup (how to find
- * this attestation if you already know the authority and artifact to be
- * verified) and intent (for which authority this attestation was intended to
- * sign.
- * 
- * - * Protobuf type {@code grafeas.v1.AttestationOccurrence} - */ -public final class AttestationOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.AttestationOccurrence) - AttestationOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use AttestationOccurrence.newBuilder() to construct. - private AttestationOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AttestationOccurrence() { - serializedPayload_ = com.google.protobuf.ByteString.EMPTY; - signatures_ = java.util.Collections.emptyList(); - jwts_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AttestationOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AttestationOccurrence.class, io.grafeas.v1.AttestationOccurrence.Builder.class); - } - - public static final int SERIALIZED_PAYLOAD_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString serializedPayload_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-   * Required. The serialized payload that is verified by one or more
-   * `signatures`.
-   * 
- * - * bytes serialized_payload = 1; - * @return The serializedPayload. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSerializedPayload() { - return serializedPayload_; - } - - public static final int SIGNATURES_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List signatures_; - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - @java.lang.Override - public java.util.List getSignaturesList() { - return signatures_; - } - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - @java.lang.Override - public java.util.List - getSignaturesOrBuilderList() { - return signatures_; - } - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - @java.lang.Override - public int getSignaturesCount() { - return signatures_.size(); - } - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - @java.lang.Override - public io.grafeas.v1.Signature getSignatures(int index) { - return signatures_.get(index); - } - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - @java.lang.Override - public io.grafeas.v1.SignatureOrBuilder getSignaturesOrBuilder( - int index) { - return signatures_.get(index); - } - - public static final int JWTS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List jwts_; - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - @java.lang.Override - public java.util.List getJwtsList() { - return jwts_; - } - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - @java.lang.Override - public java.util.List - getJwtsOrBuilderList() { - return jwts_; - } - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - @java.lang.Override - public int getJwtsCount() { - return jwts_.size(); - } - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - @java.lang.Override - public io.grafeas.v1.Jwt getJwts(int index) { - return jwts_.get(index); - } - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - @java.lang.Override - public io.grafeas.v1.JwtOrBuilder getJwtsOrBuilder( - int index) { - return jwts_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!serializedPayload_.isEmpty()) { - output.writeBytes(1, serializedPayload_); - } - for (int i = 0; i < signatures_.size(); i++) { - output.writeMessage(2, signatures_.get(i)); - } - for (int i = 0; i < jwts_.size(); i++) { - output.writeMessage(3, jwts_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!serializedPayload_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, serializedPayload_); - } - for (int i = 0; i < signatures_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, signatures_.get(i)); - } - for (int i = 0; i < jwts_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, jwts_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.AttestationOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.AttestationOccurrence other = (io.grafeas.v1.AttestationOccurrence) obj; - - if (!getSerializedPayload() - .equals(other.getSerializedPayload())) return false; - if (!getSignaturesList() - .equals(other.getSignaturesList())) return false; - if (!getJwtsList() - .equals(other.getJwtsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERIALIZED_PAYLOAD_FIELD_NUMBER; - hash = (53 * hash) + getSerializedPayload().hashCode(); - if (getSignaturesCount() > 0) { - hash = (37 * hash) + SIGNATURES_FIELD_NUMBER; - hash = (53 * hash) + getSignaturesList().hashCode(); - } - if (getJwtsCount() > 0) { - hash = (37 * hash) + JWTS_FIELD_NUMBER; - hash = (53 * hash) + getJwtsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.AttestationOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AttestationOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.AttestationOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Occurrence that represents a single "attestation". The authenticity of an
-   * attestation can be verified using the attached signature. If the verifier
-   * trusts the public key of the signer, then verifying the signature is
-   * sufficient to establish trust. In this circumstance, the authority to which
-   * this attestation is attached is primarily useful for lookup (how to find
-   * this attestation if you already know the authority and artifact to be
-   * verified) and intent (for which authority this attestation was intended to
-   * sign.
-   * 
- * - * Protobuf type {@code grafeas.v1.AttestationOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.AttestationOccurrence) - io.grafeas.v1.AttestationOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AttestationOccurrence.class, io.grafeas.v1.AttestationOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.AttestationOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - serializedPayload_ = com.google.protobuf.ByteString.EMPTY; - if (signaturesBuilder_ == null) { - signatures_ = java.util.Collections.emptyList(); - } else { - signatures_ = null; - signaturesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - if (jwtsBuilder_ == null) { - jwts_ = java.util.Collections.emptyList(); - } else { - jwts_ = null; - jwtsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.AttestationOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.AttestationOccurrence build() { - io.grafeas.v1.AttestationOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.AttestationOccurrence buildPartial() { - io.grafeas.v1.AttestationOccurrence result = new io.grafeas.v1.AttestationOccurrence(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.AttestationOccurrence result) { - if (signaturesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - signatures_ = java.util.Collections.unmodifiableList(signatures_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.signatures_ = signatures_; - } else { - result.signatures_ = signaturesBuilder_.build(); - } - if (jwtsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - jwts_ = java.util.Collections.unmodifiableList(jwts_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.jwts_ = jwts_; - } else { - result.jwts_ = jwtsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.AttestationOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.serializedPayload_ = serializedPayload_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.AttestationOccurrence) { - return mergeFrom((io.grafeas.v1.AttestationOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.AttestationOccurrence other) { - if (other == io.grafeas.v1.AttestationOccurrence.getDefaultInstance()) return this; - if (other.getSerializedPayload() != com.google.protobuf.ByteString.EMPTY) { - setSerializedPayload(other.getSerializedPayload()); - } - if (signaturesBuilder_ == null) { - if (!other.signatures_.isEmpty()) { - if (signatures_.isEmpty()) { - signatures_ = other.signatures_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSignaturesIsMutable(); - signatures_.addAll(other.signatures_); - } - onChanged(); - } - } else { - if (!other.signatures_.isEmpty()) { - if (signaturesBuilder_.isEmpty()) { - signaturesBuilder_.dispose(); - signaturesBuilder_ = null; - signatures_ = other.signatures_; - bitField0_ = (bitField0_ & ~0x00000002); - signaturesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSignaturesFieldBuilder() : null; - } else { - signaturesBuilder_.addAllMessages(other.signatures_); - } - } - } - if (jwtsBuilder_ == null) { - if (!other.jwts_.isEmpty()) { - if (jwts_.isEmpty()) { - jwts_ = other.jwts_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureJwtsIsMutable(); - jwts_.addAll(other.jwts_); - } - onChanged(); - } - } else { - if (!other.jwts_.isEmpty()) { - if (jwtsBuilder_.isEmpty()) { - jwtsBuilder_.dispose(); - jwtsBuilder_ = null; - jwts_ = other.jwts_; - bitField0_ = (bitField0_ & ~0x00000004); - jwtsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getJwtsFieldBuilder() : null; - } else { - jwtsBuilder_.addAllMessages(other.jwts_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - serializedPayload_ = input.readBytes(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - io.grafeas.v1.Signature m = - input.readMessage( - io.grafeas.v1.Signature.parser(), - extensionRegistry); - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.add(m); - } else { - signaturesBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: { - io.grafeas.v1.Jwt m = - input.readMessage( - io.grafeas.v1.Jwt.parser(), - extensionRegistry); - if (jwtsBuilder_ == null) { - ensureJwtsIsMutable(); - jwts_.add(m); - } else { - jwtsBuilder_.addMessage(m); - } - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.ByteString serializedPayload_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Required. The serialized payload that is verified by one or more
-     * `signatures`.
-     * 
- * - * bytes serialized_payload = 1; - * @return The serializedPayload. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSerializedPayload() { - return serializedPayload_; - } - /** - *
-     * Required. The serialized payload that is verified by one or more
-     * `signatures`.
-     * 
- * - * bytes serialized_payload = 1; - * @param value The serializedPayload to set. - * @return This builder for chaining. - */ - public Builder setSerializedPayload(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - serializedPayload_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. The serialized payload that is verified by one or more
-     * `signatures`.
-     * 
- * - * bytes serialized_payload = 1; - * @return This builder for chaining. - */ - public Builder clearSerializedPayload() { - bitField0_ = (bitField0_ & ~0x00000001); - serializedPayload_ = getDefaultInstance().getSerializedPayload(); - onChanged(); - return this; - } - - private java.util.List signatures_ = - java.util.Collections.emptyList(); - private void ensureSignaturesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - signatures_ = new java.util.ArrayList(signatures_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Signature, io.grafeas.v1.Signature.Builder, io.grafeas.v1.SignatureOrBuilder> signaturesBuilder_; - - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public java.util.List getSignaturesList() { - if (signaturesBuilder_ == null) { - return java.util.Collections.unmodifiableList(signatures_); - } else { - return signaturesBuilder_.getMessageList(); - } - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public int getSignaturesCount() { - if (signaturesBuilder_ == null) { - return signatures_.size(); - } else { - return signaturesBuilder_.getCount(); - } - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public io.grafeas.v1.Signature getSignatures(int index) { - if (signaturesBuilder_ == null) { - return signatures_.get(index); - } else { - return signaturesBuilder_.getMessage(index); - } - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder setSignatures( - int index, io.grafeas.v1.Signature value) { - if (signaturesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignaturesIsMutable(); - signatures_.set(index, value); - onChanged(); - } else { - signaturesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder setSignatures( - int index, io.grafeas.v1.Signature.Builder builderForValue) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.set(index, builderForValue.build()); - onChanged(); - } else { - signaturesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder addSignatures(io.grafeas.v1.Signature value) { - if (signaturesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignaturesIsMutable(); - signatures_.add(value); - onChanged(); - } else { - signaturesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder addSignatures( - int index, io.grafeas.v1.Signature value) { - if (signaturesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignaturesIsMutable(); - signatures_.add(index, value); - onChanged(); - } else { - signaturesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder addSignatures( - io.grafeas.v1.Signature.Builder builderForValue) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.add(builderForValue.build()); - onChanged(); - } else { - signaturesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder addSignatures( - int index, io.grafeas.v1.Signature.Builder builderForValue) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.add(index, builderForValue.build()); - onChanged(); - } else { - signaturesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder addAllSignatures( - java.lang.Iterable values) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, signatures_); - onChanged(); - } else { - signaturesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder clearSignatures() { - if (signaturesBuilder_ == null) { - signatures_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - signaturesBuilder_.clear(); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder removeSignatures(int index) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.remove(index); - onChanged(); - } else { - signaturesBuilder_.remove(index); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public io.grafeas.v1.Signature.Builder getSignaturesBuilder( - int index) { - return getSignaturesFieldBuilder().getBuilder(index); - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public io.grafeas.v1.SignatureOrBuilder getSignaturesOrBuilder( - int index) { - if (signaturesBuilder_ == null) { - return signatures_.get(index); } else { - return signaturesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public java.util.List - getSignaturesOrBuilderList() { - if (signaturesBuilder_ != null) { - return signaturesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(signatures_); - } - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public io.grafeas.v1.Signature.Builder addSignaturesBuilder() { - return getSignaturesFieldBuilder().addBuilder( - io.grafeas.v1.Signature.getDefaultInstance()); - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public io.grafeas.v1.Signature.Builder addSignaturesBuilder( - int index) { - return getSignaturesFieldBuilder().addBuilder( - index, io.grafeas.v1.Signature.getDefaultInstance()); - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public java.util.List - getSignaturesBuilderList() { - return getSignaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Signature, io.grafeas.v1.Signature.Builder, io.grafeas.v1.SignatureOrBuilder> - getSignaturesFieldBuilder() { - if (signaturesBuilder_ == null) { - signaturesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Signature, io.grafeas.v1.Signature.Builder, io.grafeas.v1.SignatureOrBuilder>( - signatures_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - signatures_ = null; - } - return signaturesBuilder_; - } - - private java.util.List jwts_ = - java.util.Collections.emptyList(); - private void ensureJwtsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - jwts_ = new java.util.ArrayList(jwts_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Jwt, io.grafeas.v1.Jwt.Builder, io.grafeas.v1.JwtOrBuilder> jwtsBuilder_; - - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public java.util.List getJwtsList() { - if (jwtsBuilder_ == null) { - return java.util.Collections.unmodifiableList(jwts_); - } else { - return jwtsBuilder_.getMessageList(); - } - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public int getJwtsCount() { - if (jwtsBuilder_ == null) { - return jwts_.size(); - } else { - return jwtsBuilder_.getCount(); - } - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public io.grafeas.v1.Jwt getJwts(int index) { - if (jwtsBuilder_ == null) { - return jwts_.get(index); - } else { - return jwtsBuilder_.getMessage(index); - } - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder setJwts( - int index, io.grafeas.v1.Jwt value) { - if (jwtsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJwtsIsMutable(); - jwts_.set(index, value); - onChanged(); - } else { - jwtsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder setJwts( - int index, io.grafeas.v1.Jwt.Builder builderForValue) { - if (jwtsBuilder_ == null) { - ensureJwtsIsMutable(); - jwts_.set(index, builderForValue.build()); - onChanged(); - } else { - jwtsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder addJwts(io.grafeas.v1.Jwt value) { - if (jwtsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJwtsIsMutable(); - jwts_.add(value); - onChanged(); - } else { - jwtsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder addJwts( - int index, io.grafeas.v1.Jwt value) { - if (jwtsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJwtsIsMutable(); - jwts_.add(index, value); - onChanged(); - } else { - jwtsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder addJwts( - io.grafeas.v1.Jwt.Builder builderForValue) { - if (jwtsBuilder_ == null) { - ensureJwtsIsMutable(); - jwts_.add(builderForValue.build()); - onChanged(); - } else { - jwtsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder addJwts( - int index, io.grafeas.v1.Jwt.Builder builderForValue) { - if (jwtsBuilder_ == null) { - ensureJwtsIsMutable(); - jwts_.add(index, builderForValue.build()); - onChanged(); - } else { - jwtsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder addAllJwts( - java.lang.Iterable values) { - if (jwtsBuilder_ == null) { - ensureJwtsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, jwts_); - onChanged(); - } else { - jwtsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder clearJwts() { - if (jwtsBuilder_ == null) { - jwts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - jwtsBuilder_.clear(); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder removeJwts(int index) { - if (jwtsBuilder_ == null) { - ensureJwtsIsMutable(); - jwts_.remove(index); - onChanged(); - } else { - jwtsBuilder_.remove(index); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public io.grafeas.v1.Jwt.Builder getJwtsBuilder( - int index) { - return getJwtsFieldBuilder().getBuilder(index); - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public io.grafeas.v1.JwtOrBuilder getJwtsOrBuilder( - int index) { - if (jwtsBuilder_ == null) { - return jwts_.get(index); } else { - return jwtsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public java.util.List - getJwtsOrBuilderList() { - if (jwtsBuilder_ != null) { - return jwtsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(jwts_); - } - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public io.grafeas.v1.Jwt.Builder addJwtsBuilder() { - return getJwtsFieldBuilder().addBuilder( - io.grafeas.v1.Jwt.getDefaultInstance()); - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public io.grafeas.v1.Jwt.Builder addJwtsBuilder( - int index) { - return getJwtsFieldBuilder().addBuilder( - index, io.grafeas.v1.Jwt.getDefaultInstance()); - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public java.util.List - getJwtsBuilderList() { - return getJwtsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Jwt, io.grafeas.v1.Jwt.Builder, io.grafeas.v1.JwtOrBuilder> - getJwtsFieldBuilder() { - if (jwtsBuilder_ == null) { - jwtsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Jwt, io.grafeas.v1.Jwt.Builder, io.grafeas.v1.JwtOrBuilder>( - jwts_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - jwts_ = null; - } - return jwtsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.AttestationOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.AttestationOccurrence) - private static final io.grafeas.v1.AttestationOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.AttestationOccurrence(); - } - - public static io.grafeas.v1.AttestationOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AttestationOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.AttestationOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java deleted file mode 100644 index 771f03145fc8..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java +++ /dev/null @@ -1,163 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/attestation.proto - -package io.grafeas.v1; - -public interface AttestationOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.AttestationOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The serialized payload that is verified by one or more
-   * `signatures`.
-   * 
- * - * bytes serialized_payload = 1; - * @return The serializedPayload. - */ - com.google.protobuf.ByteString getSerializedPayload(); - - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - java.util.List - getSignaturesList(); - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - io.grafeas.v1.Signature getSignatures(int index); - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - int getSignaturesCount(); - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - java.util.List - getSignaturesOrBuilderList(); - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - io.grafeas.v1.SignatureOrBuilder getSignaturesOrBuilder( - int index); - - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - java.util.List - getJwtsList(); - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - io.grafeas.v1.Jwt getJwts(int index); - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - int getJwtsCount(); - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - java.util.List - getJwtsOrBuilderList(); - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - io.grafeas.v1.JwtOrBuilder getJwtsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java deleted file mode 100644 index 0024b9c1f607..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java +++ /dev/null @@ -1,910 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to create notes in batch.
- * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateNotesRequest} - */ -public final class BatchCreateNotesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateNotesRequest) - BatchCreateNotesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchCreateNotesRequest.newBuilder() to construct. - private BatchCreateNotesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchCreateNotesRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchCreateNotesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetNotes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateNotesRequest.class, io.grafeas.v1.BatchCreateNotesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the notes are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the notes are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NOTES_FIELD_NUMBER = 2; - private static final class NotesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, io.grafeas.v1.Note> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - io.grafeas.v1.Note.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, io.grafeas.v1.Note> notes_; - private com.google.protobuf.MapField - internalGetNotes() { - if (notes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - NotesDefaultEntryHolder.defaultEntry); - } - return notes_; - } - public int getNotesCount() { - return internalGetNotes().getMap().size(); - } - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public boolean containsNotes( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetNotes().getMap().containsKey(key); - } - /** - * Use {@link #getNotesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getNotes() { - return getNotesMap(); - } - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.Map getNotesMap() { - return internalGetNotes().getMap(); - } - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public /* nullable */ -io.grafeas.v1.Note getNotesOrDefault( - java.lang.String key, - /* nullable */ -io.grafeas.v1.Note defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetNotes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.Note getNotesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetNotes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetNotes(), - NotesDefaultEntryHolder.defaultEntry, - 2); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - for (java.util.Map.Entry entry - : internalGetNotes().getMap().entrySet()) { - com.google.protobuf.MapEntry - notes__ = NotesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, notes__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BatchCreateNotesRequest)) { - return super.equals(obj); - } - io.grafeas.v1.BatchCreateNotesRequest other = (io.grafeas.v1.BatchCreateNotesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!internalGetNotes().equals( - other.internalGetNotes())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (!internalGetNotes().getMap().isEmpty()) { - hash = (37 * hash) + NOTES_FIELD_NUMBER; - hash = (53 * hash) + internalGetNotes().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BatchCreateNotesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to create notes in batch.
-   * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateNotesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateNotesRequest) - io.grafeas.v1.BatchCreateNotesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetNotes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableNotes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateNotesRequest.class, io.grafeas.v1.BatchCreateNotesRequest.Builder.class); - } - - // Construct using io.grafeas.v1.BatchCreateNotesRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - internalGetMutableNotes().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesRequest getDefaultInstanceForType() { - return io.grafeas.v1.BatchCreateNotesRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesRequest build() { - io.grafeas.v1.BatchCreateNotesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesRequest buildPartial() { - io.grafeas.v1.BatchCreateNotesRequest result = new io.grafeas.v1.BatchCreateNotesRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.BatchCreateNotesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.notes_ = internalGetNotes(); - result.notes_.makeImmutable(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BatchCreateNotesRequest) { - return mergeFrom((io.grafeas.v1.BatchCreateNotesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BatchCreateNotesRequest other) { - if (other == io.grafeas.v1.BatchCreateNotesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableNotes().mergeFrom( - other.internalGetNotes()); - bitField0_ |= 0x00000002; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - com.google.protobuf.MapEntry - notes__ = input.readMessage( - NotesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableNotes().getMutableMap().put( - notes__.getKey(), notes__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the notes are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the notes are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the notes are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the notes are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the notes are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, io.grafeas.v1.Note> notes_; - private com.google.protobuf.MapField - internalGetNotes() { - if (notes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - NotesDefaultEntryHolder.defaultEntry); - } - return notes_; - } - private com.google.protobuf.MapField - internalGetMutableNotes() { - if (notes_ == null) { - notes_ = com.google.protobuf.MapField.newMapField( - NotesDefaultEntryHolder.defaultEntry); - } - if (!notes_.isMutable()) { - notes_ = notes_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return notes_; - } - public int getNotesCount() { - return internalGetNotes().getMap().size(); - } - /** - *
-     * The notes to create. Max allowed length is 1000.
-     * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public boolean containsNotes( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetNotes().getMap().containsKey(key); - } - /** - * Use {@link #getNotesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getNotes() { - return getNotesMap(); - } - /** - *
-     * The notes to create. Max allowed length is 1000.
-     * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.Map getNotesMap() { - return internalGetNotes().getMap(); - } - /** - *
-     * The notes to create. Max allowed length is 1000.
-     * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public /* nullable */ -io.grafeas.v1.Note getNotesOrDefault( - java.lang.String key, - /* nullable */ -io.grafeas.v1.Note defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetNotes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * The notes to create. Max allowed length is 1000.
-     * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.Note getNotesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetNotes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearNotes() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableNotes().getMutableMap() - .clear(); - return this; - } - /** - *
-     * The notes to create. Max allowed length is 1000.
-     * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeNotes( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableNotes().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableNotes() { - bitField0_ |= 0x00000002; - return internalGetMutableNotes().getMutableMap(); - } - /** - *
-     * The notes to create. Max allowed length is 1000.
-     * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder putNotes( - java.lang.String key, - io.grafeas.v1.Note value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableNotes().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - *
-     * The notes to create. Max allowed length is 1000.
-     * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder putAllNotes( - java.util.Map values) { - internalGetMutableNotes().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000002; - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateNotesRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateNotesRequest) - private static final io.grafeas.v1.BatchCreateNotesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateNotesRequest(); - } - - public static io.grafeas.v1.BatchCreateNotesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchCreateNotesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java deleted file mode 100644 index 912f5e4cb609..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface BatchCreateNotesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateNotesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the notes are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the notes are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - int getNotesCount(); - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - boolean containsNotes( - java.lang.String key); - /** - * Use {@link #getNotesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getNotes(); - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.Map - getNotesMap(); - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - /* nullable */ -io.grafeas.v1.Note getNotesOrDefault( - java.lang.String key, - /* nullable */ -io.grafeas.v1.Note defaultValue); - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - io.grafeas.v1.Note getNotesOrThrow( - java.lang.String key); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java deleted file mode 100644 index 6066cf15b94f..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java +++ /dev/null @@ -1,862 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Response for creating notes in batch.
- * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateNotesResponse} - */ -public final class BatchCreateNotesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateNotesResponse) - BatchCreateNotesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchCreateNotesResponse.newBuilder() to construct. - private BatchCreateNotesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchCreateNotesResponse() { - notes_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchCreateNotesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateNotesResponse.class, io.grafeas.v1.BatchCreateNotesResponse.Builder.class); - } - - public static final int NOTES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List notes_; - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public java.util.List getNotesList() { - return notes_; - } - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public java.util.List - getNotesOrBuilderList() { - return notes_; - } - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public int getNotesCount() { - return notes_.size(); - } - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public io.grafeas.v1.Note getNotes(int index) { - return notes_.get(index); - } - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( - int index) { - return notes_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < notes_.size(); i++) { - output.writeMessage(1, notes_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < notes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, notes_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BatchCreateNotesResponse)) { - return super.equals(obj); - } - io.grafeas.v1.BatchCreateNotesResponse other = (io.grafeas.v1.BatchCreateNotesResponse) obj; - - if (!getNotesList() - .equals(other.getNotesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getNotesCount() > 0) { - hash = (37 * hash) + NOTES_FIELD_NUMBER; - hash = (53 * hash) + getNotesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BatchCreateNotesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response for creating notes in batch.
-   * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateNotesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateNotesResponse) - io.grafeas.v1.BatchCreateNotesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateNotesResponse.class, io.grafeas.v1.BatchCreateNotesResponse.Builder.class); - } - - // Construct using io.grafeas.v1.BatchCreateNotesResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (notesBuilder_ == null) { - notes_ = java.util.Collections.emptyList(); - } else { - notes_ = null; - notesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesResponse getDefaultInstanceForType() { - return io.grafeas.v1.BatchCreateNotesResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesResponse build() { - io.grafeas.v1.BatchCreateNotesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesResponse buildPartial() { - io.grafeas.v1.BatchCreateNotesResponse result = new io.grafeas.v1.BatchCreateNotesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.BatchCreateNotesResponse result) { - if (notesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - notes_ = java.util.Collections.unmodifiableList(notes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.notes_ = notes_; - } else { - result.notes_ = notesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.BatchCreateNotesResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BatchCreateNotesResponse) { - return mergeFrom((io.grafeas.v1.BatchCreateNotesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BatchCreateNotesResponse other) { - if (other == io.grafeas.v1.BatchCreateNotesResponse.getDefaultInstance()) return this; - if (notesBuilder_ == null) { - if (!other.notes_.isEmpty()) { - if (notes_.isEmpty()) { - notes_ = other.notes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNotesIsMutable(); - notes_.addAll(other.notes_); - } - onChanged(); - } - } else { - if (!other.notes_.isEmpty()) { - if (notesBuilder_.isEmpty()) { - notesBuilder_.dispose(); - notesBuilder_ = null; - notes_ = other.notes_; - bitField0_ = (bitField0_ & ~0x00000001); - notesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNotesFieldBuilder() : null; - } else { - notesBuilder_.addAllMessages(other.notes_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.grafeas.v1.Note m = - input.readMessage( - io.grafeas.v1.Note.parser(), - extensionRegistry); - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.add(m); - } else { - notesBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List notes_ = - java.util.Collections.emptyList(); - private void ensureNotesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - notes_ = new java.util.ArrayList(notes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> notesBuilder_; - - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public java.util.List getNotesList() { - if (notesBuilder_ == null) { - return java.util.Collections.unmodifiableList(notes_); - } else { - return notesBuilder_.getMessageList(); - } - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public int getNotesCount() { - if (notesBuilder_ == null) { - return notes_.size(); - } else { - return notesBuilder_.getCount(); - } - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note getNotes(int index) { - if (notesBuilder_ == null) { - return notes_.get(index); - } else { - return notesBuilder_.getMessage(index); - } - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder setNotes( - int index, io.grafeas.v1.Note value) { - if (notesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotesIsMutable(); - notes_.set(index, value); - onChanged(); - } else { - notesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder setNotes( - int index, io.grafeas.v1.Note.Builder builderForValue) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.set(index, builderForValue.build()); - onChanged(); - } else { - notesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes(io.grafeas.v1.Note value) { - if (notesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotesIsMutable(); - notes_.add(value); - onChanged(); - } else { - notesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes( - int index, io.grafeas.v1.Note value) { - if (notesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotesIsMutable(); - notes_.add(index, value); - onChanged(); - } else { - notesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes( - io.grafeas.v1.Note.Builder builderForValue) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.add(builderForValue.build()); - onChanged(); - } else { - notesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes( - int index, io.grafeas.v1.Note.Builder builderForValue) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.add(index, builderForValue.build()); - onChanged(); - } else { - notesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addAllNotes( - java.lang.Iterable values) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notes_); - onChanged(); - } else { - notesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder clearNotes() { - if (notesBuilder_ == null) { - notes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - notesBuilder_.clear(); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder removeNotes(int index) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.remove(index); - onChanged(); - } else { - notesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note.Builder getNotesBuilder( - int index) { - return getNotesFieldBuilder().getBuilder(index); - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( - int index) { - if (notesBuilder_ == null) { - return notes_.get(index); } else { - return notesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public java.util.List - getNotesOrBuilderList() { - if (notesBuilder_ != null) { - return notesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(notes_); - } - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note.Builder addNotesBuilder() { - return getNotesFieldBuilder().addBuilder( - io.grafeas.v1.Note.getDefaultInstance()); - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note.Builder addNotesBuilder( - int index) { - return getNotesFieldBuilder().addBuilder( - index, io.grafeas.v1.Note.getDefaultInstance()); - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public java.util.List - getNotesBuilderList() { - return getNotesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> - getNotesFieldBuilder() { - if (notesBuilder_ == null) { - notesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( - notes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - notes_ = null; - } - return notesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateNotesResponse) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateNotesResponse) - private static final io.grafeas.v1.BatchCreateNotesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateNotesResponse(); - } - - public static io.grafeas.v1.BatchCreateNotesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchCreateNotesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java deleted file mode 100644 index d59c13740d4a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface BatchCreateNotesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateNotesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - java.util.List - getNotesList(); - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - io.grafeas.v1.Note getNotes(int index); - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - int getNotesCount(); - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - java.util.List - getNotesOrBuilderList(); - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java deleted file mode 100644 index 26827deffd40..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java +++ /dev/null @@ -1,1033 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to create occurrences in batch.
- * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesRequest} - */ -public final class BatchCreateOccurrencesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateOccurrencesRequest) - BatchCreateOccurrencesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchCreateOccurrencesRequest.newBuilder() to construct. - private BatchCreateOccurrencesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchCreateOccurrencesRequest() { - parent_ = ""; - occurrences_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchCreateOccurrencesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateOccurrencesRequest.class, io.grafeas.v1.BatchCreateOccurrencesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrences are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrences are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OCCURRENCES_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List occurrences_; - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getOccurrencesList() { - return occurrences_; - } - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getOccurrencesOrBuilderList() { - return occurrences_; - } - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getOccurrencesCount() { - return occurrences_.size(); - } - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.Occurrence getOccurrences(int index) { - return occurrences_.get(index); - } - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - return occurrences_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - for (int i = 0; i < occurrences_.size(); i++) { - output.writeMessage(2, occurrences_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - for (int i = 0; i < occurrences_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, occurrences_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BatchCreateOccurrencesRequest)) { - return super.equals(obj); - } - io.grafeas.v1.BatchCreateOccurrencesRequest other = (io.grafeas.v1.BatchCreateOccurrencesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getOccurrencesList() - .equals(other.getOccurrencesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (getOccurrencesCount() > 0) { - hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; - hash = (53 * hash) + getOccurrencesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BatchCreateOccurrencesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to create occurrences in batch.
-   * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateOccurrencesRequest) - io.grafeas.v1.BatchCreateOccurrencesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateOccurrencesRequest.class, io.grafeas.v1.BatchCreateOccurrencesRequest.Builder.class); - } - - // Construct using io.grafeas.v1.BatchCreateOccurrencesRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - } else { - occurrences_ = null; - occurrencesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesRequest getDefaultInstanceForType() { - return io.grafeas.v1.BatchCreateOccurrencesRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesRequest build() { - io.grafeas.v1.BatchCreateOccurrencesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesRequest buildPartial() { - io.grafeas.v1.BatchCreateOccurrencesRequest result = new io.grafeas.v1.BatchCreateOccurrencesRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.BatchCreateOccurrencesRequest result) { - if (occurrencesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - occurrences_ = java.util.Collections.unmodifiableList(occurrences_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.occurrences_ = occurrences_; - } else { - result.occurrences_ = occurrencesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.BatchCreateOccurrencesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BatchCreateOccurrencesRequest) { - return mergeFrom((io.grafeas.v1.BatchCreateOccurrencesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BatchCreateOccurrencesRequest other) { - if (other == io.grafeas.v1.BatchCreateOccurrencesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (occurrencesBuilder_ == null) { - if (!other.occurrences_.isEmpty()) { - if (occurrences_.isEmpty()) { - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureOccurrencesIsMutable(); - occurrences_.addAll(other.occurrences_); - } - onChanged(); - } - } else { - if (!other.occurrences_.isEmpty()) { - if (occurrencesBuilder_.isEmpty()) { - occurrencesBuilder_.dispose(); - occurrencesBuilder_ = null; - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000002); - occurrencesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getOccurrencesFieldBuilder() : null; - } else { - occurrencesBuilder_.addAllMessages(other.occurrences_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - io.grafeas.v1.Occurrence m = - input.readMessage( - io.grafeas.v1.Occurrence.parser(), - extensionRegistry); - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(m); - } else { - occurrencesBuilder_.addMessage(m); - } - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrences are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrences are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrences are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrences are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrences are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List occurrences_ = - java.util.Collections.emptyList(); - private void ensureOccurrencesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - occurrences_ = new java.util.ArrayList(occurrences_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; - - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getOccurrencesList() { - if (occurrencesBuilder_ == null) { - return java.util.Collections.unmodifiableList(occurrences_); - } else { - return occurrencesBuilder_.getMessageList(); - } - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getOccurrencesCount() { - if (occurrencesBuilder_ == null) { - return occurrences_.size(); - } else { - return occurrencesBuilder_.getCount(); - } - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Occurrence getOccurrences(int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); - } else { - return occurrencesBuilder_.getMessage(index); - } - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.set(index, value); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.set(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addOccurrences(io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(index, value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addOccurrences( - io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllOccurrences( - java.lang.Iterable values) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, occurrences_); - onChanged(); - } else { - occurrencesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearOccurrences() { - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - occurrencesBuilder_.clear(); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeOccurrences(int index) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.remove(index); - onChanged(); - } else { - occurrencesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().getBuilder(index); - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); } else { - return occurrencesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getOccurrencesOrBuilderList() { - if (occurrencesBuilder_ != null) { - return occurrencesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(occurrences_); - } - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { - return getOccurrencesFieldBuilder().addBuilder( - io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().addBuilder( - index, io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getOccurrencesBuilderList() { - return getOccurrencesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> - getOccurrencesFieldBuilder() { - if (occurrencesBuilder_ == null) { - occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( - occurrences_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - occurrences_ = null; - } - return occurrencesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateOccurrencesRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateOccurrencesRequest) - private static final io.grafeas.v1.BatchCreateOccurrencesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateOccurrencesRequest(); - } - - public static io.grafeas.v1.BatchCreateOccurrencesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchCreateOccurrencesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java deleted file mode 100644 index 34f9b79bdd4e..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface BatchCreateOccurrencesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateOccurrencesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrences are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrences are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getOccurrencesList(); - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - io.grafeas.v1.Occurrence getOccurrences(int index); - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - int getOccurrencesCount(); - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getOccurrencesOrBuilderList(); - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java deleted file mode 100644 index db2c5a911e7b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java +++ /dev/null @@ -1,862 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Response for creating occurrences in batch.
- * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesResponse} - */ -public final class BatchCreateOccurrencesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateOccurrencesResponse) - BatchCreateOccurrencesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchCreateOccurrencesResponse.newBuilder() to construct. - private BatchCreateOccurrencesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchCreateOccurrencesResponse() { - occurrences_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchCreateOccurrencesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateOccurrencesResponse.class, io.grafeas.v1.BatchCreateOccurrencesResponse.Builder.class); - } - - public static final int OCCURRENCES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List occurrences_; - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public java.util.List getOccurrencesList() { - return occurrences_; - } - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public java.util.List - getOccurrencesOrBuilderList() { - return occurrences_; - } - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public int getOccurrencesCount() { - return occurrences_.size(); - } - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public io.grafeas.v1.Occurrence getOccurrences(int index) { - return occurrences_.get(index); - } - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - return occurrences_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < occurrences_.size(); i++) { - output.writeMessage(1, occurrences_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < occurrences_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, occurrences_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BatchCreateOccurrencesResponse)) { - return super.equals(obj); - } - io.grafeas.v1.BatchCreateOccurrencesResponse other = (io.grafeas.v1.BatchCreateOccurrencesResponse) obj; - - if (!getOccurrencesList() - .equals(other.getOccurrencesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getOccurrencesCount() > 0) { - hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; - hash = (53 * hash) + getOccurrencesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BatchCreateOccurrencesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response for creating occurrences in batch.
-   * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateOccurrencesResponse) - io.grafeas.v1.BatchCreateOccurrencesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateOccurrencesResponse.class, io.grafeas.v1.BatchCreateOccurrencesResponse.Builder.class); - } - - // Construct using io.grafeas.v1.BatchCreateOccurrencesResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - } else { - occurrences_ = null; - occurrencesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesResponse getDefaultInstanceForType() { - return io.grafeas.v1.BatchCreateOccurrencesResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesResponse build() { - io.grafeas.v1.BatchCreateOccurrencesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesResponse buildPartial() { - io.grafeas.v1.BatchCreateOccurrencesResponse result = new io.grafeas.v1.BatchCreateOccurrencesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.BatchCreateOccurrencesResponse result) { - if (occurrencesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - occurrences_ = java.util.Collections.unmodifiableList(occurrences_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.occurrences_ = occurrences_; - } else { - result.occurrences_ = occurrencesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.BatchCreateOccurrencesResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BatchCreateOccurrencesResponse) { - return mergeFrom((io.grafeas.v1.BatchCreateOccurrencesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BatchCreateOccurrencesResponse other) { - if (other == io.grafeas.v1.BatchCreateOccurrencesResponse.getDefaultInstance()) return this; - if (occurrencesBuilder_ == null) { - if (!other.occurrences_.isEmpty()) { - if (occurrences_.isEmpty()) { - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOccurrencesIsMutable(); - occurrences_.addAll(other.occurrences_); - } - onChanged(); - } - } else { - if (!other.occurrences_.isEmpty()) { - if (occurrencesBuilder_.isEmpty()) { - occurrencesBuilder_.dispose(); - occurrencesBuilder_ = null; - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000001); - occurrencesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getOccurrencesFieldBuilder() : null; - } else { - occurrencesBuilder_.addAllMessages(other.occurrences_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.grafeas.v1.Occurrence m = - input.readMessage( - io.grafeas.v1.Occurrence.parser(), - extensionRegistry); - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(m); - } else { - occurrencesBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List occurrences_ = - java.util.Collections.emptyList(); - private void ensureOccurrencesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - occurrences_ = new java.util.ArrayList(occurrences_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; - - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List getOccurrencesList() { - if (occurrencesBuilder_ == null) { - return java.util.Collections.unmodifiableList(occurrences_); - } else { - return occurrencesBuilder_.getMessageList(); - } - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public int getOccurrencesCount() { - if (occurrencesBuilder_ == null) { - return occurrences_.size(); - } else { - return occurrencesBuilder_.getCount(); - } - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence getOccurrences(int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); - } else { - return occurrencesBuilder_.getMessage(index); - } - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.set(index, value); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.set(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences(io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(index, value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addAllOccurrences( - java.lang.Iterable values) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, occurrences_); - onChanged(); - } else { - occurrencesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder clearOccurrences() { - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - occurrencesBuilder_.clear(); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder removeOccurrences(int index) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.remove(index); - onChanged(); - } else { - occurrencesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().getBuilder(index); - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); } else { - return occurrencesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List - getOccurrencesOrBuilderList() { - if (occurrencesBuilder_ != null) { - return occurrencesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(occurrences_); - } - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { - return getOccurrencesFieldBuilder().addBuilder( - io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().addBuilder( - index, io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List - getOccurrencesBuilderList() { - return getOccurrencesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> - getOccurrencesFieldBuilder() { - if (occurrencesBuilder_ == null) { - occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( - occurrences_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - occurrences_ = null; - } - return occurrencesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateOccurrencesResponse) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateOccurrencesResponse) - private static final io.grafeas.v1.BatchCreateOccurrencesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateOccurrencesResponse(); - } - - public static io.grafeas.v1.BatchCreateOccurrencesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchCreateOccurrencesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java deleted file mode 100644 index 90337438be46..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface BatchCreateOccurrencesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateOccurrencesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - java.util.List - getOccurrencesList(); - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - io.grafeas.v1.Occurrence getOccurrences(int index); - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - int getOccurrencesCount(); - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - java.util.List - getOccurrencesOrBuilderList(); - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java deleted file mode 100644 index 090e954f45ef..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java +++ /dev/null @@ -1,74 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/build.proto - -package io.grafeas.v1; - -public final class Build { - private Build() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BuildNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BuildNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BuildOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\026grafeas/v1/build.proto\022\ngrafeas.v1\032\"gr" + - "afeas/v1/intoto_provenance.proto\032!grafea" + - "s/v1/intoto_statement.proto\032\033grafeas/v1/" + - "provenance.proto\"$\n\tBuildNote\022\027\n\017builder" + - "_version\030\001 \001(\t\"\314\001\n\017BuildOccurrence\022/\n\npr" + - "ovenance\030\001 \001(\0132\033.grafeas.v1.BuildProvena" + - "nce\022\030\n\020provenance_bytes\030\002 \001(\t\0227\n\021intoto_" + - "provenance\030\003 \001(\0132\034.grafeas.v1.InTotoProv" + - "enance\0225\n\020intoto_statement\030\004 \001(\0132\033.grafe" + - "as.v1.InTotoStatementBQ\n\rio.grafeas.v1P\001" + - "Z8google.golang.org/genproto/googleapis/" + - "grafeas/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.grafeas.v1.InTotoProvenanceProto.getDescriptor(), - io.grafeas.v1.InTotoStatementProto.getDescriptor(), - io.grafeas.v1.Provenance.getDescriptor(), - }); - internal_static_grafeas_v1_BuildNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_BuildNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BuildNote_descriptor, - new java.lang.String[] { "BuilderVersion", }); - internal_static_grafeas_v1_BuildOccurrence_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BuildOccurrence_descriptor, - new java.lang.String[] { "Provenance", "ProvenanceBytes", "IntotoProvenance", "IntotoStatement", }); - io.grafeas.v1.InTotoProvenanceProto.getDescriptor(); - io.grafeas.v1.InTotoStatementProto.getDescriptor(); - io.grafeas.v1.Provenance.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java deleted file mode 100644 index cefe7d8ac0e8..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java +++ /dev/null @@ -1,582 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/build.proto - -package io.grafeas.v1; - -/** - *
- * Note holding the version of the provider's builder and the signature of the
- * provenance message in the build details occurrence.
- * 
- * - * Protobuf type {@code grafeas.v1.BuildNote} - */ -public final class BuildNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BuildNote) - BuildNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use BuildNote.newBuilder() to construct. - private BuildNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BuildNote() { - builderVersion_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BuildNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuildNote.class, io.grafeas.v1.BuildNote.Builder.class); - } - - public static final int BUILDER_VERSION_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object builderVersion_ = ""; - /** - *
-   * Required. Immutable. Version of the builder which produced this build.
-   * 
- * - * string builder_version = 1; - * @return The builderVersion. - */ - @java.lang.Override - public java.lang.String getBuilderVersion() { - java.lang.Object ref = builderVersion_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - builderVersion_ = s; - return s; - } - } - /** - *
-   * Required. Immutable. Version of the builder which produced this build.
-   * 
- * - * string builder_version = 1; - * @return The bytes for builderVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBuilderVersionBytes() { - java.lang.Object ref = builderVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - builderVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, builderVersion_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, builderVersion_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BuildNote)) { - return super.equals(obj); - } - io.grafeas.v1.BuildNote other = (io.grafeas.v1.BuildNote) obj; - - if (!getBuilderVersion() - .equals(other.getBuilderVersion())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BUILDER_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getBuilderVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BuildNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuildNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuildNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BuildNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Note holding the version of the provider's builder and the signature of the
-   * provenance message in the build details occurrence.
-   * 
- * - * Protobuf type {@code grafeas.v1.BuildNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BuildNote) - io.grafeas.v1.BuildNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuildNote.class, io.grafeas.v1.BuildNote.Builder.class); - } - - // Construct using io.grafeas.v1.BuildNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - builderVersion_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BuildNote getDefaultInstanceForType() { - return io.grafeas.v1.BuildNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BuildNote build() { - io.grafeas.v1.BuildNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BuildNote buildPartial() { - io.grafeas.v1.BuildNote result = new io.grafeas.v1.BuildNote(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.BuildNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.builderVersion_ = builderVersion_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BuildNote) { - return mergeFrom((io.grafeas.v1.BuildNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BuildNote other) { - if (other == io.grafeas.v1.BuildNote.getDefaultInstance()) return this; - if (!other.getBuilderVersion().isEmpty()) { - builderVersion_ = other.builderVersion_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - builderVersion_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object builderVersion_ = ""; - /** - *
-     * Required. Immutable. Version of the builder which produced this build.
-     * 
- * - * string builder_version = 1; - * @return The builderVersion. - */ - public java.lang.String getBuilderVersion() { - java.lang.Object ref = builderVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - builderVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Immutable. Version of the builder which produced this build.
-     * 
- * - * string builder_version = 1; - * @return The bytes for builderVersion. - */ - public com.google.protobuf.ByteString - getBuilderVersionBytes() { - java.lang.Object ref = builderVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - builderVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Immutable. Version of the builder which produced this build.
-     * 
- * - * string builder_version = 1; - * @param value The builderVersion to set. - * @return This builder for chaining. - */ - public Builder setBuilderVersion( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - builderVersion_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. Version of the builder which produced this build.
-     * 
- * - * string builder_version = 1; - * @return This builder for chaining. - */ - public Builder clearBuilderVersion() { - builderVersion_ = getDefaultInstance().getBuilderVersion(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. Version of the builder which produced this build.
-     * 
- * - * string builder_version = 1; - * @param value The bytes for builderVersion to set. - * @return This builder for chaining. - */ - public Builder setBuilderVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - builderVersion_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BuildNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BuildNote) - private static final io.grafeas.v1.BuildNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BuildNote(); - } - - public static io.grafeas.v1.BuildNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BuildNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BuildNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java deleted file mode 100644 index bdd0c0e77f13..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/build.proto - -package io.grafeas.v1; - -public interface BuildNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BuildNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Immutable. Version of the builder which produced this build.
-   * 
- * - * string builder_version = 1; - * @return The builderVersion. - */ - java.lang.String getBuilderVersion(); - /** - *
-   * Required. Immutable. Version of the builder which produced this build.
-   * 
- * - * string builder_version = 1; - * @return The bytes for builderVersion. - */ - com.google.protobuf.ByteString - getBuilderVersionBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java deleted file mode 100644 index b026a2175e92..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java +++ /dev/null @@ -1,1378 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/build.proto - -package io.grafeas.v1; - -/** - *
- * Details of a build occurrence.
- * 
- * - * Protobuf type {@code grafeas.v1.BuildOccurrence} - */ -public final class BuildOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BuildOccurrence) - BuildOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use BuildOccurrence.newBuilder() to construct. - private BuildOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BuildOccurrence() { - provenanceBytes_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BuildOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuildOccurrence.class, io.grafeas.v1.BuildOccurrence.Builder.class); - } - - public static final int PROVENANCE_FIELD_NUMBER = 1; - private io.grafeas.v1.BuildProvenance provenance_; - /** - *
-   * The actual provenance for the build.
-   * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - * @return Whether the provenance field is set. - */ - @java.lang.Override - public boolean hasProvenance() { - return provenance_ != null; - } - /** - *
-   * The actual provenance for the build.
-   * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - * @return The provenance. - */ - @java.lang.Override - public io.grafeas.v1.BuildProvenance getProvenance() { - return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; - } - /** - *
-   * The actual provenance for the build.
-   * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - @java.lang.Override - public io.grafeas.v1.BuildProvenanceOrBuilder getProvenanceOrBuilder() { - return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; - } - - public static final int PROVENANCE_BYTES_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object provenanceBytes_ = ""; - /** - *
-   * Serialized JSON representation of the provenance, used in generating the
-   * build signature in the corresponding build note. After verifying the
-   * signature, `provenance_bytes` can be unmarshalled and compared to the
-   * provenance to confirm that it is unchanged. A base64-encoded string
-   * representation of the provenance bytes is used for the signature in order
-   * to interoperate with openssl which expects this format for signature
-   * verification.
-   * The serialized form is captured both to avoid ambiguity in how the
-   * provenance is marshalled to json as well to prevent incompatibilities with
-   * future changes.
-   * 
- * - * string provenance_bytes = 2; - * @return The provenanceBytes. - */ - @java.lang.Override - public java.lang.String getProvenanceBytes() { - java.lang.Object ref = provenanceBytes_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - provenanceBytes_ = s; - return s; - } - } - /** - *
-   * Serialized JSON representation of the provenance, used in generating the
-   * build signature in the corresponding build note. After verifying the
-   * signature, `provenance_bytes` can be unmarshalled and compared to the
-   * provenance to confirm that it is unchanged. A base64-encoded string
-   * representation of the provenance bytes is used for the signature in order
-   * to interoperate with openssl which expects this format for signature
-   * verification.
-   * The serialized form is captured both to avoid ambiguity in how the
-   * provenance is marshalled to json as well to prevent incompatibilities with
-   * future changes.
-   * 
- * - * string provenance_bytes = 2; - * @return The bytes for provenanceBytes. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProvenanceBytesBytes() { - java.lang.Object ref = provenanceBytes_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - provenanceBytes_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INTOTO_PROVENANCE_FIELD_NUMBER = 3; - private io.grafeas.v1.InTotoProvenance intotoProvenance_; - /** - *
-   * Deprecated. See InTotoStatement for the replacement.
-   * In-toto Provenance representation as defined in spec.
-   * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @return Whether the intotoProvenance field is set. - */ - @java.lang.Override - public boolean hasIntotoProvenance() { - return intotoProvenance_ != null; - } - /** - *
-   * Deprecated. See InTotoStatement for the replacement.
-   * In-toto Provenance representation as defined in spec.
-   * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @return The intotoProvenance. - */ - @java.lang.Override - public io.grafeas.v1.InTotoProvenance getIntotoProvenance() { - return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; - } - /** - *
-   * Deprecated. See InTotoStatement for the replacement.
-   * In-toto Provenance representation as defined in spec.
-   * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - @java.lang.Override - public io.grafeas.v1.InTotoProvenanceOrBuilder getIntotoProvenanceOrBuilder() { - return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; - } - - public static final int INTOTO_STATEMENT_FIELD_NUMBER = 4; - private io.grafeas.v1.InTotoStatement intotoStatement_; - /** - *
-   * In-toto Statement representation as defined in spec.
-   * The intoto_statement can contain any type of provenance. The serialized
-   * payload of the statement can be stored and signed in the Occurrence's
-   * envelope.
-   * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - * @return Whether the intotoStatement field is set. - */ - @java.lang.Override - public boolean hasIntotoStatement() { - return intotoStatement_ != null; - } - /** - *
-   * In-toto Statement representation as defined in spec.
-   * The intoto_statement can contain any type of provenance. The serialized
-   * payload of the statement can be stored and signed in the Occurrence's
-   * envelope.
-   * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - * @return The intotoStatement. - */ - @java.lang.Override - public io.grafeas.v1.InTotoStatement getIntotoStatement() { - return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; - } - /** - *
-   * In-toto Statement representation as defined in spec.
-   * The intoto_statement can contain any type of provenance. The serialized
-   * payload of the statement can be stored and signed in the Occurrence's
-   * envelope.
-   * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - @java.lang.Override - public io.grafeas.v1.InTotoStatementOrBuilder getIntotoStatementOrBuilder() { - return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (provenance_ != null) { - output.writeMessage(1, getProvenance()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provenanceBytes_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, provenanceBytes_); - } - if (intotoProvenance_ != null) { - output.writeMessage(3, getIntotoProvenance()); - } - if (intotoStatement_ != null) { - output.writeMessage(4, getIntotoStatement()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (provenance_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProvenance()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provenanceBytes_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, provenanceBytes_); - } - if (intotoProvenance_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getIntotoProvenance()); - } - if (intotoStatement_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getIntotoStatement()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BuildOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.BuildOccurrence other = (io.grafeas.v1.BuildOccurrence) obj; - - if (hasProvenance() != other.hasProvenance()) return false; - if (hasProvenance()) { - if (!getProvenance() - .equals(other.getProvenance())) return false; - } - if (!getProvenanceBytes() - .equals(other.getProvenanceBytes())) return false; - if (hasIntotoProvenance() != other.hasIntotoProvenance()) return false; - if (hasIntotoProvenance()) { - if (!getIntotoProvenance() - .equals(other.getIntotoProvenance())) return false; - } - if (hasIntotoStatement() != other.hasIntotoStatement()) return false; - if (hasIntotoStatement()) { - if (!getIntotoStatement() - .equals(other.getIntotoStatement())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProvenance()) { - hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; - hash = (53 * hash) + getProvenance().hashCode(); - } - hash = (37 * hash) + PROVENANCE_BYTES_FIELD_NUMBER; - hash = (53 * hash) + getProvenanceBytes().hashCode(); - if (hasIntotoProvenance()) { - hash = (37 * hash) + INTOTO_PROVENANCE_FIELD_NUMBER; - hash = (53 * hash) + getIntotoProvenance().hashCode(); - } - if (hasIntotoStatement()) { - hash = (37 * hash) + INTOTO_STATEMENT_FIELD_NUMBER; - hash = (53 * hash) + getIntotoStatement().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BuildOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuildOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuildOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BuildOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Details of a build occurrence.
-   * 
- * - * Protobuf type {@code grafeas.v1.BuildOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BuildOccurrence) - io.grafeas.v1.BuildOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuildOccurrence.class, io.grafeas.v1.BuildOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.BuildOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - provenance_ = null; - if (provenanceBuilder_ != null) { - provenanceBuilder_.dispose(); - provenanceBuilder_ = null; - } - provenanceBytes_ = ""; - intotoProvenance_ = null; - if (intotoProvenanceBuilder_ != null) { - intotoProvenanceBuilder_.dispose(); - intotoProvenanceBuilder_ = null; - } - intotoStatement_ = null; - if (intotoStatementBuilder_ != null) { - intotoStatementBuilder_.dispose(); - intotoStatementBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BuildOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BuildOccurrence build() { - io.grafeas.v1.BuildOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BuildOccurrence buildPartial() { - io.grafeas.v1.BuildOccurrence result = new io.grafeas.v1.BuildOccurrence(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.BuildOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.provenance_ = provenanceBuilder_ == null - ? provenance_ - : provenanceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.provenanceBytes_ = provenanceBytes_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.intotoProvenance_ = intotoProvenanceBuilder_ == null - ? intotoProvenance_ - : intotoProvenanceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.intotoStatement_ = intotoStatementBuilder_ == null - ? intotoStatement_ - : intotoStatementBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BuildOccurrence) { - return mergeFrom((io.grafeas.v1.BuildOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BuildOccurrence other) { - if (other == io.grafeas.v1.BuildOccurrence.getDefaultInstance()) return this; - if (other.hasProvenance()) { - mergeProvenance(other.getProvenance()); - } - if (!other.getProvenanceBytes().isEmpty()) { - provenanceBytes_ = other.provenanceBytes_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasIntotoProvenance()) { - mergeIntotoProvenance(other.getIntotoProvenance()); - } - if (other.hasIntotoStatement()) { - mergeIntotoStatement(other.getIntotoStatement()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getProvenanceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - provenanceBytes_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getIntotoProvenanceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getIntotoStatementFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.BuildProvenance provenance_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildProvenance, io.grafeas.v1.BuildProvenance.Builder, io.grafeas.v1.BuildProvenanceOrBuilder> provenanceBuilder_; - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - * @return Whether the provenance field is set. - */ - public boolean hasProvenance() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - * @return The provenance. - */ - public io.grafeas.v1.BuildProvenance getProvenance() { - if (provenanceBuilder_ == null) { - return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; - } else { - return provenanceBuilder_.getMessage(); - } - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - public Builder setProvenance(io.grafeas.v1.BuildProvenance value) { - if (provenanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - provenance_ = value; - } else { - provenanceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - public Builder setProvenance( - io.grafeas.v1.BuildProvenance.Builder builderForValue) { - if (provenanceBuilder_ == null) { - provenance_ = builderForValue.build(); - } else { - provenanceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - public Builder mergeProvenance(io.grafeas.v1.BuildProvenance value) { - if (provenanceBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - provenance_ != null && - provenance_ != io.grafeas.v1.BuildProvenance.getDefaultInstance()) { - getProvenanceBuilder().mergeFrom(value); - } else { - provenance_ = value; - } - } else { - provenanceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - public Builder clearProvenance() { - bitField0_ = (bitField0_ & ~0x00000001); - provenance_ = null; - if (provenanceBuilder_ != null) { - provenanceBuilder_.dispose(); - provenanceBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - public io.grafeas.v1.BuildProvenance.Builder getProvenanceBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getProvenanceFieldBuilder().getBuilder(); - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - public io.grafeas.v1.BuildProvenanceOrBuilder getProvenanceOrBuilder() { - if (provenanceBuilder_ != null) { - return provenanceBuilder_.getMessageOrBuilder(); - } else { - return provenance_ == null ? - io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; - } - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildProvenance, io.grafeas.v1.BuildProvenance.Builder, io.grafeas.v1.BuildProvenanceOrBuilder> - getProvenanceFieldBuilder() { - if (provenanceBuilder_ == null) { - provenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildProvenance, io.grafeas.v1.BuildProvenance.Builder, io.grafeas.v1.BuildProvenanceOrBuilder>( - getProvenance(), - getParentForChildren(), - isClean()); - provenance_ = null; - } - return provenanceBuilder_; - } - - private java.lang.Object provenanceBytes_ = ""; - /** - *
-     * Serialized JSON representation of the provenance, used in generating the
-     * build signature in the corresponding build note. After verifying the
-     * signature, `provenance_bytes` can be unmarshalled and compared to the
-     * provenance to confirm that it is unchanged. A base64-encoded string
-     * representation of the provenance bytes is used for the signature in order
-     * to interoperate with openssl which expects this format for signature
-     * verification.
-     * The serialized form is captured both to avoid ambiguity in how the
-     * provenance is marshalled to json as well to prevent incompatibilities with
-     * future changes.
-     * 
- * - * string provenance_bytes = 2; - * @return The provenanceBytes. - */ - public java.lang.String getProvenanceBytes() { - java.lang.Object ref = provenanceBytes_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - provenanceBytes_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Serialized JSON representation of the provenance, used in generating the
-     * build signature in the corresponding build note. After verifying the
-     * signature, `provenance_bytes` can be unmarshalled and compared to the
-     * provenance to confirm that it is unchanged. A base64-encoded string
-     * representation of the provenance bytes is used for the signature in order
-     * to interoperate with openssl which expects this format for signature
-     * verification.
-     * The serialized form is captured both to avoid ambiguity in how the
-     * provenance is marshalled to json as well to prevent incompatibilities with
-     * future changes.
-     * 
- * - * string provenance_bytes = 2; - * @return The bytes for provenanceBytes. - */ - public com.google.protobuf.ByteString - getProvenanceBytesBytes() { - java.lang.Object ref = provenanceBytes_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - provenanceBytes_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Serialized JSON representation of the provenance, used in generating the
-     * build signature in the corresponding build note. After verifying the
-     * signature, `provenance_bytes` can be unmarshalled and compared to the
-     * provenance to confirm that it is unchanged. A base64-encoded string
-     * representation of the provenance bytes is used for the signature in order
-     * to interoperate with openssl which expects this format for signature
-     * verification.
-     * The serialized form is captured both to avoid ambiguity in how the
-     * provenance is marshalled to json as well to prevent incompatibilities with
-     * future changes.
-     * 
- * - * string provenance_bytes = 2; - * @param value The provenanceBytes to set. - * @return This builder for chaining. - */ - public Builder setProvenanceBytes( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - provenanceBytes_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Serialized JSON representation of the provenance, used in generating the
-     * build signature in the corresponding build note. After verifying the
-     * signature, `provenance_bytes` can be unmarshalled and compared to the
-     * provenance to confirm that it is unchanged. A base64-encoded string
-     * representation of the provenance bytes is used for the signature in order
-     * to interoperate with openssl which expects this format for signature
-     * verification.
-     * The serialized form is captured both to avoid ambiguity in how the
-     * provenance is marshalled to json as well to prevent incompatibilities with
-     * future changes.
-     * 
- * - * string provenance_bytes = 2; - * @return This builder for chaining. - */ - public Builder clearProvenanceBytes() { - provenanceBytes_ = getDefaultInstance().getProvenanceBytes(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Serialized JSON representation of the provenance, used in generating the
-     * build signature in the corresponding build note. After verifying the
-     * signature, `provenance_bytes` can be unmarshalled and compared to the
-     * provenance to confirm that it is unchanged. A base64-encoded string
-     * representation of the provenance bytes is used for the signature in order
-     * to interoperate with openssl which expects this format for signature
-     * verification.
-     * The serialized form is captured both to avoid ambiguity in how the
-     * provenance is marshalled to json as well to prevent incompatibilities with
-     * future changes.
-     * 
- * - * string provenance_bytes = 2; - * @param value The bytes for provenanceBytes to set. - * @return This builder for chaining. - */ - public Builder setProvenanceBytesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - provenanceBytes_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private io.grafeas.v1.InTotoProvenance intotoProvenance_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> intotoProvenanceBuilder_; - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @return Whether the intotoProvenance field is set. - */ - public boolean hasIntotoProvenance() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @return The intotoProvenance. - */ - public io.grafeas.v1.InTotoProvenance getIntotoProvenance() { - if (intotoProvenanceBuilder_ == null) { - return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; - } else { - return intotoProvenanceBuilder_.getMessage(); - } - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - public Builder setIntotoProvenance(io.grafeas.v1.InTotoProvenance value) { - if (intotoProvenanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - intotoProvenance_ = value; - } else { - intotoProvenanceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - public Builder setIntotoProvenance( - io.grafeas.v1.InTotoProvenance.Builder builderForValue) { - if (intotoProvenanceBuilder_ == null) { - intotoProvenance_ = builderForValue.build(); - } else { - intotoProvenanceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - public Builder mergeIntotoProvenance(io.grafeas.v1.InTotoProvenance value) { - if (intotoProvenanceBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - intotoProvenance_ != null && - intotoProvenance_ != io.grafeas.v1.InTotoProvenance.getDefaultInstance()) { - getIntotoProvenanceBuilder().mergeFrom(value); - } else { - intotoProvenance_ = value; - } - } else { - intotoProvenanceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - public Builder clearIntotoProvenance() { - bitField0_ = (bitField0_ & ~0x00000004); - intotoProvenance_ = null; - if (intotoProvenanceBuilder_ != null) { - intotoProvenanceBuilder_.dispose(); - intotoProvenanceBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - public io.grafeas.v1.InTotoProvenance.Builder getIntotoProvenanceBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getIntotoProvenanceFieldBuilder().getBuilder(); - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - public io.grafeas.v1.InTotoProvenanceOrBuilder getIntotoProvenanceOrBuilder() { - if (intotoProvenanceBuilder_ != null) { - return intotoProvenanceBuilder_.getMessageOrBuilder(); - } else { - return intotoProvenance_ == null ? - io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; - } - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> - getIntotoProvenanceFieldBuilder() { - if (intotoProvenanceBuilder_ == null) { - intotoProvenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder>( - getIntotoProvenance(), - getParentForChildren(), - isClean()); - intotoProvenance_ = null; - } - return intotoProvenanceBuilder_; - } - - private io.grafeas.v1.InTotoStatement intotoStatement_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> intotoStatementBuilder_; - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - * @return Whether the intotoStatement field is set. - */ - public boolean hasIntotoStatement() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - * @return The intotoStatement. - */ - public io.grafeas.v1.InTotoStatement getIntotoStatement() { - if (intotoStatementBuilder_ == null) { - return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; - } else { - return intotoStatementBuilder_.getMessage(); - } - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - public Builder setIntotoStatement(io.grafeas.v1.InTotoStatement value) { - if (intotoStatementBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - intotoStatement_ = value; - } else { - intotoStatementBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - public Builder setIntotoStatement( - io.grafeas.v1.InTotoStatement.Builder builderForValue) { - if (intotoStatementBuilder_ == null) { - intotoStatement_ = builderForValue.build(); - } else { - intotoStatementBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - public Builder mergeIntotoStatement(io.grafeas.v1.InTotoStatement value) { - if (intotoStatementBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - intotoStatement_ != null && - intotoStatement_ != io.grafeas.v1.InTotoStatement.getDefaultInstance()) { - getIntotoStatementBuilder().mergeFrom(value); - } else { - intotoStatement_ = value; - } - } else { - intotoStatementBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - public Builder clearIntotoStatement() { - bitField0_ = (bitField0_ & ~0x00000008); - intotoStatement_ = null; - if (intotoStatementBuilder_ != null) { - intotoStatementBuilder_.dispose(); - intotoStatementBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - public io.grafeas.v1.InTotoStatement.Builder getIntotoStatementBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getIntotoStatementFieldBuilder().getBuilder(); - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - public io.grafeas.v1.InTotoStatementOrBuilder getIntotoStatementOrBuilder() { - if (intotoStatementBuilder_ != null) { - return intotoStatementBuilder_.getMessageOrBuilder(); - } else { - return intotoStatement_ == null ? - io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; - } - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> - getIntotoStatementFieldBuilder() { - if (intotoStatementBuilder_ == null) { - intotoStatementBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder>( - getIntotoStatement(), - getParentForChildren(), - isClean()); - intotoStatement_ = null; - } - return intotoStatementBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BuildOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BuildOccurrence) - private static final io.grafeas.v1.BuildOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BuildOccurrence(); - } - - public static io.grafeas.v1.BuildOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BuildOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BuildOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java deleted file mode 100644 index ee7da49a9992..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java +++ /dev/null @@ -1,140 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/build.proto - -package io.grafeas.v1; - -public interface BuildOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BuildOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The actual provenance for the build.
-   * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - * @return Whether the provenance field is set. - */ - boolean hasProvenance(); - /** - *
-   * The actual provenance for the build.
-   * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - * @return The provenance. - */ - io.grafeas.v1.BuildProvenance getProvenance(); - /** - *
-   * The actual provenance for the build.
-   * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - io.grafeas.v1.BuildProvenanceOrBuilder getProvenanceOrBuilder(); - - /** - *
-   * Serialized JSON representation of the provenance, used in generating the
-   * build signature in the corresponding build note. After verifying the
-   * signature, `provenance_bytes` can be unmarshalled and compared to the
-   * provenance to confirm that it is unchanged. A base64-encoded string
-   * representation of the provenance bytes is used for the signature in order
-   * to interoperate with openssl which expects this format for signature
-   * verification.
-   * The serialized form is captured both to avoid ambiguity in how the
-   * provenance is marshalled to json as well to prevent incompatibilities with
-   * future changes.
-   * 
- * - * string provenance_bytes = 2; - * @return The provenanceBytes. - */ - java.lang.String getProvenanceBytes(); - /** - *
-   * Serialized JSON representation of the provenance, used in generating the
-   * build signature in the corresponding build note. After verifying the
-   * signature, `provenance_bytes` can be unmarshalled and compared to the
-   * provenance to confirm that it is unchanged. A base64-encoded string
-   * representation of the provenance bytes is used for the signature in order
-   * to interoperate with openssl which expects this format for signature
-   * verification.
-   * The serialized form is captured both to avoid ambiguity in how the
-   * provenance is marshalled to json as well to prevent incompatibilities with
-   * future changes.
-   * 
- * - * string provenance_bytes = 2; - * @return The bytes for provenanceBytes. - */ - com.google.protobuf.ByteString - getProvenanceBytesBytes(); - - /** - *
-   * Deprecated. See InTotoStatement for the replacement.
-   * In-toto Provenance representation as defined in spec.
-   * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @return Whether the intotoProvenance field is set. - */ - boolean hasIntotoProvenance(); - /** - *
-   * Deprecated. See InTotoStatement for the replacement.
-   * In-toto Provenance representation as defined in spec.
-   * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @return The intotoProvenance. - */ - io.grafeas.v1.InTotoProvenance getIntotoProvenance(); - /** - *
-   * Deprecated. See InTotoStatement for the replacement.
-   * In-toto Provenance representation as defined in spec.
-   * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - io.grafeas.v1.InTotoProvenanceOrBuilder getIntotoProvenanceOrBuilder(); - - /** - *
-   * In-toto Statement representation as defined in spec.
-   * The intoto_statement can contain any type of provenance. The serialized
-   * payload of the statement can be stored and signed in the Occurrence's
-   * envelope.
-   * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - * @return Whether the intotoStatement field is set. - */ - boolean hasIntotoStatement(); - /** - *
-   * In-toto Statement representation as defined in spec.
-   * The intoto_statement can contain any type of provenance. The serialized
-   * payload of the statement can be stored and signed in the Occurrence's
-   * envelope.
-   * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - * @return The intotoStatement. - */ - io.grafeas.v1.InTotoStatement getIntotoStatement(); - /** - *
-   * In-toto Statement representation as defined in spec.
-   * The intoto_statement can contain any type of provenance. The serialized
-   * payload of the statement can be stored and signed in the Occurrence's
-   * envelope.
-   * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - io.grafeas.v1.InTotoStatementOrBuilder getIntotoStatementOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java deleted file mode 100644 index 1359a5f8fcfb..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java +++ /dev/null @@ -1,3554 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * Provenance of a build. Contains all information needed to verify the full
- * details about the build from source to completion.
- * 
- * - * Protobuf type {@code grafeas.v1.BuildProvenance} - */ -public final class BuildProvenance extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BuildProvenance) - BuildProvenanceOrBuilder { -private static final long serialVersionUID = 0L; - // Use BuildProvenance.newBuilder() to construct. - private BuildProvenance(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BuildProvenance() { - id_ = ""; - projectId_ = ""; - commands_ = java.util.Collections.emptyList(); - builtArtifacts_ = java.util.Collections.emptyList(); - creator_ = ""; - logsUri_ = ""; - triggerId_ = ""; - builderVersion_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BuildProvenance(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 12: - return internalGetBuildOptions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuildProvenance.class, io.grafeas.v1.BuildProvenance.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * Required. Unique identifier of the build.
-   * 
- * - * string id = 1; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * Required. Unique identifier of the build.
-   * 
- * - * string id = 1; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROJECT_ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object projectId_ = ""; - /** - *
-   * ID of the project.
-   * 
- * - * string project_id = 2; - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - *
-   * ID of the project.
-   * 
- * - * string project_id = 2; - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int COMMANDS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List commands_; - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - @java.lang.Override - public java.util.List getCommandsList() { - return commands_; - } - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - @java.lang.Override - public java.util.List - getCommandsOrBuilderList() { - return commands_; - } - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - @java.lang.Override - public int getCommandsCount() { - return commands_.size(); - } - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - @java.lang.Override - public io.grafeas.v1.Command getCommands(int index) { - return commands_.get(index); - } - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - @java.lang.Override - public io.grafeas.v1.CommandOrBuilder getCommandsOrBuilder( - int index) { - return commands_.get(index); - } - - public static final int BUILT_ARTIFACTS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List builtArtifacts_; - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - @java.lang.Override - public java.util.List getBuiltArtifactsList() { - return builtArtifacts_; - } - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - @java.lang.Override - public java.util.List - getBuiltArtifactsOrBuilderList() { - return builtArtifacts_; - } - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - @java.lang.Override - public int getBuiltArtifactsCount() { - return builtArtifacts_.size(); - } - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - @java.lang.Override - public io.grafeas.v1.Artifact getBuiltArtifacts(int index) { - return builtArtifacts_.get(index); - } - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - @java.lang.Override - public io.grafeas.v1.ArtifactOrBuilder getBuiltArtifactsOrBuilder( - int index) { - return builtArtifacts_.get(index); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Time at which the build was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Time at which the build was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Time at which the build was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int START_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp startTime_; - /** - *
-   * Time at which execution of the build was started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 6; - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - *
-   * Time at which execution of the build was started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 6; - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - *
-   * Time at which execution of the build was started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp endTime_; - /** - *
-   * Time at which execution of the build was finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7; - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - *
-   * Time at which execution of the build was finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7; - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - *
-   * Time at which execution of the build was finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int CREATOR_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private volatile java.lang.Object creator_ = ""; - /** - *
-   * E-mail address of the user who initiated this build. Note that this was the
-   * user's e-mail address at the time the build was initiated; this address may
-   * not represent the same end-user for all time.
-   * 
- * - * string creator = 8; - * @return The creator. - */ - @java.lang.Override - public java.lang.String getCreator() { - java.lang.Object ref = creator_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - creator_ = s; - return s; - } - } - /** - *
-   * E-mail address of the user who initiated this build. Note that this was the
-   * user's e-mail address at the time the build was initiated; this address may
-   * not represent the same end-user for all time.
-   * 
- * - * string creator = 8; - * @return The bytes for creator. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCreatorBytes() { - java.lang.Object ref = creator_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - creator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOGS_URI_FIELD_NUMBER = 9; - @SuppressWarnings("serial") - private volatile java.lang.Object logsUri_ = ""; - /** - *
-   * URI where any logs for this provenance were written.
-   * 
- * - * string logs_uri = 9; - * @return The logsUri. - */ - @java.lang.Override - public java.lang.String getLogsUri() { - java.lang.Object ref = logsUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - logsUri_ = s; - return s; - } - } - /** - *
-   * URI where any logs for this provenance were written.
-   * 
- * - * string logs_uri = 9; - * @return The bytes for logsUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLogsUriBytes() { - java.lang.Object ref = logsUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - logsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_PROVENANCE_FIELD_NUMBER = 10; - private io.grafeas.v1.Source sourceProvenance_; - /** - *
-   * Details of the Source input to the build.
-   * 
- * - * .grafeas.v1.Source source_provenance = 10; - * @return Whether the sourceProvenance field is set. - */ - @java.lang.Override - public boolean hasSourceProvenance() { - return sourceProvenance_ != null; - } - /** - *
-   * Details of the Source input to the build.
-   * 
- * - * .grafeas.v1.Source source_provenance = 10; - * @return The sourceProvenance. - */ - @java.lang.Override - public io.grafeas.v1.Source getSourceProvenance() { - return sourceProvenance_ == null ? io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; - } - /** - *
-   * Details of the Source input to the build.
-   * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - @java.lang.Override - public io.grafeas.v1.SourceOrBuilder getSourceProvenanceOrBuilder() { - return sourceProvenance_ == null ? io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; - } - - public static final int TRIGGER_ID_FIELD_NUMBER = 11; - @SuppressWarnings("serial") - private volatile java.lang.Object triggerId_ = ""; - /** - *
-   * Trigger identifier if the build was triggered automatically; empty if not.
-   * 
- * - * string trigger_id = 11; - * @return The triggerId. - */ - @java.lang.Override - public java.lang.String getTriggerId() { - java.lang.Object ref = triggerId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - triggerId_ = s; - return s; - } - } - /** - *
-   * Trigger identifier if the build was triggered automatically; empty if not.
-   * 
- * - * string trigger_id = 11; - * @return The bytes for triggerId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTriggerIdBytes() { - java.lang.Object ref = triggerId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - triggerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BUILD_OPTIONS_FIELD_NUMBER = 12; - private static final class BuildOptionsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> buildOptions_; - private com.google.protobuf.MapField - internalGetBuildOptions() { - if (buildOptions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - BuildOptionsDefaultEntryHolder.defaultEntry); - } - return buildOptions_; - } - public int getBuildOptionsCount() { - return internalGetBuildOptions().getMap().size(); - } - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public boolean containsBuildOptions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetBuildOptions().getMap().containsKey(key); - } - /** - * Use {@link #getBuildOptionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getBuildOptions() { - return getBuildOptionsMap(); - } - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public java.util.Map getBuildOptionsMap() { - return internalGetBuildOptions().getMap(); - } - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getBuildOptionsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetBuildOptions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public java.lang.String getBuildOptionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetBuildOptions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int BUILDER_VERSION_FIELD_NUMBER = 13; - @SuppressWarnings("serial") - private volatile java.lang.Object builderVersion_ = ""; - /** - *
-   * Version string of the builder at the time this build was executed.
-   * 
- * - * string builder_version = 13; - * @return The builderVersion. - */ - @java.lang.Override - public java.lang.String getBuilderVersion() { - java.lang.Object ref = builderVersion_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - builderVersion_ = s; - return s; - } - } - /** - *
-   * Version string of the builder at the time this build was executed.
-   * 
- * - * string builder_version = 13; - * @return The bytes for builderVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBuilderVersionBytes() { - java.lang.Object ref = builderVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - builderVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); - } - for (int i = 0; i < commands_.size(); i++) { - output.writeMessage(3, commands_.get(i)); - } - for (int i = 0; i < builtArtifacts_.size(); i++) { - output.writeMessage(4, builtArtifacts_.get(i)); - } - if (createTime_ != null) { - output.writeMessage(5, getCreateTime()); - } - if (startTime_ != null) { - output.writeMessage(6, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(7, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, creator_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logsUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, logsUri_); - } - if (sourceProvenance_ != null) { - output.writeMessage(10, getSourceProvenance()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, triggerId_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetBuildOptions(), - BuildOptionsDefaultEntryHolder.defaultEntry, - 12); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, builderVersion_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); - } - for (int i = 0; i < commands_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, commands_.get(i)); - } - for (int i = 0; i < builtArtifacts_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, builtArtifacts_.get(i)); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getCreateTime()); - } - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, creator_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logsUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, logsUri_); - } - if (sourceProvenance_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getSourceProvenance()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, triggerId_); - } - for (java.util.Map.Entry entry - : internalGetBuildOptions().getMap().entrySet()) { - com.google.protobuf.MapEntry - buildOptions__ = BuildOptionsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, buildOptions__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, builderVersion_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BuildProvenance)) { - return super.equals(obj); - } - io.grafeas.v1.BuildProvenance other = (io.grafeas.v1.BuildProvenance) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getProjectId() - .equals(other.getProjectId())) return false; - if (!getCommandsList() - .equals(other.getCommandsList())) return false; - if (!getBuiltArtifactsList() - .equals(other.getBuiltArtifactsList())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime() - .equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime() - .equals(other.getEndTime())) return false; - } - if (!getCreator() - .equals(other.getCreator())) return false; - if (!getLogsUri() - .equals(other.getLogsUri())) return false; - if (hasSourceProvenance() != other.hasSourceProvenance()) return false; - if (hasSourceProvenance()) { - if (!getSourceProvenance() - .equals(other.getSourceProvenance())) return false; - } - if (!getTriggerId() - .equals(other.getTriggerId())) return false; - if (!internalGetBuildOptions().equals( - other.internalGetBuildOptions())) return false; - if (!getBuilderVersion() - .equals(other.getBuilderVersion())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - if (getCommandsCount() > 0) { - hash = (37 * hash) + COMMANDS_FIELD_NUMBER; - hash = (53 * hash) + getCommandsList().hashCode(); - } - if (getBuiltArtifactsCount() > 0) { - hash = (37 * hash) + BUILT_ARTIFACTS_FIELD_NUMBER; - hash = (53 * hash) + getBuiltArtifactsList().hashCode(); - } - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + CREATOR_FIELD_NUMBER; - hash = (53 * hash) + getCreator().hashCode(); - hash = (37 * hash) + LOGS_URI_FIELD_NUMBER; - hash = (53 * hash) + getLogsUri().hashCode(); - if (hasSourceProvenance()) { - hash = (37 * hash) + SOURCE_PROVENANCE_FIELD_NUMBER; - hash = (53 * hash) + getSourceProvenance().hashCode(); - } - hash = (37 * hash) + TRIGGER_ID_FIELD_NUMBER; - hash = (53 * hash) + getTriggerId().hashCode(); - if (!internalGetBuildOptions().getMap().isEmpty()) { - hash = (37 * hash) + BUILD_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetBuildOptions().hashCode(); - } - hash = (37 * hash) + BUILDER_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getBuilderVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BuildProvenance parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildProvenance parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildProvenance parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildProvenance parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildProvenance parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildProvenance parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildProvenance parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildProvenance parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuildProvenance parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildProvenance parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuildProvenance parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildProvenance parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BuildProvenance prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Provenance of a build. Contains all information needed to verify the full
-   * details about the build from source to completion.
-   * 
- * - * Protobuf type {@code grafeas.v1.BuildProvenance} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BuildProvenance) - io.grafeas.v1.BuildProvenanceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 12: - return internalGetBuildOptions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 12: - return internalGetMutableBuildOptions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuildProvenance.class, io.grafeas.v1.BuildProvenance.Builder.class); - } - - // Construct using io.grafeas.v1.BuildProvenance.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - projectId_ = ""; - if (commandsBuilder_ == null) { - commands_ = java.util.Collections.emptyList(); - } else { - commands_ = null; - commandsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - if (builtArtifactsBuilder_ == null) { - builtArtifacts_ = java.util.Collections.emptyList(); - } else { - builtArtifacts_ = null; - builtArtifactsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - creator_ = ""; - logsUri_ = ""; - sourceProvenance_ = null; - if (sourceProvenanceBuilder_ != null) { - sourceProvenanceBuilder_.dispose(); - sourceProvenanceBuilder_ = null; - } - triggerId_ = ""; - internalGetMutableBuildOptions().clear(); - builderVersion_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BuildProvenance getDefaultInstanceForType() { - return io.grafeas.v1.BuildProvenance.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BuildProvenance build() { - io.grafeas.v1.BuildProvenance result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BuildProvenance buildPartial() { - io.grafeas.v1.BuildProvenance result = new io.grafeas.v1.BuildProvenance(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.BuildProvenance result) { - if (commandsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - commands_ = java.util.Collections.unmodifiableList(commands_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.commands_ = commands_; - } else { - result.commands_ = commandsBuilder_.build(); - } - if (builtArtifactsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - builtArtifacts_ = java.util.Collections.unmodifiableList(builtArtifacts_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.builtArtifacts_ = builtArtifacts_; - } else { - result.builtArtifacts_ = builtArtifactsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.BuildProvenance result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.projectId_ = projectId_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.createTime_ = createTimeBuilder_ == null - ? createTime_ - : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.startTime_ = startTimeBuilder_ == null - ? startTime_ - : startTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.endTime_ = endTimeBuilder_ == null - ? endTime_ - : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.creator_ = creator_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.logsUri_ = logsUri_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.sourceProvenance_ = sourceProvenanceBuilder_ == null - ? sourceProvenance_ - : sourceProvenanceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.triggerId_ = triggerId_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.buildOptions_ = internalGetBuildOptions(); - result.buildOptions_.makeImmutable(); - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.builderVersion_ = builderVersion_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BuildProvenance) { - return mergeFrom((io.grafeas.v1.BuildProvenance)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BuildProvenance other) { - if (other == io.grafeas.v1.BuildProvenance.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (commandsBuilder_ == null) { - if (!other.commands_.isEmpty()) { - if (commands_.isEmpty()) { - commands_ = other.commands_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureCommandsIsMutable(); - commands_.addAll(other.commands_); - } - onChanged(); - } - } else { - if (!other.commands_.isEmpty()) { - if (commandsBuilder_.isEmpty()) { - commandsBuilder_.dispose(); - commandsBuilder_ = null; - commands_ = other.commands_; - bitField0_ = (bitField0_ & ~0x00000004); - commandsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getCommandsFieldBuilder() : null; - } else { - commandsBuilder_.addAllMessages(other.commands_); - } - } - } - if (builtArtifactsBuilder_ == null) { - if (!other.builtArtifacts_.isEmpty()) { - if (builtArtifacts_.isEmpty()) { - builtArtifacts_ = other.builtArtifacts_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.addAll(other.builtArtifacts_); - } - onChanged(); - } - } else { - if (!other.builtArtifacts_.isEmpty()) { - if (builtArtifactsBuilder_.isEmpty()) { - builtArtifactsBuilder_.dispose(); - builtArtifactsBuilder_ = null; - builtArtifacts_ = other.builtArtifacts_; - bitField0_ = (bitField0_ & ~0x00000008); - builtArtifactsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBuiltArtifactsFieldBuilder() : null; - } else { - builtArtifactsBuilder_.addAllMessages(other.builtArtifacts_); - } - } - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (!other.getCreator().isEmpty()) { - creator_ = other.creator_; - bitField0_ |= 0x00000080; - onChanged(); - } - if (!other.getLogsUri().isEmpty()) { - logsUri_ = other.logsUri_; - bitField0_ |= 0x00000100; - onChanged(); - } - if (other.hasSourceProvenance()) { - mergeSourceProvenance(other.getSourceProvenance()); - } - if (!other.getTriggerId().isEmpty()) { - triggerId_ = other.triggerId_; - bitField0_ |= 0x00000400; - onChanged(); - } - internalGetMutableBuildOptions().mergeFrom( - other.internalGetBuildOptions()); - bitField0_ |= 0x00000800; - if (!other.getBuilderVersion().isEmpty()) { - builderVersion_ = other.builderVersion_; - bitField0_ |= 0x00001000; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - projectId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - io.grafeas.v1.Command m = - input.readMessage( - io.grafeas.v1.Command.parser(), - extensionRegistry); - if (commandsBuilder_ == null) { - ensureCommandsIsMutable(); - commands_.add(m); - } else { - commandsBuilder_.addMessage(m); - } - break; - } // case 26 - case 34: { - io.grafeas.v1.Artifact m = - input.readMessage( - io.grafeas.v1.Artifact.parser(), - extensionRegistry); - if (builtArtifactsBuilder_ == null) { - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.add(m); - } else { - builtArtifactsBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: { - input.readMessage( - getCreateTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - input.readMessage( - getStartTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - input.readMessage( - getEndTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: { - creator_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 66 - case 74: { - logsUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - break; - } // case 74 - case 82: { - input.readMessage( - getSourceProvenanceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 82 - case 90: { - triggerId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - break; - } // case 90 - case 98: { - com.google.protobuf.MapEntry - buildOptions__ = input.readMessage( - BuildOptionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableBuildOptions().getMutableMap().put( - buildOptions__.getKey(), buildOptions__.getValue()); - bitField0_ |= 0x00000800; - break; - } // case 98 - case 106: { - builderVersion_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - break; - } // case 106 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - *
-     * Required. Unique identifier of the build.
-     * 
- * - * string id = 1; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Unique identifier of the build.
-     * 
- * - * string id = 1; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Unique identifier of the build.
-     * 
- * - * string id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. Unique identifier of the build.
-     * 
- * - * string id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. Unique identifier of the build.
-     * 
- * - * string id = 1; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object projectId_ = ""; - /** - *
-     * ID of the project.
-     * 
- * - * string project_id = 2; - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * ID of the project.
-     * 
- * - * string project_id = 2; - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * ID of the project.
-     * 
- * - * string project_id = 2; - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - projectId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * ID of the project.
-     * 
- * - * string project_id = 2; - * @return This builder for chaining. - */ - public Builder clearProjectId() { - projectId_ = getDefaultInstance().getProjectId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * ID of the project.
-     * 
- * - * string project_id = 2; - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - projectId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.util.List commands_ = - java.util.Collections.emptyList(); - private void ensureCommandsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - commands_ = new java.util.ArrayList(commands_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Command, io.grafeas.v1.Command.Builder, io.grafeas.v1.CommandOrBuilder> commandsBuilder_; - - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public java.util.List getCommandsList() { - if (commandsBuilder_ == null) { - return java.util.Collections.unmodifiableList(commands_); - } else { - return commandsBuilder_.getMessageList(); - } - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public int getCommandsCount() { - if (commandsBuilder_ == null) { - return commands_.size(); - } else { - return commandsBuilder_.getCount(); - } - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public io.grafeas.v1.Command getCommands(int index) { - if (commandsBuilder_ == null) { - return commands_.get(index); - } else { - return commandsBuilder_.getMessage(index); - } - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder setCommands( - int index, io.grafeas.v1.Command value) { - if (commandsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCommandsIsMutable(); - commands_.set(index, value); - onChanged(); - } else { - commandsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder setCommands( - int index, io.grafeas.v1.Command.Builder builderForValue) { - if (commandsBuilder_ == null) { - ensureCommandsIsMutable(); - commands_.set(index, builderForValue.build()); - onChanged(); - } else { - commandsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder addCommands(io.grafeas.v1.Command value) { - if (commandsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCommandsIsMutable(); - commands_.add(value); - onChanged(); - } else { - commandsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder addCommands( - int index, io.grafeas.v1.Command value) { - if (commandsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCommandsIsMutable(); - commands_.add(index, value); - onChanged(); - } else { - commandsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder addCommands( - io.grafeas.v1.Command.Builder builderForValue) { - if (commandsBuilder_ == null) { - ensureCommandsIsMutable(); - commands_.add(builderForValue.build()); - onChanged(); - } else { - commandsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder addCommands( - int index, io.grafeas.v1.Command.Builder builderForValue) { - if (commandsBuilder_ == null) { - ensureCommandsIsMutable(); - commands_.add(index, builderForValue.build()); - onChanged(); - } else { - commandsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder addAllCommands( - java.lang.Iterable values) { - if (commandsBuilder_ == null) { - ensureCommandsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, commands_); - onChanged(); - } else { - commandsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder clearCommands() { - if (commandsBuilder_ == null) { - commands_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - commandsBuilder_.clear(); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder removeCommands(int index) { - if (commandsBuilder_ == null) { - ensureCommandsIsMutable(); - commands_.remove(index); - onChanged(); - } else { - commandsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public io.grafeas.v1.Command.Builder getCommandsBuilder( - int index) { - return getCommandsFieldBuilder().getBuilder(index); - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public io.grafeas.v1.CommandOrBuilder getCommandsOrBuilder( - int index) { - if (commandsBuilder_ == null) { - return commands_.get(index); } else { - return commandsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public java.util.List - getCommandsOrBuilderList() { - if (commandsBuilder_ != null) { - return commandsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(commands_); - } - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public io.grafeas.v1.Command.Builder addCommandsBuilder() { - return getCommandsFieldBuilder().addBuilder( - io.grafeas.v1.Command.getDefaultInstance()); - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public io.grafeas.v1.Command.Builder addCommandsBuilder( - int index) { - return getCommandsFieldBuilder().addBuilder( - index, io.grafeas.v1.Command.getDefaultInstance()); - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public java.util.List - getCommandsBuilderList() { - return getCommandsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Command, io.grafeas.v1.Command.Builder, io.grafeas.v1.CommandOrBuilder> - getCommandsFieldBuilder() { - if (commandsBuilder_ == null) { - commandsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Command, io.grafeas.v1.Command.Builder, io.grafeas.v1.CommandOrBuilder>( - commands_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - commands_ = null; - } - return commandsBuilder_; - } - - private java.util.List builtArtifacts_ = - java.util.Collections.emptyList(); - private void ensureBuiltArtifactsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - builtArtifacts_ = new java.util.ArrayList(builtArtifacts_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Artifact, io.grafeas.v1.Artifact.Builder, io.grafeas.v1.ArtifactOrBuilder> builtArtifactsBuilder_; - - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public java.util.List getBuiltArtifactsList() { - if (builtArtifactsBuilder_ == null) { - return java.util.Collections.unmodifiableList(builtArtifacts_); - } else { - return builtArtifactsBuilder_.getMessageList(); - } - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public int getBuiltArtifactsCount() { - if (builtArtifactsBuilder_ == null) { - return builtArtifacts_.size(); - } else { - return builtArtifactsBuilder_.getCount(); - } - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public io.grafeas.v1.Artifact getBuiltArtifacts(int index) { - if (builtArtifactsBuilder_ == null) { - return builtArtifacts_.get(index); - } else { - return builtArtifactsBuilder_.getMessage(index); - } - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder setBuiltArtifacts( - int index, io.grafeas.v1.Artifact value) { - if (builtArtifactsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.set(index, value); - onChanged(); - } else { - builtArtifactsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder setBuiltArtifacts( - int index, io.grafeas.v1.Artifact.Builder builderForValue) { - if (builtArtifactsBuilder_ == null) { - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.set(index, builderForValue.build()); - onChanged(); - } else { - builtArtifactsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder addBuiltArtifacts(io.grafeas.v1.Artifact value) { - if (builtArtifactsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.add(value); - onChanged(); - } else { - builtArtifactsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder addBuiltArtifacts( - int index, io.grafeas.v1.Artifact value) { - if (builtArtifactsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.add(index, value); - onChanged(); - } else { - builtArtifactsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder addBuiltArtifacts( - io.grafeas.v1.Artifact.Builder builderForValue) { - if (builtArtifactsBuilder_ == null) { - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.add(builderForValue.build()); - onChanged(); - } else { - builtArtifactsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder addBuiltArtifacts( - int index, io.grafeas.v1.Artifact.Builder builderForValue) { - if (builtArtifactsBuilder_ == null) { - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.add(index, builderForValue.build()); - onChanged(); - } else { - builtArtifactsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder addAllBuiltArtifacts( - java.lang.Iterable values) { - if (builtArtifactsBuilder_ == null) { - ensureBuiltArtifactsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, builtArtifacts_); - onChanged(); - } else { - builtArtifactsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder clearBuiltArtifacts() { - if (builtArtifactsBuilder_ == null) { - builtArtifacts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - builtArtifactsBuilder_.clear(); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder removeBuiltArtifacts(int index) { - if (builtArtifactsBuilder_ == null) { - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.remove(index); - onChanged(); - } else { - builtArtifactsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public io.grafeas.v1.Artifact.Builder getBuiltArtifactsBuilder( - int index) { - return getBuiltArtifactsFieldBuilder().getBuilder(index); - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public io.grafeas.v1.ArtifactOrBuilder getBuiltArtifactsOrBuilder( - int index) { - if (builtArtifactsBuilder_ == null) { - return builtArtifacts_.get(index); } else { - return builtArtifactsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public java.util.List - getBuiltArtifactsOrBuilderList() { - if (builtArtifactsBuilder_ != null) { - return builtArtifactsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(builtArtifacts_); - } - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public io.grafeas.v1.Artifact.Builder addBuiltArtifactsBuilder() { - return getBuiltArtifactsFieldBuilder().addBuilder( - io.grafeas.v1.Artifact.getDefaultInstance()); - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public io.grafeas.v1.Artifact.Builder addBuiltArtifactsBuilder( - int index) { - return getBuiltArtifactsFieldBuilder().addBuilder( - index, io.grafeas.v1.Artifact.getDefaultInstance()); - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public java.util.List - getBuiltArtifactsBuilderList() { - return getBuiltArtifactsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Artifact, io.grafeas.v1.Artifact.Builder, io.grafeas.v1.ArtifactOrBuilder> - getBuiltArtifactsFieldBuilder() { - if (builtArtifactsBuilder_ == null) { - builtArtifactsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Artifact, io.grafeas.v1.Artifact.Builder, io.grafeas.v1.ArtifactOrBuilder>( - builtArtifacts_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - builtArtifacts_ = null; - } - return builtArtifactsBuilder_; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - createTime_ != null && - createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000010); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - } else { - startTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - public Builder setStartTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - startTime_ != null && - startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getStartTimeBuilder().mergeFrom(value); - } else { - startTime_ = value; - } - } else { - startTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - public Builder clearStartTime() { - bitField0_ = (bitField0_ & ~0x00000020); - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getStartTime(), - getParentForChildren(), - isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - public Builder setEndTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - endTime_ != null && - endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000040); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getEndTime(), - getParentForChildren(), - isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private java.lang.Object creator_ = ""; - /** - *
-     * E-mail address of the user who initiated this build. Note that this was the
-     * user's e-mail address at the time the build was initiated; this address may
-     * not represent the same end-user for all time.
-     * 
- * - * string creator = 8; - * @return The creator. - */ - public java.lang.String getCreator() { - java.lang.Object ref = creator_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - creator_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * E-mail address of the user who initiated this build. Note that this was the
-     * user's e-mail address at the time the build was initiated; this address may
-     * not represent the same end-user for all time.
-     * 
- * - * string creator = 8; - * @return The bytes for creator. - */ - public com.google.protobuf.ByteString - getCreatorBytes() { - java.lang.Object ref = creator_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - creator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * E-mail address of the user who initiated this build. Note that this was the
-     * user's e-mail address at the time the build was initiated; this address may
-     * not represent the same end-user for all time.
-     * 
- * - * string creator = 8; - * @param value The creator to set. - * @return This builder for chaining. - */ - public Builder setCreator( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - creator_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * E-mail address of the user who initiated this build. Note that this was the
-     * user's e-mail address at the time the build was initiated; this address may
-     * not represent the same end-user for all time.
-     * 
- * - * string creator = 8; - * @return This builder for chaining. - */ - public Builder clearCreator() { - creator_ = getDefaultInstance().getCreator(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - /** - *
-     * E-mail address of the user who initiated this build. Note that this was the
-     * user's e-mail address at the time the build was initiated; this address may
-     * not represent the same end-user for all time.
-     * 
- * - * string creator = 8; - * @param value The bytes for creator to set. - * @return This builder for chaining. - */ - public Builder setCreatorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - creator_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - private java.lang.Object logsUri_ = ""; - /** - *
-     * URI where any logs for this provenance were written.
-     * 
- * - * string logs_uri = 9; - * @return The logsUri. - */ - public java.lang.String getLogsUri() { - java.lang.Object ref = logsUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - logsUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * URI where any logs for this provenance were written.
-     * 
- * - * string logs_uri = 9; - * @return The bytes for logsUri. - */ - public com.google.protobuf.ByteString - getLogsUriBytes() { - java.lang.Object ref = logsUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - logsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * URI where any logs for this provenance were written.
-     * 
- * - * string logs_uri = 9; - * @param value The logsUri to set. - * @return This builder for chaining. - */ - public Builder setLogsUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - logsUri_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * URI where any logs for this provenance were written.
-     * 
- * - * string logs_uri = 9; - * @return This builder for chaining. - */ - public Builder clearLogsUri() { - logsUri_ = getDefaultInstance().getLogsUri(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - *
-     * URI where any logs for this provenance were written.
-     * 
- * - * string logs_uri = 9; - * @param value The bytes for logsUri to set. - * @return This builder for chaining. - */ - public Builder setLogsUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - logsUri_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - private io.grafeas.v1.Source sourceProvenance_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Source, io.grafeas.v1.Source.Builder, io.grafeas.v1.SourceOrBuilder> sourceProvenanceBuilder_; - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - * @return Whether the sourceProvenance field is set. - */ - public boolean hasSourceProvenance() { - return ((bitField0_ & 0x00000200) != 0); - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - * @return The sourceProvenance. - */ - public io.grafeas.v1.Source getSourceProvenance() { - if (sourceProvenanceBuilder_ == null) { - return sourceProvenance_ == null ? io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; - } else { - return sourceProvenanceBuilder_.getMessage(); - } - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - public Builder setSourceProvenance(io.grafeas.v1.Source value) { - if (sourceProvenanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sourceProvenance_ = value; - } else { - sourceProvenanceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - public Builder setSourceProvenance( - io.grafeas.v1.Source.Builder builderForValue) { - if (sourceProvenanceBuilder_ == null) { - sourceProvenance_ = builderForValue.build(); - } else { - sourceProvenanceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - public Builder mergeSourceProvenance(io.grafeas.v1.Source value) { - if (sourceProvenanceBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) && - sourceProvenance_ != null && - sourceProvenance_ != io.grafeas.v1.Source.getDefaultInstance()) { - getSourceProvenanceBuilder().mergeFrom(value); - } else { - sourceProvenance_ = value; - } - } else { - sourceProvenanceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - public Builder clearSourceProvenance() { - bitField0_ = (bitField0_ & ~0x00000200); - sourceProvenance_ = null; - if (sourceProvenanceBuilder_ != null) { - sourceProvenanceBuilder_.dispose(); - sourceProvenanceBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - public io.grafeas.v1.Source.Builder getSourceProvenanceBuilder() { - bitField0_ |= 0x00000200; - onChanged(); - return getSourceProvenanceFieldBuilder().getBuilder(); - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - public io.grafeas.v1.SourceOrBuilder getSourceProvenanceOrBuilder() { - if (sourceProvenanceBuilder_ != null) { - return sourceProvenanceBuilder_.getMessageOrBuilder(); - } else { - return sourceProvenance_ == null ? - io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; - } - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Source, io.grafeas.v1.Source.Builder, io.grafeas.v1.SourceOrBuilder> - getSourceProvenanceFieldBuilder() { - if (sourceProvenanceBuilder_ == null) { - sourceProvenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Source, io.grafeas.v1.Source.Builder, io.grafeas.v1.SourceOrBuilder>( - getSourceProvenance(), - getParentForChildren(), - isClean()); - sourceProvenance_ = null; - } - return sourceProvenanceBuilder_; - } - - private java.lang.Object triggerId_ = ""; - /** - *
-     * Trigger identifier if the build was triggered automatically; empty if not.
-     * 
- * - * string trigger_id = 11; - * @return The triggerId. - */ - public java.lang.String getTriggerId() { - java.lang.Object ref = triggerId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - triggerId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Trigger identifier if the build was triggered automatically; empty if not.
-     * 
- * - * string trigger_id = 11; - * @return The bytes for triggerId. - */ - public com.google.protobuf.ByteString - getTriggerIdBytes() { - java.lang.Object ref = triggerId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - triggerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Trigger identifier if the build was triggered automatically; empty if not.
-     * 
- * - * string trigger_id = 11; - * @param value The triggerId to set. - * @return This builder for chaining. - */ - public Builder setTriggerId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - triggerId_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - *
-     * Trigger identifier if the build was triggered automatically; empty if not.
-     * 
- * - * string trigger_id = 11; - * @return This builder for chaining. - */ - public Builder clearTriggerId() { - triggerId_ = getDefaultInstance().getTriggerId(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - return this; - } - /** - *
-     * Trigger identifier if the build was triggered automatically; empty if not.
-     * 
- * - * string trigger_id = 11; - * @param value The bytes for triggerId to set. - * @return This builder for chaining. - */ - public Builder setTriggerIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - triggerId_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> buildOptions_; - private com.google.protobuf.MapField - internalGetBuildOptions() { - if (buildOptions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - BuildOptionsDefaultEntryHolder.defaultEntry); - } - return buildOptions_; - } - private com.google.protobuf.MapField - internalGetMutableBuildOptions() { - if (buildOptions_ == null) { - buildOptions_ = com.google.protobuf.MapField.newMapField( - BuildOptionsDefaultEntryHolder.defaultEntry); - } - if (!buildOptions_.isMutable()) { - buildOptions_ = buildOptions_.copy(); - } - bitField0_ |= 0x00000800; - onChanged(); - return buildOptions_; - } - public int getBuildOptionsCount() { - return internalGetBuildOptions().getMap().size(); - } - /** - *
-     * Special options applied to this build. This is a catch-all field where
-     * build providers can enter any desired additional details.
-     * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public boolean containsBuildOptions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetBuildOptions().getMap().containsKey(key); - } - /** - * Use {@link #getBuildOptionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getBuildOptions() { - return getBuildOptionsMap(); - } - /** - *
-     * Special options applied to this build. This is a catch-all field where
-     * build providers can enter any desired additional details.
-     * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public java.util.Map getBuildOptionsMap() { - return internalGetBuildOptions().getMap(); - } - /** - *
-     * Special options applied to this build. This is a catch-all field where
-     * build providers can enter any desired additional details.
-     * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getBuildOptionsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetBuildOptions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Special options applied to this build. This is a catch-all field where
-     * build providers can enter any desired additional details.
-     * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public java.lang.String getBuildOptionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetBuildOptions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearBuildOptions() { - bitField0_ = (bitField0_ & ~0x00000800); - internalGetMutableBuildOptions().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Special options applied to this build. This is a catch-all field where
-     * build providers can enter any desired additional details.
-     * 
- * - * map<string, string> build_options = 12; - */ - public Builder removeBuildOptions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableBuildOptions().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableBuildOptions() { - bitField0_ |= 0x00000800; - return internalGetMutableBuildOptions().getMutableMap(); - } - /** - *
-     * Special options applied to this build. This is a catch-all field where
-     * build providers can enter any desired additional details.
-     * 
- * - * map<string, string> build_options = 12; - */ - public Builder putBuildOptions( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableBuildOptions().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000800; - return this; - } - /** - *
-     * Special options applied to this build. This is a catch-all field where
-     * build providers can enter any desired additional details.
-     * 
- * - * map<string, string> build_options = 12; - */ - public Builder putAllBuildOptions( - java.util.Map values) { - internalGetMutableBuildOptions().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000800; - return this; - } - - private java.lang.Object builderVersion_ = ""; - /** - *
-     * Version string of the builder at the time this build was executed.
-     * 
- * - * string builder_version = 13; - * @return The builderVersion. - */ - public java.lang.String getBuilderVersion() { - java.lang.Object ref = builderVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - builderVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Version string of the builder at the time this build was executed.
-     * 
- * - * string builder_version = 13; - * @return The bytes for builderVersion. - */ - public com.google.protobuf.ByteString - getBuilderVersionBytes() { - java.lang.Object ref = builderVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - builderVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Version string of the builder at the time this build was executed.
-     * 
- * - * string builder_version = 13; - * @param value The builderVersion to set. - * @return This builder for chaining. - */ - public Builder setBuilderVersion( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - builderVersion_ = value; - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - *
-     * Version string of the builder at the time this build was executed.
-     * 
- * - * string builder_version = 13; - * @return This builder for chaining. - */ - public Builder clearBuilderVersion() { - builderVersion_ = getDefaultInstance().getBuilderVersion(); - bitField0_ = (bitField0_ & ~0x00001000); - onChanged(); - return this; - } - /** - *
-     * Version string of the builder at the time this build was executed.
-     * 
- * - * string builder_version = 13; - * @param value The bytes for builderVersion to set. - * @return This builder for chaining. - */ - public Builder setBuilderVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - builderVersion_ = value; - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BuildProvenance) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BuildProvenance) - private static final io.grafeas.v1.BuildProvenance DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BuildProvenance(); - } - - public static io.grafeas.v1.BuildProvenance getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BuildProvenance parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BuildProvenance getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java deleted file mode 100644 index 9ee96a48e05b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java +++ /dev/null @@ -1,388 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface BuildProvenanceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BuildProvenance) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Unique identifier of the build.
-   * 
- * - * string id = 1; - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * Required. Unique identifier of the build.
-   * 
- * - * string id = 1; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * ID of the project.
-   * 
- * - * string project_id = 2; - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - *
-   * ID of the project.
-   * 
- * - * string project_id = 2; - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString - getProjectIdBytes(); - - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - java.util.List - getCommandsList(); - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - io.grafeas.v1.Command getCommands(int index); - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - int getCommandsCount(); - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - java.util.List - getCommandsOrBuilderList(); - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - io.grafeas.v1.CommandOrBuilder getCommandsOrBuilder( - int index); - - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - java.util.List - getBuiltArtifactsList(); - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - io.grafeas.v1.Artifact getBuiltArtifacts(int index); - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - int getBuiltArtifactsCount(); - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - java.util.List - getBuiltArtifactsOrBuilderList(); - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - io.grafeas.v1.ArtifactOrBuilder getBuiltArtifactsOrBuilder( - int index); - - /** - *
-   * Time at which the build was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Time at which the build was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Time at which the build was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Time at which execution of the build was started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 6; - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - *
-   * Time at which execution of the build was started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 6; - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - *
-   * Time at which execution of the build was started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - *
-   * Time at which execution of the build was finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7; - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - *
-   * Time at which execution of the build was finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7; - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - *
-   * Time at which execution of the build was finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - *
-   * E-mail address of the user who initiated this build. Note that this was the
-   * user's e-mail address at the time the build was initiated; this address may
-   * not represent the same end-user for all time.
-   * 
- * - * string creator = 8; - * @return The creator. - */ - java.lang.String getCreator(); - /** - *
-   * E-mail address of the user who initiated this build. Note that this was the
-   * user's e-mail address at the time the build was initiated; this address may
-   * not represent the same end-user for all time.
-   * 
- * - * string creator = 8; - * @return The bytes for creator. - */ - com.google.protobuf.ByteString - getCreatorBytes(); - - /** - *
-   * URI where any logs for this provenance were written.
-   * 
- * - * string logs_uri = 9; - * @return The logsUri. - */ - java.lang.String getLogsUri(); - /** - *
-   * URI where any logs for this provenance were written.
-   * 
- * - * string logs_uri = 9; - * @return The bytes for logsUri. - */ - com.google.protobuf.ByteString - getLogsUriBytes(); - - /** - *
-   * Details of the Source input to the build.
-   * 
- * - * .grafeas.v1.Source source_provenance = 10; - * @return Whether the sourceProvenance field is set. - */ - boolean hasSourceProvenance(); - /** - *
-   * Details of the Source input to the build.
-   * 
- * - * .grafeas.v1.Source source_provenance = 10; - * @return The sourceProvenance. - */ - io.grafeas.v1.Source getSourceProvenance(); - /** - *
-   * Details of the Source input to the build.
-   * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - io.grafeas.v1.SourceOrBuilder getSourceProvenanceOrBuilder(); - - /** - *
-   * Trigger identifier if the build was triggered automatically; empty if not.
-   * 
- * - * string trigger_id = 11; - * @return The triggerId. - */ - java.lang.String getTriggerId(); - /** - *
-   * Trigger identifier if the build was triggered automatically; empty if not.
-   * 
- * - * string trigger_id = 11; - * @return The bytes for triggerId. - */ - com.google.protobuf.ByteString - getTriggerIdBytes(); - - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - int getBuildOptionsCount(); - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - boolean containsBuildOptions( - java.lang.String key); - /** - * Use {@link #getBuildOptionsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getBuildOptions(); - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - java.util.Map - getBuildOptionsMap(); - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - /* nullable */ -java.lang.String getBuildOptionsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - java.lang.String getBuildOptionsOrThrow( - java.lang.String key); - - /** - *
-   * Version string of the builder at the time this build was executed.
-   * 
- * - * string builder_version = 13; - * @return The builderVersion. - */ - java.lang.String getBuilderVersion(); - /** - *
-   * Version string of the builder at the time this build was executed.
-   * 
- * - * string builder_version = 13; - * @return The bytes for builderVersion. - */ - com.google.protobuf.ByteString - getBuilderVersionBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java deleted file mode 100644 index 0d9adb96567b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java +++ /dev/null @@ -1,544 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.BuilderConfig} - */ -public final class BuilderConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BuilderConfig) - BuilderConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use BuilderConfig.newBuilder() to construct. - private BuilderConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BuilderConfig() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BuilderConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuilderConfig.class, io.grafeas.v1.BuilderConfig.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BuilderConfig)) { - return super.equals(obj); - } - io.grafeas.v1.BuilderConfig other = (io.grafeas.v1.BuilderConfig) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BuilderConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuilderConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuilderConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuilderConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuilderConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuilderConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuilderConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuilderConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuilderConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuilderConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuilderConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuilderConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BuilderConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.BuilderConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BuilderConfig) - io.grafeas.v1.BuilderConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuilderConfig.class, io.grafeas.v1.BuilderConfig.Builder.class); - } - - // Construct using io.grafeas.v1.BuilderConfig.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BuilderConfig getDefaultInstanceForType() { - return io.grafeas.v1.BuilderConfig.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BuilderConfig build() { - io.grafeas.v1.BuilderConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BuilderConfig buildPartial() { - io.grafeas.v1.BuilderConfig result = new io.grafeas.v1.BuilderConfig(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.BuilderConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BuilderConfig) { - return mergeFrom((io.grafeas.v1.BuilderConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BuilderConfig other) { - if (other == io.grafeas.v1.BuilderConfig.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BuilderConfig) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BuilderConfig) - private static final io.grafeas.v1.BuilderConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BuilderConfig(); - } - - public static io.grafeas.v1.BuilderConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BuilderConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BuilderConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java deleted file mode 100644 index 99554d4313c0..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java +++ /dev/null @@ -1,21 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -public interface BuilderConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BuilderConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1; - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java deleted file mode 100644 index e426740de2e1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java +++ /dev/null @@ -1,2394 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/cvss.proto - -package io.grafeas.v1; - -/** - *
- * Common Vulnerability Scoring System.
- * For details, see https://www.first.org/cvss/specification-document
- * This is a message we will try to use for storing various versions of CVSS
- * rather than making a separate proto for storing a specific version.
- * 
- * - * Protobuf type {@code grafeas.v1.CVSS} - */ -public final class CVSS extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.CVSS) - CVSSOrBuilder { -private static final long serialVersionUID = 0L; - // Use CVSS.newBuilder() to construct. - private CVSS(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CVSS() { - attackVector_ = 0; - attackComplexity_ = 0; - authentication_ = 0; - privilegesRequired_ = 0; - userInteraction_ = 0; - scope_ = 0; - confidentialityImpact_ = 0; - integrityImpact_ = 0; - availabilityImpact_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CVSS(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CVSS.class, io.grafeas.v1.CVSS.Builder.class); - } - - /** - * Protobuf enum {@code grafeas.v1.CVSS.AttackVector} - */ - public enum AttackVector - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ATTACK_VECTOR_UNSPECIFIED = 0; - */ - ATTACK_VECTOR_UNSPECIFIED(0), - /** - * ATTACK_VECTOR_NETWORK = 1; - */ - ATTACK_VECTOR_NETWORK(1), - /** - * ATTACK_VECTOR_ADJACENT = 2; - */ - ATTACK_VECTOR_ADJACENT(2), - /** - * ATTACK_VECTOR_LOCAL = 3; - */ - ATTACK_VECTOR_LOCAL(3), - /** - * ATTACK_VECTOR_PHYSICAL = 4; - */ - ATTACK_VECTOR_PHYSICAL(4), - UNRECOGNIZED(-1), - ; - - /** - * ATTACK_VECTOR_UNSPECIFIED = 0; - */ - public static final int ATTACK_VECTOR_UNSPECIFIED_VALUE = 0; - /** - * ATTACK_VECTOR_NETWORK = 1; - */ - public static final int ATTACK_VECTOR_NETWORK_VALUE = 1; - /** - * ATTACK_VECTOR_ADJACENT = 2; - */ - public static final int ATTACK_VECTOR_ADJACENT_VALUE = 2; - /** - * ATTACK_VECTOR_LOCAL = 3; - */ - public static final int ATTACK_VECTOR_LOCAL_VALUE = 3; - /** - * ATTACK_VECTOR_PHYSICAL = 4; - */ - public static final int ATTACK_VECTOR_PHYSICAL_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AttackVector valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AttackVector forNumber(int value) { - switch (value) { - case 0: return ATTACK_VECTOR_UNSPECIFIED; - case 1: return ATTACK_VECTOR_NETWORK; - case 2: return ATTACK_VECTOR_ADJACENT; - case 3: return ATTACK_VECTOR_LOCAL; - case 4: return ATTACK_VECTOR_PHYSICAL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AttackVector> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AttackVector findValueByNumber(int number) { - return AttackVector.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(0); - } - - private static final AttackVector[] VALUES = values(); - - public static AttackVector valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AttackVector(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.AttackVector) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSS.AttackComplexity} - */ - public enum AttackComplexity - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - ATTACK_COMPLEXITY_UNSPECIFIED(0), - /** - * ATTACK_COMPLEXITY_LOW = 1; - */ - ATTACK_COMPLEXITY_LOW(1), - /** - * ATTACK_COMPLEXITY_HIGH = 2; - */ - ATTACK_COMPLEXITY_HIGH(2), - UNRECOGNIZED(-1), - ; - - /** - * ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - public static final int ATTACK_COMPLEXITY_UNSPECIFIED_VALUE = 0; - /** - * ATTACK_COMPLEXITY_LOW = 1; - */ - public static final int ATTACK_COMPLEXITY_LOW_VALUE = 1; - /** - * ATTACK_COMPLEXITY_HIGH = 2; - */ - public static final int ATTACK_COMPLEXITY_HIGH_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AttackComplexity valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AttackComplexity forNumber(int value) { - switch (value) { - case 0: return ATTACK_COMPLEXITY_UNSPECIFIED; - case 1: return ATTACK_COMPLEXITY_LOW; - case 2: return ATTACK_COMPLEXITY_HIGH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AttackComplexity> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AttackComplexity findValueByNumber(int number) { - return AttackComplexity.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(1); - } - - private static final AttackComplexity[] VALUES = values(); - - public static AttackComplexity valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AttackComplexity(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.AttackComplexity) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSS.Authentication} - */ - public enum Authentication - implements com.google.protobuf.ProtocolMessageEnum { - /** - * AUTHENTICATION_UNSPECIFIED = 0; - */ - AUTHENTICATION_UNSPECIFIED(0), - /** - * AUTHENTICATION_MULTIPLE = 1; - */ - AUTHENTICATION_MULTIPLE(1), - /** - * AUTHENTICATION_SINGLE = 2; - */ - AUTHENTICATION_SINGLE(2), - /** - * AUTHENTICATION_NONE = 3; - */ - AUTHENTICATION_NONE(3), - UNRECOGNIZED(-1), - ; - - /** - * AUTHENTICATION_UNSPECIFIED = 0; - */ - public static final int AUTHENTICATION_UNSPECIFIED_VALUE = 0; - /** - * AUTHENTICATION_MULTIPLE = 1; - */ - public static final int AUTHENTICATION_MULTIPLE_VALUE = 1; - /** - * AUTHENTICATION_SINGLE = 2; - */ - public static final int AUTHENTICATION_SINGLE_VALUE = 2; - /** - * AUTHENTICATION_NONE = 3; - */ - public static final int AUTHENTICATION_NONE_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Authentication valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Authentication forNumber(int value) { - switch (value) { - case 0: return AUTHENTICATION_UNSPECIFIED; - case 1: return AUTHENTICATION_MULTIPLE; - case 2: return AUTHENTICATION_SINGLE; - case 3: return AUTHENTICATION_NONE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Authentication> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Authentication findValueByNumber(int number) { - return Authentication.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(2); - } - - private static final Authentication[] VALUES = values(); - - public static Authentication valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Authentication(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.Authentication) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSS.PrivilegesRequired} - */ - public enum PrivilegesRequired - implements com.google.protobuf.ProtocolMessageEnum { - /** - * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - PRIVILEGES_REQUIRED_UNSPECIFIED(0), - /** - * PRIVILEGES_REQUIRED_NONE = 1; - */ - PRIVILEGES_REQUIRED_NONE(1), - /** - * PRIVILEGES_REQUIRED_LOW = 2; - */ - PRIVILEGES_REQUIRED_LOW(2), - /** - * PRIVILEGES_REQUIRED_HIGH = 3; - */ - PRIVILEGES_REQUIRED_HIGH(3), - UNRECOGNIZED(-1), - ; - - /** - * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - public static final int PRIVILEGES_REQUIRED_UNSPECIFIED_VALUE = 0; - /** - * PRIVILEGES_REQUIRED_NONE = 1; - */ - public static final int PRIVILEGES_REQUIRED_NONE_VALUE = 1; - /** - * PRIVILEGES_REQUIRED_LOW = 2; - */ - public static final int PRIVILEGES_REQUIRED_LOW_VALUE = 2; - /** - * PRIVILEGES_REQUIRED_HIGH = 3; - */ - public static final int PRIVILEGES_REQUIRED_HIGH_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PrivilegesRequired valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static PrivilegesRequired forNumber(int value) { - switch (value) { - case 0: return PRIVILEGES_REQUIRED_UNSPECIFIED; - case 1: return PRIVILEGES_REQUIRED_NONE; - case 2: return PRIVILEGES_REQUIRED_LOW; - case 3: return PRIVILEGES_REQUIRED_HIGH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PrivilegesRequired> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PrivilegesRequired findValueByNumber(int number) { - return PrivilegesRequired.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(3); - } - - private static final PrivilegesRequired[] VALUES = values(); - - public static PrivilegesRequired valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private PrivilegesRequired(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.PrivilegesRequired) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSS.UserInteraction} - */ - public enum UserInteraction - implements com.google.protobuf.ProtocolMessageEnum { - /** - * USER_INTERACTION_UNSPECIFIED = 0; - */ - USER_INTERACTION_UNSPECIFIED(0), - /** - * USER_INTERACTION_NONE = 1; - */ - USER_INTERACTION_NONE(1), - /** - * USER_INTERACTION_REQUIRED = 2; - */ - USER_INTERACTION_REQUIRED(2), - UNRECOGNIZED(-1), - ; - - /** - * USER_INTERACTION_UNSPECIFIED = 0; - */ - public static final int USER_INTERACTION_UNSPECIFIED_VALUE = 0; - /** - * USER_INTERACTION_NONE = 1; - */ - public static final int USER_INTERACTION_NONE_VALUE = 1; - /** - * USER_INTERACTION_REQUIRED = 2; - */ - public static final int USER_INTERACTION_REQUIRED_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static UserInteraction valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static UserInteraction forNumber(int value) { - switch (value) { - case 0: return USER_INTERACTION_UNSPECIFIED; - case 1: return USER_INTERACTION_NONE; - case 2: return USER_INTERACTION_REQUIRED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - UserInteraction> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public UserInteraction findValueByNumber(int number) { - return UserInteraction.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(4); - } - - private static final UserInteraction[] VALUES = values(); - - public static UserInteraction valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private UserInteraction(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.UserInteraction) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSS.Scope} - */ - public enum Scope - implements com.google.protobuf.ProtocolMessageEnum { - /** - * SCOPE_UNSPECIFIED = 0; - */ - SCOPE_UNSPECIFIED(0), - /** - * SCOPE_UNCHANGED = 1; - */ - SCOPE_UNCHANGED(1), - /** - * SCOPE_CHANGED = 2; - */ - SCOPE_CHANGED(2), - UNRECOGNIZED(-1), - ; - - /** - * SCOPE_UNSPECIFIED = 0; - */ - public static final int SCOPE_UNSPECIFIED_VALUE = 0; - /** - * SCOPE_UNCHANGED = 1; - */ - public static final int SCOPE_UNCHANGED_VALUE = 1; - /** - * SCOPE_CHANGED = 2; - */ - public static final int SCOPE_CHANGED_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Scope valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Scope forNumber(int value) { - switch (value) { - case 0: return SCOPE_UNSPECIFIED; - case 1: return SCOPE_UNCHANGED; - case 2: return SCOPE_CHANGED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Scope> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Scope findValueByNumber(int number) { - return Scope.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(5); - } - - private static final Scope[] VALUES = values(); - - public static Scope valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Scope(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.Scope) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSS.Impact} - */ - public enum Impact - implements com.google.protobuf.ProtocolMessageEnum { - /** - * IMPACT_UNSPECIFIED = 0; - */ - IMPACT_UNSPECIFIED(0), - /** - * IMPACT_HIGH = 1; - */ - IMPACT_HIGH(1), - /** - * IMPACT_LOW = 2; - */ - IMPACT_LOW(2), - /** - * IMPACT_NONE = 3; - */ - IMPACT_NONE(3), - UNRECOGNIZED(-1), - ; - - /** - * IMPACT_UNSPECIFIED = 0; - */ - public static final int IMPACT_UNSPECIFIED_VALUE = 0; - /** - * IMPACT_HIGH = 1; - */ - public static final int IMPACT_HIGH_VALUE = 1; - /** - * IMPACT_LOW = 2; - */ - public static final int IMPACT_LOW_VALUE = 2; - /** - * IMPACT_NONE = 3; - */ - public static final int IMPACT_NONE_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Impact valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Impact forNumber(int value) { - switch (value) { - case 0: return IMPACT_UNSPECIFIED; - case 1: return IMPACT_HIGH; - case 2: return IMPACT_LOW; - case 3: return IMPACT_NONE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Impact> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Impact findValueByNumber(int number) { - return Impact.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(6); - } - - private static final Impact[] VALUES = values(); - - public static Impact valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Impact(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.Impact) - } - - public static final int BASE_SCORE_FIELD_NUMBER = 1; - private float baseScore_ = 0F; - /** - *
-   * The base score is a function of the base metric scores.
-   * 
- * - * float base_score = 1; - * @return The baseScore. - */ - @java.lang.Override - public float getBaseScore() { - return baseScore_; - } - - public static final int EXPLOITABILITY_SCORE_FIELD_NUMBER = 2; - private float exploitabilityScore_ = 0F; - /** - * float exploitability_score = 2; - * @return The exploitabilityScore. - */ - @java.lang.Override - public float getExploitabilityScore() { - return exploitabilityScore_; - } - - public static final int IMPACT_SCORE_FIELD_NUMBER = 3; - private float impactScore_ = 0F; - /** - * float impact_score = 3; - * @return The impactScore. - */ - @java.lang.Override - public float getImpactScore() { - return impactScore_; - } - - public static final int ATTACK_VECTOR_FIELD_NUMBER = 4; - private int attackVector_ = 0; - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return The enum numeric value on the wire for attackVector. - */ - @java.lang.Override public int getAttackVectorValue() { - return attackVector_; - } - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return The attackVector. - */ - @java.lang.Override public io.grafeas.v1.CVSS.AttackVector getAttackVector() { - io.grafeas.v1.CVSS.AttackVector result = io.grafeas.v1.CVSS.AttackVector.forNumber(attackVector_); - return result == null ? io.grafeas.v1.CVSS.AttackVector.UNRECOGNIZED : result; - } - - public static final int ATTACK_COMPLEXITY_FIELD_NUMBER = 5; - private int attackComplexity_ = 0; - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return The enum numeric value on the wire for attackComplexity. - */ - @java.lang.Override public int getAttackComplexityValue() { - return attackComplexity_; - } - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return The attackComplexity. - */ - @java.lang.Override public io.grafeas.v1.CVSS.AttackComplexity getAttackComplexity() { - io.grafeas.v1.CVSS.AttackComplexity result = io.grafeas.v1.CVSS.AttackComplexity.forNumber(attackComplexity_); - return result == null ? io.grafeas.v1.CVSS.AttackComplexity.UNRECOGNIZED : result; - } - - public static final int AUTHENTICATION_FIELD_NUMBER = 6; - private int authentication_ = 0; - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @return The enum numeric value on the wire for authentication. - */ - @java.lang.Override public int getAuthenticationValue() { - return authentication_; - } - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @return The authentication. - */ - @java.lang.Override public io.grafeas.v1.CVSS.Authentication getAuthentication() { - io.grafeas.v1.CVSS.Authentication result = io.grafeas.v1.CVSS.Authentication.forNumber(authentication_); - return result == null ? io.grafeas.v1.CVSS.Authentication.UNRECOGNIZED : result; - } - - public static final int PRIVILEGES_REQUIRED_FIELD_NUMBER = 7; - private int privilegesRequired_ = 0; - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return The enum numeric value on the wire for privilegesRequired. - */ - @java.lang.Override public int getPrivilegesRequiredValue() { - return privilegesRequired_; - } - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return The privilegesRequired. - */ - @java.lang.Override public io.grafeas.v1.CVSS.PrivilegesRequired getPrivilegesRequired() { - io.grafeas.v1.CVSS.PrivilegesRequired result = io.grafeas.v1.CVSS.PrivilegesRequired.forNumber(privilegesRequired_); - return result == null ? io.grafeas.v1.CVSS.PrivilegesRequired.UNRECOGNIZED : result; - } - - public static final int USER_INTERACTION_FIELD_NUMBER = 8; - private int userInteraction_ = 0; - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return The enum numeric value on the wire for userInteraction. - */ - @java.lang.Override public int getUserInteractionValue() { - return userInteraction_; - } - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return The userInteraction. - */ - @java.lang.Override public io.grafeas.v1.CVSS.UserInteraction getUserInteraction() { - io.grafeas.v1.CVSS.UserInteraction result = io.grafeas.v1.CVSS.UserInteraction.forNumber(userInteraction_); - return result == null ? io.grafeas.v1.CVSS.UserInteraction.UNRECOGNIZED : result; - } - - public static final int SCOPE_FIELD_NUMBER = 9; - private int scope_ = 0; - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @return The enum numeric value on the wire for scope. - */ - @java.lang.Override public int getScopeValue() { - return scope_; - } - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @return The scope. - */ - @java.lang.Override public io.grafeas.v1.CVSS.Scope getScope() { - io.grafeas.v1.CVSS.Scope result = io.grafeas.v1.CVSS.Scope.forNumber(scope_); - return result == null ? io.grafeas.v1.CVSS.Scope.UNRECOGNIZED : result; - } - - public static final int CONFIDENTIALITY_IMPACT_FIELD_NUMBER = 10; - private int confidentialityImpact_ = 0; - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return The enum numeric value on the wire for confidentialityImpact. - */ - @java.lang.Override public int getConfidentialityImpactValue() { - return confidentialityImpact_; - } - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return The confidentialityImpact. - */ - @java.lang.Override public io.grafeas.v1.CVSS.Impact getConfidentialityImpact() { - io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(confidentialityImpact_); - return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; - } - - public static final int INTEGRITY_IMPACT_FIELD_NUMBER = 11; - private int integrityImpact_ = 0; - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return The enum numeric value on the wire for integrityImpact. - */ - @java.lang.Override public int getIntegrityImpactValue() { - return integrityImpact_; - } - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return The integrityImpact. - */ - @java.lang.Override public io.grafeas.v1.CVSS.Impact getIntegrityImpact() { - io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(integrityImpact_); - return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; - } - - public static final int AVAILABILITY_IMPACT_FIELD_NUMBER = 12; - private int availabilityImpact_ = 0; - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return The enum numeric value on the wire for availabilityImpact. - */ - @java.lang.Override public int getAvailabilityImpactValue() { - return availabilityImpact_; - } - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return The availabilityImpact. - */ - @java.lang.Override public io.grafeas.v1.CVSS.Impact getAvailabilityImpact() { - io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(availabilityImpact_); - return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { - output.writeFloat(1, baseScore_); - } - if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { - output.writeFloat(2, exploitabilityScore_); - } - if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { - output.writeFloat(3, impactScore_); - } - if (attackVector_ != io.grafeas.v1.CVSS.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { - output.writeEnum(4, attackVector_); - } - if (attackComplexity_ != io.grafeas.v1.CVSS.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { - output.writeEnum(5, attackComplexity_); - } - if (authentication_ != io.grafeas.v1.CVSS.Authentication.AUTHENTICATION_UNSPECIFIED.getNumber()) { - output.writeEnum(6, authentication_); - } - if (privilegesRequired_ != io.grafeas.v1.CVSS.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { - output.writeEnum(7, privilegesRequired_); - } - if (userInteraction_ != io.grafeas.v1.CVSS.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { - output.writeEnum(8, userInteraction_); - } - if (scope_ != io.grafeas.v1.CVSS.Scope.SCOPE_UNSPECIFIED.getNumber()) { - output.writeEnum(9, scope_); - } - if (confidentialityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { - output.writeEnum(10, confidentialityImpact_); - } - if (integrityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { - output.writeEnum(11, integrityImpact_); - } - if (availabilityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { - output.writeEnum(12, availabilityImpact_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, baseScore_); - } - if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, exploitabilityScore_); - } - if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, impactScore_); - } - if (attackVector_ != io.grafeas.v1.CVSS.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, attackVector_); - } - if (attackComplexity_ != io.grafeas.v1.CVSS.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, attackComplexity_); - } - if (authentication_ != io.grafeas.v1.CVSS.Authentication.AUTHENTICATION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(6, authentication_); - } - if (privilegesRequired_ != io.grafeas.v1.CVSS.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(7, privilegesRequired_); - } - if (userInteraction_ != io.grafeas.v1.CVSS.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(8, userInteraction_); - } - if (scope_ != io.grafeas.v1.CVSS.Scope.SCOPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, scope_); - } - if (confidentialityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(10, confidentialityImpact_); - } - if (integrityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, integrityImpact_); - } - if (availabilityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(12, availabilityImpact_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.CVSS)) { - return super.equals(obj); - } - io.grafeas.v1.CVSS other = (io.grafeas.v1.CVSS) obj; - - if (java.lang.Float.floatToIntBits(getBaseScore()) - != java.lang.Float.floatToIntBits( - other.getBaseScore())) return false; - if (java.lang.Float.floatToIntBits(getExploitabilityScore()) - != java.lang.Float.floatToIntBits( - other.getExploitabilityScore())) return false; - if (java.lang.Float.floatToIntBits(getImpactScore()) - != java.lang.Float.floatToIntBits( - other.getImpactScore())) return false; - if (attackVector_ != other.attackVector_) return false; - if (attackComplexity_ != other.attackComplexity_) return false; - if (authentication_ != other.authentication_) return false; - if (privilegesRequired_ != other.privilegesRequired_) return false; - if (userInteraction_ != other.userInteraction_) return false; - if (scope_ != other.scope_) return false; - if (confidentialityImpact_ != other.confidentialityImpact_) return false; - if (integrityImpact_ != other.integrityImpact_) return false; - if (availabilityImpact_ != other.availabilityImpact_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BASE_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getBaseScore()); - hash = (37 * hash) + EXPLOITABILITY_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getExploitabilityScore()); - hash = (37 * hash) + IMPACT_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getImpactScore()); - hash = (37 * hash) + ATTACK_VECTOR_FIELD_NUMBER; - hash = (53 * hash) + attackVector_; - hash = (37 * hash) + ATTACK_COMPLEXITY_FIELD_NUMBER; - hash = (53 * hash) + attackComplexity_; - hash = (37 * hash) + AUTHENTICATION_FIELD_NUMBER; - hash = (53 * hash) + authentication_; - hash = (37 * hash) + PRIVILEGES_REQUIRED_FIELD_NUMBER; - hash = (53 * hash) + privilegesRequired_; - hash = (37 * hash) + USER_INTERACTION_FIELD_NUMBER; - hash = (53 * hash) + userInteraction_; - hash = (37 * hash) + SCOPE_FIELD_NUMBER; - hash = (53 * hash) + scope_; - hash = (37 * hash) + CONFIDENTIALITY_IMPACT_FIELD_NUMBER; - hash = (53 * hash) + confidentialityImpact_; - hash = (37 * hash) + INTEGRITY_IMPACT_FIELD_NUMBER; - hash = (53 * hash) + integrityImpact_; - hash = (37 * hash) + AVAILABILITY_IMPACT_FIELD_NUMBER; - hash = (53 * hash) + availabilityImpact_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.CVSS parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CVSS parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CVSS parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CVSS parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CVSS parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CVSS parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CVSS parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CVSS parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CVSS parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.CVSS parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CVSS parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CVSS parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.CVSS prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Common Vulnerability Scoring System.
-   * For details, see https://www.first.org/cvss/specification-document
-   * This is a message we will try to use for storing various versions of CVSS
-   * rather than making a separate proto for storing a specific version.
-   * 
- * - * Protobuf type {@code grafeas.v1.CVSS} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.CVSS) - io.grafeas.v1.CVSSOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CVSS.class, io.grafeas.v1.CVSS.Builder.class); - } - - // Construct using io.grafeas.v1.CVSS.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - baseScore_ = 0F; - exploitabilityScore_ = 0F; - impactScore_ = 0F; - attackVector_ = 0; - attackComplexity_ = 0; - authentication_ = 0; - privilegesRequired_ = 0; - userInteraction_ = 0; - scope_ = 0; - confidentialityImpact_ = 0; - integrityImpact_ = 0; - availabilityImpact_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.CVSS getDefaultInstanceForType() { - return io.grafeas.v1.CVSS.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.CVSS build() { - io.grafeas.v1.CVSS result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.CVSS buildPartial() { - io.grafeas.v1.CVSS result = new io.grafeas.v1.CVSS(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.CVSS result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.baseScore_ = baseScore_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.exploitabilityScore_ = exploitabilityScore_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.impactScore_ = impactScore_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.attackVector_ = attackVector_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.attackComplexity_ = attackComplexity_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.authentication_ = authentication_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.privilegesRequired_ = privilegesRequired_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.userInteraction_ = userInteraction_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.scope_ = scope_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.confidentialityImpact_ = confidentialityImpact_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.integrityImpact_ = integrityImpact_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.availabilityImpact_ = availabilityImpact_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.CVSS) { - return mergeFrom((io.grafeas.v1.CVSS)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.CVSS other) { - if (other == io.grafeas.v1.CVSS.getDefaultInstance()) return this; - if (other.getBaseScore() != 0F) { - setBaseScore(other.getBaseScore()); - } - if (other.getExploitabilityScore() != 0F) { - setExploitabilityScore(other.getExploitabilityScore()); - } - if (other.getImpactScore() != 0F) { - setImpactScore(other.getImpactScore()); - } - if (other.attackVector_ != 0) { - setAttackVectorValue(other.getAttackVectorValue()); - } - if (other.attackComplexity_ != 0) { - setAttackComplexityValue(other.getAttackComplexityValue()); - } - if (other.authentication_ != 0) { - setAuthenticationValue(other.getAuthenticationValue()); - } - if (other.privilegesRequired_ != 0) { - setPrivilegesRequiredValue(other.getPrivilegesRequiredValue()); - } - if (other.userInteraction_ != 0) { - setUserInteractionValue(other.getUserInteractionValue()); - } - if (other.scope_ != 0) { - setScopeValue(other.getScopeValue()); - } - if (other.confidentialityImpact_ != 0) { - setConfidentialityImpactValue(other.getConfidentialityImpactValue()); - } - if (other.integrityImpact_ != 0) { - setIntegrityImpactValue(other.getIntegrityImpactValue()); - } - if (other.availabilityImpact_ != 0) { - setAvailabilityImpactValue(other.getAvailabilityImpactValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - baseScore_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - case 21: { - exploitabilityScore_ = input.readFloat(); - bitField0_ |= 0x00000002; - break; - } // case 21 - case 29: { - impactScore_ = input.readFloat(); - bitField0_ |= 0x00000004; - break; - } // case 29 - case 32: { - attackVector_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 40: { - attackComplexity_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 48: { - authentication_ = input.readEnum(); - bitField0_ |= 0x00000020; - break; - } // case 48 - case 56: { - privilegesRequired_ = input.readEnum(); - bitField0_ |= 0x00000040; - break; - } // case 56 - case 64: { - userInteraction_ = input.readEnum(); - bitField0_ |= 0x00000080; - break; - } // case 64 - case 72: { - scope_ = input.readEnum(); - bitField0_ |= 0x00000100; - break; - } // case 72 - case 80: { - confidentialityImpact_ = input.readEnum(); - bitField0_ |= 0x00000200; - break; - } // case 80 - case 88: { - integrityImpact_ = input.readEnum(); - bitField0_ |= 0x00000400; - break; - } // case 88 - case 96: { - availabilityImpact_ = input.readEnum(); - bitField0_ |= 0x00000800; - break; - } // case 96 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private float baseScore_ ; - /** - *
-     * The base score is a function of the base metric scores.
-     * 
- * - * float base_score = 1; - * @return The baseScore. - */ - @java.lang.Override - public float getBaseScore() { - return baseScore_; - } - /** - *
-     * The base score is a function of the base metric scores.
-     * 
- * - * float base_score = 1; - * @param value The baseScore to set. - * @return This builder for chaining. - */ - public Builder setBaseScore(float value) { - - baseScore_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The base score is a function of the base metric scores.
-     * 
- * - * float base_score = 1; - * @return This builder for chaining. - */ - public Builder clearBaseScore() { - bitField0_ = (bitField0_ & ~0x00000001); - baseScore_ = 0F; - onChanged(); - return this; - } - - private float exploitabilityScore_ ; - /** - * float exploitability_score = 2; - * @return The exploitabilityScore. - */ - @java.lang.Override - public float getExploitabilityScore() { - return exploitabilityScore_; - } - /** - * float exploitability_score = 2; - * @param value The exploitabilityScore to set. - * @return This builder for chaining. - */ - public Builder setExploitabilityScore(float value) { - - exploitabilityScore_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * float exploitability_score = 2; - * @return This builder for chaining. - */ - public Builder clearExploitabilityScore() { - bitField0_ = (bitField0_ & ~0x00000002); - exploitabilityScore_ = 0F; - onChanged(); - return this; - } - - private float impactScore_ ; - /** - * float impact_score = 3; - * @return The impactScore. - */ - @java.lang.Override - public float getImpactScore() { - return impactScore_; - } - /** - * float impact_score = 3; - * @param value The impactScore to set. - * @return This builder for chaining. - */ - public Builder setImpactScore(float value) { - - impactScore_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * float impact_score = 3; - * @return This builder for chaining. - */ - public Builder clearImpactScore() { - bitField0_ = (bitField0_ & ~0x00000004); - impactScore_ = 0F; - onChanged(); - return this; - } - - private int attackVector_ = 0; - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return The enum numeric value on the wire for attackVector. - */ - @java.lang.Override public int getAttackVectorValue() { - return attackVector_; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @param value The enum numeric value on the wire for attackVector to set. - * @return This builder for chaining. - */ - public Builder setAttackVectorValue(int value) { - attackVector_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return The attackVector. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.AttackVector getAttackVector() { - io.grafeas.v1.CVSS.AttackVector result = io.grafeas.v1.CVSS.AttackVector.forNumber(attackVector_); - return result == null ? io.grafeas.v1.CVSS.AttackVector.UNRECOGNIZED : result; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @param value The attackVector to set. - * @return This builder for chaining. - */ - public Builder setAttackVector(io.grafeas.v1.CVSS.AttackVector value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - attackVector_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return This builder for chaining. - */ - public Builder clearAttackVector() { - bitField0_ = (bitField0_ & ~0x00000008); - attackVector_ = 0; - onChanged(); - return this; - } - - private int attackComplexity_ = 0; - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return The enum numeric value on the wire for attackComplexity. - */ - @java.lang.Override public int getAttackComplexityValue() { - return attackComplexity_; - } - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @param value The enum numeric value on the wire for attackComplexity to set. - * @return This builder for chaining. - */ - public Builder setAttackComplexityValue(int value) { - attackComplexity_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return The attackComplexity. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.AttackComplexity getAttackComplexity() { - io.grafeas.v1.CVSS.AttackComplexity result = io.grafeas.v1.CVSS.AttackComplexity.forNumber(attackComplexity_); - return result == null ? io.grafeas.v1.CVSS.AttackComplexity.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @param value The attackComplexity to set. - * @return This builder for chaining. - */ - public Builder setAttackComplexity(io.grafeas.v1.CVSS.AttackComplexity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - attackComplexity_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return This builder for chaining. - */ - public Builder clearAttackComplexity() { - bitField0_ = (bitField0_ & ~0x00000010); - attackComplexity_ = 0; - onChanged(); - return this; - } - - private int authentication_ = 0; - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @return The enum numeric value on the wire for authentication. - */ - @java.lang.Override public int getAuthenticationValue() { - return authentication_; - } - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @param value The enum numeric value on the wire for authentication to set. - * @return This builder for chaining. - */ - public Builder setAuthenticationValue(int value) { - authentication_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @return The authentication. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.Authentication getAuthentication() { - io.grafeas.v1.CVSS.Authentication result = io.grafeas.v1.CVSS.Authentication.forNumber(authentication_); - return result == null ? io.grafeas.v1.CVSS.Authentication.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @param value The authentication to set. - * @return This builder for chaining. - */ - public Builder setAuthentication(io.grafeas.v1.CVSS.Authentication value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - authentication_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @return This builder for chaining. - */ - public Builder clearAuthentication() { - bitField0_ = (bitField0_ & ~0x00000020); - authentication_ = 0; - onChanged(); - return this; - } - - private int privilegesRequired_ = 0; - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return The enum numeric value on the wire for privilegesRequired. - */ - @java.lang.Override public int getPrivilegesRequiredValue() { - return privilegesRequired_; - } - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @param value The enum numeric value on the wire for privilegesRequired to set. - * @return This builder for chaining. - */ - public Builder setPrivilegesRequiredValue(int value) { - privilegesRequired_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return The privilegesRequired. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.PrivilegesRequired getPrivilegesRequired() { - io.grafeas.v1.CVSS.PrivilegesRequired result = io.grafeas.v1.CVSS.PrivilegesRequired.forNumber(privilegesRequired_); - return result == null ? io.grafeas.v1.CVSS.PrivilegesRequired.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @param value The privilegesRequired to set. - * @return This builder for chaining. - */ - public Builder setPrivilegesRequired(io.grafeas.v1.CVSS.PrivilegesRequired value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - privilegesRequired_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return This builder for chaining. - */ - public Builder clearPrivilegesRequired() { - bitField0_ = (bitField0_ & ~0x00000040); - privilegesRequired_ = 0; - onChanged(); - return this; - } - - private int userInteraction_ = 0; - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return The enum numeric value on the wire for userInteraction. - */ - @java.lang.Override public int getUserInteractionValue() { - return userInteraction_; - } - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @param value The enum numeric value on the wire for userInteraction to set. - * @return This builder for chaining. - */ - public Builder setUserInteractionValue(int value) { - userInteraction_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return The userInteraction. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.UserInteraction getUserInteraction() { - io.grafeas.v1.CVSS.UserInteraction result = io.grafeas.v1.CVSS.UserInteraction.forNumber(userInteraction_); - return result == null ? io.grafeas.v1.CVSS.UserInteraction.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @param value The userInteraction to set. - * @return This builder for chaining. - */ - public Builder setUserInteraction(io.grafeas.v1.CVSS.UserInteraction value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - userInteraction_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return This builder for chaining. - */ - public Builder clearUserInteraction() { - bitField0_ = (bitField0_ & ~0x00000080); - userInteraction_ = 0; - onChanged(); - return this; - } - - private int scope_ = 0; - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @return The enum numeric value on the wire for scope. - */ - @java.lang.Override public int getScopeValue() { - return scope_; - } - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @param value The enum numeric value on the wire for scope to set. - * @return This builder for chaining. - */ - public Builder setScopeValue(int value) { - scope_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @return The scope. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.Scope getScope() { - io.grafeas.v1.CVSS.Scope result = io.grafeas.v1.CVSS.Scope.forNumber(scope_); - return result == null ? io.grafeas.v1.CVSS.Scope.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @param value The scope to set. - * @return This builder for chaining. - */ - public Builder setScope(io.grafeas.v1.CVSS.Scope value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - scope_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @return This builder for chaining. - */ - public Builder clearScope() { - bitField0_ = (bitField0_ & ~0x00000100); - scope_ = 0; - onChanged(); - return this; - } - - private int confidentialityImpact_ = 0; - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return The enum numeric value on the wire for confidentialityImpact. - */ - @java.lang.Override public int getConfidentialityImpactValue() { - return confidentialityImpact_; - } - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @param value The enum numeric value on the wire for confidentialityImpact to set. - * @return This builder for chaining. - */ - public Builder setConfidentialityImpactValue(int value) { - confidentialityImpact_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return The confidentialityImpact. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.Impact getConfidentialityImpact() { - io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(confidentialityImpact_); - return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @param value The confidentialityImpact to set. - * @return This builder for chaining. - */ - public Builder setConfidentialityImpact(io.grafeas.v1.CVSS.Impact value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; - confidentialityImpact_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return This builder for chaining. - */ - public Builder clearConfidentialityImpact() { - bitField0_ = (bitField0_ & ~0x00000200); - confidentialityImpact_ = 0; - onChanged(); - return this; - } - - private int integrityImpact_ = 0; - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return The enum numeric value on the wire for integrityImpact. - */ - @java.lang.Override public int getIntegrityImpactValue() { - return integrityImpact_; - } - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @param value The enum numeric value on the wire for integrityImpact to set. - * @return This builder for chaining. - */ - public Builder setIntegrityImpactValue(int value) { - integrityImpact_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return The integrityImpact. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.Impact getIntegrityImpact() { - io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(integrityImpact_); - return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @param value The integrityImpact to set. - * @return This builder for chaining. - */ - public Builder setIntegrityImpact(io.grafeas.v1.CVSS.Impact value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - integrityImpact_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return This builder for chaining. - */ - public Builder clearIntegrityImpact() { - bitField0_ = (bitField0_ & ~0x00000400); - integrityImpact_ = 0; - onChanged(); - return this; - } - - private int availabilityImpact_ = 0; - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return The enum numeric value on the wire for availabilityImpact. - */ - @java.lang.Override public int getAvailabilityImpactValue() { - return availabilityImpact_; - } - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @param value The enum numeric value on the wire for availabilityImpact to set. - * @return This builder for chaining. - */ - public Builder setAvailabilityImpactValue(int value) { - availabilityImpact_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return The availabilityImpact. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.Impact getAvailabilityImpact() { - io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(availabilityImpact_); - return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @param value The availabilityImpact to set. - * @return This builder for chaining. - */ - public Builder setAvailabilityImpact(io.grafeas.v1.CVSS.Impact value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000800; - availabilityImpact_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return This builder for chaining. - */ - public Builder clearAvailabilityImpact() { - bitField0_ = (bitField0_ & ~0x00000800); - availabilityImpact_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.CVSS) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.CVSS) - private static final io.grafeas.v1.CVSS DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.CVSS(); - } - - public static io.grafeas.v1.CVSS getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CVSS parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.CVSS getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java deleted file mode 100644 index 2e8db76424dc..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java +++ /dev/null @@ -1,142 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/cvss.proto - -package io.grafeas.v1; - -public interface CVSSOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.CVSS) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The base score is a function of the base metric scores.
-   * 
- * - * float base_score = 1; - * @return The baseScore. - */ - float getBaseScore(); - - /** - * float exploitability_score = 2; - * @return The exploitabilityScore. - */ - float getExploitabilityScore(); - - /** - * float impact_score = 3; - * @return The impactScore. - */ - float getImpactScore(); - - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return The enum numeric value on the wire for attackVector. - */ - int getAttackVectorValue(); - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return The attackVector. - */ - io.grafeas.v1.CVSS.AttackVector getAttackVector(); - - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return The enum numeric value on the wire for attackComplexity. - */ - int getAttackComplexityValue(); - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return The attackComplexity. - */ - io.grafeas.v1.CVSS.AttackComplexity getAttackComplexity(); - - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @return The enum numeric value on the wire for authentication. - */ - int getAuthenticationValue(); - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @return The authentication. - */ - io.grafeas.v1.CVSS.Authentication getAuthentication(); - - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return The enum numeric value on the wire for privilegesRequired. - */ - int getPrivilegesRequiredValue(); - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return The privilegesRequired. - */ - io.grafeas.v1.CVSS.PrivilegesRequired getPrivilegesRequired(); - - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return The enum numeric value on the wire for userInteraction. - */ - int getUserInteractionValue(); - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return The userInteraction. - */ - io.grafeas.v1.CVSS.UserInteraction getUserInteraction(); - - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @return The enum numeric value on the wire for scope. - */ - int getScopeValue(); - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @return The scope. - */ - io.grafeas.v1.CVSS.Scope getScope(); - - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return The enum numeric value on the wire for confidentialityImpact. - */ - int getConfidentialityImpactValue(); - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return The confidentialityImpact. - */ - io.grafeas.v1.CVSS.Impact getConfidentialityImpact(); - - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return The enum numeric value on the wire for integrityImpact. - */ - int getIntegrityImpactValue(); - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return The integrityImpact. - */ - io.grafeas.v1.CVSS.Impact getIntegrityImpact(); - - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return The enum numeric value on the wire for availabilityImpact. - */ - int getAvailabilityImpactValue(); - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return The availabilityImpact. - */ - io.grafeas.v1.CVSS.Impact getAvailabilityImpact(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java deleted file mode 100644 index 45bcae84cede..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java +++ /dev/null @@ -1,128 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/cvss.proto - -package io.grafeas.v1; - -public final class CVSSProto { - private CVSSProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_CVSSv3_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_CVSSv3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_CVSS_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_CVSS_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\025grafeas/v1/cvss.proto\022\ngrafeas.v1\"\305\t\n\006" + - "CVSSv3\022\022\n\nbase_score\030\001 \001(\002\022\034\n\024exploitabi" + - "lity_score\030\002 \001(\002\022\024\n\014impact_score\030\003 \001(\002\0226" + - "\n\rattack_vector\030\005 \001(\0162\037.grafeas.v1.CVSSv" + - "3.AttackVector\022>\n\021attack_complexity\030\006 \001(" + - "\0162#.grafeas.v1.CVSSv3.AttackComplexity\022B" + - "\n\023privileges_required\030\007 \001(\0162%.grafeas.v1" + - ".CVSSv3.PrivilegesRequired\022<\n\020user_inter" + - "action\030\010 \001(\0162\".grafeas.v1.CVSSv3.UserInt" + - "eraction\022\'\n\005scope\030\t \001(\0162\030.grafeas.v1.CVS" + - "Sv3.Scope\0229\n\026confidentiality_impact\030\n \001(" + - "\0162\031.grafeas.v1.CVSSv3.Impact\0223\n\020integrit" + - "y_impact\030\013 \001(\0162\031.grafeas.v1.CVSSv3.Impac" + - "t\0226\n\023availability_impact\030\014 \001(\0162\031.grafeas" + - ".v1.CVSSv3.Impact\"\231\001\n\014AttackVector\022\035\n\031AT" + - "TACK_VECTOR_UNSPECIFIED\020\000\022\031\n\025ATTACK_VECT" + - "OR_NETWORK\020\001\022\032\n\026ATTACK_VECTOR_ADJACENT\020\002" + - "\022\027\n\023ATTACK_VECTOR_LOCAL\020\003\022\032\n\026ATTACK_VECT" + - "OR_PHYSICAL\020\004\"l\n\020AttackComplexity\022!\n\035ATT" + - "ACK_COMPLEXITY_UNSPECIFIED\020\000\022\031\n\025ATTACK_C" + - "OMPLEXITY_LOW\020\001\022\032\n\026ATTACK_COMPLEXITY_HIG" + - "H\020\002\"\222\001\n\022PrivilegesRequired\022#\n\037PRIVILEGES" + - "_REQUIRED_UNSPECIFIED\020\000\022\034\n\030PRIVILEGES_RE" + - "QUIRED_NONE\020\001\022\033\n\027PRIVILEGES_REQUIRED_LOW" + - "\020\002\022\034\n\030PRIVILEGES_REQUIRED_HIGH\020\003\"m\n\017User" + - "Interaction\022 \n\034USER_INTERACTION_UNSPECIF" + - "IED\020\000\022\031\n\025USER_INTERACTION_NONE\020\001\022\035\n\031USER" + - "_INTERACTION_REQUIRED\020\002\"F\n\005Scope\022\025\n\021SCOP" + - "E_UNSPECIFIED\020\000\022\023\n\017SCOPE_UNCHANGED\020\001\022\021\n\r" + - "SCOPE_CHANGED\020\002\"R\n\006Impact\022\026\n\022IMPACT_UNSP" + - "ECIFIED\020\000\022\017\n\013IMPACT_HIGH\020\001\022\016\n\nIMPACT_LOW" + - "\020\002\022\017\n\013IMPACT_NONE\020\003\"\360\n\n\004CVSS\022\022\n\nbase_sco" + - "re\030\001 \001(\002\022\034\n\024exploitability_score\030\002 \001(\002\022\024" + - "\n\014impact_score\030\003 \001(\002\0224\n\rattack_vector\030\004 " + - "\001(\0162\035.grafeas.v1.CVSS.AttackVector\022<\n\021at" + - "tack_complexity\030\005 \001(\0162!.grafeas.v1.CVSS." + - "AttackComplexity\0227\n\016authentication\030\006 \001(\016" + - "2\037.grafeas.v1.CVSS.Authentication\022@\n\023pri" + - "vileges_required\030\007 \001(\0162#.grafeas.v1.CVSS" + - ".PrivilegesRequired\022:\n\020user_interaction\030" + - "\010 \001(\0162 .grafeas.v1.CVSS.UserInteraction\022" + - "%\n\005scope\030\t \001(\0162\026.grafeas.v1.CVSS.Scope\0227" + - "\n\026confidentiality_impact\030\n \001(\0162\027.grafeas" + - ".v1.CVSS.Impact\0221\n\020integrity_impact\030\013 \001(" + - "\0162\027.grafeas.v1.CVSS.Impact\0224\n\023availabili" + - "ty_impact\030\014 \001(\0162\027.grafeas.v1.CVSS.Impact" + - "\"\231\001\n\014AttackVector\022\035\n\031ATTACK_VECTOR_UNSPE" + - "CIFIED\020\000\022\031\n\025ATTACK_VECTOR_NETWORK\020\001\022\032\n\026A" + - "TTACK_VECTOR_ADJACENT\020\002\022\027\n\023ATTACK_VECTOR" + - "_LOCAL\020\003\022\032\n\026ATTACK_VECTOR_PHYSICAL\020\004\"l\n\020" + - "AttackComplexity\022!\n\035ATTACK_COMPLEXITY_UN" + - "SPECIFIED\020\000\022\031\n\025ATTACK_COMPLEXITY_LOW\020\001\022\032" + - "\n\026ATTACK_COMPLEXITY_HIGH\020\002\"\201\001\n\016Authentic" + - "ation\022\036\n\032AUTHENTICATION_UNSPECIFIED\020\000\022\033\n" + - "\027AUTHENTICATION_MULTIPLE\020\001\022\031\n\025AUTHENTICA" + - "TION_SINGLE\020\002\022\027\n\023AUTHENTICATION_NONE\020\003\"\222" + - "\001\n\022PrivilegesRequired\022#\n\037PRIVILEGES_REQU" + - "IRED_UNSPECIFIED\020\000\022\034\n\030PRIVILEGES_REQUIRE" + - "D_NONE\020\001\022\033\n\027PRIVILEGES_REQUIRED_LOW\020\002\022\034\n" + - "\030PRIVILEGES_REQUIRED_HIGH\020\003\"m\n\017UserInter" + - "action\022 \n\034USER_INTERACTION_UNSPECIFIED\020\000" + - "\022\031\n\025USER_INTERACTION_NONE\020\001\022\035\n\031USER_INTE" + - "RACTION_REQUIRED\020\002\"F\n\005Scope\022\025\n\021SCOPE_UNS" + - "PECIFIED\020\000\022\023\n\017SCOPE_UNCHANGED\020\001\022\021\n\rSCOPE" + - "_CHANGED\020\002\"R\n\006Impact\022\026\n\022IMPACT_UNSPECIFI" + - "ED\020\000\022\017\n\013IMPACT_HIGH\020\001\022\016\n\nIMPACT_LOW\020\002\022\017\n" + - "\013IMPACT_NONE\020\003*S\n\013CVSSVersion\022\034\n\030CVSS_VE" + - "RSION_UNSPECIFIED\020\000\022\022\n\016CVSS_VERSION_2\020\001\022" + - "\022\n\016CVSS_VERSION_3\020\002B\\\n\rio.grafeas.v1B\tCV" + - "SSProtoP\001Z8google.golang.org/genproto/go" + - "ogleapis/grafeas/v1;grafeas\242\002\003GRAb\006proto" + - "3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_grafeas_v1_CVSSv3_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_CVSSv3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_CVSSv3_descriptor, - new java.lang.String[] { "BaseScore", "ExploitabilityScore", "ImpactScore", "AttackVector", "AttackComplexity", "PrivilegesRequired", "UserInteraction", "Scope", "ConfidentialityImpact", "IntegrityImpact", "AvailabilityImpact", }); - internal_static_grafeas_v1_CVSS_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_CVSS_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_CVSS_descriptor, - new java.lang.String[] { "BaseScore", "ExploitabilityScore", "ImpactScore", "AttackVector", "AttackComplexity", "Authentication", "PrivilegesRequired", "UserInteraction", "Scope", "ConfidentialityImpact", "IntegrityImpact", "AvailabilityImpact", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java deleted file mode 100644 index ce2a2a054bb1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java +++ /dev/null @@ -1,126 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/cvss.proto - -package io.grafeas.v1; - -/** - *
- * CVSS Version.
- * 
- * - * Protobuf enum {@code grafeas.v1.CVSSVersion} - */ -public enum CVSSVersion - implements com.google.protobuf.ProtocolMessageEnum { - /** - * CVSS_VERSION_UNSPECIFIED = 0; - */ - CVSS_VERSION_UNSPECIFIED(0), - /** - * CVSS_VERSION_2 = 1; - */ - CVSS_VERSION_2(1), - /** - * CVSS_VERSION_3 = 2; - */ - CVSS_VERSION_3(2), - UNRECOGNIZED(-1), - ; - - /** - * CVSS_VERSION_UNSPECIFIED = 0; - */ - public static final int CVSS_VERSION_UNSPECIFIED_VALUE = 0; - /** - * CVSS_VERSION_2 = 1; - */ - public static final int CVSS_VERSION_2_VALUE = 1; - /** - * CVSS_VERSION_3 = 2; - */ - public static final int CVSS_VERSION_3_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static CVSSVersion valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static CVSSVersion forNumber(int value) { - switch (value) { - case 0: return CVSS_VERSION_UNSPECIFIED; - case 1: return CVSS_VERSION_2; - case 2: return CVSS_VERSION_3; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - CVSSVersion> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public CVSSVersion findValueByNumber(int number) { - return CVSSVersion.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSSProto.getDescriptor().getEnumTypes().get(0); - } - - private static final CVSSVersion[] VALUES = values(); - - public static CVSSVersion valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private CVSSVersion(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSVersion) -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java deleted file mode 100644 index d23be5609fd1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java +++ /dev/null @@ -1,2170 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/cvss.proto - -package io.grafeas.v1; - -/** - *
- * Common Vulnerability Scoring System version 3.
- * For details, see https://www.first.org/cvss/specification-document
- * 
- * - * Protobuf type {@code grafeas.v1.CVSSv3} - */ -public final class CVSSv3 extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.CVSSv3) - CVSSv3OrBuilder { -private static final long serialVersionUID = 0L; - // Use CVSSv3.newBuilder() to construct. - private CVSSv3(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CVSSv3() { - attackVector_ = 0; - attackComplexity_ = 0; - privilegesRequired_ = 0; - userInteraction_ = 0; - scope_ = 0; - confidentialityImpact_ = 0; - integrityImpact_ = 0; - availabilityImpact_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CVSSv3(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CVSSv3.class, io.grafeas.v1.CVSSv3.Builder.class); - } - - /** - * Protobuf enum {@code grafeas.v1.CVSSv3.AttackVector} - */ - public enum AttackVector - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ATTACK_VECTOR_UNSPECIFIED = 0; - */ - ATTACK_VECTOR_UNSPECIFIED(0), - /** - * ATTACK_VECTOR_NETWORK = 1; - */ - ATTACK_VECTOR_NETWORK(1), - /** - * ATTACK_VECTOR_ADJACENT = 2; - */ - ATTACK_VECTOR_ADJACENT(2), - /** - * ATTACK_VECTOR_LOCAL = 3; - */ - ATTACK_VECTOR_LOCAL(3), - /** - * ATTACK_VECTOR_PHYSICAL = 4; - */ - ATTACK_VECTOR_PHYSICAL(4), - UNRECOGNIZED(-1), - ; - - /** - * ATTACK_VECTOR_UNSPECIFIED = 0; - */ - public static final int ATTACK_VECTOR_UNSPECIFIED_VALUE = 0; - /** - * ATTACK_VECTOR_NETWORK = 1; - */ - public static final int ATTACK_VECTOR_NETWORK_VALUE = 1; - /** - * ATTACK_VECTOR_ADJACENT = 2; - */ - public static final int ATTACK_VECTOR_ADJACENT_VALUE = 2; - /** - * ATTACK_VECTOR_LOCAL = 3; - */ - public static final int ATTACK_VECTOR_LOCAL_VALUE = 3; - /** - * ATTACK_VECTOR_PHYSICAL = 4; - */ - public static final int ATTACK_VECTOR_PHYSICAL_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AttackVector valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AttackVector forNumber(int value) { - switch (value) { - case 0: return ATTACK_VECTOR_UNSPECIFIED; - case 1: return ATTACK_VECTOR_NETWORK; - case 2: return ATTACK_VECTOR_ADJACENT; - case 3: return ATTACK_VECTOR_LOCAL; - case 4: return ATTACK_VECTOR_PHYSICAL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AttackVector> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AttackVector findValueByNumber(int number) { - return AttackVector.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(0); - } - - private static final AttackVector[] VALUES = values(); - - public static AttackVector valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AttackVector(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.AttackVector) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSSv3.AttackComplexity} - */ - public enum AttackComplexity - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - ATTACK_COMPLEXITY_UNSPECIFIED(0), - /** - * ATTACK_COMPLEXITY_LOW = 1; - */ - ATTACK_COMPLEXITY_LOW(1), - /** - * ATTACK_COMPLEXITY_HIGH = 2; - */ - ATTACK_COMPLEXITY_HIGH(2), - UNRECOGNIZED(-1), - ; - - /** - * ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - public static final int ATTACK_COMPLEXITY_UNSPECIFIED_VALUE = 0; - /** - * ATTACK_COMPLEXITY_LOW = 1; - */ - public static final int ATTACK_COMPLEXITY_LOW_VALUE = 1; - /** - * ATTACK_COMPLEXITY_HIGH = 2; - */ - public static final int ATTACK_COMPLEXITY_HIGH_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AttackComplexity valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AttackComplexity forNumber(int value) { - switch (value) { - case 0: return ATTACK_COMPLEXITY_UNSPECIFIED; - case 1: return ATTACK_COMPLEXITY_LOW; - case 2: return ATTACK_COMPLEXITY_HIGH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AttackComplexity> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AttackComplexity findValueByNumber(int number) { - return AttackComplexity.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(1); - } - - private static final AttackComplexity[] VALUES = values(); - - public static AttackComplexity valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AttackComplexity(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.AttackComplexity) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSSv3.PrivilegesRequired} - */ - public enum PrivilegesRequired - implements com.google.protobuf.ProtocolMessageEnum { - /** - * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - PRIVILEGES_REQUIRED_UNSPECIFIED(0), - /** - * PRIVILEGES_REQUIRED_NONE = 1; - */ - PRIVILEGES_REQUIRED_NONE(1), - /** - * PRIVILEGES_REQUIRED_LOW = 2; - */ - PRIVILEGES_REQUIRED_LOW(2), - /** - * PRIVILEGES_REQUIRED_HIGH = 3; - */ - PRIVILEGES_REQUIRED_HIGH(3), - UNRECOGNIZED(-1), - ; - - /** - * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - public static final int PRIVILEGES_REQUIRED_UNSPECIFIED_VALUE = 0; - /** - * PRIVILEGES_REQUIRED_NONE = 1; - */ - public static final int PRIVILEGES_REQUIRED_NONE_VALUE = 1; - /** - * PRIVILEGES_REQUIRED_LOW = 2; - */ - public static final int PRIVILEGES_REQUIRED_LOW_VALUE = 2; - /** - * PRIVILEGES_REQUIRED_HIGH = 3; - */ - public static final int PRIVILEGES_REQUIRED_HIGH_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PrivilegesRequired valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static PrivilegesRequired forNumber(int value) { - switch (value) { - case 0: return PRIVILEGES_REQUIRED_UNSPECIFIED; - case 1: return PRIVILEGES_REQUIRED_NONE; - case 2: return PRIVILEGES_REQUIRED_LOW; - case 3: return PRIVILEGES_REQUIRED_HIGH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PrivilegesRequired> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PrivilegesRequired findValueByNumber(int number) { - return PrivilegesRequired.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(2); - } - - private static final PrivilegesRequired[] VALUES = values(); - - public static PrivilegesRequired valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private PrivilegesRequired(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.PrivilegesRequired) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSSv3.UserInteraction} - */ - public enum UserInteraction - implements com.google.protobuf.ProtocolMessageEnum { - /** - * USER_INTERACTION_UNSPECIFIED = 0; - */ - USER_INTERACTION_UNSPECIFIED(0), - /** - * USER_INTERACTION_NONE = 1; - */ - USER_INTERACTION_NONE(1), - /** - * USER_INTERACTION_REQUIRED = 2; - */ - USER_INTERACTION_REQUIRED(2), - UNRECOGNIZED(-1), - ; - - /** - * USER_INTERACTION_UNSPECIFIED = 0; - */ - public static final int USER_INTERACTION_UNSPECIFIED_VALUE = 0; - /** - * USER_INTERACTION_NONE = 1; - */ - public static final int USER_INTERACTION_NONE_VALUE = 1; - /** - * USER_INTERACTION_REQUIRED = 2; - */ - public static final int USER_INTERACTION_REQUIRED_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static UserInteraction valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static UserInteraction forNumber(int value) { - switch (value) { - case 0: return USER_INTERACTION_UNSPECIFIED; - case 1: return USER_INTERACTION_NONE; - case 2: return USER_INTERACTION_REQUIRED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - UserInteraction> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public UserInteraction findValueByNumber(int number) { - return UserInteraction.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(3); - } - - private static final UserInteraction[] VALUES = values(); - - public static UserInteraction valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private UserInteraction(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.UserInteraction) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSSv3.Scope} - */ - public enum Scope - implements com.google.protobuf.ProtocolMessageEnum { - /** - * SCOPE_UNSPECIFIED = 0; - */ - SCOPE_UNSPECIFIED(0), - /** - * SCOPE_UNCHANGED = 1; - */ - SCOPE_UNCHANGED(1), - /** - * SCOPE_CHANGED = 2; - */ - SCOPE_CHANGED(2), - UNRECOGNIZED(-1), - ; - - /** - * SCOPE_UNSPECIFIED = 0; - */ - public static final int SCOPE_UNSPECIFIED_VALUE = 0; - /** - * SCOPE_UNCHANGED = 1; - */ - public static final int SCOPE_UNCHANGED_VALUE = 1; - /** - * SCOPE_CHANGED = 2; - */ - public static final int SCOPE_CHANGED_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Scope valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Scope forNumber(int value) { - switch (value) { - case 0: return SCOPE_UNSPECIFIED; - case 1: return SCOPE_UNCHANGED; - case 2: return SCOPE_CHANGED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Scope> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Scope findValueByNumber(int number) { - return Scope.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(4); - } - - private static final Scope[] VALUES = values(); - - public static Scope valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Scope(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.Scope) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSSv3.Impact} - */ - public enum Impact - implements com.google.protobuf.ProtocolMessageEnum { - /** - * IMPACT_UNSPECIFIED = 0; - */ - IMPACT_UNSPECIFIED(0), - /** - * IMPACT_HIGH = 1; - */ - IMPACT_HIGH(1), - /** - * IMPACT_LOW = 2; - */ - IMPACT_LOW(2), - /** - * IMPACT_NONE = 3; - */ - IMPACT_NONE(3), - UNRECOGNIZED(-1), - ; - - /** - * IMPACT_UNSPECIFIED = 0; - */ - public static final int IMPACT_UNSPECIFIED_VALUE = 0; - /** - * IMPACT_HIGH = 1; - */ - public static final int IMPACT_HIGH_VALUE = 1; - /** - * IMPACT_LOW = 2; - */ - public static final int IMPACT_LOW_VALUE = 2; - /** - * IMPACT_NONE = 3; - */ - public static final int IMPACT_NONE_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Impact valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Impact forNumber(int value) { - switch (value) { - case 0: return IMPACT_UNSPECIFIED; - case 1: return IMPACT_HIGH; - case 2: return IMPACT_LOW; - case 3: return IMPACT_NONE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Impact> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Impact findValueByNumber(int number) { - return Impact.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(5); - } - - private static final Impact[] VALUES = values(); - - public static Impact valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Impact(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.Impact) - } - - public static final int BASE_SCORE_FIELD_NUMBER = 1; - private float baseScore_ = 0F; - /** - *
-   * The base score is a function of the base metric scores.
-   * 
- * - * float base_score = 1; - * @return The baseScore. - */ - @java.lang.Override - public float getBaseScore() { - return baseScore_; - } - - public static final int EXPLOITABILITY_SCORE_FIELD_NUMBER = 2; - private float exploitabilityScore_ = 0F; - /** - * float exploitability_score = 2; - * @return The exploitabilityScore. - */ - @java.lang.Override - public float getExploitabilityScore() { - return exploitabilityScore_; - } - - public static final int IMPACT_SCORE_FIELD_NUMBER = 3; - private float impactScore_ = 0F; - /** - * float impact_score = 3; - * @return The impactScore. - */ - @java.lang.Override - public float getImpactScore() { - return impactScore_; - } - - public static final int ATTACK_VECTOR_FIELD_NUMBER = 5; - private int attackVector_ = 0; - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return The enum numeric value on the wire for attackVector. - */ - @java.lang.Override public int getAttackVectorValue() { - return attackVector_; - } - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return The attackVector. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.AttackVector getAttackVector() { - io.grafeas.v1.CVSSv3.AttackVector result = io.grafeas.v1.CVSSv3.AttackVector.forNumber(attackVector_); - return result == null ? io.grafeas.v1.CVSSv3.AttackVector.UNRECOGNIZED : result; - } - - public static final int ATTACK_COMPLEXITY_FIELD_NUMBER = 6; - private int attackComplexity_ = 0; - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return The enum numeric value on the wire for attackComplexity. - */ - @java.lang.Override public int getAttackComplexityValue() { - return attackComplexity_; - } - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return The attackComplexity. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.AttackComplexity getAttackComplexity() { - io.grafeas.v1.CVSSv3.AttackComplexity result = io.grafeas.v1.CVSSv3.AttackComplexity.forNumber(attackComplexity_); - return result == null ? io.grafeas.v1.CVSSv3.AttackComplexity.UNRECOGNIZED : result; - } - - public static final int PRIVILEGES_REQUIRED_FIELD_NUMBER = 7; - private int privilegesRequired_ = 0; - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return The enum numeric value on the wire for privilegesRequired. - */ - @java.lang.Override public int getPrivilegesRequiredValue() { - return privilegesRequired_; - } - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return The privilegesRequired. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.PrivilegesRequired getPrivilegesRequired() { - io.grafeas.v1.CVSSv3.PrivilegesRequired result = io.grafeas.v1.CVSSv3.PrivilegesRequired.forNumber(privilegesRequired_); - return result == null ? io.grafeas.v1.CVSSv3.PrivilegesRequired.UNRECOGNIZED : result; - } - - public static final int USER_INTERACTION_FIELD_NUMBER = 8; - private int userInteraction_ = 0; - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return The enum numeric value on the wire for userInteraction. - */ - @java.lang.Override public int getUserInteractionValue() { - return userInteraction_; - } - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return The userInteraction. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.UserInteraction getUserInteraction() { - io.grafeas.v1.CVSSv3.UserInteraction result = io.grafeas.v1.CVSSv3.UserInteraction.forNumber(userInteraction_); - return result == null ? io.grafeas.v1.CVSSv3.UserInteraction.UNRECOGNIZED : result; - } - - public static final int SCOPE_FIELD_NUMBER = 9; - private int scope_ = 0; - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @return The enum numeric value on the wire for scope. - */ - @java.lang.Override public int getScopeValue() { - return scope_; - } - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @return The scope. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.Scope getScope() { - io.grafeas.v1.CVSSv3.Scope result = io.grafeas.v1.CVSSv3.Scope.forNumber(scope_); - return result == null ? io.grafeas.v1.CVSSv3.Scope.UNRECOGNIZED : result; - } - - public static final int CONFIDENTIALITY_IMPACT_FIELD_NUMBER = 10; - private int confidentialityImpact_ = 0; - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return The enum numeric value on the wire for confidentialityImpact. - */ - @java.lang.Override public int getConfidentialityImpactValue() { - return confidentialityImpact_; - } - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return The confidentialityImpact. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.Impact getConfidentialityImpact() { - io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(confidentialityImpact_); - return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; - } - - public static final int INTEGRITY_IMPACT_FIELD_NUMBER = 11; - private int integrityImpact_ = 0; - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return The enum numeric value on the wire for integrityImpact. - */ - @java.lang.Override public int getIntegrityImpactValue() { - return integrityImpact_; - } - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return The integrityImpact. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.Impact getIntegrityImpact() { - io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(integrityImpact_); - return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; - } - - public static final int AVAILABILITY_IMPACT_FIELD_NUMBER = 12; - private int availabilityImpact_ = 0; - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return The enum numeric value on the wire for availabilityImpact. - */ - @java.lang.Override public int getAvailabilityImpactValue() { - return availabilityImpact_; - } - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return The availabilityImpact. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.Impact getAvailabilityImpact() { - io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(availabilityImpact_); - return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { - output.writeFloat(1, baseScore_); - } - if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { - output.writeFloat(2, exploitabilityScore_); - } - if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { - output.writeFloat(3, impactScore_); - } - if (attackVector_ != io.grafeas.v1.CVSSv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { - output.writeEnum(5, attackVector_); - } - if (attackComplexity_ != io.grafeas.v1.CVSSv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { - output.writeEnum(6, attackComplexity_); - } - if (privilegesRequired_ != io.grafeas.v1.CVSSv3.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { - output.writeEnum(7, privilegesRequired_); - } - if (userInteraction_ != io.grafeas.v1.CVSSv3.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { - output.writeEnum(8, userInteraction_); - } - if (scope_ != io.grafeas.v1.CVSSv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { - output.writeEnum(9, scope_); - } - if (confidentialityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - output.writeEnum(10, confidentialityImpact_); - } - if (integrityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - output.writeEnum(11, integrityImpact_); - } - if (availabilityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - output.writeEnum(12, availabilityImpact_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, baseScore_); - } - if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, exploitabilityScore_); - } - if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, impactScore_); - } - if (attackVector_ != io.grafeas.v1.CVSSv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, attackVector_); - } - if (attackComplexity_ != io.grafeas.v1.CVSSv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(6, attackComplexity_); - } - if (privilegesRequired_ != io.grafeas.v1.CVSSv3.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(7, privilegesRequired_); - } - if (userInteraction_ != io.grafeas.v1.CVSSv3.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(8, userInteraction_); - } - if (scope_ != io.grafeas.v1.CVSSv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, scope_); - } - if (confidentialityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(10, confidentialityImpact_); - } - if (integrityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, integrityImpact_); - } - if (availabilityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(12, availabilityImpact_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.CVSSv3)) { - return super.equals(obj); - } - io.grafeas.v1.CVSSv3 other = (io.grafeas.v1.CVSSv3) obj; - - if (java.lang.Float.floatToIntBits(getBaseScore()) - != java.lang.Float.floatToIntBits( - other.getBaseScore())) return false; - if (java.lang.Float.floatToIntBits(getExploitabilityScore()) - != java.lang.Float.floatToIntBits( - other.getExploitabilityScore())) return false; - if (java.lang.Float.floatToIntBits(getImpactScore()) - != java.lang.Float.floatToIntBits( - other.getImpactScore())) return false; - if (attackVector_ != other.attackVector_) return false; - if (attackComplexity_ != other.attackComplexity_) return false; - if (privilegesRequired_ != other.privilegesRequired_) return false; - if (userInteraction_ != other.userInteraction_) return false; - if (scope_ != other.scope_) return false; - if (confidentialityImpact_ != other.confidentialityImpact_) return false; - if (integrityImpact_ != other.integrityImpact_) return false; - if (availabilityImpact_ != other.availabilityImpact_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BASE_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getBaseScore()); - hash = (37 * hash) + EXPLOITABILITY_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getExploitabilityScore()); - hash = (37 * hash) + IMPACT_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getImpactScore()); - hash = (37 * hash) + ATTACK_VECTOR_FIELD_NUMBER; - hash = (53 * hash) + attackVector_; - hash = (37 * hash) + ATTACK_COMPLEXITY_FIELD_NUMBER; - hash = (53 * hash) + attackComplexity_; - hash = (37 * hash) + PRIVILEGES_REQUIRED_FIELD_NUMBER; - hash = (53 * hash) + privilegesRequired_; - hash = (37 * hash) + USER_INTERACTION_FIELD_NUMBER; - hash = (53 * hash) + userInteraction_; - hash = (37 * hash) + SCOPE_FIELD_NUMBER; - hash = (53 * hash) + scope_; - hash = (37 * hash) + CONFIDENTIALITY_IMPACT_FIELD_NUMBER; - hash = (53 * hash) + confidentialityImpact_; - hash = (37 * hash) + INTEGRITY_IMPACT_FIELD_NUMBER; - hash = (53 * hash) + integrityImpact_; - hash = (37 * hash) + AVAILABILITY_IMPACT_FIELD_NUMBER; - hash = (53 * hash) + availabilityImpact_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.CVSSv3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CVSSv3 parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CVSSv3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CVSSv3 parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CVSSv3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CVSSv3 parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CVSSv3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CVSSv3 parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CVSSv3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.CVSSv3 parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CVSSv3 parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CVSSv3 parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.CVSSv3 prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Common Vulnerability Scoring System version 3.
-   * For details, see https://www.first.org/cvss/specification-document
-   * 
- * - * Protobuf type {@code grafeas.v1.CVSSv3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.CVSSv3) - io.grafeas.v1.CVSSv3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CVSSv3.class, io.grafeas.v1.CVSSv3.Builder.class); - } - - // Construct using io.grafeas.v1.CVSSv3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - baseScore_ = 0F; - exploitabilityScore_ = 0F; - impactScore_ = 0F; - attackVector_ = 0; - attackComplexity_ = 0; - privilegesRequired_ = 0; - userInteraction_ = 0; - scope_ = 0; - confidentialityImpact_ = 0; - integrityImpact_ = 0; - availabilityImpact_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.CVSSv3 getDefaultInstanceForType() { - return io.grafeas.v1.CVSSv3.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.CVSSv3 build() { - io.grafeas.v1.CVSSv3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.CVSSv3 buildPartial() { - io.grafeas.v1.CVSSv3 result = new io.grafeas.v1.CVSSv3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.CVSSv3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.baseScore_ = baseScore_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.exploitabilityScore_ = exploitabilityScore_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.impactScore_ = impactScore_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.attackVector_ = attackVector_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.attackComplexity_ = attackComplexity_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.privilegesRequired_ = privilegesRequired_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.userInteraction_ = userInteraction_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.scope_ = scope_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.confidentialityImpact_ = confidentialityImpact_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.integrityImpact_ = integrityImpact_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.availabilityImpact_ = availabilityImpact_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.CVSSv3) { - return mergeFrom((io.grafeas.v1.CVSSv3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.CVSSv3 other) { - if (other == io.grafeas.v1.CVSSv3.getDefaultInstance()) return this; - if (other.getBaseScore() != 0F) { - setBaseScore(other.getBaseScore()); - } - if (other.getExploitabilityScore() != 0F) { - setExploitabilityScore(other.getExploitabilityScore()); - } - if (other.getImpactScore() != 0F) { - setImpactScore(other.getImpactScore()); - } - if (other.attackVector_ != 0) { - setAttackVectorValue(other.getAttackVectorValue()); - } - if (other.attackComplexity_ != 0) { - setAttackComplexityValue(other.getAttackComplexityValue()); - } - if (other.privilegesRequired_ != 0) { - setPrivilegesRequiredValue(other.getPrivilegesRequiredValue()); - } - if (other.userInteraction_ != 0) { - setUserInteractionValue(other.getUserInteractionValue()); - } - if (other.scope_ != 0) { - setScopeValue(other.getScopeValue()); - } - if (other.confidentialityImpact_ != 0) { - setConfidentialityImpactValue(other.getConfidentialityImpactValue()); - } - if (other.integrityImpact_ != 0) { - setIntegrityImpactValue(other.getIntegrityImpactValue()); - } - if (other.availabilityImpact_ != 0) { - setAvailabilityImpactValue(other.getAvailabilityImpactValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - baseScore_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - case 21: { - exploitabilityScore_ = input.readFloat(); - bitField0_ |= 0x00000002; - break; - } // case 21 - case 29: { - impactScore_ = input.readFloat(); - bitField0_ |= 0x00000004; - break; - } // case 29 - case 40: { - attackVector_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 40 - case 48: { - attackComplexity_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 48 - case 56: { - privilegesRequired_ = input.readEnum(); - bitField0_ |= 0x00000020; - break; - } // case 56 - case 64: { - userInteraction_ = input.readEnum(); - bitField0_ |= 0x00000040; - break; - } // case 64 - case 72: { - scope_ = input.readEnum(); - bitField0_ |= 0x00000080; - break; - } // case 72 - case 80: { - confidentialityImpact_ = input.readEnum(); - bitField0_ |= 0x00000100; - break; - } // case 80 - case 88: { - integrityImpact_ = input.readEnum(); - bitField0_ |= 0x00000200; - break; - } // case 88 - case 96: { - availabilityImpact_ = input.readEnum(); - bitField0_ |= 0x00000400; - break; - } // case 96 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private float baseScore_ ; - /** - *
-     * The base score is a function of the base metric scores.
-     * 
- * - * float base_score = 1; - * @return The baseScore. - */ - @java.lang.Override - public float getBaseScore() { - return baseScore_; - } - /** - *
-     * The base score is a function of the base metric scores.
-     * 
- * - * float base_score = 1; - * @param value The baseScore to set. - * @return This builder for chaining. - */ - public Builder setBaseScore(float value) { - - baseScore_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The base score is a function of the base metric scores.
-     * 
- * - * float base_score = 1; - * @return This builder for chaining. - */ - public Builder clearBaseScore() { - bitField0_ = (bitField0_ & ~0x00000001); - baseScore_ = 0F; - onChanged(); - return this; - } - - private float exploitabilityScore_ ; - /** - * float exploitability_score = 2; - * @return The exploitabilityScore. - */ - @java.lang.Override - public float getExploitabilityScore() { - return exploitabilityScore_; - } - /** - * float exploitability_score = 2; - * @param value The exploitabilityScore to set. - * @return This builder for chaining. - */ - public Builder setExploitabilityScore(float value) { - - exploitabilityScore_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * float exploitability_score = 2; - * @return This builder for chaining. - */ - public Builder clearExploitabilityScore() { - bitField0_ = (bitField0_ & ~0x00000002); - exploitabilityScore_ = 0F; - onChanged(); - return this; - } - - private float impactScore_ ; - /** - * float impact_score = 3; - * @return The impactScore. - */ - @java.lang.Override - public float getImpactScore() { - return impactScore_; - } - /** - * float impact_score = 3; - * @param value The impactScore to set. - * @return This builder for chaining. - */ - public Builder setImpactScore(float value) { - - impactScore_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * float impact_score = 3; - * @return This builder for chaining. - */ - public Builder clearImpactScore() { - bitField0_ = (bitField0_ & ~0x00000004); - impactScore_ = 0F; - onChanged(); - return this; - } - - private int attackVector_ = 0; - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return The enum numeric value on the wire for attackVector. - */ - @java.lang.Override public int getAttackVectorValue() { - return attackVector_; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @param value The enum numeric value on the wire for attackVector to set. - * @return This builder for chaining. - */ - public Builder setAttackVectorValue(int value) { - attackVector_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return The attackVector. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.AttackVector getAttackVector() { - io.grafeas.v1.CVSSv3.AttackVector result = io.grafeas.v1.CVSSv3.AttackVector.forNumber(attackVector_); - return result == null ? io.grafeas.v1.CVSSv3.AttackVector.UNRECOGNIZED : result; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @param value The attackVector to set. - * @return This builder for chaining. - */ - public Builder setAttackVector(io.grafeas.v1.CVSSv3.AttackVector value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - attackVector_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return This builder for chaining. - */ - public Builder clearAttackVector() { - bitField0_ = (bitField0_ & ~0x00000008); - attackVector_ = 0; - onChanged(); - return this; - } - - private int attackComplexity_ = 0; - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return The enum numeric value on the wire for attackComplexity. - */ - @java.lang.Override public int getAttackComplexityValue() { - return attackComplexity_; - } - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @param value The enum numeric value on the wire for attackComplexity to set. - * @return This builder for chaining. - */ - public Builder setAttackComplexityValue(int value) { - attackComplexity_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return The attackComplexity. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.AttackComplexity getAttackComplexity() { - io.grafeas.v1.CVSSv3.AttackComplexity result = io.grafeas.v1.CVSSv3.AttackComplexity.forNumber(attackComplexity_); - return result == null ? io.grafeas.v1.CVSSv3.AttackComplexity.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @param value The attackComplexity to set. - * @return This builder for chaining. - */ - public Builder setAttackComplexity(io.grafeas.v1.CVSSv3.AttackComplexity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - attackComplexity_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return This builder for chaining. - */ - public Builder clearAttackComplexity() { - bitField0_ = (bitField0_ & ~0x00000010); - attackComplexity_ = 0; - onChanged(); - return this; - } - - private int privilegesRequired_ = 0; - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return The enum numeric value on the wire for privilegesRequired. - */ - @java.lang.Override public int getPrivilegesRequiredValue() { - return privilegesRequired_; - } - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @param value The enum numeric value on the wire for privilegesRequired to set. - * @return This builder for chaining. - */ - public Builder setPrivilegesRequiredValue(int value) { - privilegesRequired_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return The privilegesRequired. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.PrivilegesRequired getPrivilegesRequired() { - io.grafeas.v1.CVSSv3.PrivilegesRequired result = io.grafeas.v1.CVSSv3.PrivilegesRequired.forNumber(privilegesRequired_); - return result == null ? io.grafeas.v1.CVSSv3.PrivilegesRequired.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @param value The privilegesRequired to set. - * @return This builder for chaining. - */ - public Builder setPrivilegesRequired(io.grafeas.v1.CVSSv3.PrivilegesRequired value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - privilegesRequired_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return This builder for chaining. - */ - public Builder clearPrivilegesRequired() { - bitField0_ = (bitField0_ & ~0x00000020); - privilegesRequired_ = 0; - onChanged(); - return this; - } - - private int userInteraction_ = 0; - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return The enum numeric value on the wire for userInteraction. - */ - @java.lang.Override public int getUserInteractionValue() { - return userInteraction_; - } - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @param value The enum numeric value on the wire for userInteraction to set. - * @return This builder for chaining. - */ - public Builder setUserInteractionValue(int value) { - userInteraction_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return The userInteraction. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.UserInteraction getUserInteraction() { - io.grafeas.v1.CVSSv3.UserInteraction result = io.grafeas.v1.CVSSv3.UserInteraction.forNumber(userInteraction_); - return result == null ? io.grafeas.v1.CVSSv3.UserInteraction.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @param value The userInteraction to set. - * @return This builder for chaining. - */ - public Builder setUserInteraction(io.grafeas.v1.CVSSv3.UserInteraction value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - userInteraction_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return This builder for chaining. - */ - public Builder clearUserInteraction() { - bitField0_ = (bitField0_ & ~0x00000040); - userInteraction_ = 0; - onChanged(); - return this; - } - - private int scope_ = 0; - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @return The enum numeric value on the wire for scope. - */ - @java.lang.Override public int getScopeValue() { - return scope_; - } - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @param value The enum numeric value on the wire for scope to set. - * @return This builder for chaining. - */ - public Builder setScopeValue(int value) { - scope_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @return The scope. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.Scope getScope() { - io.grafeas.v1.CVSSv3.Scope result = io.grafeas.v1.CVSSv3.Scope.forNumber(scope_); - return result == null ? io.grafeas.v1.CVSSv3.Scope.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @param value The scope to set. - * @return This builder for chaining. - */ - public Builder setScope(io.grafeas.v1.CVSSv3.Scope value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - scope_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @return This builder for chaining. - */ - public Builder clearScope() { - bitField0_ = (bitField0_ & ~0x00000080); - scope_ = 0; - onChanged(); - return this; - } - - private int confidentialityImpact_ = 0; - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return The enum numeric value on the wire for confidentialityImpact. - */ - @java.lang.Override public int getConfidentialityImpactValue() { - return confidentialityImpact_; - } - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @param value The enum numeric value on the wire for confidentialityImpact to set. - * @return This builder for chaining. - */ - public Builder setConfidentialityImpactValue(int value) { - confidentialityImpact_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return The confidentialityImpact. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.Impact getConfidentialityImpact() { - io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(confidentialityImpact_); - return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @param value The confidentialityImpact to set. - * @return This builder for chaining. - */ - public Builder setConfidentialityImpact(io.grafeas.v1.CVSSv3.Impact value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - confidentialityImpact_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return This builder for chaining. - */ - public Builder clearConfidentialityImpact() { - bitField0_ = (bitField0_ & ~0x00000100); - confidentialityImpact_ = 0; - onChanged(); - return this; - } - - private int integrityImpact_ = 0; - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return The enum numeric value on the wire for integrityImpact. - */ - @java.lang.Override public int getIntegrityImpactValue() { - return integrityImpact_; - } - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @param value The enum numeric value on the wire for integrityImpact to set. - * @return This builder for chaining. - */ - public Builder setIntegrityImpactValue(int value) { - integrityImpact_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return The integrityImpact. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.Impact getIntegrityImpact() { - io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(integrityImpact_); - return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @param value The integrityImpact to set. - * @return This builder for chaining. - */ - public Builder setIntegrityImpact(io.grafeas.v1.CVSSv3.Impact value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; - integrityImpact_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return This builder for chaining. - */ - public Builder clearIntegrityImpact() { - bitField0_ = (bitField0_ & ~0x00000200); - integrityImpact_ = 0; - onChanged(); - return this; - } - - private int availabilityImpact_ = 0; - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return The enum numeric value on the wire for availabilityImpact. - */ - @java.lang.Override public int getAvailabilityImpactValue() { - return availabilityImpact_; - } - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @param value The enum numeric value on the wire for availabilityImpact to set. - * @return This builder for chaining. - */ - public Builder setAvailabilityImpactValue(int value) { - availabilityImpact_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return The availabilityImpact. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.Impact getAvailabilityImpact() { - io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(availabilityImpact_); - return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @param value The availabilityImpact to set. - * @return This builder for chaining. - */ - public Builder setAvailabilityImpact(io.grafeas.v1.CVSSv3.Impact value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - availabilityImpact_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return This builder for chaining. - */ - public Builder clearAvailabilityImpact() { - bitField0_ = (bitField0_ & ~0x00000400); - availabilityImpact_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.CVSSv3) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.CVSSv3) - private static final io.grafeas.v1.CVSSv3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.CVSSv3(); - } - - public static io.grafeas.v1.CVSSv3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CVSSv3 parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.CVSSv3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java deleted file mode 100644 index f171b18e246c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java +++ /dev/null @@ -1,131 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/cvss.proto - -package io.grafeas.v1; - -public interface CVSSv3OrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.CVSSv3) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The base score is a function of the base metric scores.
-   * 
- * - * float base_score = 1; - * @return The baseScore. - */ - float getBaseScore(); - - /** - * float exploitability_score = 2; - * @return The exploitabilityScore. - */ - float getExploitabilityScore(); - - /** - * float impact_score = 3; - * @return The impactScore. - */ - float getImpactScore(); - - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return The enum numeric value on the wire for attackVector. - */ - int getAttackVectorValue(); - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return The attackVector. - */ - io.grafeas.v1.CVSSv3.AttackVector getAttackVector(); - - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return The enum numeric value on the wire for attackComplexity. - */ - int getAttackComplexityValue(); - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return The attackComplexity. - */ - io.grafeas.v1.CVSSv3.AttackComplexity getAttackComplexity(); - - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return The enum numeric value on the wire for privilegesRequired. - */ - int getPrivilegesRequiredValue(); - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return The privilegesRequired. - */ - io.grafeas.v1.CVSSv3.PrivilegesRequired getPrivilegesRequired(); - - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return The enum numeric value on the wire for userInteraction. - */ - int getUserInteractionValue(); - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return The userInteraction. - */ - io.grafeas.v1.CVSSv3.UserInteraction getUserInteraction(); - - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @return The enum numeric value on the wire for scope. - */ - int getScopeValue(); - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @return The scope. - */ - io.grafeas.v1.CVSSv3.Scope getScope(); - - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return The enum numeric value on the wire for confidentialityImpact. - */ - int getConfidentialityImpactValue(); - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return The confidentialityImpact. - */ - io.grafeas.v1.CVSSv3.Impact getConfidentialityImpact(); - - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return The enum numeric value on the wire for integrityImpact. - */ - int getIntegrityImpactValue(); - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return The integrityImpact. - */ - io.grafeas.v1.CVSSv3.Impact getIntegrityImpact(); - - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return The enum numeric value on the wire for availabilityImpact. - */ - int getAvailabilityImpactValue(); - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return The availabilityImpact. - */ - io.grafeas.v1.CVSSv3.Impact getAvailabilityImpact(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java deleted file mode 100644 index 8839140816d8..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java +++ /dev/null @@ -1,1186 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * A CloudRepoSourceContext denotes a particular revision in a Google Cloud
- * Source Repo.
- * 
- * - * Protobuf type {@code grafeas.v1.CloudRepoSourceContext} - */ -public final class CloudRepoSourceContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.CloudRepoSourceContext) - CloudRepoSourceContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use CloudRepoSourceContext.newBuilder() to construct. - private CloudRepoSourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CloudRepoSourceContext() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CloudRepoSourceContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CloudRepoSourceContext.class, io.grafeas.v1.CloudRepoSourceContext.Builder.class); - } - - private int revisionCase_ = 0; - private java.lang.Object revision_; - public enum RevisionCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - REVISION_ID(2), - ALIAS_CONTEXT(3), - REVISION_NOT_SET(0); - private final int value; - private RevisionCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static RevisionCase valueOf(int value) { - return forNumber(value); - } - - public static RevisionCase forNumber(int value) { - switch (value) { - case 2: return REVISION_ID; - case 3: return ALIAS_CONTEXT; - case 0: return REVISION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public RevisionCase - getRevisionCase() { - return RevisionCase.forNumber( - revisionCase_); - } - - public static final int REPO_ID_FIELD_NUMBER = 1; - private io.grafeas.v1.RepoId repoId_; - /** - *
-   * The ID of the repo.
-   * 
- * - * .grafeas.v1.RepoId repo_id = 1; - * @return Whether the repoId field is set. - */ - @java.lang.Override - public boolean hasRepoId() { - return repoId_ != null; - } - /** - *
-   * The ID of the repo.
-   * 
- * - * .grafeas.v1.RepoId repo_id = 1; - * @return The repoId. - */ - @java.lang.Override - public io.grafeas.v1.RepoId getRepoId() { - return repoId_ == null ? io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; - } - /** - *
-   * The ID of the repo.
-   * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - @java.lang.Override - public io.grafeas.v1.RepoIdOrBuilder getRepoIdOrBuilder() { - return repoId_ == null ? io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; - } - - public static final int REVISION_ID_FIELD_NUMBER = 2; - /** - *
-   * A revision ID.
-   * 
- * - * string revision_id = 2; - * @return Whether the revisionId field is set. - */ - public boolean hasRevisionId() { - return revisionCase_ == 2; - } - /** - *
-   * A revision ID.
-   * 
- * - * string revision_id = 2; - * @return The revisionId. - */ - public java.lang.String getRevisionId() { - java.lang.Object ref = ""; - if (revisionCase_ == 2) { - ref = revision_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (revisionCase_ == 2) { - revision_ = s; - } - return s; - } - } - /** - *
-   * A revision ID.
-   * 
- * - * string revision_id = 2; - * @return The bytes for revisionId. - */ - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = ""; - if (revisionCase_ == 2) { - ref = revision_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (revisionCase_ == 2) { - revision_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ALIAS_CONTEXT_FIELD_NUMBER = 3; - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - * @return Whether the aliasContext field is set. - */ - @java.lang.Override - public boolean hasAliasContext() { - return revisionCase_ == 3; - } - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - * @return The aliasContext. - */ - @java.lang.Override - public io.grafeas.v1.AliasContext getAliasContext() { - if (revisionCase_ == 3) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - @java.lang.Override - public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { - if (revisionCase_ == 3) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (repoId_ != null) { - output.writeMessage(1, getRepoId()); - } - if (revisionCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, revision_); - } - if (revisionCase_ == 3) { - output.writeMessage(3, (io.grafeas.v1.AliasContext) revision_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (repoId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getRepoId()); - } - if (revisionCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, revision_); - } - if (revisionCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (io.grafeas.v1.AliasContext) revision_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.CloudRepoSourceContext)) { - return super.equals(obj); - } - io.grafeas.v1.CloudRepoSourceContext other = (io.grafeas.v1.CloudRepoSourceContext) obj; - - if (hasRepoId() != other.hasRepoId()) return false; - if (hasRepoId()) { - if (!getRepoId() - .equals(other.getRepoId())) return false; - } - if (!getRevisionCase().equals(other.getRevisionCase())) return false; - switch (revisionCase_) { - case 2: - if (!getRevisionId() - .equals(other.getRevisionId())) return false; - break; - case 3: - if (!getAliasContext() - .equals(other.getAliasContext())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasRepoId()) { - hash = (37 * hash) + REPO_ID_FIELD_NUMBER; - hash = (53 * hash) + getRepoId().hashCode(); - } - switch (revisionCase_) { - case 2: - hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; - hash = (53 * hash) + getRevisionId().hashCode(); - break; - case 3: - hash = (37 * hash) + ALIAS_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getAliasContext().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CloudRepoSourceContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.CloudRepoSourceContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.CloudRepoSourceContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A CloudRepoSourceContext denotes a particular revision in a Google Cloud
-   * Source Repo.
-   * 
- * - * Protobuf type {@code grafeas.v1.CloudRepoSourceContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.CloudRepoSourceContext) - io.grafeas.v1.CloudRepoSourceContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CloudRepoSourceContext.class, io.grafeas.v1.CloudRepoSourceContext.Builder.class); - } - - // Construct using io.grafeas.v1.CloudRepoSourceContext.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - repoId_ = null; - if (repoIdBuilder_ != null) { - repoIdBuilder_.dispose(); - repoIdBuilder_ = null; - } - if (aliasContextBuilder_ != null) { - aliasContextBuilder_.clear(); - } - revisionCase_ = 0; - revision_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContext getDefaultInstanceForType() { - return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContext build() { - io.grafeas.v1.CloudRepoSourceContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContext buildPartial() { - io.grafeas.v1.CloudRepoSourceContext result = new io.grafeas.v1.CloudRepoSourceContext(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.CloudRepoSourceContext result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.repoId_ = repoIdBuilder_ == null - ? repoId_ - : repoIdBuilder_.build(); - } - } - - private void buildPartialOneofs(io.grafeas.v1.CloudRepoSourceContext result) { - result.revisionCase_ = revisionCase_; - result.revision_ = this.revision_; - if (revisionCase_ == 3 && - aliasContextBuilder_ != null) { - result.revision_ = aliasContextBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.CloudRepoSourceContext) { - return mergeFrom((io.grafeas.v1.CloudRepoSourceContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.CloudRepoSourceContext other) { - if (other == io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance()) return this; - if (other.hasRepoId()) { - mergeRepoId(other.getRepoId()); - } - switch (other.getRevisionCase()) { - case REVISION_ID: { - revisionCase_ = 2; - revision_ = other.revision_; - onChanged(); - break; - } - case ALIAS_CONTEXT: { - mergeAliasContext(other.getAliasContext()); - break; - } - case REVISION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getRepoIdFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - revisionCase_ = 2; - revision_ = s; - break; - } // case 18 - case 26: { - input.readMessage( - getAliasContextFieldBuilder().getBuilder(), - extensionRegistry); - revisionCase_ = 3; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int revisionCase_ = 0; - private java.lang.Object revision_; - public RevisionCase - getRevisionCase() { - return RevisionCase.forNumber( - revisionCase_); - } - - public Builder clearRevision() { - revisionCase_ = 0; - revision_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private io.grafeas.v1.RepoId repoId_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.RepoId, io.grafeas.v1.RepoId.Builder, io.grafeas.v1.RepoIdOrBuilder> repoIdBuilder_; - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - * @return Whether the repoId field is set. - */ - public boolean hasRepoId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - * @return The repoId. - */ - public io.grafeas.v1.RepoId getRepoId() { - if (repoIdBuilder_ == null) { - return repoId_ == null ? io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; - } else { - return repoIdBuilder_.getMessage(); - } - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - public Builder setRepoId(io.grafeas.v1.RepoId value) { - if (repoIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - repoId_ = value; - } else { - repoIdBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - public Builder setRepoId( - io.grafeas.v1.RepoId.Builder builderForValue) { - if (repoIdBuilder_ == null) { - repoId_ = builderForValue.build(); - } else { - repoIdBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - public Builder mergeRepoId(io.grafeas.v1.RepoId value) { - if (repoIdBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - repoId_ != null && - repoId_ != io.grafeas.v1.RepoId.getDefaultInstance()) { - getRepoIdBuilder().mergeFrom(value); - } else { - repoId_ = value; - } - } else { - repoIdBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - public Builder clearRepoId() { - bitField0_ = (bitField0_ & ~0x00000001); - repoId_ = null; - if (repoIdBuilder_ != null) { - repoIdBuilder_.dispose(); - repoIdBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - public io.grafeas.v1.RepoId.Builder getRepoIdBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getRepoIdFieldBuilder().getBuilder(); - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - public io.grafeas.v1.RepoIdOrBuilder getRepoIdOrBuilder() { - if (repoIdBuilder_ != null) { - return repoIdBuilder_.getMessageOrBuilder(); - } else { - return repoId_ == null ? - io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; - } - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.RepoId, io.grafeas.v1.RepoId.Builder, io.grafeas.v1.RepoIdOrBuilder> - getRepoIdFieldBuilder() { - if (repoIdBuilder_ == null) { - repoIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.RepoId, io.grafeas.v1.RepoId.Builder, io.grafeas.v1.RepoIdOrBuilder>( - getRepoId(), - getParentForChildren(), - isClean()); - repoId_ = null; - } - return repoIdBuilder_; - } - - /** - *
-     * A revision ID.
-     * 
- * - * string revision_id = 2; - * @return Whether the revisionId field is set. - */ - @java.lang.Override - public boolean hasRevisionId() { - return revisionCase_ == 2; - } - /** - *
-     * A revision ID.
-     * 
- * - * string revision_id = 2; - * @return The revisionId. - */ - @java.lang.Override - public java.lang.String getRevisionId() { - java.lang.Object ref = ""; - if (revisionCase_ == 2) { - ref = revision_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (revisionCase_ == 2) { - revision_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A revision ID.
-     * 
- * - * string revision_id = 2; - * @return The bytes for revisionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = ""; - if (revisionCase_ == 2) { - ref = revision_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (revisionCase_ == 2) { - revision_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A revision ID.
-     * 
- * - * string revision_id = 2; - * @param value The revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - revisionCase_ = 2; - revision_ = value; - onChanged(); - return this; - } - /** - *
-     * A revision ID.
-     * 
- * - * string revision_id = 2; - * @return This builder for chaining. - */ - public Builder clearRevisionId() { - if (revisionCase_ == 2) { - revisionCase_ = 0; - revision_ = null; - onChanged(); - } - return this; - } - /** - *
-     * A revision ID.
-     * 
- * - * string revision_id = 2; - * @param value The bytes for revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - revisionCase_ = 2; - revision_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> aliasContextBuilder_; - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - * @return Whether the aliasContext field is set. - */ - @java.lang.Override - public boolean hasAliasContext() { - return revisionCase_ == 3; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - * @return The aliasContext. - */ - @java.lang.Override - public io.grafeas.v1.AliasContext getAliasContext() { - if (aliasContextBuilder_ == null) { - if (revisionCase_ == 3) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } else { - if (revisionCase_ == 3) { - return aliasContextBuilder_.getMessage(); - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - public Builder setAliasContext(io.grafeas.v1.AliasContext value) { - if (aliasContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - revision_ = value; - onChanged(); - } else { - aliasContextBuilder_.setMessage(value); - } - revisionCase_ = 3; - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - public Builder setAliasContext( - io.grafeas.v1.AliasContext.Builder builderForValue) { - if (aliasContextBuilder_ == null) { - revision_ = builderForValue.build(); - onChanged(); - } else { - aliasContextBuilder_.setMessage(builderForValue.build()); - } - revisionCase_ = 3; - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - public Builder mergeAliasContext(io.grafeas.v1.AliasContext value) { - if (aliasContextBuilder_ == null) { - if (revisionCase_ == 3 && - revision_ != io.grafeas.v1.AliasContext.getDefaultInstance()) { - revision_ = io.grafeas.v1.AliasContext.newBuilder((io.grafeas.v1.AliasContext) revision_) - .mergeFrom(value).buildPartial(); - } else { - revision_ = value; - } - onChanged(); - } else { - if (revisionCase_ == 3) { - aliasContextBuilder_.mergeFrom(value); - } else { - aliasContextBuilder_.setMessage(value); - } - } - revisionCase_ = 3; - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - public Builder clearAliasContext() { - if (aliasContextBuilder_ == null) { - if (revisionCase_ == 3) { - revisionCase_ = 0; - revision_ = null; - onChanged(); - } - } else { - if (revisionCase_ == 3) { - revisionCase_ = 0; - revision_ = null; - } - aliasContextBuilder_.clear(); - } - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - public io.grafeas.v1.AliasContext.Builder getAliasContextBuilder() { - return getAliasContextFieldBuilder().getBuilder(); - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - @java.lang.Override - public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { - if ((revisionCase_ == 3) && (aliasContextBuilder_ != null)) { - return aliasContextBuilder_.getMessageOrBuilder(); - } else { - if (revisionCase_ == 3) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> - getAliasContextFieldBuilder() { - if (aliasContextBuilder_ == null) { - if (!(revisionCase_ == 3)) { - revision_ = io.grafeas.v1.AliasContext.getDefaultInstance(); - } - aliasContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder>( - (io.grafeas.v1.AliasContext) revision_, - getParentForChildren(), - isClean()); - revision_ = null; - } - revisionCase_ = 3; - onChanged(); - return aliasContextBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.CloudRepoSourceContext) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.CloudRepoSourceContext) - private static final io.grafeas.v1.CloudRepoSourceContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.CloudRepoSourceContext(); - } - - public static io.grafeas.v1.CloudRepoSourceContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CloudRepoSourceContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java deleted file mode 100644 index adebca3e3ee9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java +++ /dev/null @@ -1,94 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface CloudRepoSourceContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.CloudRepoSourceContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The ID of the repo.
-   * 
- * - * .grafeas.v1.RepoId repo_id = 1; - * @return Whether the repoId field is set. - */ - boolean hasRepoId(); - /** - *
-   * The ID of the repo.
-   * 
- * - * .grafeas.v1.RepoId repo_id = 1; - * @return The repoId. - */ - io.grafeas.v1.RepoId getRepoId(); - /** - *
-   * The ID of the repo.
-   * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - io.grafeas.v1.RepoIdOrBuilder getRepoIdOrBuilder(); - - /** - *
-   * A revision ID.
-   * 
- * - * string revision_id = 2; - * @return Whether the revisionId field is set. - */ - boolean hasRevisionId(); - /** - *
-   * A revision ID.
-   * 
- * - * string revision_id = 2; - * @return The revisionId. - */ - java.lang.String getRevisionId(); - /** - *
-   * A revision ID.
-   * 
- * - * string revision_id = 2; - * @return The bytes for revisionId. - */ - com.google.protobuf.ByteString - getRevisionIdBytes(); - - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - * @return Whether the aliasContext field is set. - */ - boolean hasAliasContext(); - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - * @return The aliasContext. - */ - io.grafeas.v1.AliasContext getAliasContext(); - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder(); - - public io.grafeas.v1.CloudRepoSourceContext.RevisionCase getRevisionCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java deleted file mode 100644 index b1027d8a00bd..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java +++ /dev/null @@ -1,1632 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * Command describes a step performed as part of the build pipeline.
- * 
- * - * Protobuf type {@code grafeas.v1.Command} - */ -public final class Command extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Command) - CommandOrBuilder { -private static final long serialVersionUID = 0L; - // Use Command.newBuilder() to construct. - private Command(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Command() { - name_ = ""; - env_ = com.google.protobuf.LazyStringArrayList.EMPTY; - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - dir_ = ""; - id_ = ""; - waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Command(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Command.class, io.grafeas.v1.Command.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * Required. Name of the command, as presented on the command line, or if the
-   * command is packaged as a Docker container, as presented to `docker pull`.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Name of the command, as presented on the command line, or if the
-   * command is packaged as a Docker container, as presented to `docker pull`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ENV_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList env_; - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @return A list containing the env. - */ - public com.google.protobuf.ProtocolStringList - getEnvList() { - return env_; - } - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @return The count of env. - */ - public int getEnvCount() { - return env_.size(); - } - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @param index The index of the element to return. - * @return The env at the given index. - */ - public java.lang.String getEnv(int index) { - return env_.get(index); - } - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @param index The index of the value to return. - * @return The bytes of the env at the given index. - */ - public com.google.protobuf.ByteString - getEnvBytes(int index) { - return env_.getByteString(index); - } - - public static final int ARGS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList args_; - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList - getArgsList() { - return args_; - } - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString - getArgsBytes(int index) { - return args_.getByteString(index); - } - - public static final int DIR_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object dir_ = ""; - /** - *
-   * Working directory (relative to project source root) used when running this
-   * command.
-   * 
- * - * string dir = 4; - * @return The dir. - */ - @java.lang.Override - public java.lang.String getDir() { - java.lang.Object ref = dir_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dir_ = s; - return s; - } - } - /** - *
-   * Working directory (relative to project source root) used when running this
-   * command.
-   * 
- * - * string dir = 4; - * @return The bytes for dir. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDirBytes() { - java.lang.Object ref = dir_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dir_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ID_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * Optional unique identifier for this command, used in wait_for to reference
-   * this command as a dependency.
-   * 
- * - * string id = 5; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * Optional unique identifier for this command, used in wait_for to reference
-   * this command as a dependency.
-   * 
- * - * string id = 5; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int WAIT_FOR_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList waitFor_; - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @return A list containing the waitFor. - */ - public com.google.protobuf.ProtocolStringList - getWaitForList() { - return waitFor_; - } - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @return The count of waitFor. - */ - public int getWaitForCount() { - return waitFor_.size(); - } - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @param index The index of the element to return. - * @return The waitFor at the given index. - */ - public java.lang.String getWaitFor(int index) { - return waitFor_.get(index); - } - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @param index The index of the value to return. - * @return The bytes of the waitFor at the given index. - */ - public com.google.protobuf.ByteString - getWaitForBytes(int index) { - return waitFor_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < env_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, env_.getRaw(i)); - } - for (int i = 0; i < args_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, args_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dir_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dir_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, id_); - } - for (int i = 0; i < waitFor_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, waitFor_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - { - int dataSize = 0; - for (int i = 0; i < env_.size(); i++) { - dataSize += computeStringSizeNoTag(env_.getRaw(i)); - } - size += dataSize; - size += 1 * getEnvList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < args_.size(); i++) { - dataSize += computeStringSizeNoTag(args_.getRaw(i)); - } - size += dataSize; - size += 1 * getArgsList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dir_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dir_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, id_); - } - { - int dataSize = 0; - for (int i = 0; i < waitFor_.size(); i++) { - dataSize += computeStringSizeNoTag(waitFor_.getRaw(i)); - } - size += dataSize; - size += 1 * getWaitForList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Command)) { - return super.equals(obj); - } - io.grafeas.v1.Command other = (io.grafeas.v1.Command) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getEnvList() - .equals(other.getEnvList())) return false; - if (!getArgsList() - .equals(other.getArgsList())) return false; - if (!getDir() - .equals(other.getDir())) return false; - if (!getId() - .equals(other.getId())) return false; - if (!getWaitForList() - .equals(other.getWaitForList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getEnvCount() > 0) { - hash = (37 * hash) + ENV_FIELD_NUMBER; - hash = (53 * hash) + getEnvList().hashCode(); - } - if (getArgsCount() > 0) { - hash = (37 * hash) + ARGS_FIELD_NUMBER; - hash = (53 * hash) + getArgsList().hashCode(); - } - hash = (37 * hash) + DIR_FIELD_NUMBER; - hash = (53 * hash) + getDir().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (getWaitForCount() > 0) { - hash = (37 * hash) + WAIT_FOR_FIELD_NUMBER; - hash = (53 * hash) + getWaitForList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Command parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Command parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Command parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Command parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Command parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Command parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Command parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Command parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Command parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Command parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Command parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Command parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Command prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Command describes a step performed as part of the build pipeline.
-   * 
- * - * Protobuf type {@code grafeas.v1.Command} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Command) - io.grafeas.v1.CommandOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Command.class, io.grafeas.v1.Command.Builder.class); - } - - // Construct using io.grafeas.v1.Command.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - env_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - dir_ = ""; - id_ = ""; - waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Command getDefaultInstanceForType() { - return io.grafeas.v1.Command.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Command build() { - io.grafeas.v1.Command result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Command buildPartial() { - io.grafeas.v1.Command result = new io.grafeas.v1.Command(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.Command result) { - if (((bitField0_ & 0x00000002) != 0)) { - env_ = env_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.env_ = env_; - if (((bitField0_ & 0x00000004) != 0)) { - args_ = args_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.args_ = args_; - if (((bitField0_ & 0x00000020) != 0)) { - waitFor_ = waitFor_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.waitFor_ = waitFor_; - } - - private void buildPartial0(io.grafeas.v1.Command result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.dir_ = dir_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Command) { - return mergeFrom((io.grafeas.v1.Command)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Command other) { - if (other == io.grafeas.v1.Command.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.env_.isEmpty()) { - if (env_.isEmpty()) { - env_ = other.env_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureEnvIsMutable(); - env_.addAll(other.env_); - } - onChanged(); - } - if (!other.args_.isEmpty()) { - if (args_.isEmpty()) { - args_ = other.args_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureArgsIsMutable(); - args_.addAll(other.args_); - } - onChanged(); - } - if (!other.getDir().isEmpty()) { - dir_ = other.dir_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (!other.waitFor_.isEmpty()) { - if (waitFor_.isEmpty()) { - waitFor_ = other.waitFor_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureWaitForIsMutable(); - waitFor_.addAll(other.waitFor_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - ensureEnvIsMutable(); - env_.add(s); - break; - } // case 18 - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - ensureArgsIsMutable(); - args_.add(s); - break; - } // case 26 - case 34: { - dir_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - ensureWaitForIsMutable(); - waitFor_.add(s); - break; - } // case 50 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Name of the command, as presented on the command line, or if the
-     * command is packaged as a Docker container, as presented to `docker pull`.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the command, as presented on the command line, or if the
-     * command is packaged as a Docker container, as presented to `docker pull`.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the command, as presented on the command line, or if the
-     * command is packaged as a Docker container, as presented to `docker pull`.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the command, as presented on the command line, or if the
-     * command is packaged as a Docker container, as presented to `docker pull`.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the command, as presented on the command line, or if the
-     * command is packaged as a Docker container, as presented to `docker pull`.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList env_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureEnvIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - env_ = new com.google.protobuf.LazyStringArrayList(env_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @return A list containing the env. - */ - public com.google.protobuf.ProtocolStringList - getEnvList() { - return env_.getUnmodifiableView(); - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @return The count of env. - */ - public int getEnvCount() { - return env_.size(); - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @param index The index of the element to return. - * @return The env at the given index. - */ - public java.lang.String getEnv(int index) { - return env_.get(index); - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @param index The index of the value to return. - * @return The bytes of the env at the given index. - */ - public com.google.protobuf.ByteString - getEnvBytes(int index) { - return env_.getByteString(index); - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @param index The index to set the value at. - * @param value The env to set. - * @return This builder for chaining. - */ - public Builder setEnv( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureEnvIsMutable(); - env_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @param value The env to add. - * @return This builder for chaining. - */ - public Builder addEnv( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureEnvIsMutable(); - env_.add(value); - onChanged(); - return this; - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @param values The env to add. - * @return This builder for chaining. - */ - public Builder addAllEnv( - java.lang.Iterable values) { - ensureEnvIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, env_); - onChanged(); - return this; - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @return This builder for chaining. - */ - public Builder clearEnv() { - env_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @param value The bytes of the env to add. - * @return This builder for chaining. - */ - public Builder addEnvBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureEnvIsMutable(); - env_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureArgsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(args_); - bitField0_ |= 0x00000004; - } - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList - getArgsList() { - return args_.getUnmodifiableView(); - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString - getArgsBytes(int index) { - return args_.getByteString(index); - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @param index The index to set the value at. - * @param value The args to set. - * @return This builder for chaining. - */ - public Builder setArgs( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureArgsIsMutable(); - args_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @param value The args to add. - * @return This builder for chaining. - */ - public Builder addArgs( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @param values The args to add. - * @return This builder for chaining. - */ - public Builder addAllArgs( - java.lang.Iterable values) { - ensureArgsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, args_); - onChanged(); - return this; - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @return This builder for chaining. - */ - public Builder clearArgs() { - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @param value The bytes of the args to add. - * @return This builder for chaining. - */ - public Builder addArgsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - - private java.lang.Object dir_ = ""; - /** - *
-     * Working directory (relative to project source root) used when running this
-     * command.
-     * 
- * - * string dir = 4; - * @return The dir. - */ - public java.lang.String getDir() { - java.lang.Object ref = dir_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dir_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Working directory (relative to project source root) used when running this
-     * command.
-     * 
- * - * string dir = 4; - * @return The bytes for dir. - */ - public com.google.protobuf.ByteString - getDirBytes() { - java.lang.Object ref = dir_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dir_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Working directory (relative to project source root) used when running this
-     * command.
-     * 
- * - * string dir = 4; - * @param value The dir to set. - * @return This builder for chaining. - */ - public Builder setDir( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - dir_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Working directory (relative to project source root) used when running this
-     * command.
-     * 
- * - * string dir = 4; - * @return This builder for chaining. - */ - public Builder clearDir() { - dir_ = getDefaultInstance().getDir(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * Working directory (relative to project source root) used when running this
-     * command.
-     * 
- * - * string dir = 4; - * @param value The bytes for dir to set. - * @return This builder for chaining. - */ - public Builder setDirBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - dir_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object id_ = ""; - /** - *
-     * Optional unique identifier for this command, used in wait_for to reference
-     * this command as a dependency.
-     * 
- * - * string id = 5; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional unique identifier for this command, used in wait_for to reference
-     * this command as a dependency.
-     * 
- * - * string id = 5; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional unique identifier for this command, used in wait_for to reference
-     * this command as a dependency.
-     * 
- * - * string id = 5; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Optional unique identifier for this command, used in wait_for to reference
-     * this command as a dependency.
-     * 
- * - * string id = 5; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * Optional unique identifier for this command, used in wait_for to reference
-     * this command as a dependency.
-     * 
- * - * string id = 5; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureWaitForIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - waitFor_ = new com.google.protobuf.LazyStringArrayList(waitFor_); - bitField0_ |= 0x00000020; - } - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @return A list containing the waitFor. - */ - public com.google.protobuf.ProtocolStringList - getWaitForList() { - return waitFor_.getUnmodifiableView(); - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @return The count of waitFor. - */ - public int getWaitForCount() { - return waitFor_.size(); - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @param index The index of the element to return. - * @return The waitFor at the given index. - */ - public java.lang.String getWaitFor(int index) { - return waitFor_.get(index); - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @param index The index of the value to return. - * @return The bytes of the waitFor at the given index. - */ - public com.google.protobuf.ByteString - getWaitForBytes(int index) { - return waitFor_.getByteString(index); - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @param index The index to set the value at. - * @param value The waitFor to set. - * @return This builder for chaining. - */ - public Builder setWaitFor( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureWaitForIsMutable(); - waitFor_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @param value The waitFor to add. - * @return This builder for chaining. - */ - public Builder addWaitFor( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureWaitForIsMutable(); - waitFor_.add(value); - onChanged(); - return this; - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @param values The waitFor to add. - * @return This builder for chaining. - */ - public Builder addAllWaitFor( - java.lang.Iterable values) { - ensureWaitForIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, waitFor_); - onChanged(); - return this; - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @return This builder for chaining. - */ - public Builder clearWaitFor() { - waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @param value The bytes of the waitFor to add. - * @return This builder for chaining. - */ - public Builder addWaitForBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureWaitForIsMutable(); - waitFor_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Command) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Command) - private static final io.grafeas.v1.Command DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Command(); - } - - public static io.grafeas.v1.Command getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Command parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Command getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java deleted file mode 100644 index 0eb0023c4121..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java +++ /dev/null @@ -1,198 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface CommandOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Command) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Name of the command, as presented on the command line, or if the
-   * command is packaged as a Docker container, as presented to `docker pull`.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Name of the command, as presented on the command line, or if the
-   * command is packaged as a Docker container, as presented to `docker pull`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @return A list containing the env. - */ - java.util.List - getEnvList(); - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @return The count of env. - */ - int getEnvCount(); - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @param index The index of the element to return. - * @return The env at the given index. - */ - java.lang.String getEnv(int index); - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @param index The index of the value to return. - * @return The bytes of the env at the given index. - */ - com.google.protobuf.ByteString - getEnvBytes(int index); - - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @return A list containing the args. - */ - java.util.List - getArgsList(); - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @return The count of args. - */ - int getArgsCount(); - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @param index The index of the element to return. - * @return The args at the given index. - */ - java.lang.String getArgs(int index); - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - com.google.protobuf.ByteString - getArgsBytes(int index); - - /** - *
-   * Working directory (relative to project source root) used when running this
-   * command.
-   * 
- * - * string dir = 4; - * @return The dir. - */ - java.lang.String getDir(); - /** - *
-   * Working directory (relative to project source root) used when running this
-   * command.
-   * 
- * - * string dir = 4; - * @return The bytes for dir. - */ - com.google.protobuf.ByteString - getDirBytes(); - - /** - *
-   * Optional unique identifier for this command, used in wait_for to reference
-   * this command as a dependency.
-   * 
- * - * string id = 5; - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * Optional unique identifier for this command, used in wait_for to reference
-   * this command as a dependency.
-   * 
- * - * string id = 5; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @return A list containing the waitFor. - */ - java.util.List - getWaitForList(); - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @return The count of waitFor. - */ - int getWaitForCount(); - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @param index The index of the element to return. - * @return The waitFor at the given index. - */ - java.lang.String getWaitFor(int index); - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @param index The index of the value to return. - * @return The bytes of the waitFor at the given index. - */ - com.google.protobuf.ByteString - getWaitForBytes(int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java deleted file mode 100644 index 1803e0d33785..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java +++ /dev/null @@ -1,129 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public final class Common { - private Common() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_RelatedUrl_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Signature_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Signature_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Envelope_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Envelope_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_EnvelopeSignature_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_FileLocation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_FileLocation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_License_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_License_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Digest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Digest_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\027grafeas/v1/common.proto\022\ngrafeas.v1\"(\n" + - "\nRelatedUrl\022\013\n\003url\030\001 \001(\t\022\r\n\005label\030\002 \001(\t\"" + - "5\n\tSignature\022\021\n\tsignature\030\001 \001(\014\022\025\n\rpubli" + - "c_key_id\030\002 \001(\t\"d\n\010Envelope\022\017\n\007payload\030\001 " + - "\001(\014\022\024\n\014payload_type\030\002 \001(\t\0221\n\nsignatures\030" + - "\003 \003(\0132\035.grafeas.v1.EnvelopeSignature\"/\n\021" + - "EnvelopeSignature\022\013\n\003sig\030\001 \001(\014\022\r\n\005keyid\030" + - "\002 \001(\t\"!\n\014FileLocation\022\021\n\tfile_path\030\001 \001(\t" + - "\"/\n\007License\022\022\n\nexpression\030\001 \001(\t\022\020\n\010comme" + - "nts\030\002 \001(\t\",\n\006Digest\022\014\n\004algo\030\001 \001(\t\022\024\n\014dig" + - "est_bytes\030\002 \001(\014*\276\001\n\010NoteKind\022\031\n\025NOTE_KIN" + - "D_UNSPECIFIED\020\000\022\021\n\rVULNERABILITY\020\001\022\t\n\005BU" + - "ILD\020\002\022\t\n\005IMAGE\020\003\022\013\n\007PACKAGE\020\004\022\016\n\nDEPLOYM" + - "ENT\020\005\022\r\n\tDISCOVERY\020\006\022\017\n\013ATTESTATION\020\007\022\013\n" + - "\007UPGRADE\020\010\022\016\n\nCOMPLIANCE\020\t\022\024\n\020DSSE_ATTES" + - "TATION\020\nBQ\n\rio.grafeas.v1P\001Z8google.gola" + - "ng.org/genproto/googleapis/grafeas/v1;gr" + - "afeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_grafeas_v1_RelatedUrl_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_RelatedUrl_descriptor, - new java.lang.String[] { "Url", "Label", }); - internal_static_grafeas_v1_Signature_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Signature_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Signature_descriptor, - new java.lang.String[] { "Signature", "PublicKeyId", }); - internal_static_grafeas_v1_Envelope_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_Envelope_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Envelope_descriptor, - new java.lang.String[] { "Payload", "PayloadType", "Signatures", }); - internal_static_grafeas_v1_EnvelopeSignature_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_EnvelopeSignature_descriptor, - new java.lang.String[] { "Sig", "Keyid", }); - internal_static_grafeas_v1_FileLocation_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_grafeas_v1_FileLocation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_FileLocation_descriptor, - new java.lang.String[] { "FilePath", }); - internal_static_grafeas_v1_License_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_grafeas_v1_License_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_License_descriptor, - new java.lang.String[] { "Expression", "Comments", }); - internal_static_grafeas_v1_Digest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_grafeas_v1_Digest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Digest_descriptor, - new java.lang.String[] { "Algo", "DigestBytes", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java deleted file mode 100644 index 89490dc99bcb..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java +++ /dev/null @@ -1,679 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -/** - *
- * Indicates that the builder claims certain fields in this message to be
- * complete.
- * 
- * - * Protobuf type {@code grafeas.v1.Completeness} - */ -public final class Completeness extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Completeness) - CompletenessOrBuilder { -private static final long serialVersionUID = 0L; - // Use Completeness.newBuilder() to construct. - private Completeness(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Completeness() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Completeness(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Completeness.class, io.grafeas.v1.Completeness.Builder.class); - } - - public static final int ARGUMENTS_FIELD_NUMBER = 1; - private boolean arguments_ = false; - /** - *
-   * If true, the builder claims that recipe.arguments is complete, meaning that
-   * all external inputs are properly captured in the recipe.
-   * 
- * - * bool arguments = 1; - * @return The arguments. - */ - @java.lang.Override - public boolean getArguments() { - return arguments_; - } - - public static final int ENVIRONMENT_FIELD_NUMBER = 2; - private boolean environment_ = false; - /** - *
-   * If true, the builder claims that recipe.environment is claimed to be
-   * complete.
-   * 
- * - * bool environment = 2; - * @return The environment. - */ - @java.lang.Override - public boolean getEnvironment() { - return environment_; - } - - public static final int MATERIALS_FIELD_NUMBER = 3; - private boolean materials_ = false; - /** - *
-   * If true, the builder claims that materials are complete, usually through
-   * some controls to prevent network access. Sometimes called "hermetic".
-   * 
- * - * bool materials = 3; - * @return The materials. - */ - @java.lang.Override - public boolean getMaterials() { - return materials_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (arguments_ != false) { - output.writeBool(1, arguments_); - } - if (environment_ != false) { - output.writeBool(2, environment_); - } - if (materials_ != false) { - output.writeBool(3, materials_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (arguments_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, arguments_); - } - if (environment_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, environment_); - } - if (materials_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, materials_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Completeness)) { - return super.equals(obj); - } - io.grafeas.v1.Completeness other = (io.grafeas.v1.Completeness) obj; - - if (getArguments() - != other.getArguments()) return false; - if (getEnvironment() - != other.getEnvironment()) return false; - if (getMaterials() - != other.getMaterials()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getArguments()); - hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getEnvironment()); - hash = (37 * hash) + MATERIALS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getMaterials()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Completeness parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Completeness parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Completeness parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Completeness parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Completeness parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Completeness parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Completeness parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Completeness parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Completeness parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Completeness parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Completeness parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Completeness parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Completeness prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * Protobuf type {@code grafeas.v1.Completeness} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Completeness) - io.grafeas.v1.CompletenessOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Completeness.class, io.grafeas.v1.Completeness.Builder.class); - } - - // Construct using io.grafeas.v1.Completeness.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - arguments_ = false; - environment_ = false; - materials_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Completeness getDefaultInstanceForType() { - return io.grafeas.v1.Completeness.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Completeness build() { - io.grafeas.v1.Completeness result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Completeness buildPartial() { - io.grafeas.v1.Completeness result = new io.grafeas.v1.Completeness(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Completeness result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.arguments_ = arguments_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.environment_ = environment_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.materials_ = materials_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Completeness) { - return mergeFrom((io.grafeas.v1.Completeness)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Completeness other) { - if (other == io.grafeas.v1.Completeness.getDefaultInstance()) return this; - if (other.getArguments() != false) { - setArguments(other.getArguments()); - } - if (other.getEnvironment() != false) { - setEnvironment(other.getEnvironment()); - } - if (other.getMaterials() != false) { - setMaterials(other.getMaterials()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - arguments_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - environment_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: { - materials_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private boolean arguments_ ; - /** - *
-     * If true, the builder claims that recipe.arguments is complete, meaning that
-     * all external inputs are properly captured in the recipe.
-     * 
- * - * bool arguments = 1; - * @return The arguments. - */ - @java.lang.Override - public boolean getArguments() { - return arguments_; - } - /** - *
-     * If true, the builder claims that recipe.arguments is complete, meaning that
-     * all external inputs are properly captured in the recipe.
-     * 
- * - * bool arguments = 1; - * @param value The arguments to set. - * @return This builder for chaining. - */ - public Builder setArguments(boolean value) { - - arguments_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * If true, the builder claims that recipe.arguments is complete, meaning that
-     * all external inputs are properly captured in the recipe.
-     * 
- * - * bool arguments = 1; - * @return This builder for chaining. - */ - public Builder clearArguments() { - bitField0_ = (bitField0_ & ~0x00000001); - arguments_ = false; - onChanged(); - return this; - } - - private boolean environment_ ; - /** - *
-     * If true, the builder claims that recipe.environment is claimed to be
-     * complete.
-     * 
- * - * bool environment = 2; - * @return The environment. - */ - @java.lang.Override - public boolean getEnvironment() { - return environment_; - } - /** - *
-     * If true, the builder claims that recipe.environment is claimed to be
-     * complete.
-     * 
- * - * bool environment = 2; - * @param value The environment to set. - * @return This builder for chaining. - */ - public Builder setEnvironment(boolean value) { - - environment_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * If true, the builder claims that recipe.environment is claimed to be
-     * complete.
-     * 
- * - * bool environment = 2; - * @return This builder for chaining. - */ - public Builder clearEnvironment() { - bitField0_ = (bitField0_ & ~0x00000002); - environment_ = false; - onChanged(); - return this; - } - - private boolean materials_ ; - /** - *
-     * If true, the builder claims that materials are complete, usually through
-     * some controls to prevent network access. Sometimes called "hermetic".
-     * 
- * - * bool materials = 3; - * @return The materials. - */ - @java.lang.Override - public boolean getMaterials() { - return materials_; - } - /** - *
-     * If true, the builder claims that materials are complete, usually through
-     * some controls to prevent network access. Sometimes called "hermetic".
-     * 
- * - * bool materials = 3; - * @param value The materials to set. - * @return This builder for chaining. - */ - public Builder setMaterials(boolean value) { - - materials_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * If true, the builder claims that materials are complete, usually through
-     * some controls to prevent network access. Sometimes called "hermetic".
-     * 
- * - * bool materials = 3; - * @return This builder for chaining. - */ - public Builder clearMaterials() { - bitField0_ = (bitField0_ & ~0x00000004); - materials_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Completeness) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Completeness) - private static final io.grafeas.v1.Completeness DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Completeness(); - } - - public static io.grafeas.v1.Completeness getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Completeness parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Completeness getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java deleted file mode 100644 index 4c8b606b7d03..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java +++ /dev/null @@ -1,42 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -public interface CompletenessOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Completeness) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If true, the builder claims that recipe.arguments is complete, meaning that
-   * all external inputs are properly captured in the recipe.
-   * 
- * - * bool arguments = 1; - * @return The arguments. - */ - boolean getArguments(); - - /** - *
-   * If true, the builder claims that recipe.environment is claimed to be
-   * complete.
-   * 
- * - * bool environment = 2; - * @return The environment. - */ - boolean getEnvironment(); - - /** - *
-   * If true, the builder claims that materials are complete, usually through
-   * some controls to prevent network access. Sometimes called "hermetic".
-   * 
- * - * bool materials = 3; - * @return The materials. - */ - boolean getMaterials(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java deleted file mode 100644 index 7d4fd429aa29..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java +++ /dev/null @@ -1,111 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -public final class Compliance { - private Compliance() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ComplianceNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ComplianceVersion_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ComplianceOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_NonCompliantFile_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\033grafeas/v1/compliance.proto\022\ngrafeas.v" + - "1\032\031grafeas/v1/severity.proto\"\313\002\n\016Complia" + - "nceNote\022\r\n\005title\030\001 \001(\t\022\023\n\013description\030\002 " + - "\001(\t\022.\n\007version\030\003 \003(\0132\035.grafeas.v1.Compli" + - "anceVersion\022\021\n\trationale\030\004 \001(\t\022\023\n\013remedi" + - "ation\030\005 \001(\t\022@\n\rcis_benchmark\030\006 \001(\0132\'.gra" + - "feas.v1.ComplianceNote.CisBenchmarkH\000\022\031\n" + - "\021scan_instructions\030\007 \001(\014\032M\n\014CisBenchmark" + - "\022\025\n\rprofile_level\030\001 \001(\005\022&\n\010severity\030\002 \001(" + - "\0162\024.grafeas.v1.SeverityB\021\n\017compliance_ty" + - "pe\"Q\n\021ComplianceVersion\022\017\n\007cpe_uri\030\001 \001(\t" + - "\022\032\n\022benchmark_document\030\003 \001(\t\022\017\n\007version\030" + - "\002 \001(\t\"p\n\024ComplianceOccurrence\0229\n\023non_com" + - "pliant_files\030\002 \003(\0132\034.grafeas.v1.NonCompl" + - "iantFile\022\035\n\025non_compliance_reason\030\003 \001(\t\"" + - "I\n\020NonCompliantFile\022\014\n\004path\030\001 \001(\t\022\027\n\017dis" + - "play_command\030\002 \001(\t\022\016\n\006reason\030\003 \001(\tBQ\n\rio" + - ".grafeas.v1P\001Z8google.golang.org/genprot" + - "o/googleapis/grafeas/v1;grafeas\242\002\003GRAb\006p" + - "roto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.grafeas.v1.SeverityOuterClass.getDescriptor(), - }); - internal_static_grafeas_v1_ComplianceNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ComplianceNote_descriptor, - new java.lang.String[] { "Title", "Description", "Version", "Rationale", "Remediation", "CisBenchmark", "ScanInstructions", "ComplianceType", }); - internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor = - internal_static_grafeas_v1_ComplianceNote_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor, - new java.lang.String[] { "ProfileLevel", "Severity", }); - internal_static_grafeas_v1_ComplianceVersion_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ComplianceVersion_descriptor, - new java.lang.String[] { "CpeUri", "BenchmarkDocument", "Version", }); - internal_static_grafeas_v1_ComplianceOccurrence_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ComplianceOccurrence_descriptor, - new java.lang.String[] { "NonCompliantFiles", "NonComplianceReason", }); - internal_static_grafeas_v1_NonCompliantFile_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_NonCompliantFile_descriptor, - new java.lang.String[] { "Path", "DisplayCommand", "Reason", }); - io.grafeas.v1.SeverityOuterClass.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java deleted file mode 100644 index d58e1ea6bb90..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java +++ /dev/null @@ -1,2467 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.ComplianceNote} - */ -public final class ComplianceNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceNote) - ComplianceNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use ComplianceNote.newBuilder() to construct. - private ComplianceNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ComplianceNote() { - title_ = ""; - description_ = ""; - version_ = java.util.Collections.emptyList(); - rationale_ = ""; - remediation_ = ""; - scanInstructions_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ComplianceNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceNote.class, io.grafeas.v1.ComplianceNote.Builder.class); - } - - public interface CisBenchmarkOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceNote.CisBenchmark) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 profile_level = 1; - * @return The profileLevel. - */ - int getProfileLevel(); - - /** - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - int getSeverityValue(); - /** - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - io.grafeas.v1.Severity getSeverity(); - } - /** - *
-   * A compliance check that is a CIS benchmark.
-   * 
- * - * Protobuf type {@code grafeas.v1.ComplianceNote.CisBenchmark} - */ - public static final class CisBenchmark extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceNote.CisBenchmark) - CisBenchmarkOrBuilder { - private static final long serialVersionUID = 0L; - // Use CisBenchmark.newBuilder() to construct. - private CisBenchmark(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CisBenchmark() { - severity_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CisBenchmark(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceNote.CisBenchmark.class, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder.class); - } - - public static final int PROFILE_LEVEL_FIELD_NUMBER = 1; - private int profileLevel_ = 0; - /** - * int32 profile_level = 1; - * @return The profileLevel. - */ - @java.lang.Override - public int getProfileLevel() { - return profileLevel_; - } - - public static final int SEVERITY_FIELD_NUMBER = 2; - private int severity_ = 0; - /** - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override public int getSeverityValue() { - return severity_; - } - /** - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - @java.lang.Override public io.grafeas.v1.Severity getSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (profileLevel_ != 0) { - output.writeInt32(1, profileLevel_); - } - if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - output.writeEnum(2, severity_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (profileLevel_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, profileLevel_); - } - if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, severity_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ComplianceNote.CisBenchmark)) { - return super.equals(obj); - } - io.grafeas.v1.ComplianceNote.CisBenchmark other = (io.grafeas.v1.ComplianceNote.CisBenchmark) obj; - - if (getProfileLevel() - != other.getProfileLevel()) return false; - if (severity_ != other.severity_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PROFILE_LEVEL_FIELD_NUMBER; - hash = (53 * hash) + getProfileLevel(); - hash = (37 * hash) + SEVERITY_FIELD_NUMBER; - hash = (53 * hash) + severity_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ComplianceNote.CisBenchmark prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A compliance check that is a CIS benchmark.
-     * 
- * - * Protobuf type {@code grafeas.v1.ComplianceNote.CisBenchmark} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceNote.CisBenchmark) - io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceNote.CisBenchmark.class, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder.class); - } - - // Construct using io.grafeas.v1.ComplianceNote.CisBenchmark.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - profileLevel_ = 0; - severity_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmark getDefaultInstanceForType() { - return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmark build() { - io.grafeas.v1.ComplianceNote.CisBenchmark result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmark buildPartial() { - io.grafeas.v1.ComplianceNote.CisBenchmark result = new io.grafeas.v1.ComplianceNote.CisBenchmark(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.ComplianceNote.CisBenchmark result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.profileLevel_ = profileLevel_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.severity_ = severity_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ComplianceNote.CisBenchmark) { - return mergeFrom((io.grafeas.v1.ComplianceNote.CisBenchmark)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ComplianceNote.CisBenchmark other) { - if (other == io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance()) return this; - if (other.getProfileLevel() != 0) { - setProfileLevel(other.getProfileLevel()); - } - if (other.severity_ != 0) { - setSeverityValue(other.getSeverityValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - profileLevel_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - severity_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int profileLevel_ ; - /** - * int32 profile_level = 1; - * @return The profileLevel. - */ - @java.lang.Override - public int getProfileLevel() { - return profileLevel_; - } - /** - * int32 profile_level = 1; - * @param value The profileLevel to set. - * @return This builder for chaining. - */ - public Builder setProfileLevel(int value) { - - profileLevel_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 profile_level = 1; - * @return This builder for chaining. - */ - public Builder clearProfileLevel() { - bitField0_ = (bitField0_ & ~0x00000001); - profileLevel_ = 0; - onChanged(); - return this; - } - - private int severity_ = 0; - /** - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override public int getSeverityValue() { - return severity_; - } - /** - * .grafeas.v1.Severity severity = 2; - * @param value The enum numeric value on the wire for severity to set. - * @return This builder for chaining. - */ - public Builder setSeverityValue(int value) { - severity_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - @java.lang.Override - public io.grafeas.v1.Severity getSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.Severity severity = 2; - * @param value The severity to set. - * @return This builder for chaining. - */ - public Builder setSeverity(io.grafeas.v1.Severity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - severity_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.Severity severity = 2; - * @return This builder for chaining. - */ - public Builder clearSeverity() { - bitField0_ = (bitField0_ & ~0x00000002); - severity_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceNote.CisBenchmark) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceNote.CisBenchmark) - private static final io.grafeas.v1.ComplianceNote.CisBenchmark DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceNote.CisBenchmark(); - } - - public static io.grafeas.v1.ComplianceNote.CisBenchmark getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CisBenchmark parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmark getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int complianceTypeCase_ = 0; - private java.lang.Object complianceType_; - public enum ComplianceTypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CIS_BENCHMARK(6), - COMPLIANCETYPE_NOT_SET(0); - private final int value; - private ComplianceTypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ComplianceTypeCase valueOf(int value) { - return forNumber(value); - } - - public static ComplianceTypeCase forNumber(int value) { - switch (value) { - case 6: return CIS_BENCHMARK; - case 0: return COMPLIANCETYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ComplianceTypeCase - getComplianceTypeCase() { - return ComplianceTypeCase.forNumber( - complianceTypeCase_); - } - - public static final int TITLE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; - /** - *
-   * The title that identifies this compliance check.
-   * 
- * - * string title = 1; - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } - } - /** - *
-   * The title that identifies this compliance check.
-   * 
- * - * string title = 1; - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * A description about this compliance check.
-   * 
- * - * string description = 2; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * A description about this compliance check.
-   * 
- * - * string description = 2; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List version_; - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - @java.lang.Override - public java.util.List getVersionList() { - return version_; - } - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - @java.lang.Override - public java.util.List - getVersionOrBuilderList() { - return version_; - } - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - @java.lang.Override - public int getVersionCount() { - return version_.size(); - } - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceVersion getVersion(int index) { - return version_.get(index); - } - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceVersionOrBuilder getVersionOrBuilder( - int index) { - return version_.get(index); - } - - public static final int RATIONALE_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object rationale_ = ""; - /** - *
-   * A rationale for the existence of this compliance check.
-   * 
- * - * string rationale = 4; - * @return The rationale. - */ - @java.lang.Override - public java.lang.String getRationale() { - java.lang.Object ref = rationale_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - rationale_ = s; - return s; - } - } - /** - *
-   * A rationale for the existence of this compliance check.
-   * 
- * - * string rationale = 4; - * @return The bytes for rationale. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRationaleBytes() { - java.lang.Object ref = rationale_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - rationale_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REMEDIATION_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object remediation_ = ""; - /** - *
-   * A description of remediation steps if the compliance check fails.
-   * 
- * - * string remediation = 5; - * @return The remediation. - */ - @java.lang.Override - public java.lang.String getRemediation() { - java.lang.Object ref = remediation_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - remediation_ = s; - return s; - } - } - /** - *
-   * A description of remediation steps if the compliance check fails.
-   * 
- * - * string remediation = 5; - * @return The bytes for remediation. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRemediationBytes() { - java.lang.Object ref = remediation_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - remediation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CIS_BENCHMARK_FIELD_NUMBER = 6; - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @return Whether the cisBenchmark field is set. - */ - @java.lang.Override - public boolean hasCisBenchmark() { - return complianceTypeCase_ == 6; - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @return The cisBenchmark. - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmark getCisBenchmark() { - if (complianceTypeCase_ == 6) { - return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; - } - return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder getCisBenchmarkOrBuilder() { - if (complianceTypeCase_ == 6) { - return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; - } - return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); - } - - public static final int SCAN_INSTRUCTIONS_FIELD_NUMBER = 7; - private com.google.protobuf.ByteString scanInstructions_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-   * Serialized scan instructions with a predefined format.
-   * 
- * - * bytes scan_instructions = 7; - * @return The scanInstructions. - */ - @java.lang.Override - public com.google.protobuf.ByteString getScanInstructions() { - return scanInstructions_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - for (int i = 0; i < version_.size(); i++) { - output.writeMessage(3, version_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rationale_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, rationale_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remediation_); - } - if (complianceTypeCase_ == 6) { - output.writeMessage(6, (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_); - } - if (!scanInstructions_.isEmpty()) { - output.writeBytes(7, scanInstructions_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - for (int i = 0; i < version_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, version_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rationale_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, rationale_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remediation_); - } - if (complianceTypeCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_); - } - if (!scanInstructions_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(7, scanInstructions_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ComplianceNote)) { - return super.equals(obj); - } - io.grafeas.v1.ComplianceNote other = (io.grafeas.v1.ComplianceNote) obj; - - if (!getTitle() - .equals(other.getTitle())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getVersionList() - .equals(other.getVersionList())) return false; - if (!getRationale() - .equals(other.getRationale())) return false; - if (!getRemediation() - .equals(other.getRemediation())) return false; - if (!getScanInstructions() - .equals(other.getScanInstructions())) return false; - if (!getComplianceTypeCase().equals(other.getComplianceTypeCase())) return false; - switch (complianceTypeCase_) { - case 6: - if (!getCisBenchmark() - .equals(other.getCisBenchmark())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (getVersionCount() > 0) { - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersionList().hashCode(); - } - hash = (37 * hash) + RATIONALE_FIELD_NUMBER; - hash = (53 * hash) + getRationale().hashCode(); - hash = (37 * hash) + REMEDIATION_FIELD_NUMBER; - hash = (53 * hash) + getRemediation().hashCode(); - hash = (37 * hash) + SCAN_INSTRUCTIONS_FIELD_NUMBER; - hash = (53 * hash) + getScanInstructions().hashCode(); - switch (complianceTypeCase_) { - case 6: - hash = (37 * hash) + CIS_BENCHMARK_FIELD_NUMBER; - hash = (53 * hash) + getCisBenchmark().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ComplianceNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ComplianceNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.ComplianceNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceNote) - io.grafeas.v1.ComplianceNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceNote.class, io.grafeas.v1.ComplianceNote.Builder.class); - } - - // Construct using io.grafeas.v1.ComplianceNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - title_ = ""; - description_ = ""; - if (versionBuilder_ == null) { - version_ = java.util.Collections.emptyList(); - } else { - version_ = null; - versionBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - rationale_ = ""; - remediation_ = ""; - if (cisBenchmarkBuilder_ != null) { - cisBenchmarkBuilder_.clear(); - } - scanInstructions_ = com.google.protobuf.ByteString.EMPTY; - complianceTypeCase_ = 0; - complianceType_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote getDefaultInstanceForType() { - return io.grafeas.v1.ComplianceNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote build() { - io.grafeas.v1.ComplianceNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote buildPartial() { - io.grafeas.v1.ComplianceNote result = new io.grafeas.v1.ComplianceNote(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.ComplianceNote result) { - if (versionBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - version_ = java.util.Collections.unmodifiableList(version_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.version_ = version_; - } else { - result.version_ = versionBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.ComplianceNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.title_ = title_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.rationale_ = rationale_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.remediation_ = remediation_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.scanInstructions_ = scanInstructions_; - } - } - - private void buildPartialOneofs(io.grafeas.v1.ComplianceNote result) { - result.complianceTypeCase_ = complianceTypeCase_; - result.complianceType_ = this.complianceType_; - if (complianceTypeCase_ == 6 && - cisBenchmarkBuilder_ != null) { - result.complianceType_ = cisBenchmarkBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ComplianceNote) { - return mergeFrom((io.grafeas.v1.ComplianceNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ComplianceNote other) { - if (other == io.grafeas.v1.ComplianceNote.getDefaultInstance()) return this; - if (!other.getTitle().isEmpty()) { - title_ = other.title_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (versionBuilder_ == null) { - if (!other.version_.isEmpty()) { - if (version_.isEmpty()) { - version_ = other.version_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureVersionIsMutable(); - version_.addAll(other.version_); - } - onChanged(); - } - } else { - if (!other.version_.isEmpty()) { - if (versionBuilder_.isEmpty()) { - versionBuilder_.dispose(); - versionBuilder_ = null; - version_ = other.version_; - bitField0_ = (bitField0_ & ~0x00000004); - versionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVersionFieldBuilder() : null; - } else { - versionBuilder_.addAllMessages(other.version_); - } - } - } - if (!other.getRationale().isEmpty()) { - rationale_ = other.rationale_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getRemediation().isEmpty()) { - remediation_ = other.remediation_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.getScanInstructions() != com.google.protobuf.ByteString.EMPTY) { - setScanInstructions(other.getScanInstructions()); - } - switch (other.getComplianceTypeCase()) { - case CIS_BENCHMARK: { - mergeCisBenchmark(other.getCisBenchmark()); - break; - } - case COMPLIANCETYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - io.grafeas.v1.ComplianceVersion m = - input.readMessage( - io.grafeas.v1.ComplianceVersion.parser(), - extensionRegistry); - if (versionBuilder_ == null) { - ensureVersionIsMutable(); - version_.add(m); - } else { - versionBuilder_.addMessage(m); - } - break; - } // case 26 - case 34: { - rationale_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - remediation_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - input.readMessage( - getCisBenchmarkFieldBuilder().getBuilder(), - extensionRegistry); - complianceTypeCase_ = 6; - break; - } // case 50 - case 58: { - scanInstructions_ = input.readBytes(); - bitField0_ |= 0x00000040; - break; - } // case 58 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int complianceTypeCase_ = 0; - private java.lang.Object complianceType_; - public ComplianceTypeCase - getComplianceTypeCase() { - return ComplianceTypeCase.forNumber( - complianceTypeCase_); - } - - public Builder clearComplianceType() { - complianceTypeCase_ = 0; - complianceType_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object title_ = ""; - /** - *
-     * The title that identifies this compliance check.
-     * 
- * - * string title = 1; - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The title that identifies this compliance check.
-     * 
- * - * string title = 1; - * @return The bytes for title. - */ - public com.google.protobuf.ByteString - getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The title that identifies this compliance check.
-     * 
- * - * string title = 1; - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - title_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The title that identifies this compliance check.
-     * 
- * - * string title = 1; - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The title that identifies this compliance check.
-     * 
- * - * string title = 1; - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * A description about this compliance check.
-     * 
- * - * string description = 2; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A description about this compliance check.
-     * 
- * - * string description = 2; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A description about this compliance check.
-     * 
- * - * string description = 2; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * A description about this compliance check.
-     * 
- * - * string description = 2; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * A description about this compliance check.
-     * 
- * - * string description = 2; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.util.List version_ = - java.util.Collections.emptyList(); - private void ensureVersionIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - version_ = new java.util.ArrayList(version_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.ComplianceVersion, io.grafeas.v1.ComplianceVersion.Builder, io.grafeas.v1.ComplianceVersionOrBuilder> versionBuilder_; - - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public java.util.List getVersionList() { - if (versionBuilder_ == null) { - return java.util.Collections.unmodifiableList(version_); - } else { - return versionBuilder_.getMessageList(); - } - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public int getVersionCount() { - if (versionBuilder_ == null) { - return version_.size(); - } else { - return versionBuilder_.getCount(); - } - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public io.grafeas.v1.ComplianceVersion getVersion(int index) { - if (versionBuilder_ == null) { - return version_.get(index); - } else { - return versionBuilder_.getMessage(index); - } - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder setVersion( - int index, io.grafeas.v1.ComplianceVersion value) { - if (versionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionIsMutable(); - version_.set(index, value); - onChanged(); - } else { - versionBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder setVersion( - int index, io.grafeas.v1.ComplianceVersion.Builder builderForValue) { - if (versionBuilder_ == null) { - ensureVersionIsMutable(); - version_.set(index, builderForValue.build()); - onChanged(); - } else { - versionBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder addVersion(io.grafeas.v1.ComplianceVersion value) { - if (versionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionIsMutable(); - version_.add(value); - onChanged(); - } else { - versionBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder addVersion( - int index, io.grafeas.v1.ComplianceVersion value) { - if (versionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionIsMutable(); - version_.add(index, value); - onChanged(); - } else { - versionBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder addVersion( - io.grafeas.v1.ComplianceVersion.Builder builderForValue) { - if (versionBuilder_ == null) { - ensureVersionIsMutable(); - version_.add(builderForValue.build()); - onChanged(); - } else { - versionBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder addVersion( - int index, io.grafeas.v1.ComplianceVersion.Builder builderForValue) { - if (versionBuilder_ == null) { - ensureVersionIsMutable(); - version_.add(index, builderForValue.build()); - onChanged(); - } else { - versionBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder addAllVersion( - java.lang.Iterable values) { - if (versionBuilder_ == null) { - ensureVersionIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, version_); - onChanged(); - } else { - versionBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder clearVersion() { - if (versionBuilder_ == null) { - version_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - versionBuilder_.clear(); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder removeVersion(int index) { - if (versionBuilder_ == null) { - ensureVersionIsMutable(); - version_.remove(index); - onChanged(); - } else { - versionBuilder_.remove(index); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public io.grafeas.v1.ComplianceVersion.Builder getVersionBuilder( - int index) { - return getVersionFieldBuilder().getBuilder(index); - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public io.grafeas.v1.ComplianceVersionOrBuilder getVersionOrBuilder( - int index) { - if (versionBuilder_ == null) { - return version_.get(index); } else { - return versionBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public java.util.List - getVersionOrBuilderList() { - if (versionBuilder_ != null) { - return versionBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(version_); - } - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public io.grafeas.v1.ComplianceVersion.Builder addVersionBuilder() { - return getVersionFieldBuilder().addBuilder( - io.grafeas.v1.ComplianceVersion.getDefaultInstance()); - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public io.grafeas.v1.ComplianceVersion.Builder addVersionBuilder( - int index) { - return getVersionFieldBuilder().addBuilder( - index, io.grafeas.v1.ComplianceVersion.getDefaultInstance()); - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public java.util.List - getVersionBuilderList() { - return getVersionFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.ComplianceVersion, io.grafeas.v1.ComplianceVersion.Builder, io.grafeas.v1.ComplianceVersionOrBuilder> - getVersionFieldBuilder() { - if (versionBuilder_ == null) { - versionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.ComplianceVersion, io.grafeas.v1.ComplianceVersion.Builder, io.grafeas.v1.ComplianceVersionOrBuilder>( - version_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - version_ = null; - } - return versionBuilder_; - } - - private java.lang.Object rationale_ = ""; - /** - *
-     * A rationale for the existence of this compliance check.
-     * 
- * - * string rationale = 4; - * @return The rationale. - */ - public java.lang.String getRationale() { - java.lang.Object ref = rationale_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - rationale_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A rationale for the existence of this compliance check.
-     * 
- * - * string rationale = 4; - * @return The bytes for rationale. - */ - public com.google.protobuf.ByteString - getRationaleBytes() { - java.lang.Object ref = rationale_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - rationale_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A rationale for the existence of this compliance check.
-     * 
- * - * string rationale = 4; - * @param value The rationale to set. - * @return This builder for chaining. - */ - public Builder setRationale( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - rationale_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * A rationale for the existence of this compliance check.
-     * 
- * - * string rationale = 4; - * @return This builder for chaining. - */ - public Builder clearRationale() { - rationale_ = getDefaultInstance().getRationale(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * A rationale for the existence of this compliance check.
-     * 
- * - * string rationale = 4; - * @param value The bytes for rationale to set. - * @return This builder for chaining. - */ - public Builder setRationaleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - rationale_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object remediation_ = ""; - /** - *
-     * A description of remediation steps if the compliance check fails.
-     * 
- * - * string remediation = 5; - * @return The remediation. - */ - public java.lang.String getRemediation() { - java.lang.Object ref = remediation_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - remediation_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A description of remediation steps if the compliance check fails.
-     * 
- * - * string remediation = 5; - * @return The bytes for remediation. - */ - public com.google.protobuf.ByteString - getRemediationBytes() { - java.lang.Object ref = remediation_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - remediation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A description of remediation steps if the compliance check fails.
-     * 
- * - * string remediation = 5; - * @param value The remediation to set. - * @return This builder for chaining. - */ - public Builder setRemediation( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - remediation_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * A description of remediation steps if the compliance check fails.
-     * 
- * - * string remediation = 5; - * @return This builder for chaining. - */ - public Builder clearRemediation() { - remediation_ = getDefaultInstance().getRemediation(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * A description of remediation steps if the compliance check fails.
-     * 
- * - * string remediation = 5; - * @param value The bytes for remediation to set. - * @return This builder for chaining. - */ - public Builder setRemediationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - remediation_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceNote.CisBenchmark, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder, io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder> cisBenchmarkBuilder_; - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @return Whether the cisBenchmark field is set. - */ - @java.lang.Override - public boolean hasCisBenchmark() { - return complianceTypeCase_ == 6; - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @return The cisBenchmark. - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmark getCisBenchmark() { - if (cisBenchmarkBuilder_ == null) { - if (complianceTypeCase_ == 6) { - return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; - } - return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); - } else { - if (complianceTypeCase_ == 6) { - return cisBenchmarkBuilder_.getMessage(); - } - return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); - } - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - public Builder setCisBenchmark(io.grafeas.v1.ComplianceNote.CisBenchmark value) { - if (cisBenchmarkBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - complianceType_ = value; - onChanged(); - } else { - cisBenchmarkBuilder_.setMessage(value); - } - complianceTypeCase_ = 6; - return this; - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - public Builder setCisBenchmark( - io.grafeas.v1.ComplianceNote.CisBenchmark.Builder builderForValue) { - if (cisBenchmarkBuilder_ == null) { - complianceType_ = builderForValue.build(); - onChanged(); - } else { - cisBenchmarkBuilder_.setMessage(builderForValue.build()); - } - complianceTypeCase_ = 6; - return this; - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - public Builder mergeCisBenchmark(io.grafeas.v1.ComplianceNote.CisBenchmark value) { - if (cisBenchmarkBuilder_ == null) { - if (complianceTypeCase_ == 6 && - complianceType_ != io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance()) { - complianceType_ = io.grafeas.v1.ComplianceNote.CisBenchmark.newBuilder((io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_) - .mergeFrom(value).buildPartial(); - } else { - complianceType_ = value; - } - onChanged(); - } else { - if (complianceTypeCase_ == 6) { - cisBenchmarkBuilder_.mergeFrom(value); - } else { - cisBenchmarkBuilder_.setMessage(value); - } - } - complianceTypeCase_ = 6; - return this; - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - public Builder clearCisBenchmark() { - if (cisBenchmarkBuilder_ == null) { - if (complianceTypeCase_ == 6) { - complianceTypeCase_ = 0; - complianceType_ = null; - onChanged(); - } - } else { - if (complianceTypeCase_ == 6) { - complianceTypeCase_ = 0; - complianceType_ = null; - } - cisBenchmarkBuilder_.clear(); - } - return this; - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - public io.grafeas.v1.ComplianceNote.CisBenchmark.Builder getCisBenchmarkBuilder() { - return getCisBenchmarkFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder getCisBenchmarkOrBuilder() { - if ((complianceTypeCase_ == 6) && (cisBenchmarkBuilder_ != null)) { - return cisBenchmarkBuilder_.getMessageOrBuilder(); - } else { - if (complianceTypeCase_ == 6) { - return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; - } - return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); - } - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceNote.CisBenchmark, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder, io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder> - getCisBenchmarkFieldBuilder() { - if (cisBenchmarkBuilder_ == null) { - if (!(complianceTypeCase_ == 6)) { - complianceType_ = io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); - } - cisBenchmarkBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceNote.CisBenchmark, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder, io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder>( - (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_, - getParentForChildren(), - isClean()); - complianceType_ = null; - } - complianceTypeCase_ = 6; - onChanged(); - return cisBenchmarkBuilder_; - } - - private com.google.protobuf.ByteString scanInstructions_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Serialized scan instructions with a predefined format.
-     * 
- * - * bytes scan_instructions = 7; - * @return The scanInstructions. - */ - @java.lang.Override - public com.google.protobuf.ByteString getScanInstructions() { - return scanInstructions_; - } - /** - *
-     * Serialized scan instructions with a predefined format.
-     * 
- * - * bytes scan_instructions = 7; - * @param value The scanInstructions to set. - * @return This builder for chaining. - */ - public Builder setScanInstructions(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - scanInstructions_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Serialized scan instructions with a predefined format.
-     * 
- * - * bytes scan_instructions = 7; - * @return This builder for chaining. - */ - public Builder clearScanInstructions() { - bitField0_ = (bitField0_ & ~0x00000040); - scanInstructions_ = getDefaultInstance().getScanInstructions(); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceNote) - private static final io.grafeas.v1.ComplianceNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceNote(); - } - - public static io.grafeas.v1.ComplianceNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ComplianceNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java deleted file mode 100644 index 8015d00f3627..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java +++ /dev/null @@ -1,160 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -public interface ComplianceNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The title that identifies this compliance check.
-   * 
- * - * string title = 1; - * @return The title. - */ - java.lang.String getTitle(); - /** - *
-   * The title that identifies this compliance check.
-   * 
- * - * string title = 1; - * @return The bytes for title. - */ - com.google.protobuf.ByteString - getTitleBytes(); - - /** - *
-   * A description about this compliance check.
-   * 
- * - * string description = 2; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A description about this compliance check.
-   * 
- * - * string description = 2; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - java.util.List - getVersionList(); - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - io.grafeas.v1.ComplianceVersion getVersion(int index); - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - int getVersionCount(); - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - java.util.List - getVersionOrBuilderList(); - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - io.grafeas.v1.ComplianceVersionOrBuilder getVersionOrBuilder( - int index); - - /** - *
-   * A rationale for the existence of this compliance check.
-   * 
- * - * string rationale = 4; - * @return The rationale. - */ - java.lang.String getRationale(); - /** - *
-   * A rationale for the existence of this compliance check.
-   * 
- * - * string rationale = 4; - * @return The bytes for rationale. - */ - com.google.protobuf.ByteString - getRationaleBytes(); - - /** - *
-   * A description of remediation steps if the compliance check fails.
-   * 
- * - * string remediation = 5; - * @return The remediation. - */ - java.lang.String getRemediation(); - /** - *
-   * A description of remediation steps if the compliance check fails.
-   * 
- * - * string remediation = 5; - * @return The bytes for remediation. - */ - com.google.protobuf.ByteString - getRemediationBytes(); - - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @return Whether the cisBenchmark field is set. - */ - boolean hasCisBenchmark(); - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @return The cisBenchmark. - */ - io.grafeas.v1.ComplianceNote.CisBenchmark getCisBenchmark(); - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder getCisBenchmarkOrBuilder(); - - /** - *
-   * Serialized scan instructions with a predefined format.
-   * 
- * - * bytes scan_instructions = 7; - * @return The scanInstructions. - */ - com.google.protobuf.ByteString getScanInstructions(); - - public io.grafeas.v1.ComplianceNote.ComplianceTypeCase getComplianceTypeCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java deleted file mode 100644 index 1c25dcc2f406..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java +++ /dev/null @@ -1,908 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -/** - *
- * An indication that the compliance checks in the associated ComplianceNote
- * were not satisfied for particular resources or a specified reason.
- * 
- * - * Protobuf type {@code grafeas.v1.ComplianceOccurrence} - */ -public final class ComplianceOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceOccurrence) - ComplianceOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use ComplianceOccurrence.newBuilder() to construct. - private ComplianceOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ComplianceOccurrence() { - nonCompliantFiles_ = java.util.Collections.emptyList(); - nonComplianceReason_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ComplianceOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceOccurrence.class, io.grafeas.v1.ComplianceOccurrence.Builder.class); - } - - public static final int NON_COMPLIANT_FILES_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List nonCompliantFiles_; - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - @java.lang.Override - public java.util.List getNonCompliantFilesList() { - return nonCompliantFiles_; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - @java.lang.Override - public java.util.List - getNonCompliantFilesOrBuilderList() { - return nonCompliantFiles_; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - @java.lang.Override - public int getNonCompliantFilesCount() { - return nonCompliantFiles_.size(); - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - @java.lang.Override - public io.grafeas.v1.NonCompliantFile getNonCompliantFiles(int index) { - return nonCompliantFiles_.get(index); - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - @java.lang.Override - public io.grafeas.v1.NonCompliantFileOrBuilder getNonCompliantFilesOrBuilder( - int index) { - return nonCompliantFiles_.get(index); - } - - public static final int NON_COMPLIANCE_REASON_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object nonComplianceReason_ = ""; - /** - * string non_compliance_reason = 3; - * @return The nonComplianceReason. - */ - @java.lang.Override - public java.lang.String getNonComplianceReason() { - java.lang.Object ref = nonComplianceReason_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nonComplianceReason_ = s; - return s; - } - } - /** - * string non_compliance_reason = 3; - * @return The bytes for nonComplianceReason. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNonComplianceReasonBytes() { - java.lang.Object ref = nonComplianceReason_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nonComplianceReason_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < nonCompliantFiles_.size(); i++) { - output.writeMessage(2, nonCompliantFiles_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nonComplianceReason_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nonComplianceReason_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < nonCompliantFiles_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, nonCompliantFiles_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nonComplianceReason_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nonComplianceReason_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ComplianceOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.ComplianceOccurrence other = (io.grafeas.v1.ComplianceOccurrence) obj; - - if (!getNonCompliantFilesList() - .equals(other.getNonCompliantFilesList())) return false; - if (!getNonComplianceReason() - .equals(other.getNonComplianceReason())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getNonCompliantFilesCount() > 0) { - hash = (37 * hash) + NON_COMPLIANT_FILES_FIELD_NUMBER; - hash = (53 * hash) + getNonCompliantFilesList().hashCode(); - } - hash = (37 * hash) + NON_COMPLIANCE_REASON_FIELD_NUMBER; - hash = (53 * hash) + getNonComplianceReason().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ComplianceOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An indication that the compliance checks in the associated ComplianceNote
-   * were not satisfied for particular resources or a specified reason.
-   * 
- * - * Protobuf type {@code grafeas.v1.ComplianceOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceOccurrence) - io.grafeas.v1.ComplianceOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceOccurrence.class, io.grafeas.v1.ComplianceOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.ComplianceOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (nonCompliantFilesBuilder_ == null) { - nonCompliantFiles_ = java.util.Collections.emptyList(); - } else { - nonCompliantFiles_ = null; - nonCompliantFilesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nonComplianceReason_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrence build() { - io.grafeas.v1.ComplianceOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrence buildPartial() { - io.grafeas.v1.ComplianceOccurrence result = new io.grafeas.v1.ComplianceOccurrence(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.ComplianceOccurrence result) { - if (nonCompliantFilesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - nonCompliantFiles_ = java.util.Collections.unmodifiableList(nonCompliantFiles_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.nonCompliantFiles_ = nonCompliantFiles_; - } else { - result.nonCompliantFiles_ = nonCompliantFilesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.ComplianceOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nonComplianceReason_ = nonComplianceReason_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ComplianceOccurrence) { - return mergeFrom((io.grafeas.v1.ComplianceOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ComplianceOccurrence other) { - if (other == io.grafeas.v1.ComplianceOccurrence.getDefaultInstance()) return this; - if (nonCompliantFilesBuilder_ == null) { - if (!other.nonCompliantFiles_.isEmpty()) { - if (nonCompliantFiles_.isEmpty()) { - nonCompliantFiles_ = other.nonCompliantFiles_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.addAll(other.nonCompliantFiles_); - } - onChanged(); - } - } else { - if (!other.nonCompliantFiles_.isEmpty()) { - if (nonCompliantFilesBuilder_.isEmpty()) { - nonCompliantFilesBuilder_.dispose(); - nonCompliantFilesBuilder_ = null; - nonCompliantFiles_ = other.nonCompliantFiles_; - bitField0_ = (bitField0_ & ~0x00000001); - nonCompliantFilesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNonCompliantFilesFieldBuilder() : null; - } else { - nonCompliantFilesBuilder_.addAllMessages(other.nonCompliantFiles_); - } - } - } - if (!other.getNonComplianceReason().isEmpty()) { - nonComplianceReason_ = other.nonComplianceReason_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: { - io.grafeas.v1.NonCompliantFile m = - input.readMessage( - io.grafeas.v1.NonCompliantFile.parser(), - extensionRegistry); - if (nonCompliantFilesBuilder_ == null) { - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.add(m); - } else { - nonCompliantFilesBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: { - nonComplianceReason_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List nonCompliantFiles_ = - java.util.Collections.emptyList(); - private void ensureNonCompliantFilesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - nonCompliantFiles_ = new java.util.ArrayList(nonCompliantFiles_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.NonCompliantFile, io.grafeas.v1.NonCompliantFile.Builder, io.grafeas.v1.NonCompliantFileOrBuilder> nonCompliantFilesBuilder_; - - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public java.util.List getNonCompliantFilesList() { - if (nonCompliantFilesBuilder_ == null) { - return java.util.Collections.unmodifiableList(nonCompliantFiles_); - } else { - return nonCompliantFilesBuilder_.getMessageList(); - } - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public int getNonCompliantFilesCount() { - if (nonCompliantFilesBuilder_ == null) { - return nonCompliantFiles_.size(); - } else { - return nonCompliantFilesBuilder_.getCount(); - } - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public io.grafeas.v1.NonCompliantFile getNonCompliantFiles(int index) { - if (nonCompliantFilesBuilder_ == null) { - return nonCompliantFiles_.get(index); - } else { - return nonCompliantFilesBuilder_.getMessage(index); - } - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder setNonCompliantFiles( - int index, io.grafeas.v1.NonCompliantFile value) { - if (nonCompliantFilesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.set(index, value); - onChanged(); - } else { - nonCompliantFilesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder setNonCompliantFiles( - int index, io.grafeas.v1.NonCompliantFile.Builder builderForValue) { - if (nonCompliantFilesBuilder_ == null) { - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.set(index, builderForValue.build()); - onChanged(); - } else { - nonCompliantFilesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder addNonCompliantFiles(io.grafeas.v1.NonCompliantFile value) { - if (nonCompliantFilesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.add(value); - onChanged(); - } else { - nonCompliantFilesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder addNonCompliantFiles( - int index, io.grafeas.v1.NonCompliantFile value) { - if (nonCompliantFilesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.add(index, value); - onChanged(); - } else { - nonCompliantFilesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder addNonCompliantFiles( - io.grafeas.v1.NonCompliantFile.Builder builderForValue) { - if (nonCompliantFilesBuilder_ == null) { - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.add(builderForValue.build()); - onChanged(); - } else { - nonCompliantFilesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder addNonCompliantFiles( - int index, io.grafeas.v1.NonCompliantFile.Builder builderForValue) { - if (nonCompliantFilesBuilder_ == null) { - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.add(index, builderForValue.build()); - onChanged(); - } else { - nonCompliantFilesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder addAllNonCompliantFiles( - java.lang.Iterable values) { - if (nonCompliantFilesBuilder_ == null) { - ensureNonCompliantFilesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, nonCompliantFiles_); - onChanged(); - } else { - nonCompliantFilesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder clearNonCompliantFiles() { - if (nonCompliantFilesBuilder_ == null) { - nonCompliantFiles_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - nonCompliantFilesBuilder_.clear(); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder removeNonCompliantFiles(int index) { - if (nonCompliantFilesBuilder_ == null) { - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.remove(index); - onChanged(); - } else { - nonCompliantFilesBuilder_.remove(index); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public io.grafeas.v1.NonCompliantFile.Builder getNonCompliantFilesBuilder( - int index) { - return getNonCompliantFilesFieldBuilder().getBuilder(index); - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public io.grafeas.v1.NonCompliantFileOrBuilder getNonCompliantFilesOrBuilder( - int index) { - if (nonCompliantFilesBuilder_ == null) { - return nonCompliantFiles_.get(index); } else { - return nonCompliantFilesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public java.util.List - getNonCompliantFilesOrBuilderList() { - if (nonCompliantFilesBuilder_ != null) { - return nonCompliantFilesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(nonCompliantFiles_); - } - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public io.grafeas.v1.NonCompliantFile.Builder addNonCompliantFilesBuilder() { - return getNonCompliantFilesFieldBuilder().addBuilder( - io.grafeas.v1.NonCompliantFile.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public io.grafeas.v1.NonCompliantFile.Builder addNonCompliantFilesBuilder( - int index) { - return getNonCompliantFilesFieldBuilder().addBuilder( - index, io.grafeas.v1.NonCompliantFile.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public java.util.List - getNonCompliantFilesBuilderList() { - return getNonCompliantFilesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.NonCompliantFile, io.grafeas.v1.NonCompliantFile.Builder, io.grafeas.v1.NonCompliantFileOrBuilder> - getNonCompliantFilesFieldBuilder() { - if (nonCompliantFilesBuilder_ == null) { - nonCompliantFilesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.NonCompliantFile, io.grafeas.v1.NonCompliantFile.Builder, io.grafeas.v1.NonCompliantFileOrBuilder>( - nonCompliantFiles_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - nonCompliantFiles_ = null; - } - return nonCompliantFilesBuilder_; - } - - private java.lang.Object nonComplianceReason_ = ""; - /** - * string non_compliance_reason = 3; - * @return The nonComplianceReason. - */ - public java.lang.String getNonComplianceReason() { - java.lang.Object ref = nonComplianceReason_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nonComplianceReason_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string non_compliance_reason = 3; - * @return The bytes for nonComplianceReason. - */ - public com.google.protobuf.ByteString - getNonComplianceReasonBytes() { - java.lang.Object ref = nonComplianceReason_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nonComplianceReason_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string non_compliance_reason = 3; - * @param value The nonComplianceReason to set. - * @return This builder for chaining. - */ - public Builder setNonComplianceReason( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - nonComplianceReason_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string non_compliance_reason = 3; - * @return This builder for chaining. - */ - public Builder clearNonComplianceReason() { - nonComplianceReason_ = getDefaultInstance().getNonComplianceReason(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string non_compliance_reason = 3; - * @param value The bytes for nonComplianceReason to set. - * @return This builder for chaining. - */ - public Builder setNonComplianceReasonBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - nonComplianceReason_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceOccurrence) - private static final io.grafeas.v1.ComplianceOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceOccurrence(); - } - - public static io.grafeas.v1.ComplianceOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ComplianceOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java deleted file mode 100644 index 695ccc5a7661..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -public interface ComplianceOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - java.util.List - getNonCompliantFilesList(); - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - io.grafeas.v1.NonCompliantFile getNonCompliantFiles(int index); - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - int getNonCompliantFilesCount(); - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - java.util.List - getNonCompliantFilesOrBuilderList(); - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - io.grafeas.v1.NonCompliantFileOrBuilder getNonCompliantFilesOrBuilder( - int index); - - /** - * string non_compliance_reason = 3; - * @return The nonComplianceReason. - */ - java.lang.String getNonComplianceReason(); - /** - * string non_compliance_reason = 3; - * @return The bytes for nonComplianceReason. - */ - com.google.protobuf.ByteString - getNonComplianceReasonBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java deleted file mode 100644 index 05e789e67a8f..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java +++ /dev/null @@ -1,931 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -/** - *
- * Describes the CIS benchmark version that is applicable to a given OS and
- * os version.
- * 
- * - * Protobuf type {@code grafeas.v1.ComplianceVersion} - */ -public final class ComplianceVersion extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceVersion) - ComplianceVersionOrBuilder { -private static final long serialVersionUID = 0L; - // Use ComplianceVersion.newBuilder() to construct. - private ComplianceVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ComplianceVersion() { - cpeUri_ = ""; - benchmarkDocument_ = ""; - version_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ComplianceVersion(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceVersion.class, io.grafeas.v1.ComplianceVersion.Builder.class); - } - - public static final int CPE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object cpeUri_ = ""; - /** - *
-   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-   * applicable to.
-   * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - @java.lang.Override - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } - } - /** - *
-   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-   * applicable to.
-   * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BENCHMARK_DOCUMENT_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object benchmarkDocument_ = ""; - /** - *
-   * The name of the document that defines this benchmark, e.g. "CIS
-   * Container-Optimized OS".
-   * 
- * - * string benchmark_document = 3; - * @return The benchmarkDocument. - */ - @java.lang.Override - public java.lang.String getBenchmarkDocument() { - java.lang.Object ref = benchmarkDocument_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - benchmarkDocument_ = s; - return s; - } - } - /** - *
-   * The name of the document that defines this benchmark, e.g. "CIS
-   * Container-Optimized OS".
-   * 
- * - * string benchmark_document = 3; - * @return The bytes for benchmarkDocument. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBenchmarkDocumentBytes() { - java.lang.Object ref = benchmarkDocument_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - benchmarkDocument_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - *
-   * The version of the benchmark. This is set to the version of the OS-specific
-   * CIS document the benchmark is defined in.
-   * 
- * - * string version = 2; - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - *
-   * The version of the benchmark. This is set to the version of the OS-specific
-   * CIS document the benchmark is defined in.
-   * 
- * - * string version = 2; - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(benchmarkDocument_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, benchmarkDocument_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(benchmarkDocument_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, benchmarkDocument_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ComplianceVersion)) { - return super.equals(obj); - } - io.grafeas.v1.ComplianceVersion other = (io.grafeas.v1.ComplianceVersion) obj; - - if (!getCpeUri() - .equals(other.getCpeUri())) return false; - if (!getBenchmarkDocument() - .equals(other.getBenchmarkDocument())) return false; - if (!getVersion() - .equals(other.getVersion())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCpeUri().hashCode(); - hash = (37 * hash) + BENCHMARK_DOCUMENT_FIELD_NUMBER; - hash = (53 * hash) + getBenchmarkDocument().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ComplianceVersion parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceVersion parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceVersion parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceVersion parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceVersion parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceVersion parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceVersion parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceVersion parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceVersion parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceVersion parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceVersion parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceVersion parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ComplianceVersion prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Describes the CIS benchmark version that is applicable to a given OS and
-   * os version.
-   * 
- * - * Protobuf type {@code grafeas.v1.ComplianceVersion} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceVersion) - io.grafeas.v1.ComplianceVersionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceVersion.class, io.grafeas.v1.ComplianceVersion.Builder.class); - } - - // Construct using io.grafeas.v1.ComplianceVersion.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - cpeUri_ = ""; - benchmarkDocument_ = ""; - version_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceVersion getDefaultInstanceForType() { - return io.grafeas.v1.ComplianceVersion.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ComplianceVersion build() { - io.grafeas.v1.ComplianceVersion result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceVersion buildPartial() { - io.grafeas.v1.ComplianceVersion result = new io.grafeas.v1.ComplianceVersion(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.ComplianceVersion result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.cpeUri_ = cpeUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.benchmarkDocument_ = benchmarkDocument_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.version_ = version_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ComplianceVersion) { - return mergeFrom((io.grafeas.v1.ComplianceVersion)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ComplianceVersion other) { - if (other == io.grafeas.v1.ComplianceVersion.getDefaultInstance()) return this; - if (!other.getCpeUri().isEmpty()) { - cpeUri_ = other.cpeUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getBenchmarkDocument().isEmpty()) { - benchmarkDocument_ = other.benchmarkDocument_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - cpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 18 - case 26: { - benchmarkDocument_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object cpeUri_ = ""; - /** - *
-     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-     * applicable to.
-     * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-     * applicable to.
-     * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-     * applicable to.
-     * 
- * - * string cpe_uri = 1; - * @param value The cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-     * applicable to.
-     * 
- * - * string cpe_uri = 1; - * @return This builder for chaining. - */ - public Builder clearCpeUri() { - cpeUri_ = getDefaultInstance().getCpeUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-     * applicable to.
-     * 
- * - * string cpe_uri = 1; - * @param value The bytes for cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object benchmarkDocument_ = ""; - /** - *
-     * The name of the document that defines this benchmark, e.g. "CIS
-     * Container-Optimized OS".
-     * 
- * - * string benchmark_document = 3; - * @return The benchmarkDocument. - */ - public java.lang.String getBenchmarkDocument() { - java.lang.Object ref = benchmarkDocument_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - benchmarkDocument_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the document that defines this benchmark, e.g. "CIS
-     * Container-Optimized OS".
-     * 
- * - * string benchmark_document = 3; - * @return The bytes for benchmarkDocument. - */ - public com.google.protobuf.ByteString - getBenchmarkDocumentBytes() { - java.lang.Object ref = benchmarkDocument_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - benchmarkDocument_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the document that defines this benchmark, e.g. "CIS
-     * Container-Optimized OS".
-     * 
- * - * string benchmark_document = 3; - * @param value The benchmarkDocument to set. - * @return This builder for chaining. - */ - public Builder setBenchmarkDocument( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - benchmarkDocument_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The name of the document that defines this benchmark, e.g. "CIS
-     * Container-Optimized OS".
-     * 
- * - * string benchmark_document = 3; - * @return This builder for chaining. - */ - public Builder clearBenchmarkDocument() { - benchmarkDocument_ = getDefaultInstance().getBenchmarkDocument(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The name of the document that defines this benchmark, e.g. "CIS
-     * Container-Optimized OS".
-     * 
- * - * string benchmark_document = 3; - * @param value The bytes for benchmarkDocument to set. - * @return This builder for chaining. - */ - public Builder setBenchmarkDocumentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - benchmarkDocument_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object version_ = ""; - /** - *
-     * The version of the benchmark. This is set to the version of the OS-specific
-     * CIS document the benchmark is defined in.
-     * 
- * - * string version = 2; - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The version of the benchmark. This is set to the version of the OS-specific
-     * CIS document the benchmark is defined in.
-     * 
- * - * string version = 2; - * @return The bytes for version. - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The version of the benchmark. This is set to the version of the OS-specific
-     * CIS document the benchmark is defined in.
-     * 
- * - * string version = 2; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - version_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The version of the benchmark. This is set to the version of the OS-specific
-     * CIS document the benchmark is defined in.
-     * 
- * - * string version = 2; - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The version of the benchmark. This is set to the version of the OS-specific
-     * CIS document the benchmark is defined in.
-     * 
- * - * string version = 2; - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceVersion) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceVersion) - private static final io.grafeas.v1.ComplianceVersion DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceVersion(); - } - - public static io.grafeas.v1.ComplianceVersion getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ComplianceVersion parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceVersion getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java deleted file mode 100644 index 3cdbaf8994ed..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -public interface ComplianceVersionOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceVersion) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-   * applicable to.
-   * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - java.lang.String getCpeUri(); - /** - *
-   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-   * applicable to.
-   * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - com.google.protobuf.ByteString - getCpeUriBytes(); - - /** - *
-   * The name of the document that defines this benchmark, e.g. "CIS
-   * Container-Optimized OS".
-   * 
- * - * string benchmark_document = 3; - * @return The benchmarkDocument. - */ - java.lang.String getBenchmarkDocument(); - /** - *
-   * The name of the document that defines this benchmark, e.g. "CIS
-   * Container-Optimized OS".
-   * 
- * - * string benchmark_document = 3; - * @return The bytes for benchmarkDocument. - */ - com.google.protobuf.ByteString - getBenchmarkDocumentBytes(); - - /** - *
-   * The version of the benchmark. This is set to the version of the OS-specific
-   * CIS document the benchmark is defined in.
-   * 
- * - * string version = 2; - * @return The version. - */ - java.lang.String getVersion(); - /** - *
-   * The version of the benchmark. This is set to the version of the OS-specific
-   * CIS document the benchmark is defined in.
-   * 
- * - * string version = 2; - * @return The bytes for version. - */ - com.google.protobuf.ByteString - getVersionBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java deleted file mode 100644 index aa37c98eeb01..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java +++ /dev/null @@ -1,980 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to create a new note.
- * 
- * - * Protobuf type {@code grafeas.v1.CreateNoteRequest} - */ -public final class CreateNoteRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.CreateNoteRequest) - CreateNoteRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateNoteRequest.newBuilder() to construct. - private CreateNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateNoteRequest() { - parent_ = ""; - noteId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateNoteRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CreateNoteRequest.class, io.grafeas.v1.CreateNoteRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the note is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the note is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NOTE_ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object noteId_ = ""; - /** - *
-   * The ID to use for this note.
-   * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The noteId. - */ - @java.lang.Override - public java.lang.String getNoteId() { - java.lang.Object ref = noteId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - noteId_ = s; - return s; - } - } - /** - *
-   * The ID to use for this note.
-   * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for noteId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNoteIdBytes() { - java.lang.Object ref = noteId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - noteId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NOTE_FIELD_NUMBER = 3; - private io.grafeas.v1.Note note_; - /** - *
-   * The note to create.
-   * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the note field is set. - */ - @java.lang.Override - public boolean hasNote() { - return note_ != null; - } - /** - *
-   * The note to create.
-   * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The note. - */ - @java.lang.Override - public io.grafeas.v1.Note getNote() { - return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; - } - /** - *
-   * The note to create.
-   * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { - return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, noteId_); - } - if (note_ != null) { - output.writeMessage(3, getNote()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, noteId_); - } - if (note_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getNote()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.CreateNoteRequest)) { - return super.equals(obj); - } - io.grafeas.v1.CreateNoteRequest other = (io.grafeas.v1.CreateNoteRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getNoteId() - .equals(other.getNoteId())) return false; - if (hasNote() != other.hasNote()) return false; - if (hasNote()) { - if (!getNote() - .equals(other.getNote())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + NOTE_ID_FIELD_NUMBER; - hash = (53 * hash) + getNoteId().hashCode(); - if (hasNote()) { - hash = (37 * hash) + NOTE_FIELD_NUMBER; - hash = (53 * hash) + getNote().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.CreateNoteRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CreateNoteRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.CreateNoteRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.CreateNoteRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to create a new note.
-   * 
- * - * Protobuf type {@code grafeas.v1.CreateNoteRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.CreateNoteRequest) - io.grafeas.v1.CreateNoteRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CreateNoteRequest.class, io.grafeas.v1.CreateNoteRequest.Builder.class); - } - - // Construct using io.grafeas.v1.CreateNoteRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - noteId_ = ""; - note_ = null; - if (noteBuilder_ != null) { - noteBuilder_.dispose(); - noteBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.CreateNoteRequest getDefaultInstanceForType() { - return io.grafeas.v1.CreateNoteRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.CreateNoteRequest build() { - io.grafeas.v1.CreateNoteRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.CreateNoteRequest buildPartial() { - io.grafeas.v1.CreateNoteRequest result = new io.grafeas.v1.CreateNoteRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.CreateNoteRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.noteId_ = noteId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.note_ = noteBuilder_ == null - ? note_ - : noteBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.CreateNoteRequest) { - return mergeFrom((io.grafeas.v1.CreateNoteRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.CreateNoteRequest other) { - if (other == io.grafeas.v1.CreateNoteRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getNoteId().isEmpty()) { - noteId_ = other.noteId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasNote()) { - mergeNote(other.getNote()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - noteId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getNoteFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the note is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the note is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the note is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the note is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the note is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object noteId_ = ""; - /** - *
-     * The ID to use for this note.
-     * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The noteId. - */ - public java.lang.String getNoteId() { - java.lang.Object ref = noteId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - noteId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The ID to use for this note.
-     * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for noteId. - */ - public com.google.protobuf.ByteString - getNoteIdBytes() { - java.lang.Object ref = noteId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - noteId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The ID to use for this note.
-     * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The noteId to set. - * @return This builder for chaining. - */ - public Builder setNoteId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - noteId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The ID to use for this note.
-     * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearNoteId() { - noteId_ = getDefaultInstance().getNoteId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The ID to use for this note.
-     * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for noteId to set. - * @return This builder for chaining. - */ - public Builder setNoteIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - noteId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private io.grafeas.v1.Note note_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> noteBuilder_; - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the note field is set. - */ - public boolean hasNote() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The note. - */ - public io.grafeas.v1.Note getNote() { - if (noteBuilder_ == null) { - return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; - } else { - return noteBuilder_.getMessage(); - } - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setNote(io.grafeas.v1.Note value) { - if (noteBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - note_ = value; - } else { - noteBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setNote( - io.grafeas.v1.Note.Builder builderForValue) { - if (noteBuilder_ == null) { - note_ = builderForValue.build(); - } else { - noteBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeNote(io.grafeas.v1.Note value) { - if (noteBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - note_ != null && - note_ != io.grafeas.v1.Note.getDefaultInstance()) { - getNoteBuilder().mergeFrom(value); - } else { - note_ = value; - } - } else { - noteBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearNote() { - bitField0_ = (bitField0_ & ~0x00000004); - note_ = null; - if (noteBuilder_ != null) { - noteBuilder_.dispose(); - noteBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Note.Builder getNoteBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getNoteFieldBuilder().getBuilder(); - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { - if (noteBuilder_ != null) { - return noteBuilder_.getMessageOrBuilder(); - } else { - return note_ == null ? - io.grafeas.v1.Note.getDefaultInstance() : note_; - } - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> - getNoteFieldBuilder() { - if (noteBuilder_ == null) { - noteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( - getNote(), - getParentForChildren(), - isClean()); - note_ = null; - } - return noteBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.CreateNoteRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.CreateNoteRequest) - private static final io.grafeas.v1.CreateNoteRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.CreateNoteRequest(); - } - - public static io.grafeas.v1.CreateNoteRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateNoteRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.CreateNoteRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java deleted file mode 100644 index e5c14a7948a8..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface CreateNoteRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.CreateNoteRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the note is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the note is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The ID to use for this note.
-   * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The noteId. - */ - java.lang.String getNoteId(); - /** - *
-   * The ID to use for this note.
-   * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for noteId. - */ - com.google.protobuf.ByteString - getNoteIdBytes(); - - /** - *
-   * The note to create.
-   * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the note field is set. - */ - boolean hasNote(); - /** - *
-   * The note to create.
-   * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The note. - */ - io.grafeas.v1.Note getNote(); - /** - *
-   * The note to create.
-   * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - io.grafeas.v1.NoteOrBuilder getNoteOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java deleted file mode 100644 index 0748ea7f5513..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java +++ /dev/null @@ -1,816 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to create a new occurrence.
- * 
- * - * Protobuf type {@code grafeas.v1.CreateOccurrenceRequest} - */ -public final class CreateOccurrenceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.CreateOccurrenceRequest) - CreateOccurrenceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateOccurrenceRequest.newBuilder() to construct. - private CreateOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateOccurrenceRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateOccurrenceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CreateOccurrenceRequest.class, io.grafeas.v1.CreateOccurrenceRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrence is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrence is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OCCURRENCE_FIELD_NUMBER = 2; - private io.grafeas.v1.Occurrence occurrence_; - /** - *
-   * The occurrence to create.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the occurrence field is set. - */ - @java.lang.Override - public boolean hasOccurrence() { - return occurrence_ != null; - } - /** - *
-   * The occurrence to create.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The occurrence. - */ - @java.lang.Override - public io.grafeas.v1.Occurrence getOccurrence() { - return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } - /** - *
-   * The occurrence to create.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { - return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (occurrence_ != null) { - output.writeMessage(2, getOccurrence()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (occurrence_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getOccurrence()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.CreateOccurrenceRequest)) { - return super.equals(obj); - } - io.grafeas.v1.CreateOccurrenceRequest other = (io.grafeas.v1.CreateOccurrenceRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasOccurrence() != other.hasOccurrence()) return false; - if (hasOccurrence()) { - if (!getOccurrence() - .equals(other.getOccurrence())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasOccurrence()) { - hash = (37 * hash) + OCCURRENCE_FIELD_NUMBER; - hash = (53 * hash) + getOccurrence().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.CreateOccurrenceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to create a new occurrence.
-   * 
- * - * Protobuf type {@code grafeas.v1.CreateOccurrenceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.CreateOccurrenceRequest) - io.grafeas.v1.CreateOccurrenceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CreateOccurrenceRequest.class, io.grafeas.v1.CreateOccurrenceRequest.Builder.class); - } - - // Construct using io.grafeas.v1.CreateOccurrenceRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - occurrence_ = null; - if (occurrenceBuilder_ != null) { - occurrenceBuilder_.dispose(); - occurrenceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.CreateOccurrenceRequest getDefaultInstanceForType() { - return io.grafeas.v1.CreateOccurrenceRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.CreateOccurrenceRequest build() { - io.grafeas.v1.CreateOccurrenceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.CreateOccurrenceRequest buildPartial() { - io.grafeas.v1.CreateOccurrenceRequest result = new io.grafeas.v1.CreateOccurrenceRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.CreateOccurrenceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.occurrence_ = occurrenceBuilder_ == null - ? occurrence_ - : occurrenceBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.CreateOccurrenceRequest) { - return mergeFrom((io.grafeas.v1.CreateOccurrenceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.CreateOccurrenceRequest other) { - if (other == io.grafeas.v1.CreateOccurrenceRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasOccurrence()) { - mergeOccurrence(other.getOccurrence()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getOccurrenceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrence is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrence is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrence is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrence is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrence is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.grafeas.v1.Occurrence occurrence_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrenceBuilder_; - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the occurrence field is set. - */ - public boolean hasOccurrence() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The occurrence. - */ - public io.grafeas.v1.Occurrence getOccurrence() { - if (occurrenceBuilder_ == null) { - return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } else { - return occurrenceBuilder_.getMessage(); - } - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOccurrence(io.grafeas.v1.Occurrence value) { - if (occurrenceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - occurrence_ = value; - } else { - occurrenceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOccurrence( - io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrenceBuilder_ == null) { - occurrence_ = builderForValue.build(); - } else { - occurrenceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeOccurrence(io.grafeas.v1.Occurrence value) { - if (occurrenceBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - occurrence_ != null && - occurrence_ != io.grafeas.v1.Occurrence.getDefaultInstance()) { - getOccurrenceBuilder().mergeFrom(value); - } else { - occurrence_ = value; - } - } else { - occurrenceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearOccurrence() { - bitField0_ = (bitField0_ & ~0x00000002); - occurrence_ = null; - if (occurrenceBuilder_ != null) { - occurrenceBuilder_.dispose(); - occurrenceBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Occurrence.Builder getOccurrenceBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getOccurrenceFieldBuilder().getBuilder(); - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { - if (occurrenceBuilder_ != null) { - return occurrenceBuilder_.getMessageOrBuilder(); - } else { - return occurrence_ == null ? - io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> - getOccurrenceFieldBuilder() { - if (occurrenceBuilder_ == null) { - occurrenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( - getOccurrence(), - getParentForChildren(), - isClean()); - occurrence_ = null; - } - return occurrenceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.CreateOccurrenceRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.CreateOccurrenceRequest) - private static final io.grafeas.v1.CreateOccurrenceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.CreateOccurrenceRequest(); - } - - public static io.grafeas.v1.CreateOccurrenceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateOccurrenceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.CreateOccurrenceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java deleted file mode 100644 index 6e3a891dbb49..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface CreateOccurrenceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.CreateOccurrenceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrence is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrence is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The occurrence to create.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the occurrence field is set. - */ - boolean hasOccurrence(); - /** - *
-   * The occurrence to create.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The occurrence. - */ - io.grafeas.v1.Occurrence getOccurrence(); - /** - *
-   * The occurrence to create.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java deleted file mode 100644 index f8cbe4710cbd..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java +++ /dev/null @@ -1,1257 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/dsse_attestation.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.DSSEAttestationNote} - */ -public final class DSSEAttestationNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DSSEAttestationNote) - DSSEAttestationNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use DSSEAttestationNote.newBuilder() to construct. - private DSSEAttestationNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DSSEAttestationNote() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DSSEAttestationNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DSSEAttestationNote.class, io.grafeas.v1.DSSEAttestationNote.Builder.class); - } - - public interface DSSEHintOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DSSEAttestationNote.DSSEHint) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "cloudbuild-prod".
-     * 
- * - * string human_readable_name = 1; - * @return The humanReadableName. - */ - java.lang.String getHumanReadableName(); - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "cloudbuild-prod".
-     * 
- * - * string human_readable_name = 1; - * @return The bytes for humanReadableName. - */ - com.google.protobuf.ByteString - getHumanReadableNameBytes(); - } - /** - *
-   * This submessage provides human-readable hints about the purpose of the
-   * authority. Because the name of a note acts as its resource reference, it is
-   * important to disambiguate the canonical name of the Note (which might be a
-   * UUID for security purposes) from "readable" names more suitable for debug
-   * output. Note that these hints should not be used to look up authorities in
-   * security sensitive contexts, such as when looking up attestations to
-   * verify.
-   * 
- * - * Protobuf type {@code grafeas.v1.DSSEAttestationNote.DSSEHint} - */ - public static final class DSSEHint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DSSEAttestationNote.DSSEHint) - DSSEHintOrBuilder { - private static final long serialVersionUID = 0L; - // Use DSSEHint.newBuilder() to construct. - private DSSEHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DSSEHint() { - humanReadableName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DSSEHint(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DSSEAttestationNote.DSSEHint.class, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder.class); - } - - public static final int HUMAN_READABLE_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object humanReadableName_ = ""; - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "cloudbuild-prod".
-     * 
- * - * string human_readable_name = 1; - * @return The humanReadableName. - */ - @java.lang.Override - public java.lang.String getHumanReadableName() { - java.lang.Object ref = humanReadableName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - humanReadableName_ = s; - return s; - } - } - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "cloudbuild-prod".
-     * 
- * - * string human_readable_name = 1; - * @return The bytes for humanReadableName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getHumanReadableNameBytes() { - java.lang.Object ref = humanReadableName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - humanReadableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, humanReadableName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, humanReadableName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DSSEAttestationNote.DSSEHint)) { - return super.equals(obj); - } - io.grafeas.v1.DSSEAttestationNote.DSSEHint other = (io.grafeas.v1.DSSEAttestationNote.DSSEHint) obj; - - if (!getHumanReadableName() - .equals(other.getHumanReadableName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HUMAN_READABLE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getHumanReadableName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DSSEAttestationNote.DSSEHint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * This submessage provides human-readable hints about the purpose of the
-     * authority. Because the name of a note acts as its resource reference, it is
-     * important to disambiguate the canonical name of the Note (which might be a
-     * UUID for security purposes) from "readable" names more suitable for debug
-     * output. Note that these hints should not be used to look up authorities in
-     * security sensitive contexts, such as when looking up attestations to
-     * verify.
-     * 
- * - * Protobuf type {@code grafeas.v1.DSSEAttestationNote.DSSEHint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DSSEAttestationNote.DSSEHint) - io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DSSEAttestationNote.DSSEHint.class, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder.class); - } - - // Construct using io.grafeas.v1.DSSEAttestationNote.DSSEHint.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - humanReadableName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote.DSSEHint getDefaultInstanceForType() { - return io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote.DSSEHint build() { - io.grafeas.v1.DSSEAttestationNote.DSSEHint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote.DSSEHint buildPartial() { - io.grafeas.v1.DSSEAttestationNote.DSSEHint result = new io.grafeas.v1.DSSEAttestationNote.DSSEHint(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.DSSEAttestationNote.DSSEHint result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.humanReadableName_ = humanReadableName_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DSSEAttestationNote.DSSEHint) { - return mergeFrom((io.grafeas.v1.DSSEAttestationNote.DSSEHint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DSSEAttestationNote.DSSEHint other) { - if (other == io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance()) return this; - if (!other.getHumanReadableName().isEmpty()) { - humanReadableName_ = other.humanReadableName_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - humanReadableName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object humanReadableName_ = ""; - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "cloudbuild-prod".
-       * 
- * - * string human_readable_name = 1; - * @return The humanReadableName. - */ - public java.lang.String getHumanReadableName() { - java.lang.Object ref = humanReadableName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - humanReadableName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "cloudbuild-prod".
-       * 
- * - * string human_readable_name = 1; - * @return The bytes for humanReadableName. - */ - public com.google.protobuf.ByteString - getHumanReadableNameBytes() { - java.lang.Object ref = humanReadableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - humanReadableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "cloudbuild-prod".
-       * 
- * - * string human_readable_name = 1; - * @param value The humanReadableName to set. - * @return This builder for chaining. - */ - public Builder setHumanReadableName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - humanReadableName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "cloudbuild-prod".
-       * 
- * - * string human_readable_name = 1; - * @return This builder for chaining. - */ - public Builder clearHumanReadableName() { - humanReadableName_ = getDefaultInstance().getHumanReadableName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "cloudbuild-prod".
-       * 
- * - * string human_readable_name = 1; - * @param value The bytes for humanReadableName to set. - * @return This builder for chaining. - */ - public Builder setHumanReadableNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - humanReadableName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DSSEAttestationNote.DSSEHint) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DSSEAttestationNote.DSSEHint) - private static final io.grafeas.v1.DSSEAttestationNote.DSSEHint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DSSEAttestationNote.DSSEHint(); - } - - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DSSEHint parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote.DSSEHint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int HINT_FIELD_NUMBER = 1; - private io.grafeas.v1.DSSEAttestationNote.DSSEHint hint_; - /** - *
-   * DSSEHint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @return Whether the hint field is set. - */ - @java.lang.Override - public boolean hasHint() { - return hint_ != null; - } - /** - *
-   * DSSEHint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @return The hint. - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote.DSSEHint getHint() { - return hint_ == null ? io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; - } - /** - *
-   * DSSEHint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder getHintOrBuilder() { - return hint_ == null ? io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (hint_ != null) { - output.writeMessage(1, getHint()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (hint_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getHint()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DSSEAttestationNote)) { - return super.equals(obj); - } - io.grafeas.v1.DSSEAttestationNote other = (io.grafeas.v1.DSSEAttestationNote) obj; - - if (hasHint() != other.hasHint()) return false; - if (hasHint()) { - if (!getHint() - .equals(other.getHint())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasHint()) { - hash = (37 * hash) + HINT_FIELD_NUMBER; - hash = (53 * hash) + getHint().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DSSEAttestationNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.DSSEAttestationNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DSSEAttestationNote) - io.grafeas.v1.DSSEAttestationNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DSSEAttestationNote.class, io.grafeas.v1.DSSEAttestationNote.Builder.class); - } - - // Construct using io.grafeas.v1.DSSEAttestationNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - hint_ = null; - if (hintBuilder_ != null) { - hintBuilder_.dispose(); - hintBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote getDefaultInstanceForType() { - return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote build() { - io.grafeas.v1.DSSEAttestationNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote buildPartial() { - io.grafeas.v1.DSSEAttestationNote result = new io.grafeas.v1.DSSEAttestationNote(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.DSSEAttestationNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.hint_ = hintBuilder_ == null - ? hint_ - : hintBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DSSEAttestationNote) { - return mergeFrom((io.grafeas.v1.DSSEAttestationNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DSSEAttestationNote other) { - if (other == io.grafeas.v1.DSSEAttestationNote.getDefaultInstance()) return this; - if (other.hasHint()) { - mergeHint(other.getHint()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getHintFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.DSSEAttestationNote.DSSEHint hint_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationNote.DSSEHint, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder, io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder> hintBuilder_; - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @return Whether the hint field is set. - */ - public boolean hasHint() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @return The hint. - */ - public io.grafeas.v1.DSSEAttestationNote.DSSEHint getHint() { - if (hintBuilder_ == null) { - return hint_ == null ? io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; - } else { - return hintBuilder_.getMessage(); - } - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - public Builder setHint(io.grafeas.v1.DSSEAttestationNote.DSSEHint value) { - if (hintBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hint_ = value; - } else { - hintBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - public Builder setHint( - io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder builderForValue) { - if (hintBuilder_ == null) { - hint_ = builderForValue.build(); - } else { - hintBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - public Builder mergeHint(io.grafeas.v1.DSSEAttestationNote.DSSEHint value) { - if (hintBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - hint_ != null && - hint_ != io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance()) { - getHintBuilder().mergeFrom(value); - } else { - hint_ = value; - } - } else { - hintBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - public Builder clearHint() { - bitField0_ = (bitField0_ & ~0x00000001); - hint_ = null; - if (hintBuilder_ != null) { - hintBuilder_.dispose(); - hintBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - public io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder getHintBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getHintFieldBuilder().getBuilder(); - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - public io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder getHintOrBuilder() { - if (hintBuilder_ != null) { - return hintBuilder_.getMessageOrBuilder(); - } else { - return hint_ == null ? - io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; - } - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationNote.DSSEHint, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder, io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder> - getHintFieldBuilder() { - if (hintBuilder_ == null) { - hintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationNote.DSSEHint, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder, io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder>( - getHint(), - getParentForChildren(), - isClean()); - hint_ = null; - } - return hintBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DSSEAttestationNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DSSEAttestationNote) - private static final io.grafeas.v1.DSSEAttestationNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DSSEAttestationNote(); - } - - public static io.grafeas.v1.DSSEAttestationNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DSSEAttestationNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java deleted file mode 100644 index a117798b32fc..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/dsse_attestation.proto - -package io.grafeas.v1; - -public interface DSSEAttestationNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DSSEAttestationNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * DSSEHint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @return Whether the hint field is set. - */ - boolean hasHint(); - /** - *
-   * DSSEHint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @return The hint. - */ - io.grafeas.v1.DSSEAttestationNote.DSSEHint getHint(); - /** - *
-   * DSSEHint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder getHintOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java deleted file mode 100644 index 4228d6b0b59c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java +++ /dev/null @@ -1,941 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/dsse_attestation.proto - -package io.grafeas.v1; - -/** - *
- * Deprecated. Prefer to use a regular Occurrence, and populate the
- * Envelope at the top level of the Occurrence.
- * 
- * - * Protobuf type {@code grafeas.v1.DSSEAttestationOccurrence} - */ -public final class DSSEAttestationOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DSSEAttestationOccurrence) - DSSEAttestationOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use DSSEAttestationOccurrence.newBuilder() to construct. - private DSSEAttestationOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DSSEAttestationOccurrence() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DSSEAttestationOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DSSEAttestationOccurrence.class, io.grafeas.v1.DSSEAttestationOccurrence.Builder.class); - } - - private int decodedPayloadCase_ = 0; - private java.lang.Object decodedPayload_; - public enum DecodedPayloadCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - STATEMENT(2), - DECODEDPAYLOAD_NOT_SET(0); - private final int value; - private DecodedPayloadCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DecodedPayloadCase valueOf(int value) { - return forNumber(value); - } - - public static DecodedPayloadCase forNumber(int value) { - switch (value) { - case 2: return STATEMENT; - case 0: return DECODEDPAYLOAD_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public DecodedPayloadCase - getDecodedPayloadCase() { - return DecodedPayloadCase.forNumber( - decodedPayloadCase_); - } - - public static final int ENVELOPE_FIELD_NUMBER = 1; - private io.grafeas.v1.Envelope envelope_; - /** - *
-   * If doing something security critical, make sure to verify the signatures in
-   * this metadata.
-   * 
- * - * .grafeas.v1.Envelope envelope = 1; - * @return Whether the envelope field is set. - */ - @java.lang.Override - public boolean hasEnvelope() { - return envelope_ != null; - } - /** - *
-   * If doing something security critical, make sure to verify the signatures in
-   * this metadata.
-   * 
- * - * .grafeas.v1.Envelope envelope = 1; - * @return The envelope. - */ - @java.lang.Override - public io.grafeas.v1.Envelope getEnvelope() { - return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } - /** - *
-   * If doing something security critical, make sure to verify the signatures in
-   * this metadata.
-   * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - @java.lang.Override - public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { - return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } - - public static final int STATEMENT_FIELD_NUMBER = 2; - /** - * .grafeas.v1.InTotoStatement statement = 2; - * @return Whether the statement field is set. - */ - @java.lang.Override - public boolean hasStatement() { - return decodedPayloadCase_ == 2; - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - * @return The statement. - */ - @java.lang.Override - public io.grafeas.v1.InTotoStatement getStatement() { - if (decodedPayloadCase_ == 2) { - return (io.grafeas.v1.InTotoStatement) decodedPayload_; - } - return io.grafeas.v1.InTotoStatement.getDefaultInstance(); - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - @java.lang.Override - public io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder() { - if (decodedPayloadCase_ == 2) { - return (io.grafeas.v1.InTotoStatement) decodedPayload_; - } - return io.grafeas.v1.InTotoStatement.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (envelope_ != null) { - output.writeMessage(1, getEnvelope()); - } - if (decodedPayloadCase_ == 2) { - output.writeMessage(2, (io.grafeas.v1.InTotoStatement) decodedPayload_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (envelope_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEnvelope()); - } - if (decodedPayloadCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (io.grafeas.v1.InTotoStatement) decodedPayload_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DSSEAttestationOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.DSSEAttestationOccurrence other = (io.grafeas.v1.DSSEAttestationOccurrence) obj; - - if (hasEnvelope() != other.hasEnvelope()) return false; - if (hasEnvelope()) { - if (!getEnvelope() - .equals(other.getEnvelope())) return false; - } - if (!getDecodedPayloadCase().equals(other.getDecodedPayloadCase())) return false; - switch (decodedPayloadCase_) { - case 2: - if (!getStatement() - .equals(other.getStatement())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEnvelope()) { - hash = (37 * hash) + ENVELOPE_FIELD_NUMBER; - hash = (53 * hash) + getEnvelope().hashCode(); - } - switch (decodedPayloadCase_) { - case 2: - hash = (37 * hash) + STATEMENT_FIELD_NUMBER; - hash = (53 * hash) + getStatement().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DSSEAttestationOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Deprecated. Prefer to use a regular Occurrence, and populate the
-   * Envelope at the top level of the Occurrence.
-   * 
- * - * Protobuf type {@code grafeas.v1.DSSEAttestationOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DSSEAttestationOccurrence) - io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DSSEAttestationOccurrence.class, io.grafeas.v1.DSSEAttestationOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.DSSEAttestationOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - envelope_ = null; - if (envelopeBuilder_ != null) { - envelopeBuilder_.dispose(); - envelopeBuilder_ = null; - } - if (statementBuilder_ != null) { - statementBuilder_.clear(); - } - decodedPayloadCase_ = 0; - decodedPayload_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrence build() { - io.grafeas.v1.DSSEAttestationOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrence buildPartial() { - io.grafeas.v1.DSSEAttestationOccurrence result = new io.grafeas.v1.DSSEAttestationOccurrence(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.DSSEAttestationOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.envelope_ = envelopeBuilder_ == null - ? envelope_ - : envelopeBuilder_.build(); - } - } - - private void buildPartialOneofs(io.grafeas.v1.DSSEAttestationOccurrence result) { - result.decodedPayloadCase_ = decodedPayloadCase_; - result.decodedPayload_ = this.decodedPayload_; - if (decodedPayloadCase_ == 2 && - statementBuilder_ != null) { - result.decodedPayload_ = statementBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DSSEAttestationOccurrence) { - return mergeFrom((io.grafeas.v1.DSSEAttestationOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DSSEAttestationOccurrence other) { - if (other == io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance()) return this; - if (other.hasEnvelope()) { - mergeEnvelope(other.getEnvelope()); - } - switch (other.getDecodedPayloadCase()) { - case STATEMENT: { - mergeStatement(other.getStatement()); - break; - } - case DECODEDPAYLOAD_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getEnvelopeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getStatementFieldBuilder().getBuilder(), - extensionRegistry); - decodedPayloadCase_ = 2; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int decodedPayloadCase_ = 0; - private java.lang.Object decodedPayload_; - public DecodedPayloadCase - getDecodedPayloadCase() { - return DecodedPayloadCase.forNumber( - decodedPayloadCase_); - } - - public Builder clearDecodedPayload() { - decodedPayloadCase_ = 0; - decodedPayload_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private io.grafeas.v1.Envelope envelope_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> envelopeBuilder_; - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - * @return Whether the envelope field is set. - */ - public boolean hasEnvelope() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - * @return The envelope. - */ - public io.grafeas.v1.Envelope getEnvelope() { - if (envelopeBuilder_ == null) { - return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } else { - return envelopeBuilder_.getMessage(); - } - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - public Builder setEnvelope(io.grafeas.v1.Envelope value) { - if (envelopeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - envelope_ = value; - } else { - envelopeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - public Builder setEnvelope( - io.grafeas.v1.Envelope.Builder builderForValue) { - if (envelopeBuilder_ == null) { - envelope_ = builderForValue.build(); - } else { - envelopeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - public Builder mergeEnvelope(io.grafeas.v1.Envelope value) { - if (envelopeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - envelope_ != null && - envelope_ != io.grafeas.v1.Envelope.getDefaultInstance()) { - getEnvelopeBuilder().mergeFrom(value); - } else { - envelope_ = value; - } - } else { - envelopeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - public Builder clearEnvelope() { - bitField0_ = (bitField0_ & ~0x00000001); - envelope_ = null; - if (envelopeBuilder_ != null) { - envelopeBuilder_.dispose(); - envelopeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - public io.grafeas.v1.Envelope.Builder getEnvelopeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getEnvelopeFieldBuilder().getBuilder(); - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { - if (envelopeBuilder_ != null) { - return envelopeBuilder_.getMessageOrBuilder(); - } else { - return envelope_ == null ? - io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> - getEnvelopeFieldBuilder() { - if (envelopeBuilder_ == null) { - envelopeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder>( - getEnvelope(), - getParentForChildren(), - isClean()); - envelope_ = null; - } - return envelopeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> statementBuilder_; - /** - * .grafeas.v1.InTotoStatement statement = 2; - * @return Whether the statement field is set. - */ - @java.lang.Override - public boolean hasStatement() { - return decodedPayloadCase_ == 2; - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - * @return The statement. - */ - @java.lang.Override - public io.grafeas.v1.InTotoStatement getStatement() { - if (statementBuilder_ == null) { - if (decodedPayloadCase_ == 2) { - return (io.grafeas.v1.InTotoStatement) decodedPayload_; - } - return io.grafeas.v1.InTotoStatement.getDefaultInstance(); - } else { - if (decodedPayloadCase_ == 2) { - return statementBuilder_.getMessage(); - } - return io.grafeas.v1.InTotoStatement.getDefaultInstance(); - } - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - public Builder setStatement(io.grafeas.v1.InTotoStatement value) { - if (statementBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - decodedPayload_ = value; - onChanged(); - } else { - statementBuilder_.setMessage(value); - } - decodedPayloadCase_ = 2; - return this; - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - public Builder setStatement( - io.grafeas.v1.InTotoStatement.Builder builderForValue) { - if (statementBuilder_ == null) { - decodedPayload_ = builderForValue.build(); - onChanged(); - } else { - statementBuilder_.setMessage(builderForValue.build()); - } - decodedPayloadCase_ = 2; - return this; - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - public Builder mergeStatement(io.grafeas.v1.InTotoStatement value) { - if (statementBuilder_ == null) { - if (decodedPayloadCase_ == 2 && - decodedPayload_ != io.grafeas.v1.InTotoStatement.getDefaultInstance()) { - decodedPayload_ = io.grafeas.v1.InTotoStatement.newBuilder((io.grafeas.v1.InTotoStatement) decodedPayload_) - .mergeFrom(value).buildPartial(); - } else { - decodedPayload_ = value; - } - onChanged(); - } else { - if (decodedPayloadCase_ == 2) { - statementBuilder_.mergeFrom(value); - } else { - statementBuilder_.setMessage(value); - } - } - decodedPayloadCase_ = 2; - return this; - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - public Builder clearStatement() { - if (statementBuilder_ == null) { - if (decodedPayloadCase_ == 2) { - decodedPayloadCase_ = 0; - decodedPayload_ = null; - onChanged(); - } - } else { - if (decodedPayloadCase_ == 2) { - decodedPayloadCase_ = 0; - decodedPayload_ = null; - } - statementBuilder_.clear(); - } - return this; - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - public io.grafeas.v1.InTotoStatement.Builder getStatementBuilder() { - return getStatementFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - @java.lang.Override - public io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder() { - if ((decodedPayloadCase_ == 2) && (statementBuilder_ != null)) { - return statementBuilder_.getMessageOrBuilder(); - } else { - if (decodedPayloadCase_ == 2) { - return (io.grafeas.v1.InTotoStatement) decodedPayload_; - } - return io.grafeas.v1.InTotoStatement.getDefaultInstance(); - } - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> - getStatementFieldBuilder() { - if (statementBuilder_ == null) { - if (!(decodedPayloadCase_ == 2)) { - decodedPayload_ = io.grafeas.v1.InTotoStatement.getDefaultInstance(); - } - statementBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder>( - (io.grafeas.v1.InTotoStatement) decodedPayload_, - getParentForChildren(), - isClean()); - decodedPayload_ = null; - } - decodedPayloadCase_ = 2; - onChanged(); - return statementBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DSSEAttestationOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DSSEAttestationOccurrence) - private static final io.grafeas.v1.DSSEAttestationOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DSSEAttestationOccurrence(); - } - - public static io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DSSEAttestationOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java deleted file mode 100644 index 0ef0cb2ac550..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/dsse_attestation.proto - -package io.grafeas.v1; - -public interface DSSEAttestationOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DSSEAttestationOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If doing something security critical, make sure to verify the signatures in
-   * this metadata.
-   * 
- * - * .grafeas.v1.Envelope envelope = 1; - * @return Whether the envelope field is set. - */ - boolean hasEnvelope(); - /** - *
-   * If doing something security critical, make sure to verify the signatures in
-   * this metadata.
-   * 
- * - * .grafeas.v1.Envelope envelope = 1; - * @return The envelope. - */ - io.grafeas.v1.Envelope getEnvelope(); - /** - *
-   * If doing something security critical, make sure to verify the signatures in
-   * this metadata.
-   * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder(); - - /** - * .grafeas.v1.InTotoStatement statement = 2; - * @return Whether the statement field is set. - */ - boolean hasStatement(); - /** - * .grafeas.v1.InTotoStatement statement = 2; - * @return The statement. - */ - io.grafeas.v1.InTotoStatement getStatement(); - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder(); - - public io.grafeas.v1.DSSEAttestationOccurrence.DecodedPayloadCase getDecodedPayloadCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java deleted file mode 100644 index 0436291b80b9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java +++ /dev/null @@ -1,587 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to delete a note.
- * 
- * - * Protobuf type {@code grafeas.v1.DeleteNoteRequest} - */ -public final class DeleteNoteRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DeleteNoteRequest) - DeleteNoteRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteNoteRequest.newBuilder() to construct. - private DeleteNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteNoteRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteNoteRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeleteNoteRequest.class, io.grafeas.v1.DeleteNoteRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DeleteNoteRequest)) { - return super.equals(obj); - } - io.grafeas.v1.DeleteNoteRequest other = (io.grafeas.v1.DeleteNoteRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeleteNoteRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeleteNoteRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DeleteNoteRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to delete a note.
-   * 
- * - * Protobuf type {@code grafeas.v1.DeleteNoteRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DeleteNoteRequest) - io.grafeas.v1.DeleteNoteRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeleteNoteRequest.class, io.grafeas.v1.DeleteNoteRequest.Builder.class); - } - - // Construct using io.grafeas.v1.DeleteNoteRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DeleteNoteRequest getDefaultInstanceForType() { - return io.grafeas.v1.DeleteNoteRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DeleteNoteRequest build() { - io.grafeas.v1.DeleteNoteRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DeleteNoteRequest buildPartial() { - io.grafeas.v1.DeleteNoteRequest result = new io.grafeas.v1.DeleteNoteRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.DeleteNoteRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DeleteNoteRequest) { - return mergeFrom((io.grafeas.v1.DeleteNoteRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DeleteNoteRequest other) { - if (other == io.grafeas.v1.DeleteNoteRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DeleteNoteRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DeleteNoteRequest) - private static final io.grafeas.v1.DeleteNoteRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DeleteNoteRequest(); - } - - public static io.grafeas.v1.DeleteNoteRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteNoteRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DeleteNoteRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java deleted file mode 100644 index f7cdc3fd761a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface DeleteNoteRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DeleteNoteRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java deleted file mode 100644 index cf4d61bfad6e..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java +++ /dev/null @@ -1,587 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to delete an occurrence.
- * 
- * - * Protobuf type {@code grafeas.v1.DeleteOccurrenceRequest} - */ -public final class DeleteOccurrenceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DeleteOccurrenceRequest) - DeleteOccurrenceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteOccurrenceRequest.newBuilder() to construct. - private DeleteOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteOccurrenceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteOccurrenceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeleteOccurrenceRequest.class, io.grafeas.v1.DeleteOccurrenceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DeleteOccurrenceRequest)) { - return super.equals(obj); - } - io.grafeas.v1.DeleteOccurrenceRequest other = (io.grafeas.v1.DeleteOccurrenceRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DeleteOccurrenceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to delete an occurrence.
-   * 
- * - * Protobuf type {@code grafeas.v1.DeleteOccurrenceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DeleteOccurrenceRequest) - io.grafeas.v1.DeleteOccurrenceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeleteOccurrenceRequest.class, io.grafeas.v1.DeleteOccurrenceRequest.Builder.class); - } - - // Construct using io.grafeas.v1.DeleteOccurrenceRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DeleteOccurrenceRequest getDefaultInstanceForType() { - return io.grafeas.v1.DeleteOccurrenceRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DeleteOccurrenceRequest build() { - io.grafeas.v1.DeleteOccurrenceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DeleteOccurrenceRequest buildPartial() { - io.grafeas.v1.DeleteOccurrenceRequest result = new io.grafeas.v1.DeleteOccurrenceRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.DeleteOccurrenceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DeleteOccurrenceRequest) { - return mergeFrom((io.grafeas.v1.DeleteOccurrenceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DeleteOccurrenceRequest other) { - if (other == io.grafeas.v1.DeleteOccurrenceRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DeleteOccurrenceRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DeleteOccurrenceRequest) - private static final io.grafeas.v1.DeleteOccurrenceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DeleteOccurrenceRequest(); - } - - public static io.grafeas.v1.DeleteOccurrenceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteOccurrenceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DeleteOccurrenceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java deleted file mode 100644 index 755eafdee791..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface DeleteOccurrenceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DeleteOccurrenceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java deleted file mode 100644 index a74f9380efe2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/deployment.proto - -package io.grafeas.v1; - -public final class Deployment { - private Deployment() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DeploymentNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DeploymentOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\033grafeas/v1/deployment.proto\022\ngrafeas.v" + - "1\032\037google/protobuf/timestamp.proto\"&\n\016De" + - "ploymentNote\022\024\n\014resource_uri\030\001 \003(\t\"\307\002\n\024D" + - "eploymentOccurrence\022\022\n\nuser_email\030\001 \001(\t\022" + - "/\n\013deploy_time\030\002 \001(\0132\032.google.protobuf.T" + - "imestamp\0221\n\rundeploy_time\030\003 \001(\0132\032.google" + - ".protobuf.Timestamp\022\016\n\006config\030\004 \001(\t\022\017\n\007a" + - "ddress\030\005 \001(\t\022\024\n\014resource_uri\030\006 \003(\t\022;\n\010pl" + - "atform\030\007 \001(\0162).grafeas.v1.DeploymentOccu" + - "rrence.Platform\"C\n\010Platform\022\030\n\024PLATFORM_" + - "UNSPECIFIED\020\000\022\007\n\003GKE\020\001\022\010\n\004FLEX\020\002\022\n\n\006CUST" + - "OM\020\003BQ\n\rio.grafeas.v1P\001Z8google.golang.o" + - "rg/genproto/googleapis/grafeas/v1;grafea" + - "s\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_grafeas_v1_DeploymentNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DeploymentNote_descriptor, - new java.lang.String[] { "ResourceUri", }); - internal_static_grafeas_v1_DeploymentOccurrence_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DeploymentOccurrence_descriptor, - new java.lang.String[] { "UserEmail", "DeployTime", "UndeployTime", "Config", "Address", "ResourceUri", "Platform", }); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java deleted file mode 100644 index ad814299c958..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java +++ /dev/null @@ -1,653 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/deployment.proto - -package io.grafeas.v1; - -/** - *
- * An artifact that can be deployed in some runtime.
- * 
- * - * Protobuf type {@code grafeas.v1.DeploymentNote} - */ -public final class DeploymentNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DeploymentNote) - DeploymentNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeploymentNote.newBuilder() to construct. - private DeploymentNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeploymentNote() { - resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeploymentNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeploymentNote.class, io.grafeas.v1.DeploymentNote.Builder.class); - } - - public static final int RESOURCE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList resourceUri_; - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @return A list containing the resourceUri. - */ - public com.google.protobuf.ProtocolStringList - getResourceUriList() { - return resourceUri_; - } - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @return The count of resourceUri. - */ - public int getResourceUriCount() { - return resourceUri_.size(); - } - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @param index The index of the element to return. - * @return The resourceUri at the given index. - */ - public java.lang.String getResourceUri(int index) { - return resourceUri_.get(index); - } - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @param index The index of the value to return. - * @return The bytes of the resourceUri at the given index. - */ - public com.google.protobuf.ByteString - getResourceUriBytes(int index) { - return resourceUri_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < resourceUri_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceUri_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < resourceUri_.size(); i++) { - dataSize += computeStringSizeNoTag(resourceUri_.getRaw(i)); - } - size += dataSize; - size += 1 * getResourceUriList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DeploymentNote)) { - return super.equals(obj); - } - io.grafeas.v1.DeploymentNote other = (io.grafeas.v1.DeploymentNote) obj; - - if (!getResourceUriList() - .equals(other.getResourceUriList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResourceUriCount() > 0) { - hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; - hash = (53 * hash) + getResourceUriList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DeploymentNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeploymentNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeploymentNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeploymentNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeploymentNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeploymentNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeploymentNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeploymentNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeploymentNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeploymentNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeploymentNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeploymentNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DeploymentNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An artifact that can be deployed in some runtime.
-   * 
- * - * Protobuf type {@code grafeas.v1.DeploymentNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DeploymentNote) - io.grafeas.v1.DeploymentNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeploymentNote.class, io.grafeas.v1.DeploymentNote.Builder.class); - } - - // Construct using io.grafeas.v1.DeploymentNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DeploymentNote getDefaultInstanceForType() { - return io.grafeas.v1.DeploymentNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DeploymentNote build() { - io.grafeas.v1.DeploymentNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DeploymentNote buildPartial() { - io.grafeas.v1.DeploymentNote result = new io.grafeas.v1.DeploymentNote(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.DeploymentNote result) { - if (((bitField0_ & 0x00000001) != 0)) { - resourceUri_ = resourceUri_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.resourceUri_ = resourceUri_; - } - - private void buildPartial0(io.grafeas.v1.DeploymentNote result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DeploymentNote) { - return mergeFrom((io.grafeas.v1.DeploymentNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DeploymentNote other) { - if (other == io.grafeas.v1.DeploymentNote.getDefaultInstance()) return this; - if (!other.resourceUri_.isEmpty()) { - if (resourceUri_.isEmpty()) { - resourceUri_ = other.resourceUri_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResourceUriIsMutable(); - resourceUri_.addAll(other.resourceUri_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - ensureResourceUriIsMutable(); - resourceUri_.add(s); - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureResourceUriIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - resourceUri_ = new com.google.protobuf.LazyStringArrayList(resourceUri_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @return A list containing the resourceUri. - */ - public com.google.protobuf.ProtocolStringList - getResourceUriList() { - return resourceUri_.getUnmodifiableView(); - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @return The count of resourceUri. - */ - public int getResourceUriCount() { - return resourceUri_.size(); - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @param index The index of the element to return. - * @return The resourceUri at the given index. - */ - public java.lang.String getResourceUri(int index) { - return resourceUri_.get(index); - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @param index The index of the value to return. - * @return The bytes of the resourceUri at the given index. - */ - public com.google.protobuf.ByteString - getResourceUriBytes(int index) { - return resourceUri_.getByteString(index); - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @param index The index to set the value at. - * @param value The resourceUri to set. - * @return This builder for chaining. - */ - public Builder setResourceUri( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureResourceUriIsMutable(); - resourceUri_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @param value The resourceUri to add. - * @return This builder for chaining. - */ - public Builder addResourceUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureResourceUriIsMutable(); - resourceUri_.add(value); - onChanged(); - return this; - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @param values The resourceUri to add. - * @return This builder for chaining. - */ - public Builder addAllResourceUri( - java.lang.Iterable values) { - ensureResourceUriIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, resourceUri_); - onChanged(); - return this; - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @return This builder for chaining. - */ - public Builder clearResourceUri() { - resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @param value The bytes of the resourceUri to add. - * @return This builder for chaining. - */ - public Builder addResourceUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureResourceUriIsMutable(); - resourceUri_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DeploymentNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DeploymentNote) - private static final io.grafeas.v1.DeploymentNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DeploymentNote(); - } - - public static io.grafeas.v1.DeploymentNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeploymentNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DeploymentNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java deleted file mode 100644 index 3e512a6a1a33..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/deployment.proto - -package io.grafeas.v1; - -public interface DeploymentNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DeploymentNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @return A list containing the resourceUri. - */ - java.util.List - getResourceUriList(); - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @return The count of resourceUri. - */ - int getResourceUriCount(); - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @param index The index of the element to return. - * @return The resourceUri at the given index. - */ - java.lang.String getResourceUri(int index); - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @param index The index of the value to return. - * @return The bytes of the resourceUri at the given index. - */ - com.google.protobuf.ByteString - getResourceUriBytes(int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java deleted file mode 100644 index e0a761932ed7..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java +++ /dev/null @@ -1,1900 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/deployment.proto - -package io.grafeas.v1; - -/** - *
- * The period during which some deployable was active in a runtime.
- * 
- * - * Protobuf type {@code grafeas.v1.DeploymentOccurrence} - */ -public final class DeploymentOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DeploymentOccurrence) - DeploymentOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeploymentOccurrence.newBuilder() to construct. - private DeploymentOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeploymentOccurrence() { - userEmail_ = ""; - config_ = ""; - address_ = ""; - resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - platform_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeploymentOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeploymentOccurrence.class, io.grafeas.v1.DeploymentOccurrence.Builder.class); - } - - /** - *
-   * Types of platforms.
-   * 
- * - * Protobuf enum {@code grafeas.v1.DeploymentOccurrence.Platform} - */ - public enum Platform - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown.
-     * 
- * - * PLATFORM_UNSPECIFIED = 0; - */ - PLATFORM_UNSPECIFIED(0), - /** - *
-     * Google Container Engine.
-     * 
- * - * GKE = 1; - */ - GKE(1), - /** - *
-     * Google App Engine: Flexible Environment.
-     * 
- * - * FLEX = 2; - */ - FLEX(2), - /** - *
-     * Custom user-defined platform.
-     * 
- * - * CUSTOM = 3; - */ - CUSTOM(3), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unknown.
-     * 
- * - * PLATFORM_UNSPECIFIED = 0; - */ - public static final int PLATFORM_UNSPECIFIED_VALUE = 0; - /** - *
-     * Google Container Engine.
-     * 
- * - * GKE = 1; - */ - public static final int GKE_VALUE = 1; - /** - *
-     * Google App Engine: Flexible Environment.
-     * 
- * - * FLEX = 2; - */ - public static final int FLEX_VALUE = 2; - /** - *
-     * Custom user-defined platform.
-     * 
- * - * CUSTOM = 3; - */ - public static final int CUSTOM_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Platform valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Platform forNumber(int value) { - switch (value) { - case 0: return PLATFORM_UNSPECIFIED; - case 1: return GKE; - case 2: return FLEX; - case 3: return CUSTOM; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Platform> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Platform findValueByNumber(int number) { - return Platform.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.DeploymentOccurrence.getDescriptor().getEnumTypes().get(0); - } - - private static final Platform[] VALUES = values(); - - public static Platform valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Platform(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.DeploymentOccurrence.Platform) - } - - public static final int USER_EMAIL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object userEmail_ = ""; - /** - *
-   * Identity of the user that triggered this deployment.
-   * 
- * - * string user_email = 1; - * @return The userEmail. - */ - @java.lang.Override - public java.lang.String getUserEmail() { - java.lang.Object ref = userEmail_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - userEmail_ = s; - return s; - } - } - /** - *
-   * Identity of the user that triggered this deployment.
-   * 
- * - * string user_email = 1; - * @return The bytes for userEmail. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUserEmailBytes() { - java.lang.Object ref = userEmail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - userEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEPLOY_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp deployTime_; - /** - *
-   * Required. Beginning of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * @return Whether the deployTime field is set. - */ - @java.lang.Override - public boolean hasDeployTime() { - return deployTime_ != null; - } - /** - *
-   * Required. Beginning of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * @return The deployTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getDeployTime() { - return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; - } - /** - *
-   * Required. Beginning of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder() { - return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; - } - - public static final int UNDEPLOY_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp undeployTime_; - /** - *
-   * End of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - * @return Whether the undeployTime field is set. - */ - @java.lang.Override - public boolean hasUndeployTime() { - return undeployTime_ != null; - } - /** - *
-   * End of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - * @return The undeployTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUndeployTime() { - return undeployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; - } - /** - *
-   * End of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUndeployTimeOrBuilder() { - return undeployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; - } - - public static final int CONFIG_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object config_ = ""; - /** - *
-   * Configuration used to create this deployment.
-   * 
- * - * string config = 4; - * @return The config. - */ - @java.lang.Override - public java.lang.String getConfig() { - java.lang.Object ref = config_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - config_ = s; - return s; - } - } - /** - *
-   * Configuration used to create this deployment.
-   * 
- * - * string config = 4; - * @return The bytes for config. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getConfigBytes() { - java.lang.Object ref = config_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - config_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ADDRESS_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object address_ = ""; - /** - *
-   * Address of the runtime element hosting this deployment.
-   * 
- * - * string address = 5; - * @return The address. - */ - @java.lang.Override - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } - } - /** - *
-   * Address of the runtime element hosting this deployment.
-   * 
- * - * string address = 5; - * @return The bytes for address. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_URI_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList resourceUri_; - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @return A list containing the resourceUri. - */ - public com.google.protobuf.ProtocolStringList - getResourceUriList() { - return resourceUri_; - } - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @return The count of resourceUri. - */ - public int getResourceUriCount() { - return resourceUri_.size(); - } - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @param index The index of the element to return. - * @return The resourceUri at the given index. - */ - public java.lang.String getResourceUri(int index) { - return resourceUri_.get(index); - } - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @param index The index of the value to return. - * @return The bytes of the resourceUri at the given index. - */ - public com.google.protobuf.ByteString - getResourceUriBytes(int index) { - return resourceUri_.getByteString(index); - } - - public static final int PLATFORM_FIELD_NUMBER = 7; - private int platform_ = 0; - /** - *
-   * Platform hosting this deployment.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return The enum numeric value on the wire for platform. - */ - @java.lang.Override public int getPlatformValue() { - return platform_; - } - /** - *
-   * Platform hosting this deployment.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return The platform. - */ - @java.lang.Override public io.grafeas.v1.DeploymentOccurrence.Platform getPlatform() { - io.grafeas.v1.DeploymentOccurrence.Platform result = io.grafeas.v1.DeploymentOccurrence.Platform.forNumber(platform_); - return result == null ? io.grafeas.v1.DeploymentOccurrence.Platform.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userEmail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userEmail_); - } - if (deployTime_ != null) { - output.writeMessage(2, getDeployTime()); - } - if (undeployTime_ != null) { - output.writeMessage(3, getUndeployTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, config_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, address_); - } - for (int i = 0; i < resourceUri_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, resourceUri_.getRaw(i)); - } - if (platform_ != io.grafeas.v1.DeploymentOccurrence.Platform.PLATFORM_UNSPECIFIED.getNumber()) { - output.writeEnum(7, platform_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userEmail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userEmail_); - } - if (deployTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDeployTime()); - } - if (undeployTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getUndeployTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, config_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, address_); - } - { - int dataSize = 0; - for (int i = 0; i < resourceUri_.size(); i++) { - dataSize += computeStringSizeNoTag(resourceUri_.getRaw(i)); - } - size += dataSize; - size += 1 * getResourceUriList().size(); - } - if (platform_ != io.grafeas.v1.DeploymentOccurrence.Platform.PLATFORM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(7, platform_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DeploymentOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.DeploymentOccurrence other = (io.grafeas.v1.DeploymentOccurrence) obj; - - if (!getUserEmail() - .equals(other.getUserEmail())) return false; - if (hasDeployTime() != other.hasDeployTime()) return false; - if (hasDeployTime()) { - if (!getDeployTime() - .equals(other.getDeployTime())) return false; - } - if (hasUndeployTime() != other.hasUndeployTime()) return false; - if (hasUndeployTime()) { - if (!getUndeployTime() - .equals(other.getUndeployTime())) return false; - } - if (!getConfig() - .equals(other.getConfig())) return false; - if (!getAddress() - .equals(other.getAddress())) return false; - if (!getResourceUriList() - .equals(other.getResourceUriList())) return false; - if (platform_ != other.platform_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + USER_EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getUserEmail().hashCode(); - if (hasDeployTime()) { - hash = (37 * hash) + DEPLOY_TIME_FIELD_NUMBER; - hash = (53 * hash) + getDeployTime().hashCode(); - } - if (hasUndeployTime()) { - hash = (37 * hash) + UNDEPLOY_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUndeployTime().hashCode(); - } - hash = (37 * hash) + CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getConfig().hashCode(); - hash = (37 * hash) + ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAddress().hashCode(); - if (getResourceUriCount() > 0) { - hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; - hash = (53 * hash) + getResourceUriList().hashCode(); - } - hash = (37 * hash) + PLATFORM_FIELD_NUMBER; - hash = (53 * hash) + platform_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeploymentOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeploymentOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DeploymentOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The period during which some deployable was active in a runtime.
-   * 
- * - * Protobuf type {@code grafeas.v1.DeploymentOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DeploymentOccurrence) - io.grafeas.v1.DeploymentOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeploymentOccurrence.class, io.grafeas.v1.DeploymentOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.DeploymentOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - userEmail_ = ""; - deployTime_ = null; - if (deployTimeBuilder_ != null) { - deployTimeBuilder_.dispose(); - deployTimeBuilder_ = null; - } - undeployTime_ = null; - if (undeployTimeBuilder_ != null) { - undeployTimeBuilder_.dispose(); - undeployTimeBuilder_ = null; - } - config_ = ""; - address_ = ""; - resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - platform_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrence build() { - io.grafeas.v1.DeploymentOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrence buildPartial() { - io.grafeas.v1.DeploymentOccurrence result = new io.grafeas.v1.DeploymentOccurrence(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.DeploymentOccurrence result) { - if (((bitField0_ & 0x00000020) != 0)) { - resourceUri_ = resourceUri_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.resourceUri_ = resourceUri_; - } - - private void buildPartial0(io.grafeas.v1.DeploymentOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.userEmail_ = userEmail_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.deployTime_ = deployTimeBuilder_ == null - ? deployTime_ - : deployTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.undeployTime_ = undeployTimeBuilder_ == null - ? undeployTime_ - : undeployTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.config_ = config_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.address_ = address_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.platform_ = platform_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DeploymentOccurrence) { - return mergeFrom((io.grafeas.v1.DeploymentOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DeploymentOccurrence other) { - if (other == io.grafeas.v1.DeploymentOccurrence.getDefaultInstance()) return this; - if (!other.getUserEmail().isEmpty()) { - userEmail_ = other.userEmail_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasDeployTime()) { - mergeDeployTime(other.getDeployTime()); - } - if (other.hasUndeployTime()) { - mergeUndeployTime(other.getUndeployTime()); - } - if (!other.getConfig().isEmpty()) { - config_ = other.config_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getAddress().isEmpty()) { - address_ = other.address_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (!other.resourceUri_.isEmpty()) { - if (resourceUri_.isEmpty()) { - resourceUri_ = other.resourceUri_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureResourceUriIsMutable(); - resourceUri_.addAll(other.resourceUri_); - } - onChanged(); - } - if (other.platform_ != 0) { - setPlatformValue(other.getPlatformValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - userEmail_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getDeployTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getUndeployTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - config_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - address_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - ensureResourceUriIsMutable(); - resourceUri_.add(s); - break; - } // case 50 - case 56: { - platform_ = input.readEnum(); - bitField0_ |= 0x00000040; - break; - } // case 56 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object userEmail_ = ""; - /** - *
-     * Identity of the user that triggered this deployment.
-     * 
- * - * string user_email = 1; - * @return The userEmail. - */ - public java.lang.String getUserEmail() { - java.lang.Object ref = userEmail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - userEmail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Identity of the user that triggered this deployment.
-     * 
- * - * string user_email = 1; - * @return The bytes for userEmail. - */ - public com.google.protobuf.ByteString - getUserEmailBytes() { - java.lang.Object ref = userEmail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - userEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Identity of the user that triggered this deployment.
-     * 
- * - * string user_email = 1; - * @param value The userEmail to set. - * @return This builder for chaining. - */ - public Builder setUserEmail( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - userEmail_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Identity of the user that triggered this deployment.
-     * 
- * - * string user_email = 1; - * @return This builder for chaining. - */ - public Builder clearUserEmail() { - userEmail_ = getDefaultInstance().getUserEmail(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Identity of the user that triggered this deployment.
-     * 
- * - * string user_email = 1; - * @param value The bytes for userEmail to set. - * @return This builder for chaining. - */ - public Builder setUserEmailBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - userEmail_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp deployTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> deployTimeBuilder_; - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * @return Whether the deployTime field is set. - */ - public boolean hasDeployTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * @return The deployTime. - */ - public com.google.protobuf.Timestamp getDeployTime() { - if (deployTimeBuilder_ == null) { - return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; - } else { - return deployTimeBuilder_.getMessage(); - } - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public Builder setDeployTime(com.google.protobuf.Timestamp value) { - if (deployTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deployTime_ = value; - } else { - deployTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public Builder setDeployTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (deployTimeBuilder_ == null) { - deployTime_ = builderForValue.build(); - } else { - deployTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public Builder mergeDeployTime(com.google.protobuf.Timestamp value) { - if (deployTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - deployTime_ != null && - deployTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getDeployTimeBuilder().mergeFrom(value); - } else { - deployTime_ = value; - } - } else { - deployTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public Builder clearDeployTime() { - bitField0_ = (bitField0_ & ~0x00000002); - deployTime_ = null; - if (deployTimeBuilder_ != null) { - deployTimeBuilder_.dispose(); - deployTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getDeployTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getDeployTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder() { - if (deployTimeBuilder_ != null) { - return deployTimeBuilder_.getMessageOrBuilder(); - } else { - return deployTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; - } - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getDeployTimeFieldBuilder() { - if (deployTimeBuilder_ == null) { - deployTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getDeployTime(), - getParentForChildren(), - isClean()); - deployTime_ = null; - } - return deployTimeBuilder_; - } - - private com.google.protobuf.Timestamp undeployTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> undeployTimeBuilder_; - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - * @return Whether the undeployTime field is set. - */ - public boolean hasUndeployTime() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - * @return The undeployTime. - */ - public com.google.protobuf.Timestamp getUndeployTime() { - if (undeployTimeBuilder_ == null) { - return undeployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; - } else { - return undeployTimeBuilder_.getMessage(); - } - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - public Builder setUndeployTime(com.google.protobuf.Timestamp value) { - if (undeployTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - undeployTime_ = value; - } else { - undeployTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - public Builder setUndeployTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (undeployTimeBuilder_ == null) { - undeployTime_ = builderForValue.build(); - } else { - undeployTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - public Builder mergeUndeployTime(com.google.protobuf.Timestamp value) { - if (undeployTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - undeployTime_ != null && - undeployTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUndeployTimeBuilder().mergeFrom(value); - } else { - undeployTime_ = value; - } - } else { - undeployTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - public Builder clearUndeployTime() { - bitField0_ = (bitField0_ & ~0x00000004); - undeployTime_ = null; - if (undeployTimeBuilder_ != null) { - undeployTimeBuilder_.dispose(); - undeployTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - public com.google.protobuf.Timestamp.Builder getUndeployTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getUndeployTimeFieldBuilder().getBuilder(); - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - public com.google.protobuf.TimestampOrBuilder getUndeployTimeOrBuilder() { - if (undeployTimeBuilder_ != null) { - return undeployTimeBuilder_.getMessageOrBuilder(); - } else { - return undeployTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; - } - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUndeployTimeFieldBuilder() { - if (undeployTimeBuilder_ == null) { - undeployTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUndeployTime(), - getParentForChildren(), - isClean()); - undeployTime_ = null; - } - return undeployTimeBuilder_; - } - - private java.lang.Object config_ = ""; - /** - *
-     * Configuration used to create this deployment.
-     * 
- * - * string config = 4; - * @return The config. - */ - public java.lang.String getConfig() { - java.lang.Object ref = config_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - config_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Configuration used to create this deployment.
-     * 
- * - * string config = 4; - * @return The bytes for config. - */ - public com.google.protobuf.ByteString - getConfigBytes() { - java.lang.Object ref = config_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - config_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Configuration used to create this deployment.
-     * 
- * - * string config = 4; - * @param value The config to set. - * @return This builder for chaining. - */ - public Builder setConfig( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - config_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Configuration used to create this deployment.
-     * 
- * - * string config = 4; - * @return This builder for chaining. - */ - public Builder clearConfig() { - config_ = getDefaultInstance().getConfig(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * Configuration used to create this deployment.
-     * 
- * - * string config = 4; - * @param value The bytes for config to set. - * @return This builder for chaining. - */ - public Builder setConfigBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - config_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object address_ = ""; - /** - *
-     * Address of the runtime element hosting this deployment.
-     * 
- * - * string address = 5; - * @return The address. - */ - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Address of the runtime element hosting this deployment.
-     * 
- * - * string address = 5; - * @return The bytes for address. - */ - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Address of the runtime element hosting this deployment.
-     * 
- * - * string address = 5; - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - address_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Address of the runtime element hosting this deployment.
-     * 
- * - * string address = 5; - * @return This builder for chaining. - */ - public Builder clearAddress() { - address_ = getDefaultInstance().getAddress(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * Address of the runtime element hosting this deployment.
-     * 
- * - * string address = 5; - * @param value The bytes for address to set. - * @return This builder for chaining. - */ - public Builder setAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - address_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureResourceUriIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - resourceUri_ = new com.google.protobuf.LazyStringArrayList(resourceUri_); - bitField0_ |= 0x00000020; - } - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @return A list containing the resourceUri. - */ - public com.google.protobuf.ProtocolStringList - getResourceUriList() { - return resourceUri_.getUnmodifiableView(); - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @return The count of resourceUri. - */ - public int getResourceUriCount() { - return resourceUri_.size(); - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @param index The index of the element to return. - * @return The resourceUri at the given index. - */ - public java.lang.String getResourceUri(int index) { - return resourceUri_.get(index); - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @param index The index of the value to return. - * @return The bytes of the resourceUri at the given index. - */ - public com.google.protobuf.ByteString - getResourceUriBytes(int index) { - return resourceUri_.getByteString(index); - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @param index The index to set the value at. - * @param value The resourceUri to set. - * @return This builder for chaining. - */ - public Builder setResourceUri( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureResourceUriIsMutable(); - resourceUri_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @param value The resourceUri to add. - * @return This builder for chaining. - */ - public Builder addResourceUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureResourceUriIsMutable(); - resourceUri_.add(value); - onChanged(); - return this; - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @param values The resourceUri to add. - * @return This builder for chaining. - */ - public Builder addAllResourceUri( - java.lang.Iterable values) { - ensureResourceUriIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, resourceUri_); - onChanged(); - return this; - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @return This builder for chaining. - */ - public Builder clearResourceUri() { - resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @param value The bytes of the resourceUri to add. - * @return This builder for chaining. - */ - public Builder addResourceUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureResourceUriIsMutable(); - resourceUri_.add(value); - onChanged(); - return this; - } - - private int platform_ = 0; - /** - *
-     * Platform hosting this deployment.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return The enum numeric value on the wire for platform. - */ - @java.lang.Override public int getPlatformValue() { - return platform_; - } - /** - *
-     * Platform hosting this deployment.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @param value The enum numeric value on the wire for platform to set. - * @return This builder for chaining. - */ - public Builder setPlatformValue(int value) { - platform_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Platform hosting this deployment.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return The platform. - */ - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrence.Platform getPlatform() { - io.grafeas.v1.DeploymentOccurrence.Platform result = io.grafeas.v1.DeploymentOccurrence.Platform.forNumber(platform_); - return result == null ? io.grafeas.v1.DeploymentOccurrence.Platform.UNRECOGNIZED : result; - } - /** - *
-     * Platform hosting this deployment.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @param value The platform to set. - * @return This builder for chaining. - */ - public Builder setPlatform(io.grafeas.v1.DeploymentOccurrence.Platform value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - platform_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Platform hosting this deployment.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return This builder for chaining. - */ - public Builder clearPlatform() { - bitField0_ = (bitField0_ & ~0x00000040); - platform_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DeploymentOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DeploymentOccurrence) - private static final io.grafeas.v1.DeploymentOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DeploymentOccurrence(); - } - - public static io.grafeas.v1.DeploymentOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeploymentOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java deleted file mode 100644 index 4a9234225f40..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java +++ /dev/null @@ -1,187 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/deployment.proto - -package io.grafeas.v1; - -public interface DeploymentOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DeploymentOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Identity of the user that triggered this deployment.
-   * 
- * - * string user_email = 1; - * @return The userEmail. - */ - java.lang.String getUserEmail(); - /** - *
-   * Identity of the user that triggered this deployment.
-   * 
- * - * string user_email = 1; - * @return The bytes for userEmail. - */ - com.google.protobuf.ByteString - getUserEmailBytes(); - - /** - *
-   * Required. Beginning of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * @return Whether the deployTime field is set. - */ - boolean hasDeployTime(); - /** - *
-   * Required. Beginning of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * @return The deployTime. - */ - com.google.protobuf.Timestamp getDeployTime(); - /** - *
-   * Required. Beginning of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder(); - - /** - *
-   * End of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - * @return Whether the undeployTime field is set. - */ - boolean hasUndeployTime(); - /** - *
-   * End of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - * @return The undeployTime. - */ - com.google.protobuf.Timestamp getUndeployTime(); - /** - *
-   * End of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - com.google.protobuf.TimestampOrBuilder getUndeployTimeOrBuilder(); - - /** - *
-   * Configuration used to create this deployment.
-   * 
- * - * string config = 4; - * @return The config. - */ - java.lang.String getConfig(); - /** - *
-   * Configuration used to create this deployment.
-   * 
- * - * string config = 4; - * @return The bytes for config. - */ - com.google.protobuf.ByteString - getConfigBytes(); - - /** - *
-   * Address of the runtime element hosting this deployment.
-   * 
- * - * string address = 5; - * @return The address. - */ - java.lang.String getAddress(); - /** - *
-   * Address of the runtime element hosting this deployment.
-   * 
- * - * string address = 5; - * @return The bytes for address. - */ - com.google.protobuf.ByteString - getAddressBytes(); - - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @return A list containing the resourceUri. - */ - java.util.List - getResourceUriList(); - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @return The count of resourceUri. - */ - int getResourceUriCount(); - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @param index The index of the element to return. - * @return The resourceUri at the given index. - */ - java.lang.String getResourceUri(int index); - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @param index The index of the value to return. - * @return The bytes of the resourceUri at the given index. - */ - com.google.protobuf.ByteString - getResourceUriBytes(int index); - - /** - *
-   * Platform hosting this deployment.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return The enum numeric value on the wire for platform. - */ - int getPlatformValue(); - /** - *
-   * Platform hosting this deployment.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return The platform. - */ - io.grafeas.v1.DeploymentOccurrence.Platform getPlatform(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java deleted file mode 100644 index a3d76aee3b80..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java +++ /dev/null @@ -1,663 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - *
- * Digest information.
- * 
- * - * Protobuf type {@code grafeas.v1.Digest} - */ -public final class Digest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Digest) - DigestOrBuilder { -private static final long serialVersionUID = 0L; - // Use Digest.newBuilder() to construct. - private Digest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Digest() { - algo_ = ""; - digestBytes_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Digest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Digest.class, io.grafeas.v1.Digest.Builder.class); - } - - public static final int ALGO_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object algo_ = ""; - /** - *
-   * `SHA1`, `SHA512` etc.
-   * 
- * - * string algo = 1; - * @return The algo. - */ - @java.lang.Override - public java.lang.String getAlgo() { - java.lang.Object ref = algo_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - algo_ = s; - return s; - } - } - /** - *
-   * `SHA1`, `SHA512` etc.
-   * 
- * - * string algo = 1; - * @return The bytes for algo. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAlgoBytes() { - java.lang.Object ref = algo_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - algo_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DIGEST_BYTES_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString digestBytes_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-   * Value of the digest.
-   * 
- * - * bytes digest_bytes = 2; - * @return The digestBytes. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDigestBytes() { - return digestBytes_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algo_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, algo_); - } - if (!digestBytes_.isEmpty()) { - output.writeBytes(2, digestBytes_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algo_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, algo_); - } - if (!digestBytes_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, digestBytes_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Digest)) { - return super.equals(obj); - } - io.grafeas.v1.Digest other = (io.grafeas.v1.Digest) obj; - - if (!getAlgo() - .equals(other.getAlgo())) return false; - if (!getDigestBytes() - .equals(other.getDigestBytes())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ALGO_FIELD_NUMBER; - hash = (53 * hash) + getAlgo().hashCode(); - hash = (37 * hash) + DIGEST_BYTES_FIELD_NUMBER; - hash = (53 * hash) + getDigestBytes().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Digest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Digest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Digest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Digest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Digest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Digest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Digest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Digest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Digest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Digest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Digest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Digest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Digest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Digest information.
-   * 
- * - * Protobuf type {@code grafeas.v1.Digest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Digest) - io.grafeas.v1.DigestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Digest.class, io.grafeas.v1.Digest.Builder.class); - } - - // Construct using io.grafeas.v1.Digest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - algo_ = ""; - digestBytes_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Digest getDefaultInstanceForType() { - return io.grafeas.v1.Digest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Digest build() { - io.grafeas.v1.Digest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Digest buildPartial() { - io.grafeas.v1.Digest result = new io.grafeas.v1.Digest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Digest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.algo_ = algo_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.digestBytes_ = digestBytes_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Digest) { - return mergeFrom((io.grafeas.v1.Digest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Digest other) { - if (other == io.grafeas.v1.Digest.getDefaultInstance()) return this; - if (!other.getAlgo().isEmpty()) { - algo_ = other.algo_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getDigestBytes() != com.google.protobuf.ByteString.EMPTY) { - setDigestBytes(other.getDigestBytes()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - algo_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - digestBytes_ = input.readBytes(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object algo_ = ""; - /** - *
-     * `SHA1`, `SHA512` etc.
-     * 
- * - * string algo = 1; - * @return The algo. - */ - public java.lang.String getAlgo() { - java.lang.Object ref = algo_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - algo_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `SHA1`, `SHA512` etc.
-     * 
- * - * string algo = 1; - * @return The bytes for algo. - */ - public com.google.protobuf.ByteString - getAlgoBytes() { - java.lang.Object ref = algo_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - algo_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `SHA1`, `SHA512` etc.
-     * 
- * - * string algo = 1; - * @param value The algo to set. - * @return This builder for chaining. - */ - public Builder setAlgo( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - algo_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `SHA1`, `SHA512` etc.
-     * 
- * - * string algo = 1; - * @return This builder for chaining. - */ - public Builder clearAlgo() { - algo_ = getDefaultInstance().getAlgo(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * `SHA1`, `SHA512` etc.
-     * 
- * - * string algo = 1; - * @param value The bytes for algo to set. - * @return This builder for chaining. - */ - public Builder setAlgoBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - algo_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString digestBytes_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Value of the digest.
-     * 
- * - * bytes digest_bytes = 2; - * @return The digestBytes. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDigestBytes() { - return digestBytes_; - } - /** - *
-     * Value of the digest.
-     * 
- * - * bytes digest_bytes = 2; - * @param value The digestBytes to set. - * @return This builder for chaining. - */ - public Builder setDigestBytes(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - digestBytes_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Value of the digest.
-     * 
- * - * bytes digest_bytes = 2; - * @return This builder for chaining. - */ - public Builder clearDigestBytes() { - bitField0_ = (bitField0_ & ~0x00000002); - digestBytes_ = getDefaultInstance().getDigestBytes(); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Digest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Digest) - private static final io.grafeas.v1.Digest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Digest(); - } - - public static io.grafeas.v1.Digest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Digest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Digest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java deleted file mode 100644 index b1151e73ce84..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public interface DigestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Digest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * `SHA1`, `SHA512` etc.
-   * 
- * - * string algo = 1; - * @return The algo. - */ - java.lang.String getAlgo(); - /** - *
-   * `SHA1`, `SHA512` etc.
-   * 
- * - * string algo = 1; - * @return The bytes for algo. - */ - com.google.protobuf.ByteString - getAlgoBytes(); - - /** - *
-   * Value of the digest.
-   * 
- * - * bytes digest_bytes = 2; - * @return The digestBytes. - */ - com.google.protobuf.ByteString getDigestBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java deleted file mode 100644 index 405d615d4b2c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/discovery.proto - -package io.grafeas.v1; - -public final class Discovery { - private Discovery() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DiscoveryNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\032grafeas/v1/discovery.proto\022\ngrafeas.v1" + - "\032\037google/api/field_behavior.proto\032\037googl" + - "e/protobuf/timestamp.proto\032\027google/rpc/s" + - "tatus.proto\032\027grafeas/v1/common.proto\"<\n\r" + - "DiscoveryNote\022+\n\ranalysis_kind\030\001 \001(\0162\024.g" + - "rafeas.v1.NoteKind\"\374\005\n\023DiscoveryOccurren" + - "ce\022O\n\023continuous_analysis\030\001 \001(\01622.grafea" + - "s.v1.DiscoveryOccurrence.ContinuousAnaly" + - "sis\022G\n\017analysis_status\030\002 \001(\0162..grafeas.v" + - "1.DiscoveryOccurrence.AnalysisStatus\022M\n\022" + - "analysis_completed\030\007 \001(\01321.grafeas.v1.Di" + - "scoveryOccurrence.AnalysisCompleted\022*\n\016a" + - "nalysis_error\030\010 \003(\0132\022.google.rpc.Status\022" + - "1\n\025analysis_status_error\030\003 \001(\0132\022.google." + - "rpc.Status\022\013\n\003cpe\030\004 \001(\t\0222\n\016last_scan_tim" + - "e\030\005 \001(\0132\032.google.protobuf.Timestamp\0225\n\014a" + - "rchive_time\030\006 \001(\0132\032.google.protobuf.Time" + - "stampB\003\340A\003\032*\n\021AnalysisCompleted\022\025\n\ranaly" + - "sis_type\030\001 \003(\t\"S\n\022ContinuousAnalysis\022#\n\037" + - "CONTINUOUS_ANALYSIS_UNSPECIFIED\020\000\022\n\n\006ACT" + - "IVE\020\001\022\014\n\010INACTIVE\020\002\"\243\001\n\016AnalysisStatus\022\037" + - "\n\033ANALYSIS_STATUS_UNSPECIFIED\020\000\022\013\n\007PENDI" + - "NG\020\001\022\014\n\010SCANNING\020\002\022\024\n\020FINISHED_SUCCESS\020\003" + - "\022\014\n\010COMPLETE\020\003\022\023\n\017FINISHED_FAILED\020\004\022\030\n\024F" + - "INISHED_UNSUPPORTED\020\005\032\002\020\001BQ\n\rio.grafeas." + - "v1P\001Z8google.golang.org/genproto/googlea" + - "pis/grafeas/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.rpc.StatusProto.getDescriptor(), - io.grafeas.v1.Common.getDescriptor(), - }); - internal_static_grafeas_v1_DiscoveryNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DiscoveryNote_descriptor, - new java.lang.String[] { "AnalysisKind", }); - internal_static_grafeas_v1_DiscoveryOccurrence_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DiscoveryOccurrence_descriptor, - new java.lang.String[] { "ContinuousAnalysis", "AnalysisStatus", "AnalysisCompleted", "AnalysisError", "AnalysisStatusError", "Cpe", "LastScanTime", "ArchiveTime", }); - internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor = - internal_static_grafeas_v1_DiscoveryOccurrence_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor, - new java.lang.String[] { "AnalysisType", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); - io.grafeas.v1.Common.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java deleted file mode 100644 index 8a134c302da5..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java +++ /dev/null @@ -1,549 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/discovery.proto - -package io.grafeas.v1; - -/** - *
- * A note that indicates a type of analysis a provider would perform. This note
- * exists in a provider's project. A `Discovery` occurrence is created in a
- * consumer's project at the start of analysis.
- * 
- * - * Protobuf type {@code grafeas.v1.DiscoveryNote} - */ -public final class DiscoveryNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DiscoveryNote) - DiscoveryNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use DiscoveryNote.newBuilder() to construct. - private DiscoveryNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DiscoveryNote() { - analysisKind_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DiscoveryNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DiscoveryNote.class, io.grafeas.v1.DiscoveryNote.Builder.class); - } - - public static final int ANALYSIS_KIND_FIELD_NUMBER = 1; - private int analysisKind_ = 0; - /** - *
-   * Required. Immutable. The kind of analysis that is handled by this
-   * discovery.
-   * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @return The enum numeric value on the wire for analysisKind. - */ - @java.lang.Override public int getAnalysisKindValue() { - return analysisKind_; - } - /** - *
-   * Required. Immutable. The kind of analysis that is handled by this
-   * discovery.
-   * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @return The analysisKind. - */ - @java.lang.Override public io.grafeas.v1.NoteKind getAnalysisKind() { - io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(analysisKind_); - return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (analysisKind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { - output.writeEnum(1, analysisKind_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (analysisKind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, analysisKind_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DiscoveryNote)) { - return super.equals(obj); - } - io.grafeas.v1.DiscoveryNote other = (io.grafeas.v1.DiscoveryNote) obj; - - if (analysisKind_ != other.analysisKind_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ANALYSIS_KIND_FIELD_NUMBER; - hash = (53 * hash) + analysisKind_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DiscoveryNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DiscoveryNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A note that indicates a type of analysis a provider would perform. This note
-   * exists in a provider's project. A `Discovery` occurrence is created in a
-   * consumer's project at the start of analysis.
-   * 
- * - * Protobuf type {@code grafeas.v1.DiscoveryNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DiscoveryNote) - io.grafeas.v1.DiscoveryNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DiscoveryNote.class, io.grafeas.v1.DiscoveryNote.Builder.class); - } - - // Construct using io.grafeas.v1.DiscoveryNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - analysisKind_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryNote getDefaultInstanceForType() { - return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryNote build() { - io.grafeas.v1.DiscoveryNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryNote buildPartial() { - io.grafeas.v1.DiscoveryNote result = new io.grafeas.v1.DiscoveryNote(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.DiscoveryNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.analysisKind_ = analysisKind_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DiscoveryNote) { - return mergeFrom((io.grafeas.v1.DiscoveryNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DiscoveryNote other) { - if (other == io.grafeas.v1.DiscoveryNote.getDefaultInstance()) return this; - if (other.analysisKind_ != 0) { - setAnalysisKindValue(other.getAnalysisKindValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - analysisKind_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int analysisKind_ = 0; - /** - *
-     * Required. Immutable. The kind of analysis that is handled by this
-     * discovery.
-     * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @return The enum numeric value on the wire for analysisKind. - */ - @java.lang.Override public int getAnalysisKindValue() { - return analysisKind_; - } - /** - *
-     * Required. Immutable. The kind of analysis that is handled by this
-     * discovery.
-     * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @param value The enum numeric value on the wire for analysisKind to set. - * @return This builder for chaining. - */ - public Builder setAnalysisKindValue(int value) { - analysisKind_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The kind of analysis that is handled by this
-     * discovery.
-     * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @return The analysisKind. - */ - @java.lang.Override - public io.grafeas.v1.NoteKind getAnalysisKind() { - io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(analysisKind_); - return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; - } - /** - *
-     * Required. Immutable. The kind of analysis that is handled by this
-     * discovery.
-     * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @param value The analysisKind to set. - * @return This builder for chaining. - */ - public Builder setAnalysisKind(io.grafeas.v1.NoteKind value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - analysisKind_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The kind of analysis that is handled by this
-     * discovery.
-     * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @return This builder for chaining. - */ - public Builder clearAnalysisKind() { - bitField0_ = (bitField0_ & ~0x00000001); - analysisKind_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DiscoveryNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DiscoveryNote) - private static final io.grafeas.v1.DiscoveryNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DiscoveryNote(); - } - - public static io.grafeas.v1.DiscoveryNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DiscoveryNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java deleted file mode 100644 index ad1484f0679d..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java +++ /dev/null @@ -1,30 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/discovery.proto - -package io.grafeas.v1; - -public interface DiscoveryNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DiscoveryNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Immutable. The kind of analysis that is handled by this
-   * discovery.
-   * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @return The enum numeric value on the wire for analysisKind. - */ - int getAnalysisKindValue(); - /** - *
-   * Required. Immutable. The kind of analysis that is handled by this
-   * discovery.
-   * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @return The analysisKind. - */ - io.grafeas.v1.NoteKind getAnalysisKind(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java deleted file mode 100644 index 1c6321c5cc12..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java +++ /dev/null @@ -1,3178 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/discovery.proto - -package io.grafeas.v1; - -/** - *
- * Provides information about the analysis status of a discovered resource.
- * 
- * - * Protobuf type {@code grafeas.v1.DiscoveryOccurrence} - */ -public final class DiscoveryOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DiscoveryOccurrence) - DiscoveryOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use DiscoveryOccurrence.newBuilder() to construct. - private DiscoveryOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DiscoveryOccurrence() { - continuousAnalysis_ = 0; - analysisStatus_ = 0; - analysisError_ = java.util.Collections.emptyList(); - cpe_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DiscoveryOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DiscoveryOccurrence.class, io.grafeas.v1.DiscoveryOccurrence.Builder.class); - } - - /** - *
-   * Whether the resource is continuously analyzed.
-   * 
- * - * Protobuf enum {@code grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis} - */ - public enum ContinuousAnalysis - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown.
-     * 
- * - * CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; - */ - CONTINUOUS_ANALYSIS_UNSPECIFIED(0), - /** - *
-     * The resource is continuously analyzed.
-     * 
- * - * ACTIVE = 1; - */ - ACTIVE(1), - /** - *
-     * The resource is ignored for continuous analysis.
-     * 
- * - * INACTIVE = 2; - */ - INACTIVE(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unknown.
-     * 
- * - * CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; - */ - public static final int CONTINUOUS_ANALYSIS_UNSPECIFIED_VALUE = 0; - /** - *
-     * The resource is continuously analyzed.
-     * 
- * - * ACTIVE = 1; - */ - public static final int ACTIVE_VALUE = 1; - /** - *
-     * The resource is ignored for continuous analysis.
-     * 
- * - * INACTIVE = 2; - */ - public static final int INACTIVE_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ContinuousAnalysis valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ContinuousAnalysis forNumber(int value) { - switch (value) { - case 0: return CONTINUOUS_ANALYSIS_UNSPECIFIED; - case 1: return ACTIVE; - case 2: return INACTIVE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ContinuousAnalysis> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ContinuousAnalysis findValueByNumber(int number) { - return ContinuousAnalysis.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.DiscoveryOccurrence.getDescriptor().getEnumTypes().get(0); - } - - private static final ContinuousAnalysis[] VALUES = values(); - - public static ContinuousAnalysis valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ContinuousAnalysis(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis) - } - - /** - *
-   * Analysis status for a resource. Currently for initial analysis only (not
-   * updated in continuous analysis).
-   * 
- * - * Protobuf enum {@code grafeas.v1.DiscoveryOccurrence.AnalysisStatus} - */ - public enum AnalysisStatus - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown.
-     * 
- * - * ANALYSIS_STATUS_UNSPECIFIED = 0; - */ - ANALYSIS_STATUS_UNSPECIFIED(0, 0), - /** - *
-     * Resource is known but no action has been taken yet.
-     * 
- * - * PENDING = 1; - */ - PENDING(1, 1), - /** - *
-     * Resource is being analyzed.
-     * 
- * - * SCANNING = 2; - */ - SCANNING(2, 2), - /** - *
-     * Analysis has finished successfully.
-     * 
- * - * FINISHED_SUCCESS = 3; - */ - FINISHED_SUCCESS(3, 3), - /** - *
-     * Analysis has finished unsuccessfully, the analysis itself is in a bad
-     * state.
-     * 
- * - * FINISHED_FAILED = 4; - */ - FINISHED_FAILED(5, 4), - /** - *
-     * The resource is known not to be supported.
-     * 
- * - * FINISHED_UNSUPPORTED = 5; - */ - FINISHED_UNSUPPORTED(6, 5), - UNRECOGNIZED(-1, -1), - ; - - /** - *
-     * Analysis has completed.
-     * 
- * - * COMPLETE = 3; - */ - public static final AnalysisStatus COMPLETE = FINISHED_SUCCESS; - /** - *
-     * Unknown.
-     * 
- * - * ANALYSIS_STATUS_UNSPECIFIED = 0; - */ - public static final int ANALYSIS_STATUS_UNSPECIFIED_VALUE = 0; - /** - *
-     * Resource is known but no action has been taken yet.
-     * 
- * - * PENDING = 1; - */ - public static final int PENDING_VALUE = 1; - /** - *
-     * Resource is being analyzed.
-     * 
- * - * SCANNING = 2; - */ - public static final int SCANNING_VALUE = 2; - /** - *
-     * Analysis has finished successfully.
-     * 
- * - * FINISHED_SUCCESS = 3; - */ - public static final int FINISHED_SUCCESS_VALUE = 3; - /** - *
-     * Analysis has completed.
-     * 
- * - * COMPLETE = 3; - */ - public static final int COMPLETE_VALUE = 3; - /** - *
-     * Analysis has finished unsuccessfully, the analysis itself is in a bad
-     * state.
-     * 
- * - * FINISHED_FAILED = 4; - */ - public static final int FINISHED_FAILED_VALUE = 4; - /** - *
-     * The resource is known not to be supported.
-     * 
- * - * FINISHED_UNSUPPORTED = 5; - */ - public static final int FINISHED_UNSUPPORTED_VALUE = 5; - - - public final int getNumber() { - if (index == -1) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AnalysisStatus valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AnalysisStatus forNumber(int value) { - switch (value) { - case 0: return ANALYSIS_STATUS_UNSPECIFIED; - case 1: return PENDING; - case 2: return SCANNING; - case 3: return FINISHED_SUCCESS; - case 4: return FINISHED_FAILED; - case 5: return FINISHED_UNSUPPORTED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AnalysisStatus> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AnalysisStatus findValueByNumber(int number) { - return AnalysisStatus.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (index == -1) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.DiscoveryOccurrence.getDescriptor().getEnumTypes().get(1); - } - - private static final AnalysisStatus[] VALUES = getStaticValuesArray(); - private static AnalysisStatus[] getStaticValuesArray() { - return new AnalysisStatus[] { - ANALYSIS_STATUS_UNSPECIFIED, PENDING, SCANNING, FINISHED_SUCCESS, COMPLETE, FINISHED_FAILED, FINISHED_UNSUPPORTED, - }; - } - public static AnalysisStatus valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private AnalysisStatus(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.DiscoveryOccurrence.AnalysisStatus) - } - - public interface AnalysisCompletedOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string analysis_type = 1; - * @return A list containing the analysisType. - */ - java.util.List - getAnalysisTypeList(); - /** - * repeated string analysis_type = 1; - * @return The count of analysisType. - */ - int getAnalysisTypeCount(); - /** - * repeated string analysis_type = 1; - * @param index The index of the element to return. - * @return The analysisType at the given index. - */ - java.lang.String getAnalysisType(int index); - /** - * repeated string analysis_type = 1; - * @param index The index of the value to return. - * @return The bytes of the analysisType at the given index. - */ - com.google.protobuf.ByteString - getAnalysisTypeBytes(int index); - } - /** - *
-   * Indicates which analysis completed successfully. Multiple types of
-   * analysis can be performed on a single resource.
-   * 
- * - * Protobuf type {@code grafeas.v1.DiscoveryOccurrence.AnalysisCompleted} - */ - public static final class AnalysisCompleted extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) - AnalysisCompletedOrBuilder { - private static final long serialVersionUID = 0L; - // Use AnalysisCompleted.newBuilder() to construct. - private AnalysisCompleted(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnalysisCompleted() { - analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnalysisCompleted(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.class, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder.class); - } - - public static final int ANALYSIS_TYPE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList analysisType_; - /** - * repeated string analysis_type = 1; - * @return A list containing the analysisType. - */ - public com.google.protobuf.ProtocolStringList - getAnalysisTypeList() { - return analysisType_; - } - /** - * repeated string analysis_type = 1; - * @return The count of analysisType. - */ - public int getAnalysisTypeCount() { - return analysisType_.size(); - } - /** - * repeated string analysis_type = 1; - * @param index The index of the element to return. - * @return The analysisType at the given index. - */ - public java.lang.String getAnalysisType(int index) { - return analysisType_.get(index); - } - /** - * repeated string analysis_type = 1; - * @param index The index of the value to return. - * @return The bytes of the analysisType at the given index. - */ - public com.google.protobuf.ByteString - getAnalysisTypeBytes(int index) { - return analysisType_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < analysisType_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, analysisType_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < analysisType_.size(); i++) { - dataSize += computeStringSizeNoTag(analysisType_.getRaw(i)); - } - size += dataSize; - size += 1 * getAnalysisTypeList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted)) { - return super.equals(obj); - } - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted other = (io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) obj; - - if (!getAnalysisTypeList() - .equals(other.getAnalysisTypeList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAnalysisTypeCount() > 0) { - hash = (37 * hash) + ANALYSIS_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAnalysisTypeList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Indicates which analysis completed successfully. Multiple types of
-     * analysis can be performed on a single resource.
-     * 
- * - * Protobuf type {@code grafeas.v1.DiscoveryOccurrence.AnalysisCompleted} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.class, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder.class); - } - - // Construct using io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getDefaultInstanceForType() { - return io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted build() { - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted buildPartial() { - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result = new io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result) { - if (((bitField0_ & 0x00000001) != 0)) { - analysisType_ = analysisType_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.analysisType_ = analysisType_; - } - - private void buildPartial0(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) { - return mergeFrom((io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted other) { - if (other == io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance()) return this; - if (!other.analysisType_.isEmpty()) { - if (analysisType_.isEmpty()) { - analysisType_ = other.analysisType_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAnalysisTypeIsMutable(); - analysisType_.addAll(other.analysisType_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - ensureAnalysisTypeIsMutable(); - analysisType_.add(s); - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAnalysisTypeIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - analysisType_ = new com.google.protobuf.LazyStringArrayList(analysisType_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated string analysis_type = 1; - * @return A list containing the analysisType. - */ - public com.google.protobuf.ProtocolStringList - getAnalysisTypeList() { - return analysisType_.getUnmodifiableView(); - } - /** - * repeated string analysis_type = 1; - * @return The count of analysisType. - */ - public int getAnalysisTypeCount() { - return analysisType_.size(); - } - /** - * repeated string analysis_type = 1; - * @param index The index of the element to return. - * @return The analysisType at the given index. - */ - public java.lang.String getAnalysisType(int index) { - return analysisType_.get(index); - } - /** - * repeated string analysis_type = 1; - * @param index The index of the value to return. - * @return The bytes of the analysisType at the given index. - */ - public com.google.protobuf.ByteString - getAnalysisTypeBytes(int index) { - return analysisType_.getByteString(index); - } - /** - * repeated string analysis_type = 1; - * @param index The index to set the value at. - * @param value The analysisType to set. - * @return This builder for chaining. - */ - public Builder setAnalysisType( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureAnalysisTypeIsMutable(); - analysisType_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string analysis_type = 1; - * @param value The analysisType to add. - * @return This builder for chaining. - */ - public Builder addAnalysisType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureAnalysisTypeIsMutable(); - analysisType_.add(value); - onChanged(); - return this; - } - /** - * repeated string analysis_type = 1; - * @param values The analysisType to add. - * @return This builder for chaining. - */ - public Builder addAllAnalysisType( - java.lang.Iterable values) { - ensureAnalysisTypeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, analysisType_); - onChanged(); - return this; - } - /** - * repeated string analysis_type = 1; - * @return This builder for chaining. - */ - public Builder clearAnalysisType() { - analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated string analysis_type = 1; - * @param value The bytes of the analysisType to add. - * @return This builder for chaining. - */ - public Builder addAnalysisTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureAnalysisTypeIsMutable(); - analysisType_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) - private static final io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted(); - } - - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnalysisCompleted parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int CONTINUOUS_ANALYSIS_FIELD_NUMBER = 1; - private int continuousAnalysis_ = 0; - /** - *
-   * Whether the resource is continuously analyzed.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return The enum numeric value on the wire for continuousAnalysis. - */ - @java.lang.Override public int getContinuousAnalysisValue() { - return continuousAnalysis_; - } - /** - *
-   * Whether the resource is continuously analyzed.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return The continuousAnalysis. - */ - @java.lang.Override public io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis getContinuousAnalysis() { - io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis result = io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.forNumber(continuousAnalysis_); - return result == null ? io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.UNRECOGNIZED : result; - } - - public static final int ANALYSIS_STATUS_FIELD_NUMBER = 2; - private int analysisStatus_ = 0; - /** - *
-   * The status of discovery for the resource.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return The enum numeric value on the wire for analysisStatus. - */ - @java.lang.Override public int getAnalysisStatusValue() { - return analysisStatus_; - } - /** - *
-   * The status of discovery for the resource.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return The analysisStatus. - */ - @java.lang.Override public io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus getAnalysisStatus() { - io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus result = io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.forNumber(analysisStatus_); - return result == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.UNRECOGNIZED : result; - } - - public static final int ANALYSIS_COMPLETED_FIELD_NUMBER = 7; - private io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysisCompleted_; - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @return Whether the analysisCompleted field is set. - */ - @java.lang.Override - public boolean hasAnalysisCompleted() { - return analysisCompleted_ != null; - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @return The analysisCompleted. - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getAnalysisCompleted() { - return analysisCompleted_ == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder getAnalysisCompletedOrBuilder() { - return analysisCompleted_ == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; - } - - public static final int ANALYSIS_ERROR_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private java.util.List analysisError_; - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - @java.lang.Override - public java.util.List getAnalysisErrorList() { - return analysisError_; - } - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - @java.lang.Override - public java.util.List - getAnalysisErrorOrBuilderList() { - return analysisError_; - } - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - @java.lang.Override - public int getAnalysisErrorCount() { - return analysisError_.size(); - } - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - @java.lang.Override - public com.google.rpc.Status getAnalysisError(int index) { - return analysisError_.get(index); - } - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getAnalysisErrorOrBuilder( - int index) { - return analysisError_.get(index); - } - - public static final int ANALYSIS_STATUS_ERROR_FIELD_NUMBER = 3; - private com.google.rpc.Status analysisStatusError_; - /** - *
-   * When an error is encountered this will contain a LocalizedMessage under
-   * details to show to the user. The LocalizedMessage is output only and
-   * populated by the API.
-   * 
- * - * .google.rpc.Status analysis_status_error = 3; - * @return Whether the analysisStatusError field is set. - */ - @java.lang.Override - public boolean hasAnalysisStatusError() { - return analysisStatusError_ != null; - } - /** - *
-   * When an error is encountered this will contain a LocalizedMessage under
-   * details to show to the user. The LocalizedMessage is output only and
-   * populated by the API.
-   * 
- * - * .google.rpc.Status analysis_status_error = 3; - * @return The analysisStatusError. - */ - @java.lang.Override - public com.google.rpc.Status getAnalysisStatusError() { - return analysisStatusError_ == null ? com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; - } - /** - *
-   * When an error is encountered this will contain a LocalizedMessage under
-   * details to show to the user. The LocalizedMessage is output only and
-   * populated by the API.
-   * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getAnalysisStatusErrorOrBuilder() { - return analysisStatusError_ == null ? com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; - } - - public static final int CPE_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object cpe_ = ""; - /** - *
-   * The CPE of the resource being scanned.
-   * 
- * - * string cpe = 4; - * @return The cpe. - */ - @java.lang.Override - public java.lang.String getCpe() { - java.lang.Object ref = cpe_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpe_ = s; - return s; - } - } - /** - *
-   * The CPE of the resource being scanned.
-   * 
- * - * string cpe = 4; - * @return The bytes for cpe. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeBytes() { - java.lang.Object ref = cpe_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpe_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LAST_SCAN_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp lastScanTime_; - /** - *
-   * The last time this resource was scanned.
-   * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - * @return Whether the lastScanTime field is set. - */ - @java.lang.Override - public boolean hasLastScanTime() { - return lastScanTime_ != null; - } - /** - *
-   * The last time this resource was scanned.
-   * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - * @return The lastScanTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLastScanTime() { - return lastScanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; - } - /** - *
-   * The last time this resource was scanned.
-   * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLastScanTimeOrBuilder() { - return lastScanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; - } - - public static final int ARCHIVE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp archiveTime_; - /** - *
-   * The time occurrences related to this discovery occurrence were archived.
-   * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the archiveTime field is set. - */ - @java.lang.Override - public boolean hasArchiveTime() { - return archiveTime_ != null; - } - /** - *
-   * The time occurrences related to this discovery occurrence were archived.
-   * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The archiveTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getArchiveTime() { - return archiveTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; - } - /** - *
-   * The time occurrences related to this discovery occurrence were archived.
-   * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getArchiveTimeOrBuilder() { - return archiveTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (continuousAnalysis_ != io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.CONTINUOUS_ANALYSIS_UNSPECIFIED.getNumber()) { - output.writeEnum(1, continuousAnalysis_); - } - if (analysisStatus_ != io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.ANALYSIS_STATUS_UNSPECIFIED.getNumber()) { - output.writeEnum(2, analysisStatus_); - } - if (analysisStatusError_ != null) { - output.writeMessage(3, getAnalysisStatusError()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpe_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cpe_); - } - if (lastScanTime_ != null) { - output.writeMessage(5, getLastScanTime()); - } - if (archiveTime_ != null) { - output.writeMessage(6, getArchiveTime()); - } - if (analysisCompleted_ != null) { - output.writeMessage(7, getAnalysisCompleted()); - } - for (int i = 0; i < analysisError_.size(); i++) { - output.writeMessage(8, analysisError_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (continuousAnalysis_ != io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.CONTINUOUS_ANALYSIS_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, continuousAnalysis_); - } - if (analysisStatus_ != io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.ANALYSIS_STATUS_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, analysisStatus_); - } - if (analysisStatusError_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getAnalysisStatusError()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpe_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cpe_); - } - if (lastScanTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getLastScanTime()); - } - if (archiveTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getArchiveTime()); - } - if (analysisCompleted_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getAnalysisCompleted()); - } - for (int i = 0; i < analysisError_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, analysisError_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DiscoveryOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.DiscoveryOccurrence other = (io.grafeas.v1.DiscoveryOccurrence) obj; - - if (continuousAnalysis_ != other.continuousAnalysis_) return false; - if (analysisStatus_ != other.analysisStatus_) return false; - if (hasAnalysisCompleted() != other.hasAnalysisCompleted()) return false; - if (hasAnalysisCompleted()) { - if (!getAnalysisCompleted() - .equals(other.getAnalysisCompleted())) return false; - } - if (!getAnalysisErrorList() - .equals(other.getAnalysisErrorList())) return false; - if (hasAnalysisStatusError() != other.hasAnalysisStatusError()) return false; - if (hasAnalysisStatusError()) { - if (!getAnalysisStatusError() - .equals(other.getAnalysisStatusError())) return false; - } - if (!getCpe() - .equals(other.getCpe())) return false; - if (hasLastScanTime() != other.hasLastScanTime()) return false; - if (hasLastScanTime()) { - if (!getLastScanTime() - .equals(other.getLastScanTime())) return false; - } - if (hasArchiveTime() != other.hasArchiveTime()) return false; - if (hasArchiveTime()) { - if (!getArchiveTime() - .equals(other.getArchiveTime())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONTINUOUS_ANALYSIS_FIELD_NUMBER; - hash = (53 * hash) + continuousAnalysis_; - hash = (37 * hash) + ANALYSIS_STATUS_FIELD_NUMBER; - hash = (53 * hash) + analysisStatus_; - if (hasAnalysisCompleted()) { - hash = (37 * hash) + ANALYSIS_COMPLETED_FIELD_NUMBER; - hash = (53 * hash) + getAnalysisCompleted().hashCode(); - } - if (getAnalysisErrorCount() > 0) { - hash = (37 * hash) + ANALYSIS_ERROR_FIELD_NUMBER; - hash = (53 * hash) + getAnalysisErrorList().hashCode(); - } - if (hasAnalysisStatusError()) { - hash = (37 * hash) + ANALYSIS_STATUS_ERROR_FIELD_NUMBER; - hash = (53 * hash) + getAnalysisStatusError().hashCode(); - } - hash = (37 * hash) + CPE_FIELD_NUMBER; - hash = (53 * hash) + getCpe().hashCode(); - if (hasLastScanTime()) { - hash = (37 * hash) + LAST_SCAN_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLastScanTime().hashCode(); - } - if (hasArchiveTime()) { - hash = (37 * hash) + ARCHIVE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getArchiveTime().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DiscoveryOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Provides information about the analysis status of a discovered resource.
-   * 
- * - * Protobuf type {@code grafeas.v1.DiscoveryOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DiscoveryOccurrence) - io.grafeas.v1.DiscoveryOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DiscoveryOccurrence.class, io.grafeas.v1.DiscoveryOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.DiscoveryOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - continuousAnalysis_ = 0; - analysisStatus_ = 0; - analysisCompleted_ = null; - if (analysisCompletedBuilder_ != null) { - analysisCompletedBuilder_.dispose(); - analysisCompletedBuilder_ = null; - } - if (analysisErrorBuilder_ == null) { - analysisError_ = java.util.Collections.emptyList(); - } else { - analysisError_ = null; - analysisErrorBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - analysisStatusError_ = null; - if (analysisStatusErrorBuilder_ != null) { - analysisStatusErrorBuilder_.dispose(); - analysisStatusErrorBuilder_ = null; - } - cpe_ = ""; - lastScanTime_ = null; - if (lastScanTimeBuilder_ != null) { - lastScanTimeBuilder_.dispose(); - lastScanTimeBuilder_ = null; - } - archiveTime_ = null; - if (archiveTimeBuilder_ != null) { - archiveTimeBuilder_.dispose(); - archiveTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence build() { - io.grafeas.v1.DiscoveryOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence buildPartial() { - io.grafeas.v1.DiscoveryOccurrence result = new io.grafeas.v1.DiscoveryOccurrence(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.DiscoveryOccurrence result) { - if (analysisErrorBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - analysisError_ = java.util.Collections.unmodifiableList(analysisError_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.analysisError_ = analysisError_; - } else { - result.analysisError_ = analysisErrorBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.DiscoveryOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.continuousAnalysis_ = continuousAnalysis_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.analysisStatus_ = analysisStatus_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.analysisCompleted_ = analysisCompletedBuilder_ == null - ? analysisCompleted_ - : analysisCompletedBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.analysisStatusError_ = analysisStatusErrorBuilder_ == null - ? analysisStatusError_ - : analysisStatusErrorBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.cpe_ = cpe_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.lastScanTime_ = lastScanTimeBuilder_ == null - ? lastScanTime_ - : lastScanTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.archiveTime_ = archiveTimeBuilder_ == null - ? archiveTime_ - : archiveTimeBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DiscoveryOccurrence) { - return mergeFrom((io.grafeas.v1.DiscoveryOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DiscoveryOccurrence other) { - if (other == io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance()) return this; - if (other.continuousAnalysis_ != 0) { - setContinuousAnalysisValue(other.getContinuousAnalysisValue()); - } - if (other.analysisStatus_ != 0) { - setAnalysisStatusValue(other.getAnalysisStatusValue()); - } - if (other.hasAnalysisCompleted()) { - mergeAnalysisCompleted(other.getAnalysisCompleted()); - } - if (analysisErrorBuilder_ == null) { - if (!other.analysisError_.isEmpty()) { - if (analysisError_.isEmpty()) { - analysisError_ = other.analysisError_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAnalysisErrorIsMutable(); - analysisError_.addAll(other.analysisError_); - } - onChanged(); - } - } else { - if (!other.analysisError_.isEmpty()) { - if (analysisErrorBuilder_.isEmpty()) { - analysisErrorBuilder_.dispose(); - analysisErrorBuilder_ = null; - analysisError_ = other.analysisError_; - bitField0_ = (bitField0_ & ~0x00000008); - analysisErrorBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAnalysisErrorFieldBuilder() : null; - } else { - analysisErrorBuilder_.addAllMessages(other.analysisError_); - } - } - } - if (other.hasAnalysisStatusError()) { - mergeAnalysisStatusError(other.getAnalysisStatusError()); - } - if (!other.getCpe().isEmpty()) { - cpe_ = other.cpe_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (other.hasLastScanTime()) { - mergeLastScanTime(other.getLastScanTime()); - } - if (other.hasArchiveTime()) { - mergeArchiveTime(other.getArchiveTime()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - continuousAnalysis_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - analysisStatus_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - input.readMessage( - getAnalysisStatusErrorFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 26 - case 34: { - cpe_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 34 - case 42: { - input.readMessage( - getLastScanTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 42 - case 50: { - input.readMessage( - getArchiveTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 50 - case 58: { - input.readMessage( - getAnalysisCompletedFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 58 - case 66: { - com.google.rpc.Status m = - input.readMessage( - com.google.rpc.Status.parser(), - extensionRegistry); - if (analysisErrorBuilder_ == null) { - ensureAnalysisErrorIsMutable(); - analysisError_.add(m); - } else { - analysisErrorBuilder_.addMessage(m); - } - break; - } // case 66 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int continuousAnalysis_ = 0; - /** - *
-     * Whether the resource is continuously analyzed.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return The enum numeric value on the wire for continuousAnalysis. - */ - @java.lang.Override public int getContinuousAnalysisValue() { - return continuousAnalysis_; - } - /** - *
-     * Whether the resource is continuously analyzed.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @param value The enum numeric value on the wire for continuousAnalysis to set. - * @return This builder for chaining. - */ - public Builder setContinuousAnalysisValue(int value) { - continuousAnalysis_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Whether the resource is continuously analyzed.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return The continuousAnalysis. - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis getContinuousAnalysis() { - io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis result = io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.forNumber(continuousAnalysis_); - return result == null ? io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.UNRECOGNIZED : result; - } - /** - *
-     * Whether the resource is continuously analyzed.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @param value The continuousAnalysis to set. - * @return This builder for chaining. - */ - public Builder setContinuousAnalysis(io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - continuousAnalysis_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Whether the resource is continuously analyzed.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return This builder for chaining. - */ - public Builder clearContinuousAnalysis() { - bitField0_ = (bitField0_ & ~0x00000001); - continuousAnalysis_ = 0; - onChanged(); - return this; - } - - private int analysisStatus_ = 0; - /** - *
-     * The status of discovery for the resource.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return The enum numeric value on the wire for analysisStatus. - */ - @java.lang.Override public int getAnalysisStatusValue() { - return analysisStatus_; - } - /** - *
-     * The status of discovery for the resource.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @param value The enum numeric value on the wire for analysisStatus to set. - * @return This builder for chaining. - */ - public Builder setAnalysisStatusValue(int value) { - analysisStatus_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The status of discovery for the resource.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return The analysisStatus. - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus getAnalysisStatus() { - io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus result = io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.forNumber(analysisStatus_); - return result == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.UNRECOGNIZED : result; - } - /** - *
-     * The status of discovery for the resource.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @param value The analysisStatus to set. - * @return This builder for chaining. - */ - public Builder setAnalysisStatus(io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - analysisStatus_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The status of discovery for the resource.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return This builder for chaining. - */ - public Builder clearAnalysisStatus() { - bitField0_ = (bitField0_ & ~0x00000002); - analysisStatus_ = 0; - onChanged(); - return this; - } - - private io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysisCompleted_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder> analysisCompletedBuilder_; - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @return Whether the analysisCompleted field is set. - */ - public boolean hasAnalysisCompleted() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @return The analysisCompleted. - */ - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getAnalysisCompleted() { - if (analysisCompletedBuilder_ == null) { - return analysisCompleted_ == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; - } else { - return analysisCompletedBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - public Builder setAnalysisCompleted(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted value) { - if (analysisCompletedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - analysisCompleted_ = value; - } else { - analysisCompletedBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - public Builder setAnalysisCompleted( - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder builderForValue) { - if (analysisCompletedBuilder_ == null) { - analysisCompleted_ = builderForValue.build(); - } else { - analysisCompletedBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - public Builder mergeAnalysisCompleted(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted value) { - if (analysisCompletedBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - analysisCompleted_ != null && - analysisCompleted_ != io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance()) { - getAnalysisCompletedBuilder().mergeFrom(value); - } else { - analysisCompleted_ = value; - } - } else { - analysisCompletedBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - public Builder clearAnalysisCompleted() { - bitField0_ = (bitField0_ & ~0x00000004); - analysisCompleted_ = null; - if (analysisCompletedBuilder_ != null) { - analysisCompletedBuilder_.dispose(); - analysisCompletedBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder getAnalysisCompletedBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getAnalysisCompletedFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder getAnalysisCompletedOrBuilder() { - if (analysisCompletedBuilder_ != null) { - return analysisCompletedBuilder_.getMessageOrBuilder(); - } else { - return analysisCompleted_ == null ? - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; - } - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder> - getAnalysisCompletedFieldBuilder() { - if (analysisCompletedBuilder_ == null) { - analysisCompletedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder>( - getAnalysisCompleted(), - getParentForChildren(), - isClean()); - analysisCompleted_ = null; - } - return analysisCompletedBuilder_; - } - - private java.util.List analysisError_ = - java.util.Collections.emptyList(); - private void ensureAnalysisErrorIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - analysisError_ = new java.util.ArrayList(analysisError_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> analysisErrorBuilder_; - - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public java.util.List getAnalysisErrorList() { - if (analysisErrorBuilder_ == null) { - return java.util.Collections.unmodifiableList(analysisError_); - } else { - return analysisErrorBuilder_.getMessageList(); - } - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public int getAnalysisErrorCount() { - if (analysisErrorBuilder_ == null) { - return analysisError_.size(); - } else { - return analysisErrorBuilder_.getCount(); - } - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public com.google.rpc.Status getAnalysisError(int index) { - if (analysisErrorBuilder_ == null) { - return analysisError_.get(index); - } else { - return analysisErrorBuilder_.getMessage(index); - } - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder setAnalysisError( - int index, com.google.rpc.Status value) { - if (analysisErrorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnalysisErrorIsMutable(); - analysisError_.set(index, value); - onChanged(); - } else { - analysisErrorBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder setAnalysisError( - int index, com.google.rpc.Status.Builder builderForValue) { - if (analysisErrorBuilder_ == null) { - ensureAnalysisErrorIsMutable(); - analysisError_.set(index, builderForValue.build()); - onChanged(); - } else { - analysisErrorBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder addAnalysisError(com.google.rpc.Status value) { - if (analysisErrorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnalysisErrorIsMutable(); - analysisError_.add(value); - onChanged(); - } else { - analysisErrorBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder addAnalysisError( - int index, com.google.rpc.Status value) { - if (analysisErrorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnalysisErrorIsMutable(); - analysisError_.add(index, value); - onChanged(); - } else { - analysisErrorBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder addAnalysisError( - com.google.rpc.Status.Builder builderForValue) { - if (analysisErrorBuilder_ == null) { - ensureAnalysisErrorIsMutable(); - analysisError_.add(builderForValue.build()); - onChanged(); - } else { - analysisErrorBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder addAnalysisError( - int index, com.google.rpc.Status.Builder builderForValue) { - if (analysisErrorBuilder_ == null) { - ensureAnalysisErrorIsMutable(); - analysisError_.add(index, builderForValue.build()); - onChanged(); - } else { - analysisErrorBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder addAllAnalysisError( - java.lang.Iterable values) { - if (analysisErrorBuilder_ == null) { - ensureAnalysisErrorIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, analysisError_); - onChanged(); - } else { - analysisErrorBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder clearAnalysisError() { - if (analysisErrorBuilder_ == null) { - analysisError_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - analysisErrorBuilder_.clear(); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder removeAnalysisError(int index) { - if (analysisErrorBuilder_ == null) { - ensureAnalysisErrorIsMutable(); - analysisError_.remove(index); - onChanged(); - } else { - analysisErrorBuilder_.remove(index); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public com.google.rpc.Status.Builder getAnalysisErrorBuilder( - int index) { - return getAnalysisErrorFieldBuilder().getBuilder(index); - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public com.google.rpc.StatusOrBuilder getAnalysisErrorOrBuilder( - int index) { - if (analysisErrorBuilder_ == null) { - return analysisError_.get(index); } else { - return analysisErrorBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public java.util.List - getAnalysisErrorOrBuilderList() { - if (analysisErrorBuilder_ != null) { - return analysisErrorBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(analysisError_); - } - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public com.google.rpc.Status.Builder addAnalysisErrorBuilder() { - return getAnalysisErrorFieldBuilder().addBuilder( - com.google.rpc.Status.getDefaultInstance()); - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public com.google.rpc.Status.Builder addAnalysisErrorBuilder( - int index) { - return getAnalysisErrorFieldBuilder().addBuilder( - index, com.google.rpc.Status.getDefaultInstance()); - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public java.util.List - getAnalysisErrorBuilderList() { - return getAnalysisErrorFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getAnalysisErrorFieldBuilder() { - if (analysisErrorBuilder_ == null) { - analysisErrorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - analysisError_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - analysisError_ = null; - } - return analysisErrorBuilder_; - } - - private com.google.rpc.Status analysisStatusError_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> analysisStatusErrorBuilder_; - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - * @return Whether the analysisStatusError field is set. - */ - public boolean hasAnalysisStatusError() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - * @return The analysisStatusError. - */ - public com.google.rpc.Status getAnalysisStatusError() { - if (analysisStatusErrorBuilder_ == null) { - return analysisStatusError_ == null ? com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; - } else { - return analysisStatusErrorBuilder_.getMessage(); - } - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - public Builder setAnalysisStatusError(com.google.rpc.Status value) { - if (analysisStatusErrorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - analysisStatusError_ = value; - } else { - analysisStatusErrorBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - public Builder setAnalysisStatusError( - com.google.rpc.Status.Builder builderForValue) { - if (analysisStatusErrorBuilder_ == null) { - analysisStatusError_ = builderForValue.build(); - } else { - analysisStatusErrorBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - public Builder mergeAnalysisStatusError(com.google.rpc.Status value) { - if (analysisStatusErrorBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - analysisStatusError_ != null && - analysisStatusError_ != com.google.rpc.Status.getDefaultInstance()) { - getAnalysisStatusErrorBuilder().mergeFrom(value); - } else { - analysisStatusError_ = value; - } - } else { - analysisStatusErrorBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - public Builder clearAnalysisStatusError() { - bitField0_ = (bitField0_ & ~0x00000010); - analysisStatusError_ = null; - if (analysisStatusErrorBuilder_ != null) { - analysisStatusErrorBuilder_.dispose(); - analysisStatusErrorBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - public com.google.rpc.Status.Builder getAnalysisStatusErrorBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getAnalysisStatusErrorFieldBuilder().getBuilder(); - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - public com.google.rpc.StatusOrBuilder getAnalysisStatusErrorOrBuilder() { - if (analysisStatusErrorBuilder_ != null) { - return analysisStatusErrorBuilder_.getMessageOrBuilder(); - } else { - return analysisStatusError_ == null ? - com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; - } - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getAnalysisStatusErrorFieldBuilder() { - if (analysisStatusErrorBuilder_ == null) { - analysisStatusErrorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getAnalysisStatusError(), - getParentForChildren(), - isClean()); - analysisStatusError_ = null; - } - return analysisStatusErrorBuilder_; - } - - private java.lang.Object cpe_ = ""; - /** - *
-     * The CPE of the resource being scanned.
-     * 
- * - * string cpe = 4; - * @return The cpe. - */ - public java.lang.String getCpe() { - java.lang.Object ref = cpe_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpe_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The CPE of the resource being scanned.
-     * 
- * - * string cpe = 4; - * @return The bytes for cpe. - */ - public com.google.protobuf.ByteString - getCpeBytes() { - java.lang.Object ref = cpe_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpe_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The CPE of the resource being scanned.
-     * 
- * - * string cpe = 4; - * @param value The cpe to set. - * @return This builder for chaining. - */ - public Builder setCpe( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpe_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The CPE of the resource being scanned.
-     * 
- * - * string cpe = 4; - * @return This builder for chaining. - */ - public Builder clearCpe() { - cpe_ = getDefaultInstance().getCpe(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * The CPE of the resource being scanned.
-     * 
- * - * string cpe = 4; - * @param value The bytes for cpe to set. - * @return This builder for chaining. - */ - public Builder setCpeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpe_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp lastScanTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastScanTimeBuilder_; - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - * @return Whether the lastScanTime field is set. - */ - public boolean hasLastScanTime() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - * @return The lastScanTime. - */ - public com.google.protobuf.Timestamp getLastScanTime() { - if (lastScanTimeBuilder_ == null) { - return lastScanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; - } else { - return lastScanTimeBuilder_.getMessage(); - } - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - public Builder setLastScanTime(com.google.protobuf.Timestamp value) { - if (lastScanTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lastScanTime_ = value; - } else { - lastScanTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - public Builder setLastScanTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (lastScanTimeBuilder_ == null) { - lastScanTime_ = builderForValue.build(); - } else { - lastScanTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - public Builder mergeLastScanTime(com.google.protobuf.Timestamp value) { - if (lastScanTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - lastScanTime_ != null && - lastScanTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getLastScanTimeBuilder().mergeFrom(value); - } else { - lastScanTime_ = value; - } - } else { - lastScanTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - public Builder clearLastScanTime() { - bitField0_ = (bitField0_ & ~0x00000040); - lastScanTime_ = null; - if (lastScanTimeBuilder_ != null) { - lastScanTimeBuilder_.dispose(); - lastScanTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - public com.google.protobuf.Timestamp.Builder getLastScanTimeBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getLastScanTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - public com.google.protobuf.TimestampOrBuilder getLastScanTimeOrBuilder() { - if (lastScanTimeBuilder_ != null) { - return lastScanTimeBuilder_.getMessageOrBuilder(); - } else { - return lastScanTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; - } - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getLastScanTimeFieldBuilder() { - if (lastScanTimeBuilder_ == null) { - lastScanTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getLastScanTime(), - getParentForChildren(), - isClean()); - lastScanTime_ = null; - } - return lastScanTimeBuilder_; - } - - private com.google.protobuf.Timestamp archiveTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> archiveTimeBuilder_; - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the archiveTime field is set. - */ - public boolean hasArchiveTime() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The archiveTime. - */ - public com.google.protobuf.Timestamp getArchiveTime() { - if (archiveTimeBuilder_ == null) { - return archiveTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; - } else { - return archiveTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setArchiveTime(com.google.protobuf.Timestamp value) { - if (archiveTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - archiveTime_ = value; - } else { - archiveTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setArchiveTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (archiveTimeBuilder_ == null) { - archiveTime_ = builderForValue.build(); - } else { - archiveTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeArchiveTime(com.google.protobuf.Timestamp value) { - if (archiveTimeBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) && - archiveTime_ != null && - archiveTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getArchiveTimeBuilder().mergeFrom(value); - } else { - archiveTime_ = value; - } - } else { - archiveTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearArchiveTime() { - bitField0_ = (bitField0_ & ~0x00000080); - archiveTime_ = null; - if (archiveTimeBuilder_ != null) { - archiveTimeBuilder_.dispose(); - archiveTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getArchiveTimeBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return getArchiveTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getArchiveTimeOrBuilder() { - if (archiveTimeBuilder_ != null) { - return archiveTimeBuilder_.getMessageOrBuilder(); - } else { - return archiveTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; - } - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getArchiveTimeFieldBuilder() { - if (archiveTimeBuilder_ == null) { - archiveTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getArchiveTime(), - getParentForChildren(), - isClean()); - archiveTime_ = null; - } - return archiveTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DiscoveryOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DiscoveryOccurrence) - private static final io.grafeas.v1.DiscoveryOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DiscoveryOccurrence(); - } - - public static io.grafeas.v1.DiscoveryOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DiscoveryOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java deleted file mode 100644 index 6d5434fd5737..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java +++ /dev/null @@ -1,218 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/discovery.proto - -package io.grafeas.v1; - -public interface DiscoveryOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DiscoveryOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Whether the resource is continuously analyzed.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return The enum numeric value on the wire for continuousAnalysis. - */ - int getContinuousAnalysisValue(); - /** - *
-   * Whether the resource is continuously analyzed.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return The continuousAnalysis. - */ - io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis getContinuousAnalysis(); - - /** - *
-   * The status of discovery for the resource.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return The enum numeric value on the wire for analysisStatus. - */ - int getAnalysisStatusValue(); - /** - *
-   * The status of discovery for the resource.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return The analysisStatus. - */ - io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus getAnalysisStatus(); - - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @return Whether the analysisCompleted field is set. - */ - boolean hasAnalysisCompleted(); - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @return The analysisCompleted. - */ - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getAnalysisCompleted(); - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder getAnalysisCompletedOrBuilder(); - - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - java.util.List - getAnalysisErrorList(); - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - com.google.rpc.Status getAnalysisError(int index); - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - int getAnalysisErrorCount(); - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - java.util.List - getAnalysisErrorOrBuilderList(); - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - com.google.rpc.StatusOrBuilder getAnalysisErrorOrBuilder( - int index); - - /** - *
-   * When an error is encountered this will contain a LocalizedMessage under
-   * details to show to the user. The LocalizedMessage is output only and
-   * populated by the API.
-   * 
- * - * .google.rpc.Status analysis_status_error = 3; - * @return Whether the analysisStatusError field is set. - */ - boolean hasAnalysisStatusError(); - /** - *
-   * When an error is encountered this will contain a LocalizedMessage under
-   * details to show to the user. The LocalizedMessage is output only and
-   * populated by the API.
-   * 
- * - * .google.rpc.Status analysis_status_error = 3; - * @return The analysisStatusError. - */ - com.google.rpc.Status getAnalysisStatusError(); - /** - *
-   * When an error is encountered this will contain a LocalizedMessage under
-   * details to show to the user. The LocalizedMessage is output only and
-   * populated by the API.
-   * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - com.google.rpc.StatusOrBuilder getAnalysisStatusErrorOrBuilder(); - - /** - *
-   * The CPE of the resource being scanned.
-   * 
- * - * string cpe = 4; - * @return The cpe. - */ - java.lang.String getCpe(); - /** - *
-   * The CPE of the resource being scanned.
-   * 
- * - * string cpe = 4; - * @return The bytes for cpe. - */ - com.google.protobuf.ByteString - getCpeBytes(); - - /** - *
-   * The last time this resource was scanned.
-   * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - * @return Whether the lastScanTime field is set. - */ - boolean hasLastScanTime(); - /** - *
-   * The last time this resource was scanned.
-   * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - * @return The lastScanTime. - */ - com.google.protobuf.Timestamp getLastScanTime(); - /** - *
-   * The last time this resource was scanned.
-   * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - com.google.protobuf.TimestampOrBuilder getLastScanTimeOrBuilder(); - - /** - *
-   * The time occurrences related to this discovery occurrence were archived.
-   * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the archiveTime field is set. - */ - boolean hasArchiveTime(); - /** - *
-   * The time occurrences related to this discovery occurrence were archived.
-   * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The archiveTime. - */ - com.google.protobuf.Timestamp getArchiveTime(); - /** - *
-   * The time occurrences related to this discovery occurrence were archived.
-   * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getArchiveTimeOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java deleted file mode 100644 index fe74a108d6d7..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java +++ /dev/null @@ -1,1439 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -/** - *
- * This represents a particular channel of distribution for a given package.
- * E.g., Debian's jessie-backports dpkg mirror.
- * 
- * - * Protobuf type {@code grafeas.v1.Distribution} - */ -public final class Distribution extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Distribution) - DistributionOrBuilder { -private static final long serialVersionUID = 0L; - // Use Distribution.newBuilder() to construct. - private Distribution(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Distribution() { - cpeUri_ = ""; - architecture_ = 0; - maintainer_ = ""; - url_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Distribution(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Distribution.class, io.grafeas.v1.Distribution.Builder.class); - } - - public static final int CPE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object cpeUri_ = ""; - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The cpeUri. - */ - @java.lang.Override - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } - } - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for cpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARCHITECTURE_FIELD_NUMBER = 2; - private int architecture_ = 0; - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built.
-   * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @return The enum numeric value on the wire for architecture. - */ - @java.lang.Override public int getArchitectureValue() { - return architecture_; - } - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built.
-   * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @return The architecture. - */ - @java.lang.Override public io.grafeas.v1.Architecture getArchitecture() { - io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); - return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; - } - - public static final int LATEST_VERSION_FIELD_NUMBER = 3; - private io.grafeas.v1.Version latestVersion_; - /** - *
-   * The latest available version of this package in this distribution channel.
-   * 
- * - * .grafeas.v1.Version latest_version = 3; - * @return Whether the latestVersion field is set. - */ - @java.lang.Override - public boolean hasLatestVersion() { - return latestVersion_ != null; - } - /** - *
-   * The latest available version of this package in this distribution channel.
-   * 
- * - * .grafeas.v1.Version latest_version = 3; - * @return The latestVersion. - */ - @java.lang.Override - public io.grafeas.v1.Version getLatestVersion() { - return latestVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; - } - /** - *
-   * The latest available version of this package in this distribution channel.
-   * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getLatestVersionOrBuilder() { - return latestVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; - } - - public static final int MAINTAINER_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object maintainer_ = ""; - /** - *
-   * A freeform string denoting the maintainer of this package.
-   * 
- * - * string maintainer = 4; - * @return The maintainer. - */ - @java.lang.Override - public java.lang.String getMaintainer() { - java.lang.Object ref = maintainer_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - maintainer_ = s; - return s; - } - } - /** - *
-   * A freeform string denoting the maintainer of this package.
-   * 
- * - * string maintainer = 4; - * @return The bytes for maintainer. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMaintainerBytes() { - java.lang.Object ref = maintainer_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - maintainer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URL_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object url_ = ""; - /** - *
-   * The distribution channel-specific homepage for this package.
-   * 
- * - * string url = 5; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-   * The distribution channel-specific homepage for this package.
-   * 
- * - * string url = 5; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * The distribution channel-specific description of this package.
-   * 
- * - * string description = 6; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * The distribution channel-specific description of this package.
-   * 
- * - * string description = 6; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); - } - if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { - output.writeEnum(2, architecture_); - } - if (latestVersion_ != null) { - output.writeMessage(3, getLatestVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, maintainer_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); - } - if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, architecture_); - } - if (latestVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getLatestVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, maintainer_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Distribution)) { - return super.equals(obj); - } - io.grafeas.v1.Distribution other = (io.grafeas.v1.Distribution) obj; - - if (!getCpeUri() - .equals(other.getCpeUri())) return false; - if (architecture_ != other.architecture_) return false; - if (hasLatestVersion() != other.hasLatestVersion()) return false; - if (hasLatestVersion()) { - if (!getLatestVersion() - .equals(other.getLatestVersion())) return false; - } - if (!getMaintainer() - .equals(other.getMaintainer())) return false; - if (!getUrl() - .equals(other.getUrl())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCpeUri().hashCode(); - hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; - hash = (53 * hash) + architecture_; - if (hasLatestVersion()) { - hash = (37 * hash) + LATEST_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getLatestVersion().hashCode(); - } - hash = (37 * hash) + MAINTAINER_FIELD_NUMBER; - hash = (53 * hash) + getMaintainer().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Distribution parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Distribution parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Distribution parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Distribution parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Distribution parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Distribution parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Distribution parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Distribution parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Distribution parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Distribution parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Distribution parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Distribution parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Distribution prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * This represents a particular channel of distribution for a given package.
-   * E.g., Debian's jessie-backports dpkg mirror.
-   * 
- * - * Protobuf type {@code grafeas.v1.Distribution} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Distribution) - io.grafeas.v1.DistributionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Distribution.class, io.grafeas.v1.Distribution.Builder.class); - } - - // Construct using io.grafeas.v1.Distribution.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - cpeUri_ = ""; - architecture_ = 0; - latestVersion_ = null; - if (latestVersionBuilder_ != null) { - latestVersionBuilder_.dispose(); - latestVersionBuilder_ = null; - } - maintainer_ = ""; - url_ = ""; - description_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Distribution getDefaultInstanceForType() { - return io.grafeas.v1.Distribution.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Distribution build() { - io.grafeas.v1.Distribution result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Distribution buildPartial() { - io.grafeas.v1.Distribution result = new io.grafeas.v1.Distribution(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Distribution result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.cpeUri_ = cpeUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.architecture_ = architecture_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.latestVersion_ = latestVersionBuilder_ == null - ? latestVersion_ - : latestVersionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.maintainer_ = maintainer_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.url_ = url_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.description_ = description_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Distribution) { - return mergeFrom((io.grafeas.v1.Distribution)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Distribution other) { - if (other == io.grafeas.v1.Distribution.getDefaultInstance()) return this; - if (!other.getCpeUri().isEmpty()) { - cpeUri_ = other.cpeUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.architecture_ != 0) { - setArchitectureValue(other.getArchitectureValue()); - } - if (other.hasLatestVersion()) { - mergeLatestVersion(other.getLatestVersion()); - } - if (!other.getMaintainer().isEmpty()) { - maintainer_ = other.maintainer_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000020; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - cpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - architecture_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - input.readMessage( - getLatestVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - maintainer_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - url_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object cpeUri_ = ""; - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The cpeUri. - */ - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for cpeUri. - */ - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearCpeUri() { - cpeUri_ = getDefaultInstance().getCpeUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int architecture_ = 0; - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built.
-     * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @return The enum numeric value on the wire for architecture. - */ - @java.lang.Override public int getArchitectureValue() { - return architecture_; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built.
-     * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @param value The enum numeric value on the wire for architecture to set. - * @return This builder for chaining. - */ - public Builder setArchitectureValue(int value) { - architecture_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built.
-     * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @return The architecture. - */ - @java.lang.Override - public io.grafeas.v1.Architecture getArchitecture() { - io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); - return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built.
-     * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @param value The architecture to set. - * @return This builder for chaining. - */ - public Builder setArchitecture(io.grafeas.v1.Architecture value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - architecture_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built.
-     * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @return This builder for chaining. - */ - public Builder clearArchitecture() { - bitField0_ = (bitField0_ & ~0x00000002); - architecture_ = 0; - onChanged(); - return this; - } - - private io.grafeas.v1.Version latestVersion_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> latestVersionBuilder_; - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - * @return Whether the latestVersion field is set. - */ - public boolean hasLatestVersion() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - * @return The latestVersion. - */ - public io.grafeas.v1.Version getLatestVersion() { - if (latestVersionBuilder_ == null) { - return latestVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; - } else { - return latestVersionBuilder_.getMessage(); - } - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - public Builder setLatestVersion(io.grafeas.v1.Version value) { - if (latestVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - latestVersion_ = value; - } else { - latestVersionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - public Builder setLatestVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (latestVersionBuilder_ == null) { - latestVersion_ = builderForValue.build(); - } else { - latestVersionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - public Builder mergeLatestVersion(io.grafeas.v1.Version value) { - if (latestVersionBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - latestVersion_ != null && - latestVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { - getLatestVersionBuilder().mergeFrom(value); - } else { - latestVersion_ = value; - } - } else { - latestVersionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - public Builder clearLatestVersion() { - bitField0_ = (bitField0_ & ~0x00000004); - latestVersion_ = null; - if (latestVersionBuilder_ != null) { - latestVersionBuilder_.dispose(); - latestVersionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - public io.grafeas.v1.Version.Builder getLatestVersionBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getLatestVersionFieldBuilder().getBuilder(); - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - public io.grafeas.v1.VersionOrBuilder getLatestVersionOrBuilder() { - if (latestVersionBuilder_ != null) { - return latestVersionBuilder_.getMessageOrBuilder(); - } else { - return latestVersion_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; - } - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getLatestVersionFieldBuilder() { - if (latestVersionBuilder_ == null) { - latestVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getLatestVersion(), - getParentForChildren(), - isClean()); - latestVersion_ = null; - } - return latestVersionBuilder_; - } - - private java.lang.Object maintainer_ = ""; - /** - *
-     * A freeform string denoting the maintainer of this package.
-     * 
- * - * string maintainer = 4; - * @return The maintainer. - */ - public java.lang.String getMaintainer() { - java.lang.Object ref = maintainer_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - maintainer_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A freeform string denoting the maintainer of this package.
-     * 
- * - * string maintainer = 4; - * @return The bytes for maintainer. - */ - public com.google.protobuf.ByteString - getMaintainerBytes() { - java.lang.Object ref = maintainer_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - maintainer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A freeform string denoting the maintainer of this package.
-     * 
- * - * string maintainer = 4; - * @param value The maintainer to set. - * @return This builder for chaining. - */ - public Builder setMaintainer( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - maintainer_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * A freeform string denoting the maintainer of this package.
-     * 
- * - * string maintainer = 4; - * @return This builder for chaining. - */ - public Builder clearMaintainer() { - maintainer_ = getDefaultInstance().getMaintainer(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * A freeform string denoting the maintainer of this package.
-     * 
- * - * string maintainer = 4; - * @param value The bytes for maintainer to set. - * @return This builder for chaining. - */ - public Builder setMaintainerBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - maintainer_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-     * The distribution channel-specific homepage for this package.
-     * 
- * - * string url = 5; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The distribution channel-specific homepage for this package.
-     * 
- * - * string url = 5; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The distribution channel-specific homepage for this package.
-     * 
- * - * string url = 5; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - url_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * The distribution channel-specific homepage for this package.
-     * 
- * - * string url = 5; - * @return This builder for chaining. - */ - public Builder clearUrl() { - url_ = getDefaultInstance().getUrl(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * The distribution channel-specific homepage for this package.
-     * 
- * - * string url = 5; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - url_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * The distribution channel-specific description of this package.
-     * 
- * - * string description = 6; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The distribution channel-specific description of this package.
-     * 
- * - * string description = 6; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The distribution channel-specific description of this package.
-     * 
- * - * string description = 6; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The distribution channel-specific description of this package.
-     * 
- * - * string description = 6; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * The distribution channel-specific description of this package.
-     * 
- * - * string description = 6; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Distribution) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Distribution) - private static final io.grafeas.v1.Distribution DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Distribution(); - } - - public static io.grafeas.v1.Distribution getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Distribution parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Distribution getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java deleted file mode 100644 index 68a9704ee42d..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java +++ /dev/null @@ -1,139 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -public interface DistributionOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Distribution) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The cpeUri. - */ - java.lang.String getCpeUri(); - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for cpeUri. - */ - com.google.protobuf.ByteString - getCpeUriBytes(); - - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built.
-   * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @return The enum numeric value on the wire for architecture. - */ - int getArchitectureValue(); - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built.
-   * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @return The architecture. - */ - io.grafeas.v1.Architecture getArchitecture(); - - /** - *
-   * The latest available version of this package in this distribution channel.
-   * 
- * - * .grafeas.v1.Version latest_version = 3; - * @return Whether the latestVersion field is set. - */ - boolean hasLatestVersion(); - /** - *
-   * The latest available version of this package in this distribution channel.
-   * 
- * - * .grafeas.v1.Version latest_version = 3; - * @return The latestVersion. - */ - io.grafeas.v1.Version getLatestVersion(); - /** - *
-   * The latest available version of this package in this distribution channel.
-   * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - io.grafeas.v1.VersionOrBuilder getLatestVersionOrBuilder(); - - /** - *
-   * A freeform string denoting the maintainer of this package.
-   * 
- * - * string maintainer = 4; - * @return The maintainer. - */ - java.lang.String getMaintainer(); - /** - *
-   * A freeform string denoting the maintainer of this package.
-   * 
- * - * string maintainer = 4; - * @return The bytes for maintainer. - */ - com.google.protobuf.ByteString - getMaintainerBytes(); - - /** - *
-   * The distribution channel-specific homepage for this package.
-   * 
- * - * string url = 5; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-   * The distribution channel-specific homepage for this package.
-   * 
- * - * string url = 5; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-   * The distribution channel-specific description of this package.
-   * 
- * - * string description = 6; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * The distribution channel-specific description of this package.
-   * 
- * - * string description = 6; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java deleted file mode 100644 index 00a87936ba93..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java +++ /dev/null @@ -1,83 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/dsse_attestation.proto - -package io.grafeas.v1; - -public final class DsseAttestation { - private DsseAttestation() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DSSEAttestationNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n!grafeas/v1/dsse_attestation.proto\022\ngra" + - "feas.v1\032\027grafeas/v1/common.proto\032!grafea" + - "s/v1/intoto_statement.proto\"v\n\023DSSEAttes" + - "tationNote\0226\n\004hint\030\001 \001(\0132(.grafeas.v1.DS" + - "SEAttestationNote.DSSEHint\032\'\n\010DSSEHint\022\033" + - "\n\023human_readable_name\030\001 \001(\t\"\210\001\n\031DSSEAtte" + - "stationOccurrence\022&\n\010envelope\030\001 \001(\0132\024.gr" + - "afeas.v1.Envelope\0220\n\tstatement\030\002 \001(\0132\033.g" + - "rafeas.v1.InTotoStatementH\000B\021\n\017decoded_p" + - "ayloadBQ\n\rio.grafeas.v1P\001Z8google.golang" + - ".org/genproto/googleapis/grafeas/v1;graf" + - "eas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.grafeas.v1.Common.getDescriptor(), - io.grafeas.v1.InTotoStatementProto.getDescriptor(), - }); - internal_static_grafeas_v1_DSSEAttestationNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DSSEAttestationNote_descriptor, - new java.lang.String[] { "Hint", }); - internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor = - internal_static_grafeas_v1_DSSEAttestationNote_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor, - new java.lang.String[] { "HumanReadableName", }); - internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor, - new java.lang.String[] { "Envelope", "Statement", "DecodedPayload", }); - io.grafeas.v1.Common.getDescriptor(); - io.grafeas.v1.InTotoStatementProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java deleted file mode 100644 index 62f692aff974..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java +++ /dev/null @@ -1,977 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - *
- * MUST match
- * https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An
- * authenticated message of arbitrary type.
- * 
- * - * Protobuf type {@code grafeas.v1.Envelope} - */ -public final class Envelope extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Envelope) - EnvelopeOrBuilder { -private static final long serialVersionUID = 0L; - // Use Envelope.newBuilder() to construct. - private Envelope(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Envelope() { - payload_ = com.google.protobuf.ByteString.EMPTY; - payloadType_ = ""; - signatures_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Envelope(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Envelope.class, io.grafeas.v1.Envelope.Builder.class); - } - - public static final int PAYLOAD_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes payload = 1; - * @return The payload. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPayload() { - return payload_; - } - - public static final int PAYLOAD_TYPE_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object payloadType_ = ""; - /** - * string payload_type = 2; - * @return The payloadType. - */ - @java.lang.Override - public java.lang.String getPayloadType() { - java.lang.Object ref = payloadType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - payloadType_ = s; - return s; - } - } - /** - * string payload_type = 2; - * @return The bytes for payloadType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPayloadTypeBytes() { - java.lang.Object ref = payloadType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - payloadType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SIGNATURES_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List signatures_; - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - @java.lang.Override - public java.util.List getSignaturesList() { - return signatures_; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - @java.lang.Override - public java.util.List - getSignaturesOrBuilderList() { - return signatures_; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - @java.lang.Override - public int getSignaturesCount() { - return signatures_.size(); - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - @java.lang.Override - public io.grafeas.v1.EnvelopeSignature getSignatures(int index) { - return signatures_.get(index); - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - @java.lang.Override - public io.grafeas.v1.EnvelopeSignatureOrBuilder getSignaturesOrBuilder( - int index) { - return signatures_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!payload_.isEmpty()) { - output.writeBytes(1, payload_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, payloadType_); - } - for (int i = 0; i < signatures_.size(); i++) { - output.writeMessage(3, signatures_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!payload_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, payload_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, payloadType_); - } - for (int i = 0; i < signatures_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, signatures_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Envelope)) { - return super.equals(obj); - } - io.grafeas.v1.Envelope other = (io.grafeas.v1.Envelope) obj; - - if (!getPayload() - .equals(other.getPayload())) return false; - if (!getPayloadType() - .equals(other.getPayloadType())) return false; - if (!getSignaturesList() - .equals(other.getSignaturesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; - hash = (53 * hash) + getPayload().hashCode(); - hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getPayloadType().hashCode(); - if (getSignaturesCount() > 0) { - hash = (37 * hash) + SIGNATURES_FIELD_NUMBER; - hash = (53 * hash) + getSignaturesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Envelope parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Envelope parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Envelope parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Envelope parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Envelope parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Envelope parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Envelope parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Envelope parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Envelope parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Envelope parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Envelope parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Envelope parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Envelope prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * MUST match
-   * https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An
-   * authenticated message of arbitrary type.
-   * 
- * - * Protobuf type {@code grafeas.v1.Envelope} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Envelope) - io.grafeas.v1.EnvelopeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Envelope.class, io.grafeas.v1.Envelope.Builder.class); - } - - // Construct using io.grafeas.v1.Envelope.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - payload_ = com.google.protobuf.ByteString.EMPTY; - payloadType_ = ""; - if (signaturesBuilder_ == null) { - signatures_ = java.util.Collections.emptyList(); - } else { - signatures_ = null; - signaturesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Envelope getDefaultInstanceForType() { - return io.grafeas.v1.Envelope.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Envelope build() { - io.grafeas.v1.Envelope result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Envelope buildPartial() { - io.grafeas.v1.Envelope result = new io.grafeas.v1.Envelope(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.Envelope result) { - if (signaturesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - signatures_ = java.util.Collections.unmodifiableList(signatures_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.signatures_ = signatures_; - } else { - result.signatures_ = signaturesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.Envelope result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.payload_ = payload_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.payloadType_ = payloadType_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Envelope) { - return mergeFrom((io.grafeas.v1.Envelope)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Envelope other) { - if (other == io.grafeas.v1.Envelope.getDefaultInstance()) return this; - if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { - setPayload(other.getPayload()); - } - if (!other.getPayloadType().isEmpty()) { - payloadType_ = other.payloadType_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (signaturesBuilder_ == null) { - if (!other.signatures_.isEmpty()) { - if (signatures_.isEmpty()) { - signatures_ = other.signatures_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureSignaturesIsMutable(); - signatures_.addAll(other.signatures_); - } - onChanged(); - } - } else { - if (!other.signatures_.isEmpty()) { - if (signaturesBuilder_.isEmpty()) { - signaturesBuilder_.dispose(); - signaturesBuilder_ = null; - signatures_ = other.signatures_; - bitField0_ = (bitField0_ & ~0x00000004); - signaturesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSignaturesFieldBuilder() : null; - } else { - signaturesBuilder_.addAllMessages(other.signatures_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - payload_ = input.readBytes(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - payloadType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - io.grafeas.v1.EnvelopeSignature m = - input.readMessage( - io.grafeas.v1.EnvelopeSignature.parser(), - extensionRegistry); - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.add(m); - } else { - signaturesBuilder_.addMessage(m); - } - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes payload = 1; - * @return The payload. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPayload() { - return payload_; - } - /** - * bytes payload = 1; - * @param value The payload to set. - * @return This builder for chaining. - */ - public Builder setPayload(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - payload_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes payload = 1; - * @return This builder for chaining. - */ - public Builder clearPayload() { - bitField0_ = (bitField0_ & ~0x00000001); - payload_ = getDefaultInstance().getPayload(); - onChanged(); - return this; - } - - private java.lang.Object payloadType_ = ""; - /** - * string payload_type = 2; - * @return The payloadType. - */ - public java.lang.String getPayloadType() { - java.lang.Object ref = payloadType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - payloadType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string payload_type = 2; - * @return The bytes for payloadType. - */ - public com.google.protobuf.ByteString - getPayloadTypeBytes() { - java.lang.Object ref = payloadType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - payloadType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string payload_type = 2; - * @param value The payloadType to set. - * @return This builder for chaining. - */ - public Builder setPayloadType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - payloadType_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string payload_type = 2; - * @return This builder for chaining. - */ - public Builder clearPayloadType() { - payloadType_ = getDefaultInstance().getPayloadType(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string payload_type = 2; - * @param value The bytes for payloadType to set. - * @return This builder for chaining. - */ - public Builder setPayloadTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - payloadType_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.util.List signatures_ = - java.util.Collections.emptyList(); - private void ensureSignaturesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - signatures_ = new java.util.ArrayList(signatures_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.EnvelopeSignature, io.grafeas.v1.EnvelopeSignature.Builder, io.grafeas.v1.EnvelopeSignatureOrBuilder> signaturesBuilder_; - - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public java.util.List getSignaturesList() { - if (signaturesBuilder_ == null) { - return java.util.Collections.unmodifiableList(signatures_); - } else { - return signaturesBuilder_.getMessageList(); - } - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public int getSignaturesCount() { - if (signaturesBuilder_ == null) { - return signatures_.size(); - } else { - return signaturesBuilder_.getCount(); - } - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public io.grafeas.v1.EnvelopeSignature getSignatures(int index) { - if (signaturesBuilder_ == null) { - return signatures_.get(index); - } else { - return signaturesBuilder_.getMessage(index); - } - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder setSignatures( - int index, io.grafeas.v1.EnvelopeSignature value) { - if (signaturesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignaturesIsMutable(); - signatures_.set(index, value); - onChanged(); - } else { - signaturesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder setSignatures( - int index, io.grafeas.v1.EnvelopeSignature.Builder builderForValue) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.set(index, builderForValue.build()); - onChanged(); - } else { - signaturesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder addSignatures(io.grafeas.v1.EnvelopeSignature value) { - if (signaturesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignaturesIsMutable(); - signatures_.add(value); - onChanged(); - } else { - signaturesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder addSignatures( - int index, io.grafeas.v1.EnvelopeSignature value) { - if (signaturesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignaturesIsMutable(); - signatures_.add(index, value); - onChanged(); - } else { - signaturesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder addSignatures( - io.grafeas.v1.EnvelopeSignature.Builder builderForValue) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.add(builderForValue.build()); - onChanged(); - } else { - signaturesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder addSignatures( - int index, io.grafeas.v1.EnvelopeSignature.Builder builderForValue) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.add(index, builderForValue.build()); - onChanged(); - } else { - signaturesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder addAllSignatures( - java.lang.Iterable values) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, signatures_); - onChanged(); - } else { - signaturesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder clearSignatures() { - if (signaturesBuilder_ == null) { - signatures_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - signaturesBuilder_.clear(); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder removeSignatures(int index) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.remove(index); - onChanged(); - } else { - signaturesBuilder_.remove(index); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public io.grafeas.v1.EnvelopeSignature.Builder getSignaturesBuilder( - int index) { - return getSignaturesFieldBuilder().getBuilder(index); - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public io.grafeas.v1.EnvelopeSignatureOrBuilder getSignaturesOrBuilder( - int index) { - if (signaturesBuilder_ == null) { - return signatures_.get(index); } else { - return signaturesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public java.util.List - getSignaturesOrBuilderList() { - if (signaturesBuilder_ != null) { - return signaturesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(signatures_); - } - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public io.grafeas.v1.EnvelopeSignature.Builder addSignaturesBuilder() { - return getSignaturesFieldBuilder().addBuilder( - io.grafeas.v1.EnvelopeSignature.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public io.grafeas.v1.EnvelopeSignature.Builder addSignaturesBuilder( - int index) { - return getSignaturesFieldBuilder().addBuilder( - index, io.grafeas.v1.EnvelopeSignature.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public java.util.List - getSignaturesBuilderList() { - return getSignaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.EnvelopeSignature, io.grafeas.v1.EnvelopeSignature.Builder, io.grafeas.v1.EnvelopeSignatureOrBuilder> - getSignaturesFieldBuilder() { - if (signaturesBuilder_ == null) { - signaturesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.EnvelopeSignature, io.grafeas.v1.EnvelopeSignature.Builder, io.grafeas.v1.EnvelopeSignatureOrBuilder>( - signatures_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - signatures_ = null; - } - return signaturesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Envelope) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Envelope) - private static final io.grafeas.v1.Envelope DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Envelope(); - } - - public static io.grafeas.v1.Envelope getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Envelope parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Envelope getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java deleted file mode 100644 index 836bb5b989d0..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public interface EnvelopeOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Envelope) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes payload = 1; - * @return The payload. - */ - com.google.protobuf.ByteString getPayload(); - - /** - * string payload_type = 2; - * @return The payloadType. - */ - java.lang.String getPayloadType(); - /** - * string payload_type = 2; - * @return The bytes for payloadType. - */ - com.google.protobuf.ByteString - getPayloadTypeBytes(); - - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - java.util.List - getSignaturesList(); - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - io.grafeas.v1.EnvelopeSignature getSignatures(int index); - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - int getSignaturesCount(); - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - java.util.List - getSignaturesOrBuilderList(); - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - io.grafeas.v1.EnvelopeSignatureOrBuilder getSignaturesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java deleted file mode 100644 index d3bec7230117..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java +++ /dev/null @@ -1,611 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.EnvelopeSignature} - */ -public final class EnvelopeSignature extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.EnvelopeSignature) - EnvelopeSignatureOrBuilder { -private static final long serialVersionUID = 0L; - // Use EnvelopeSignature.newBuilder() to construct. - private EnvelopeSignature(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EnvelopeSignature() { - sig_ = com.google.protobuf.ByteString.EMPTY; - keyid_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EnvelopeSignature(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.EnvelopeSignature.class, io.grafeas.v1.EnvelopeSignature.Builder.class); - } - - public static final int SIG_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString sig_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes sig = 1; - * @return The sig. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSig() { - return sig_; - } - - public static final int KEYID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object keyid_ = ""; - /** - * string keyid = 2; - * @return The keyid. - */ - @java.lang.Override - public java.lang.String getKeyid() { - java.lang.Object ref = keyid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keyid_ = s; - return s; - } - } - /** - * string keyid = 2; - * @return The bytes for keyid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getKeyidBytes() { - java.lang.Object ref = keyid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - keyid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!sig_.isEmpty()) { - output.writeBytes(1, sig_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keyid_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!sig_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, sig_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, keyid_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.EnvelopeSignature)) { - return super.equals(obj); - } - io.grafeas.v1.EnvelopeSignature other = (io.grafeas.v1.EnvelopeSignature) obj; - - if (!getSig() - .equals(other.getSig())) return false; - if (!getKeyid() - .equals(other.getKeyid())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SIG_FIELD_NUMBER; - hash = (53 * hash) + getSig().hashCode(); - hash = (37 * hash) + KEYID_FIELD_NUMBER; - hash = (53 * hash) + getKeyid().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.EnvelopeSignature parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.EnvelopeSignature parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.EnvelopeSignature parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.EnvelopeSignature prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.EnvelopeSignature} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.EnvelopeSignature) - io.grafeas.v1.EnvelopeSignatureOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.EnvelopeSignature.class, io.grafeas.v1.EnvelopeSignature.Builder.class); - } - - // Construct using io.grafeas.v1.EnvelopeSignature.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - sig_ = com.google.protobuf.ByteString.EMPTY; - keyid_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.EnvelopeSignature getDefaultInstanceForType() { - return io.grafeas.v1.EnvelopeSignature.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.EnvelopeSignature build() { - io.grafeas.v1.EnvelopeSignature result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.EnvelopeSignature buildPartial() { - io.grafeas.v1.EnvelopeSignature result = new io.grafeas.v1.EnvelopeSignature(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.EnvelopeSignature result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.sig_ = sig_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.keyid_ = keyid_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.EnvelopeSignature) { - return mergeFrom((io.grafeas.v1.EnvelopeSignature)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.EnvelopeSignature other) { - if (other == io.grafeas.v1.EnvelopeSignature.getDefaultInstance()) return this; - if (other.getSig() != com.google.protobuf.ByteString.EMPTY) { - setSig(other.getSig()); - } - if (!other.getKeyid().isEmpty()) { - keyid_ = other.keyid_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - sig_ = input.readBytes(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - keyid_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.ByteString sig_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes sig = 1; - * @return The sig. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSig() { - return sig_; - } - /** - * bytes sig = 1; - * @param value The sig to set. - * @return This builder for chaining. - */ - public Builder setSig(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - sig_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes sig = 1; - * @return This builder for chaining. - */ - public Builder clearSig() { - bitField0_ = (bitField0_ & ~0x00000001); - sig_ = getDefaultInstance().getSig(); - onChanged(); - return this; - } - - private java.lang.Object keyid_ = ""; - /** - * string keyid = 2; - * @return The keyid. - */ - public java.lang.String getKeyid() { - java.lang.Object ref = keyid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keyid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string keyid = 2; - * @return The bytes for keyid. - */ - public com.google.protobuf.ByteString - getKeyidBytes() { - java.lang.Object ref = keyid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - keyid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string keyid = 2; - * @param value The keyid to set. - * @return This builder for chaining. - */ - public Builder setKeyid( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - keyid_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string keyid = 2; - * @return This builder for chaining. - */ - public Builder clearKeyid() { - keyid_ = getDefaultInstance().getKeyid(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string keyid = 2; - * @param value The bytes for keyid to set. - * @return This builder for chaining. - */ - public Builder setKeyidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - keyid_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.EnvelopeSignature) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.EnvelopeSignature) - private static final io.grafeas.v1.EnvelopeSignature DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.EnvelopeSignature(); - } - - public static io.grafeas.v1.EnvelopeSignature getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnvelopeSignature parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.EnvelopeSignature getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java deleted file mode 100644 index 13a73d048cf2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public interface EnvelopeSignatureOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.EnvelopeSignature) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes sig = 1; - * @return The sig. - */ - com.google.protobuf.ByteString getSig(); - - /** - * string keyid = 2; - * @return The keyid. - */ - java.lang.String getKeyid(); - /** - * string keyid = 2; - * @return The bytes for keyid. - */ - com.google.protobuf.ByteString - getKeyidBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java deleted file mode 100644 index 95a37b40792a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java +++ /dev/null @@ -1,864 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * Container message for hashes of byte content of files, used in source
- * messages to verify integrity of source input to the build.
- * 
- * - * Protobuf type {@code grafeas.v1.FileHashes} - */ -public final class FileHashes extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.FileHashes) - FileHashesOrBuilder { -private static final long serialVersionUID = 0L; - // Use FileHashes.newBuilder() to construct. - private FileHashes(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FileHashes() { - fileHash_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FileHashes(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.FileHashes.class, io.grafeas.v1.FileHashes.Builder.class); - } - - public static final int FILE_HASH_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List fileHash_; - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - @java.lang.Override - public java.util.List getFileHashList() { - return fileHash_; - } - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - @java.lang.Override - public java.util.List - getFileHashOrBuilderList() { - return fileHash_; - } - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - @java.lang.Override - public int getFileHashCount() { - return fileHash_.size(); - } - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - @java.lang.Override - public io.grafeas.v1.Hash getFileHash(int index) { - return fileHash_.get(index); - } - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - @java.lang.Override - public io.grafeas.v1.HashOrBuilder getFileHashOrBuilder( - int index) { - return fileHash_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < fileHash_.size(); i++) { - output.writeMessage(1, fileHash_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < fileHash_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, fileHash_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.FileHashes)) { - return super.equals(obj); - } - io.grafeas.v1.FileHashes other = (io.grafeas.v1.FileHashes) obj; - - if (!getFileHashList() - .equals(other.getFileHashList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFileHashCount() > 0) { - hash = (37 * hash) + FILE_HASH_FIELD_NUMBER; - hash = (53 * hash) + getFileHashList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.FileHashes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.FileHashes parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.FileHashes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.FileHashes parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.FileHashes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.FileHashes parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.FileHashes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.FileHashes parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.FileHashes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.FileHashes parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.FileHashes parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.FileHashes parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.FileHashes prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Container message for hashes of byte content of files, used in source
-   * messages to verify integrity of source input to the build.
-   * 
- * - * Protobuf type {@code grafeas.v1.FileHashes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.FileHashes) - io.grafeas.v1.FileHashesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.FileHashes.class, io.grafeas.v1.FileHashes.Builder.class); - } - - // Construct using io.grafeas.v1.FileHashes.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (fileHashBuilder_ == null) { - fileHash_ = java.util.Collections.emptyList(); - } else { - fileHash_ = null; - fileHashBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.FileHashes getDefaultInstanceForType() { - return io.grafeas.v1.FileHashes.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.FileHashes build() { - io.grafeas.v1.FileHashes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.FileHashes buildPartial() { - io.grafeas.v1.FileHashes result = new io.grafeas.v1.FileHashes(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.FileHashes result) { - if (fileHashBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fileHash_ = java.util.Collections.unmodifiableList(fileHash_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fileHash_ = fileHash_; - } else { - result.fileHash_ = fileHashBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.FileHashes result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.FileHashes) { - return mergeFrom((io.grafeas.v1.FileHashes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.FileHashes other) { - if (other == io.grafeas.v1.FileHashes.getDefaultInstance()) return this; - if (fileHashBuilder_ == null) { - if (!other.fileHash_.isEmpty()) { - if (fileHash_.isEmpty()) { - fileHash_ = other.fileHash_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFileHashIsMutable(); - fileHash_.addAll(other.fileHash_); - } - onChanged(); - } - } else { - if (!other.fileHash_.isEmpty()) { - if (fileHashBuilder_.isEmpty()) { - fileHashBuilder_.dispose(); - fileHashBuilder_ = null; - fileHash_ = other.fileHash_; - bitField0_ = (bitField0_ & ~0x00000001); - fileHashBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFileHashFieldBuilder() : null; - } else { - fileHashBuilder_.addAllMessages(other.fileHash_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.grafeas.v1.Hash m = - input.readMessage( - io.grafeas.v1.Hash.parser(), - extensionRegistry); - if (fileHashBuilder_ == null) { - ensureFileHashIsMutable(); - fileHash_.add(m); - } else { - fileHashBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List fileHash_ = - java.util.Collections.emptyList(); - private void ensureFileHashIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fileHash_ = new java.util.ArrayList(fileHash_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Hash, io.grafeas.v1.Hash.Builder, io.grafeas.v1.HashOrBuilder> fileHashBuilder_; - - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public java.util.List getFileHashList() { - if (fileHashBuilder_ == null) { - return java.util.Collections.unmodifiableList(fileHash_); - } else { - return fileHashBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public int getFileHashCount() { - if (fileHashBuilder_ == null) { - return fileHash_.size(); - } else { - return fileHashBuilder_.getCount(); - } - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public io.grafeas.v1.Hash getFileHash(int index) { - if (fileHashBuilder_ == null) { - return fileHash_.get(index); - } else { - return fileHashBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder setFileHash( - int index, io.grafeas.v1.Hash value) { - if (fileHashBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileHashIsMutable(); - fileHash_.set(index, value); - onChanged(); - } else { - fileHashBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder setFileHash( - int index, io.grafeas.v1.Hash.Builder builderForValue) { - if (fileHashBuilder_ == null) { - ensureFileHashIsMutable(); - fileHash_.set(index, builderForValue.build()); - onChanged(); - } else { - fileHashBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder addFileHash(io.grafeas.v1.Hash value) { - if (fileHashBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileHashIsMutable(); - fileHash_.add(value); - onChanged(); - } else { - fileHashBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder addFileHash( - int index, io.grafeas.v1.Hash value) { - if (fileHashBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileHashIsMutable(); - fileHash_.add(index, value); - onChanged(); - } else { - fileHashBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder addFileHash( - io.grafeas.v1.Hash.Builder builderForValue) { - if (fileHashBuilder_ == null) { - ensureFileHashIsMutable(); - fileHash_.add(builderForValue.build()); - onChanged(); - } else { - fileHashBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder addFileHash( - int index, io.grafeas.v1.Hash.Builder builderForValue) { - if (fileHashBuilder_ == null) { - ensureFileHashIsMutable(); - fileHash_.add(index, builderForValue.build()); - onChanged(); - } else { - fileHashBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder addAllFileHash( - java.lang.Iterable values) { - if (fileHashBuilder_ == null) { - ensureFileHashIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fileHash_); - onChanged(); - } else { - fileHashBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder clearFileHash() { - if (fileHashBuilder_ == null) { - fileHash_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fileHashBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder removeFileHash(int index) { - if (fileHashBuilder_ == null) { - ensureFileHashIsMutable(); - fileHash_.remove(index); - onChanged(); - } else { - fileHashBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public io.grafeas.v1.Hash.Builder getFileHashBuilder( - int index) { - return getFileHashFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public io.grafeas.v1.HashOrBuilder getFileHashOrBuilder( - int index) { - if (fileHashBuilder_ == null) { - return fileHash_.get(index); } else { - return fileHashBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public java.util.List - getFileHashOrBuilderList() { - if (fileHashBuilder_ != null) { - return fileHashBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fileHash_); - } - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public io.grafeas.v1.Hash.Builder addFileHashBuilder() { - return getFileHashFieldBuilder().addBuilder( - io.grafeas.v1.Hash.getDefaultInstance()); - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public io.grafeas.v1.Hash.Builder addFileHashBuilder( - int index) { - return getFileHashFieldBuilder().addBuilder( - index, io.grafeas.v1.Hash.getDefaultInstance()); - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public java.util.List - getFileHashBuilderList() { - return getFileHashFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Hash, io.grafeas.v1.Hash.Builder, io.grafeas.v1.HashOrBuilder> - getFileHashFieldBuilder() { - if (fileHashBuilder_ == null) { - fileHashBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Hash, io.grafeas.v1.Hash.Builder, io.grafeas.v1.HashOrBuilder>( - fileHash_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - fileHash_ = null; - } - return fileHashBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.FileHashes) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.FileHashes) - private static final io.grafeas.v1.FileHashes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.FileHashes(); - } - - public static io.grafeas.v1.FileHashes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FileHashes parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.FileHashes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java deleted file mode 100644 index fd271d4029ff..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface FileHashesOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.FileHashes) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - java.util.List - getFileHashList(); - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - io.grafeas.v1.Hash getFileHash(int index); - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - int getFileHashCount(); - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - java.util.List - getFileHashOrBuilderList(); - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - io.grafeas.v1.HashOrBuilder getFileHashOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java deleted file mode 100644 index 6d2ecff765e6..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java +++ /dev/null @@ -1,587 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - *
- * Indicates the location at which a package was found.
- * 
- * - * Protobuf type {@code grafeas.v1.FileLocation} - */ -public final class FileLocation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.FileLocation) - FileLocationOrBuilder { -private static final long serialVersionUID = 0L; - // Use FileLocation.newBuilder() to construct. - private FileLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FileLocation() { - filePath_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FileLocation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.FileLocation.class, io.grafeas.v1.FileLocation.Builder.class); - } - - public static final int FILE_PATH_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object filePath_ = ""; - /** - *
-   * For jars that are contained inside .war files, this filepath
-   * can indicate the path to war file combined with the path to jar file.
-   * 
- * - * string file_path = 1; - * @return The filePath. - */ - @java.lang.Override - public java.lang.String getFilePath() { - java.lang.Object ref = filePath_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filePath_ = s; - return s; - } - } - /** - *
-   * For jars that are contained inside .war files, this filepath
-   * can indicate the path to war file combined with the path to jar file.
-   * 
- * - * string file_path = 1; - * @return The bytes for filePath. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilePathBytes() { - java.lang.Object ref = filePath_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filePath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filePath_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filePath_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.FileLocation)) { - return super.equals(obj); - } - io.grafeas.v1.FileLocation other = (io.grafeas.v1.FileLocation) obj; - - if (!getFilePath() - .equals(other.getFilePath())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FILE_PATH_FIELD_NUMBER; - hash = (53 * hash) + getFilePath().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.FileLocation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.FileLocation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.FileLocation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.FileLocation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.FileLocation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.FileLocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.FileLocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.FileLocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.FileLocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.FileLocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.FileLocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.FileLocation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.FileLocation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Indicates the location at which a package was found.
-   * 
- * - * Protobuf type {@code grafeas.v1.FileLocation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.FileLocation) - io.grafeas.v1.FileLocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.FileLocation.class, io.grafeas.v1.FileLocation.Builder.class); - } - - // Construct using io.grafeas.v1.FileLocation.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - filePath_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.FileLocation getDefaultInstanceForType() { - return io.grafeas.v1.FileLocation.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.FileLocation build() { - io.grafeas.v1.FileLocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.FileLocation buildPartial() { - io.grafeas.v1.FileLocation result = new io.grafeas.v1.FileLocation(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.FileLocation result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.filePath_ = filePath_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.FileLocation) { - return mergeFrom((io.grafeas.v1.FileLocation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.FileLocation other) { - if (other == io.grafeas.v1.FileLocation.getDefaultInstance()) return this; - if (!other.getFilePath().isEmpty()) { - filePath_ = other.filePath_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - filePath_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object filePath_ = ""; - /** - *
-     * For jars that are contained inside .war files, this filepath
-     * can indicate the path to war file combined with the path to jar file.
-     * 
- * - * string file_path = 1; - * @return The filePath. - */ - public java.lang.String getFilePath() { - java.lang.Object ref = filePath_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filePath_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * For jars that are contained inside .war files, this filepath
-     * can indicate the path to war file combined with the path to jar file.
-     * 
- * - * string file_path = 1; - * @return The bytes for filePath. - */ - public com.google.protobuf.ByteString - getFilePathBytes() { - java.lang.Object ref = filePath_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filePath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * For jars that are contained inside .war files, this filepath
-     * can indicate the path to war file combined with the path to jar file.
-     * 
- * - * string file_path = 1; - * @param value The filePath to set. - * @return This builder for chaining. - */ - public Builder setFilePath( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - filePath_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * For jars that are contained inside .war files, this filepath
-     * can indicate the path to war file combined with the path to jar file.
-     * 
- * - * string file_path = 1; - * @return This builder for chaining. - */ - public Builder clearFilePath() { - filePath_ = getDefaultInstance().getFilePath(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * For jars that are contained inside .war files, this filepath
-     * can indicate the path to war file combined with the path to jar file.
-     * 
- * - * string file_path = 1; - * @param value The bytes for filePath to set. - * @return This builder for chaining. - */ - public Builder setFilePathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - filePath_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.FileLocation) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.FileLocation) - private static final io.grafeas.v1.FileLocation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.FileLocation(); - } - - public static io.grafeas.v1.FileLocation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FileLocation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.FileLocation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java deleted file mode 100644 index 7869d5e04677..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public interface FileLocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.FileLocation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * For jars that are contained inside .war files, this filepath
-   * can indicate the path to war file combined with the path to jar file.
-   * 
- * - * string file_path = 1; - * @return The filePath. - */ - java.lang.String getFilePath(); - /** - *
-   * For jars that are contained inside .war files, this filepath
-   * can indicate the path to war file combined with the path to jar file.
-   * 
- * - * string file_path = 1; - * @return The bytes for filePath. - */ - com.google.protobuf.ByteString - getFilePathBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java deleted file mode 100644 index ce9a56433288..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java +++ /dev/null @@ -1,1009 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -/** - *
- * A set of properties that uniquely identify a given Docker image.
- * 
- * - * Protobuf type {@code grafeas.v1.Fingerprint} - */ -public final class Fingerprint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Fingerprint) - FingerprintOrBuilder { -private static final long serialVersionUID = 0L; - // Use Fingerprint.newBuilder() to construct. - private Fingerprint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Fingerprint() { - v1Name_ = ""; - v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; - v2Name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Fingerprint(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Fingerprint.class, io.grafeas.v1.Fingerprint.Builder.class); - } - - public static final int V1_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object v1Name_ = ""; - /** - *
-   * Required. The layer ID of the final layer in the Docker image's v1
-   * representation.
-   * 
- * - * string v1_name = 1; - * @return The v1Name. - */ - @java.lang.Override - public java.lang.String getV1Name() { - java.lang.Object ref = v1Name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - v1Name_ = s; - return s; - } - } - /** - *
-   * Required. The layer ID of the final layer in the Docker image's v1
-   * representation.
-   * 
- * - * string v1_name = 1; - * @return The bytes for v1Name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getV1NameBytes() { - java.lang.Object ref = v1Name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - v1Name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int V2_BLOB_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList v2Blob_; - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @return A list containing the v2Blob. - */ - public com.google.protobuf.ProtocolStringList - getV2BlobList() { - return v2Blob_; - } - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @return The count of v2Blob. - */ - public int getV2BlobCount() { - return v2Blob_.size(); - } - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @param index The index of the element to return. - * @return The v2Blob at the given index. - */ - public java.lang.String getV2Blob(int index) { - return v2Blob_.get(index); - } - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @param index The index of the value to return. - * @return The bytes of the v2Blob at the given index. - */ - public com.google.protobuf.ByteString - getV2BlobBytes(int index) { - return v2Blob_.getByteString(index); - } - - public static final int V2_NAME_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object v2Name_ = ""; - /** - *
-   * Output only. The name of the image's v2 blobs computed via:
-   *   [bottom] := v2_blob[bottom]
-   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-   * Only the name of the final blob is kept.
-   * 
- * - * string v2_name = 3; - * @return The v2Name. - */ - @java.lang.Override - public java.lang.String getV2Name() { - java.lang.Object ref = v2Name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - v2Name_ = s; - return s; - } - } - /** - *
-   * Output only. The name of the image's v2 blobs computed via:
-   *   [bottom] := v2_blob[bottom]
-   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-   * Only the name of the final blob is kept.
-   * 
- * - * string v2_name = 3; - * @return The bytes for v2Name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getV2NameBytes() { - java.lang.Object ref = v2Name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - v2Name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v1Name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, v1Name_); - } - for (int i = 0; i < v2Blob_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, v2Blob_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v2Name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, v2Name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v1Name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, v1Name_); - } - { - int dataSize = 0; - for (int i = 0; i < v2Blob_.size(); i++) { - dataSize += computeStringSizeNoTag(v2Blob_.getRaw(i)); - } - size += dataSize; - size += 1 * getV2BlobList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v2Name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, v2Name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Fingerprint)) { - return super.equals(obj); - } - io.grafeas.v1.Fingerprint other = (io.grafeas.v1.Fingerprint) obj; - - if (!getV1Name() - .equals(other.getV1Name())) return false; - if (!getV2BlobList() - .equals(other.getV2BlobList())) return false; - if (!getV2Name() - .equals(other.getV2Name())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + V1_NAME_FIELD_NUMBER; - hash = (53 * hash) + getV1Name().hashCode(); - if (getV2BlobCount() > 0) { - hash = (37 * hash) + V2_BLOB_FIELD_NUMBER; - hash = (53 * hash) + getV2BlobList().hashCode(); - } - hash = (37 * hash) + V2_NAME_FIELD_NUMBER; - hash = (53 * hash) + getV2Name().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Fingerprint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Fingerprint parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Fingerprint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Fingerprint parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Fingerprint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Fingerprint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Fingerprint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Fingerprint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Fingerprint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Fingerprint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Fingerprint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Fingerprint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Fingerprint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A set of properties that uniquely identify a given Docker image.
-   * 
- * - * Protobuf type {@code grafeas.v1.Fingerprint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Fingerprint) - io.grafeas.v1.FingerprintOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Fingerprint.class, io.grafeas.v1.Fingerprint.Builder.class); - } - - // Construct using io.grafeas.v1.Fingerprint.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - v1Name_ = ""; - v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - v2Name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Fingerprint getDefaultInstanceForType() { - return io.grafeas.v1.Fingerprint.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Fingerprint build() { - io.grafeas.v1.Fingerprint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Fingerprint buildPartial() { - io.grafeas.v1.Fingerprint result = new io.grafeas.v1.Fingerprint(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.Fingerprint result) { - if (((bitField0_ & 0x00000002) != 0)) { - v2Blob_ = v2Blob_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.v2Blob_ = v2Blob_; - } - - private void buildPartial0(io.grafeas.v1.Fingerprint result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.v1Name_ = v1Name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.v2Name_ = v2Name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Fingerprint) { - return mergeFrom((io.grafeas.v1.Fingerprint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Fingerprint other) { - if (other == io.grafeas.v1.Fingerprint.getDefaultInstance()) return this; - if (!other.getV1Name().isEmpty()) { - v1Name_ = other.v1Name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.v2Blob_.isEmpty()) { - if (v2Blob_.isEmpty()) { - v2Blob_ = other.v2Blob_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureV2BlobIsMutable(); - v2Blob_.addAll(other.v2Blob_); - } - onChanged(); - } - if (!other.getV2Name().isEmpty()) { - v2Name_ = other.v2Name_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - v1Name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - ensureV2BlobIsMutable(); - v2Blob_.add(s); - break; - } // case 18 - case 26: { - v2Name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object v1Name_ = ""; - /** - *
-     * Required. The layer ID of the final layer in the Docker image's v1
-     * representation.
-     * 
- * - * string v1_name = 1; - * @return The v1Name. - */ - public java.lang.String getV1Name() { - java.lang.Object ref = v1Name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - v1Name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The layer ID of the final layer in the Docker image's v1
-     * representation.
-     * 
- * - * string v1_name = 1; - * @return The bytes for v1Name. - */ - public com.google.protobuf.ByteString - getV1NameBytes() { - java.lang.Object ref = v1Name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - v1Name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The layer ID of the final layer in the Docker image's v1
-     * representation.
-     * 
- * - * string v1_name = 1; - * @param value The v1Name to set. - * @return This builder for chaining. - */ - public Builder setV1Name( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - v1Name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. The layer ID of the final layer in the Docker image's v1
-     * representation.
-     * 
- * - * string v1_name = 1; - * @return This builder for chaining. - */ - public Builder clearV1Name() { - v1Name_ = getDefaultInstance().getV1Name(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. The layer ID of the final layer in the Docker image's v1
-     * representation.
-     * 
- * - * string v1_name = 1; - * @param value The bytes for v1Name to set. - * @return This builder for chaining. - */ - public Builder setV1NameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - v1Name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureV2BlobIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - v2Blob_ = new com.google.protobuf.LazyStringArrayList(v2Blob_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @return A list containing the v2Blob. - */ - public com.google.protobuf.ProtocolStringList - getV2BlobList() { - return v2Blob_.getUnmodifiableView(); - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @return The count of v2Blob. - */ - public int getV2BlobCount() { - return v2Blob_.size(); - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @param index The index of the element to return. - * @return The v2Blob at the given index. - */ - public java.lang.String getV2Blob(int index) { - return v2Blob_.get(index); - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @param index The index of the value to return. - * @return The bytes of the v2Blob at the given index. - */ - public com.google.protobuf.ByteString - getV2BlobBytes(int index) { - return v2Blob_.getByteString(index); - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @param index The index to set the value at. - * @param value The v2Blob to set. - * @return This builder for chaining. - */ - public Builder setV2Blob( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureV2BlobIsMutable(); - v2Blob_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @param value The v2Blob to add. - * @return This builder for chaining. - */ - public Builder addV2Blob( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureV2BlobIsMutable(); - v2Blob_.add(value); - onChanged(); - return this; - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @param values The v2Blob to add. - * @return This builder for chaining. - */ - public Builder addAllV2Blob( - java.lang.Iterable values) { - ensureV2BlobIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, v2Blob_); - onChanged(); - return this; - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @return This builder for chaining. - */ - public Builder clearV2Blob() { - v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @param value The bytes of the v2Blob to add. - * @return This builder for chaining. - */ - public Builder addV2BlobBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureV2BlobIsMutable(); - v2Blob_.add(value); - onChanged(); - return this; - } - - private java.lang.Object v2Name_ = ""; - /** - *
-     * Output only. The name of the image's v2 blobs computed via:
-     *   [bottom] := v2_blob[bottom]
-     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-     * Only the name of the final blob is kept.
-     * 
- * - * string v2_name = 3; - * @return The v2Name. - */ - public java.lang.String getV2Name() { - java.lang.Object ref = v2Name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - v2Name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. The name of the image's v2 blobs computed via:
-     *   [bottom] := v2_blob[bottom]
-     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-     * Only the name of the final blob is kept.
-     * 
- * - * string v2_name = 3; - * @return The bytes for v2Name. - */ - public com.google.protobuf.ByteString - getV2NameBytes() { - java.lang.Object ref = v2Name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - v2Name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. The name of the image's v2 blobs computed via:
-     *   [bottom] := v2_blob[bottom]
-     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-     * Only the name of the final blob is kept.
-     * 
- * - * string v2_name = 3; - * @param value The v2Name to set. - * @return This builder for chaining. - */ - public Builder setV2Name( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - v2Name_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Output only. The name of the image's v2 blobs computed via:
-     *   [bottom] := v2_blob[bottom]
-     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-     * Only the name of the final blob is kept.
-     * 
- * - * string v2_name = 3; - * @return This builder for chaining. - */ - public Builder clearV2Name() { - v2Name_ = getDefaultInstance().getV2Name(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * Output only. The name of the image's v2 blobs computed via:
-     *   [bottom] := v2_blob[bottom]
-     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-     * Only the name of the final blob is kept.
-     * 
- * - * string v2_name = 3; - * @param value The bytes for v2Name to set. - * @return This builder for chaining. - */ - public Builder setV2NameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - v2Name_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Fingerprint) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Fingerprint) - private static final io.grafeas.v1.Fingerprint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Fingerprint(); - } - - public static io.grafeas.v1.Fingerprint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fingerprint parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Fingerprint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java deleted file mode 100644 index ca06107712b3..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java +++ /dev/null @@ -1,98 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -public interface FingerprintOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Fingerprint) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The layer ID of the final layer in the Docker image's v1
-   * representation.
-   * 
- * - * string v1_name = 1; - * @return The v1Name. - */ - java.lang.String getV1Name(); - /** - *
-   * Required. The layer ID of the final layer in the Docker image's v1
-   * representation.
-   * 
- * - * string v1_name = 1; - * @return The bytes for v1Name. - */ - com.google.protobuf.ByteString - getV1NameBytes(); - - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @return A list containing the v2Blob. - */ - java.util.List - getV2BlobList(); - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @return The count of v2Blob. - */ - int getV2BlobCount(); - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @param index The index of the element to return. - * @return The v2Blob at the given index. - */ - java.lang.String getV2Blob(int index); - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @param index The index of the value to return. - * @return The bytes of the v2Blob at the given index. - */ - com.google.protobuf.ByteString - getV2BlobBytes(int index); - - /** - *
-   * Output only. The name of the image's v2 blobs computed via:
-   *   [bottom] := v2_blob[bottom]
-   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-   * Only the name of the final blob is kept.
-   * 
- * - * string v2_name = 3; - * @return The v2Name. - */ - java.lang.String getV2Name(); - /** - *
-   * Output only. The name of the image's v2 blobs computed via:
-   *   [bottom] := v2_blob[bottom]
-   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-   * Only the name of the final blob is kept.
-   * 
- * - * string v2_name = 3; - * @return The bytes for v2Name. - */ - com.google.protobuf.ByteString - getV2NameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java deleted file mode 100644 index 5e61686f515f..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java +++ /dev/null @@ -1,1297 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * A SourceContext referring to a Gerrit project.
- * 
- * - * Protobuf type {@code grafeas.v1.GerritSourceContext} - */ -public final class GerritSourceContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.GerritSourceContext) - GerritSourceContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use GerritSourceContext.newBuilder() to construct. - private GerritSourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GerritSourceContext() { - hostUri_ = ""; - gerritProject_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GerritSourceContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GerritSourceContext.class, io.grafeas.v1.GerritSourceContext.Builder.class); - } - - private int revisionCase_ = 0; - private java.lang.Object revision_; - public enum RevisionCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - REVISION_ID(3), - ALIAS_CONTEXT(4), - REVISION_NOT_SET(0); - private final int value; - private RevisionCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static RevisionCase valueOf(int value) { - return forNumber(value); - } - - public static RevisionCase forNumber(int value) { - switch (value) { - case 3: return REVISION_ID; - case 4: return ALIAS_CONTEXT; - case 0: return REVISION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public RevisionCase - getRevisionCase() { - return RevisionCase.forNumber( - revisionCase_); - } - - public static final int HOST_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object hostUri_ = ""; - /** - *
-   * The URI of a running Gerrit instance.
-   * 
- * - * string host_uri = 1; - * @return The hostUri. - */ - @java.lang.Override - public java.lang.String getHostUri() { - java.lang.Object ref = hostUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hostUri_ = s; - return s; - } - } - /** - *
-   * The URI of a running Gerrit instance.
-   * 
- * - * string host_uri = 1; - * @return The bytes for hostUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getHostUriBytes() { - java.lang.Object ref = hostUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hostUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int GERRIT_PROJECT_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object gerritProject_ = ""; - /** - *
-   * The full project name within the host. Projects may be nested, so
-   * "project/subproject" is a valid project name. The "repo name" is the
-   * hostURI/project.
-   * 
- * - * string gerrit_project = 2; - * @return The gerritProject. - */ - @java.lang.Override - public java.lang.String getGerritProject() { - java.lang.Object ref = gerritProject_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gerritProject_ = s; - return s; - } - } - /** - *
-   * The full project name within the host. Projects may be nested, so
-   * "project/subproject" is a valid project name. The "repo name" is the
-   * hostURI/project.
-   * 
- * - * string gerrit_project = 2; - * @return The bytes for gerritProject. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getGerritProjectBytes() { - java.lang.Object ref = gerritProject_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - gerritProject_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REVISION_ID_FIELD_NUMBER = 3; - /** - *
-   * A revision (commit) ID.
-   * 
- * - * string revision_id = 3; - * @return Whether the revisionId field is set. - */ - public boolean hasRevisionId() { - return revisionCase_ == 3; - } - /** - *
-   * A revision (commit) ID.
-   * 
- * - * string revision_id = 3; - * @return The revisionId. - */ - public java.lang.String getRevisionId() { - java.lang.Object ref = ""; - if (revisionCase_ == 3) { - ref = revision_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (revisionCase_ == 3) { - revision_ = s; - } - return s; - } - } - /** - *
-   * A revision (commit) ID.
-   * 
- * - * string revision_id = 3; - * @return The bytes for revisionId. - */ - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = ""; - if (revisionCase_ == 3) { - ref = revision_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (revisionCase_ == 3) { - revision_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ALIAS_CONTEXT_FIELD_NUMBER = 4; - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - * @return Whether the aliasContext field is set. - */ - @java.lang.Override - public boolean hasAliasContext() { - return revisionCase_ == 4; - } - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - * @return The aliasContext. - */ - @java.lang.Override - public io.grafeas.v1.AliasContext getAliasContext() { - if (revisionCase_ == 4) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - @java.lang.Override - public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { - if (revisionCase_ == 4) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hostUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gerritProject_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gerritProject_); - } - if (revisionCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, revision_); - } - if (revisionCase_ == 4) { - output.writeMessage(4, (io.grafeas.v1.AliasContext) revision_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hostUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gerritProject_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gerritProject_); - } - if (revisionCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, revision_); - } - if (revisionCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (io.grafeas.v1.AliasContext) revision_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.GerritSourceContext)) { - return super.equals(obj); - } - io.grafeas.v1.GerritSourceContext other = (io.grafeas.v1.GerritSourceContext) obj; - - if (!getHostUri() - .equals(other.getHostUri())) return false; - if (!getGerritProject() - .equals(other.getGerritProject())) return false; - if (!getRevisionCase().equals(other.getRevisionCase())) return false; - switch (revisionCase_) { - case 3: - if (!getRevisionId() - .equals(other.getRevisionId())) return false; - break; - case 4: - if (!getAliasContext() - .equals(other.getAliasContext())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HOST_URI_FIELD_NUMBER; - hash = (53 * hash) + getHostUri().hashCode(); - hash = (37 * hash) + GERRIT_PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getGerritProject().hashCode(); - switch (revisionCase_) { - case 3: - hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; - hash = (53 * hash) + getRevisionId().hashCode(); - break; - case 4: - hash = (37 * hash) + ALIAS_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getAliasContext().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.GerritSourceContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GerritSourceContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GerritSourceContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GerritSourceContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GerritSourceContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GerritSourceContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GerritSourceContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GerritSourceContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GerritSourceContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.GerritSourceContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GerritSourceContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GerritSourceContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.GerritSourceContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A SourceContext referring to a Gerrit project.
-   * 
- * - * Protobuf type {@code grafeas.v1.GerritSourceContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.GerritSourceContext) - io.grafeas.v1.GerritSourceContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GerritSourceContext.class, io.grafeas.v1.GerritSourceContext.Builder.class); - } - - // Construct using io.grafeas.v1.GerritSourceContext.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - hostUri_ = ""; - gerritProject_ = ""; - if (aliasContextBuilder_ != null) { - aliasContextBuilder_.clear(); - } - revisionCase_ = 0; - revision_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.GerritSourceContext getDefaultInstanceForType() { - return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.GerritSourceContext build() { - io.grafeas.v1.GerritSourceContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.GerritSourceContext buildPartial() { - io.grafeas.v1.GerritSourceContext result = new io.grafeas.v1.GerritSourceContext(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.GerritSourceContext result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.hostUri_ = hostUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.gerritProject_ = gerritProject_; - } - } - - private void buildPartialOneofs(io.grafeas.v1.GerritSourceContext result) { - result.revisionCase_ = revisionCase_; - result.revision_ = this.revision_; - if (revisionCase_ == 4 && - aliasContextBuilder_ != null) { - result.revision_ = aliasContextBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.GerritSourceContext) { - return mergeFrom((io.grafeas.v1.GerritSourceContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.GerritSourceContext other) { - if (other == io.grafeas.v1.GerritSourceContext.getDefaultInstance()) return this; - if (!other.getHostUri().isEmpty()) { - hostUri_ = other.hostUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getGerritProject().isEmpty()) { - gerritProject_ = other.gerritProject_; - bitField0_ |= 0x00000002; - onChanged(); - } - switch (other.getRevisionCase()) { - case REVISION_ID: { - revisionCase_ = 3; - revision_ = other.revision_; - onChanged(); - break; - } - case ALIAS_CONTEXT: { - mergeAliasContext(other.getAliasContext()); - break; - } - case REVISION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - hostUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - gerritProject_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - revisionCase_ = 3; - revision_ = s; - break; - } // case 26 - case 34: { - input.readMessage( - getAliasContextFieldBuilder().getBuilder(), - extensionRegistry); - revisionCase_ = 4; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int revisionCase_ = 0; - private java.lang.Object revision_; - public RevisionCase - getRevisionCase() { - return RevisionCase.forNumber( - revisionCase_); - } - - public Builder clearRevision() { - revisionCase_ = 0; - revision_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object hostUri_ = ""; - /** - *
-     * The URI of a running Gerrit instance.
-     * 
- * - * string host_uri = 1; - * @return The hostUri. - */ - public java.lang.String getHostUri() { - java.lang.Object ref = hostUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hostUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URI of a running Gerrit instance.
-     * 
- * - * string host_uri = 1; - * @return The bytes for hostUri. - */ - public com.google.protobuf.ByteString - getHostUriBytes() { - java.lang.Object ref = hostUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hostUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URI of a running Gerrit instance.
-     * 
- * - * string host_uri = 1; - * @param value The hostUri to set. - * @return This builder for chaining. - */ - public Builder setHostUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - hostUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The URI of a running Gerrit instance.
-     * 
- * - * string host_uri = 1; - * @return This builder for chaining. - */ - public Builder clearHostUri() { - hostUri_ = getDefaultInstance().getHostUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The URI of a running Gerrit instance.
-     * 
- * - * string host_uri = 1; - * @param value The bytes for hostUri to set. - * @return This builder for chaining. - */ - public Builder setHostUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - hostUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object gerritProject_ = ""; - /** - *
-     * The full project name within the host. Projects may be nested, so
-     * "project/subproject" is a valid project name. The "repo name" is the
-     * hostURI/project.
-     * 
- * - * string gerrit_project = 2; - * @return The gerritProject. - */ - public java.lang.String getGerritProject() { - java.lang.Object ref = gerritProject_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gerritProject_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full project name within the host. Projects may be nested, so
-     * "project/subproject" is a valid project name. The "repo name" is the
-     * hostURI/project.
-     * 
- * - * string gerrit_project = 2; - * @return The bytes for gerritProject. - */ - public com.google.protobuf.ByteString - getGerritProjectBytes() { - java.lang.Object ref = gerritProject_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - gerritProject_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full project name within the host. Projects may be nested, so
-     * "project/subproject" is a valid project name. The "repo name" is the
-     * hostURI/project.
-     * 
- * - * string gerrit_project = 2; - * @param value The gerritProject to set. - * @return This builder for chaining. - */ - public Builder setGerritProject( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - gerritProject_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The full project name within the host. Projects may be nested, so
-     * "project/subproject" is a valid project name. The "repo name" is the
-     * hostURI/project.
-     * 
- * - * string gerrit_project = 2; - * @return This builder for chaining. - */ - public Builder clearGerritProject() { - gerritProject_ = getDefaultInstance().getGerritProject(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The full project name within the host. Projects may be nested, so
-     * "project/subproject" is a valid project name. The "repo name" is the
-     * hostURI/project.
-     * 
- * - * string gerrit_project = 2; - * @param value The bytes for gerritProject to set. - * @return This builder for chaining. - */ - public Builder setGerritProjectBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - gerritProject_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - *
-     * A revision (commit) ID.
-     * 
- * - * string revision_id = 3; - * @return Whether the revisionId field is set. - */ - @java.lang.Override - public boolean hasRevisionId() { - return revisionCase_ == 3; - } - /** - *
-     * A revision (commit) ID.
-     * 
- * - * string revision_id = 3; - * @return The revisionId. - */ - @java.lang.Override - public java.lang.String getRevisionId() { - java.lang.Object ref = ""; - if (revisionCase_ == 3) { - ref = revision_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (revisionCase_ == 3) { - revision_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A revision (commit) ID.
-     * 
- * - * string revision_id = 3; - * @return The bytes for revisionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = ""; - if (revisionCase_ == 3) { - ref = revision_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (revisionCase_ == 3) { - revision_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A revision (commit) ID.
-     * 
- * - * string revision_id = 3; - * @param value The revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - revisionCase_ = 3; - revision_ = value; - onChanged(); - return this; - } - /** - *
-     * A revision (commit) ID.
-     * 
- * - * string revision_id = 3; - * @return This builder for chaining. - */ - public Builder clearRevisionId() { - if (revisionCase_ == 3) { - revisionCase_ = 0; - revision_ = null; - onChanged(); - } - return this; - } - /** - *
-     * A revision (commit) ID.
-     * 
- * - * string revision_id = 3; - * @param value The bytes for revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - revisionCase_ = 3; - revision_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> aliasContextBuilder_; - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - * @return Whether the aliasContext field is set. - */ - @java.lang.Override - public boolean hasAliasContext() { - return revisionCase_ == 4; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - * @return The aliasContext. - */ - @java.lang.Override - public io.grafeas.v1.AliasContext getAliasContext() { - if (aliasContextBuilder_ == null) { - if (revisionCase_ == 4) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } else { - if (revisionCase_ == 4) { - return aliasContextBuilder_.getMessage(); - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - public Builder setAliasContext(io.grafeas.v1.AliasContext value) { - if (aliasContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - revision_ = value; - onChanged(); - } else { - aliasContextBuilder_.setMessage(value); - } - revisionCase_ = 4; - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - public Builder setAliasContext( - io.grafeas.v1.AliasContext.Builder builderForValue) { - if (aliasContextBuilder_ == null) { - revision_ = builderForValue.build(); - onChanged(); - } else { - aliasContextBuilder_.setMessage(builderForValue.build()); - } - revisionCase_ = 4; - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - public Builder mergeAliasContext(io.grafeas.v1.AliasContext value) { - if (aliasContextBuilder_ == null) { - if (revisionCase_ == 4 && - revision_ != io.grafeas.v1.AliasContext.getDefaultInstance()) { - revision_ = io.grafeas.v1.AliasContext.newBuilder((io.grafeas.v1.AliasContext) revision_) - .mergeFrom(value).buildPartial(); - } else { - revision_ = value; - } - onChanged(); - } else { - if (revisionCase_ == 4) { - aliasContextBuilder_.mergeFrom(value); - } else { - aliasContextBuilder_.setMessage(value); - } - } - revisionCase_ = 4; - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - public Builder clearAliasContext() { - if (aliasContextBuilder_ == null) { - if (revisionCase_ == 4) { - revisionCase_ = 0; - revision_ = null; - onChanged(); - } - } else { - if (revisionCase_ == 4) { - revisionCase_ = 0; - revision_ = null; - } - aliasContextBuilder_.clear(); - } - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - public io.grafeas.v1.AliasContext.Builder getAliasContextBuilder() { - return getAliasContextFieldBuilder().getBuilder(); - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - @java.lang.Override - public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { - if ((revisionCase_ == 4) && (aliasContextBuilder_ != null)) { - return aliasContextBuilder_.getMessageOrBuilder(); - } else { - if (revisionCase_ == 4) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> - getAliasContextFieldBuilder() { - if (aliasContextBuilder_ == null) { - if (!(revisionCase_ == 4)) { - revision_ = io.grafeas.v1.AliasContext.getDefaultInstance(); - } - aliasContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder>( - (io.grafeas.v1.AliasContext) revision_, - getParentForChildren(), - isClean()); - revision_ = null; - } - revisionCase_ = 4; - onChanged(); - return aliasContextBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.GerritSourceContext) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.GerritSourceContext) - private static final io.grafeas.v1.GerritSourceContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.GerritSourceContext(); - } - - public static io.grafeas.v1.GerritSourceContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GerritSourceContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.GerritSourceContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java deleted file mode 100644 index c0221c8a2abd..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java +++ /dev/null @@ -1,111 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface GerritSourceContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.GerritSourceContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The URI of a running Gerrit instance.
-   * 
- * - * string host_uri = 1; - * @return The hostUri. - */ - java.lang.String getHostUri(); - /** - *
-   * The URI of a running Gerrit instance.
-   * 
- * - * string host_uri = 1; - * @return The bytes for hostUri. - */ - com.google.protobuf.ByteString - getHostUriBytes(); - - /** - *
-   * The full project name within the host. Projects may be nested, so
-   * "project/subproject" is a valid project name. The "repo name" is the
-   * hostURI/project.
-   * 
- * - * string gerrit_project = 2; - * @return The gerritProject. - */ - java.lang.String getGerritProject(); - /** - *
-   * The full project name within the host. Projects may be nested, so
-   * "project/subproject" is a valid project name. The "repo name" is the
-   * hostURI/project.
-   * 
- * - * string gerrit_project = 2; - * @return The bytes for gerritProject. - */ - com.google.protobuf.ByteString - getGerritProjectBytes(); - - /** - *
-   * A revision (commit) ID.
-   * 
- * - * string revision_id = 3; - * @return Whether the revisionId field is set. - */ - boolean hasRevisionId(); - /** - *
-   * A revision (commit) ID.
-   * 
- * - * string revision_id = 3; - * @return The revisionId. - */ - java.lang.String getRevisionId(); - /** - *
-   * A revision (commit) ID.
-   * 
- * - * string revision_id = 3; - * @return The bytes for revisionId. - */ - com.google.protobuf.ByteString - getRevisionIdBytes(); - - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - * @return Whether the aliasContext field is set. - */ - boolean hasAliasContext(); - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - * @return The aliasContext. - */ - io.grafeas.v1.AliasContext getAliasContext(); - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder(); - - public io.grafeas.v1.GerritSourceContext.RevisionCase getRevisionCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java deleted file mode 100644 index 0d89ff20cad2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java +++ /dev/null @@ -1,587 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to get a note.
- * 
- * - * Protobuf type {@code grafeas.v1.GetNoteRequest} - */ -public final class GetNoteRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.GetNoteRequest) - GetNoteRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetNoteRequest.newBuilder() to construct. - private GetNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetNoteRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetNoteRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GetNoteRequest.class, io.grafeas.v1.GetNoteRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.GetNoteRequest)) { - return super.equals(obj); - } - io.grafeas.v1.GetNoteRequest other = (io.grafeas.v1.GetNoteRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.GetNoteRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetNoteRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetNoteRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetNoteRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetNoteRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetNoteRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetNoteRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetNoteRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GetNoteRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetNoteRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GetNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.GetNoteRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to get a note.
-   * 
- * - * Protobuf type {@code grafeas.v1.GetNoteRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.GetNoteRequest) - io.grafeas.v1.GetNoteRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GetNoteRequest.class, io.grafeas.v1.GetNoteRequest.Builder.class); - } - - // Construct using io.grafeas.v1.GetNoteRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.GetNoteRequest getDefaultInstanceForType() { - return io.grafeas.v1.GetNoteRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.GetNoteRequest build() { - io.grafeas.v1.GetNoteRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.GetNoteRequest buildPartial() { - io.grafeas.v1.GetNoteRequest result = new io.grafeas.v1.GetNoteRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.GetNoteRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.GetNoteRequest) { - return mergeFrom((io.grafeas.v1.GetNoteRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.GetNoteRequest other) { - if (other == io.grafeas.v1.GetNoteRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.GetNoteRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.GetNoteRequest) - private static final io.grafeas.v1.GetNoteRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.GetNoteRequest(); - } - - public static io.grafeas.v1.GetNoteRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetNoteRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.GetNoteRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java deleted file mode 100644 index 8b35e38c0447..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface GetNoteRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.GetNoteRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java deleted file mode 100644 index 485d009b3969..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java +++ /dev/null @@ -1,587 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to get the note to which the specified occurrence is attached.
- * 
- * - * Protobuf type {@code grafeas.v1.GetOccurrenceNoteRequest} - */ -public final class GetOccurrenceNoteRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.GetOccurrenceNoteRequest) - GetOccurrenceNoteRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetOccurrenceNoteRequest.newBuilder() to construct. - private GetOccurrenceNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetOccurrenceNoteRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetOccurrenceNoteRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GetOccurrenceNoteRequest.class, io.grafeas.v1.GetOccurrenceNoteRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.GetOccurrenceNoteRequest)) { - return super.equals(obj); - } - io.grafeas.v1.GetOccurrenceNoteRequest other = (io.grafeas.v1.GetOccurrenceNoteRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.GetOccurrenceNoteRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to get the note to which the specified occurrence is attached.
-   * 
- * - * Protobuf type {@code grafeas.v1.GetOccurrenceNoteRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.GetOccurrenceNoteRequest) - io.grafeas.v1.GetOccurrenceNoteRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GetOccurrenceNoteRequest.class, io.grafeas.v1.GetOccurrenceNoteRequest.Builder.class); - } - - // Construct using io.grafeas.v1.GetOccurrenceNoteRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceNoteRequest getDefaultInstanceForType() { - return io.grafeas.v1.GetOccurrenceNoteRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceNoteRequest build() { - io.grafeas.v1.GetOccurrenceNoteRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceNoteRequest buildPartial() { - io.grafeas.v1.GetOccurrenceNoteRequest result = new io.grafeas.v1.GetOccurrenceNoteRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.GetOccurrenceNoteRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.GetOccurrenceNoteRequest) { - return mergeFrom((io.grafeas.v1.GetOccurrenceNoteRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.GetOccurrenceNoteRequest other) { - if (other == io.grafeas.v1.GetOccurrenceNoteRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.GetOccurrenceNoteRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.GetOccurrenceNoteRequest) - private static final io.grafeas.v1.GetOccurrenceNoteRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.GetOccurrenceNoteRequest(); - } - - public static io.grafeas.v1.GetOccurrenceNoteRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetOccurrenceNoteRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceNoteRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java deleted file mode 100644 index 26185bddff7d..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface GetOccurrenceNoteRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.GetOccurrenceNoteRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java deleted file mode 100644 index 16e1cf97f986..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java +++ /dev/null @@ -1,587 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to get an occurrence.
- * 
- * - * Protobuf type {@code grafeas.v1.GetOccurrenceRequest} - */ -public final class GetOccurrenceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.GetOccurrenceRequest) - GetOccurrenceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetOccurrenceRequest.newBuilder() to construct. - private GetOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetOccurrenceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetOccurrenceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GetOccurrenceRequest.class, io.grafeas.v1.GetOccurrenceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.GetOccurrenceRequest)) { - return super.equals(obj); - } - io.grafeas.v1.GetOccurrenceRequest other = (io.grafeas.v1.GetOccurrenceRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetOccurrenceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.GetOccurrenceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to get an occurrence.
-   * 
- * - * Protobuf type {@code grafeas.v1.GetOccurrenceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.GetOccurrenceRequest) - io.grafeas.v1.GetOccurrenceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GetOccurrenceRequest.class, io.grafeas.v1.GetOccurrenceRequest.Builder.class); - } - - // Construct using io.grafeas.v1.GetOccurrenceRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceRequest getDefaultInstanceForType() { - return io.grafeas.v1.GetOccurrenceRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceRequest build() { - io.grafeas.v1.GetOccurrenceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceRequest buildPartial() { - io.grafeas.v1.GetOccurrenceRequest result = new io.grafeas.v1.GetOccurrenceRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.GetOccurrenceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.GetOccurrenceRequest) { - return mergeFrom((io.grafeas.v1.GetOccurrenceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.GetOccurrenceRequest other) { - if (other == io.grafeas.v1.GetOccurrenceRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.GetOccurrenceRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.GetOccurrenceRequest) - private static final io.grafeas.v1.GetOccurrenceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.GetOccurrenceRequest(); - } - - public static io.grafeas.v1.GetOccurrenceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetOccurrenceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java deleted file mode 100644 index 67210e529112..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface GetOccurrenceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.GetOccurrenceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java deleted file mode 100644 index 6ba7ba88015e..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java +++ /dev/null @@ -1,746 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * A GitSourceContext denotes a particular revision in a third party Git
- * repository (e.g., GitHub).
- * 
- * - * Protobuf type {@code grafeas.v1.GitSourceContext} - */ -public final class GitSourceContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.GitSourceContext) - GitSourceContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use GitSourceContext.newBuilder() to construct. - private GitSourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GitSourceContext() { - url_ = ""; - revisionId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GitSourceContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GitSourceContext.class, io.grafeas.v1.GitSourceContext.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object url_ = ""; - /** - *
-   * Git repository URL.
-   * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-   * Git repository URL.
-   * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REVISION_ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object revisionId_ = ""; - /** - *
-   * Git commit hash.
-   * 
- * - * string revision_id = 2; - * @return The revisionId. - */ - @java.lang.Override - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revisionId_ = s; - return s; - } - } - /** - *
-   * Git commit hash.
-   * 
- * - * string revision_id = 2; - * @return The bytes for revisionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revisionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, revisionId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, revisionId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.GitSourceContext)) { - return super.equals(obj); - } - io.grafeas.v1.GitSourceContext other = (io.grafeas.v1.GitSourceContext) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (!getRevisionId() - .equals(other.getRevisionId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; - hash = (53 * hash) + getRevisionId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.GitSourceContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GitSourceContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GitSourceContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GitSourceContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GitSourceContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GitSourceContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GitSourceContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GitSourceContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GitSourceContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.GitSourceContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GitSourceContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GitSourceContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.GitSourceContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A GitSourceContext denotes a particular revision in a third party Git
-   * repository (e.g., GitHub).
-   * 
- * - * Protobuf type {@code grafeas.v1.GitSourceContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.GitSourceContext) - io.grafeas.v1.GitSourceContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GitSourceContext.class, io.grafeas.v1.GitSourceContext.Builder.class); - } - - // Construct using io.grafeas.v1.GitSourceContext.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - url_ = ""; - revisionId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.GitSourceContext getDefaultInstanceForType() { - return io.grafeas.v1.GitSourceContext.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.GitSourceContext build() { - io.grafeas.v1.GitSourceContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.GitSourceContext buildPartial() { - io.grafeas.v1.GitSourceContext result = new io.grafeas.v1.GitSourceContext(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.GitSourceContext result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.url_ = url_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.revisionId_ = revisionId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.GitSourceContext) { - return mergeFrom((io.grafeas.v1.GitSourceContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.GitSourceContext other) { - if (other == io.grafeas.v1.GitSourceContext.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getRevisionId().isEmpty()) { - revisionId_ = other.revisionId_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - url_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - revisionId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object url_ = ""; - /** - *
-     * Git repository URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Git repository URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Git repository URL.
-     * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - url_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Git repository URL.
-     * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - url_ = getDefaultInstance().getUrl(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Git repository URL.
-     * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - url_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object revisionId_ = ""; - /** - *
-     * Git commit hash.
-     * 
- * - * string revision_id = 2; - * @return The revisionId. - */ - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revisionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Git commit hash.
-     * 
- * - * string revision_id = 2; - * @return The bytes for revisionId. - */ - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revisionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Git commit hash.
-     * 
- * - * string revision_id = 2; - * @param value The revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - revisionId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Git commit hash.
-     * 
- * - * string revision_id = 2; - * @return This builder for chaining. - */ - public Builder clearRevisionId() { - revisionId_ = getDefaultInstance().getRevisionId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Git commit hash.
-     * 
- * - * string revision_id = 2; - * @param value The bytes for revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - revisionId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.GitSourceContext) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.GitSourceContext) - private static final io.grafeas.v1.GitSourceContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.GitSourceContext(); - } - - public static io.grafeas.v1.GitSourceContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GitSourceContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.GitSourceContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java deleted file mode 100644 index 22f81fc4db36..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java +++ /dev/null @@ -1,49 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface GitSourceContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.GitSourceContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Git repository URL.
-   * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-   * Git repository URL.
-   * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-   * Git commit hash.
-   * 
- * - * string revision_id = 2; - * @return The revisionId. - */ - java.lang.String getRevisionId(); - /** - *
-   * Git commit hash.
-   * 
- * - * string revision_id = 2; - * @return The bytes for revisionId. - */ - com.google.protobuf.ByteString - getRevisionIdBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java deleted file mode 100644 index 332ac72426e8..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java +++ /dev/null @@ -1,2264 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import io.grafeas.v1.stub.GrafeasStub; -import io.grafeas.v1.stub.GrafeasStubSettings; -import java.io.IOException; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: [Grafeas](https://grafeas.io) API. - * - *

Retrieves analysis results of Cloud components such as Docker container images. - * - *

Analysis results are stored as a series of occurrences. An `Occurrence` contains information - * about a specific analysis instance on a resource. An occurrence refers to a `Note`. A note - * contains details describing the analysis and is generally stored in a separate project, called a - * `Provider`. Multiple occurrences can refer to the same note. - * - *

For example, an SSL vulnerability could affect multiple images. In this case, there would be - * one note for the vulnerability and an occurrence for each image with the vulnerability referring - * to that note. - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
- *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
- *   Occurrence response = grafeasClient.getOccurrence(name);
- * }
- * }
- * - *

Note: close() needs to be called on the GrafeasClient object to clean up resources such as - * threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of GrafeasSettings to create(). - * For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GrafeasSettings grafeasSettings =
- *     GrafeasSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * GrafeasClient grafeasClient = GrafeasClient.create(grafeasSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GrafeasSettings grafeasSettings = GrafeasSettings.newBuilder().setEndpoint(myEndpoint).build();
- * GrafeasClient grafeasClient = GrafeasClient.create(grafeasSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class GrafeasClient implements BackgroundResource { - private final GrafeasSettings settings; - private final GrafeasStub stub; - - /** Constructs an instance of GrafeasClient with default settings. */ - public static final GrafeasClient create() throws IOException { - return create(GrafeasSettings.newBuilder().build()); - } - - /** - * Constructs an instance of GrafeasClient, using the given settings. The channels are created - * based on the settings passed in, or defaults for any settings that are not set. - */ - public static final GrafeasClient create(GrafeasSettings settings) throws IOException { - return new GrafeasClient(settings); - } - - /** - * Constructs an instance of GrafeasClient, using the given stub for making calls. This is for - * advanced usage - prefer using create(GrafeasSettings). - */ - public static final GrafeasClient create(GrafeasStub stub) { - return new GrafeasClient(stub); - } - - /** - * Constructs an instance of GrafeasClient, using the given settings. This is protected so that it - * is easy to make a subclass, but otherwise, the static factory methods should be preferred. - */ - protected GrafeasClient(GrafeasSettings settings) throws IOException { - this.settings = settings; - this.stub = ((GrafeasStubSettings) settings.getStubSettings()).createStub(); - } - - protected GrafeasClient(GrafeasStub stub) { - this.settings = null; - this.stub = stub; - } - - public final GrafeasSettings getSettings() { - return settings; - } - - public GrafeasStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
-   *   Occurrence response = grafeasClient.getOccurrence(name);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence getOccurrence(OccurrenceName name) { - GetOccurrenceRequest request = - GetOccurrenceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
-   *   Occurrence response = grafeasClient.getOccurrence(name);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence getOccurrence(String name) { - GetOccurrenceRequest request = GetOccurrenceRequest.newBuilder().setName(name).build(); - return getOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   GetOccurrenceRequest request =
-   *       GetOccurrenceRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .build();
-   *   Occurrence response = grafeasClient.getOccurrence(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence getOccurrence(GetOccurrenceRequest request) { - return getOccurrenceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   GetOccurrenceRequest request =
-   *       GetOccurrenceRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .build();
-   *   ApiFuture future = grafeasClient.getOccurrenceCallable().futureCall(request);
-   *   // Do something.
-   *   Occurrence response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getOccurrenceCallable() { - return stub.getOccurrenceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   String filter = "filter-1274492040";
-   *   for (Occurrence element : grafeasClient.listOccurrences(parent, filter).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent The name of the project to list occurrences for in the form of - * `projects/[PROJECT_ID]`. - * @param filter The filter expression. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListOccurrencesPagedResponse listOccurrences(ProjectName parent, String filter) { - ListOccurrencesRequest request = - ListOccurrencesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setFilter(filter) - .build(); - return listOccurrences(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   String filter = "filter-1274492040";
-   *   for (Occurrence element : grafeasClient.listOccurrences(parent, filter).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent The name of the project to list occurrences for in the form of - * `projects/[PROJECT_ID]`. - * @param filter The filter expression. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListOccurrencesPagedResponse listOccurrences(String parent, String filter) { - ListOccurrencesRequest request = - ListOccurrencesRequest.newBuilder().setParent(parent).setFilter(filter).build(); - return listOccurrences(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListOccurrencesRequest request =
-   *       ListOccurrencesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Occurrence element : grafeasClient.listOccurrences(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListOccurrencesPagedResponse listOccurrences(ListOccurrencesRequest request) { - return listOccurrencesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListOccurrencesRequest request =
-   *       ListOccurrencesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       grafeasClient.listOccurrencesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Occurrence element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listOccurrencesPagedCallable() { - return stub.listOccurrencesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListOccurrencesRequest request =
-   *       ListOccurrencesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListOccurrencesResponse response = grafeasClient.listOccurrencesCallable().call(request);
-   *     for (Occurrence element : response.getOccurrencesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listOccurrencesCallable() { - return stub.listOccurrencesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified occurrence. For example, use this method to delete an occurrence when the - * occurrence is no longer applicable for the given resource. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
-   *   grafeasClient.deleteOccurrence(name);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteOccurrence(OccurrenceName name) { - DeleteOccurrenceRequest request = - DeleteOccurrenceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified occurrence. For example, use this method to delete an occurrence when the - * occurrence is no longer applicable for the given resource. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
-   *   grafeasClient.deleteOccurrence(name);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteOccurrence(String name) { - DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder().setName(name).build(); - deleteOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified occurrence. For example, use this method to delete an occurrence when the - * occurrence is no longer applicable for the given resource. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   DeleteOccurrenceRequest request =
-   *       DeleteOccurrenceRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .build();
-   *   grafeasClient.deleteOccurrence(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteOccurrence(DeleteOccurrenceRequest request) { - deleteOccurrenceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified occurrence. For example, use this method to delete an occurrence when the - * occurrence is no longer applicable for the given resource. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   DeleteOccurrenceRequest request =
-   *       DeleteOccurrenceRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .build();
-   *   ApiFuture future = grafeasClient.deleteOccurrenceCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteOccurrenceCallable() { - return stub.deleteOccurrenceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   Occurrence occurrence = Occurrence.newBuilder().build();
-   *   Occurrence response = grafeasClient.createOccurrence(parent, occurrence);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * occurrence is to be created. - * @param occurrence The occurrence to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence createOccurrence(ProjectName parent, Occurrence occurrence) { - CreateOccurrenceRequest request = - CreateOccurrenceRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setOccurrence(occurrence) - .build(); - return createOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   Occurrence occurrence = Occurrence.newBuilder().build();
-   *   Occurrence response = grafeasClient.createOccurrence(parent, occurrence);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * occurrence is to be created. - * @param occurrence The occurrence to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence createOccurrence(String parent, Occurrence occurrence) { - CreateOccurrenceRequest request = - CreateOccurrenceRequest.newBuilder().setParent(parent).setOccurrence(occurrence).build(); - return createOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   CreateOccurrenceRequest request =
-   *       CreateOccurrenceRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setOccurrence(Occurrence.newBuilder().build())
-   *           .build();
-   *   Occurrence response = grafeasClient.createOccurrence(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence createOccurrence(CreateOccurrenceRequest request) { - return createOccurrenceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   CreateOccurrenceRequest request =
-   *       CreateOccurrenceRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setOccurrence(Occurrence.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = grafeasClient.createOccurrenceCallable().futureCall(request);
-   *   // Do something.
-   *   Occurrence response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createOccurrenceCallable() { - return stub.createOccurrenceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new occurrences in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   List occurrences = new ArrayList<>();
-   *   BatchCreateOccurrencesResponse response =
-   *       grafeasClient.batchCreateOccurrences(parent, occurrences);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * occurrences are to be created. - * @param occurrences The occurrences to create. Max allowed length is 1000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchCreateOccurrencesResponse batchCreateOccurrences( - ProjectName parent, List occurrences) { - BatchCreateOccurrencesRequest request = - BatchCreateOccurrencesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .addAllOccurrences(occurrences) - .build(); - return batchCreateOccurrences(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new occurrences in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   List occurrences = new ArrayList<>();
-   *   BatchCreateOccurrencesResponse response =
-   *       grafeasClient.batchCreateOccurrences(parent, occurrences);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * occurrences are to be created. - * @param occurrences The occurrences to create. Max allowed length is 1000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchCreateOccurrencesResponse batchCreateOccurrences( - String parent, List occurrences) { - BatchCreateOccurrencesRequest request = - BatchCreateOccurrencesRequest.newBuilder() - .setParent(parent) - .addAllOccurrences(occurrences) - .build(); - return batchCreateOccurrences(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new occurrences in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   BatchCreateOccurrencesRequest request =
-   *       BatchCreateOccurrencesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .addAllOccurrences(new ArrayList())
-   *           .build();
-   *   BatchCreateOccurrencesResponse response = grafeasClient.batchCreateOccurrences(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchCreateOccurrencesResponse batchCreateOccurrences( - BatchCreateOccurrencesRequest request) { - return batchCreateOccurrencesCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new occurrences in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   BatchCreateOccurrencesRequest request =
-   *       BatchCreateOccurrencesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .addAllOccurrences(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       grafeasClient.batchCreateOccurrencesCallable().futureCall(request);
-   *   // Do something.
-   *   BatchCreateOccurrencesResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - batchCreateOccurrencesCallable() { - return stub.batchCreateOccurrencesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
-   *   Occurrence occurrence = Occurrence.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Occurrence response = grafeasClient.updateOccurrence(name, occurrence, updateMask);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @param occurrence The updated occurrence. - * @param updateMask The fields to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence updateOccurrence( - OccurrenceName name, Occurrence occurrence, FieldMask updateMask) { - UpdateOccurrenceRequest request = - UpdateOccurrenceRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setOccurrence(occurrence) - .setUpdateMask(updateMask) - .build(); - return updateOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
-   *   Occurrence occurrence = Occurrence.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Occurrence response = grafeasClient.updateOccurrence(name, occurrence, updateMask);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @param occurrence The updated occurrence. - * @param updateMask The fields to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence updateOccurrence( - String name, Occurrence occurrence, FieldMask updateMask) { - UpdateOccurrenceRequest request = - UpdateOccurrenceRequest.newBuilder() - .setName(name) - .setOccurrence(occurrence) - .setUpdateMask(updateMask) - .build(); - return updateOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   UpdateOccurrenceRequest request =
-   *       UpdateOccurrenceRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .setOccurrence(Occurrence.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Occurrence response = grafeasClient.updateOccurrence(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence updateOccurrence(UpdateOccurrenceRequest request) { - return updateOccurrenceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   UpdateOccurrenceRequest request =
-   *       UpdateOccurrenceRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .setOccurrence(Occurrence.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = grafeasClient.updateOccurrenceCallable().futureCall(request);
-   *   // Do something.
-   *   Occurrence response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateOccurrenceCallable() { - return stub.updateOccurrenceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the note attached to the specified occurrence. Consumer projects can use this method to - * get a note that belongs to a provider project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
-   *   Note response = grafeasClient.getOccurrenceNote(name);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note getOccurrenceNote(OccurrenceName name) { - GetOccurrenceNoteRequest request = - GetOccurrenceNoteRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getOccurrenceNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the note attached to the specified occurrence. Consumer projects can use this method to - * get a note that belongs to a provider project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
-   *   Note response = grafeasClient.getOccurrenceNote(name);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note getOccurrenceNote(String name) { - GetOccurrenceNoteRequest request = GetOccurrenceNoteRequest.newBuilder().setName(name).build(); - return getOccurrenceNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the note attached to the specified occurrence. Consumer projects can use this method to - * get a note that belongs to a provider project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   GetOccurrenceNoteRequest request =
-   *       GetOccurrenceNoteRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .build();
-   *   Note response = grafeasClient.getOccurrenceNote(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note getOccurrenceNote(GetOccurrenceNoteRequest request) { - return getOccurrenceNoteCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the note attached to the specified occurrence. Consumer projects can use this method to - * get a note that belongs to a provider project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   GetOccurrenceNoteRequest request =
-   *       GetOccurrenceNoteRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .build();
-   *   ApiFuture future = grafeasClient.getOccurrenceNoteCallable().futureCall(request);
-   *   // Do something.
-   *   Note response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getOccurrenceNoteCallable() { - return stub.getOccurrenceNoteCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
-   *   Note response = grafeasClient.getNote(name);
-   * }
-   * }
- * - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note getNote(NoteName name) { - GetNoteRequest request = - GetNoteRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
-   *   Note response = grafeasClient.getNote(name);
-   * }
-   * }
- * - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note getNote(String name) { - GetNoteRequest request = GetNoteRequest.newBuilder().setName(name).build(); - return getNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   GetNoteRequest request =
-   *       GetNoteRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .build();
-   *   Note response = grafeasClient.getNote(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note getNote(GetNoteRequest request) { - return getNoteCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   GetNoteRequest request =
-   *       GetNoteRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .build();
-   *   ApiFuture future = grafeasClient.getNoteCallable().futureCall(request);
-   *   // Do something.
-   *   Note response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getNoteCallable() { - return stub.getNoteCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists notes for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   String filter = "filter-1274492040";
-   *   for (Note element : grafeasClient.listNotes(parent, filter).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent The name of the project to list notes for in the form of `projects/[PROJECT_ID]`. - * @param filter The filter expression. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListNotesPagedResponse listNotes(ProjectName parent, String filter) { - ListNotesRequest request = - ListNotesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setFilter(filter) - .build(); - return listNotes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists notes for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   String filter = "filter-1274492040";
-   *   for (Note element : grafeasClient.listNotes(parent, filter).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent The name of the project to list notes for in the form of `projects/[PROJECT_ID]`. - * @param filter The filter expression. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListNotesPagedResponse listNotes(String parent, String filter) { - ListNotesRequest request = - ListNotesRequest.newBuilder().setParent(parent).setFilter(filter).build(); - return listNotes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists notes for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListNotesRequest request =
-   *       ListNotesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Note element : grafeasClient.listNotes(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListNotesPagedResponse listNotes(ListNotesRequest request) { - return listNotesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists notes for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListNotesRequest request =
-   *       ListNotesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future = grafeasClient.listNotesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Note element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listNotesPagedCallable() { - return stub.listNotesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists notes for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListNotesRequest request =
-   *       ListNotesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListNotesResponse response = grafeasClient.listNotesCallable().call(request);
-   *     for (Note element : response.getNotesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listNotesCallable() { - return stub.listNotesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
-   *   grafeasClient.deleteNote(name);
-   * }
-   * }
- * - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteNote(NoteName name) { - DeleteNoteRequest request = - DeleteNoteRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
-   *   grafeasClient.deleteNote(name);
-   * }
-   * }
- * - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteNote(String name) { - DeleteNoteRequest request = DeleteNoteRequest.newBuilder().setName(name).build(); - deleteNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   DeleteNoteRequest request =
-   *       DeleteNoteRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .build();
-   *   grafeasClient.deleteNote(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteNote(DeleteNoteRequest request) { - deleteNoteCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   DeleteNoteRequest request =
-   *       DeleteNoteRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .build();
-   *   ApiFuture future = grafeasClient.deleteNoteCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteNoteCallable() { - return stub.deleteNoteCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   String noteId = "noteId-1039694675";
-   *   Note note = Note.newBuilder().build();
-   *   Note response = grafeasClient.createNote(parent, noteId, note);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * note is to be created. - * @param noteId The ID to use for this note. - * @param note The note to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note createNote(ProjectName parent, String noteId, Note note) { - CreateNoteRequest request = - CreateNoteRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setNoteId(noteId) - .setNote(note) - .build(); - return createNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   String noteId = "noteId-1039694675";
-   *   Note note = Note.newBuilder().build();
-   *   Note response = grafeasClient.createNote(parent, noteId, note);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * note is to be created. - * @param noteId The ID to use for this note. - * @param note The note to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note createNote(String parent, String noteId, Note note) { - CreateNoteRequest request = - CreateNoteRequest.newBuilder().setParent(parent).setNoteId(noteId).setNote(note).build(); - return createNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   CreateNoteRequest request =
-   *       CreateNoteRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setNoteId("noteId-1039694675")
-   *           .setNote(Note.newBuilder().build())
-   *           .build();
-   *   Note response = grafeasClient.createNote(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note createNote(CreateNoteRequest request) { - return createNoteCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   CreateNoteRequest request =
-   *       CreateNoteRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setNoteId("noteId-1039694675")
-   *           .setNote(Note.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = grafeasClient.createNoteCallable().futureCall(request);
-   *   // Do something.
-   *   Note response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createNoteCallable() { - return stub.createNoteCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new notes in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   Map notes = new HashMap<>();
-   *   BatchCreateNotesResponse response = grafeasClient.batchCreateNotes(parent, notes);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * notes are to be created. - * @param notes The notes to create. Max allowed length is 1000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchCreateNotesResponse batchCreateNotes( - ProjectName parent, Map notes) { - BatchCreateNotesRequest request = - BatchCreateNotesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .putAllNotes(notes) - .build(); - return batchCreateNotes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new notes in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   Map notes = new HashMap<>();
-   *   BatchCreateNotesResponse response = grafeasClient.batchCreateNotes(parent, notes);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * notes are to be created. - * @param notes The notes to create. Max allowed length is 1000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchCreateNotesResponse batchCreateNotes(String parent, Map notes) { - BatchCreateNotesRequest request = - BatchCreateNotesRequest.newBuilder().setParent(parent).putAllNotes(notes).build(); - return batchCreateNotes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new notes in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   BatchCreateNotesRequest request =
-   *       BatchCreateNotesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .putAllNotes(new HashMap())
-   *           .build();
-   *   BatchCreateNotesResponse response = grafeasClient.batchCreateNotes(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchCreateNotesResponse batchCreateNotes(BatchCreateNotesRequest request) { - return batchCreateNotesCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new notes in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   BatchCreateNotesRequest request =
-   *       BatchCreateNotesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .putAllNotes(new HashMap())
-   *           .build();
-   *   ApiFuture future =
-   *       grafeasClient.batchCreateNotesCallable().futureCall(request);
-   *   // Do something.
-   *   BatchCreateNotesResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - batchCreateNotesCallable() { - return stub.batchCreateNotesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
-   *   Note note = Note.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Note response = grafeasClient.updateNote(name, note, updateMask);
-   * }
-   * }
- * - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @param note The updated note. - * @param updateMask The fields to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note updateNote(NoteName name, Note note, FieldMask updateMask) { - UpdateNoteRequest request = - UpdateNoteRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setNote(note) - .setUpdateMask(updateMask) - .build(); - return updateNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
-   *   Note note = Note.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Note response = grafeasClient.updateNote(name, note, updateMask);
-   * }
-   * }
- * - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @param note The updated note. - * @param updateMask The fields to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note updateNote(String name, Note note, FieldMask updateMask) { - UpdateNoteRequest request = - UpdateNoteRequest.newBuilder() - .setName(name) - .setNote(note) - .setUpdateMask(updateMask) - .build(); - return updateNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   UpdateNoteRequest request =
-   *       UpdateNoteRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .setNote(Note.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Note response = grafeasClient.updateNote(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note updateNote(UpdateNoteRequest request) { - return updateNoteCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   UpdateNoteRequest request =
-   *       UpdateNoteRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .setNote(Note.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = grafeasClient.updateNoteCallable().futureCall(request);
-   *   // Do something.
-   *   Note response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateNoteCallable() { - return stub.updateNoteCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences referencing the specified note. Provider projects can use this method to get - * all occurrences across consumer projects referencing the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
-   *   String filter = "filter-1274492040";
-   *   for (Occurrence element : grafeasClient.listNoteOccurrences(name, filter).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param name The name of the note to list occurrences for in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @param filter The filter expression. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListNoteOccurrencesPagedResponse listNoteOccurrences(NoteName name, String filter) { - ListNoteOccurrencesRequest request = - ListNoteOccurrencesRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setFilter(filter) - .build(); - return listNoteOccurrences(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences referencing the specified note. Provider projects can use this method to get - * all occurrences across consumer projects referencing the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
-   *   String filter = "filter-1274492040";
-   *   for (Occurrence element : grafeasClient.listNoteOccurrences(name, filter).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param name The name of the note to list occurrences for in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @param filter The filter expression. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListNoteOccurrencesPagedResponse listNoteOccurrences(String name, String filter) { - ListNoteOccurrencesRequest request = - ListNoteOccurrencesRequest.newBuilder().setName(name).setFilter(filter).build(); - return listNoteOccurrences(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences referencing the specified note. Provider projects can use this method to get - * all occurrences across consumer projects referencing the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListNoteOccurrencesRequest request =
-   *       ListNoteOccurrencesRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Occurrence element : grafeasClient.listNoteOccurrences(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListNoteOccurrencesPagedResponse listNoteOccurrences( - ListNoteOccurrencesRequest request) { - return listNoteOccurrencesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences referencing the specified note. Provider projects can use this method to get - * all occurrences across consumer projects referencing the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListNoteOccurrencesRequest request =
-   *       ListNoteOccurrencesRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       grafeasClient.listNoteOccurrencesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Occurrence element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listNoteOccurrencesPagedCallable() { - return stub.listNoteOccurrencesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences referencing the specified note. Provider projects can use this method to get - * all occurrences across consumer projects referencing the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListNoteOccurrencesRequest request =
-   *       ListNoteOccurrencesRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListNoteOccurrencesResponse response =
-   *         grafeasClient.listNoteOccurrencesCallable().call(request);
-   *     for (Occurrence element : response.getOccurrencesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listNoteOccurrencesCallable() { - return stub.listNoteOccurrencesCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListOccurrencesPagedResponse - extends AbstractPagedListResponse< - ListOccurrencesRequest, - ListOccurrencesResponse, - Occurrence, - ListOccurrencesPage, - ListOccurrencesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListOccurrencesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListOccurrencesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListOccurrencesPagedResponse(ListOccurrencesPage page) { - super(page, ListOccurrencesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListOccurrencesPage - extends AbstractPage< - ListOccurrencesRequest, ListOccurrencesResponse, Occurrence, ListOccurrencesPage> { - - private ListOccurrencesPage( - PageContext context, - ListOccurrencesResponse response) { - super(context, response); - } - - private static ListOccurrencesPage createEmptyPage() { - return new ListOccurrencesPage(null, null); - } - - @Override - protected ListOccurrencesPage createPage( - PageContext context, - ListOccurrencesResponse response) { - return new ListOccurrencesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListOccurrencesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListOccurrencesRequest, - ListOccurrencesResponse, - Occurrence, - ListOccurrencesPage, - ListOccurrencesFixedSizeCollection> { - - private ListOccurrencesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListOccurrencesFixedSizeCollection createEmptyCollection() { - return new ListOccurrencesFixedSizeCollection(null, 0); - } - - @Override - protected ListOccurrencesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListOccurrencesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListNotesPagedResponse - extends AbstractPagedListResponse< - ListNotesRequest, ListNotesResponse, Note, ListNotesPage, ListNotesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListNotesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListNotesPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListNotesPagedResponse(ListNotesPage page) { - super(page, ListNotesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListNotesPage - extends AbstractPage { - - private ListNotesPage( - PageContext context, - ListNotesResponse response) { - super(context, response); - } - - private static ListNotesPage createEmptyPage() { - return new ListNotesPage(null, null); - } - - @Override - protected ListNotesPage createPage( - PageContext context, - ListNotesResponse response) { - return new ListNotesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListNotesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListNotesRequest, ListNotesResponse, Note, ListNotesPage, ListNotesFixedSizeCollection> { - - private ListNotesFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListNotesFixedSizeCollection createEmptyCollection() { - return new ListNotesFixedSizeCollection(null, 0); - } - - @Override - protected ListNotesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListNotesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListNoteOccurrencesPagedResponse - extends AbstractPagedListResponse< - ListNoteOccurrencesRequest, - ListNoteOccurrencesResponse, - Occurrence, - ListNoteOccurrencesPage, - ListNoteOccurrencesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListNoteOccurrencesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListNoteOccurrencesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListNoteOccurrencesPagedResponse(ListNoteOccurrencesPage page) { - super(page, ListNoteOccurrencesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListNoteOccurrencesPage - extends AbstractPage< - ListNoteOccurrencesRequest, - ListNoteOccurrencesResponse, - Occurrence, - ListNoteOccurrencesPage> { - - private ListNoteOccurrencesPage( - PageContext context, - ListNoteOccurrencesResponse response) { - super(context, response); - } - - private static ListNoteOccurrencesPage createEmptyPage() { - return new ListNoteOccurrencesPage(null, null); - } - - @Override - protected ListNoteOccurrencesPage createPage( - PageContext context, - ListNoteOccurrencesResponse response) { - return new ListNoteOccurrencesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListNoteOccurrencesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListNoteOccurrencesRequest, - ListNoteOccurrencesResponse, - Occurrence, - ListNoteOccurrencesPage, - ListNoteOccurrencesFixedSizeCollection> { - - private ListNoteOccurrencesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListNoteOccurrencesFixedSizeCollection createEmptyCollection() { - return new ListNoteOccurrencesFixedSizeCollection(null, 0); - } - - @Override - protected ListNoteOccurrencesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListNoteOccurrencesFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java deleted file mode 100644 index 46c98bd4370b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java +++ /dev/null @@ -1,1491 +0,0 @@ -package io.grafeas.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * [Grafeas](https://grafeas.io) API.
- * Retrieves analysis results of Cloud components such as Docker container
- * images.
- * Analysis results are stored as a series of occurrences. An `Occurrence`
- * contains information about a specific analysis instance on a resource. An
- * occurrence refers to a `Note`. A note contains details describing the
- * analysis and is generally stored in a separate project, called a `Provider`.
- * Multiple occurrences can refer to the same note.
- * For example, an SSL vulnerability could affect multiple images. In this case,
- * there would be one note for the vulnerability and an occurrence for each
- * image with the vulnerability referring to that note.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: grafeas/v1/grafeas.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class GrafeasGrpc { - - private GrafeasGrpc() {} - - public static final String SERVICE_NAME = "grafeas.v1.Grafeas"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getGetOccurrenceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetOccurrence", - requestType = io.grafeas.v1.GetOccurrenceRequest.class, - responseType = io.grafeas.v1.Occurrence.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetOccurrenceMethod() { - io.grpc.MethodDescriptor getGetOccurrenceMethod; - if ((getGetOccurrenceMethod = GrafeasGrpc.getGetOccurrenceMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getGetOccurrenceMethod = GrafeasGrpc.getGetOccurrenceMethod) == null) { - GrafeasGrpc.getGetOccurrenceMethod = getGetOccurrenceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOccurrence")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.GetOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.Occurrence.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("GetOccurrence")) - .build(); - } - } - } - return getGetOccurrenceMethod; - } - - private static volatile io.grpc.MethodDescriptor getListOccurrencesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListOccurrences", - requestType = io.grafeas.v1.ListOccurrencesRequest.class, - responseType = io.grafeas.v1.ListOccurrencesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListOccurrencesMethod() { - io.grpc.MethodDescriptor getListOccurrencesMethod; - if ((getListOccurrencesMethod = GrafeasGrpc.getListOccurrencesMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getListOccurrencesMethod = GrafeasGrpc.getListOccurrencesMethod) == null) { - GrafeasGrpc.getListOccurrencesMethod = getListOccurrencesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListOccurrences")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.ListOccurrencesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.ListOccurrencesResponse.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("ListOccurrences")) - .build(); - } - } - } - return getListOccurrencesMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteOccurrenceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteOccurrence", - requestType = io.grafeas.v1.DeleteOccurrenceRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteOccurrenceMethod() { - io.grpc.MethodDescriptor getDeleteOccurrenceMethod; - if ((getDeleteOccurrenceMethod = GrafeasGrpc.getDeleteOccurrenceMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getDeleteOccurrenceMethod = GrafeasGrpc.getDeleteOccurrenceMethod) == null) { - GrafeasGrpc.getDeleteOccurrenceMethod = getDeleteOccurrenceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteOccurrence")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.DeleteOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("DeleteOccurrence")) - .build(); - } - } - } - return getDeleteOccurrenceMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateOccurrenceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateOccurrence", - requestType = io.grafeas.v1.CreateOccurrenceRequest.class, - responseType = io.grafeas.v1.Occurrence.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateOccurrenceMethod() { - io.grpc.MethodDescriptor getCreateOccurrenceMethod; - if ((getCreateOccurrenceMethod = GrafeasGrpc.getCreateOccurrenceMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getCreateOccurrenceMethod = GrafeasGrpc.getCreateOccurrenceMethod) == null) { - GrafeasGrpc.getCreateOccurrenceMethod = getCreateOccurrenceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateOccurrence")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.CreateOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.Occurrence.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("CreateOccurrence")) - .build(); - } - } - } - return getCreateOccurrenceMethod; - } - - private static volatile io.grpc.MethodDescriptor getBatchCreateOccurrencesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchCreateOccurrences", - requestType = io.grafeas.v1.BatchCreateOccurrencesRequest.class, - responseType = io.grafeas.v1.BatchCreateOccurrencesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBatchCreateOccurrencesMethod() { - io.grpc.MethodDescriptor getBatchCreateOccurrencesMethod; - if ((getBatchCreateOccurrencesMethod = GrafeasGrpc.getBatchCreateOccurrencesMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getBatchCreateOccurrencesMethod = GrafeasGrpc.getBatchCreateOccurrencesMethod) == null) { - GrafeasGrpc.getBatchCreateOccurrencesMethod = getBatchCreateOccurrencesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchCreateOccurrences")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.BatchCreateOccurrencesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.BatchCreateOccurrencesResponse.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("BatchCreateOccurrences")) - .build(); - } - } - } - return getBatchCreateOccurrencesMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateOccurrenceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateOccurrence", - requestType = io.grafeas.v1.UpdateOccurrenceRequest.class, - responseType = io.grafeas.v1.Occurrence.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateOccurrenceMethod() { - io.grpc.MethodDescriptor getUpdateOccurrenceMethod; - if ((getUpdateOccurrenceMethod = GrafeasGrpc.getUpdateOccurrenceMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getUpdateOccurrenceMethod = GrafeasGrpc.getUpdateOccurrenceMethod) == null) { - GrafeasGrpc.getUpdateOccurrenceMethod = getUpdateOccurrenceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateOccurrence")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.UpdateOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.Occurrence.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("UpdateOccurrence")) - .build(); - } - } - } - return getUpdateOccurrenceMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetOccurrenceNoteMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetOccurrenceNote", - requestType = io.grafeas.v1.GetOccurrenceNoteRequest.class, - responseType = io.grafeas.v1.Note.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetOccurrenceNoteMethod() { - io.grpc.MethodDescriptor getGetOccurrenceNoteMethod; - if ((getGetOccurrenceNoteMethod = GrafeasGrpc.getGetOccurrenceNoteMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getGetOccurrenceNoteMethod = GrafeasGrpc.getGetOccurrenceNoteMethod) == null) { - GrafeasGrpc.getGetOccurrenceNoteMethod = getGetOccurrenceNoteMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOccurrenceNote")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.GetOccurrenceNoteRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.Note.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("GetOccurrenceNote")) - .build(); - } - } - } - return getGetOccurrenceNoteMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetNoteMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetNote", - requestType = io.grafeas.v1.GetNoteRequest.class, - responseType = io.grafeas.v1.Note.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetNoteMethod() { - io.grpc.MethodDescriptor getGetNoteMethod; - if ((getGetNoteMethod = GrafeasGrpc.getGetNoteMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getGetNoteMethod = GrafeasGrpc.getGetNoteMethod) == null) { - GrafeasGrpc.getGetNoteMethod = getGetNoteMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNote")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.GetNoteRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.Note.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("GetNote")) - .build(); - } - } - } - return getGetNoteMethod; - } - - private static volatile io.grpc.MethodDescriptor getListNotesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListNotes", - requestType = io.grafeas.v1.ListNotesRequest.class, - responseType = io.grafeas.v1.ListNotesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListNotesMethod() { - io.grpc.MethodDescriptor getListNotesMethod; - if ((getListNotesMethod = GrafeasGrpc.getListNotesMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getListNotesMethod = GrafeasGrpc.getListNotesMethod) == null) { - GrafeasGrpc.getListNotesMethod = getListNotesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNotes")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.ListNotesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.ListNotesResponse.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("ListNotes")) - .build(); - } - } - } - return getListNotesMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteNoteMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteNote", - requestType = io.grafeas.v1.DeleteNoteRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteNoteMethod() { - io.grpc.MethodDescriptor getDeleteNoteMethod; - if ((getDeleteNoteMethod = GrafeasGrpc.getDeleteNoteMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getDeleteNoteMethod = GrafeasGrpc.getDeleteNoteMethod) == null) { - GrafeasGrpc.getDeleteNoteMethod = getDeleteNoteMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNote")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.DeleteNoteRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("DeleteNote")) - .build(); - } - } - } - return getDeleteNoteMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateNoteMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateNote", - requestType = io.grafeas.v1.CreateNoteRequest.class, - responseType = io.grafeas.v1.Note.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateNoteMethod() { - io.grpc.MethodDescriptor getCreateNoteMethod; - if ((getCreateNoteMethod = GrafeasGrpc.getCreateNoteMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getCreateNoteMethod = GrafeasGrpc.getCreateNoteMethod) == null) { - GrafeasGrpc.getCreateNoteMethod = getCreateNoteMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNote")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.CreateNoteRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.Note.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("CreateNote")) - .build(); - } - } - } - return getCreateNoteMethod; - } - - private static volatile io.grpc.MethodDescriptor getBatchCreateNotesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchCreateNotes", - requestType = io.grafeas.v1.BatchCreateNotesRequest.class, - responseType = io.grafeas.v1.BatchCreateNotesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBatchCreateNotesMethod() { - io.grpc.MethodDescriptor getBatchCreateNotesMethod; - if ((getBatchCreateNotesMethod = GrafeasGrpc.getBatchCreateNotesMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getBatchCreateNotesMethod = GrafeasGrpc.getBatchCreateNotesMethod) == null) { - GrafeasGrpc.getBatchCreateNotesMethod = getBatchCreateNotesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchCreateNotes")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.BatchCreateNotesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.BatchCreateNotesResponse.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("BatchCreateNotes")) - .build(); - } - } - } - return getBatchCreateNotesMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateNoteMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateNote", - requestType = io.grafeas.v1.UpdateNoteRequest.class, - responseType = io.grafeas.v1.Note.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateNoteMethod() { - io.grpc.MethodDescriptor getUpdateNoteMethod; - if ((getUpdateNoteMethod = GrafeasGrpc.getUpdateNoteMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getUpdateNoteMethod = GrafeasGrpc.getUpdateNoteMethod) == null) { - GrafeasGrpc.getUpdateNoteMethod = getUpdateNoteMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateNote")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.UpdateNoteRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.Note.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("UpdateNote")) - .build(); - } - } - } - return getUpdateNoteMethod; - } - - private static volatile io.grpc.MethodDescriptor getListNoteOccurrencesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListNoteOccurrences", - requestType = io.grafeas.v1.ListNoteOccurrencesRequest.class, - responseType = io.grafeas.v1.ListNoteOccurrencesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListNoteOccurrencesMethod() { - io.grpc.MethodDescriptor getListNoteOccurrencesMethod; - if ((getListNoteOccurrencesMethod = GrafeasGrpc.getListNoteOccurrencesMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getListNoteOccurrencesMethod = GrafeasGrpc.getListNoteOccurrencesMethod) == null) { - GrafeasGrpc.getListNoteOccurrencesMethod = getListNoteOccurrencesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNoteOccurrences")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.ListNoteOccurrencesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.ListNoteOccurrencesResponse.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("ListNoteOccurrences")) - .build(); - } - } - } - return getListNoteOccurrencesMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static GrafeasStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public GrafeasStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new GrafeasStub(channel, callOptions); - } - }; - return GrafeasStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static GrafeasBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public GrafeasBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new GrafeasBlockingStub(channel, callOptions); - } - }; - return GrafeasBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static GrafeasFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public GrafeasFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new GrafeasFutureStub(channel, callOptions); - } - }; - return GrafeasFutureStub.newStub(factory, channel); - } - - /** - *
-   * [Grafeas](https://grafeas.io) API.
-   * Retrieves analysis results of Cloud components such as Docker container
-   * images.
-   * Analysis results are stored as a series of occurrences. An `Occurrence`
-   * contains information about a specific analysis instance on a resource. An
-   * occurrence refers to a `Note`. A note contains details describing the
-   * analysis and is generally stored in a separate project, called a `Provider`.
-   * Multiple occurrences can refer to the same note.
-   * For example, an SSL vulnerability could affect multiple images. In this case,
-   * there would be one note for the vulnerability and an occurrence for each
-   * image with the vulnerability referring to that note.
-   * 
- */ - public static abstract class GrafeasImplBase implements io.grpc.BindableService { - - /** - *
-     * Gets the specified occurrence.
-     * 
- */ - public void getOccurrence(io.grafeas.v1.GetOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOccurrenceMethod(), responseObserver); - } - - /** - *
-     * Lists occurrences for the specified project.
-     * 
- */ - public void listOccurrences(io.grafeas.v1.ListOccurrencesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListOccurrencesMethod(), responseObserver); - } - - /** - *
-     * Deletes the specified occurrence. For example, use this method to delete an
-     * occurrence when the occurrence is no longer applicable for the given
-     * resource.
-     * 
- */ - public void deleteOccurrence(io.grafeas.v1.DeleteOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteOccurrenceMethod(), responseObserver); - } - - /** - *
-     * Creates a new occurrence.
-     * 
- */ - public void createOccurrence(io.grafeas.v1.CreateOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateOccurrenceMethod(), responseObserver); - } - - /** - *
-     * Creates new occurrences in batch.
-     * 
- */ - public void batchCreateOccurrences(io.grafeas.v1.BatchCreateOccurrencesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchCreateOccurrencesMethod(), responseObserver); - } - - /** - *
-     * Updates the specified occurrence.
-     * 
- */ - public void updateOccurrence(io.grafeas.v1.UpdateOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateOccurrenceMethod(), responseObserver); - } - - /** - *
-     * Gets the note attached to the specified occurrence. Consumer projects can
-     * use this method to get a note that belongs to a provider project.
-     * 
- */ - public void getOccurrenceNote(io.grafeas.v1.GetOccurrenceNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOccurrenceNoteMethod(), responseObserver); - } - - /** - *
-     * Gets the specified note.
-     * 
- */ - public void getNote(io.grafeas.v1.GetNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNoteMethod(), responseObserver); - } - - /** - *
-     * Lists notes for the specified project.
-     * 
- */ - public void listNotes(io.grafeas.v1.ListNotesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNotesMethod(), responseObserver); - } - - /** - *
-     * Deletes the specified note.
-     * 
- */ - public void deleteNote(io.grafeas.v1.DeleteNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNoteMethod(), responseObserver); - } - - /** - *
-     * Creates a new note.
-     * 
- */ - public void createNote(io.grafeas.v1.CreateNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNoteMethod(), responseObserver); - } - - /** - *
-     * Creates new notes in batch.
-     * 
- */ - public void batchCreateNotes(io.grafeas.v1.BatchCreateNotesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchCreateNotesMethod(), responseObserver); - } - - /** - *
-     * Updates the specified note.
-     * 
- */ - public void updateNote(io.grafeas.v1.UpdateNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateNoteMethod(), responseObserver); - } - - /** - *
-     * Lists occurrences referencing the specified note. Provider projects can use
-     * this method to get all occurrences across consumer projects referencing the
-     * specified note.
-     * 
- */ - public void listNoteOccurrences(io.grafeas.v1.ListNoteOccurrencesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNoteOccurrencesMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getGetOccurrenceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.GetOccurrenceRequest, - io.grafeas.v1.Occurrence>( - this, METHODID_GET_OCCURRENCE))) - .addMethod( - getListOccurrencesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.ListOccurrencesRequest, - io.grafeas.v1.ListOccurrencesResponse>( - this, METHODID_LIST_OCCURRENCES))) - .addMethod( - getDeleteOccurrenceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.DeleteOccurrenceRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_OCCURRENCE))) - .addMethod( - getCreateOccurrenceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.CreateOccurrenceRequest, - io.grafeas.v1.Occurrence>( - this, METHODID_CREATE_OCCURRENCE))) - .addMethod( - getBatchCreateOccurrencesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.BatchCreateOccurrencesRequest, - io.grafeas.v1.BatchCreateOccurrencesResponse>( - this, METHODID_BATCH_CREATE_OCCURRENCES))) - .addMethod( - getUpdateOccurrenceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.UpdateOccurrenceRequest, - io.grafeas.v1.Occurrence>( - this, METHODID_UPDATE_OCCURRENCE))) - .addMethod( - getGetOccurrenceNoteMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.GetOccurrenceNoteRequest, - io.grafeas.v1.Note>( - this, METHODID_GET_OCCURRENCE_NOTE))) - .addMethod( - getGetNoteMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.GetNoteRequest, - io.grafeas.v1.Note>( - this, METHODID_GET_NOTE))) - .addMethod( - getListNotesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.ListNotesRequest, - io.grafeas.v1.ListNotesResponse>( - this, METHODID_LIST_NOTES))) - .addMethod( - getDeleteNoteMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.DeleteNoteRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_NOTE))) - .addMethod( - getCreateNoteMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.CreateNoteRequest, - io.grafeas.v1.Note>( - this, METHODID_CREATE_NOTE))) - .addMethod( - getBatchCreateNotesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.BatchCreateNotesRequest, - io.grafeas.v1.BatchCreateNotesResponse>( - this, METHODID_BATCH_CREATE_NOTES))) - .addMethod( - getUpdateNoteMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.UpdateNoteRequest, - io.grafeas.v1.Note>( - this, METHODID_UPDATE_NOTE))) - .addMethod( - getListNoteOccurrencesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.ListNoteOccurrencesRequest, - io.grafeas.v1.ListNoteOccurrencesResponse>( - this, METHODID_LIST_NOTE_OCCURRENCES))) - .build(); - } - } - - /** - *
-   * [Grafeas](https://grafeas.io) API.
-   * Retrieves analysis results of Cloud components such as Docker container
-   * images.
-   * Analysis results are stored as a series of occurrences. An `Occurrence`
-   * contains information about a specific analysis instance on a resource. An
-   * occurrence refers to a `Note`. A note contains details describing the
-   * analysis and is generally stored in a separate project, called a `Provider`.
-   * Multiple occurrences can refer to the same note.
-   * For example, an SSL vulnerability could affect multiple images. In this case,
-   * there would be one note for the vulnerability and an occurrence for each
-   * image with the vulnerability referring to that note.
-   * 
- */ - public static final class GrafeasStub extends io.grpc.stub.AbstractAsyncStub { - private GrafeasStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected GrafeasStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new GrafeasStub(channel, callOptions); - } - - /** - *
-     * Gets the specified occurrence.
-     * 
- */ - public void getOccurrence(io.grafeas.v1.GetOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetOccurrenceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists occurrences for the specified project.
-     * 
- */ - public void listOccurrences(io.grafeas.v1.ListOccurrencesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListOccurrencesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes the specified occurrence. For example, use this method to delete an
-     * occurrence when the occurrence is no longer applicable for the given
-     * resource.
-     * 
- */ - public void deleteOccurrence(io.grafeas.v1.DeleteOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteOccurrenceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a new occurrence.
-     * 
- */ - public void createOccurrence(io.grafeas.v1.CreateOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateOccurrenceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates new occurrences in batch.
-     * 
- */ - public void batchCreateOccurrences(io.grafeas.v1.BatchCreateOccurrencesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchCreateOccurrencesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates the specified occurrence.
-     * 
- */ - public void updateOccurrence(io.grafeas.v1.UpdateOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateOccurrenceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets the note attached to the specified occurrence. Consumer projects can
-     * use this method to get a note that belongs to a provider project.
-     * 
- */ - public void getOccurrenceNote(io.grafeas.v1.GetOccurrenceNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetOccurrenceNoteMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets the specified note.
-     * 
- */ - public void getNote(io.grafeas.v1.GetNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetNoteMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists notes for the specified project.
-     * 
- */ - public void listNotes(io.grafeas.v1.ListNotesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListNotesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes the specified note.
-     * 
- */ - public void deleteNote(io.grafeas.v1.DeleteNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteNoteMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a new note.
-     * 
- */ - public void createNote(io.grafeas.v1.CreateNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateNoteMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates new notes in batch.
-     * 
- */ - public void batchCreateNotes(io.grafeas.v1.BatchCreateNotesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchCreateNotesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates the specified note.
-     * 
- */ - public void updateNote(io.grafeas.v1.UpdateNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateNoteMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists occurrences referencing the specified note. Provider projects can use
-     * this method to get all occurrences across consumer projects referencing the
-     * specified note.
-     * 
- */ - public void listNoteOccurrences(io.grafeas.v1.ListNoteOccurrencesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListNoteOccurrencesMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * [Grafeas](https://grafeas.io) API.
-   * Retrieves analysis results of Cloud components such as Docker container
-   * images.
-   * Analysis results are stored as a series of occurrences. An `Occurrence`
-   * contains information about a specific analysis instance on a resource. An
-   * occurrence refers to a `Note`. A note contains details describing the
-   * analysis and is generally stored in a separate project, called a `Provider`.
-   * Multiple occurrences can refer to the same note.
-   * For example, an SSL vulnerability could affect multiple images. In this case,
-   * there would be one note for the vulnerability and an occurrence for each
-   * image with the vulnerability referring to that note.
-   * 
- */ - public static final class GrafeasBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private GrafeasBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected GrafeasBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new GrafeasBlockingStub(channel, callOptions); - } - - /** - *
-     * Gets the specified occurrence.
-     * 
- */ - public io.grafeas.v1.Occurrence getOccurrence(io.grafeas.v1.GetOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetOccurrenceMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists occurrences for the specified project.
-     * 
- */ - public io.grafeas.v1.ListOccurrencesResponse listOccurrences(io.grafeas.v1.ListOccurrencesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListOccurrencesMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes the specified occurrence. For example, use this method to delete an
-     * occurrence when the occurrence is no longer applicable for the given
-     * resource.
-     * 
- */ - public com.google.protobuf.Empty deleteOccurrence(io.grafeas.v1.DeleteOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteOccurrenceMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a new occurrence.
-     * 
- */ - public io.grafeas.v1.Occurrence createOccurrence(io.grafeas.v1.CreateOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateOccurrenceMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates new occurrences in batch.
-     * 
- */ - public io.grafeas.v1.BatchCreateOccurrencesResponse batchCreateOccurrences(io.grafeas.v1.BatchCreateOccurrencesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBatchCreateOccurrencesMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates the specified occurrence.
-     * 
- */ - public io.grafeas.v1.Occurrence updateOccurrence(io.grafeas.v1.UpdateOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateOccurrenceMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets the note attached to the specified occurrence. Consumer projects can
-     * use this method to get a note that belongs to a provider project.
-     * 
- */ - public io.grafeas.v1.Note getOccurrenceNote(io.grafeas.v1.GetOccurrenceNoteRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetOccurrenceNoteMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets the specified note.
-     * 
- */ - public io.grafeas.v1.Note getNote(io.grafeas.v1.GetNoteRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetNoteMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists notes for the specified project.
-     * 
- */ - public io.grafeas.v1.ListNotesResponse listNotes(io.grafeas.v1.ListNotesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListNotesMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes the specified note.
-     * 
- */ - public com.google.protobuf.Empty deleteNote(io.grafeas.v1.DeleteNoteRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteNoteMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a new note.
-     * 
- */ - public io.grafeas.v1.Note createNote(io.grafeas.v1.CreateNoteRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateNoteMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates new notes in batch.
-     * 
- */ - public io.grafeas.v1.BatchCreateNotesResponse batchCreateNotes(io.grafeas.v1.BatchCreateNotesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBatchCreateNotesMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates the specified note.
-     * 
- */ - public io.grafeas.v1.Note updateNote(io.grafeas.v1.UpdateNoteRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateNoteMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists occurrences referencing the specified note. Provider projects can use
-     * this method to get all occurrences across consumer projects referencing the
-     * specified note.
-     * 
- */ - public io.grafeas.v1.ListNoteOccurrencesResponse listNoteOccurrences(io.grafeas.v1.ListNoteOccurrencesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListNoteOccurrencesMethod(), getCallOptions(), request); - } - } - - /** - *
-   * [Grafeas](https://grafeas.io) API.
-   * Retrieves analysis results of Cloud components such as Docker container
-   * images.
-   * Analysis results are stored as a series of occurrences. An `Occurrence`
-   * contains information about a specific analysis instance on a resource. An
-   * occurrence refers to a `Note`. A note contains details describing the
-   * analysis and is generally stored in a separate project, called a `Provider`.
-   * Multiple occurrences can refer to the same note.
-   * For example, an SSL vulnerability could affect multiple images. In this case,
-   * there would be one note for the vulnerability and an occurrence for each
-   * image with the vulnerability referring to that note.
-   * 
- */ - public static final class GrafeasFutureStub extends io.grpc.stub.AbstractFutureStub { - private GrafeasFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected GrafeasFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new GrafeasFutureStub(channel, callOptions); - } - - /** - *
-     * Gets the specified occurrence.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getOccurrence( - io.grafeas.v1.GetOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetOccurrenceMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists occurrences for the specified project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listOccurrences( - io.grafeas.v1.ListOccurrencesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListOccurrencesMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes the specified occurrence. For example, use this method to delete an
-     * occurrence when the occurrence is no longer applicable for the given
-     * resource.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteOccurrence( - io.grafeas.v1.DeleteOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteOccurrenceMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a new occurrence.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createOccurrence( - io.grafeas.v1.CreateOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateOccurrenceMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates new occurrences in batch.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture batchCreateOccurrences( - io.grafeas.v1.BatchCreateOccurrencesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchCreateOccurrencesMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates the specified occurrence.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateOccurrence( - io.grafeas.v1.UpdateOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateOccurrenceMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets the note attached to the specified occurrence. Consumer projects can
-     * use this method to get a note that belongs to a provider project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getOccurrenceNote( - io.grafeas.v1.GetOccurrenceNoteRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetOccurrenceNoteMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets the specified note.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getNote( - io.grafeas.v1.GetNoteRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetNoteMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists notes for the specified project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listNotes( - io.grafeas.v1.ListNotesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListNotesMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes the specified note.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteNote( - io.grafeas.v1.DeleteNoteRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteNoteMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a new note.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createNote( - io.grafeas.v1.CreateNoteRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateNoteMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates new notes in batch.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture batchCreateNotes( - io.grafeas.v1.BatchCreateNotesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchCreateNotesMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates the specified note.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateNote( - io.grafeas.v1.UpdateNoteRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateNoteMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists occurrences referencing the specified note. Provider projects can use
-     * this method to get all occurrences across consumer projects referencing the
-     * specified note.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listNoteOccurrences( - io.grafeas.v1.ListNoteOccurrencesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListNoteOccurrencesMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_GET_OCCURRENCE = 0; - private static final int METHODID_LIST_OCCURRENCES = 1; - private static final int METHODID_DELETE_OCCURRENCE = 2; - private static final int METHODID_CREATE_OCCURRENCE = 3; - private static final int METHODID_BATCH_CREATE_OCCURRENCES = 4; - private static final int METHODID_UPDATE_OCCURRENCE = 5; - private static final int METHODID_GET_OCCURRENCE_NOTE = 6; - private static final int METHODID_GET_NOTE = 7; - private static final int METHODID_LIST_NOTES = 8; - private static final int METHODID_DELETE_NOTE = 9; - private static final int METHODID_CREATE_NOTE = 10; - private static final int METHODID_BATCH_CREATE_NOTES = 11; - private static final int METHODID_UPDATE_NOTE = 12; - private static final int METHODID_LIST_NOTE_OCCURRENCES = 13; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final GrafeasImplBase serviceImpl; - private final int methodId; - - MethodHandlers(GrafeasImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_GET_OCCURRENCE: - serviceImpl.getOccurrence((io.grafeas.v1.GetOccurrenceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_OCCURRENCES: - serviceImpl.listOccurrences((io.grafeas.v1.ListOccurrencesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_OCCURRENCE: - serviceImpl.deleteOccurrence((io.grafeas.v1.DeleteOccurrenceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_OCCURRENCE: - serviceImpl.createOccurrence((io.grafeas.v1.CreateOccurrenceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_BATCH_CREATE_OCCURRENCES: - serviceImpl.batchCreateOccurrences((io.grafeas.v1.BatchCreateOccurrencesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_OCCURRENCE: - serviceImpl.updateOccurrence((io.grafeas.v1.UpdateOccurrenceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_OCCURRENCE_NOTE: - serviceImpl.getOccurrenceNote((io.grafeas.v1.GetOccurrenceNoteRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_NOTE: - serviceImpl.getNote((io.grafeas.v1.GetNoteRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_NOTES: - serviceImpl.listNotes((io.grafeas.v1.ListNotesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_NOTE: - serviceImpl.deleteNote((io.grafeas.v1.DeleteNoteRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_NOTE: - serviceImpl.createNote((io.grafeas.v1.CreateNoteRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_BATCH_CREATE_NOTES: - serviceImpl.batchCreateNotes((io.grafeas.v1.BatchCreateNotesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_NOTE: - serviceImpl.updateNote((io.grafeas.v1.UpdateNoteRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_NOTE_OCCURRENCES: - serviceImpl.listNoteOccurrences((io.grafeas.v1.ListNoteOccurrencesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class GrafeasBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - GrafeasBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Grafeas"); - } - } - - private static final class GrafeasFileDescriptorSupplier - extends GrafeasBaseDescriptorSupplier { - GrafeasFileDescriptorSupplier() {} - } - - private static final class GrafeasMethodDescriptorSupplier - extends GrafeasBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - GrafeasMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (GrafeasGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new GrafeasFileDescriptorSupplier()) - .addMethod(getGetOccurrenceMethod()) - .addMethod(getListOccurrencesMethod()) - .addMethod(getDeleteOccurrenceMethod()) - .addMethod(getCreateOccurrenceMethod()) - .addMethod(getBatchCreateOccurrencesMethod()) - .addMethod(getUpdateOccurrenceMethod()) - .addMethod(getGetOccurrenceNoteMethod()) - .addMethod(getGetNoteMethod()) - .addMethod(getListNotesMethod()) - .addMethod(getDeleteNoteMethod()) - .addMethod(getCreateNoteMethod()) - .addMethod(getBatchCreateNotesMethod()) - .addMethod(getUpdateNoteMethod()) - .addMethod(getListNoteOccurrencesMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java deleted file mode 100644 index 12056463b434..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java +++ /dev/null @@ -1,487 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public final class GrafeasOuterClass { - private GrafeasOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Occurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Occurrence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Note_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Note_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_GetNoteRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ListNotesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ListNotesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DeleteNoteRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_CreateNoteRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_UpdateNoteRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\030grafeas/v1/grafeas.proto\022\ngrafeas.v1\032\034" + - "google/api/annotations.proto\032\027google/api" + - "/client.proto\032\037google/api/field_behavior" + - ".proto\032\031google/api/resource.proto\032\033googl" + - "e/protobuf/empty.proto\032 google/protobuf/" + - "field_mask.proto\032\037google/protobuf/timest" + - "amp.proto\032\034grafeas/v1/attestation.proto\032" + - "\026grafeas/v1/build.proto\032\027grafeas/v1/comm" + - "on.proto\032\033grafeas/v1/compliance.proto\032\033g" + - "rafeas/v1/deployment.proto\032\032grafeas/v1/d" + - "iscovery.proto\032!grafeas/v1/dsse_attestat" + - "ion.proto\032\026grafeas/v1/image.proto\032\030grafe" + - "as/v1/package.proto\032\030grafeas/v1/upgrade." + - "proto\032\036grafeas/v1/vulnerability.proto\"\373\006" + - "\n\nOccurrence\022\014\n\004name\030\001 \001(\t\022\024\n\014resource_u" + - "ri\030\002 \001(\t\022\021\n\tnote_name\030\003 \001(\t\022\"\n\004kind\030\004 \001(" + - "\0162\024.grafeas.v1.NoteKind\022\023\n\013remediation\030\005" + - " \001(\t\022/\n\013create_time\030\006 \001(\0132\032.google.proto" + - "buf.Timestamp\022/\n\013update_time\030\007 \001(\0132\032.goo" + - "gle.protobuf.Timestamp\022<\n\rvulnerability\030" + - "\010 \001(\0132#.grafeas.v1.VulnerabilityOccurren" + - "ceH\000\022,\n\005build\030\t \001(\0132\033.grafeas.v1.BuildOc" + - "currenceH\000\022,\n\005image\030\n \001(\0132\033.grafeas.v1.I" + - "mageOccurrenceH\000\0220\n\007package\030\013 \001(\0132\035.graf" + - "eas.v1.PackageOccurrenceH\000\0226\n\ndeployment" + - "\030\014 \001(\0132 .grafeas.v1.DeploymentOccurrence" + - "H\000\0224\n\tdiscovery\030\r \001(\0132\037.grafeas.v1.Disco" + - "veryOccurrenceH\000\0228\n\013attestation\030\016 \001(\0132!." + - "grafeas.v1.AttestationOccurrenceH\000\0220\n\007up" + - "grade\030\017 \001(\0132\035.grafeas.v1.UpgradeOccurren" + - "ceH\000\0226\n\ncompliance\030\020 \001(\0132 .grafeas.v1.Co" + - "mplianceOccurrenceH\000\022A\n\020dsse_attestation" + - "\030\021 \001(\0132%.grafeas.v1.DSSEAttestationOccur" + - "renceH\000\022&\n\010envelope\030\022 \001(\0132\024.grafeas.v1.E" + - "nvelope:G\352AD\n\025grafeas.io/Occurrence\022+pro" + - "jects/{project}/occurrences/{occurrence}" + - "B\t\n\007details\"\361\006\n\004Note\022\014\n\004name\030\001 \001(\t\022\031\n\021sh" + - "ort_description\030\002 \001(\t\022\030\n\020long_descriptio" + - "n\030\003 \001(\t\022\"\n\004kind\030\004 \001(\0162\024.grafeas.v1.NoteK" + - "ind\022+\n\013related_url\030\005 \003(\0132\026.grafeas.v1.Re" + - "latedUrl\0223\n\017expiration_time\030\006 \001(\0132\032.goog" + - "le.protobuf.Timestamp\022/\n\013create_time\030\007 \001" + - "(\0132\032.google.protobuf.Timestamp\022/\n\013update" + - "_time\030\010 \001(\0132\032.google.protobuf.Timestamp\022" + - "\032\n\022related_note_names\030\t \003(\t\0226\n\rvulnerabi" + - "lity\030\n \001(\0132\035.grafeas.v1.VulnerabilityNot" + - "eH\000\022&\n\005build\030\013 \001(\0132\025.grafeas.v1.BuildNot" + - "eH\000\022&\n\005image\030\014 \001(\0132\025.grafeas.v1.ImageNot" + - "eH\000\022*\n\007package\030\r \001(\0132\027.grafeas.v1.Packag" + - "eNoteH\000\0220\n\ndeployment\030\016 \001(\0132\032.grafeas.v1" + - ".DeploymentNoteH\000\022.\n\tdiscovery\030\017 \001(\0132\031.g" + - "rafeas.v1.DiscoveryNoteH\000\0222\n\013attestation" + - "\030\020 \001(\0132\033.grafeas.v1.AttestationNoteH\000\022*\n" + - "\007upgrade\030\021 \001(\0132\027.grafeas.v1.UpgradeNoteH" + - "\000\0220\n\ncompliance\030\022 \001(\0132\032.grafeas.v1.Compl" + - "ianceNoteH\000\022;\n\020dsse_attestation\030\023 \001(\0132\037." + - "grafeas.v1.DSSEAttestationNoteH\000:5\352A2\n\017g" + - "rafeas.io/Note\022\037projects/{project}/notes" + - "/{note}B\006\n\004type\"C\n\024GetOccurrenceRequest\022" + - "+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io/Occurr" + - "ence\"{\n\026ListOccurrencesRequest\022*\n\006parent" + - "\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Project\022\016\n\006fi" + - "lter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_to" + - "ken\030\004 \001(\t\"_\n\027ListOccurrencesResponse\022+\n\013" + - "occurrences\030\001 \003(\0132\026.grafeas.v1.Occurrenc" + - "e\022\027\n\017next_page_token\030\002 \001(\t\"F\n\027DeleteOccu" + - "rrenceRequest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025gra" + - "feas.io/Occurrence\"v\n\027CreateOccurrenceRe" + - "quest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.i" + - "o/Project\022/\n\noccurrence\030\002 \001(\0132\026.grafeas." + - "v1.OccurrenceB\003\340A\002\"\250\001\n\027UpdateOccurrenceR" + - "equest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io" + - "/Occurrence\022/\n\noccurrence\030\002 \001(\0132\026.grafea" + - "s.v1.OccurrenceB\003\340A\002\022/\n\013update_mask\030\003 \001(" + - "\0132\032.google.protobuf.FieldMask\"7\n\016GetNote" + - "Request\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.i" + - "o/Note\"G\n\030GetOccurrenceNoteRequest\022+\n\004na" + - "me\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io/Occurrence\"" + - "u\n\020ListNotesRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002" + - "\372A\024\n\022grafeas.io/Project\022\016\n\006filter\030\002 \001(\t\022" + - "\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"M" + - "\n\021ListNotesResponse\022\037\n\005notes\030\001 \003(\0132\020.gra" + - "feas.v1.Note\022\027\n\017next_page_token\030\002 \001(\t\":\n" + - "\021DeleteNoteRequest\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021" + - "\n\017grafeas.io/Note\"z\n\021CreateNoteRequest\022*" + - "\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Proje" + - "ct\022\024\n\007note_id\030\002 \001(\tB\003\340A\002\022#\n\004note\030\003 \001(\0132\020" + - ".grafeas.v1.NoteB\003\340A\002\"\220\001\n\021UpdateNoteRequ" + - "est\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.io/No" + - "te\022#\n\004note\030\002 \001(\0132\020.grafeas.v1.NoteB\003\340A\002\022" + - "/\n\013update_mask\030\003 \001(\0132\032.google.protobuf.F" + - "ieldMask\"z\n\032ListNoteOccurrencesRequest\022%" + - "\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.io/Note\022\016\n" + - "\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage" + - "_token\030\004 \001(\t\"c\n\033ListNoteOccurrencesRespo" + - "nse\022+\n\013occurrences\030\001 \003(\0132\026.grafeas.v1.Oc" + - "currence\022\027\n\017next_page_token\030\002 \001(\t\"\311\001\n\027Ba" + - "tchCreateNotesRequest\022*\n\006parent\030\001 \001(\tB\032\340" + - "A\002\372A\024\n\022grafeas.io/Project\022B\n\005notes\030\002 \003(\013" + - "2..grafeas.v1.BatchCreateNotesRequest.No" + - "tesEntryB\003\340A\002\032>\n\nNotesEntry\022\013\n\003key\030\001 \001(\t" + - "\022\037\n\005value\030\002 \001(\0132\020.grafeas.v1.Note:\0028\001\";\n" + - "\030BatchCreateNotesResponse\022\037\n\005notes\030\001 \003(\013" + - "2\020.grafeas.v1.Note\"}\n\035BatchCreateOccurre" + - "ncesRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022gra" + - "feas.io/Project\0220\n\013occurrences\030\002 \003(\0132\026.g" + - "rafeas.v1.OccurrenceB\003\340A\002\"M\n\036BatchCreate" + - "OccurrencesResponse\022+\n\013occurrences\030\001 \003(\013" + - "2\026.grafeas.v1.Occurrence2\222\020\n\007Grafeas\022}\n\r" + - "GetOccurrence\022 .grafeas.v1.GetOccurrence" + - "Request\032\026.grafeas.v1.Occurrence\"2\202\323\344\223\002%\022" + - "#/v1/{name=projects/*/occurrences/*}\332A\004n" + - "ame\022\227\001\n\017ListOccurrences\022\".grafeas.v1.Lis" + - "tOccurrencesRequest\032#.grafeas.v1.ListOcc" + - "urrencesResponse\";\202\323\344\223\002%\022#/v1/{parent=pr" + - "ojects/*}/occurrences\332A\rparent,filter\022\203\001" + - "\n\020DeleteOccurrence\022#.grafeas.v1.DeleteOc" + - "currenceRequest\032\026.google.protobuf.Empty\"" + - "2\202\323\344\223\002%*#/v1/{name=projects/*/occurrence" + - "s/*}\332A\004name\022\234\001\n\020CreateOccurrence\022#.grafe" + - "as.v1.CreateOccurrenceRequest\032\026.grafeas." + - "v1.Occurrence\"K\202\323\344\223\0021\"#/v1/{parent=proje" + - "cts/*}/occurrences:\noccurrence\332A\021parent," + - "occurrence\022\300\001\n\026BatchCreateOccurrences\022)." + - "grafeas.v1.BatchCreateOccurrencesRequest" + - "\032*.grafeas.v1.BatchCreateOccurrencesResp" + - "onse\"O\202\323\344\223\0024\"//v1/{parent=projects/*}/oc" + - "currences:batchCreate:\001*\332A\022parent,occurr" + - "ences\022\246\001\n\020UpdateOccurrence\022#.grafeas.v1." + - "UpdateOccurrenceRequest\032\026.grafeas.v1.Occ" + - "urrence\"U\202\323\344\223\00212#/v1/{name=projects/*/oc" + - "currences/*}:\noccurrence\332A\033name,occurren" + - "ce,update_mask\022\205\001\n\021GetOccurrenceNote\022$.g" + - "rafeas.v1.GetOccurrenceNoteRequest\032\020.gra" + - "feas.v1.Note\"8\202\323\344\223\002+\022)/v1/{name=projects" + - "/*/occurrences/*}/notes\332A\004name\022e\n\007GetNot" + - "e\022\032.grafeas.v1.GetNoteRequest\032\020.grafeas." + - "v1.Note\",\202\323\344\223\002\037\022\035/v1/{name=projects/*/no" + - "tes/*}\332A\004name\022\177\n\tListNotes\022\034.grafeas.v1." + - "ListNotesRequest\032\035.grafeas.v1.ListNotesR" + - "esponse\"5\202\323\344\223\002\037\022\035/v1/{parent=projects/*}" + - "/notes\332A\rparent,filter\022q\n\nDeleteNote\022\035.g" + - "rafeas.v1.DeleteNoteRequest\032\026.google.pro" + - "tobuf.Empty\",\202\323\344\223\002\037*\035/v1/{name=projects/" + - "*/notes/*}\332A\004name\022\200\001\n\nCreateNote\022\035.grafe" + - "as.v1.CreateNoteRequest\032\020.grafeas.v1.Not" + - "e\"A\202\323\344\223\002%\"\035/v1/{parent=projects/*}/notes" + - ":\004note\332A\023parent,note_id,note\022\242\001\n\020BatchCr" + - "eateNotes\022#.grafeas.v1.BatchCreateNotesR" + - "equest\032$.grafeas.v1.BatchCreateNotesResp" + - "onse\"C\202\323\344\223\002.\")/v1/{parent=projects/*}/no" + - "tes:batchCreate:\001*\332A\014parent,notes\022\202\001\n\nUp" + - "dateNote\022\035.grafeas.v1.UpdateNoteRequest\032" + - "\020.grafeas.v1.Note\"C\202\323\344\223\002%2\035/v1/{name=pro" + - "jects/*/notes/*}:\004note\332A\025name,note,updat" + - "e_mask\022\247\001\n\023ListNoteOccurrences\022&.grafeas" + - ".v1.ListNoteOccurrencesRequest\032\'.grafeas" + - ".v1.ListNoteOccurrencesResponse\"?\202\323\344\223\002+\022" + - ")/v1/{name=projects/*/notes/*}/occurrenc" + - "es\332A\013name,filter\032#\312A containeranalysis.g" + - "oogleapis.comB|\n\rio.grafeas.v1P\001Z8google" + - ".golang.org/genproto/googleapis/grafeas/" + - "v1;grafeas\242\002\003GRA\352A(\n\022grafeas.io/Project\022" + - "\022projects/{project}b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - io.grafeas.v1.Attestation.getDescriptor(), - io.grafeas.v1.Build.getDescriptor(), - io.grafeas.v1.Common.getDescriptor(), - io.grafeas.v1.Compliance.getDescriptor(), - io.grafeas.v1.Deployment.getDescriptor(), - io.grafeas.v1.Discovery.getDescriptor(), - io.grafeas.v1.DsseAttestation.getDescriptor(), - io.grafeas.v1.Image.getDescriptor(), - io.grafeas.v1.Package.getDescriptor(), - io.grafeas.v1.Upgrade.getDescriptor(), - io.grafeas.v1.Vulnerability.getDescriptor(), - }); - internal_static_grafeas_v1_Occurrence_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_Occurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Occurrence_descriptor, - new java.lang.String[] { "Name", "ResourceUri", "NoteName", "Kind", "Remediation", "CreateTime", "UpdateTime", "Vulnerability", "Build", "Image", "Package", "Deployment", "Discovery", "Attestation", "Upgrade", "Compliance", "DsseAttestation", "Envelope", "Details", }); - internal_static_grafeas_v1_Note_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Note_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Note_descriptor, - new java.lang.String[] { "Name", "ShortDescription", "LongDescription", "Kind", "RelatedUrl", "ExpirationTime", "CreateTime", "UpdateTime", "RelatedNoteNames", "Vulnerability", "Build", "Image", "Package", "Deployment", "Discovery", "Attestation", "Upgrade", "Compliance", "DsseAttestation", "Type", }); - internal_static_grafeas_v1_GetOccurrenceRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_GetOccurrenceRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_grafeas_v1_ListOccurrencesRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ListOccurrencesRequest_descriptor, - new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", }); - internal_static_grafeas_v1_ListOccurrencesResponse_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ListOccurrencesResponse_descriptor, - new java.lang.String[] { "Occurrences", "NextPageToken", }); - internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor, - new java.lang.String[] { "Parent", "Occurrence", }); - internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor, - new java.lang.String[] { "Name", "Occurrence", "UpdateMask", }); - internal_static_grafeas_v1_GetNoteRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_GetNoteRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_grafeas_v1_ListNotesRequest_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ListNotesRequest_descriptor, - new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", }); - internal_static_grafeas_v1_ListNotesResponse_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ListNotesResponse_descriptor, - new java.lang.String[] { "Notes", "NextPageToken", }); - internal_static_grafeas_v1_DeleteNoteRequest_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DeleteNoteRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_grafeas_v1_CreateNoteRequest_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_CreateNoteRequest_descriptor, - new java.lang.String[] { "Parent", "NoteId", "Note", }); - internal_static_grafeas_v1_UpdateNoteRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_UpdateNoteRequest_descriptor, - new java.lang.String[] { "Name", "Note", "UpdateMask", }); - internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor, - new java.lang.String[] { "Name", "Filter", "PageSize", "PageToken", }); - internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor, - new java.lang.String[] { "Occurrences", "NextPageToken", }); - internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor, - new java.lang.String[] { "Parent", "Notes", }); - internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor = - internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor, - new java.lang.String[] { "Notes", }); - internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor, - new java.lang.String[] { "Parent", "Occurrences", }); - internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor, - new java.lang.String[] { "Occurrences", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceDefinition); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - io.grafeas.v1.Attestation.getDescriptor(); - io.grafeas.v1.Build.getDescriptor(); - io.grafeas.v1.Common.getDescriptor(); - io.grafeas.v1.Compliance.getDescriptor(); - io.grafeas.v1.Deployment.getDescriptor(); - io.grafeas.v1.Discovery.getDescriptor(); - io.grafeas.v1.DsseAttestation.getDescriptor(); - io.grafeas.v1.Image.getDescriptor(); - io.grafeas.v1.Package.getDescriptor(); - io.grafeas.v1.Upgrade.getDescriptor(); - io.grafeas.v1.Vulnerability.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java deleted file mode 100644 index 898f9ad61838..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.protobuf.Empty; -import io.grafeas.v1.stub.GrafeasStubSettings; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link GrafeasClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (containeranalysis.googleapis.com) and default port (443) are - * used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of getOccurrence to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GrafeasSettings.Builder grafeasSettingsBuilder = GrafeasSettings.newBuilder();
- * grafeasSettingsBuilder
- *     .getOccurrenceSettings()
- *     .setRetrySettings(
- *         grafeasSettingsBuilder
- *             .getOccurrenceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * GrafeasSettings grafeasSettings = grafeasSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class GrafeasSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to getOccurrence. */ - public UnaryCallSettings getOccurrenceSettings() { - return ((GrafeasStubSettings) getStubSettings()).getOccurrenceSettings(); - } - - /** Returns the object with the settings used for calls to listOccurrences. */ - public PagedCallSettings< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> - listOccurrencesSettings() { - return ((GrafeasStubSettings) getStubSettings()).listOccurrencesSettings(); - } - - /** Returns the object with the settings used for calls to deleteOccurrence. */ - public UnaryCallSettings deleteOccurrenceSettings() { - return ((GrafeasStubSettings) getStubSettings()).deleteOccurrenceSettings(); - } - - /** Returns the object with the settings used for calls to createOccurrence. */ - public UnaryCallSettings createOccurrenceSettings() { - return ((GrafeasStubSettings) getStubSettings()).createOccurrenceSettings(); - } - - /** Returns the object with the settings used for calls to batchCreateOccurrences. */ - public UnaryCallSettings - batchCreateOccurrencesSettings() { - return ((GrafeasStubSettings) getStubSettings()).batchCreateOccurrencesSettings(); - } - - /** Returns the object with the settings used for calls to updateOccurrence. */ - public UnaryCallSettings updateOccurrenceSettings() { - return ((GrafeasStubSettings) getStubSettings()).updateOccurrenceSettings(); - } - - /** Returns the object with the settings used for calls to getOccurrenceNote. */ - public UnaryCallSettings getOccurrenceNoteSettings() { - return ((GrafeasStubSettings) getStubSettings()).getOccurrenceNoteSettings(); - } - - /** Returns the object with the settings used for calls to getNote. */ - public UnaryCallSettings getNoteSettings() { - return ((GrafeasStubSettings) getStubSettings()).getNoteSettings(); - } - - /** Returns the object with the settings used for calls to listNotes. */ - public PagedCallSettings - listNotesSettings() { - return ((GrafeasStubSettings) getStubSettings()).listNotesSettings(); - } - - /** Returns the object with the settings used for calls to deleteNote. */ - public UnaryCallSettings deleteNoteSettings() { - return ((GrafeasStubSettings) getStubSettings()).deleteNoteSettings(); - } - - /** Returns the object with the settings used for calls to createNote. */ - public UnaryCallSettings createNoteSettings() { - return ((GrafeasStubSettings) getStubSettings()).createNoteSettings(); - } - - /** Returns the object with the settings used for calls to batchCreateNotes. */ - public UnaryCallSettings - batchCreateNotesSettings() { - return ((GrafeasStubSettings) getStubSettings()).batchCreateNotesSettings(); - } - - /** Returns the object with the settings used for calls to updateNote. */ - public UnaryCallSettings updateNoteSettings() { - return ((GrafeasStubSettings) getStubSettings()).updateNoteSettings(); - } - - /** Returns the object with the settings used for calls to listNoteOccurrences. */ - public PagedCallSettings< - ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> - listNoteOccurrencesSettings() { - return ((GrafeasStubSettings) getStubSettings()).listNoteOccurrencesSettings(); - } - - public static final GrafeasSettings create(GrafeasStubSettings stub) throws IOException { - return new GrafeasSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return GrafeasStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return GrafeasStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return GrafeasStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GrafeasStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return GrafeasStubSettings.defaultGrpcTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return GrafeasStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return GrafeasStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected GrafeasSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for GrafeasSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(GrafeasStubSettings.newBuilder(clientContext)); - } - - protected Builder(GrafeasSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(GrafeasStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(GrafeasStubSettings.newBuilder()); - } - - public GrafeasStubSettings.Builder getStubSettingsBuilder() { - return ((GrafeasStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to getOccurrence. */ - public UnaryCallSettings.Builder getOccurrenceSettings() { - return getStubSettingsBuilder().getOccurrenceSettings(); - } - - /** Returns the builder for the settings used for calls to listOccurrences. */ - public PagedCallSettings.Builder< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> - listOccurrencesSettings() { - return getStubSettingsBuilder().listOccurrencesSettings(); - } - - /** Returns the builder for the settings used for calls to deleteOccurrence. */ - public UnaryCallSettings.Builder deleteOccurrenceSettings() { - return getStubSettingsBuilder().deleteOccurrenceSettings(); - } - - /** Returns the builder for the settings used for calls to createOccurrence. */ - public UnaryCallSettings.Builder - createOccurrenceSettings() { - return getStubSettingsBuilder().createOccurrenceSettings(); - } - - /** Returns the builder for the settings used for calls to batchCreateOccurrences. */ - public UnaryCallSettings.Builder - batchCreateOccurrencesSettings() { - return getStubSettingsBuilder().batchCreateOccurrencesSettings(); - } - - /** Returns the builder for the settings used for calls to updateOccurrence. */ - public UnaryCallSettings.Builder - updateOccurrenceSettings() { - return getStubSettingsBuilder().updateOccurrenceSettings(); - } - - /** Returns the builder for the settings used for calls to getOccurrenceNote. */ - public UnaryCallSettings.Builder getOccurrenceNoteSettings() { - return getStubSettingsBuilder().getOccurrenceNoteSettings(); - } - - /** Returns the builder for the settings used for calls to getNote. */ - public UnaryCallSettings.Builder getNoteSettings() { - return getStubSettingsBuilder().getNoteSettings(); - } - - /** Returns the builder for the settings used for calls to listNotes. */ - public PagedCallSettings.Builder - listNotesSettings() { - return getStubSettingsBuilder().listNotesSettings(); - } - - /** Returns the builder for the settings used for calls to deleteNote. */ - public UnaryCallSettings.Builder deleteNoteSettings() { - return getStubSettingsBuilder().deleteNoteSettings(); - } - - /** Returns the builder for the settings used for calls to createNote. */ - public UnaryCallSettings.Builder createNoteSettings() { - return getStubSettingsBuilder().createNoteSettings(); - } - - /** Returns the builder for the settings used for calls to batchCreateNotes. */ - public UnaryCallSettings.Builder - batchCreateNotesSettings() { - return getStubSettingsBuilder().batchCreateNotesSettings(); - } - - /** Returns the builder for the settings used for calls to updateNote. */ - public UnaryCallSettings.Builder updateNoteSettings() { - return getStubSettingsBuilder().updateNoteSettings(); - } - - /** Returns the builder for the settings used for calls to listNoteOccurrences. */ - public PagedCallSettings.Builder< - ListNoteOccurrencesRequest, - ListNoteOccurrencesResponse, - ListNoteOccurrencesPagedResponse> - listNoteOccurrencesSettings() { - return getStubSettingsBuilder().listNoteOccurrencesSettings(); - } - - @Override - public GrafeasSettings build() throws IOException { - return new GrafeasSettings(this); - } - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java deleted file mode 100644 index 9d44bb822baa..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java +++ /dev/null @@ -1,663 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *

- * Container message for hash values.
- * 
- * - * Protobuf type {@code grafeas.v1.Hash} - */ -public final class Hash extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Hash) - HashOrBuilder { -private static final long serialVersionUID = 0L; - // Use Hash.newBuilder() to construct. - private Hash(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Hash() { - type_ = ""; - value_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Hash(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Hash.class, io.grafeas.v1.Hash.Builder.class); - } - - public static final int TYPE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object type_ = ""; - /** - *
-   * Required. The type of hash that was performed, e.g. "SHA-256".
-   * 
- * - * string type = 1; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } - } - /** - *
-   * Required. The type of hash that was performed, e.g. "SHA-256".
-   * 
- * - * string type = 1; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-   * Required. The hash value.
-   * 
- * - * bytes value = 2; - * @return The value. - */ - @java.lang.Override - public com.google.protobuf.ByteString getValue() { - return value_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); - } - if (!value_.isEmpty()) { - output.writeBytes(2, value_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); - } - if (!value_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, value_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Hash)) { - return super.equals(obj); - } - io.grafeas.v1.Hash other = (io.grafeas.v1.Hash) obj; - - if (!getType() - .equals(other.getType())) return false; - if (!getValue() - .equals(other.getValue())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Hash parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Hash parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Hash parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Hash parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Hash parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Hash parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Hash parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Hash parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Hash parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Hash parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Hash parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Hash parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Hash prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Container message for hash values.
-   * 
- * - * Protobuf type {@code grafeas.v1.Hash} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Hash) - io.grafeas.v1.HashOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Hash.class, io.grafeas.v1.Hash.Builder.class); - } - - // Construct using io.grafeas.v1.Hash.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = ""; - value_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Hash getDefaultInstanceForType() { - return io.grafeas.v1.Hash.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Hash build() { - io.grafeas.v1.Hash result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Hash buildPartial() { - io.grafeas.v1.Hash result = new io.grafeas.v1.Hash(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Hash result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.value_ = value_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Hash) { - return mergeFrom((io.grafeas.v1.Hash)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Hash other) { - if (other == io.grafeas.v1.Hash.getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { - setValue(other.getValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - type_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - value_ = input.readBytes(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object type_ = ""; - /** - *
-     * Required. The type of hash that was performed, e.g. "SHA-256".
-     * 
- * - * string type = 1; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The type of hash that was performed, e.g. "SHA-256".
-     * 
- * - * string type = 1; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The type of hash that was performed, e.g. "SHA-256".
-     * 
- * - * string type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. The type of hash that was performed, e.g. "SHA-256".
-     * 
- * - * string type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - type_ = getDefaultInstance().getType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. The type of hash that was performed, e.g. "SHA-256".
-     * 
- * - * string type = 1; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Required. The hash value.
-     * 
- * - * bytes value = 2; - * @return The value. - */ - @java.lang.Override - public com.google.protobuf.ByteString getValue() { - return value_; - } - /** - *
-     * Required. The hash value.
-     * 
- * - * bytes value = 2; - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - value_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. The hash value.
-     * 
- * - * bytes value = 2; - * @return This builder for chaining. - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Hash) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Hash) - private static final io.grafeas.v1.Hash DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Hash(); - } - - public static io.grafeas.v1.Hash getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Hash parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Hash getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java deleted file mode 100644 index 3b14e9540a5b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface HashOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Hash) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The type of hash that was performed, e.g. "SHA-256".
-   * 
- * - * string type = 1; - * @return The type. - */ - java.lang.String getType(); - /** - *
-   * Required. The type of hash that was performed, e.g. "SHA-256".
-   * 
- * - * string type = 1; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - *
-   * Required. The hash value.
-   * 
- * - * bytes value = 2; - * @return The value. - */ - com.google.protobuf.ByteString getValue(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java deleted file mode 100644 index 4552e28165f9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java +++ /dev/null @@ -1,90 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -public final class Image { - private Image() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Layer_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Layer_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Fingerprint_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Fingerprint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ImageNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ImageNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ImageOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\026grafeas/v1/image.proto\022\ngrafeas.v1\"-\n\005" + - "Layer\022\021\n\tdirective\030\001 \001(\t\022\021\n\targuments\030\002 " + - "\001(\t\"@\n\013Fingerprint\022\017\n\007v1_name\030\001 \001(\t\022\017\n\007v" + - "2_blob\030\002 \003(\t\022\017\n\007v2_name\030\003 \001(\t\"O\n\tImageNo" + - "te\022\024\n\014resource_url\030\001 \001(\t\022,\n\013fingerprint\030" + - "\002 \001(\0132\027.grafeas.v1.Fingerprint\"\223\001\n\017Image" + - "Occurrence\022,\n\013fingerprint\030\001 \001(\0132\027.grafea" + - "s.v1.Fingerprint\022\020\n\010distance\030\002 \001(\005\022%\n\nla" + - "yer_info\030\003 \003(\0132\021.grafeas.v1.Layer\022\031\n\021bas" + - "e_resource_url\030\004 \001(\tBQ\n\rio.grafeas.v1P\001Z" + - "8google.golang.org/genproto/googleapis/g" + - "rafeas/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_grafeas_v1_Layer_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_Layer_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Layer_descriptor, - new java.lang.String[] { "Directive", "Arguments", }); - internal_static_grafeas_v1_Fingerprint_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Fingerprint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Fingerprint_descriptor, - new java.lang.String[] { "V1Name", "V2Blob", "V2Name", }); - internal_static_grafeas_v1_ImageNote_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_ImageNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ImageNote_descriptor, - new java.lang.String[] { "ResourceUrl", "Fingerprint", }); - internal_static_grafeas_v1_ImageOccurrence_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ImageOccurrence_descriptor, - new java.lang.String[] { "Fingerprint", "Distance", "LayerInfo", "BaseResourceUrl", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java deleted file mode 100644 index 69fb40e2db70..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java +++ /dev/null @@ -1,824 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -/** - *
- * Basis describes the base image portion (Note) of the DockerImage
- * relationship. Linked occurrences are derived from this or an equivalent image
- * via:
- *   FROM <Basis.resource_url>
- * Or an equivalent reference, e.g., a tag of the resource_url.
- * 
- * - * Protobuf type {@code grafeas.v1.ImageNote} - */ -public final class ImageNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ImageNote) - ImageNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageNote.newBuilder() to construct. - private ImageNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageNote() { - resourceUrl_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ImageNote.class, io.grafeas.v1.ImageNote.Builder.class); - } - - public static final int RESOURCE_URL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object resourceUrl_ = ""; - /** - *
-   * Required. Immutable. The resource_url for the resource representing the
-   * basis of associated occurrence images.
-   * 
- * - * string resource_url = 1; - * @return The resourceUrl. - */ - @java.lang.Override - public java.lang.String getResourceUrl() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUrl_ = s; - return s; - } - } - /** - *
-   * Required. Immutable. The resource_url for the resource representing the
-   * basis of associated occurrence images.
-   * 
- * - * string resource_url = 1; - * @return The bytes for resourceUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceUrlBytes() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FINGERPRINT_FIELD_NUMBER = 2; - private io.grafeas.v1.Fingerprint fingerprint_; - /** - *
-   * Required. Immutable. The fingerprint of the base image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - * @return Whether the fingerprint field is set. - */ - @java.lang.Override - public boolean hasFingerprint() { - return fingerprint_ != null; - } - /** - *
-   * Required. Immutable. The fingerprint of the base image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - * @return The fingerprint. - */ - @java.lang.Override - public io.grafeas.v1.Fingerprint getFingerprint() { - return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } - /** - *
-   * Required. Immutable. The fingerprint of the base image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - @java.lang.Override - public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { - return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceUrl_); - } - if (fingerprint_ != null) { - output.writeMessage(2, getFingerprint()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceUrl_); - } - if (fingerprint_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getFingerprint()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ImageNote)) { - return super.equals(obj); - } - io.grafeas.v1.ImageNote other = (io.grafeas.v1.ImageNote) obj; - - if (!getResourceUrl() - .equals(other.getResourceUrl())) return false; - if (hasFingerprint() != other.hasFingerprint()) return false; - if (hasFingerprint()) { - if (!getFingerprint() - .equals(other.getFingerprint())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_URL_FIELD_NUMBER; - hash = (53 * hash) + getResourceUrl().hashCode(); - if (hasFingerprint()) { - hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER; - hash = (53 * hash) + getFingerprint().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ImageNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ImageNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ImageNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ImageNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ImageNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ImageNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ImageNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ImageNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ImageNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ImageNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ImageNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ImageNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ImageNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Basis describes the base image portion (Note) of the DockerImage
-   * relationship. Linked occurrences are derived from this or an equivalent image
-   * via:
-   *   FROM <Basis.resource_url>
-   * Or an equivalent reference, e.g., a tag of the resource_url.
-   * 
- * - * Protobuf type {@code grafeas.v1.ImageNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ImageNote) - io.grafeas.v1.ImageNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ImageNote.class, io.grafeas.v1.ImageNote.Builder.class); - } - - // Construct using io.grafeas.v1.ImageNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - resourceUrl_ = ""; - fingerprint_ = null; - if (fingerprintBuilder_ != null) { - fingerprintBuilder_.dispose(); - fingerprintBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ImageNote getDefaultInstanceForType() { - return io.grafeas.v1.ImageNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ImageNote build() { - io.grafeas.v1.ImageNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ImageNote buildPartial() { - io.grafeas.v1.ImageNote result = new io.grafeas.v1.ImageNote(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.ImageNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.resourceUrl_ = resourceUrl_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.fingerprint_ = fingerprintBuilder_ == null - ? fingerprint_ - : fingerprintBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ImageNote) { - return mergeFrom((io.grafeas.v1.ImageNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ImageNote other) { - if (other == io.grafeas.v1.ImageNote.getDefaultInstance()) return this; - if (!other.getResourceUrl().isEmpty()) { - resourceUrl_ = other.resourceUrl_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasFingerprint()) { - mergeFingerprint(other.getFingerprint()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - resourceUrl_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getFingerprintFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object resourceUrl_ = ""; - /** - *
-     * Required. Immutable. The resource_url for the resource representing the
-     * basis of associated occurrence images.
-     * 
- * - * string resource_url = 1; - * @return The resourceUrl. - */ - public java.lang.String getResourceUrl() { - java.lang.Object ref = resourceUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Immutable. The resource_url for the resource representing the
-     * basis of associated occurrence images.
-     * 
- * - * string resource_url = 1; - * @return The bytes for resourceUrl. - */ - public com.google.protobuf.ByteString - getResourceUrlBytes() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Immutable. The resource_url for the resource representing the
-     * basis of associated occurrence images.
-     * 
- * - * string resource_url = 1; - * @param value The resourceUrl to set. - * @return This builder for chaining. - */ - public Builder setResourceUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - resourceUrl_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The resource_url for the resource representing the
-     * basis of associated occurrence images.
-     * 
- * - * string resource_url = 1; - * @return This builder for chaining. - */ - public Builder clearResourceUrl() { - resourceUrl_ = getDefaultInstance().getResourceUrl(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The resource_url for the resource representing the
-     * basis of associated occurrence images.
-     * 
- * - * string resource_url = 1; - * @param value The bytes for resourceUrl to set. - * @return This builder for chaining. - */ - public Builder setResourceUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - resourceUrl_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.grafeas.v1.Fingerprint fingerprint_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> fingerprintBuilder_; - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - * @return Whether the fingerprint field is set. - */ - public boolean hasFingerprint() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - * @return The fingerprint. - */ - public io.grafeas.v1.Fingerprint getFingerprint() { - if (fingerprintBuilder_ == null) { - return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } else { - return fingerprintBuilder_.getMessage(); - } - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - public Builder setFingerprint(io.grafeas.v1.Fingerprint value) { - if (fingerprintBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fingerprint_ = value; - } else { - fingerprintBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - public Builder setFingerprint( - io.grafeas.v1.Fingerprint.Builder builderForValue) { - if (fingerprintBuilder_ == null) { - fingerprint_ = builderForValue.build(); - } else { - fingerprintBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - public Builder mergeFingerprint(io.grafeas.v1.Fingerprint value) { - if (fingerprintBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - fingerprint_ != null && - fingerprint_ != io.grafeas.v1.Fingerprint.getDefaultInstance()) { - getFingerprintBuilder().mergeFrom(value); - } else { - fingerprint_ = value; - } - } else { - fingerprintBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - public Builder clearFingerprint() { - bitField0_ = (bitField0_ & ~0x00000002); - fingerprint_ = null; - if (fingerprintBuilder_ != null) { - fingerprintBuilder_.dispose(); - fingerprintBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - public io.grafeas.v1.Fingerprint.Builder getFingerprintBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getFingerprintFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { - if (fingerprintBuilder_ != null) { - return fingerprintBuilder_.getMessageOrBuilder(); - } else { - return fingerprint_ == null ? - io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> - getFingerprintFieldBuilder() { - if (fingerprintBuilder_ == null) { - fingerprintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder>( - getFingerprint(), - getParentForChildren(), - isClean()); - fingerprint_ = null; - } - return fingerprintBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ImageNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ImageNote) - private static final io.grafeas.v1.ImageNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ImageNote(); - } - - public static io.grafeas.v1.ImageNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ImageNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java deleted file mode 100644 index d3ff6b229887..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -public interface ImageNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ImageNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Immutable. The resource_url for the resource representing the
-   * basis of associated occurrence images.
-   * 
- * - * string resource_url = 1; - * @return The resourceUrl. - */ - java.lang.String getResourceUrl(); - /** - *
-   * Required. Immutable. The resource_url for the resource representing the
-   * basis of associated occurrence images.
-   * 
- * - * string resource_url = 1; - * @return The bytes for resourceUrl. - */ - com.google.protobuf.ByteString - getResourceUrlBytes(); - - /** - *
-   * Required. Immutable. The fingerprint of the base image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - * @return Whether the fingerprint field is set. - */ - boolean hasFingerprint(); - /** - *
-   * Required. Immutable. The fingerprint of the base image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - * @return The fingerprint. - */ - io.grafeas.v1.Fingerprint getFingerprint(); - /** - *
-   * Required. Immutable. The fingerprint of the base image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java deleted file mode 100644 index 42e50c3a99ed..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java +++ /dev/null @@ -1,1398 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -/** - *
- * Details of the derived image portion of the DockerImage relationship. This
- * image would be produced from a Dockerfile with FROM <DockerImage.Basis in
- * attached Note>.
- * 
- * - * Protobuf type {@code grafeas.v1.ImageOccurrence} - */ -public final class ImageOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ImageOccurrence) - ImageOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageOccurrence.newBuilder() to construct. - private ImageOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageOccurrence() { - layerInfo_ = java.util.Collections.emptyList(); - baseResourceUrl_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ImageOccurrence.class, io.grafeas.v1.ImageOccurrence.Builder.class); - } - - public static final int FINGERPRINT_FIELD_NUMBER = 1; - private io.grafeas.v1.Fingerprint fingerprint_; - /** - *
-   * Required. The fingerprint of the derived image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - * @return Whether the fingerprint field is set. - */ - @java.lang.Override - public boolean hasFingerprint() { - return fingerprint_ != null; - } - /** - *
-   * Required. The fingerprint of the derived image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - * @return The fingerprint. - */ - @java.lang.Override - public io.grafeas.v1.Fingerprint getFingerprint() { - return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } - /** - *
-   * Required. The fingerprint of the derived image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - @java.lang.Override - public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { - return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } - - public static final int DISTANCE_FIELD_NUMBER = 2; - private int distance_ = 0; - /** - *
-   * Output only. The number of layers by which this image differs from the
-   * associated image basis.
-   * 
- * - * int32 distance = 2; - * @return The distance. - */ - @java.lang.Override - public int getDistance() { - return distance_; - } - - public static final int LAYER_INFO_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List layerInfo_; - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - @java.lang.Override - public java.util.List getLayerInfoList() { - return layerInfo_; - } - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - @java.lang.Override - public java.util.List - getLayerInfoOrBuilderList() { - return layerInfo_; - } - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - @java.lang.Override - public int getLayerInfoCount() { - return layerInfo_.size(); - } - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - @java.lang.Override - public io.grafeas.v1.Layer getLayerInfo(int index) { - return layerInfo_.get(index); - } - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - @java.lang.Override - public io.grafeas.v1.LayerOrBuilder getLayerInfoOrBuilder( - int index) { - return layerInfo_.get(index); - } - - public static final int BASE_RESOURCE_URL_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object baseResourceUrl_ = ""; - /** - *
-   * Output only. This contains the base image URL for the derived image
-   * occurrence.
-   * 
- * - * string base_resource_url = 4; - * @return The baseResourceUrl. - */ - @java.lang.Override - public java.lang.String getBaseResourceUrl() { - java.lang.Object ref = baseResourceUrl_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - baseResourceUrl_ = s; - return s; - } - } - /** - *
-   * Output only. This contains the base image URL for the derived image
-   * occurrence.
-   * 
- * - * string base_resource_url = 4; - * @return The bytes for baseResourceUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBaseResourceUrlBytes() { - java.lang.Object ref = baseResourceUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - baseResourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (fingerprint_ != null) { - output.writeMessage(1, getFingerprint()); - } - if (distance_ != 0) { - output.writeInt32(2, distance_); - } - for (int i = 0; i < layerInfo_.size(); i++) { - output.writeMessage(3, layerInfo_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseResourceUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, baseResourceUrl_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (fingerprint_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getFingerprint()); - } - if (distance_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, distance_); - } - for (int i = 0; i < layerInfo_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, layerInfo_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseResourceUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, baseResourceUrl_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ImageOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.ImageOccurrence other = (io.grafeas.v1.ImageOccurrence) obj; - - if (hasFingerprint() != other.hasFingerprint()) return false; - if (hasFingerprint()) { - if (!getFingerprint() - .equals(other.getFingerprint())) return false; - } - if (getDistance() - != other.getDistance()) return false; - if (!getLayerInfoList() - .equals(other.getLayerInfoList())) return false; - if (!getBaseResourceUrl() - .equals(other.getBaseResourceUrl())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasFingerprint()) { - hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER; - hash = (53 * hash) + getFingerprint().hashCode(); - } - hash = (37 * hash) + DISTANCE_FIELD_NUMBER; - hash = (53 * hash) + getDistance(); - if (getLayerInfoCount() > 0) { - hash = (37 * hash) + LAYER_INFO_FIELD_NUMBER; - hash = (53 * hash) + getLayerInfoList().hashCode(); - } - hash = (37 * hash) + BASE_RESOURCE_URL_FIELD_NUMBER; - hash = (53 * hash) + getBaseResourceUrl().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ImageOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ImageOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ImageOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ImageOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ImageOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ImageOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ImageOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ImageOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ImageOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ImageOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ImageOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ImageOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ImageOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Details of the derived image portion of the DockerImage relationship. This
-   * image would be produced from a Dockerfile with FROM <DockerImage.Basis in
-   * attached Note>.
-   * 
- * - * Protobuf type {@code grafeas.v1.ImageOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ImageOccurrence) - io.grafeas.v1.ImageOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ImageOccurrence.class, io.grafeas.v1.ImageOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.ImageOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - fingerprint_ = null; - if (fingerprintBuilder_ != null) { - fingerprintBuilder_.dispose(); - fingerprintBuilder_ = null; - } - distance_ = 0; - if (layerInfoBuilder_ == null) { - layerInfo_ = java.util.Collections.emptyList(); - } else { - layerInfo_ = null; - layerInfoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - baseResourceUrl_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ImageOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ImageOccurrence build() { - io.grafeas.v1.ImageOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ImageOccurrence buildPartial() { - io.grafeas.v1.ImageOccurrence result = new io.grafeas.v1.ImageOccurrence(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.ImageOccurrence result) { - if (layerInfoBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - layerInfo_ = java.util.Collections.unmodifiableList(layerInfo_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.layerInfo_ = layerInfo_; - } else { - result.layerInfo_ = layerInfoBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.ImageOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.fingerprint_ = fingerprintBuilder_ == null - ? fingerprint_ - : fingerprintBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.distance_ = distance_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.baseResourceUrl_ = baseResourceUrl_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ImageOccurrence) { - return mergeFrom((io.grafeas.v1.ImageOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ImageOccurrence other) { - if (other == io.grafeas.v1.ImageOccurrence.getDefaultInstance()) return this; - if (other.hasFingerprint()) { - mergeFingerprint(other.getFingerprint()); - } - if (other.getDistance() != 0) { - setDistance(other.getDistance()); - } - if (layerInfoBuilder_ == null) { - if (!other.layerInfo_.isEmpty()) { - if (layerInfo_.isEmpty()) { - layerInfo_ = other.layerInfo_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureLayerInfoIsMutable(); - layerInfo_.addAll(other.layerInfo_); - } - onChanged(); - } - } else { - if (!other.layerInfo_.isEmpty()) { - if (layerInfoBuilder_.isEmpty()) { - layerInfoBuilder_.dispose(); - layerInfoBuilder_ = null; - layerInfo_ = other.layerInfo_; - bitField0_ = (bitField0_ & ~0x00000004); - layerInfoBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLayerInfoFieldBuilder() : null; - } else { - layerInfoBuilder_.addAllMessages(other.layerInfo_); - } - } - } - if (!other.getBaseResourceUrl().isEmpty()) { - baseResourceUrl_ = other.baseResourceUrl_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getFingerprintFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - distance_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - io.grafeas.v1.Layer m = - input.readMessage( - io.grafeas.v1.Layer.parser(), - extensionRegistry); - if (layerInfoBuilder_ == null) { - ensureLayerInfoIsMutable(); - layerInfo_.add(m); - } else { - layerInfoBuilder_.addMessage(m); - } - break; - } // case 26 - case 34: { - baseResourceUrl_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.Fingerprint fingerprint_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> fingerprintBuilder_; - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - * @return Whether the fingerprint field is set. - */ - public boolean hasFingerprint() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - * @return The fingerprint. - */ - public io.grafeas.v1.Fingerprint getFingerprint() { - if (fingerprintBuilder_ == null) { - return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } else { - return fingerprintBuilder_.getMessage(); - } - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - public Builder setFingerprint(io.grafeas.v1.Fingerprint value) { - if (fingerprintBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fingerprint_ = value; - } else { - fingerprintBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - public Builder setFingerprint( - io.grafeas.v1.Fingerprint.Builder builderForValue) { - if (fingerprintBuilder_ == null) { - fingerprint_ = builderForValue.build(); - } else { - fingerprintBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - public Builder mergeFingerprint(io.grafeas.v1.Fingerprint value) { - if (fingerprintBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - fingerprint_ != null && - fingerprint_ != io.grafeas.v1.Fingerprint.getDefaultInstance()) { - getFingerprintBuilder().mergeFrom(value); - } else { - fingerprint_ = value; - } - } else { - fingerprintBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - public Builder clearFingerprint() { - bitField0_ = (bitField0_ & ~0x00000001); - fingerprint_ = null; - if (fingerprintBuilder_ != null) { - fingerprintBuilder_.dispose(); - fingerprintBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - public io.grafeas.v1.Fingerprint.Builder getFingerprintBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getFingerprintFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { - if (fingerprintBuilder_ != null) { - return fingerprintBuilder_.getMessageOrBuilder(); - } else { - return fingerprint_ == null ? - io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> - getFingerprintFieldBuilder() { - if (fingerprintBuilder_ == null) { - fingerprintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder>( - getFingerprint(), - getParentForChildren(), - isClean()); - fingerprint_ = null; - } - return fingerprintBuilder_; - } - - private int distance_ ; - /** - *
-     * Output only. The number of layers by which this image differs from the
-     * associated image basis.
-     * 
- * - * int32 distance = 2; - * @return The distance. - */ - @java.lang.Override - public int getDistance() { - return distance_; - } - /** - *
-     * Output only. The number of layers by which this image differs from the
-     * associated image basis.
-     * 
- * - * int32 distance = 2; - * @param value The distance to set. - * @return This builder for chaining. - */ - public Builder setDistance(int value) { - - distance_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Output only. The number of layers by which this image differs from the
-     * associated image basis.
-     * 
- * - * int32 distance = 2; - * @return This builder for chaining. - */ - public Builder clearDistance() { - bitField0_ = (bitField0_ & ~0x00000002); - distance_ = 0; - onChanged(); - return this; - } - - private java.util.List layerInfo_ = - java.util.Collections.emptyList(); - private void ensureLayerInfoIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - layerInfo_ = new java.util.ArrayList(layerInfo_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Layer, io.grafeas.v1.Layer.Builder, io.grafeas.v1.LayerOrBuilder> layerInfoBuilder_; - - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public java.util.List getLayerInfoList() { - if (layerInfoBuilder_ == null) { - return java.util.Collections.unmodifiableList(layerInfo_); - } else { - return layerInfoBuilder_.getMessageList(); - } - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public int getLayerInfoCount() { - if (layerInfoBuilder_ == null) { - return layerInfo_.size(); - } else { - return layerInfoBuilder_.getCount(); - } - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public io.grafeas.v1.Layer getLayerInfo(int index) { - if (layerInfoBuilder_ == null) { - return layerInfo_.get(index); - } else { - return layerInfoBuilder_.getMessage(index); - } - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder setLayerInfo( - int index, io.grafeas.v1.Layer value) { - if (layerInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLayerInfoIsMutable(); - layerInfo_.set(index, value); - onChanged(); - } else { - layerInfoBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder setLayerInfo( - int index, io.grafeas.v1.Layer.Builder builderForValue) { - if (layerInfoBuilder_ == null) { - ensureLayerInfoIsMutable(); - layerInfo_.set(index, builderForValue.build()); - onChanged(); - } else { - layerInfoBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder addLayerInfo(io.grafeas.v1.Layer value) { - if (layerInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLayerInfoIsMutable(); - layerInfo_.add(value); - onChanged(); - } else { - layerInfoBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder addLayerInfo( - int index, io.grafeas.v1.Layer value) { - if (layerInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLayerInfoIsMutable(); - layerInfo_.add(index, value); - onChanged(); - } else { - layerInfoBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder addLayerInfo( - io.grafeas.v1.Layer.Builder builderForValue) { - if (layerInfoBuilder_ == null) { - ensureLayerInfoIsMutable(); - layerInfo_.add(builderForValue.build()); - onChanged(); - } else { - layerInfoBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder addLayerInfo( - int index, io.grafeas.v1.Layer.Builder builderForValue) { - if (layerInfoBuilder_ == null) { - ensureLayerInfoIsMutable(); - layerInfo_.add(index, builderForValue.build()); - onChanged(); - } else { - layerInfoBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder addAllLayerInfo( - java.lang.Iterable values) { - if (layerInfoBuilder_ == null) { - ensureLayerInfoIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, layerInfo_); - onChanged(); - } else { - layerInfoBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder clearLayerInfo() { - if (layerInfoBuilder_ == null) { - layerInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - layerInfoBuilder_.clear(); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder removeLayerInfo(int index) { - if (layerInfoBuilder_ == null) { - ensureLayerInfoIsMutable(); - layerInfo_.remove(index); - onChanged(); - } else { - layerInfoBuilder_.remove(index); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public io.grafeas.v1.Layer.Builder getLayerInfoBuilder( - int index) { - return getLayerInfoFieldBuilder().getBuilder(index); - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public io.grafeas.v1.LayerOrBuilder getLayerInfoOrBuilder( - int index) { - if (layerInfoBuilder_ == null) { - return layerInfo_.get(index); } else { - return layerInfoBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public java.util.List - getLayerInfoOrBuilderList() { - if (layerInfoBuilder_ != null) { - return layerInfoBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(layerInfo_); - } - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public io.grafeas.v1.Layer.Builder addLayerInfoBuilder() { - return getLayerInfoFieldBuilder().addBuilder( - io.grafeas.v1.Layer.getDefaultInstance()); - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public io.grafeas.v1.Layer.Builder addLayerInfoBuilder( - int index) { - return getLayerInfoFieldBuilder().addBuilder( - index, io.grafeas.v1.Layer.getDefaultInstance()); - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public java.util.List - getLayerInfoBuilderList() { - return getLayerInfoFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Layer, io.grafeas.v1.Layer.Builder, io.grafeas.v1.LayerOrBuilder> - getLayerInfoFieldBuilder() { - if (layerInfoBuilder_ == null) { - layerInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Layer, io.grafeas.v1.Layer.Builder, io.grafeas.v1.LayerOrBuilder>( - layerInfo_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - layerInfo_ = null; - } - return layerInfoBuilder_; - } - - private java.lang.Object baseResourceUrl_ = ""; - /** - *
-     * Output only. This contains the base image URL for the derived image
-     * occurrence.
-     * 
- * - * string base_resource_url = 4; - * @return The baseResourceUrl. - */ - public java.lang.String getBaseResourceUrl() { - java.lang.Object ref = baseResourceUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - baseResourceUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. This contains the base image URL for the derived image
-     * occurrence.
-     * 
- * - * string base_resource_url = 4; - * @return The bytes for baseResourceUrl. - */ - public com.google.protobuf.ByteString - getBaseResourceUrlBytes() { - java.lang.Object ref = baseResourceUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - baseResourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. This contains the base image URL for the derived image
-     * occurrence.
-     * 
- * - * string base_resource_url = 4; - * @param value The baseResourceUrl to set. - * @return This builder for chaining. - */ - public Builder setBaseResourceUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - baseResourceUrl_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Output only. This contains the base image URL for the derived image
-     * occurrence.
-     * 
- * - * string base_resource_url = 4; - * @return This builder for chaining. - */ - public Builder clearBaseResourceUrl() { - baseResourceUrl_ = getDefaultInstance().getBaseResourceUrl(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * Output only. This contains the base image URL for the derived image
-     * occurrence.
-     * 
- * - * string base_resource_url = 4; - * @param value The bytes for baseResourceUrl to set. - * @return This builder for chaining. - */ - public Builder setBaseResourceUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - baseResourceUrl_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ImageOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ImageOccurrence) - private static final io.grafeas.v1.ImageOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ImageOccurrence(); - } - - public static io.grafeas.v1.ImageOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ImageOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java deleted file mode 100644 index 1de5a573a328..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java +++ /dev/null @@ -1,123 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -public interface ImageOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ImageOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The fingerprint of the derived image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - * @return Whether the fingerprint field is set. - */ - boolean hasFingerprint(); - /** - *
-   * Required. The fingerprint of the derived image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - * @return The fingerprint. - */ - io.grafeas.v1.Fingerprint getFingerprint(); - /** - *
-   * Required. The fingerprint of the derived image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder(); - - /** - *
-   * Output only. The number of layers by which this image differs from the
-   * associated image basis.
-   * 
- * - * int32 distance = 2; - * @return The distance. - */ - int getDistance(); - - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - java.util.List - getLayerInfoList(); - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - io.grafeas.v1.Layer getLayerInfo(int index); - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - int getLayerInfoCount(); - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - java.util.List - getLayerInfoOrBuilderList(); - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - io.grafeas.v1.LayerOrBuilder getLayerInfoOrBuilder( - int index); - - /** - *
-   * Output only. This contains the base image URL for the derived image
-   * occurrence.
-   * 
- * - * string base_resource_url = 4; - * @return The baseResourceUrl. - */ - java.lang.String getBaseResourceUrl(); - /** - *
-   * Output only. This contains the base image URL for the derived image
-   * occurrence.
-   * 
- * - * string base_resource_url = 4; - * @return The bytes for baseResourceUrl. - */ - com.google.protobuf.ByteString - getBaseResourceUrlBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java deleted file mode 100644 index e5a98d01e8fe..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java +++ /dev/null @@ -1,1359 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.InTotoProvenance} - */ -public final class InTotoProvenance extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.InTotoProvenance) - InTotoProvenanceOrBuilder { -private static final long serialVersionUID = 0L; - // Use InTotoProvenance.newBuilder() to construct. - private InTotoProvenance(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InTotoProvenance() { - materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InTotoProvenance(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.InTotoProvenance.class, io.grafeas.v1.InTotoProvenance.Builder.class); - } - - public static final int BUILDER_CONFIG_FIELD_NUMBER = 1; - private io.grafeas.v1.BuilderConfig builderConfig_; - /** - *
-   * required
-   * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - * @return Whether the builderConfig field is set. - */ - @java.lang.Override - public boolean hasBuilderConfig() { - return builderConfig_ != null; - } - /** - *
-   * required
-   * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - * @return The builderConfig. - */ - @java.lang.Override - public io.grafeas.v1.BuilderConfig getBuilderConfig() { - return builderConfig_ == null ? io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; - } - /** - *
-   * required
-   * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - @java.lang.Override - public io.grafeas.v1.BuilderConfigOrBuilder getBuilderConfigOrBuilder() { - return builderConfig_ == null ? io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; - } - - public static final int RECIPE_FIELD_NUMBER = 2; - private io.grafeas.v1.Recipe recipe_; - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.Recipe recipe = 2; - * @return Whether the recipe field is set. - */ - @java.lang.Override - public boolean hasRecipe() { - return recipe_ != null; - } - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.Recipe recipe = 2; - * @return The recipe. - */ - @java.lang.Override - public io.grafeas.v1.Recipe getRecipe() { - return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; - } - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - @java.lang.Override - public io.grafeas.v1.RecipeOrBuilder getRecipeOrBuilder() { - return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; - } - - public static final int METADATA_FIELD_NUMBER = 3; - private io.grafeas.v1.Metadata metadata_; - /** - * .grafeas.v1.Metadata metadata = 3; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return metadata_ != null; - } - /** - * .grafeas.v1.Metadata metadata = 3; - * @return The metadata. - */ - @java.lang.Override - public io.grafeas.v1.Metadata getMetadata() { - return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - @java.lang.Override - public io.grafeas.v1.MetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; - } - - public static final int MATERIALS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList materials_; - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @return A list containing the materials. - */ - public com.google.protobuf.ProtocolStringList - getMaterialsList() { - return materials_; - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @return The count of materials. - */ - public int getMaterialsCount() { - return materials_.size(); - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @param index The index of the element to return. - * @return The materials at the given index. - */ - public java.lang.String getMaterials(int index) { - return materials_.get(index); - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @param index The index of the value to return. - * @return The bytes of the materials at the given index. - */ - public com.google.protobuf.ByteString - getMaterialsBytes(int index) { - return materials_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (builderConfig_ != null) { - output.writeMessage(1, getBuilderConfig()); - } - if (recipe_ != null) { - output.writeMessage(2, getRecipe()); - } - if (metadata_ != null) { - output.writeMessage(3, getMetadata()); - } - for (int i = 0; i < materials_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, materials_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (builderConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBuilderConfig()); - } - if (recipe_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getRecipe()); - } - if (metadata_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getMetadata()); - } - { - int dataSize = 0; - for (int i = 0; i < materials_.size(); i++) { - dataSize += computeStringSizeNoTag(materials_.getRaw(i)); - } - size += dataSize; - size += 1 * getMaterialsList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.InTotoProvenance)) { - return super.equals(obj); - } - io.grafeas.v1.InTotoProvenance other = (io.grafeas.v1.InTotoProvenance) obj; - - if (hasBuilderConfig() != other.hasBuilderConfig()) return false; - if (hasBuilderConfig()) { - if (!getBuilderConfig() - .equals(other.getBuilderConfig())) return false; - } - if (hasRecipe() != other.hasRecipe()) return false; - if (hasRecipe()) { - if (!getRecipe() - .equals(other.getRecipe())) return false; - } - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getMaterialsList() - .equals(other.getMaterialsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBuilderConfig()) { - hash = (37 * hash) + BUILDER_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getBuilderConfig().hashCode(); - } - if (hasRecipe()) { - hash = (37 * hash) + RECIPE_FIELD_NUMBER; - hash = (53 * hash) + getRecipe().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - if (getMaterialsCount() > 0) { - hash = (37 * hash) + MATERIALS_FIELD_NUMBER; - hash = (53 * hash) + getMaterialsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.InTotoProvenance parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.InTotoProvenance parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.InTotoProvenance parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.InTotoProvenance parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.InTotoProvenance parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.InTotoProvenance parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.InTotoProvenance parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.InTotoProvenance parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.InTotoProvenance parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.InTotoProvenance parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.InTotoProvenance parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.InTotoProvenance parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.InTotoProvenance prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.InTotoProvenance} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.InTotoProvenance) - io.grafeas.v1.InTotoProvenanceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.InTotoProvenance.class, io.grafeas.v1.InTotoProvenance.Builder.class); - } - - // Construct using io.grafeas.v1.InTotoProvenance.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - builderConfig_ = null; - if (builderConfigBuilder_ != null) { - builderConfigBuilder_.dispose(); - builderConfigBuilder_ = null; - } - recipe_ = null; - if (recipeBuilder_ != null) { - recipeBuilder_.dispose(); - recipeBuilder_ = null; - } - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.InTotoProvenance getDefaultInstanceForType() { - return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.InTotoProvenance build() { - io.grafeas.v1.InTotoProvenance result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.InTotoProvenance buildPartial() { - io.grafeas.v1.InTotoProvenance result = new io.grafeas.v1.InTotoProvenance(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.InTotoProvenance result) { - if (((bitField0_ & 0x00000008) != 0)) { - materials_ = materials_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.materials_ = materials_; - } - - private void buildPartial0(io.grafeas.v1.InTotoProvenance result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.builderConfig_ = builderConfigBuilder_ == null - ? builderConfig_ - : builderConfigBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.recipe_ = recipeBuilder_ == null - ? recipe_ - : recipeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.InTotoProvenance) { - return mergeFrom((io.grafeas.v1.InTotoProvenance)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.InTotoProvenance other) { - if (other == io.grafeas.v1.InTotoProvenance.getDefaultInstance()) return this; - if (other.hasBuilderConfig()) { - mergeBuilderConfig(other.getBuilderConfig()); - } - if (other.hasRecipe()) { - mergeRecipe(other.getRecipe()); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (!other.materials_.isEmpty()) { - if (materials_.isEmpty()) { - materials_ = other.materials_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureMaterialsIsMutable(); - materials_.addAll(other.materials_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getBuilderConfigFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getRecipeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - ensureMaterialsIsMutable(); - materials_.add(s); - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.BuilderConfig builderConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuilderConfig, io.grafeas.v1.BuilderConfig.Builder, io.grafeas.v1.BuilderConfigOrBuilder> builderConfigBuilder_; - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - * @return Whether the builderConfig field is set. - */ - public boolean hasBuilderConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - * @return The builderConfig. - */ - public io.grafeas.v1.BuilderConfig getBuilderConfig() { - if (builderConfigBuilder_ == null) { - return builderConfig_ == null ? io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; - } else { - return builderConfigBuilder_.getMessage(); - } - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - public Builder setBuilderConfig(io.grafeas.v1.BuilderConfig value) { - if (builderConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - builderConfig_ = value; - } else { - builderConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - public Builder setBuilderConfig( - io.grafeas.v1.BuilderConfig.Builder builderForValue) { - if (builderConfigBuilder_ == null) { - builderConfig_ = builderForValue.build(); - } else { - builderConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - public Builder mergeBuilderConfig(io.grafeas.v1.BuilderConfig value) { - if (builderConfigBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - builderConfig_ != null && - builderConfig_ != io.grafeas.v1.BuilderConfig.getDefaultInstance()) { - getBuilderConfigBuilder().mergeFrom(value); - } else { - builderConfig_ = value; - } - } else { - builderConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - public Builder clearBuilderConfig() { - bitField0_ = (bitField0_ & ~0x00000001); - builderConfig_ = null; - if (builderConfigBuilder_ != null) { - builderConfigBuilder_.dispose(); - builderConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - public io.grafeas.v1.BuilderConfig.Builder getBuilderConfigBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getBuilderConfigFieldBuilder().getBuilder(); - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - public io.grafeas.v1.BuilderConfigOrBuilder getBuilderConfigOrBuilder() { - if (builderConfigBuilder_ != null) { - return builderConfigBuilder_.getMessageOrBuilder(); - } else { - return builderConfig_ == null ? - io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; - } - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuilderConfig, io.grafeas.v1.BuilderConfig.Builder, io.grafeas.v1.BuilderConfigOrBuilder> - getBuilderConfigFieldBuilder() { - if (builderConfigBuilder_ == null) { - builderConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuilderConfig, io.grafeas.v1.BuilderConfig.Builder, io.grafeas.v1.BuilderConfigOrBuilder>( - getBuilderConfig(), - getParentForChildren(), - isClean()); - builderConfig_ = null; - } - return builderConfigBuilder_; - } - - private io.grafeas.v1.Recipe recipe_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Recipe, io.grafeas.v1.Recipe.Builder, io.grafeas.v1.RecipeOrBuilder> recipeBuilder_; - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - * @return Whether the recipe field is set. - */ - public boolean hasRecipe() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - * @return The recipe. - */ - public io.grafeas.v1.Recipe getRecipe() { - if (recipeBuilder_ == null) { - return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; - } else { - return recipeBuilder_.getMessage(); - } - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - public Builder setRecipe(io.grafeas.v1.Recipe value) { - if (recipeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - recipe_ = value; - } else { - recipeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - public Builder setRecipe( - io.grafeas.v1.Recipe.Builder builderForValue) { - if (recipeBuilder_ == null) { - recipe_ = builderForValue.build(); - } else { - recipeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - public Builder mergeRecipe(io.grafeas.v1.Recipe value) { - if (recipeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - recipe_ != null && - recipe_ != io.grafeas.v1.Recipe.getDefaultInstance()) { - getRecipeBuilder().mergeFrom(value); - } else { - recipe_ = value; - } - } else { - recipeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - public Builder clearRecipe() { - bitField0_ = (bitField0_ & ~0x00000002); - recipe_ = null; - if (recipeBuilder_ != null) { - recipeBuilder_.dispose(); - recipeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - public io.grafeas.v1.Recipe.Builder getRecipeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getRecipeFieldBuilder().getBuilder(); - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - public io.grafeas.v1.RecipeOrBuilder getRecipeOrBuilder() { - if (recipeBuilder_ != null) { - return recipeBuilder_.getMessageOrBuilder(); - } else { - return recipe_ == null ? - io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; - } - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Recipe, io.grafeas.v1.Recipe.Builder, io.grafeas.v1.RecipeOrBuilder> - getRecipeFieldBuilder() { - if (recipeBuilder_ == null) { - recipeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Recipe, io.grafeas.v1.Recipe.Builder, io.grafeas.v1.RecipeOrBuilder>( - getRecipe(), - getParentForChildren(), - isClean()); - recipe_ = null; - } - return recipeBuilder_; - } - - private io.grafeas.v1.Metadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Metadata, io.grafeas.v1.Metadata.Builder, io.grafeas.v1.MetadataOrBuilder> metadataBuilder_; - /** - * .grafeas.v1.Metadata metadata = 3; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .grafeas.v1.Metadata metadata = 3; - * @return The metadata. - */ - public io.grafeas.v1.Metadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - public Builder setMetadata(io.grafeas.v1.Metadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - public Builder setMetadata( - io.grafeas.v1.Metadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - public Builder mergeMetadata(io.grafeas.v1.Metadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - metadata_ != null && - metadata_ != io.grafeas.v1.Metadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000004); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - public io.grafeas.v1.Metadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - public io.grafeas.v1.MetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; - } - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Metadata, io.grafeas.v1.Metadata.Builder, io.grafeas.v1.MetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Metadata, io.grafeas.v1.Metadata.Builder, io.grafeas.v1.MetadataOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private com.google.protobuf.LazyStringList materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureMaterialsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - materials_ = new com.google.protobuf.LazyStringArrayList(materials_); - bitField0_ |= 0x00000008; - } - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @return A list containing the materials. - */ - public com.google.protobuf.ProtocolStringList - getMaterialsList() { - return materials_.getUnmodifiableView(); - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @return The count of materials. - */ - public int getMaterialsCount() { - return materials_.size(); - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @param index The index of the element to return. - * @return The materials at the given index. - */ - public java.lang.String getMaterials(int index) { - return materials_.get(index); - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @param index The index of the value to return. - * @return The bytes of the materials at the given index. - */ - public com.google.protobuf.ByteString - getMaterialsBytes(int index) { - return materials_.getByteString(index); - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @param index The index to set the value at. - * @param value The materials to set. - * @return This builder for chaining. - */ - public Builder setMaterials( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureMaterialsIsMutable(); - materials_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @param value The materials to add. - * @return This builder for chaining. - */ - public Builder addMaterials( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureMaterialsIsMutable(); - materials_.add(value); - onChanged(); - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @param values The materials to add. - * @return This builder for chaining. - */ - public Builder addAllMaterials( - java.lang.Iterable values) { - ensureMaterialsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, materials_); - onChanged(); - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @return This builder for chaining. - */ - public Builder clearMaterials() { - materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @param value The bytes of the materials to add. - * @return This builder for chaining. - */ - public Builder addMaterialsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureMaterialsIsMutable(); - materials_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.InTotoProvenance) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.InTotoProvenance) - private static final io.grafeas.v1.InTotoProvenance DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.InTotoProvenance(); - } - - public static io.grafeas.v1.InTotoProvenance getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InTotoProvenance parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.InTotoProvenance getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java deleted file mode 100644 index b24aa48eb140..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java +++ /dev/null @@ -1,140 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -public interface InTotoProvenanceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.InTotoProvenance) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * required
-   * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - * @return Whether the builderConfig field is set. - */ - boolean hasBuilderConfig(); - /** - *
-   * required
-   * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - * @return The builderConfig. - */ - io.grafeas.v1.BuilderConfig getBuilderConfig(); - /** - *
-   * required
-   * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - io.grafeas.v1.BuilderConfigOrBuilder getBuilderConfigOrBuilder(); - - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.Recipe recipe = 2; - * @return Whether the recipe field is set. - */ - boolean hasRecipe(); - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.Recipe recipe = 2; - * @return The recipe. - */ - io.grafeas.v1.Recipe getRecipe(); - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - io.grafeas.v1.RecipeOrBuilder getRecipeOrBuilder(); - - /** - * .grafeas.v1.Metadata metadata = 3; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * .grafeas.v1.Metadata metadata = 3; - * @return The metadata. - */ - io.grafeas.v1.Metadata getMetadata(); - /** - * .grafeas.v1.Metadata metadata = 3; - */ - io.grafeas.v1.MetadataOrBuilder getMetadataOrBuilder(); - - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @return A list containing the materials. - */ - java.util.List - getMaterialsList(); - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @return The count of materials. - */ - int getMaterialsCount(); - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @param index The index of the element to return. - * @return The materials at the given index. - */ - java.lang.String getMaterials(int index); - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @param index The index of the value to return. - * @return The bytes of the materials at the given index. - */ - com.google.protobuf.ByteString - getMaterialsBytes(int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java deleted file mode 100644 index 338b8a798f77..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java +++ /dev/null @@ -1,115 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -public final class InTotoProvenanceProto { - private InTotoProvenanceProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Recipe_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Recipe_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Completeness_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Completeness_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Metadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Metadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BuilderConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_InTotoProvenance_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\"grafeas/v1/intoto_provenance.proto\022\ngr" + - "afeas.v1\032\031google/protobuf/any.proto\032\037goo" + - "gle/protobuf/timestamp.proto\"\234\001\n\006Recipe\022" + - "\014\n\004type\030\001 \001(\t\022\033\n\023defined_in_material\030\002 \001" + - "(\003\022\023\n\013entry_point\030\003 \001(\t\022\'\n\targuments\030\004 \003" + - "(\0132\024.google.protobuf.Any\022)\n\013environment\030" + - "\005 \003(\0132\024.google.protobuf.Any\"I\n\014Completen" + - "ess\022\021\n\targuments\030\001 \001(\010\022\023\n\013environment\030\002 " + - "\001(\010\022\021\n\tmaterials\030\003 \001(\010\"\332\001\n\010Metadata\022\033\n\023b" + - "uild_invocation_id\030\001 \001(\t\0224\n\020build_starte" + - "d_on\030\002 \001(\0132\032.google.protobuf.Timestamp\0225" + - "\n\021build_finished_on\030\003 \001(\0132\032.google.proto" + - "buf.Timestamp\022.\n\014completeness\030\004 \001(\0132\030.gr" + - "afeas.v1.Completeness\022\024\n\014reproducible\030\005 " + - "\001(\010\"\033\n\rBuilderConfig\022\n\n\002id\030\001 \001(\t\"\244\001\n\020InT" + - "otoProvenance\0221\n\016builder_config\030\001 \001(\0132\031." + - "grafeas.v1.BuilderConfig\022\"\n\006recipe\030\002 \001(\013" + - "2\022.grafeas.v1.Recipe\022&\n\010metadata\030\003 \001(\0132\024" + - ".grafeas.v1.Metadata\022\021\n\tmaterials\030\004 \003(\tB" + - "h\n\rio.grafeas.v1B\025InTotoProvenanceProtoP" + - "\001Z8google.golang.org/genproto/googleapis" + - "/grafeas/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.AnyProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_grafeas_v1_Recipe_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_Recipe_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Recipe_descriptor, - new java.lang.String[] { "Type", "DefinedInMaterial", "EntryPoint", "Arguments", "Environment", }); - internal_static_grafeas_v1_Completeness_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Completeness_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Completeness_descriptor, - new java.lang.String[] { "Arguments", "Environment", "Materials", }); - internal_static_grafeas_v1_Metadata_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_Metadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Metadata_descriptor, - new java.lang.String[] { "BuildInvocationId", "BuildStartedOn", "BuildFinishedOn", "Completeness", "Reproducible", }); - internal_static_grafeas_v1_BuilderConfig_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BuilderConfig_descriptor, - new java.lang.String[] { "Id", }); - internal_static_grafeas_v1_InTotoProvenance_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_InTotoProvenance_descriptor, - new java.lang.String[] { "BuilderConfig", "Recipe", "Metadata", "Materials", }); - com.google.protobuf.AnyProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java deleted file mode 100644 index 5f36886717b9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java +++ /dev/null @@ -1,1802 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_statement.proto - -package io.grafeas.v1; - -/** - *
- * Spec defined at
- * https://github.com/in-toto/attestation/tree/main/spec#statement The
- * serialized InTotoStatement will be stored as Envelope.payload.
- * Envelope.payloadType is always "application/vnd.in-toto+json".
- * 
- * - * Protobuf type {@code grafeas.v1.InTotoStatement} - */ -public final class InTotoStatement extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.InTotoStatement) - InTotoStatementOrBuilder { -private static final long serialVersionUID = 0L; - // Use InTotoStatement.newBuilder() to construct. - private InTotoStatement(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InTotoStatement() { - type_ = ""; - subject_ = java.util.Collections.emptyList(); - predicateType_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InTotoStatement(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.InTotoStatement.class, io.grafeas.v1.InTotoStatement.Builder.class); - } - - private int predicateCase_ = 0; - private java.lang.Object predicate_; - public enum PredicateCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - PROVENANCE(4), - SLSA_PROVENANCE(5), - SLSA_PROVENANCE_ZERO_TWO(6), - PREDICATE_NOT_SET(0); - private final int value; - private PredicateCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PredicateCase valueOf(int value) { - return forNumber(value); - } - - public static PredicateCase forNumber(int value) { - switch (value) { - case 4: return PROVENANCE; - case 5: return SLSA_PROVENANCE; - case 6: return SLSA_PROVENANCE_ZERO_TWO; - case 0: return PREDICATE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public PredicateCase - getPredicateCase() { - return PredicateCase.forNumber( - predicateCase_); - } - - public static final int TYPE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object type_ = ""; - /** - *
-   * Always `https://in-toto.io/Statement/v0.1`.
-   * 
- * - * string type = 1 [json_name = "_type"]; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } - } - /** - *
-   * Always `https://in-toto.io/Statement/v0.1`.
-   * 
- * - * string type = 1 [json_name = "_type"]; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUBJECT_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List subject_; - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - @java.lang.Override - public java.util.List getSubjectList() { - return subject_; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - @java.lang.Override - public java.util.List - getSubjectOrBuilderList() { - return subject_; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - @java.lang.Override - public int getSubjectCount() { - return subject_.size(); - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - @java.lang.Override - public io.grafeas.v1.Subject getSubject(int index) { - return subject_.get(index); - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - @java.lang.Override - public io.grafeas.v1.SubjectOrBuilder getSubjectOrBuilder( - int index) { - return subject_.get(index); - } - - public static final int PREDICATE_TYPE_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object predicateType_ = ""; - /** - *
-   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-   * 
- * - * string predicate_type = 3; - * @return The predicateType. - */ - @java.lang.Override - public java.lang.String getPredicateType() { - java.lang.Object ref = predicateType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - predicateType_ = s; - return s; - } - } - /** - *
-   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-   * 
- * - * string predicate_type = 3; - * @return The bytes for predicateType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPredicateTypeBytes() { - java.lang.Object ref = predicateType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - predicateType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROVENANCE_FIELD_NUMBER = 4; - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - * @return Whether the provenance field is set. - */ - @java.lang.Override - public boolean hasProvenance() { - return predicateCase_ == 4; - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - * @return The provenance. - */ - @java.lang.Override - public io.grafeas.v1.InTotoProvenance getProvenance() { - if (predicateCase_ == 4) { - return (io.grafeas.v1.InTotoProvenance) predicate_; - } - return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - @java.lang.Override - public io.grafeas.v1.InTotoProvenanceOrBuilder getProvenanceOrBuilder() { - if (predicateCase_ == 4) { - return (io.grafeas.v1.InTotoProvenance) predicate_; - } - return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); - } - - public static final int SLSA_PROVENANCE_FIELD_NUMBER = 5; - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @return Whether the slsaProvenance field is set. - */ - @java.lang.Override - public boolean hasSlsaProvenance() { - return predicateCase_ == 5; - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @return The slsaProvenance. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance getSlsaProvenance() { - if (predicateCase_ == 5) { - return (io.grafeas.v1.SlsaProvenance) predicate_; - } - return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceOrBuilder getSlsaProvenanceOrBuilder() { - if (predicateCase_ == 5) { - return (io.grafeas.v1.SlsaProvenance) predicate_; - } - return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); - } - - public static final int SLSA_PROVENANCE_ZERO_TWO_FIELD_NUMBER = 6; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @return Whether the slsaProvenanceZeroTwo field is set. - */ - @java.lang.Override - public boolean hasSlsaProvenanceZeroTwo() { - return predicateCase_ == 6; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @return The slsaProvenanceZeroTwo. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo getSlsaProvenanceZeroTwo() { - if (predicateCase_ == 6) { - return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; - } - return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder getSlsaProvenanceZeroTwoOrBuilder() { - if (predicateCase_ == 6) { - return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; - } - return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); - } - for (int i = 0; i < subject_.size(); i++) { - output.writeMessage(2, subject_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(predicateType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, predicateType_); - } - if (predicateCase_ == 4) { - output.writeMessage(4, (io.grafeas.v1.InTotoProvenance) predicate_); - } - if (predicateCase_ == 5) { - output.writeMessage(5, (io.grafeas.v1.SlsaProvenance) predicate_); - } - if (predicateCase_ == 6) { - output.writeMessage(6, (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); - } - for (int i = 0; i < subject_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, subject_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(predicateType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, predicateType_); - } - if (predicateCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (io.grafeas.v1.InTotoProvenance) predicate_); - } - if (predicateCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (io.grafeas.v1.SlsaProvenance) predicate_); - } - if (predicateCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.InTotoStatement)) { - return super.equals(obj); - } - io.grafeas.v1.InTotoStatement other = (io.grafeas.v1.InTotoStatement) obj; - - if (!getType() - .equals(other.getType())) return false; - if (!getSubjectList() - .equals(other.getSubjectList())) return false; - if (!getPredicateType() - .equals(other.getPredicateType())) return false; - if (!getPredicateCase().equals(other.getPredicateCase())) return false; - switch (predicateCase_) { - case 4: - if (!getProvenance() - .equals(other.getProvenance())) return false; - break; - case 5: - if (!getSlsaProvenance() - .equals(other.getSlsaProvenance())) return false; - break; - case 6: - if (!getSlsaProvenanceZeroTwo() - .equals(other.getSlsaProvenanceZeroTwo())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - if (getSubjectCount() > 0) { - hash = (37 * hash) + SUBJECT_FIELD_NUMBER; - hash = (53 * hash) + getSubjectList().hashCode(); - } - hash = (37 * hash) + PREDICATE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getPredicateType().hashCode(); - switch (predicateCase_) { - case 4: - hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; - hash = (53 * hash) + getProvenance().hashCode(); - break; - case 5: - hash = (37 * hash) + SLSA_PROVENANCE_FIELD_NUMBER; - hash = (53 * hash) + getSlsaProvenance().hashCode(); - break; - case 6: - hash = (37 * hash) + SLSA_PROVENANCE_ZERO_TWO_FIELD_NUMBER; - hash = (53 * hash) + getSlsaProvenanceZeroTwo().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.InTotoStatement parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.InTotoStatement parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.InTotoStatement parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.InTotoStatement parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.InTotoStatement parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.InTotoStatement parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.InTotoStatement parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.InTotoStatement parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.InTotoStatement parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.InTotoStatement parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.InTotoStatement parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.InTotoStatement parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.InTotoStatement prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Spec defined at
-   * https://github.com/in-toto/attestation/tree/main/spec#statement The
-   * serialized InTotoStatement will be stored as Envelope.payload.
-   * Envelope.payloadType is always "application/vnd.in-toto+json".
-   * 
- * - * Protobuf type {@code grafeas.v1.InTotoStatement} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.InTotoStatement) - io.grafeas.v1.InTotoStatementOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.InTotoStatement.class, io.grafeas.v1.InTotoStatement.Builder.class); - } - - // Construct using io.grafeas.v1.InTotoStatement.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = ""; - if (subjectBuilder_ == null) { - subject_ = java.util.Collections.emptyList(); - } else { - subject_ = null; - subjectBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - predicateType_ = ""; - if (provenanceBuilder_ != null) { - provenanceBuilder_.clear(); - } - if (slsaProvenanceBuilder_ != null) { - slsaProvenanceBuilder_.clear(); - } - if (slsaProvenanceZeroTwoBuilder_ != null) { - slsaProvenanceZeroTwoBuilder_.clear(); - } - predicateCase_ = 0; - predicate_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.InTotoStatement getDefaultInstanceForType() { - return io.grafeas.v1.InTotoStatement.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.InTotoStatement build() { - io.grafeas.v1.InTotoStatement result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.InTotoStatement buildPartial() { - io.grafeas.v1.InTotoStatement result = new io.grafeas.v1.InTotoStatement(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.InTotoStatement result) { - if (subjectBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - subject_ = java.util.Collections.unmodifiableList(subject_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.subject_ = subject_; - } else { - result.subject_ = subjectBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.InTotoStatement result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.predicateType_ = predicateType_; - } - } - - private void buildPartialOneofs(io.grafeas.v1.InTotoStatement result) { - result.predicateCase_ = predicateCase_; - result.predicate_ = this.predicate_; - if (predicateCase_ == 4 && - provenanceBuilder_ != null) { - result.predicate_ = provenanceBuilder_.build(); - } - if (predicateCase_ == 5 && - slsaProvenanceBuilder_ != null) { - result.predicate_ = slsaProvenanceBuilder_.build(); - } - if (predicateCase_ == 6 && - slsaProvenanceZeroTwoBuilder_ != null) { - result.predicate_ = slsaProvenanceZeroTwoBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.InTotoStatement) { - return mergeFrom((io.grafeas.v1.InTotoStatement)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.InTotoStatement other) { - if (other == io.grafeas.v1.InTotoStatement.getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (subjectBuilder_ == null) { - if (!other.subject_.isEmpty()) { - if (subject_.isEmpty()) { - subject_ = other.subject_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSubjectIsMutable(); - subject_.addAll(other.subject_); - } - onChanged(); - } - } else { - if (!other.subject_.isEmpty()) { - if (subjectBuilder_.isEmpty()) { - subjectBuilder_.dispose(); - subjectBuilder_ = null; - subject_ = other.subject_; - bitField0_ = (bitField0_ & ~0x00000002); - subjectBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubjectFieldBuilder() : null; - } else { - subjectBuilder_.addAllMessages(other.subject_); - } - } - } - if (!other.getPredicateType().isEmpty()) { - predicateType_ = other.predicateType_; - bitField0_ |= 0x00000004; - onChanged(); - } - switch (other.getPredicateCase()) { - case PROVENANCE: { - mergeProvenance(other.getProvenance()); - break; - } - case SLSA_PROVENANCE: { - mergeSlsaProvenance(other.getSlsaProvenance()); - break; - } - case SLSA_PROVENANCE_ZERO_TWO: { - mergeSlsaProvenanceZeroTwo(other.getSlsaProvenanceZeroTwo()); - break; - } - case PREDICATE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - type_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - io.grafeas.v1.Subject m = - input.readMessage( - io.grafeas.v1.Subject.parser(), - extensionRegistry); - if (subjectBuilder_ == null) { - ensureSubjectIsMutable(); - subject_.add(m); - } else { - subjectBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: { - predicateType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getProvenanceFieldBuilder().getBuilder(), - extensionRegistry); - predicateCase_ = 4; - break; - } // case 34 - case 42: { - input.readMessage( - getSlsaProvenanceFieldBuilder().getBuilder(), - extensionRegistry); - predicateCase_ = 5; - break; - } // case 42 - case 50: { - input.readMessage( - getSlsaProvenanceZeroTwoFieldBuilder().getBuilder(), - extensionRegistry); - predicateCase_ = 6; - break; - } // case 50 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int predicateCase_ = 0; - private java.lang.Object predicate_; - public PredicateCase - getPredicateCase() { - return PredicateCase.forNumber( - predicateCase_); - } - - public Builder clearPredicate() { - predicateCase_ = 0; - predicate_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object type_ = ""; - /** - *
-     * Always `https://in-toto.io/Statement/v0.1`.
-     * 
- * - * string type = 1 [json_name = "_type"]; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Always `https://in-toto.io/Statement/v0.1`.
-     * 
- * - * string type = 1 [json_name = "_type"]; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Always `https://in-toto.io/Statement/v0.1`.
-     * 
- * - * string type = 1 [json_name = "_type"]; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Always `https://in-toto.io/Statement/v0.1`.
-     * 
- * - * string type = 1 [json_name = "_type"]; - * @return This builder for chaining. - */ - public Builder clearType() { - type_ = getDefaultInstance().getType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Always `https://in-toto.io/Statement/v0.1`.
-     * 
- * - * string type = 1 [json_name = "_type"]; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List subject_ = - java.util.Collections.emptyList(); - private void ensureSubjectIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - subject_ = new java.util.ArrayList(subject_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Subject, io.grafeas.v1.Subject.Builder, io.grafeas.v1.SubjectOrBuilder> subjectBuilder_; - - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public java.util.List getSubjectList() { - if (subjectBuilder_ == null) { - return java.util.Collections.unmodifiableList(subject_); - } else { - return subjectBuilder_.getMessageList(); - } - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public int getSubjectCount() { - if (subjectBuilder_ == null) { - return subject_.size(); - } else { - return subjectBuilder_.getCount(); - } - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public io.grafeas.v1.Subject getSubject(int index) { - if (subjectBuilder_ == null) { - return subject_.get(index); - } else { - return subjectBuilder_.getMessage(index); - } - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder setSubject( - int index, io.grafeas.v1.Subject value) { - if (subjectBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectIsMutable(); - subject_.set(index, value); - onChanged(); - } else { - subjectBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder setSubject( - int index, io.grafeas.v1.Subject.Builder builderForValue) { - if (subjectBuilder_ == null) { - ensureSubjectIsMutable(); - subject_.set(index, builderForValue.build()); - onChanged(); - } else { - subjectBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder addSubject(io.grafeas.v1.Subject value) { - if (subjectBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectIsMutable(); - subject_.add(value); - onChanged(); - } else { - subjectBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder addSubject( - int index, io.grafeas.v1.Subject value) { - if (subjectBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectIsMutable(); - subject_.add(index, value); - onChanged(); - } else { - subjectBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder addSubject( - io.grafeas.v1.Subject.Builder builderForValue) { - if (subjectBuilder_ == null) { - ensureSubjectIsMutable(); - subject_.add(builderForValue.build()); - onChanged(); - } else { - subjectBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder addSubject( - int index, io.grafeas.v1.Subject.Builder builderForValue) { - if (subjectBuilder_ == null) { - ensureSubjectIsMutable(); - subject_.add(index, builderForValue.build()); - onChanged(); - } else { - subjectBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder addAllSubject( - java.lang.Iterable values) { - if (subjectBuilder_ == null) { - ensureSubjectIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subject_); - onChanged(); - } else { - subjectBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder clearSubject() { - if (subjectBuilder_ == null) { - subject_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - subjectBuilder_.clear(); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder removeSubject(int index) { - if (subjectBuilder_ == null) { - ensureSubjectIsMutable(); - subject_.remove(index); - onChanged(); - } else { - subjectBuilder_.remove(index); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public io.grafeas.v1.Subject.Builder getSubjectBuilder( - int index) { - return getSubjectFieldBuilder().getBuilder(index); - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public io.grafeas.v1.SubjectOrBuilder getSubjectOrBuilder( - int index) { - if (subjectBuilder_ == null) { - return subject_.get(index); } else { - return subjectBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public java.util.List - getSubjectOrBuilderList() { - if (subjectBuilder_ != null) { - return subjectBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subject_); - } - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public io.grafeas.v1.Subject.Builder addSubjectBuilder() { - return getSubjectFieldBuilder().addBuilder( - io.grafeas.v1.Subject.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public io.grafeas.v1.Subject.Builder addSubjectBuilder( - int index) { - return getSubjectFieldBuilder().addBuilder( - index, io.grafeas.v1.Subject.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public java.util.List - getSubjectBuilderList() { - return getSubjectFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Subject, io.grafeas.v1.Subject.Builder, io.grafeas.v1.SubjectOrBuilder> - getSubjectFieldBuilder() { - if (subjectBuilder_ == null) { - subjectBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Subject, io.grafeas.v1.Subject.Builder, io.grafeas.v1.SubjectOrBuilder>( - subject_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - subject_ = null; - } - return subjectBuilder_; - } - - private java.lang.Object predicateType_ = ""; - /** - *
-     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-     * 
- * - * string predicate_type = 3; - * @return The predicateType. - */ - public java.lang.String getPredicateType() { - java.lang.Object ref = predicateType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - predicateType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-     * 
- * - * string predicate_type = 3; - * @return The bytes for predicateType. - */ - public com.google.protobuf.ByteString - getPredicateTypeBytes() { - java.lang.Object ref = predicateType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - predicateType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-     * 
- * - * string predicate_type = 3; - * @param value The predicateType to set. - * @return This builder for chaining. - */ - public Builder setPredicateType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - predicateType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-     * 
- * - * string predicate_type = 3; - * @return This builder for chaining. - */ - public Builder clearPredicateType() { - predicateType_ = getDefaultInstance().getPredicateType(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-     * 
- * - * string predicate_type = 3; - * @param value The bytes for predicateType to set. - * @return This builder for chaining. - */ - public Builder setPredicateTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - predicateType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> provenanceBuilder_; - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - * @return Whether the provenance field is set. - */ - @java.lang.Override - public boolean hasProvenance() { - return predicateCase_ == 4; - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - * @return The provenance. - */ - @java.lang.Override - public io.grafeas.v1.InTotoProvenance getProvenance() { - if (provenanceBuilder_ == null) { - if (predicateCase_ == 4) { - return (io.grafeas.v1.InTotoProvenance) predicate_; - } - return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); - } else { - if (predicateCase_ == 4) { - return provenanceBuilder_.getMessage(); - } - return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); - } - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - public Builder setProvenance(io.grafeas.v1.InTotoProvenance value) { - if (provenanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - predicate_ = value; - onChanged(); - } else { - provenanceBuilder_.setMessage(value); - } - predicateCase_ = 4; - return this; - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - public Builder setProvenance( - io.grafeas.v1.InTotoProvenance.Builder builderForValue) { - if (provenanceBuilder_ == null) { - predicate_ = builderForValue.build(); - onChanged(); - } else { - provenanceBuilder_.setMessage(builderForValue.build()); - } - predicateCase_ = 4; - return this; - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - public Builder mergeProvenance(io.grafeas.v1.InTotoProvenance value) { - if (provenanceBuilder_ == null) { - if (predicateCase_ == 4 && - predicate_ != io.grafeas.v1.InTotoProvenance.getDefaultInstance()) { - predicate_ = io.grafeas.v1.InTotoProvenance.newBuilder((io.grafeas.v1.InTotoProvenance) predicate_) - .mergeFrom(value).buildPartial(); - } else { - predicate_ = value; - } - onChanged(); - } else { - if (predicateCase_ == 4) { - provenanceBuilder_.mergeFrom(value); - } else { - provenanceBuilder_.setMessage(value); - } - } - predicateCase_ = 4; - return this; - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - public Builder clearProvenance() { - if (provenanceBuilder_ == null) { - if (predicateCase_ == 4) { - predicateCase_ = 0; - predicate_ = null; - onChanged(); - } - } else { - if (predicateCase_ == 4) { - predicateCase_ = 0; - predicate_ = null; - } - provenanceBuilder_.clear(); - } - return this; - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - public io.grafeas.v1.InTotoProvenance.Builder getProvenanceBuilder() { - return getProvenanceFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - @java.lang.Override - public io.grafeas.v1.InTotoProvenanceOrBuilder getProvenanceOrBuilder() { - if ((predicateCase_ == 4) && (provenanceBuilder_ != null)) { - return provenanceBuilder_.getMessageOrBuilder(); - } else { - if (predicateCase_ == 4) { - return (io.grafeas.v1.InTotoProvenance) predicate_; - } - return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); - } - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> - getProvenanceFieldBuilder() { - if (provenanceBuilder_ == null) { - if (!(predicateCase_ == 4)) { - predicate_ = io.grafeas.v1.InTotoProvenance.getDefaultInstance(); - } - provenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder>( - (io.grafeas.v1.InTotoProvenance) predicate_, - getParentForChildren(), - isClean()); - predicate_ = null; - } - predicateCase_ = 4; - onChanged(); - return provenanceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance, io.grafeas.v1.SlsaProvenance.Builder, io.grafeas.v1.SlsaProvenanceOrBuilder> slsaProvenanceBuilder_; - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @return Whether the slsaProvenance field is set. - */ - @java.lang.Override - public boolean hasSlsaProvenance() { - return predicateCase_ == 5; - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @return The slsaProvenance. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance getSlsaProvenance() { - if (slsaProvenanceBuilder_ == null) { - if (predicateCase_ == 5) { - return (io.grafeas.v1.SlsaProvenance) predicate_; - } - return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); - } else { - if (predicateCase_ == 5) { - return slsaProvenanceBuilder_.getMessage(); - } - return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); - } - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - public Builder setSlsaProvenance(io.grafeas.v1.SlsaProvenance value) { - if (slsaProvenanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - predicate_ = value; - onChanged(); - } else { - slsaProvenanceBuilder_.setMessage(value); - } - predicateCase_ = 5; - return this; - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - public Builder setSlsaProvenance( - io.grafeas.v1.SlsaProvenance.Builder builderForValue) { - if (slsaProvenanceBuilder_ == null) { - predicate_ = builderForValue.build(); - onChanged(); - } else { - slsaProvenanceBuilder_.setMessage(builderForValue.build()); - } - predicateCase_ = 5; - return this; - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - public Builder mergeSlsaProvenance(io.grafeas.v1.SlsaProvenance value) { - if (slsaProvenanceBuilder_ == null) { - if (predicateCase_ == 5 && - predicate_ != io.grafeas.v1.SlsaProvenance.getDefaultInstance()) { - predicate_ = io.grafeas.v1.SlsaProvenance.newBuilder((io.grafeas.v1.SlsaProvenance) predicate_) - .mergeFrom(value).buildPartial(); - } else { - predicate_ = value; - } - onChanged(); - } else { - if (predicateCase_ == 5) { - slsaProvenanceBuilder_.mergeFrom(value); - } else { - slsaProvenanceBuilder_.setMessage(value); - } - } - predicateCase_ = 5; - return this; - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - public Builder clearSlsaProvenance() { - if (slsaProvenanceBuilder_ == null) { - if (predicateCase_ == 5) { - predicateCase_ = 0; - predicate_ = null; - onChanged(); - } - } else { - if (predicateCase_ == 5) { - predicateCase_ = 0; - predicate_ = null; - } - slsaProvenanceBuilder_.clear(); - } - return this; - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - public io.grafeas.v1.SlsaProvenance.Builder getSlsaProvenanceBuilder() { - return getSlsaProvenanceFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceOrBuilder getSlsaProvenanceOrBuilder() { - if ((predicateCase_ == 5) && (slsaProvenanceBuilder_ != null)) { - return slsaProvenanceBuilder_.getMessageOrBuilder(); - } else { - if (predicateCase_ == 5) { - return (io.grafeas.v1.SlsaProvenance) predicate_; - } - return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); - } - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance, io.grafeas.v1.SlsaProvenance.Builder, io.grafeas.v1.SlsaProvenanceOrBuilder> - getSlsaProvenanceFieldBuilder() { - if (slsaProvenanceBuilder_ == null) { - if (!(predicateCase_ == 5)) { - predicate_ = io.grafeas.v1.SlsaProvenance.getDefaultInstance(); - } - slsaProvenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance, io.grafeas.v1.SlsaProvenance.Builder, io.grafeas.v1.SlsaProvenanceOrBuilder>( - (io.grafeas.v1.SlsaProvenance) predicate_, - getParentForChildren(), - isClean()); - predicate_ = null; - } - predicateCase_ = 5; - onChanged(); - return slsaProvenanceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder, io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder> slsaProvenanceZeroTwoBuilder_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @return Whether the slsaProvenanceZeroTwo field is set. - */ - @java.lang.Override - public boolean hasSlsaProvenanceZeroTwo() { - return predicateCase_ == 6; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @return The slsaProvenanceZeroTwo. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo getSlsaProvenanceZeroTwo() { - if (slsaProvenanceZeroTwoBuilder_ == null) { - if (predicateCase_ == 6) { - return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; - } - return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); - } else { - if (predicateCase_ == 6) { - return slsaProvenanceZeroTwoBuilder_.getMessage(); - } - return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - public Builder setSlsaProvenanceZeroTwo(io.grafeas.v1.SlsaProvenanceZeroTwo value) { - if (slsaProvenanceZeroTwoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - predicate_ = value; - onChanged(); - } else { - slsaProvenanceZeroTwoBuilder_.setMessage(value); - } - predicateCase_ = 6; - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - public Builder setSlsaProvenanceZeroTwo( - io.grafeas.v1.SlsaProvenanceZeroTwo.Builder builderForValue) { - if (slsaProvenanceZeroTwoBuilder_ == null) { - predicate_ = builderForValue.build(); - onChanged(); - } else { - slsaProvenanceZeroTwoBuilder_.setMessage(builderForValue.build()); - } - predicateCase_ = 6; - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - public Builder mergeSlsaProvenanceZeroTwo(io.grafeas.v1.SlsaProvenanceZeroTwo value) { - if (slsaProvenanceZeroTwoBuilder_ == null) { - if (predicateCase_ == 6 && - predicate_ != io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance()) { - predicate_ = io.grafeas.v1.SlsaProvenanceZeroTwo.newBuilder((io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_) - .mergeFrom(value).buildPartial(); - } else { - predicate_ = value; - } - onChanged(); - } else { - if (predicateCase_ == 6) { - slsaProvenanceZeroTwoBuilder_.mergeFrom(value); - } else { - slsaProvenanceZeroTwoBuilder_.setMessage(value); - } - } - predicateCase_ = 6; - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - public Builder clearSlsaProvenanceZeroTwo() { - if (slsaProvenanceZeroTwoBuilder_ == null) { - if (predicateCase_ == 6) { - predicateCase_ = 0; - predicate_ = null; - onChanged(); - } - } else { - if (predicateCase_ == 6) { - predicateCase_ = 0; - predicate_ = null; - } - slsaProvenanceZeroTwoBuilder_.clear(); - } - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.Builder getSlsaProvenanceZeroTwoBuilder() { - return getSlsaProvenanceZeroTwoFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder getSlsaProvenanceZeroTwoOrBuilder() { - if ((predicateCase_ == 6) && (slsaProvenanceZeroTwoBuilder_ != null)) { - return slsaProvenanceZeroTwoBuilder_.getMessageOrBuilder(); - } else { - if (predicateCase_ == 6) { - return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; - } - return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder, io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder> - getSlsaProvenanceZeroTwoFieldBuilder() { - if (slsaProvenanceZeroTwoBuilder_ == null) { - if (!(predicateCase_ == 6)) { - predicate_ = io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); - } - slsaProvenanceZeroTwoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder, io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder>( - (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_, - getParentForChildren(), - isClean()); - predicate_ = null; - } - predicateCase_ = 6; - onChanged(); - return slsaProvenanceZeroTwoBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.InTotoStatement) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.InTotoStatement) - private static final io.grafeas.v1.InTotoStatement DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.InTotoStatement(); - } - - public static io.grafeas.v1.InTotoStatement getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InTotoStatement parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.InTotoStatement getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java deleted file mode 100644 index 0f28f2f9126d..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java +++ /dev/null @@ -1,120 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_statement.proto - -package io.grafeas.v1; - -public interface InTotoStatementOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.InTotoStatement) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Always `https://in-toto.io/Statement/v0.1`.
-   * 
- * - * string type = 1 [json_name = "_type"]; - * @return The type. - */ - java.lang.String getType(); - /** - *
-   * Always `https://in-toto.io/Statement/v0.1`.
-   * 
- * - * string type = 1 [json_name = "_type"]; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - java.util.List - getSubjectList(); - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - io.grafeas.v1.Subject getSubject(int index); - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - int getSubjectCount(); - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - java.util.List - getSubjectOrBuilderList(); - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - io.grafeas.v1.SubjectOrBuilder getSubjectOrBuilder( - int index); - - /** - *
-   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-   * 
- * - * string predicate_type = 3; - * @return The predicateType. - */ - java.lang.String getPredicateType(); - /** - *
-   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-   * 
- * - * string predicate_type = 3; - * @return The bytes for predicateType. - */ - com.google.protobuf.ByteString - getPredicateTypeBytes(); - - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - * @return Whether the provenance field is set. - */ - boolean hasProvenance(); - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - * @return The provenance. - */ - io.grafeas.v1.InTotoProvenance getProvenance(); - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - io.grafeas.v1.InTotoProvenanceOrBuilder getProvenanceOrBuilder(); - - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @return Whether the slsaProvenance field is set. - */ - boolean hasSlsaProvenance(); - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @return The slsaProvenance. - */ - io.grafeas.v1.SlsaProvenance getSlsaProvenance(); - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - io.grafeas.v1.SlsaProvenanceOrBuilder getSlsaProvenanceOrBuilder(); - - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @return Whether the slsaProvenanceZeroTwo field is set. - */ - boolean hasSlsaProvenanceZeroTwo(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @return The slsaProvenanceZeroTwo. - */ - io.grafeas.v1.SlsaProvenanceZeroTwo getSlsaProvenanceZeroTwo(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder getSlsaProvenanceZeroTwoOrBuilder(); - - public io.grafeas.v1.InTotoStatement.PredicateCase getPredicateCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java deleted file mode 100644 index 966c8d35ded8..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_statement.proto - -package io.grafeas.v1; - -public final class InTotoStatementProto { - private InTotoStatementProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_InTotoStatement_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Subject_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Subject_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Subject_DigestEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Subject_DigestEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n!grafeas/v1/intoto_statement.proto\022\ngra" + - "feas.v1\032\"grafeas/v1/intoto_provenance.pr" + - "oto\032 grafeas/v1/slsa_provenance.proto\032)g" + - "rafeas/v1/slsa_provenance_zero_two.proto" + - "\"\243\002\n\017InTotoStatement\022\023\n\004type\030\001 \001(\tR\005_typ" + - "e\022$\n\007subject\030\002 \003(\0132\023.grafeas.v1.Subject\022" + - "\026\n\016predicate_type\030\003 \001(\t\0222\n\nprovenance\030\004 " + - "\001(\0132\034.grafeas.v1.InTotoProvenanceH\000\0225\n\017s" + - "lsa_provenance\030\005 \001(\0132\032.grafeas.v1.SlsaPr" + - "ovenanceH\000\022E\n\030slsa_provenance_zero_two\030\006" + - " \001(\0132!.grafeas.v1.SlsaProvenanceZeroTwoH" + - "\000B\013\n\tpredicate\"w\n\007Subject\022\014\n\004name\030\001 \001(\t\022" + - "/\n\006digest\030\002 \003(\0132\037.grafeas.v1.Subject.Dig" + - "estEntry\032-\n\013DigestEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + - "value\030\002 \001(\t:\0028\001Bg\n\rio.grafeas.v1B\024InToto" + - "StatementProtoP\001Z8google.golang.org/genp" + - "roto/googleapis/grafeas/v1;grafeas\242\002\003GRA" + - "b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.grafeas.v1.InTotoProvenanceProto.getDescriptor(), - io.grafeas.v1.SlsaProvenanceProto.getDescriptor(), - io.grafeas.v1.SlsaProvenanceZeroTwoProto.getDescriptor(), - }); - internal_static_grafeas_v1_InTotoStatement_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_InTotoStatement_descriptor, - new java.lang.String[] { "Type", "Subject", "PredicateType", "Provenance", "SlsaProvenance", "SlsaProvenanceZeroTwo", "Predicate", }); - internal_static_grafeas_v1_Subject_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Subject_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Subject_descriptor, - new java.lang.String[] { "Name", "Digest", }); - internal_static_grafeas_v1_Subject_DigestEntry_descriptor = - internal_static_grafeas_v1_Subject_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_Subject_DigestEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Subject_DigestEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - io.grafeas.v1.InTotoProvenanceProto.getDescriptor(); - io.grafeas.v1.SlsaProvenanceProto.getDescriptor(); - io.grafeas.v1.SlsaProvenanceZeroTwoProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java deleted file mode 100644 index f0b0c75c7f9c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java +++ /dev/null @@ -1,586 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/attestation.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.Jwt} - */ -public final class Jwt extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Jwt) - JwtOrBuilder { -private static final long serialVersionUID = 0L; - // Use Jwt.newBuilder() to construct. - private Jwt(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Jwt() { - compactJwt_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Jwt(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Jwt.class, io.grafeas.v1.Jwt.Builder.class); - } - - public static final int COMPACT_JWT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object compactJwt_ = ""; - /** - *
-   * The compact encoding of a JWS, which is always three base64 encoded strings
-   * joined by periods. For details, see:
-   * https://tools.ietf.org/html/rfc7515.html#section-3.1
-   * 
- * - * string compact_jwt = 1; - * @return The compactJwt. - */ - @java.lang.Override - public java.lang.String getCompactJwt() { - java.lang.Object ref = compactJwt_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - compactJwt_ = s; - return s; - } - } - /** - *
-   * The compact encoding of a JWS, which is always three base64 encoded strings
-   * joined by periods. For details, see:
-   * https://tools.ietf.org/html/rfc7515.html#section-3.1
-   * 
- * - * string compact_jwt = 1; - * @return The bytes for compactJwt. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCompactJwtBytes() { - java.lang.Object ref = compactJwt_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - compactJwt_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compactJwt_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, compactJwt_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compactJwt_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, compactJwt_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Jwt)) { - return super.equals(obj); - } - io.grafeas.v1.Jwt other = (io.grafeas.v1.Jwt) obj; - - if (!getCompactJwt() - .equals(other.getCompactJwt())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + COMPACT_JWT_FIELD_NUMBER; - hash = (53 * hash) + getCompactJwt().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Jwt parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Jwt parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Jwt parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Jwt parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Jwt parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Jwt parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Jwt parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Jwt parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Jwt parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Jwt parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Jwt parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Jwt parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Jwt prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.Jwt} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Jwt) - io.grafeas.v1.JwtOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Jwt.class, io.grafeas.v1.Jwt.Builder.class); - } - - // Construct using io.grafeas.v1.Jwt.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - compactJwt_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Jwt getDefaultInstanceForType() { - return io.grafeas.v1.Jwt.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Jwt build() { - io.grafeas.v1.Jwt result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Jwt buildPartial() { - io.grafeas.v1.Jwt result = new io.grafeas.v1.Jwt(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Jwt result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.compactJwt_ = compactJwt_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Jwt) { - return mergeFrom((io.grafeas.v1.Jwt)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Jwt other) { - if (other == io.grafeas.v1.Jwt.getDefaultInstance()) return this; - if (!other.getCompactJwt().isEmpty()) { - compactJwt_ = other.compactJwt_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - compactJwt_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object compactJwt_ = ""; - /** - *
-     * The compact encoding of a JWS, which is always three base64 encoded strings
-     * joined by periods. For details, see:
-     * https://tools.ietf.org/html/rfc7515.html#section-3.1
-     * 
- * - * string compact_jwt = 1; - * @return The compactJwt. - */ - public java.lang.String getCompactJwt() { - java.lang.Object ref = compactJwt_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - compactJwt_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The compact encoding of a JWS, which is always three base64 encoded strings
-     * joined by periods. For details, see:
-     * https://tools.ietf.org/html/rfc7515.html#section-3.1
-     * 
- * - * string compact_jwt = 1; - * @return The bytes for compactJwt. - */ - public com.google.protobuf.ByteString - getCompactJwtBytes() { - java.lang.Object ref = compactJwt_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - compactJwt_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The compact encoding of a JWS, which is always three base64 encoded strings
-     * joined by periods. For details, see:
-     * https://tools.ietf.org/html/rfc7515.html#section-3.1
-     * 
- * - * string compact_jwt = 1; - * @param value The compactJwt to set. - * @return This builder for chaining. - */ - public Builder setCompactJwt( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - compactJwt_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The compact encoding of a JWS, which is always three base64 encoded strings
-     * joined by periods. For details, see:
-     * https://tools.ietf.org/html/rfc7515.html#section-3.1
-     * 
- * - * string compact_jwt = 1; - * @return This builder for chaining. - */ - public Builder clearCompactJwt() { - compactJwt_ = getDefaultInstance().getCompactJwt(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The compact encoding of a JWS, which is always three base64 encoded strings
-     * joined by periods. For details, see:
-     * https://tools.ietf.org/html/rfc7515.html#section-3.1
-     * 
- * - * string compact_jwt = 1; - * @param value The bytes for compactJwt to set. - * @return This builder for chaining. - */ - public Builder setCompactJwtBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - compactJwt_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Jwt) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Jwt) - private static final io.grafeas.v1.Jwt DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Jwt(); - } - - public static io.grafeas.v1.Jwt getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Jwt parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Jwt getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java deleted file mode 100644 index b548750df7d9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/attestation.proto - -package io.grafeas.v1; - -public interface JwtOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Jwt) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The compact encoding of a JWS, which is always three base64 encoded strings
-   * joined by periods. For details, see:
-   * https://tools.ietf.org/html/rfc7515.html#section-3.1
-   * 
- * - * string compact_jwt = 1; - * @return The compactJwt. - */ - java.lang.String getCompactJwt(); - /** - *
-   * The compact encoding of a JWS, which is always three base64 encoded strings
-   * joined by periods. For details, see:
-   * https://tools.ietf.org/html/rfc7515.html#section-3.1
-   * 
- * - * string compact_jwt = 1; - * @return The bytes for compactJwt. - */ - com.google.protobuf.ByteString - getCompactJwtBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java deleted file mode 100644 index 7c69d4115d68..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java +++ /dev/null @@ -1,751 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -/** - *
- * Layer holds metadata specific to a layer of a Docker image.
- * 
- * - * Protobuf type {@code grafeas.v1.Layer} - */ -public final class Layer extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Layer) - LayerOrBuilder { -private static final long serialVersionUID = 0L; - // Use Layer.newBuilder() to construct. - private Layer(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Layer() { - directive_ = ""; - arguments_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Layer(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Layer.class, io.grafeas.v1.Layer.Builder.class); - } - - public static final int DIRECTIVE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object directive_ = ""; - /** - *
-   * Required. The recovered Dockerfile directive used to construct this layer.
-   * See https://docs.docker.com/engine/reference/builder/ for more information.
-   * 
- * - * string directive = 1; - * @return The directive. - */ - @java.lang.Override - public java.lang.String getDirective() { - java.lang.Object ref = directive_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - directive_ = s; - return s; - } - } - /** - *
-   * Required. The recovered Dockerfile directive used to construct this layer.
-   * See https://docs.docker.com/engine/reference/builder/ for more information.
-   * 
- * - * string directive = 1; - * @return The bytes for directive. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDirectiveBytes() { - java.lang.Object ref = directive_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - directive_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARGUMENTS_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object arguments_ = ""; - /** - *
-   * The recovered arguments to the Dockerfile directive.
-   * 
- * - * string arguments = 2; - * @return The arguments. - */ - @java.lang.Override - public java.lang.String getArguments() { - java.lang.Object ref = arguments_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - arguments_ = s; - return s; - } - } - /** - *
-   * The recovered arguments to the Dockerfile directive.
-   * 
- * - * string arguments = 2; - * @return The bytes for arguments. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getArgumentsBytes() { - java.lang.Object ref = arguments_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - arguments_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(directive_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, directive_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(arguments_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, arguments_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(directive_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, directive_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(arguments_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, arguments_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Layer)) { - return super.equals(obj); - } - io.grafeas.v1.Layer other = (io.grafeas.v1.Layer) obj; - - if (!getDirective() - .equals(other.getDirective())) return false; - if (!getArguments() - .equals(other.getArguments())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DIRECTIVE_FIELD_NUMBER; - hash = (53 * hash) + getDirective().hashCode(); - hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; - hash = (53 * hash) + getArguments().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Layer parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Layer parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Layer parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Layer parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Layer parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Layer parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Layer parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Layer parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Layer parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Layer parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Layer parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Layer parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Layer prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Layer holds metadata specific to a layer of a Docker image.
-   * 
- * - * Protobuf type {@code grafeas.v1.Layer} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Layer) - io.grafeas.v1.LayerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Layer.class, io.grafeas.v1.Layer.Builder.class); - } - - // Construct using io.grafeas.v1.Layer.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - directive_ = ""; - arguments_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Layer getDefaultInstanceForType() { - return io.grafeas.v1.Layer.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Layer build() { - io.grafeas.v1.Layer result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Layer buildPartial() { - io.grafeas.v1.Layer result = new io.grafeas.v1.Layer(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Layer result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.directive_ = directive_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.arguments_ = arguments_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Layer) { - return mergeFrom((io.grafeas.v1.Layer)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Layer other) { - if (other == io.grafeas.v1.Layer.getDefaultInstance()) return this; - if (!other.getDirective().isEmpty()) { - directive_ = other.directive_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getArguments().isEmpty()) { - arguments_ = other.arguments_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - directive_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - arguments_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object directive_ = ""; - /** - *
-     * Required. The recovered Dockerfile directive used to construct this layer.
-     * See https://docs.docker.com/engine/reference/builder/ for more information.
-     * 
- * - * string directive = 1; - * @return The directive. - */ - public java.lang.String getDirective() { - java.lang.Object ref = directive_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - directive_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The recovered Dockerfile directive used to construct this layer.
-     * See https://docs.docker.com/engine/reference/builder/ for more information.
-     * 
- * - * string directive = 1; - * @return The bytes for directive. - */ - public com.google.protobuf.ByteString - getDirectiveBytes() { - java.lang.Object ref = directive_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - directive_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The recovered Dockerfile directive used to construct this layer.
-     * See https://docs.docker.com/engine/reference/builder/ for more information.
-     * 
- * - * string directive = 1; - * @param value The directive to set. - * @return This builder for chaining. - */ - public Builder setDirective( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - directive_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. The recovered Dockerfile directive used to construct this layer.
-     * See https://docs.docker.com/engine/reference/builder/ for more information.
-     * 
- * - * string directive = 1; - * @return This builder for chaining. - */ - public Builder clearDirective() { - directive_ = getDefaultInstance().getDirective(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. The recovered Dockerfile directive used to construct this layer.
-     * See https://docs.docker.com/engine/reference/builder/ for more information.
-     * 
- * - * string directive = 1; - * @param value The bytes for directive to set. - * @return This builder for chaining. - */ - public Builder setDirectiveBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - directive_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object arguments_ = ""; - /** - *
-     * The recovered arguments to the Dockerfile directive.
-     * 
- * - * string arguments = 2; - * @return The arguments. - */ - public java.lang.String getArguments() { - java.lang.Object ref = arguments_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - arguments_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The recovered arguments to the Dockerfile directive.
-     * 
- * - * string arguments = 2; - * @return The bytes for arguments. - */ - public com.google.protobuf.ByteString - getArgumentsBytes() { - java.lang.Object ref = arguments_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - arguments_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The recovered arguments to the Dockerfile directive.
-     * 
- * - * string arguments = 2; - * @param value The arguments to set. - * @return This builder for chaining. - */ - public Builder setArguments( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - arguments_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The recovered arguments to the Dockerfile directive.
-     * 
- * - * string arguments = 2; - * @return This builder for chaining. - */ - public Builder clearArguments() { - arguments_ = getDefaultInstance().getArguments(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The recovered arguments to the Dockerfile directive.
-     * 
- * - * string arguments = 2; - * @param value The bytes for arguments to set. - * @return This builder for chaining. - */ - public Builder setArgumentsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - arguments_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Layer) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Layer) - private static final io.grafeas.v1.Layer DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Layer(); - } - - public static io.grafeas.v1.Layer getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Layer parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Layer getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java deleted file mode 100644 index 57a86a319e96..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -public interface LayerOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Layer) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The recovered Dockerfile directive used to construct this layer.
-   * See https://docs.docker.com/engine/reference/builder/ for more information.
-   * 
- * - * string directive = 1; - * @return The directive. - */ - java.lang.String getDirective(); - /** - *
-   * Required. The recovered Dockerfile directive used to construct this layer.
-   * See https://docs.docker.com/engine/reference/builder/ for more information.
-   * 
- * - * string directive = 1; - * @return The bytes for directive. - */ - com.google.protobuf.ByteString - getDirectiveBytes(); - - /** - *
-   * The recovered arguments to the Dockerfile directive.
-   * 
- * - * string arguments = 2; - * @return The arguments. - */ - java.lang.String getArguments(); - /** - *
-   * The recovered arguments to the Dockerfile directive.
-   * 
- * - * string arguments = 2; - * @return The bytes for arguments. - */ - com.google.protobuf.ByteString - getArgumentsBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java deleted file mode 100644 index 376885d90c5f..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java +++ /dev/null @@ -1,772 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - *
- * License information.
- * 
- * - * Protobuf type {@code grafeas.v1.License} - */ -public final class License extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.License) - LicenseOrBuilder { -private static final long serialVersionUID = 0L; - // Use License.newBuilder() to construct. - private License(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private License() { - expression_ = ""; - comments_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new License(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_License_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_License_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.License.class, io.grafeas.v1.License.Builder.class); - } - - public static final int EXPRESSION_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object expression_ = ""; - /** - *
-   * Often a single license can be used to represent the licensing terms.
-   * Sometimes it is necessary to include a choice of one or more licenses
-   * or some combination of license identifiers.
-   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-   * "GPL-2.0-or-later WITH Bison-exception-2.2".
-   * 
- * - * string expression = 1; - * @return The expression. - */ - @java.lang.Override - public java.lang.String getExpression() { - java.lang.Object ref = expression_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - expression_ = s; - return s; - } - } - /** - *
-   * Often a single license can be used to represent the licensing terms.
-   * Sometimes it is necessary to include a choice of one or more licenses
-   * or some combination of license identifiers.
-   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-   * "GPL-2.0-or-later WITH Bison-exception-2.2".
-   * 
- * - * string expression = 1; - * @return The bytes for expression. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getExpressionBytes() { - java.lang.Object ref = expression_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - expression_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int COMMENTS_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object comments_ = ""; - /** - *
-   * Comments
-   * 
- * - * string comments = 2; - * @return The comments. - */ - @java.lang.Override - public java.lang.String getComments() { - java.lang.Object ref = comments_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - comments_ = s; - return s; - } - } - /** - *
-   * Comments
-   * 
- * - * string comments = 2; - * @return The bytes for comments. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCommentsBytes() { - java.lang.Object ref = comments_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - comments_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expression_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, expression_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comments_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, comments_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expression_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, expression_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comments_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, comments_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.License)) { - return super.equals(obj); - } - io.grafeas.v1.License other = (io.grafeas.v1.License) obj; - - if (!getExpression() - .equals(other.getExpression())) return false; - if (!getComments() - .equals(other.getComments())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + EXPRESSION_FIELD_NUMBER; - hash = (53 * hash) + getExpression().hashCode(); - hash = (37 * hash) + COMMENTS_FIELD_NUMBER; - hash = (53 * hash) + getComments().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.License parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.License parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.License parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.License parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.License parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.License parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.License parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.License parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.License parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.License parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.License parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.License parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.License prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * License information.
-   * 
- * - * Protobuf type {@code grafeas.v1.License} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.License) - io.grafeas.v1.LicenseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_License_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_License_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.License.class, io.grafeas.v1.License.Builder.class); - } - - // Construct using io.grafeas.v1.License.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - expression_ = ""; - comments_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_License_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.License getDefaultInstanceForType() { - return io.grafeas.v1.License.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.License build() { - io.grafeas.v1.License result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.License buildPartial() { - io.grafeas.v1.License result = new io.grafeas.v1.License(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.License result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.expression_ = expression_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.comments_ = comments_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.License) { - return mergeFrom((io.grafeas.v1.License)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.License other) { - if (other == io.grafeas.v1.License.getDefaultInstance()) return this; - if (!other.getExpression().isEmpty()) { - expression_ = other.expression_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getComments().isEmpty()) { - comments_ = other.comments_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - expression_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - comments_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object expression_ = ""; - /** - *
-     * Often a single license can be used to represent the licensing terms.
-     * Sometimes it is necessary to include a choice of one or more licenses
-     * or some combination of license identifiers.
-     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-     * "GPL-2.0-or-later WITH Bison-exception-2.2".
-     * 
- * - * string expression = 1; - * @return The expression. - */ - public java.lang.String getExpression() { - java.lang.Object ref = expression_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - expression_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Often a single license can be used to represent the licensing terms.
-     * Sometimes it is necessary to include a choice of one or more licenses
-     * or some combination of license identifiers.
-     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-     * "GPL-2.0-or-later WITH Bison-exception-2.2".
-     * 
- * - * string expression = 1; - * @return The bytes for expression. - */ - public com.google.protobuf.ByteString - getExpressionBytes() { - java.lang.Object ref = expression_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - expression_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Often a single license can be used to represent the licensing terms.
-     * Sometimes it is necessary to include a choice of one or more licenses
-     * or some combination of license identifiers.
-     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-     * "GPL-2.0-or-later WITH Bison-exception-2.2".
-     * 
- * - * string expression = 1; - * @param value The expression to set. - * @return This builder for chaining. - */ - public Builder setExpression( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - expression_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Often a single license can be used to represent the licensing terms.
-     * Sometimes it is necessary to include a choice of one or more licenses
-     * or some combination of license identifiers.
-     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-     * "GPL-2.0-or-later WITH Bison-exception-2.2".
-     * 
- * - * string expression = 1; - * @return This builder for chaining. - */ - public Builder clearExpression() { - expression_ = getDefaultInstance().getExpression(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Often a single license can be used to represent the licensing terms.
-     * Sometimes it is necessary to include a choice of one or more licenses
-     * or some combination of license identifiers.
-     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-     * "GPL-2.0-or-later WITH Bison-exception-2.2".
-     * 
- * - * string expression = 1; - * @param value The bytes for expression to set. - * @return This builder for chaining. - */ - public Builder setExpressionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - expression_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object comments_ = ""; - /** - *
-     * Comments
-     * 
- * - * string comments = 2; - * @return The comments. - */ - public java.lang.String getComments() { - java.lang.Object ref = comments_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - comments_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Comments
-     * 
- * - * string comments = 2; - * @return The bytes for comments. - */ - public com.google.protobuf.ByteString - getCommentsBytes() { - java.lang.Object ref = comments_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - comments_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Comments
-     * 
- * - * string comments = 2; - * @param value The comments to set. - * @return This builder for chaining. - */ - public Builder setComments( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - comments_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Comments
-     * 
- * - * string comments = 2; - * @return This builder for chaining. - */ - public Builder clearComments() { - comments_ = getDefaultInstance().getComments(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Comments
-     * 
- * - * string comments = 2; - * @param value The bytes for comments to set. - * @return This builder for chaining. - */ - public Builder setCommentsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - comments_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.License) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.License) - private static final io.grafeas.v1.License DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.License(); - } - - public static io.grafeas.v1.License getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public License parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.License getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java deleted file mode 100644 index 0fa178dd2864..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public interface LicenseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.License) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Often a single license can be used to represent the licensing terms.
-   * Sometimes it is necessary to include a choice of one or more licenses
-   * or some combination of license identifiers.
-   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-   * "GPL-2.0-or-later WITH Bison-exception-2.2".
-   * 
- * - * string expression = 1; - * @return The expression. - */ - java.lang.String getExpression(); - /** - *
-   * Often a single license can be used to represent the licensing terms.
-   * Sometimes it is necessary to include a choice of one or more licenses
-   * or some combination of license identifiers.
-   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-   * "GPL-2.0-or-later WITH Bison-exception-2.2".
-   * 
- * - * string expression = 1; - * @return The bytes for expression. - */ - com.google.protobuf.ByteString - getExpressionBytes(); - - /** - *
-   * Comments
-   * 
- * - * string comments = 2; - * @return The comments. - */ - java.lang.String getComments(); - /** - *
-   * Comments
-   * 
- * - * string comments = 2; - * @return The bytes for comments. - */ - com.google.protobuf.ByteString - getCommentsBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java deleted file mode 100644 index f10788f12a0a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java +++ /dev/null @@ -1,997 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to list occurrences for a note.
- * 
- * - * Protobuf type {@code grafeas.v1.ListNoteOccurrencesRequest} - */ -public final class ListNoteOccurrencesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ListNoteOccurrencesRequest) - ListNoteOccurrencesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListNoteOccurrencesRequest.newBuilder() to construct. - private ListNoteOccurrencesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListNoteOccurrencesRequest() { - name_ = ""; - filter_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListNoteOccurrencesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNoteOccurrencesRequest.class, io.grafeas.v1.ListNoteOccurrencesRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the note to list occurrences for in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the note to list occurrences for in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 3; - private int pageSize_ = 0; - /** - *
-   * Number of occurrences to return in the list.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); - } - if (pageSize_ != 0) { - output.writeInt32(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ListNoteOccurrencesRequest)) { - return super.equals(obj); - } - io.grafeas.v1.ListNoteOccurrencesRequest other = (io.grafeas.v1.ListNoteOccurrencesRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ListNoteOccurrencesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to list occurrences for a note.
-   * 
- * - * Protobuf type {@code grafeas.v1.ListNoteOccurrencesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNoteOccurrencesRequest) - io.grafeas.v1.ListNoteOccurrencesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNoteOccurrencesRequest.class, io.grafeas.v1.ListNoteOccurrencesRequest.Builder.class); - } - - // Construct using io.grafeas.v1.ListNoteOccurrencesRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - filter_ = ""; - pageSize_ = 0; - pageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesRequest getDefaultInstanceForType() { - return io.grafeas.v1.ListNoteOccurrencesRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesRequest build() { - io.grafeas.v1.ListNoteOccurrencesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesRequest buildPartial() { - io.grafeas.v1.ListNoteOccurrencesRequest result = new io.grafeas.v1.ListNoteOccurrencesRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.ListNoteOccurrencesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.pageToken_ = pageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ListNoteOccurrencesRequest) { - return mergeFrom((io.grafeas.v1.ListNoteOccurrencesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ListNoteOccurrencesRequest other) { - if (other == io.grafeas.v1.ListNoteOccurrencesRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the note to list occurrences for in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the note to list occurrences for in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the note to list occurrences for in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the note to list occurrences for in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the note to list occurrences for in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - filter_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Number of occurrences to return in the list.
-     * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Number of occurrences to return in the list.
-     * 
- * - * int32 page_size = 3; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Number of occurrences to return in the list.
-     * 
- * - * int32 page_size = 3; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000004); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - pageToken_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNoteOccurrencesRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ListNoteOccurrencesRequest) - private static final io.grafeas.v1.ListNoteOccurrencesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ListNoteOccurrencesRequest(); - } - - public static io.grafeas.v1.ListNoteOccurrencesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNoteOccurrencesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java deleted file mode 100644 index 170d72ff8fcc..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java +++ /dev/null @@ -1,81 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface ListNoteOccurrencesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNoteOccurrencesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the note to list occurrences for in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the note to list occurrences for in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); - - /** - *
-   * Number of occurrences to return in the list.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java deleted file mode 100644 index 8b768f9bac8a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java +++ /dev/null @@ -1,1026 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Response for listing occurrences for a note.
- * 
- * - * Protobuf type {@code grafeas.v1.ListNoteOccurrencesResponse} - */ -public final class ListNoteOccurrencesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ListNoteOccurrencesResponse) - ListNoteOccurrencesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListNoteOccurrencesResponse.newBuilder() to construct. - private ListNoteOccurrencesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListNoteOccurrencesResponse() { - occurrences_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListNoteOccurrencesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNoteOccurrencesResponse.class, io.grafeas.v1.ListNoteOccurrencesResponse.Builder.class); - } - - public static final int OCCURRENCES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List occurrences_; - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public java.util.List getOccurrencesList() { - return occurrences_; - } - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public java.util.List - getOccurrencesOrBuilderList() { - return occurrences_; - } - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public int getOccurrencesCount() { - return occurrences_.size(); - } - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public io.grafeas.v1.Occurrence getOccurrences(int index) { - return occurrences_.get(index); - } - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - return occurrences_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < occurrences_.size(); i++) { - output.writeMessage(1, occurrences_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < occurrences_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, occurrences_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ListNoteOccurrencesResponse)) { - return super.equals(obj); - } - io.grafeas.v1.ListNoteOccurrencesResponse other = (io.grafeas.v1.ListNoteOccurrencesResponse) obj; - - if (!getOccurrencesList() - .equals(other.getOccurrencesList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getOccurrencesCount() > 0) { - hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; - hash = (53 * hash) + getOccurrencesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ListNoteOccurrencesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response for listing occurrences for a note.
-   * 
- * - * Protobuf type {@code grafeas.v1.ListNoteOccurrencesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNoteOccurrencesResponse) - io.grafeas.v1.ListNoteOccurrencesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNoteOccurrencesResponse.class, io.grafeas.v1.ListNoteOccurrencesResponse.Builder.class); - } - - // Construct using io.grafeas.v1.ListNoteOccurrencesResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - } else { - occurrences_ = null; - occurrencesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesResponse getDefaultInstanceForType() { - return io.grafeas.v1.ListNoteOccurrencesResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesResponse build() { - io.grafeas.v1.ListNoteOccurrencesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesResponse buildPartial() { - io.grafeas.v1.ListNoteOccurrencesResponse result = new io.grafeas.v1.ListNoteOccurrencesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.ListNoteOccurrencesResponse result) { - if (occurrencesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - occurrences_ = java.util.Collections.unmodifiableList(occurrences_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.occurrences_ = occurrences_; - } else { - result.occurrences_ = occurrencesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.ListNoteOccurrencesResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ListNoteOccurrencesResponse) { - return mergeFrom((io.grafeas.v1.ListNoteOccurrencesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ListNoteOccurrencesResponse other) { - if (other == io.grafeas.v1.ListNoteOccurrencesResponse.getDefaultInstance()) return this; - if (occurrencesBuilder_ == null) { - if (!other.occurrences_.isEmpty()) { - if (occurrences_.isEmpty()) { - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOccurrencesIsMutable(); - occurrences_.addAll(other.occurrences_); - } - onChanged(); - } - } else { - if (!other.occurrences_.isEmpty()) { - if (occurrencesBuilder_.isEmpty()) { - occurrencesBuilder_.dispose(); - occurrencesBuilder_ = null; - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000001); - occurrencesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getOccurrencesFieldBuilder() : null; - } else { - occurrencesBuilder_.addAllMessages(other.occurrences_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.grafeas.v1.Occurrence m = - input.readMessage( - io.grafeas.v1.Occurrence.parser(), - extensionRegistry); - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(m); - } else { - occurrencesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List occurrences_ = - java.util.Collections.emptyList(); - private void ensureOccurrencesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - occurrences_ = new java.util.ArrayList(occurrences_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; - - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List getOccurrencesList() { - if (occurrencesBuilder_ == null) { - return java.util.Collections.unmodifiableList(occurrences_); - } else { - return occurrencesBuilder_.getMessageList(); - } - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public int getOccurrencesCount() { - if (occurrencesBuilder_ == null) { - return occurrences_.size(); - } else { - return occurrencesBuilder_.getCount(); - } - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence getOccurrences(int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); - } else { - return occurrencesBuilder_.getMessage(index); - } - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.set(index, value); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.set(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences(io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(index, value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addAllOccurrences( - java.lang.Iterable values) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, occurrences_); - onChanged(); - } else { - occurrencesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder clearOccurrences() { - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - occurrencesBuilder_.clear(); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder removeOccurrences(int index) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.remove(index); - onChanged(); - } else { - occurrencesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().getBuilder(index); - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); } else { - return occurrencesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List - getOccurrencesOrBuilderList() { - if (occurrencesBuilder_ != null) { - return occurrencesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(occurrences_); - } - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { - return getOccurrencesFieldBuilder().addBuilder( - io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().addBuilder( - index, io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List - getOccurrencesBuilderList() { - return getOccurrencesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> - getOccurrencesFieldBuilder() { - if (occurrencesBuilder_ == null) { - occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( - occurrences_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - occurrences_ = null; - } - return occurrencesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNoteOccurrencesResponse) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ListNoteOccurrencesResponse) - private static final io.grafeas.v1.ListNoteOccurrencesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ListNoteOccurrencesResponse(); - } - - public static io.grafeas.v1.ListNoteOccurrencesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNoteOccurrencesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java deleted file mode 100644 index f3ad30711d2d..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java +++ /dev/null @@ -1,73 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface ListNoteOccurrencesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNoteOccurrencesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - java.util.List - getOccurrencesList(); - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - io.grafeas.v1.Occurrence getOccurrences(int index); - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - int getOccurrencesCount(); - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - java.util.List - getOccurrencesOrBuilderList(); - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index); - - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java deleted file mode 100644 index 5a5f75cc706b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java +++ /dev/null @@ -1,1001 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to list notes.
- * 
- * - * Protobuf type {@code grafeas.v1.ListNotesRequest} - */ -public final class ListNotesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ListNotesRequest) - ListNotesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListNotesRequest.newBuilder() to construct. - private ListNotesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListNotesRequest() { - parent_ = ""; - filter_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListNotesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNotesRequest.class, io.grafeas.v1.ListNotesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - *
-   * The name of the project to list notes for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The name of the project to list notes for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 3; - private int pageSize_ = 0; - /** - *
-   * Number of notes to return in the list. Must be positive. Max allowed page
-   * size is 1000. If not specified, page size defaults to 20.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); - } - if (pageSize_ != 0) { - output.writeInt32(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ListNotesRequest)) { - return super.equals(obj); - } - io.grafeas.v1.ListNotesRequest other = (io.grafeas.v1.ListNotesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ListNotesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNotesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNotesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNotesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNotesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNotesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNotesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNotesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNotesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNotesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNotesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNotesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ListNotesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to list notes.
-   * 
- * - * Protobuf type {@code grafeas.v1.ListNotesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNotesRequest) - io.grafeas.v1.ListNotesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNotesRequest.class, io.grafeas.v1.ListNotesRequest.Builder.class); - } - - // Construct using io.grafeas.v1.ListNotesRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - filter_ = ""; - pageSize_ = 0; - pageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ListNotesRequest getDefaultInstanceForType() { - return io.grafeas.v1.ListNotesRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ListNotesRequest build() { - io.grafeas.v1.ListNotesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ListNotesRequest buildPartial() { - io.grafeas.v1.ListNotesRequest result = new io.grafeas.v1.ListNotesRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.ListNotesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.pageToken_ = pageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ListNotesRequest) { - return mergeFrom((io.grafeas.v1.ListNotesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ListNotesRequest other) { - if (other == io.grafeas.v1.ListNotesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * The name of the project to list notes for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the project to list notes for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the project to list notes for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the project to list notes for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the project to list notes for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - filter_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Number of notes to return in the list. Must be positive. Max allowed page
-     * size is 1000. If not specified, page size defaults to 20.
-     * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Number of notes to return in the list. Must be positive. Max allowed page
-     * size is 1000. If not specified, page size defaults to 20.
-     * 
- * - * int32 page_size = 3; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Number of notes to return in the list. Must be positive. Max allowed page
-     * size is 1000. If not specified, page size defaults to 20.
-     * 
- * - * int32 page_size = 3; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000004); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - pageToken_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNotesRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ListNotesRequest) - private static final io.grafeas.v1.ListNotesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ListNotesRequest(); - } - - public static io.grafeas.v1.ListNotesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNotesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ListNotesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java deleted file mode 100644 index eaebab9dbf1b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface ListNotesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNotesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the project to list notes for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The name of the project to list notes for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); - - /** - *
-   * Number of notes to return in the list. Must be positive. Max allowed page
-   * size is 1000. If not specified, page size defaults to 20.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java deleted file mode 100644 index 47debbe86abd..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java +++ /dev/null @@ -1,1040 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Response for listing notes.
- * 
- * - * Protobuf type {@code grafeas.v1.ListNotesResponse} - */ -public final class ListNotesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ListNotesResponse) - ListNotesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListNotesResponse.newBuilder() to construct. - private ListNotesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListNotesResponse() { - notes_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListNotesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNotesResponse.class, io.grafeas.v1.ListNotesResponse.Builder.class); - } - - public static final int NOTES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List notes_; - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public java.util.List getNotesList() { - return notes_; - } - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public java.util.List - getNotesOrBuilderList() { - return notes_; - } - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public int getNotesCount() { - return notes_.size(); - } - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public io.grafeas.v1.Note getNotes(int index) { - return notes_.get(index); - } - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( - int index) { - return notes_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < notes_.size(); i++) { - output.writeMessage(1, notes_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < notes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, notes_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ListNotesResponse)) { - return super.equals(obj); - } - io.grafeas.v1.ListNotesResponse other = (io.grafeas.v1.ListNotesResponse) obj; - - if (!getNotesList() - .equals(other.getNotesList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getNotesCount() > 0) { - hash = (37 * hash) + NOTES_FIELD_NUMBER; - hash = (53 * hash) + getNotesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ListNotesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNotesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNotesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNotesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNotesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNotesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNotesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNotesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNotesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNotesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNotesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNotesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ListNotesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response for listing notes.
-   * 
- * - * Protobuf type {@code grafeas.v1.ListNotesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNotesResponse) - io.grafeas.v1.ListNotesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNotesResponse.class, io.grafeas.v1.ListNotesResponse.Builder.class); - } - - // Construct using io.grafeas.v1.ListNotesResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (notesBuilder_ == null) { - notes_ = java.util.Collections.emptyList(); - } else { - notes_ = null; - notesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ListNotesResponse getDefaultInstanceForType() { - return io.grafeas.v1.ListNotesResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ListNotesResponse build() { - io.grafeas.v1.ListNotesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ListNotesResponse buildPartial() { - io.grafeas.v1.ListNotesResponse result = new io.grafeas.v1.ListNotesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.ListNotesResponse result) { - if (notesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - notes_ = java.util.Collections.unmodifiableList(notes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.notes_ = notes_; - } else { - result.notes_ = notesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.ListNotesResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ListNotesResponse) { - return mergeFrom((io.grafeas.v1.ListNotesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ListNotesResponse other) { - if (other == io.grafeas.v1.ListNotesResponse.getDefaultInstance()) return this; - if (notesBuilder_ == null) { - if (!other.notes_.isEmpty()) { - if (notes_.isEmpty()) { - notes_ = other.notes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNotesIsMutable(); - notes_.addAll(other.notes_); - } - onChanged(); - } - } else { - if (!other.notes_.isEmpty()) { - if (notesBuilder_.isEmpty()) { - notesBuilder_.dispose(); - notesBuilder_ = null; - notes_ = other.notes_; - bitField0_ = (bitField0_ & ~0x00000001); - notesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNotesFieldBuilder() : null; - } else { - notesBuilder_.addAllMessages(other.notes_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.grafeas.v1.Note m = - input.readMessage( - io.grafeas.v1.Note.parser(), - extensionRegistry); - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.add(m); - } else { - notesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List notes_ = - java.util.Collections.emptyList(); - private void ensureNotesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - notes_ = new java.util.ArrayList(notes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> notesBuilder_; - - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public java.util.List getNotesList() { - if (notesBuilder_ == null) { - return java.util.Collections.unmodifiableList(notes_); - } else { - return notesBuilder_.getMessageList(); - } - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public int getNotesCount() { - if (notesBuilder_ == null) { - return notes_.size(); - } else { - return notesBuilder_.getCount(); - } - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note getNotes(int index) { - if (notesBuilder_ == null) { - return notes_.get(index); - } else { - return notesBuilder_.getMessage(index); - } - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder setNotes( - int index, io.grafeas.v1.Note value) { - if (notesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotesIsMutable(); - notes_.set(index, value); - onChanged(); - } else { - notesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder setNotes( - int index, io.grafeas.v1.Note.Builder builderForValue) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.set(index, builderForValue.build()); - onChanged(); - } else { - notesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes(io.grafeas.v1.Note value) { - if (notesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotesIsMutable(); - notes_.add(value); - onChanged(); - } else { - notesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes( - int index, io.grafeas.v1.Note value) { - if (notesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotesIsMutable(); - notes_.add(index, value); - onChanged(); - } else { - notesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes( - io.grafeas.v1.Note.Builder builderForValue) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.add(builderForValue.build()); - onChanged(); - } else { - notesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes( - int index, io.grafeas.v1.Note.Builder builderForValue) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.add(index, builderForValue.build()); - onChanged(); - } else { - notesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addAllNotes( - java.lang.Iterable values) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notes_); - onChanged(); - } else { - notesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder clearNotes() { - if (notesBuilder_ == null) { - notes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - notesBuilder_.clear(); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder removeNotes(int index) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.remove(index); - onChanged(); - } else { - notesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note.Builder getNotesBuilder( - int index) { - return getNotesFieldBuilder().getBuilder(index); - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( - int index) { - if (notesBuilder_ == null) { - return notes_.get(index); } else { - return notesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public java.util.List - getNotesOrBuilderList() { - if (notesBuilder_ != null) { - return notesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(notes_); - } - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note.Builder addNotesBuilder() { - return getNotesFieldBuilder().addBuilder( - io.grafeas.v1.Note.getDefaultInstance()); - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note.Builder addNotesBuilder( - int index) { - return getNotesFieldBuilder().addBuilder( - index, io.grafeas.v1.Note.getDefaultInstance()); - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public java.util.List - getNotesBuilderList() { - return getNotesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> - getNotesFieldBuilder() { - if (notesBuilder_ == null) { - notesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( - notes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - notes_ = null; - } - return notesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNotesResponse) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ListNotesResponse) - private static final io.grafeas.v1.ListNotesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ListNotesResponse(); - } - - public static io.grafeas.v1.ListNotesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNotesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ListNotesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java deleted file mode 100644 index 41ae132266e5..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface ListNotesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNotesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - java.util.List - getNotesList(); - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - io.grafeas.v1.Note getNotes(int index); - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - int getNotesCount(); - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - java.util.List - getNotesOrBuilderList(); - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( - int index); - - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java deleted file mode 100644 index ca66bb189c1e..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java +++ /dev/null @@ -1,1001 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to list occurrences.
- * 
- * - * Protobuf type {@code grafeas.v1.ListOccurrencesRequest} - */ -public final class ListOccurrencesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ListOccurrencesRequest) - ListOccurrencesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListOccurrencesRequest.newBuilder() to construct. - private ListOccurrencesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListOccurrencesRequest() { - parent_ = ""; - filter_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListOccurrencesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListOccurrencesRequest.class, io.grafeas.v1.ListOccurrencesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - *
-   * The name of the project to list occurrences for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The name of the project to list occurrences for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 3; - private int pageSize_ = 0; - /** - *
-   * Number of occurrences to return in the list. Must be positive. Max allowed
-   * page size is 1000. If not specified, page size defaults to 20.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); - } - if (pageSize_ != 0) { - output.writeInt32(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ListOccurrencesRequest)) { - return super.equals(obj); - } - io.grafeas.v1.ListOccurrencesRequest other = (io.grafeas.v1.ListOccurrencesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListOccurrencesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ListOccurrencesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to list occurrences.
-   * 
- * - * Protobuf type {@code grafeas.v1.ListOccurrencesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ListOccurrencesRequest) - io.grafeas.v1.ListOccurrencesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListOccurrencesRequest.class, io.grafeas.v1.ListOccurrencesRequest.Builder.class); - } - - // Construct using io.grafeas.v1.ListOccurrencesRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - filter_ = ""; - pageSize_ = 0; - pageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesRequest getDefaultInstanceForType() { - return io.grafeas.v1.ListOccurrencesRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesRequest build() { - io.grafeas.v1.ListOccurrencesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesRequest buildPartial() { - io.grafeas.v1.ListOccurrencesRequest result = new io.grafeas.v1.ListOccurrencesRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.ListOccurrencesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.pageToken_ = pageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ListOccurrencesRequest) { - return mergeFrom((io.grafeas.v1.ListOccurrencesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ListOccurrencesRequest other) { - if (other == io.grafeas.v1.ListOccurrencesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * The name of the project to list occurrences for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the project to list occurrences for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the project to list occurrences for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the project to list occurrences for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the project to list occurrences for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - filter_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Number of occurrences to return in the list. Must be positive. Max allowed
-     * page size is 1000. If not specified, page size defaults to 20.
-     * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Number of occurrences to return in the list. Must be positive. Max allowed
-     * page size is 1000. If not specified, page size defaults to 20.
-     * 
- * - * int32 page_size = 3; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Number of occurrences to return in the list. Must be positive. Max allowed
-     * page size is 1000. If not specified, page size defaults to 20.
-     * 
- * - * int32 page_size = 3; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000004); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - pageToken_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ListOccurrencesRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ListOccurrencesRequest) - private static final io.grafeas.v1.ListOccurrencesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ListOccurrencesRequest(); - } - - public static io.grafeas.v1.ListOccurrencesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListOccurrencesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java deleted file mode 100644 index 057e3b26a4d7..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface ListOccurrencesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ListOccurrencesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the project to list occurrences for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The name of the project to list occurrences for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); - - /** - *
-   * Number of occurrences to return in the list. Must be positive. Max allowed
-   * page size is 1000. If not specified, page size defaults to 20.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java deleted file mode 100644 index 2a69a922f24e..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java +++ /dev/null @@ -1,1040 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Response for listing occurrences.
- * 
- * - * Protobuf type {@code grafeas.v1.ListOccurrencesResponse} - */ -public final class ListOccurrencesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ListOccurrencesResponse) - ListOccurrencesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListOccurrencesResponse.newBuilder() to construct. - private ListOccurrencesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListOccurrencesResponse() { - occurrences_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListOccurrencesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListOccurrencesResponse.class, io.grafeas.v1.ListOccurrencesResponse.Builder.class); - } - - public static final int OCCURRENCES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List occurrences_; - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public java.util.List getOccurrencesList() { - return occurrences_; - } - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public java.util.List - getOccurrencesOrBuilderList() { - return occurrences_; - } - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public int getOccurrencesCount() { - return occurrences_.size(); - } - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public io.grafeas.v1.Occurrence getOccurrences(int index) { - return occurrences_.get(index); - } - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - return occurrences_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < occurrences_.size(); i++) { - output.writeMessage(1, occurrences_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < occurrences_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, occurrences_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ListOccurrencesResponse)) { - return super.equals(obj); - } - io.grafeas.v1.ListOccurrencesResponse other = (io.grafeas.v1.ListOccurrencesResponse) obj; - - if (!getOccurrencesList() - .equals(other.getOccurrencesList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getOccurrencesCount() > 0) { - hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; - hash = (53 * hash) + getOccurrencesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListOccurrencesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ListOccurrencesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response for listing occurrences.
-   * 
- * - * Protobuf type {@code grafeas.v1.ListOccurrencesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ListOccurrencesResponse) - io.grafeas.v1.ListOccurrencesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListOccurrencesResponse.class, io.grafeas.v1.ListOccurrencesResponse.Builder.class); - } - - // Construct using io.grafeas.v1.ListOccurrencesResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - } else { - occurrences_ = null; - occurrencesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesResponse getDefaultInstanceForType() { - return io.grafeas.v1.ListOccurrencesResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesResponse build() { - io.grafeas.v1.ListOccurrencesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesResponse buildPartial() { - io.grafeas.v1.ListOccurrencesResponse result = new io.grafeas.v1.ListOccurrencesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.ListOccurrencesResponse result) { - if (occurrencesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - occurrences_ = java.util.Collections.unmodifiableList(occurrences_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.occurrences_ = occurrences_; - } else { - result.occurrences_ = occurrencesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.ListOccurrencesResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ListOccurrencesResponse) { - return mergeFrom((io.grafeas.v1.ListOccurrencesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ListOccurrencesResponse other) { - if (other == io.grafeas.v1.ListOccurrencesResponse.getDefaultInstance()) return this; - if (occurrencesBuilder_ == null) { - if (!other.occurrences_.isEmpty()) { - if (occurrences_.isEmpty()) { - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOccurrencesIsMutable(); - occurrences_.addAll(other.occurrences_); - } - onChanged(); - } - } else { - if (!other.occurrences_.isEmpty()) { - if (occurrencesBuilder_.isEmpty()) { - occurrencesBuilder_.dispose(); - occurrencesBuilder_ = null; - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000001); - occurrencesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getOccurrencesFieldBuilder() : null; - } else { - occurrencesBuilder_.addAllMessages(other.occurrences_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.grafeas.v1.Occurrence m = - input.readMessage( - io.grafeas.v1.Occurrence.parser(), - extensionRegistry); - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(m); - } else { - occurrencesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List occurrences_ = - java.util.Collections.emptyList(); - private void ensureOccurrencesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - occurrences_ = new java.util.ArrayList(occurrences_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; - - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List getOccurrencesList() { - if (occurrencesBuilder_ == null) { - return java.util.Collections.unmodifiableList(occurrences_); - } else { - return occurrencesBuilder_.getMessageList(); - } - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public int getOccurrencesCount() { - if (occurrencesBuilder_ == null) { - return occurrences_.size(); - } else { - return occurrencesBuilder_.getCount(); - } - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence getOccurrences(int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); - } else { - return occurrencesBuilder_.getMessage(index); - } - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.set(index, value); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.set(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences(io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(index, value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addAllOccurrences( - java.lang.Iterable values) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, occurrences_); - onChanged(); - } else { - occurrencesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder clearOccurrences() { - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - occurrencesBuilder_.clear(); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder removeOccurrences(int index) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.remove(index); - onChanged(); - } else { - occurrencesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().getBuilder(index); - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); } else { - return occurrencesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List - getOccurrencesOrBuilderList() { - if (occurrencesBuilder_ != null) { - return occurrencesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(occurrences_); - } - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { - return getOccurrencesFieldBuilder().addBuilder( - io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().addBuilder( - index, io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List - getOccurrencesBuilderList() { - return getOccurrencesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> - getOccurrencesFieldBuilder() { - if (occurrencesBuilder_ == null) { - occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( - occurrences_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - occurrences_ = null; - } - return occurrencesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ListOccurrencesResponse) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ListOccurrencesResponse) - private static final io.grafeas.v1.ListOccurrencesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ListOccurrencesResponse(); - } - - public static io.grafeas.v1.ListOccurrencesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListOccurrencesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java deleted file mode 100644 index e5e64e4513ca..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface ListOccurrencesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ListOccurrencesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - java.util.List - getOccurrencesList(); - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - io.grafeas.v1.Occurrence getOccurrences(int index); - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - int getOccurrencesCount(); - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - java.util.List - getOccurrencesOrBuilderList(); - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index); - - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java deleted file mode 100644 index 13e84c81b5b1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java +++ /dev/null @@ -1,994 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -/** - *
- * An occurrence of a particular package installation found within a system's
- * filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.
- * 
- * - * Protobuf type {@code grafeas.v1.Location} - */ -public final class Location extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Location) - LocationOrBuilder { -private static final long serialVersionUID = 0L; - // Use Location.newBuilder() to construct. - private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Location() { - cpeUri_ = ""; - path_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Location(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Location.class, io.grafeas.v1.Location.Builder.class); - } - - public static final int CPE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object cpeUri_ = ""; - /** - *
-   * Deprecated.
-   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-   * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - @java.lang.Override - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } - } - /** - *
-   * Deprecated.
-   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-   * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 2; - private io.grafeas.v1.Version version_; - /** - *
-   * Deprecated.
-   * The version installed at this location.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return Whether the version field is set. - */ - @java.lang.Override - public boolean hasVersion() { - return version_ != null; - } - /** - *
-   * Deprecated.
-   * The version installed at this location.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return The version. - */ - @java.lang.Override - public io.grafeas.v1.Version getVersion() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - /** - *
-   * Deprecated.
-   * The version installed at this location.
-   * 
- * - * .grafeas.v1.Version version = 2; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - - public static final int PATH_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object path_ = ""; - /** - *
-   * The path from which we gathered that this package/version is installed.
-   * 
- * - * string path = 3; - * @return The path. - */ - @java.lang.Override - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } - } - /** - *
-   * The path from which we gathered that this package/version is installed.
-   * 
- * - * string path = 3; - * @return The bytes for path. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); - } - if (version_ != null) { - output.writeMessage(2, getVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, path_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); - } - if (version_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, path_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Location)) { - return super.equals(obj); - } - io.grafeas.v1.Location other = (io.grafeas.v1.Location) obj; - - if (!getCpeUri() - .equals(other.getCpeUri())) return false; - if (hasVersion() != other.hasVersion()) return false; - if (hasVersion()) { - if (!getVersion() - .equals(other.getVersion())) return false; - } - if (!getPath() - .equals(other.getPath())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCpeUri().hashCode(); - if (hasVersion()) { - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - } - hash = (37 * hash) + PATH_FIELD_NUMBER; - hash = (53 * hash) + getPath().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Location parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Location parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Location parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Location parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Location parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Location parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Location parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Location parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Location parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Location parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Location parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Location parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Location prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An occurrence of a particular package installation found within a system's
-   * filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.
-   * 
- * - * Protobuf type {@code grafeas.v1.Location} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Location) - io.grafeas.v1.LocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Location.class, io.grafeas.v1.Location.Builder.class); - } - - // Construct using io.grafeas.v1.Location.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - cpeUri_ = ""; - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - path_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Location getDefaultInstanceForType() { - return io.grafeas.v1.Location.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Location build() { - io.grafeas.v1.Location result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Location buildPartial() { - io.grafeas.v1.Location result = new io.grafeas.v1.Location(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Location result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.cpeUri_ = cpeUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.version_ = versionBuilder_ == null - ? version_ - : versionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.path_ = path_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Location) { - return mergeFrom((io.grafeas.v1.Location)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Location other) { - if (other == io.grafeas.v1.Location.getDefaultInstance()) return this; - if (!other.getCpeUri().isEmpty()) { - cpeUri_ = other.cpeUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasVersion()) { - mergeVersion(other.getVersion()); - } - if (!other.getPath().isEmpty()) { - path_ = other.path_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - cpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - path_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object cpeUri_ = ""; - /** - *
-     * Deprecated.
-     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-     * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated.
-     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-     * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated.
-     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-     * 
- * - * string cpe_uri = 1; - * @param value The cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Deprecated.
-     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-     * 
- * - * string cpe_uri = 1; - * @return This builder for chaining. - */ - public Builder clearCpeUri() { - cpeUri_ = getDefaultInstance().getCpeUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Deprecated.
-     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-     * 
- * - * string cpe_uri = 1; - * @param value The bytes for cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.grafeas.v1.Version version_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - * @return Whether the version field is set. - */ - public boolean hasVersion() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - * @return The version. - */ - public io.grafeas.v1.Version getVersion() { - if (versionBuilder_ == null) { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } else { - return versionBuilder_.getMessage(); - } - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder setVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - } else { - versionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder setVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (versionBuilder_ == null) { - version_ = builderForValue.build(); - } else { - versionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder mergeVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - version_ != null && - version_ != io.grafeas.v1.Version.getDefaultInstance()) { - getVersionBuilder().mergeFrom(value); - } else { - version_ = value; - } - } else { - versionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder clearVersion() { - bitField0_ = (bitField0_ & ~0x00000002); - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public io.grafeas.v1.Version.Builder getVersionBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getVersionFieldBuilder().getBuilder(); - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - if (versionBuilder_ != null) { - return versionBuilder_.getMessageOrBuilder(); - } else { - return version_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : version_; - } - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getVersionFieldBuilder() { - if (versionBuilder_ == null) { - versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getVersion(), - getParentForChildren(), - isClean()); - version_ = null; - } - return versionBuilder_; - } - - private java.lang.Object path_ = ""; - /** - *
-     * The path from which we gathered that this package/version is installed.
-     * 
- * - * string path = 3; - * @return The path. - */ - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The path from which we gathered that this package/version is installed.
-     * 
- * - * string path = 3; - * @return The bytes for path. - */ - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The path from which we gathered that this package/version is installed.
-     * 
- * - * string path = 3; - * @param value The path to set. - * @return This builder for chaining. - */ - public Builder setPath( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - path_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The path from which we gathered that this package/version is installed.
-     * 
- * - * string path = 3; - * @return This builder for chaining. - */ - public Builder clearPath() { - path_ = getDefaultInstance().getPath(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The path from which we gathered that this package/version is installed.
-     * 
- * - * string path = 3; - * @param value The bytes for path to set. - * @return This builder for chaining. - */ - public Builder setPathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - path_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Location) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Location) - private static final io.grafeas.v1.Location DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Location(); - } - - public static io.grafeas.v1.Location getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Location parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Location getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java deleted file mode 100644 index 9b0f8af80d16..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java +++ /dev/null @@ -1,81 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -public interface LocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Location) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Deprecated.
-   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-   * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - java.lang.String getCpeUri(); - /** - *
-   * Deprecated.
-   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-   * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - com.google.protobuf.ByteString - getCpeUriBytes(); - - /** - *
-   * Deprecated.
-   * The version installed at this location.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return Whether the version field is set. - */ - boolean hasVersion(); - /** - *
-   * Deprecated.
-   * The version installed at this location.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return The version. - */ - io.grafeas.v1.Version getVersion(); - /** - *
-   * Deprecated.
-   * The version installed at this location.
-   * 
- * - * .grafeas.v1.Version version = 2; - */ - io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); - - /** - *
-   * The path from which we gathered that this package/version is installed.
-   * 
- * - * string path = 3; - * @return The path. - */ - java.lang.String getPath(); - /** - *
-   * The path from which we gathered that this package/version is installed.
-   * 
- * - * string path = 3; - * @return The bytes for path. - */ - com.google.protobuf.ByteString - getPathBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java deleted file mode 100644 index 3aee42f64ca5..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java +++ /dev/null @@ -1,1380 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -/** - *
- * Other properties of the build.
- * 
- * - * Protobuf type {@code grafeas.v1.Metadata} - */ -public final class Metadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Metadata) - MetadataOrBuilder { -private static final long serialVersionUID = 0L; - // Use Metadata.newBuilder() to construct. - private Metadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Metadata() { - buildInvocationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Metadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Metadata.class, io.grafeas.v1.Metadata.Builder.class); - } - - public static final int BUILD_INVOCATION_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object buildInvocationId_ = ""; - /** - *
-   * Identifies the particular build invocation, which can be useful for finding
-   * associated logs or other ad-hoc analysis. The value SHOULD be globally
-   * unique, per in-toto Provenance spec.
-   * 
- * - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - @java.lang.Override - public java.lang.String getBuildInvocationId() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildInvocationId_ = s; - return s; - } - } - /** - *
-   * Identifies the particular build invocation, which can be useful for finding
-   * associated logs or other ad-hoc analysis. The value SHOULD be globally
-   * unique, per in-toto Provenance spec.
-   * 
- * - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBuildInvocationIdBytes() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildInvocationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BUILD_STARTED_ON_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp buildStartedOn_; - /** - *
-   * The timestamp of when the build started.
-   * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - @java.lang.Override - public boolean hasBuildStartedOn() { - return buildStartedOn_ != null; - } - /** - *
-   * The timestamp of when the build started.
-   * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getBuildStartedOn() { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - /** - *
-   * The timestamp of when the build started.
-   * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - - public static final int BUILD_FINISHED_ON_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp buildFinishedOn_; - /** - *
-   * The timestamp of when the build completed.
-   * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - @java.lang.Override - public boolean hasBuildFinishedOn() { - return buildFinishedOn_ != null; - } - /** - *
-   * The timestamp of when the build completed.
-   * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getBuildFinishedOn() { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - /** - *
-   * The timestamp of when the build completed.
-   * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - - public static final int COMPLETENESS_FIELD_NUMBER = 4; - private io.grafeas.v1.Completeness completeness_; - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * .grafeas.v1.Completeness completeness = 4; - * @return Whether the completeness field is set. - */ - @java.lang.Override - public boolean hasCompleteness() { - return completeness_ != null; - } - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * .grafeas.v1.Completeness completeness = 4; - * @return The completeness. - */ - @java.lang.Override - public io.grafeas.v1.Completeness getCompleteness() { - return completeness_ == null ? io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; - } - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - @java.lang.Override - public io.grafeas.v1.CompletenessOrBuilder getCompletenessOrBuilder() { - return completeness_ == null ? io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; - } - - public static final int REPRODUCIBLE_FIELD_NUMBER = 5; - private boolean reproducible_ = false; - /** - *
-   * If true, the builder claims that running the recipe on materials will
-   * produce bit-for-bit identical output.
-   * 
- * - * bool reproducible = 5; - * @return The reproducible. - */ - @java.lang.Override - public boolean getReproducible() { - return reproducible_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, buildInvocationId_); - } - if (buildStartedOn_ != null) { - output.writeMessage(2, getBuildStartedOn()); - } - if (buildFinishedOn_ != null) { - output.writeMessage(3, getBuildFinishedOn()); - } - if (completeness_ != null) { - output.writeMessage(4, getCompleteness()); - } - if (reproducible_ != false) { - output.writeBool(5, reproducible_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, buildInvocationId_); - } - if (buildStartedOn_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBuildStartedOn()); - } - if (buildFinishedOn_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getBuildFinishedOn()); - } - if (completeness_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCompleteness()); - } - if (reproducible_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, reproducible_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Metadata)) { - return super.equals(obj); - } - io.grafeas.v1.Metadata other = (io.grafeas.v1.Metadata) obj; - - if (!getBuildInvocationId() - .equals(other.getBuildInvocationId())) return false; - if (hasBuildStartedOn() != other.hasBuildStartedOn()) return false; - if (hasBuildStartedOn()) { - if (!getBuildStartedOn() - .equals(other.getBuildStartedOn())) return false; - } - if (hasBuildFinishedOn() != other.hasBuildFinishedOn()) return false; - if (hasBuildFinishedOn()) { - if (!getBuildFinishedOn() - .equals(other.getBuildFinishedOn())) return false; - } - if (hasCompleteness() != other.hasCompleteness()) return false; - if (hasCompleteness()) { - if (!getCompleteness() - .equals(other.getCompleteness())) return false; - } - if (getReproducible() - != other.getReproducible()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BUILD_INVOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getBuildInvocationId().hashCode(); - if (hasBuildStartedOn()) { - hash = (37 * hash) + BUILD_STARTED_ON_FIELD_NUMBER; - hash = (53 * hash) + getBuildStartedOn().hashCode(); - } - if (hasBuildFinishedOn()) { - hash = (37 * hash) + BUILD_FINISHED_ON_FIELD_NUMBER; - hash = (53 * hash) + getBuildFinishedOn().hashCode(); - } - if (hasCompleteness()) { - hash = (37 * hash) + COMPLETENESS_FIELD_NUMBER; - hash = (53 * hash) + getCompleteness().hashCode(); - } - hash = (37 * hash) + REPRODUCIBLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getReproducible()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Metadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Metadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Metadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Metadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Metadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Metadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Metadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Metadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Metadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Metadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Metadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Metadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Metadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Other properties of the build.
-   * 
- * - * Protobuf type {@code grafeas.v1.Metadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Metadata) - io.grafeas.v1.MetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Metadata.class, io.grafeas.v1.Metadata.Builder.class); - } - - // Construct using io.grafeas.v1.Metadata.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - buildInvocationId_ = ""; - buildStartedOn_ = null; - if (buildStartedOnBuilder_ != null) { - buildStartedOnBuilder_.dispose(); - buildStartedOnBuilder_ = null; - } - buildFinishedOn_ = null; - if (buildFinishedOnBuilder_ != null) { - buildFinishedOnBuilder_.dispose(); - buildFinishedOnBuilder_ = null; - } - completeness_ = null; - if (completenessBuilder_ != null) { - completenessBuilder_.dispose(); - completenessBuilder_ = null; - } - reproducible_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Metadata getDefaultInstanceForType() { - return io.grafeas.v1.Metadata.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Metadata build() { - io.grafeas.v1.Metadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Metadata buildPartial() { - io.grafeas.v1.Metadata result = new io.grafeas.v1.Metadata(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Metadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.buildInvocationId_ = buildInvocationId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.buildStartedOn_ = buildStartedOnBuilder_ == null - ? buildStartedOn_ - : buildStartedOnBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.buildFinishedOn_ = buildFinishedOnBuilder_ == null - ? buildFinishedOn_ - : buildFinishedOnBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.completeness_ = completenessBuilder_ == null - ? completeness_ - : completenessBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.reproducible_ = reproducible_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Metadata) { - return mergeFrom((io.grafeas.v1.Metadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Metadata other) { - if (other == io.grafeas.v1.Metadata.getDefaultInstance()) return this; - if (!other.getBuildInvocationId().isEmpty()) { - buildInvocationId_ = other.buildInvocationId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasBuildStartedOn()) { - mergeBuildStartedOn(other.getBuildStartedOn()); - } - if (other.hasBuildFinishedOn()) { - mergeBuildFinishedOn(other.getBuildFinishedOn()); - } - if (other.hasCompleteness()) { - mergeCompleteness(other.getCompleteness()); - } - if (other.getReproducible() != false) { - setReproducible(other.getReproducible()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - buildInvocationId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getBuildStartedOnFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getBuildFinishedOnFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getCompletenessFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: { - reproducible_ = input.readBool(); - bitField0_ |= 0x00000010; - break; - } // case 40 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object buildInvocationId_ = ""; - /** - *
-     * Identifies the particular build invocation, which can be useful for finding
-     * associated logs or other ad-hoc analysis. The value SHOULD be globally
-     * unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - public java.lang.String getBuildInvocationId() { - java.lang.Object ref = buildInvocationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildInvocationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Identifies the particular build invocation, which can be useful for finding
-     * associated logs or other ad-hoc analysis. The value SHOULD be globally
-     * unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - public com.google.protobuf.ByteString - getBuildInvocationIdBytes() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildInvocationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Identifies the particular build invocation, which can be useful for finding
-     * associated logs or other ad-hoc analysis. The value SHOULD be globally
-     * unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @param value The buildInvocationId to set. - * @return This builder for chaining. - */ - public Builder setBuildInvocationId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - buildInvocationId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Identifies the particular build invocation, which can be useful for finding
-     * associated logs or other ad-hoc analysis. The value SHOULD be globally
-     * unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @return This builder for chaining. - */ - public Builder clearBuildInvocationId() { - buildInvocationId_ = getDefaultInstance().getBuildInvocationId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Identifies the particular build invocation, which can be useful for finding
-     * associated logs or other ad-hoc analysis. The value SHOULD be globally
-     * unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @param value The bytes for buildInvocationId to set. - * @return This builder for chaining. - */ - public Builder setBuildInvocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - buildInvocationId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp buildStartedOn_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildStartedOnBuilder_; - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - public boolean hasBuildStartedOn() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - public com.google.protobuf.Timestamp getBuildStartedOn() { - if (buildStartedOnBuilder_ == null) { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } else { - return buildStartedOnBuilder_.getMessage(); - } - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder setBuildStartedOn(com.google.protobuf.Timestamp value) { - if (buildStartedOnBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - buildStartedOn_ = value; - } else { - buildStartedOnBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder setBuildStartedOn( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (buildStartedOnBuilder_ == null) { - buildStartedOn_ = builderForValue.build(); - } else { - buildStartedOnBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder mergeBuildStartedOn(com.google.protobuf.Timestamp value) { - if (buildStartedOnBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - buildStartedOn_ != null && - buildStartedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getBuildStartedOnBuilder().mergeFrom(value); - } else { - buildStartedOn_ = value; - } - } else { - buildStartedOnBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder clearBuildStartedOn() { - bitField0_ = (bitField0_ & ~0x00000002); - buildStartedOn_ = null; - if (buildStartedOnBuilder_ != null) { - buildStartedOnBuilder_.dispose(); - buildStartedOnBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public com.google.protobuf.Timestamp.Builder getBuildStartedOnBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getBuildStartedOnFieldBuilder().getBuilder(); - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { - if (buildStartedOnBuilder_ != null) { - return buildStartedOnBuilder_.getMessageOrBuilder(); - } else { - return buildStartedOn_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getBuildStartedOnFieldBuilder() { - if (buildStartedOnBuilder_ == null) { - buildStartedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getBuildStartedOn(), - getParentForChildren(), - isClean()); - buildStartedOn_ = null; - } - return buildStartedOnBuilder_; - } - - private com.google.protobuf.Timestamp buildFinishedOn_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildFinishedOnBuilder_; - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - public boolean hasBuildFinishedOn() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - public com.google.protobuf.Timestamp getBuildFinishedOn() { - if (buildFinishedOnBuilder_ == null) { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } else { - return buildFinishedOnBuilder_.getMessage(); - } - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder setBuildFinishedOn(com.google.protobuf.Timestamp value) { - if (buildFinishedOnBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - buildFinishedOn_ = value; - } else { - buildFinishedOnBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder setBuildFinishedOn( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (buildFinishedOnBuilder_ == null) { - buildFinishedOn_ = builderForValue.build(); - } else { - buildFinishedOnBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder mergeBuildFinishedOn(com.google.protobuf.Timestamp value) { - if (buildFinishedOnBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - buildFinishedOn_ != null && - buildFinishedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getBuildFinishedOnBuilder().mergeFrom(value); - } else { - buildFinishedOn_ = value; - } - } else { - buildFinishedOnBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder clearBuildFinishedOn() { - bitField0_ = (bitField0_ & ~0x00000004); - buildFinishedOn_ = null; - if (buildFinishedOnBuilder_ != null) { - buildFinishedOnBuilder_.dispose(); - buildFinishedOnBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public com.google.protobuf.Timestamp.Builder getBuildFinishedOnBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getBuildFinishedOnFieldBuilder().getBuilder(); - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { - if (buildFinishedOnBuilder_ != null) { - return buildFinishedOnBuilder_.getMessageOrBuilder(); - } else { - return buildFinishedOn_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getBuildFinishedOnFieldBuilder() { - if (buildFinishedOnBuilder_ == null) { - buildFinishedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getBuildFinishedOn(), - getParentForChildren(), - isClean()); - buildFinishedOn_ = null; - } - return buildFinishedOnBuilder_; - } - - private io.grafeas.v1.Completeness completeness_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Completeness, io.grafeas.v1.Completeness.Builder, io.grafeas.v1.CompletenessOrBuilder> completenessBuilder_; - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - * @return Whether the completeness field is set. - */ - public boolean hasCompleteness() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - * @return The completeness. - */ - public io.grafeas.v1.Completeness getCompleteness() { - if (completenessBuilder_ == null) { - return completeness_ == null ? io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; - } else { - return completenessBuilder_.getMessage(); - } - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - public Builder setCompleteness(io.grafeas.v1.Completeness value) { - if (completenessBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - completeness_ = value; - } else { - completenessBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - public Builder setCompleteness( - io.grafeas.v1.Completeness.Builder builderForValue) { - if (completenessBuilder_ == null) { - completeness_ = builderForValue.build(); - } else { - completenessBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - public Builder mergeCompleteness(io.grafeas.v1.Completeness value) { - if (completenessBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - completeness_ != null && - completeness_ != io.grafeas.v1.Completeness.getDefaultInstance()) { - getCompletenessBuilder().mergeFrom(value); - } else { - completeness_ = value; - } - } else { - completenessBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - public Builder clearCompleteness() { - bitField0_ = (bitField0_ & ~0x00000008); - completeness_ = null; - if (completenessBuilder_ != null) { - completenessBuilder_.dispose(); - completenessBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - public io.grafeas.v1.Completeness.Builder getCompletenessBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCompletenessFieldBuilder().getBuilder(); - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - public io.grafeas.v1.CompletenessOrBuilder getCompletenessOrBuilder() { - if (completenessBuilder_ != null) { - return completenessBuilder_.getMessageOrBuilder(); - } else { - return completeness_ == null ? - io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; - } - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Completeness, io.grafeas.v1.Completeness.Builder, io.grafeas.v1.CompletenessOrBuilder> - getCompletenessFieldBuilder() { - if (completenessBuilder_ == null) { - completenessBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Completeness, io.grafeas.v1.Completeness.Builder, io.grafeas.v1.CompletenessOrBuilder>( - getCompleteness(), - getParentForChildren(), - isClean()); - completeness_ = null; - } - return completenessBuilder_; - } - - private boolean reproducible_ ; - /** - *
-     * If true, the builder claims that running the recipe on materials will
-     * produce bit-for-bit identical output.
-     * 
- * - * bool reproducible = 5; - * @return The reproducible. - */ - @java.lang.Override - public boolean getReproducible() { - return reproducible_; - } - /** - *
-     * If true, the builder claims that running the recipe on materials will
-     * produce bit-for-bit identical output.
-     * 
- * - * bool reproducible = 5; - * @param value The reproducible to set. - * @return This builder for chaining. - */ - public Builder setReproducible(boolean value) { - - reproducible_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * If true, the builder claims that running the recipe on materials will
-     * produce bit-for-bit identical output.
-     * 
- * - * bool reproducible = 5; - * @return This builder for chaining. - */ - public Builder clearReproducible() { - bitField0_ = (bitField0_ & ~0x00000010); - reproducible_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Metadata) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Metadata) - private static final io.grafeas.v1.Metadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Metadata(); - } - - public static io.grafeas.v1.Metadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Metadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Metadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java deleted file mode 100644 index 9999c1a7ef58..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java +++ /dev/null @@ -1,128 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -public interface MetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Metadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Identifies the particular build invocation, which can be useful for finding
-   * associated logs or other ad-hoc analysis. The value SHOULD be globally
-   * unique, per in-toto Provenance spec.
-   * 
- * - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - java.lang.String getBuildInvocationId(); - /** - *
-   * Identifies the particular build invocation, which can be useful for finding
-   * associated logs or other ad-hoc analysis. The value SHOULD be globally
-   * unique, per in-toto Provenance spec.
-   * 
- * - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - com.google.protobuf.ByteString - getBuildInvocationIdBytes(); - - /** - *
-   * The timestamp of when the build started.
-   * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - boolean hasBuildStartedOn(); - /** - *
-   * The timestamp of when the build started.
-   * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - com.google.protobuf.Timestamp getBuildStartedOn(); - /** - *
-   * The timestamp of when the build started.
-   * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder(); - - /** - *
-   * The timestamp of when the build completed.
-   * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - boolean hasBuildFinishedOn(); - /** - *
-   * The timestamp of when the build completed.
-   * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - com.google.protobuf.Timestamp getBuildFinishedOn(); - /** - *
-   * The timestamp of when the build completed.
-   * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder(); - - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * .grafeas.v1.Completeness completeness = 4; - * @return Whether the completeness field is set. - */ - boolean hasCompleteness(); - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * .grafeas.v1.Completeness completeness = 4; - * @return The completeness. - */ - io.grafeas.v1.Completeness getCompleteness(); - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - io.grafeas.v1.CompletenessOrBuilder getCompletenessOrBuilder(); - - /** - *
-   * If true, the builder claims that running the recipe on materials will
-   * produce bit-for-bit identical output.
-   * 
- * - * bool reproducible = 5; - * @return The reproducible. - */ - boolean getReproducible(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java deleted file mode 100644 index ec17bbcd5c76..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java +++ /dev/null @@ -1,908 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -/** - *
- * Details about files that caused a compliance check to fail.
- * 
- * - * Protobuf type {@code grafeas.v1.NonCompliantFile} - */ -public final class NonCompliantFile extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.NonCompliantFile) - NonCompliantFileOrBuilder { -private static final long serialVersionUID = 0L; - // Use NonCompliantFile.newBuilder() to construct. - private NonCompliantFile(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NonCompliantFile() { - path_ = ""; - displayCommand_ = ""; - reason_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NonCompliantFile(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.NonCompliantFile.class, io.grafeas.v1.NonCompliantFile.Builder.class); - } - - public static final int PATH_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object path_ = ""; - /** - *
-   * Empty if `display_command` is set.
-   * 
- * - * string path = 1; - * @return The path. - */ - @java.lang.Override - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } - } - /** - *
-   * Empty if `display_command` is set.
-   * 
- * - * string path = 1; - * @return The bytes for path. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_COMMAND_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object displayCommand_ = ""; - /** - *
-   * Command to display the non-compliant files.
-   * 
- * - * string display_command = 2; - * @return The displayCommand. - */ - @java.lang.Override - public java.lang.String getDisplayCommand() { - java.lang.Object ref = displayCommand_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayCommand_ = s; - return s; - } - } - /** - *
-   * Command to display the non-compliant files.
-   * 
- * - * string display_command = 2; - * @return The bytes for displayCommand. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayCommandBytes() { - java.lang.Object ref = displayCommand_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayCommand_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REASON_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object reason_ = ""; - /** - *
-   * Explains why a file is non compliant for a CIS check.
-   * 
- * - * string reason = 3; - * @return The reason. - */ - @java.lang.Override - public java.lang.String getReason() { - java.lang.Object ref = reason_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - reason_ = s; - return s; - } - } - /** - *
-   * Explains why a file is non compliant for a CIS check.
-   * 
- * - * string reason = 3; - * @return The bytes for reason. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getReasonBytes() { - java.lang.Object ref = reason_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - reason_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayCommand_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayCommand_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, reason_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayCommand_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayCommand_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, reason_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.NonCompliantFile)) { - return super.equals(obj); - } - io.grafeas.v1.NonCompliantFile other = (io.grafeas.v1.NonCompliantFile) obj; - - if (!getPath() - .equals(other.getPath())) return false; - if (!getDisplayCommand() - .equals(other.getDisplayCommand())) return false; - if (!getReason() - .equals(other.getReason())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PATH_FIELD_NUMBER; - hash = (53 * hash) + getPath().hashCode(); - hash = (37 * hash) + DISPLAY_COMMAND_FIELD_NUMBER; - hash = (53 * hash) + getDisplayCommand().hashCode(); - hash = (37 * hash) + REASON_FIELD_NUMBER; - hash = (53 * hash) + getReason().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.NonCompliantFile parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.NonCompliantFile parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.NonCompliantFile parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.NonCompliantFile parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.NonCompliantFile parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.NonCompliantFile parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.NonCompliantFile parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.NonCompliantFile parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.NonCompliantFile parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.NonCompliantFile parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.NonCompliantFile parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.NonCompliantFile parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.NonCompliantFile prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Details about files that caused a compliance check to fail.
-   * 
- * - * Protobuf type {@code grafeas.v1.NonCompliantFile} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.NonCompliantFile) - io.grafeas.v1.NonCompliantFileOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.NonCompliantFile.class, io.grafeas.v1.NonCompliantFile.Builder.class); - } - - // Construct using io.grafeas.v1.NonCompliantFile.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - path_ = ""; - displayCommand_ = ""; - reason_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.NonCompliantFile getDefaultInstanceForType() { - return io.grafeas.v1.NonCompliantFile.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.NonCompliantFile build() { - io.grafeas.v1.NonCompliantFile result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.NonCompliantFile buildPartial() { - io.grafeas.v1.NonCompliantFile result = new io.grafeas.v1.NonCompliantFile(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.NonCompliantFile result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.path_ = path_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.displayCommand_ = displayCommand_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.reason_ = reason_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.NonCompliantFile) { - return mergeFrom((io.grafeas.v1.NonCompliantFile)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.NonCompliantFile other) { - if (other == io.grafeas.v1.NonCompliantFile.getDefaultInstance()) return this; - if (!other.getPath().isEmpty()) { - path_ = other.path_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getDisplayCommand().isEmpty()) { - displayCommand_ = other.displayCommand_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getReason().isEmpty()) { - reason_ = other.reason_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - path_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - displayCommand_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - reason_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object path_ = ""; - /** - *
-     * Empty if `display_command` is set.
-     * 
- * - * string path = 1; - * @return The path. - */ - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Empty if `display_command` is set.
-     * 
- * - * string path = 1; - * @return The bytes for path. - */ - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Empty if `display_command` is set.
-     * 
- * - * string path = 1; - * @param value The path to set. - * @return This builder for chaining. - */ - public Builder setPath( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - path_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Empty if `display_command` is set.
-     * 
- * - * string path = 1; - * @return This builder for chaining. - */ - public Builder clearPath() { - path_ = getDefaultInstance().getPath(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Empty if `display_command` is set.
-     * 
- * - * string path = 1; - * @param value The bytes for path to set. - * @return This builder for chaining. - */ - public Builder setPathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - path_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object displayCommand_ = ""; - /** - *
-     * Command to display the non-compliant files.
-     * 
- * - * string display_command = 2; - * @return The displayCommand. - */ - public java.lang.String getDisplayCommand() { - java.lang.Object ref = displayCommand_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayCommand_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Command to display the non-compliant files.
-     * 
- * - * string display_command = 2; - * @return The bytes for displayCommand. - */ - public com.google.protobuf.ByteString - getDisplayCommandBytes() { - java.lang.Object ref = displayCommand_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayCommand_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Command to display the non-compliant files.
-     * 
- * - * string display_command = 2; - * @param value The displayCommand to set. - * @return This builder for chaining. - */ - public Builder setDisplayCommand( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - displayCommand_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Command to display the non-compliant files.
-     * 
- * - * string display_command = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayCommand() { - displayCommand_ = getDefaultInstance().getDisplayCommand(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Command to display the non-compliant files.
-     * 
- * - * string display_command = 2; - * @param value The bytes for displayCommand to set. - * @return This builder for chaining. - */ - public Builder setDisplayCommandBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - displayCommand_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object reason_ = ""; - /** - *
-     * Explains why a file is non compliant for a CIS check.
-     * 
- * - * string reason = 3; - * @return The reason. - */ - public java.lang.String getReason() { - java.lang.Object ref = reason_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - reason_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Explains why a file is non compliant for a CIS check.
-     * 
- * - * string reason = 3; - * @return The bytes for reason. - */ - public com.google.protobuf.ByteString - getReasonBytes() { - java.lang.Object ref = reason_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - reason_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Explains why a file is non compliant for a CIS check.
-     * 
- * - * string reason = 3; - * @param value The reason to set. - * @return This builder for chaining. - */ - public Builder setReason( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - reason_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Explains why a file is non compliant for a CIS check.
-     * 
- * - * string reason = 3; - * @return This builder for chaining. - */ - public Builder clearReason() { - reason_ = getDefaultInstance().getReason(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * Explains why a file is non compliant for a CIS check.
-     * 
- * - * string reason = 3; - * @param value The bytes for reason to set. - * @return This builder for chaining. - */ - public Builder setReasonBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - reason_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.NonCompliantFile) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.NonCompliantFile) - private static final io.grafeas.v1.NonCompliantFile DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.NonCompliantFile(); - } - - public static io.grafeas.v1.NonCompliantFile getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NonCompliantFile parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.NonCompliantFile getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java deleted file mode 100644 index fece8f7338c1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java +++ /dev/null @@ -1,69 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -public interface NonCompliantFileOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.NonCompliantFile) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Empty if `display_command` is set.
-   * 
- * - * string path = 1; - * @return The path. - */ - java.lang.String getPath(); - /** - *
-   * Empty if `display_command` is set.
-   * 
- * - * string path = 1; - * @return The bytes for path. - */ - com.google.protobuf.ByteString - getPathBytes(); - - /** - *
-   * Command to display the non-compliant files.
-   * 
- * - * string display_command = 2; - * @return The displayCommand. - */ - java.lang.String getDisplayCommand(); - /** - *
-   * Command to display the non-compliant files.
-   * 
- * - * string display_command = 2; - * @return The bytes for displayCommand. - */ - com.google.protobuf.ByteString - getDisplayCommandBytes(); - - /** - *
-   * Explains why a file is non compliant for a CIS check.
-   * 
- * - * string reason = 3; - * @return The reason. - */ - java.lang.String getReason(); - /** - *
-   * Explains why a file is non compliant for a CIS check.
-   * 
- * - * string reason = 3; - * @return The bytes for reason. - */ - com.google.protobuf.ByteString - getReasonBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java deleted file mode 100644 index 88e76d9b461e..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java +++ /dev/null @@ -1,5068 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * A type of analysis that can be done for a resource.
- * 
- * - * Protobuf type {@code grafeas.v1.Note} - */ -public final class Note extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Note) - NoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use Note.newBuilder() to construct. - private Note(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Note() { - name_ = ""; - shortDescription_ = ""; - longDescription_ = ""; - kind_ = 0; - relatedUrl_ = java.util.Collections.emptyList(); - relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Note(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Note.class, io.grafeas.v1.Note.Builder.class); - } - - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VULNERABILITY(10), - BUILD(11), - IMAGE(12), - PACKAGE(13), - DEPLOYMENT(14), - DISCOVERY(15), - ATTESTATION(16), - UPGRADE(17), - COMPLIANCE(18), - DSSE_ATTESTATION(19), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 10: return VULNERABILITY; - case 11: return BUILD; - case 12: return IMAGE; - case 13: return PACKAGE; - case 14: return DEPLOYMENT; - case 15: return DISCOVERY; - case 16: return ATTESTATION; - case 17: return UPGRADE; - case 18: return COMPLIANCE; - case 19: return DSSE_ATTESTATION; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * Output only. The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Output only. The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object shortDescription_ = ""; - /** - *
-   * A one sentence description of this note.
-   * 
- * - * string short_description = 2; - * @return The shortDescription. - */ - @java.lang.Override - public java.lang.String getShortDescription() { - java.lang.Object ref = shortDescription_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - shortDescription_ = s; - return s; - } - } - /** - *
-   * A one sentence description of this note.
-   * 
- * - * string short_description = 2; - * @return The bytes for shortDescription. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getShortDescriptionBytes() { - java.lang.Object ref = shortDescription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - shortDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LONG_DESCRIPTION_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object longDescription_ = ""; - /** - *
-   * A detailed description of this note.
-   * 
- * - * string long_description = 3; - * @return The longDescription. - */ - @java.lang.Override - public java.lang.String getLongDescription() { - java.lang.Object ref = longDescription_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - longDescription_ = s; - return s; - } - } - /** - *
-   * A detailed description of this note.
-   * 
- * - * string long_description = 3; - * @return The bytes for longDescription. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLongDescriptionBytes() { - java.lang.Object ref = longDescription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - longDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KIND_FIELD_NUMBER = 4; - private int kind_ = 0; - /** - *
-   * Output only. The type of analysis. This field can be used as a filter in
-   * list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-   * Output only. The type of analysis. This field can be used as a filter in
-   * list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The kind. - */ - @java.lang.Override public io.grafeas.v1.NoteKind getKind() { - io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); - return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; - } - - public static final int RELATED_URL_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private java.util.List relatedUrl_; - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - @java.lang.Override - public java.util.List getRelatedUrlList() { - return relatedUrl_; - } - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - @java.lang.Override - public java.util.List - getRelatedUrlOrBuilderList() { - return relatedUrl_; - } - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - @java.lang.Override - public int getRelatedUrlCount() { - return relatedUrl_.size(); - } - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - @java.lang.Override - public io.grafeas.v1.RelatedUrl getRelatedUrl(int index) { - return relatedUrl_.get(index); - } - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - @java.lang.Override - public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlOrBuilder( - int index) { - return relatedUrl_.get(index); - } - - public static final int EXPIRATION_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp expirationTime_; - /** - *
-   * Time of expiration for this note. Empty if note does not expire.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - * @return Whether the expirationTime field is set. - */ - @java.lang.Override - public boolean hasExpirationTime() { - return expirationTime_ != null; - } - /** - *
-   * Time of expiration for this note. Empty if note does not expire.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - * @return The expirationTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getExpirationTime() { - return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; - } - /** - *
-   * Time of expiration for this note. Empty if note does not expire.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { - return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; - } - - public static final int CREATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The time this note was created. This field can be used as a
-   * filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The time this note was created. This field can be used as a
-   * filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The time this note was created. This field can be used as a
-   * filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 8; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * Output only. The time this note was last updated. This field can be used as
-   * a filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * Output only. The time this note was last updated. This field can be used as
-   * a filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * Output only. The time this note was last updated. This field can be used as
-   * a filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int RELATED_NOTE_NAMES_FIELD_NUMBER = 9; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList relatedNoteNames_; - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @return A list containing the relatedNoteNames. - */ - public com.google.protobuf.ProtocolStringList - getRelatedNoteNamesList() { - return relatedNoteNames_; - } - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @return The count of relatedNoteNames. - */ - public int getRelatedNoteNamesCount() { - return relatedNoteNames_.size(); - } - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @param index The index of the element to return. - * @return The relatedNoteNames at the given index. - */ - public java.lang.String getRelatedNoteNames(int index) { - return relatedNoteNames_.get(index); - } - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @param index The index of the value to return. - * @return The bytes of the relatedNoteNames at the given index. - */ - public com.google.protobuf.ByteString - getRelatedNoteNamesBytes(int index) { - return relatedNoteNames_.getByteString(index); - } - - public static final int VULNERABILITY_FIELD_NUMBER = 10; - /** - *
-   * A note describing a package vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @return Whether the vulnerability field is set. - */ - @java.lang.Override - public boolean hasVulnerability() { - return typeCase_ == 10; - } - /** - *
-   * A note describing a package vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @return The vulnerability. - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote getVulnerability() { - if (typeCase_ == 10) { - return (io.grafeas.v1.VulnerabilityNote) type_; - } - return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); - } - /** - *
-   * A note describing a package vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNoteOrBuilder getVulnerabilityOrBuilder() { - if (typeCase_ == 10) { - return (io.grafeas.v1.VulnerabilityNote) type_; - } - return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); - } - - public static final int BUILD_FIELD_NUMBER = 11; - /** - *
-   * A note describing build provenance for a verifiable build.
-   * 
- * - * .grafeas.v1.BuildNote build = 11; - * @return Whether the build field is set. - */ - @java.lang.Override - public boolean hasBuild() { - return typeCase_ == 11; - } - /** - *
-   * A note describing build provenance for a verifiable build.
-   * 
- * - * .grafeas.v1.BuildNote build = 11; - * @return The build. - */ - @java.lang.Override - public io.grafeas.v1.BuildNote getBuild() { - if (typeCase_ == 11) { - return (io.grafeas.v1.BuildNote) type_; - } - return io.grafeas.v1.BuildNote.getDefaultInstance(); - } - /** - *
-   * A note describing build provenance for a verifiable build.
-   * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - @java.lang.Override - public io.grafeas.v1.BuildNoteOrBuilder getBuildOrBuilder() { - if (typeCase_ == 11) { - return (io.grafeas.v1.BuildNote) type_; - } - return io.grafeas.v1.BuildNote.getDefaultInstance(); - } - - public static final int IMAGE_FIELD_NUMBER = 12; - /** - *
-   * A note describing a base image.
-   * 
- * - * .grafeas.v1.ImageNote image = 12; - * @return Whether the image field is set. - */ - @java.lang.Override - public boolean hasImage() { - return typeCase_ == 12; - } - /** - *
-   * A note describing a base image.
-   * 
- * - * .grafeas.v1.ImageNote image = 12; - * @return The image. - */ - @java.lang.Override - public io.grafeas.v1.ImageNote getImage() { - if (typeCase_ == 12) { - return (io.grafeas.v1.ImageNote) type_; - } - return io.grafeas.v1.ImageNote.getDefaultInstance(); - } - /** - *
-   * A note describing a base image.
-   * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - @java.lang.Override - public io.grafeas.v1.ImageNoteOrBuilder getImageOrBuilder() { - if (typeCase_ == 12) { - return (io.grafeas.v1.ImageNote) type_; - } - return io.grafeas.v1.ImageNote.getDefaultInstance(); - } - - public static final int PACKAGE_FIELD_NUMBER = 13; - /** - *
-   * A note describing a package hosted by various package managers.
-   * 
- * - * .grafeas.v1.PackageNote package = 13; - * @return Whether the package field is set. - */ - @java.lang.Override - public boolean hasPackage() { - return typeCase_ == 13; - } - /** - *
-   * A note describing a package hosted by various package managers.
-   * 
- * - * .grafeas.v1.PackageNote package = 13; - * @return The package. - */ - @java.lang.Override - public io.grafeas.v1.PackageNote getPackage() { - if (typeCase_ == 13) { - return (io.grafeas.v1.PackageNote) type_; - } - return io.grafeas.v1.PackageNote.getDefaultInstance(); - } - /** - *
-   * A note describing a package hosted by various package managers.
-   * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - @java.lang.Override - public io.grafeas.v1.PackageNoteOrBuilder getPackageOrBuilder() { - if (typeCase_ == 13) { - return (io.grafeas.v1.PackageNote) type_; - } - return io.grafeas.v1.PackageNote.getDefaultInstance(); - } - - public static final int DEPLOYMENT_FIELD_NUMBER = 14; - /** - *
-   * A note describing something that can be deployed.
-   * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - * @return Whether the deployment field is set. - */ - @java.lang.Override - public boolean hasDeployment() { - return typeCase_ == 14; - } - /** - *
-   * A note describing something that can be deployed.
-   * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - * @return The deployment. - */ - @java.lang.Override - public io.grafeas.v1.DeploymentNote getDeployment() { - if (typeCase_ == 14) { - return (io.grafeas.v1.DeploymentNote) type_; - } - return io.grafeas.v1.DeploymentNote.getDefaultInstance(); - } - /** - *
-   * A note describing something that can be deployed.
-   * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - @java.lang.Override - public io.grafeas.v1.DeploymentNoteOrBuilder getDeploymentOrBuilder() { - if (typeCase_ == 14) { - return (io.grafeas.v1.DeploymentNote) type_; - } - return io.grafeas.v1.DeploymentNote.getDefaultInstance(); - } - - public static final int DISCOVERY_FIELD_NUMBER = 15; - /** - *
-   * A note describing the initial analysis of a resource.
-   * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - * @return Whether the discovery field is set. - */ - @java.lang.Override - public boolean hasDiscovery() { - return typeCase_ == 15; - } - /** - *
-   * A note describing the initial analysis of a resource.
-   * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - * @return The discovery. - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryNote getDiscovery() { - if (typeCase_ == 15) { - return (io.grafeas.v1.DiscoveryNote) type_; - } - return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); - } - /** - *
-   * A note describing the initial analysis of a resource.
-   * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryNoteOrBuilder getDiscoveryOrBuilder() { - if (typeCase_ == 15) { - return (io.grafeas.v1.DiscoveryNote) type_; - } - return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); - } - - public static final int ATTESTATION_FIELD_NUMBER = 16; - /** - *
-   * A note describing an attestation role.
-   * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - * @return Whether the attestation field is set. - */ - @java.lang.Override - public boolean hasAttestation() { - return typeCase_ == 16; - } - /** - *
-   * A note describing an attestation role.
-   * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - * @return The attestation. - */ - @java.lang.Override - public io.grafeas.v1.AttestationNote getAttestation() { - if (typeCase_ == 16) { - return (io.grafeas.v1.AttestationNote) type_; - } - return io.grafeas.v1.AttestationNote.getDefaultInstance(); - } - /** - *
-   * A note describing an attestation role.
-   * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - @java.lang.Override - public io.grafeas.v1.AttestationNoteOrBuilder getAttestationOrBuilder() { - if (typeCase_ == 16) { - return (io.grafeas.v1.AttestationNote) type_; - } - return io.grafeas.v1.AttestationNote.getDefaultInstance(); - } - - public static final int UPGRADE_FIELD_NUMBER = 17; - /** - *
-   * A note describing available package upgrades.
-   * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - * @return Whether the upgrade field is set. - */ - @java.lang.Override - public boolean hasUpgrade() { - return typeCase_ == 17; - } - /** - *
-   * A note describing available package upgrades.
-   * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - * @return The upgrade. - */ - @java.lang.Override - public io.grafeas.v1.UpgradeNote getUpgrade() { - if (typeCase_ == 17) { - return (io.grafeas.v1.UpgradeNote) type_; - } - return io.grafeas.v1.UpgradeNote.getDefaultInstance(); - } - /** - *
-   * A note describing available package upgrades.
-   * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - @java.lang.Override - public io.grafeas.v1.UpgradeNoteOrBuilder getUpgradeOrBuilder() { - if (typeCase_ == 17) { - return (io.grafeas.v1.UpgradeNote) type_; - } - return io.grafeas.v1.UpgradeNote.getDefaultInstance(); - } - - public static final int COMPLIANCE_FIELD_NUMBER = 18; - /** - *
-   * A note describing a compliance check.
-   * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - * @return Whether the compliance field is set. - */ - @java.lang.Override - public boolean hasCompliance() { - return typeCase_ == 18; - } - /** - *
-   * A note describing a compliance check.
-   * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - * @return The compliance. - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNote getCompliance() { - if (typeCase_ == 18) { - return (io.grafeas.v1.ComplianceNote) type_; - } - return io.grafeas.v1.ComplianceNote.getDefaultInstance(); - } - /** - *
-   * A note describing a compliance check.
-   * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNoteOrBuilder getComplianceOrBuilder() { - if (typeCase_ == 18) { - return (io.grafeas.v1.ComplianceNote) type_; - } - return io.grafeas.v1.ComplianceNote.getDefaultInstance(); - } - - public static final int DSSE_ATTESTATION_FIELD_NUMBER = 19; - /** - *
-   * A note describing a dsse attestation note.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @return Whether the dsseAttestation field is set. - */ - @java.lang.Override - public boolean hasDsseAttestation() { - return typeCase_ == 19; - } - /** - *
-   * A note describing a dsse attestation note.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @return The dsseAttestation. - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote getDsseAttestation() { - if (typeCase_ == 19) { - return (io.grafeas.v1.DSSEAttestationNote) type_; - } - return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); - } - /** - *
-   * A note describing a dsse attestation note.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder() { - if (typeCase_ == 19) { - return (io.grafeas.v1.DSSEAttestationNote) type_; - } - return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, shortDescription_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, longDescription_); - } - if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { - output.writeEnum(4, kind_); - } - for (int i = 0; i < relatedUrl_.size(); i++) { - output.writeMessage(5, relatedUrl_.get(i)); - } - if (expirationTime_ != null) { - output.writeMessage(6, getExpirationTime()); - } - if (createTime_ != null) { - output.writeMessage(7, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(8, getUpdateTime()); - } - for (int i = 0; i < relatedNoteNames_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, relatedNoteNames_.getRaw(i)); - } - if (typeCase_ == 10) { - output.writeMessage(10, (io.grafeas.v1.VulnerabilityNote) type_); - } - if (typeCase_ == 11) { - output.writeMessage(11, (io.grafeas.v1.BuildNote) type_); - } - if (typeCase_ == 12) { - output.writeMessage(12, (io.grafeas.v1.ImageNote) type_); - } - if (typeCase_ == 13) { - output.writeMessage(13, (io.grafeas.v1.PackageNote) type_); - } - if (typeCase_ == 14) { - output.writeMessage(14, (io.grafeas.v1.DeploymentNote) type_); - } - if (typeCase_ == 15) { - output.writeMessage(15, (io.grafeas.v1.DiscoveryNote) type_); - } - if (typeCase_ == 16) { - output.writeMessage(16, (io.grafeas.v1.AttestationNote) type_); - } - if (typeCase_ == 17) { - output.writeMessage(17, (io.grafeas.v1.UpgradeNote) type_); - } - if (typeCase_ == 18) { - output.writeMessage(18, (io.grafeas.v1.ComplianceNote) type_); - } - if (typeCase_ == 19) { - output.writeMessage(19, (io.grafeas.v1.DSSEAttestationNote) type_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, shortDescription_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, longDescription_); - } - if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, kind_); - } - for (int i = 0; i < relatedUrl_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, relatedUrl_.get(i)); - } - if (expirationTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getExpirationTime()); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getUpdateTime()); - } - { - int dataSize = 0; - for (int i = 0; i < relatedNoteNames_.size(); i++) { - dataSize += computeStringSizeNoTag(relatedNoteNames_.getRaw(i)); - } - size += dataSize; - size += 1 * getRelatedNoteNamesList().size(); - } - if (typeCase_ == 10) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, (io.grafeas.v1.VulnerabilityNote) type_); - } - if (typeCase_ == 11) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, (io.grafeas.v1.BuildNote) type_); - } - if (typeCase_ == 12) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, (io.grafeas.v1.ImageNote) type_); - } - if (typeCase_ == 13) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, (io.grafeas.v1.PackageNote) type_); - } - if (typeCase_ == 14) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, (io.grafeas.v1.DeploymentNote) type_); - } - if (typeCase_ == 15) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(15, (io.grafeas.v1.DiscoveryNote) type_); - } - if (typeCase_ == 16) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(16, (io.grafeas.v1.AttestationNote) type_); - } - if (typeCase_ == 17) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(17, (io.grafeas.v1.UpgradeNote) type_); - } - if (typeCase_ == 18) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(18, (io.grafeas.v1.ComplianceNote) type_); - } - if (typeCase_ == 19) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(19, (io.grafeas.v1.DSSEAttestationNote) type_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Note)) { - return super.equals(obj); - } - io.grafeas.v1.Note other = (io.grafeas.v1.Note) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getShortDescription() - .equals(other.getShortDescription())) return false; - if (!getLongDescription() - .equals(other.getLongDescription())) return false; - if (kind_ != other.kind_) return false; - if (!getRelatedUrlList() - .equals(other.getRelatedUrlList())) return false; - if (hasExpirationTime() != other.hasExpirationTime()) return false; - if (hasExpirationTime()) { - if (!getExpirationTime() - .equals(other.getExpirationTime())) return false; - } - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (!getRelatedNoteNamesList() - .equals(other.getRelatedNoteNamesList())) return false; - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 10: - if (!getVulnerability() - .equals(other.getVulnerability())) return false; - break; - case 11: - if (!getBuild() - .equals(other.getBuild())) return false; - break; - case 12: - if (!getImage() - .equals(other.getImage())) return false; - break; - case 13: - if (!getPackage() - .equals(other.getPackage())) return false; - break; - case 14: - if (!getDeployment() - .equals(other.getDeployment())) return false; - break; - case 15: - if (!getDiscovery() - .equals(other.getDiscovery())) return false; - break; - case 16: - if (!getAttestation() - .equals(other.getAttestation())) return false; - break; - case 17: - if (!getUpgrade() - .equals(other.getUpgrade())) return false; - break; - case 18: - if (!getCompliance() - .equals(other.getCompliance())) return false; - break; - case 19: - if (!getDsseAttestation() - .equals(other.getDsseAttestation())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + SHORT_DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getShortDescription().hashCode(); - hash = (37 * hash) + LONG_DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getLongDescription().hashCode(); - hash = (37 * hash) + KIND_FIELD_NUMBER; - hash = (53 * hash) + kind_; - if (getRelatedUrlCount() > 0) { - hash = (37 * hash) + RELATED_URL_FIELD_NUMBER; - hash = (53 * hash) + getRelatedUrlList().hashCode(); - } - if (hasExpirationTime()) { - hash = (37 * hash) + EXPIRATION_TIME_FIELD_NUMBER; - hash = (53 * hash) + getExpirationTime().hashCode(); - } - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (getRelatedNoteNamesCount() > 0) { - hash = (37 * hash) + RELATED_NOTE_NAMES_FIELD_NUMBER; - hash = (53 * hash) + getRelatedNoteNamesList().hashCode(); - } - switch (typeCase_) { - case 10: - hash = (37 * hash) + VULNERABILITY_FIELD_NUMBER; - hash = (53 * hash) + getVulnerability().hashCode(); - break; - case 11: - hash = (37 * hash) + BUILD_FIELD_NUMBER; - hash = (53 * hash) + getBuild().hashCode(); - break; - case 12: - hash = (37 * hash) + IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getImage().hashCode(); - break; - case 13: - hash = (37 * hash) + PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getPackage().hashCode(); - break; - case 14: - hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER; - hash = (53 * hash) + getDeployment().hashCode(); - break; - case 15: - hash = (37 * hash) + DISCOVERY_FIELD_NUMBER; - hash = (53 * hash) + getDiscovery().hashCode(); - break; - case 16: - hash = (37 * hash) + ATTESTATION_FIELD_NUMBER; - hash = (53 * hash) + getAttestation().hashCode(); - break; - case 17: - hash = (37 * hash) + UPGRADE_FIELD_NUMBER; - hash = (53 * hash) + getUpgrade().hashCode(); - break; - case 18: - hash = (37 * hash) + COMPLIANCE_FIELD_NUMBER; - hash = (53 * hash) + getCompliance().hashCode(); - break; - case 19: - hash = (37 * hash) + DSSE_ATTESTATION_FIELD_NUMBER; - hash = (53 * hash) + getDsseAttestation().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Note parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Note parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Note parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Note parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Note parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Note parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Note parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Note parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Note parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Note parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Note parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Note parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Note prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A type of analysis that can be done for a resource.
-   * 
- * - * Protobuf type {@code grafeas.v1.Note} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Note) - io.grafeas.v1.NoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Note.class, io.grafeas.v1.Note.Builder.class); - } - - // Construct using io.grafeas.v1.Note.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - shortDescription_ = ""; - longDescription_ = ""; - kind_ = 0; - if (relatedUrlBuilder_ == null) { - relatedUrl_ = java.util.Collections.emptyList(); - } else { - relatedUrl_ = null; - relatedUrlBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - expirationTime_ = null; - if (expirationTimeBuilder_ != null) { - expirationTimeBuilder_.dispose(); - expirationTimeBuilder_ = null; - } - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000100); - if (vulnerabilityBuilder_ != null) { - vulnerabilityBuilder_.clear(); - } - if (buildBuilder_ != null) { - buildBuilder_.clear(); - } - if (imageBuilder_ != null) { - imageBuilder_.clear(); - } - if (packageBuilder_ != null) { - packageBuilder_.clear(); - } - if (deploymentBuilder_ != null) { - deploymentBuilder_.clear(); - } - if (discoveryBuilder_ != null) { - discoveryBuilder_.clear(); - } - if (attestationBuilder_ != null) { - attestationBuilder_.clear(); - } - if (upgradeBuilder_ != null) { - upgradeBuilder_.clear(); - } - if (complianceBuilder_ != null) { - complianceBuilder_.clear(); - } - if (dsseAttestationBuilder_ != null) { - dsseAttestationBuilder_.clear(); - } - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Note getDefaultInstanceForType() { - return io.grafeas.v1.Note.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Note build() { - io.grafeas.v1.Note result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Note buildPartial() { - io.grafeas.v1.Note result = new io.grafeas.v1.Note(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.Note result) { - if (relatedUrlBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - relatedUrl_ = java.util.Collections.unmodifiableList(relatedUrl_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.relatedUrl_ = relatedUrl_; - } else { - result.relatedUrl_ = relatedUrlBuilder_.build(); - } - if (((bitField0_ & 0x00000100) != 0)) { - relatedNoteNames_ = relatedNoteNames_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.relatedNoteNames_ = relatedNoteNames_; - } - - private void buildPartial0(io.grafeas.v1.Note result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.shortDescription_ = shortDescription_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.longDescription_ = longDescription_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.kind_ = kind_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.expirationTime_ = expirationTimeBuilder_ == null - ? expirationTime_ - : expirationTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.createTime_ = createTimeBuilder_ == null - ? createTime_ - : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null - ? updateTime_ - : updateTimeBuilder_.build(); - } - } - - private void buildPartialOneofs(io.grafeas.v1.Note result) { - result.typeCase_ = typeCase_; - result.type_ = this.type_; - if (typeCase_ == 10 && - vulnerabilityBuilder_ != null) { - result.type_ = vulnerabilityBuilder_.build(); - } - if (typeCase_ == 11 && - buildBuilder_ != null) { - result.type_ = buildBuilder_.build(); - } - if (typeCase_ == 12 && - imageBuilder_ != null) { - result.type_ = imageBuilder_.build(); - } - if (typeCase_ == 13 && - packageBuilder_ != null) { - result.type_ = packageBuilder_.build(); - } - if (typeCase_ == 14 && - deploymentBuilder_ != null) { - result.type_ = deploymentBuilder_.build(); - } - if (typeCase_ == 15 && - discoveryBuilder_ != null) { - result.type_ = discoveryBuilder_.build(); - } - if (typeCase_ == 16 && - attestationBuilder_ != null) { - result.type_ = attestationBuilder_.build(); - } - if (typeCase_ == 17 && - upgradeBuilder_ != null) { - result.type_ = upgradeBuilder_.build(); - } - if (typeCase_ == 18 && - complianceBuilder_ != null) { - result.type_ = complianceBuilder_.build(); - } - if (typeCase_ == 19 && - dsseAttestationBuilder_ != null) { - result.type_ = dsseAttestationBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Note) { - return mergeFrom((io.grafeas.v1.Note)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Note other) { - if (other == io.grafeas.v1.Note.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getShortDescription().isEmpty()) { - shortDescription_ = other.shortDescription_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getLongDescription().isEmpty()) { - longDescription_ = other.longDescription_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.kind_ != 0) { - setKindValue(other.getKindValue()); - } - if (relatedUrlBuilder_ == null) { - if (!other.relatedUrl_.isEmpty()) { - if (relatedUrl_.isEmpty()) { - relatedUrl_ = other.relatedUrl_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureRelatedUrlIsMutable(); - relatedUrl_.addAll(other.relatedUrl_); - } - onChanged(); - } - } else { - if (!other.relatedUrl_.isEmpty()) { - if (relatedUrlBuilder_.isEmpty()) { - relatedUrlBuilder_.dispose(); - relatedUrlBuilder_ = null; - relatedUrl_ = other.relatedUrl_; - bitField0_ = (bitField0_ & ~0x00000010); - relatedUrlBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRelatedUrlFieldBuilder() : null; - } else { - relatedUrlBuilder_.addAllMessages(other.relatedUrl_); - } - } - } - if (other.hasExpirationTime()) { - mergeExpirationTime(other.getExpirationTime()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (!other.relatedNoteNames_.isEmpty()) { - if (relatedNoteNames_.isEmpty()) { - relatedNoteNames_ = other.relatedNoteNames_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureRelatedNoteNamesIsMutable(); - relatedNoteNames_.addAll(other.relatedNoteNames_); - } - onChanged(); - } - switch (other.getTypeCase()) { - case VULNERABILITY: { - mergeVulnerability(other.getVulnerability()); - break; - } - case BUILD: { - mergeBuild(other.getBuild()); - break; - } - case IMAGE: { - mergeImage(other.getImage()); - break; - } - case PACKAGE: { - mergePackage(other.getPackage()); - break; - } - case DEPLOYMENT: { - mergeDeployment(other.getDeployment()); - break; - } - case DISCOVERY: { - mergeDiscovery(other.getDiscovery()); - break; - } - case ATTESTATION: { - mergeAttestation(other.getAttestation()); - break; - } - case UPGRADE: { - mergeUpgrade(other.getUpgrade()); - break; - } - case COMPLIANCE: { - mergeCompliance(other.getCompliance()); - break; - } - case DSSE_ATTESTATION: { - mergeDsseAttestation(other.getDsseAttestation()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - shortDescription_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - longDescription_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: { - kind_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: { - io.grafeas.v1.RelatedUrl m = - input.readMessage( - io.grafeas.v1.RelatedUrl.parser(), - extensionRegistry); - if (relatedUrlBuilder_ == null) { - ensureRelatedUrlIsMutable(); - relatedUrl_.add(m); - } else { - relatedUrlBuilder_.addMessage(m); - } - break; - } // case 42 - case 50: { - input.readMessage( - getExpirationTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - input.readMessage( - getCreateTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: { - input.readMessage( - getUpdateTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 66 - case 74: { - java.lang.String s = input.readStringRequireUtf8(); - ensureRelatedNoteNamesIsMutable(); - relatedNoteNames_.add(s); - break; - } // case 74 - case 82: { - input.readMessage( - getVulnerabilityFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 10; - break; - } // case 82 - case 90: { - input.readMessage( - getBuildFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 11; - break; - } // case 90 - case 98: { - input.readMessage( - getImageFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 12; - break; - } // case 98 - case 106: { - input.readMessage( - getPackageFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 13; - break; - } // case 106 - case 114: { - input.readMessage( - getDeploymentFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 14; - break; - } // case 114 - case 122: { - input.readMessage( - getDiscoveryFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 15; - break; - } // case 122 - case 130: { - input.readMessage( - getAttestationFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 16; - break; - } // case 130 - case 138: { - input.readMessage( - getUpgradeFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 17; - break; - } // case 138 - case 146: { - input.readMessage( - getComplianceFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 18; - break; - } // case 146 - case 154: { - input.readMessage( - getDsseAttestationFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 19; - break; - } // case 154 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Output only. The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Output only. The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Output only. The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object shortDescription_ = ""; - /** - *
-     * A one sentence description of this note.
-     * 
- * - * string short_description = 2; - * @return The shortDescription. - */ - public java.lang.String getShortDescription() { - java.lang.Object ref = shortDescription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - shortDescription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A one sentence description of this note.
-     * 
- * - * string short_description = 2; - * @return The bytes for shortDescription. - */ - public com.google.protobuf.ByteString - getShortDescriptionBytes() { - java.lang.Object ref = shortDescription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - shortDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A one sentence description of this note.
-     * 
- * - * string short_description = 2; - * @param value The shortDescription to set. - * @return This builder for chaining. - */ - public Builder setShortDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - shortDescription_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * A one sentence description of this note.
-     * 
- * - * string short_description = 2; - * @return This builder for chaining. - */ - public Builder clearShortDescription() { - shortDescription_ = getDefaultInstance().getShortDescription(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * A one sentence description of this note.
-     * 
- * - * string short_description = 2; - * @param value The bytes for shortDescription to set. - * @return This builder for chaining. - */ - public Builder setShortDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - shortDescription_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object longDescription_ = ""; - /** - *
-     * A detailed description of this note.
-     * 
- * - * string long_description = 3; - * @return The longDescription. - */ - public java.lang.String getLongDescription() { - java.lang.Object ref = longDescription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - longDescription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A detailed description of this note.
-     * 
- * - * string long_description = 3; - * @return The bytes for longDescription. - */ - public com.google.protobuf.ByteString - getLongDescriptionBytes() { - java.lang.Object ref = longDescription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - longDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A detailed description of this note.
-     * 
- * - * string long_description = 3; - * @param value The longDescription to set. - * @return This builder for chaining. - */ - public Builder setLongDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - longDescription_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * A detailed description of this note.
-     * 
- * - * string long_description = 3; - * @return This builder for chaining. - */ - public Builder clearLongDescription() { - longDescription_ = getDefaultInstance().getLongDescription(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * A detailed description of this note.
-     * 
- * - * string long_description = 3; - * @param value The bytes for longDescription to set. - * @return This builder for chaining. - */ - public Builder setLongDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - longDescription_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private int kind_ = 0; - /** - *
-     * Output only. The type of analysis. This field can be used as a filter in
-     * list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-     * Output only. The type of analysis. This field can be used as a filter in
-     * list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @param value The enum numeric value on the wire for kind to set. - * @return This builder for chaining. - */ - public Builder setKindValue(int value) { - kind_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Output only. The type of analysis. This field can be used as a filter in
-     * list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The kind. - */ - @java.lang.Override - public io.grafeas.v1.NoteKind getKind() { - io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); - return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; - } - /** - *
-     * Output only. The type of analysis. This field can be used as a filter in
-     * list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @param value The kind to set. - * @return This builder for chaining. - */ - public Builder setKind(io.grafeas.v1.NoteKind value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - kind_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. The type of analysis. This field can be used as a filter in
-     * list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return This builder for chaining. - */ - public Builder clearKind() { - bitField0_ = (bitField0_ & ~0x00000008); - kind_ = 0; - onChanged(); - return this; - } - - private java.util.List relatedUrl_ = - java.util.Collections.emptyList(); - private void ensureRelatedUrlIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - relatedUrl_ = new java.util.ArrayList(relatedUrl_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> relatedUrlBuilder_; - - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public java.util.List getRelatedUrlList() { - if (relatedUrlBuilder_ == null) { - return java.util.Collections.unmodifiableList(relatedUrl_); - } else { - return relatedUrlBuilder_.getMessageList(); - } - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public int getRelatedUrlCount() { - if (relatedUrlBuilder_ == null) { - return relatedUrl_.size(); - } else { - return relatedUrlBuilder_.getCount(); - } - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public io.grafeas.v1.RelatedUrl getRelatedUrl(int index) { - if (relatedUrlBuilder_ == null) { - return relatedUrl_.get(index); - } else { - return relatedUrlBuilder_.getMessage(index); - } - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder setRelatedUrl( - int index, io.grafeas.v1.RelatedUrl value) { - if (relatedUrlBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedUrlIsMutable(); - relatedUrl_.set(index, value); - onChanged(); - } else { - relatedUrlBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder setRelatedUrl( - int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { - if (relatedUrlBuilder_ == null) { - ensureRelatedUrlIsMutable(); - relatedUrl_.set(index, builderForValue.build()); - onChanged(); - } else { - relatedUrlBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder addRelatedUrl(io.grafeas.v1.RelatedUrl value) { - if (relatedUrlBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedUrlIsMutable(); - relatedUrl_.add(value); - onChanged(); - } else { - relatedUrlBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder addRelatedUrl( - int index, io.grafeas.v1.RelatedUrl value) { - if (relatedUrlBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedUrlIsMutable(); - relatedUrl_.add(index, value); - onChanged(); - } else { - relatedUrlBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder addRelatedUrl( - io.grafeas.v1.RelatedUrl.Builder builderForValue) { - if (relatedUrlBuilder_ == null) { - ensureRelatedUrlIsMutable(); - relatedUrl_.add(builderForValue.build()); - onChanged(); - } else { - relatedUrlBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder addRelatedUrl( - int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { - if (relatedUrlBuilder_ == null) { - ensureRelatedUrlIsMutable(); - relatedUrl_.add(index, builderForValue.build()); - onChanged(); - } else { - relatedUrlBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder addAllRelatedUrl( - java.lang.Iterable values) { - if (relatedUrlBuilder_ == null) { - ensureRelatedUrlIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, relatedUrl_); - onChanged(); - } else { - relatedUrlBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder clearRelatedUrl() { - if (relatedUrlBuilder_ == null) { - relatedUrl_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - relatedUrlBuilder_.clear(); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder removeRelatedUrl(int index) { - if (relatedUrlBuilder_ == null) { - ensureRelatedUrlIsMutable(); - relatedUrl_.remove(index); - onChanged(); - } else { - relatedUrlBuilder_.remove(index); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public io.grafeas.v1.RelatedUrl.Builder getRelatedUrlBuilder( - int index) { - return getRelatedUrlFieldBuilder().getBuilder(index); - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlOrBuilder( - int index) { - if (relatedUrlBuilder_ == null) { - return relatedUrl_.get(index); } else { - return relatedUrlBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public java.util.List - getRelatedUrlOrBuilderList() { - if (relatedUrlBuilder_ != null) { - return relatedUrlBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(relatedUrl_); - } - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlBuilder() { - return getRelatedUrlFieldBuilder().addBuilder( - io.grafeas.v1.RelatedUrl.getDefaultInstance()); - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlBuilder( - int index) { - return getRelatedUrlFieldBuilder().addBuilder( - index, io.grafeas.v1.RelatedUrl.getDefaultInstance()); - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public java.util.List - getRelatedUrlBuilderList() { - return getRelatedUrlFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> - getRelatedUrlFieldBuilder() { - if (relatedUrlBuilder_ == null) { - relatedUrlBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder>( - relatedUrl_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - relatedUrl_ = null; - } - return relatedUrlBuilder_; - } - - private com.google.protobuf.Timestamp expirationTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expirationTimeBuilder_; - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - * @return Whether the expirationTime field is set. - */ - public boolean hasExpirationTime() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - * @return The expirationTime. - */ - public com.google.protobuf.Timestamp getExpirationTime() { - if (expirationTimeBuilder_ == null) { - return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; - } else { - return expirationTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - public Builder setExpirationTime(com.google.protobuf.Timestamp value) { - if (expirationTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - expirationTime_ = value; - } else { - expirationTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - public Builder setExpirationTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (expirationTimeBuilder_ == null) { - expirationTime_ = builderForValue.build(); - } else { - expirationTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - public Builder mergeExpirationTime(com.google.protobuf.Timestamp value) { - if (expirationTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - expirationTime_ != null && - expirationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getExpirationTimeBuilder().mergeFrom(value); - } else { - expirationTime_ = value; - } - } else { - expirationTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - public Builder clearExpirationTime() { - bitField0_ = (bitField0_ & ~0x00000020); - expirationTime_ = null; - if (expirationTimeBuilder_ != null) { - expirationTimeBuilder_.dispose(); - expirationTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - public com.google.protobuf.Timestamp.Builder getExpirationTimeBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getExpirationTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { - if (expirationTimeBuilder_ != null) { - return expirationTimeBuilder_.getMessageOrBuilder(); - } else { - return expirationTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; - } - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getExpirationTimeFieldBuilder() { - if (expirationTimeBuilder_ == null) { - expirationTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getExpirationTime(), - getParentForChildren(), - isClean()); - expirationTime_ = null; - } - return expirationTimeBuilder_; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - createTime_ != null && - createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000040); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) && - updateTime_ != null && - updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000080); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.LazyStringList relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureRelatedNoteNamesIsMutable() { - if (!((bitField0_ & 0x00000100) != 0)) { - relatedNoteNames_ = new com.google.protobuf.LazyStringArrayList(relatedNoteNames_); - bitField0_ |= 0x00000100; - } - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @return A list containing the relatedNoteNames. - */ - public com.google.protobuf.ProtocolStringList - getRelatedNoteNamesList() { - return relatedNoteNames_.getUnmodifiableView(); - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @return The count of relatedNoteNames. - */ - public int getRelatedNoteNamesCount() { - return relatedNoteNames_.size(); - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @param index The index of the element to return. - * @return The relatedNoteNames at the given index. - */ - public java.lang.String getRelatedNoteNames(int index) { - return relatedNoteNames_.get(index); - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @param index The index of the value to return. - * @return The bytes of the relatedNoteNames at the given index. - */ - public com.google.protobuf.ByteString - getRelatedNoteNamesBytes(int index) { - return relatedNoteNames_.getByteString(index); - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @param index The index to set the value at. - * @param value The relatedNoteNames to set. - * @return This builder for chaining. - */ - public Builder setRelatedNoteNames( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureRelatedNoteNamesIsMutable(); - relatedNoteNames_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @param value The relatedNoteNames to add. - * @return This builder for chaining. - */ - public Builder addRelatedNoteNames( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureRelatedNoteNamesIsMutable(); - relatedNoteNames_.add(value); - onChanged(); - return this; - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @param values The relatedNoteNames to add. - * @return This builder for chaining. - */ - public Builder addAllRelatedNoteNames( - java.lang.Iterable values) { - ensureRelatedNoteNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, relatedNoteNames_); - onChanged(); - return this; - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @return This builder for chaining. - */ - public Builder clearRelatedNoteNames() { - relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @param value The bytes of the relatedNoteNames to add. - * @return This builder for chaining. - */ - public Builder addRelatedNoteNamesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureRelatedNoteNamesIsMutable(); - relatedNoteNames_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote, io.grafeas.v1.VulnerabilityNote.Builder, io.grafeas.v1.VulnerabilityNoteOrBuilder> vulnerabilityBuilder_; - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @return Whether the vulnerability field is set. - */ - @java.lang.Override - public boolean hasVulnerability() { - return typeCase_ == 10; - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @return The vulnerability. - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote getVulnerability() { - if (vulnerabilityBuilder_ == null) { - if (typeCase_ == 10) { - return (io.grafeas.v1.VulnerabilityNote) type_; - } - return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); - } else { - if (typeCase_ == 10) { - return vulnerabilityBuilder_.getMessage(); - } - return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - public Builder setVulnerability(io.grafeas.v1.VulnerabilityNote value) { - if (vulnerabilityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - vulnerabilityBuilder_.setMessage(value); - } - typeCase_ = 10; - return this; - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - public Builder setVulnerability( - io.grafeas.v1.VulnerabilityNote.Builder builderForValue) { - if (vulnerabilityBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - vulnerabilityBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 10; - return this; - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - public Builder mergeVulnerability(io.grafeas.v1.VulnerabilityNote value) { - if (vulnerabilityBuilder_ == null) { - if (typeCase_ == 10 && - type_ != io.grafeas.v1.VulnerabilityNote.getDefaultInstance()) { - type_ = io.grafeas.v1.VulnerabilityNote.newBuilder((io.grafeas.v1.VulnerabilityNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 10) { - vulnerabilityBuilder_.mergeFrom(value); - } else { - vulnerabilityBuilder_.setMessage(value); - } - } - typeCase_ = 10; - return this; - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - public Builder clearVulnerability() { - if (vulnerabilityBuilder_ == null) { - if (typeCase_ == 10) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 10) { - typeCase_ = 0; - type_ = null; - } - vulnerabilityBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - public io.grafeas.v1.VulnerabilityNote.Builder getVulnerabilityBuilder() { - return getVulnerabilityFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNoteOrBuilder getVulnerabilityOrBuilder() { - if ((typeCase_ == 10) && (vulnerabilityBuilder_ != null)) { - return vulnerabilityBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 10) { - return (io.grafeas.v1.VulnerabilityNote) type_; - } - return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote, io.grafeas.v1.VulnerabilityNote.Builder, io.grafeas.v1.VulnerabilityNoteOrBuilder> - getVulnerabilityFieldBuilder() { - if (vulnerabilityBuilder_ == null) { - if (!(typeCase_ == 10)) { - type_ = io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); - } - vulnerabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote, io.grafeas.v1.VulnerabilityNote.Builder, io.grafeas.v1.VulnerabilityNoteOrBuilder>( - (io.grafeas.v1.VulnerabilityNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 10; - onChanged(); - return vulnerabilityBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildNote, io.grafeas.v1.BuildNote.Builder, io.grafeas.v1.BuildNoteOrBuilder> buildBuilder_; - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - * @return Whether the build field is set. - */ - @java.lang.Override - public boolean hasBuild() { - return typeCase_ == 11; - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - * @return The build. - */ - @java.lang.Override - public io.grafeas.v1.BuildNote getBuild() { - if (buildBuilder_ == null) { - if (typeCase_ == 11) { - return (io.grafeas.v1.BuildNote) type_; - } - return io.grafeas.v1.BuildNote.getDefaultInstance(); - } else { - if (typeCase_ == 11) { - return buildBuilder_.getMessage(); - } - return io.grafeas.v1.BuildNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - public Builder setBuild(io.grafeas.v1.BuildNote value) { - if (buildBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - buildBuilder_.setMessage(value); - } - typeCase_ = 11; - return this; - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - public Builder setBuild( - io.grafeas.v1.BuildNote.Builder builderForValue) { - if (buildBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - buildBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 11; - return this; - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - public Builder mergeBuild(io.grafeas.v1.BuildNote value) { - if (buildBuilder_ == null) { - if (typeCase_ == 11 && - type_ != io.grafeas.v1.BuildNote.getDefaultInstance()) { - type_ = io.grafeas.v1.BuildNote.newBuilder((io.grafeas.v1.BuildNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 11) { - buildBuilder_.mergeFrom(value); - } else { - buildBuilder_.setMessage(value); - } - } - typeCase_ = 11; - return this; - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - public Builder clearBuild() { - if (buildBuilder_ == null) { - if (typeCase_ == 11) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 11) { - typeCase_ = 0; - type_ = null; - } - buildBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - public io.grafeas.v1.BuildNote.Builder getBuildBuilder() { - return getBuildFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - @java.lang.Override - public io.grafeas.v1.BuildNoteOrBuilder getBuildOrBuilder() { - if ((typeCase_ == 11) && (buildBuilder_ != null)) { - return buildBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 11) { - return (io.grafeas.v1.BuildNote) type_; - } - return io.grafeas.v1.BuildNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildNote, io.grafeas.v1.BuildNote.Builder, io.grafeas.v1.BuildNoteOrBuilder> - getBuildFieldBuilder() { - if (buildBuilder_ == null) { - if (!(typeCase_ == 11)) { - type_ = io.grafeas.v1.BuildNote.getDefaultInstance(); - } - buildBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildNote, io.grafeas.v1.BuildNote.Builder, io.grafeas.v1.BuildNoteOrBuilder>( - (io.grafeas.v1.BuildNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 11; - onChanged(); - return buildBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ImageNote, io.grafeas.v1.ImageNote.Builder, io.grafeas.v1.ImageNoteOrBuilder> imageBuilder_; - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - * @return Whether the image field is set. - */ - @java.lang.Override - public boolean hasImage() { - return typeCase_ == 12; - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - * @return The image. - */ - @java.lang.Override - public io.grafeas.v1.ImageNote getImage() { - if (imageBuilder_ == null) { - if (typeCase_ == 12) { - return (io.grafeas.v1.ImageNote) type_; - } - return io.grafeas.v1.ImageNote.getDefaultInstance(); - } else { - if (typeCase_ == 12) { - return imageBuilder_.getMessage(); - } - return io.grafeas.v1.ImageNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - public Builder setImage(io.grafeas.v1.ImageNote value) { - if (imageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - imageBuilder_.setMessage(value); - } - typeCase_ = 12; - return this; - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - public Builder setImage( - io.grafeas.v1.ImageNote.Builder builderForValue) { - if (imageBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - imageBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 12; - return this; - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - public Builder mergeImage(io.grafeas.v1.ImageNote value) { - if (imageBuilder_ == null) { - if (typeCase_ == 12 && - type_ != io.grafeas.v1.ImageNote.getDefaultInstance()) { - type_ = io.grafeas.v1.ImageNote.newBuilder((io.grafeas.v1.ImageNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 12) { - imageBuilder_.mergeFrom(value); - } else { - imageBuilder_.setMessage(value); - } - } - typeCase_ = 12; - return this; - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - public Builder clearImage() { - if (imageBuilder_ == null) { - if (typeCase_ == 12) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 12) { - typeCase_ = 0; - type_ = null; - } - imageBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - public io.grafeas.v1.ImageNote.Builder getImageBuilder() { - return getImageFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - @java.lang.Override - public io.grafeas.v1.ImageNoteOrBuilder getImageOrBuilder() { - if ((typeCase_ == 12) && (imageBuilder_ != null)) { - return imageBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 12) { - return (io.grafeas.v1.ImageNote) type_; - } - return io.grafeas.v1.ImageNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ImageNote, io.grafeas.v1.ImageNote.Builder, io.grafeas.v1.ImageNoteOrBuilder> - getImageFieldBuilder() { - if (imageBuilder_ == null) { - if (!(typeCase_ == 12)) { - type_ = io.grafeas.v1.ImageNote.getDefaultInstance(); - } - imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ImageNote, io.grafeas.v1.ImageNote.Builder, io.grafeas.v1.ImageNoteOrBuilder>( - (io.grafeas.v1.ImageNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 12; - onChanged(); - return imageBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.PackageNote, io.grafeas.v1.PackageNote.Builder, io.grafeas.v1.PackageNoteOrBuilder> packageBuilder_; - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - * @return Whether the package field is set. - */ - @java.lang.Override - public boolean hasPackage() { - return typeCase_ == 13; - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - * @return The package. - */ - @java.lang.Override - public io.grafeas.v1.PackageNote getPackage() { - if (packageBuilder_ == null) { - if (typeCase_ == 13) { - return (io.grafeas.v1.PackageNote) type_; - } - return io.grafeas.v1.PackageNote.getDefaultInstance(); - } else { - if (typeCase_ == 13) { - return packageBuilder_.getMessage(); - } - return io.grafeas.v1.PackageNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - public Builder setPackage(io.grafeas.v1.PackageNote value) { - if (packageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - packageBuilder_.setMessage(value); - } - typeCase_ = 13; - return this; - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - public Builder setPackage( - io.grafeas.v1.PackageNote.Builder builderForValue) { - if (packageBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - packageBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 13; - return this; - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - public Builder mergePackage(io.grafeas.v1.PackageNote value) { - if (packageBuilder_ == null) { - if (typeCase_ == 13 && - type_ != io.grafeas.v1.PackageNote.getDefaultInstance()) { - type_ = io.grafeas.v1.PackageNote.newBuilder((io.grafeas.v1.PackageNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 13) { - packageBuilder_.mergeFrom(value); - } else { - packageBuilder_.setMessage(value); - } - } - typeCase_ = 13; - return this; - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - public Builder clearPackage() { - if (packageBuilder_ == null) { - if (typeCase_ == 13) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 13) { - typeCase_ = 0; - type_ = null; - } - packageBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - public io.grafeas.v1.PackageNote.Builder getPackageBuilder() { - return getPackageFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - @java.lang.Override - public io.grafeas.v1.PackageNoteOrBuilder getPackageOrBuilder() { - if ((typeCase_ == 13) && (packageBuilder_ != null)) { - return packageBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 13) { - return (io.grafeas.v1.PackageNote) type_; - } - return io.grafeas.v1.PackageNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.PackageNote, io.grafeas.v1.PackageNote.Builder, io.grafeas.v1.PackageNoteOrBuilder> - getPackageFieldBuilder() { - if (packageBuilder_ == null) { - if (!(typeCase_ == 13)) { - type_ = io.grafeas.v1.PackageNote.getDefaultInstance(); - } - packageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.PackageNote, io.grafeas.v1.PackageNote.Builder, io.grafeas.v1.PackageNoteOrBuilder>( - (io.grafeas.v1.PackageNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 13; - onChanged(); - return packageBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DeploymentNote, io.grafeas.v1.DeploymentNote.Builder, io.grafeas.v1.DeploymentNoteOrBuilder> deploymentBuilder_; - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - * @return Whether the deployment field is set. - */ - @java.lang.Override - public boolean hasDeployment() { - return typeCase_ == 14; - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - * @return The deployment. - */ - @java.lang.Override - public io.grafeas.v1.DeploymentNote getDeployment() { - if (deploymentBuilder_ == null) { - if (typeCase_ == 14) { - return (io.grafeas.v1.DeploymentNote) type_; - } - return io.grafeas.v1.DeploymentNote.getDefaultInstance(); - } else { - if (typeCase_ == 14) { - return deploymentBuilder_.getMessage(); - } - return io.grafeas.v1.DeploymentNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - public Builder setDeployment(io.grafeas.v1.DeploymentNote value) { - if (deploymentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - deploymentBuilder_.setMessage(value); - } - typeCase_ = 14; - return this; - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - public Builder setDeployment( - io.grafeas.v1.DeploymentNote.Builder builderForValue) { - if (deploymentBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - deploymentBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 14; - return this; - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - public Builder mergeDeployment(io.grafeas.v1.DeploymentNote value) { - if (deploymentBuilder_ == null) { - if (typeCase_ == 14 && - type_ != io.grafeas.v1.DeploymentNote.getDefaultInstance()) { - type_ = io.grafeas.v1.DeploymentNote.newBuilder((io.grafeas.v1.DeploymentNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 14) { - deploymentBuilder_.mergeFrom(value); - } else { - deploymentBuilder_.setMessage(value); - } - } - typeCase_ = 14; - return this; - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - public Builder clearDeployment() { - if (deploymentBuilder_ == null) { - if (typeCase_ == 14) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 14) { - typeCase_ = 0; - type_ = null; - } - deploymentBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - public io.grafeas.v1.DeploymentNote.Builder getDeploymentBuilder() { - return getDeploymentFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - @java.lang.Override - public io.grafeas.v1.DeploymentNoteOrBuilder getDeploymentOrBuilder() { - if ((typeCase_ == 14) && (deploymentBuilder_ != null)) { - return deploymentBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 14) { - return (io.grafeas.v1.DeploymentNote) type_; - } - return io.grafeas.v1.DeploymentNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DeploymentNote, io.grafeas.v1.DeploymentNote.Builder, io.grafeas.v1.DeploymentNoteOrBuilder> - getDeploymentFieldBuilder() { - if (deploymentBuilder_ == null) { - if (!(typeCase_ == 14)) { - type_ = io.grafeas.v1.DeploymentNote.getDefaultInstance(); - } - deploymentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DeploymentNote, io.grafeas.v1.DeploymentNote.Builder, io.grafeas.v1.DeploymentNoteOrBuilder>( - (io.grafeas.v1.DeploymentNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 14; - onChanged(); - return deploymentBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryNote, io.grafeas.v1.DiscoveryNote.Builder, io.grafeas.v1.DiscoveryNoteOrBuilder> discoveryBuilder_; - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - * @return Whether the discovery field is set. - */ - @java.lang.Override - public boolean hasDiscovery() { - return typeCase_ == 15; - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - * @return The discovery. - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryNote getDiscovery() { - if (discoveryBuilder_ == null) { - if (typeCase_ == 15) { - return (io.grafeas.v1.DiscoveryNote) type_; - } - return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); - } else { - if (typeCase_ == 15) { - return discoveryBuilder_.getMessage(); - } - return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - public Builder setDiscovery(io.grafeas.v1.DiscoveryNote value) { - if (discoveryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - discoveryBuilder_.setMessage(value); - } - typeCase_ = 15; - return this; - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - public Builder setDiscovery( - io.grafeas.v1.DiscoveryNote.Builder builderForValue) { - if (discoveryBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - discoveryBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 15; - return this; - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - public Builder mergeDiscovery(io.grafeas.v1.DiscoveryNote value) { - if (discoveryBuilder_ == null) { - if (typeCase_ == 15 && - type_ != io.grafeas.v1.DiscoveryNote.getDefaultInstance()) { - type_ = io.grafeas.v1.DiscoveryNote.newBuilder((io.grafeas.v1.DiscoveryNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 15) { - discoveryBuilder_.mergeFrom(value); - } else { - discoveryBuilder_.setMessage(value); - } - } - typeCase_ = 15; - return this; - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - public Builder clearDiscovery() { - if (discoveryBuilder_ == null) { - if (typeCase_ == 15) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 15) { - typeCase_ = 0; - type_ = null; - } - discoveryBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - public io.grafeas.v1.DiscoveryNote.Builder getDiscoveryBuilder() { - return getDiscoveryFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryNoteOrBuilder getDiscoveryOrBuilder() { - if ((typeCase_ == 15) && (discoveryBuilder_ != null)) { - return discoveryBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 15) { - return (io.grafeas.v1.DiscoveryNote) type_; - } - return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryNote, io.grafeas.v1.DiscoveryNote.Builder, io.grafeas.v1.DiscoveryNoteOrBuilder> - getDiscoveryFieldBuilder() { - if (discoveryBuilder_ == null) { - if (!(typeCase_ == 15)) { - type_ = io.grafeas.v1.DiscoveryNote.getDefaultInstance(); - } - discoveryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryNote, io.grafeas.v1.DiscoveryNote.Builder, io.grafeas.v1.DiscoveryNoteOrBuilder>( - (io.grafeas.v1.DiscoveryNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 15; - onChanged(); - return discoveryBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationNote, io.grafeas.v1.AttestationNote.Builder, io.grafeas.v1.AttestationNoteOrBuilder> attestationBuilder_; - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - * @return Whether the attestation field is set. - */ - @java.lang.Override - public boolean hasAttestation() { - return typeCase_ == 16; - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - * @return The attestation. - */ - @java.lang.Override - public io.grafeas.v1.AttestationNote getAttestation() { - if (attestationBuilder_ == null) { - if (typeCase_ == 16) { - return (io.grafeas.v1.AttestationNote) type_; - } - return io.grafeas.v1.AttestationNote.getDefaultInstance(); - } else { - if (typeCase_ == 16) { - return attestationBuilder_.getMessage(); - } - return io.grafeas.v1.AttestationNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - public Builder setAttestation(io.grafeas.v1.AttestationNote value) { - if (attestationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - attestationBuilder_.setMessage(value); - } - typeCase_ = 16; - return this; - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - public Builder setAttestation( - io.grafeas.v1.AttestationNote.Builder builderForValue) { - if (attestationBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - attestationBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 16; - return this; - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - public Builder mergeAttestation(io.grafeas.v1.AttestationNote value) { - if (attestationBuilder_ == null) { - if (typeCase_ == 16 && - type_ != io.grafeas.v1.AttestationNote.getDefaultInstance()) { - type_ = io.grafeas.v1.AttestationNote.newBuilder((io.grafeas.v1.AttestationNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 16) { - attestationBuilder_.mergeFrom(value); - } else { - attestationBuilder_.setMessage(value); - } - } - typeCase_ = 16; - return this; - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - public Builder clearAttestation() { - if (attestationBuilder_ == null) { - if (typeCase_ == 16) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 16) { - typeCase_ = 0; - type_ = null; - } - attestationBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - public io.grafeas.v1.AttestationNote.Builder getAttestationBuilder() { - return getAttestationFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - @java.lang.Override - public io.grafeas.v1.AttestationNoteOrBuilder getAttestationOrBuilder() { - if ((typeCase_ == 16) && (attestationBuilder_ != null)) { - return attestationBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 16) { - return (io.grafeas.v1.AttestationNote) type_; - } - return io.grafeas.v1.AttestationNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationNote, io.grafeas.v1.AttestationNote.Builder, io.grafeas.v1.AttestationNoteOrBuilder> - getAttestationFieldBuilder() { - if (attestationBuilder_ == null) { - if (!(typeCase_ == 16)) { - type_ = io.grafeas.v1.AttestationNote.getDefaultInstance(); - } - attestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationNote, io.grafeas.v1.AttestationNote.Builder, io.grafeas.v1.AttestationNoteOrBuilder>( - (io.grafeas.v1.AttestationNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 16; - onChanged(); - return attestationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeNote, io.grafeas.v1.UpgradeNote.Builder, io.grafeas.v1.UpgradeNoteOrBuilder> upgradeBuilder_; - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - * @return Whether the upgrade field is set. - */ - @java.lang.Override - public boolean hasUpgrade() { - return typeCase_ == 17; - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - * @return The upgrade. - */ - @java.lang.Override - public io.grafeas.v1.UpgradeNote getUpgrade() { - if (upgradeBuilder_ == null) { - if (typeCase_ == 17) { - return (io.grafeas.v1.UpgradeNote) type_; - } - return io.grafeas.v1.UpgradeNote.getDefaultInstance(); - } else { - if (typeCase_ == 17) { - return upgradeBuilder_.getMessage(); - } - return io.grafeas.v1.UpgradeNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - public Builder setUpgrade(io.grafeas.v1.UpgradeNote value) { - if (upgradeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - upgradeBuilder_.setMessage(value); - } - typeCase_ = 17; - return this; - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - public Builder setUpgrade( - io.grafeas.v1.UpgradeNote.Builder builderForValue) { - if (upgradeBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - upgradeBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 17; - return this; - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - public Builder mergeUpgrade(io.grafeas.v1.UpgradeNote value) { - if (upgradeBuilder_ == null) { - if (typeCase_ == 17 && - type_ != io.grafeas.v1.UpgradeNote.getDefaultInstance()) { - type_ = io.grafeas.v1.UpgradeNote.newBuilder((io.grafeas.v1.UpgradeNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 17) { - upgradeBuilder_.mergeFrom(value); - } else { - upgradeBuilder_.setMessage(value); - } - } - typeCase_ = 17; - return this; - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - public Builder clearUpgrade() { - if (upgradeBuilder_ == null) { - if (typeCase_ == 17) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 17) { - typeCase_ = 0; - type_ = null; - } - upgradeBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - public io.grafeas.v1.UpgradeNote.Builder getUpgradeBuilder() { - return getUpgradeFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - @java.lang.Override - public io.grafeas.v1.UpgradeNoteOrBuilder getUpgradeOrBuilder() { - if ((typeCase_ == 17) && (upgradeBuilder_ != null)) { - return upgradeBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 17) { - return (io.grafeas.v1.UpgradeNote) type_; - } - return io.grafeas.v1.UpgradeNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeNote, io.grafeas.v1.UpgradeNote.Builder, io.grafeas.v1.UpgradeNoteOrBuilder> - getUpgradeFieldBuilder() { - if (upgradeBuilder_ == null) { - if (!(typeCase_ == 17)) { - type_ = io.grafeas.v1.UpgradeNote.getDefaultInstance(); - } - upgradeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeNote, io.grafeas.v1.UpgradeNote.Builder, io.grafeas.v1.UpgradeNoteOrBuilder>( - (io.grafeas.v1.UpgradeNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 17; - onChanged(); - return upgradeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceNote, io.grafeas.v1.ComplianceNote.Builder, io.grafeas.v1.ComplianceNoteOrBuilder> complianceBuilder_; - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - * @return Whether the compliance field is set. - */ - @java.lang.Override - public boolean hasCompliance() { - return typeCase_ == 18; - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - * @return The compliance. - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNote getCompliance() { - if (complianceBuilder_ == null) { - if (typeCase_ == 18) { - return (io.grafeas.v1.ComplianceNote) type_; - } - return io.grafeas.v1.ComplianceNote.getDefaultInstance(); - } else { - if (typeCase_ == 18) { - return complianceBuilder_.getMessage(); - } - return io.grafeas.v1.ComplianceNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - public Builder setCompliance(io.grafeas.v1.ComplianceNote value) { - if (complianceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - complianceBuilder_.setMessage(value); - } - typeCase_ = 18; - return this; - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - public Builder setCompliance( - io.grafeas.v1.ComplianceNote.Builder builderForValue) { - if (complianceBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - complianceBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 18; - return this; - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - public Builder mergeCompliance(io.grafeas.v1.ComplianceNote value) { - if (complianceBuilder_ == null) { - if (typeCase_ == 18 && - type_ != io.grafeas.v1.ComplianceNote.getDefaultInstance()) { - type_ = io.grafeas.v1.ComplianceNote.newBuilder((io.grafeas.v1.ComplianceNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 18) { - complianceBuilder_.mergeFrom(value); - } else { - complianceBuilder_.setMessage(value); - } - } - typeCase_ = 18; - return this; - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - public Builder clearCompliance() { - if (complianceBuilder_ == null) { - if (typeCase_ == 18) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 18) { - typeCase_ = 0; - type_ = null; - } - complianceBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - public io.grafeas.v1.ComplianceNote.Builder getComplianceBuilder() { - return getComplianceFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNoteOrBuilder getComplianceOrBuilder() { - if ((typeCase_ == 18) && (complianceBuilder_ != null)) { - return complianceBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 18) { - return (io.grafeas.v1.ComplianceNote) type_; - } - return io.grafeas.v1.ComplianceNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceNote, io.grafeas.v1.ComplianceNote.Builder, io.grafeas.v1.ComplianceNoteOrBuilder> - getComplianceFieldBuilder() { - if (complianceBuilder_ == null) { - if (!(typeCase_ == 18)) { - type_ = io.grafeas.v1.ComplianceNote.getDefaultInstance(); - } - complianceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceNote, io.grafeas.v1.ComplianceNote.Builder, io.grafeas.v1.ComplianceNoteOrBuilder>( - (io.grafeas.v1.ComplianceNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 18; - onChanged(); - return complianceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationNote, io.grafeas.v1.DSSEAttestationNote.Builder, io.grafeas.v1.DSSEAttestationNoteOrBuilder> dsseAttestationBuilder_; - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @return Whether the dsseAttestation field is set. - */ - @java.lang.Override - public boolean hasDsseAttestation() { - return typeCase_ == 19; - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @return The dsseAttestation. - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote getDsseAttestation() { - if (dsseAttestationBuilder_ == null) { - if (typeCase_ == 19) { - return (io.grafeas.v1.DSSEAttestationNote) type_; - } - return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); - } else { - if (typeCase_ == 19) { - return dsseAttestationBuilder_.getMessage(); - } - return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - public Builder setDsseAttestation(io.grafeas.v1.DSSEAttestationNote value) { - if (dsseAttestationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - dsseAttestationBuilder_.setMessage(value); - } - typeCase_ = 19; - return this; - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - public Builder setDsseAttestation( - io.grafeas.v1.DSSEAttestationNote.Builder builderForValue) { - if (dsseAttestationBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - dsseAttestationBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 19; - return this; - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - public Builder mergeDsseAttestation(io.grafeas.v1.DSSEAttestationNote value) { - if (dsseAttestationBuilder_ == null) { - if (typeCase_ == 19 && - type_ != io.grafeas.v1.DSSEAttestationNote.getDefaultInstance()) { - type_ = io.grafeas.v1.DSSEAttestationNote.newBuilder((io.grafeas.v1.DSSEAttestationNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 19) { - dsseAttestationBuilder_.mergeFrom(value); - } else { - dsseAttestationBuilder_.setMessage(value); - } - } - typeCase_ = 19; - return this; - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - public Builder clearDsseAttestation() { - if (dsseAttestationBuilder_ == null) { - if (typeCase_ == 19) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 19) { - typeCase_ = 0; - type_ = null; - } - dsseAttestationBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - public io.grafeas.v1.DSSEAttestationNote.Builder getDsseAttestationBuilder() { - return getDsseAttestationFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder() { - if ((typeCase_ == 19) && (dsseAttestationBuilder_ != null)) { - return dsseAttestationBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 19) { - return (io.grafeas.v1.DSSEAttestationNote) type_; - } - return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationNote, io.grafeas.v1.DSSEAttestationNote.Builder, io.grafeas.v1.DSSEAttestationNoteOrBuilder> - getDsseAttestationFieldBuilder() { - if (dsseAttestationBuilder_ == null) { - if (!(typeCase_ == 19)) { - type_ = io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); - } - dsseAttestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationNote, io.grafeas.v1.DSSEAttestationNote.Builder, io.grafeas.v1.DSSEAttestationNoteOrBuilder>( - (io.grafeas.v1.DSSEAttestationNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 19; - onChanged(); - return dsseAttestationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Note) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Note) - private static final io.grafeas.v1.Note DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Note(); - } - - public static io.grafeas.v1.Note getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Note parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Note getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java deleted file mode 100644 index 45f6d41dacb9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java +++ /dev/null @@ -1,286 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - *
- * Kind represents the kinds of notes supported.
- * 
- * - * Protobuf enum {@code grafeas.v1.NoteKind} - */ -public enum NoteKind - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Default value. This value is unused.
-   * 
- * - * NOTE_KIND_UNSPECIFIED = 0; - */ - NOTE_KIND_UNSPECIFIED(0), - /** - *
-   * The note and occurrence represent a package vulnerability.
-   * 
- * - * VULNERABILITY = 1; - */ - VULNERABILITY(1), - /** - *
-   * The note and occurrence assert build provenance.
-   * 
- * - * BUILD = 2; - */ - BUILD(2), - /** - *
-   * This represents an image basis relationship.
-   * 
- * - * IMAGE = 3; - */ - IMAGE(3), - /** - *
-   * This represents a package installed via a package manager.
-   * 
- * - * PACKAGE = 4; - */ - PACKAGE(4), - /** - *
-   * The note and occurrence track deployment events.
-   * 
- * - * DEPLOYMENT = 5; - */ - DEPLOYMENT(5), - /** - *
-   * The note and occurrence track the initial discovery status of a resource.
-   * 
- * - * DISCOVERY = 6; - */ - DISCOVERY(6), - /** - *
-   * This represents a logical "role" that can attest to artifacts.
-   * 
- * - * ATTESTATION = 7; - */ - ATTESTATION(7), - /** - *
-   * This represents an available package upgrade.
-   * 
- * - * UPGRADE = 8; - */ - UPGRADE(8), - /** - *
-   * This represents a Compliance Note
-   * 
- * - * COMPLIANCE = 9; - */ - COMPLIANCE(9), - /** - *
-   * This represents a DSSE attestation Note
-   * 
- * - * DSSE_ATTESTATION = 10; - */ - DSSE_ATTESTATION(10), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Default value. This value is unused.
-   * 
- * - * NOTE_KIND_UNSPECIFIED = 0; - */ - public static final int NOTE_KIND_UNSPECIFIED_VALUE = 0; - /** - *
-   * The note and occurrence represent a package vulnerability.
-   * 
- * - * VULNERABILITY = 1; - */ - public static final int VULNERABILITY_VALUE = 1; - /** - *
-   * The note and occurrence assert build provenance.
-   * 
- * - * BUILD = 2; - */ - public static final int BUILD_VALUE = 2; - /** - *
-   * This represents an image basis relationship.
-   * 
- * - * IMAGE = 3; - */ - public static final int IMAGE_VALUE = 3; - /** - *
-   * This represents a package installed via a package manager.
-   * 
- * - * PACKAGE = 4; - */ - public static final int PACKAGE_VALUE = 4; - /** - *
-   * The note and occurrence track deployment events.
-   * 
- * - * DEPLOYMENT = 5; - */ - public static final int DEPLOYMENT_VALUE = 5; - /** - *
-   * The note and occurrence track the initial discovery status of a resource.
-   * 
- * - * DISCOVERY = 6; - */ - public static final int DISCOVERY_VALUE = 6; - /** - *
-   * This represents a logical "role" that can attest to artifacts.
-   * 
- * - * ATTESTATION = 7; - */ - public static final int ATTESTATION_VALUE = 7; - /** - *
-   * This represents an available package upgrade.
-   * 
- * - * UPGRADE = 8; - */ - public static final int UPGRADE_VALUE = 8; - /** - *
-   * This represents a Compliance Note
-   * 
- * - * COMPLIANCE = 9; - */ - public static final int COMPLIANCE_VALUE = 9; - /** - *
-   * This represents a DSSE attestation Note
-   * 
- * - * DSSE_ATTESTATION = 10; - */ - public static final int DSSE_ATTESTATION_VALUE = 10; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static NoteKind valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static NoteKind forNumber(int value) { - switch (value) { - case 0: return NOTE_KIND_UNSPECIFIED; - case 1: return VULNERABILITY; - case 2: return BUILD; - case 3: return IMAGE; - case 4: return PACKAGE; - case 5: return DEPLOYMENT; - case 6: return DISCOVERY; - case 7: return ATTESTATION; - case 8: return UPGRADE; - case 9: return COMPLIANCE; - case 10: return DSSE_ATTESTATION; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - NoteKind> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public NoteKind findValueByNumber(int number) { - return NoteKind.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.Common.getDescriptor().getEnumTypes().get(0); - } - - private static final NoteKind[] VALUES = values(); - - public static NoteKind valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private NoteKind(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.NoteKind) -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java deleted file mode 100644 index cc46d3b47ff2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class NoteName implements ResourceName { - private static final PathTemplate PROJECT_NOTE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/notes/{note}"); - private volatile Map fieldValuesMap; - private final String project; - private final String note; - - @Deprecated - protected NoteName() { - project = null; - note = null; - } - - private NoteName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - note = Preconditions.checkNotNull(builder.getNote()); - } - - public String getProject() { - return project; - } - - public String getNote() { - return note; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static NoteName of(String project, String note) { - return newBuilder().setProject(project).setNote(note).build(); - } - - public static String format(String project, String note) { - return newBuilder().setProject(project).setNote(note).build().toString(); - } - - public static NoteName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_NOTE.validatedMatch( - formattedString, "NoteName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("note")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (NoteName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_NOTE.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (note != null) { - fieldMapBuilder.put("note", note); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_NOTE.instantiate("project", project, "note", note); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - NoteName that = ((NoteName) o); - return Objects.equals(this.project, that.project) && Objects.equals(this.note, that.note); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(note); - return h; - } - - /** Builder for projects/{project}/notes/{note}. */ - public static class Builder { - private String project; - private String note; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getNote() { - return note; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setNote(String note) { - this.note = note; - return this; - } - - private Builder(NoteName noteName) { - this.project = noteName.project; - this.note = noteName.note; - } - - public NoteName build() { - return new NoteName(this); - } - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java deleted file mode 100644 index c9978023ec34..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java +++ /dev/null @@ -1,536 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface NoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Note) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Output only. The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Output only. The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * A one sentence description of this note.
-   * 
- * - * string short_description = 2; - * @return The shortDescription. - */ - java.lang.String getShortDescription(); - /** - *
-   * A one sentence description of this note.
-   * 
- * - * string short_description = 2; - * @return The bytes for shortDescription. - */ - com.google.protobuf.ByteString - getShortDescriptionBytes(); - - /** - *
-   * A detailed description of this note.
-   * 
- * - * string long_description = 3; - * @return The longDescription. - */ - java.lang.String getLongDescription(); - /** - *
-   * A detailed description of this note.
-   * 
- * - * string long_description = 3; - * @return The bytes for longDescription. - */ - com.google.protobuf.ByteString - getLongDescriptionBytes(); - - /** - *
-   * Output only. The type of analysis. This field can be used as a filter in
-   * list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - int getKindValue(); - /** - *
-   * Output only. The type of analysis. This field can be used as a filter in
-   * list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The kind. - */ - io.grafeas.v1.NoteKind getKind(); - - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - java.util.List - getRelatedUrlList(); - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - io.grafeas.v1.RelatedUrl getRelatedUrl(int index); - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - int getRelatedUrlCount(); - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - java.util.List - getRelatedUrlOrBuilderList(); - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlOrBuilder( - int index); - - /** - *
-   * Time of expiration for this note. Empty if note does not expire.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - * @return Whether the expirationTime field is set. - */ - boolean hasExpirationTime(); - /** - *
-   * Time of expiration for this note. Empty if note does not expire.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - * @return The expirationTime. - */ - com.google.protobuf.Timestamp getExpirationTime(); - /** - *
-   * Time of expiration for this note. Empty if note does not expire.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder(); - - /** - *
-   * Output only. The time this note was created. This field can be used as a
-   * filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The time this note was created. This field can be used as a
-   * filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The time this note was created. This field can be used as a
-   * filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. The time this note was last updated. This field can be used as
-   * a filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * Output only. The time this note was last updated. This field can be used as
-   * a filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * Output only. The time this note was last updated. This field can be used as
-   * a filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @return A list containing the relatedNoteNames. - */ - java.util.List - getRelatedNoteNamesList(); - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @return The count of relatedNoteNames. - */ - int getRelatedNoteNamesCount(); - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @param index The index of the element to return. - * @return The relatedNoteNames at the given index. - */ - java.lang.String getRelatedNoteNames(int index); - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @param index The index of the value to return. - * @return The bytes of the relatedNoteNames at the given index. - */ - com.google.protobuf.ByteString - getRelatedNoteNamesBytes(int index); - - /** - *
-   * A note describing a package vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @return Whether the vulnerability field is set. - */ - boolean hasVulnerability(); - /** - *
-   * A note describing a package vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @return The vulnerability. - */ - io.grafeas.v1.VulnerabilityNote getVulnerability(); - /** - *
-   * A note describing a package vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - io.grafeas.v1.VulnerabilityNoteOrBuilder getVulnerabilityOrBuilder(); - - /** - *
-   * A note describing build provenance for a verifiable build.
-   * 
- * - * .grafeas.v1.BuildNote build = 11; - * @return Whether the build field is set. - */ - boolean hasBuild(); - /** - *
-   * A note describing build provenance for a verifiable build.
-   * 
- * - * .grafeas.v1.BuildNote build = 11; - * @return The build. - */ - io.grafeas.v1.BuildNote getBuild(); - /** - *
-   * A note describing build provenance for a verifiable build.
-   * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - io.grafeas.v1.BuildNoteOrBuilder getBuildOrBuilder(); - - /** - *
-   * A note describing a base image.
-   * 
- * - * .grafeas.v1.ImageNote image = 12; - * @return Whether the image field is set. - */ - boolean hasImage(); - /** - *
-   * A note describing a base image.
-   * 
- * - * .grafeas.v1.ImageNote image = 12; - * @return The image. - */ - io.grafeas.v1.ImageNote getImage(); - /** - *
-   * A note describing a base image.
-   * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - io.grafeas.v1.ImageNoteOrBuilder getImageOrBuilder(); - - /** - *
-   * A note describing a package hosted by various package managers.
-   * 
- * - * .grafeas.v1.PackageNote package = 13; - * @return Whether the package field is set. - */ - boolean hasPackage(); - /** - *
-   * A note describing a package hosted by various package managers.
-   * 
- * - * .grafeas.v1.PackageNote package = 13; - * @return The package. - */ - io.grafeas.v1.PackageNote getPackage(); - /** - *
-   * A note describing a package hosted by various package managers.
-   * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - io.grafeas.v1.PackageNoteOrBuilder getPackageOrBuilder(); - - /** - *
-   * A note describing something that can be deployed.
-   * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - * @return Whether the deployment field is set. - */ - boolean hasDeployment(); - /** - *
-   * A note describing something that can be deployed.
-   * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - * @return The deployment. - */ - io.grafeas.v1.DeploymentNote getDeployment(); - /** - *
-   * A note describing something that can be deployed.
-   * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - io.grafeas.v1.DeploymentNoteOrBuilder getDeploymentOrBuilder(); - - /** - *
-   * A note describing the initial analysis of a resource.
-   * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - * @return Whether the discovery field is set. - */ - boolean hasDiscovery(); - /** - *
-   * A note describing the initial analysis of a resource.
-   * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - * @return The discovery. - */ - io.grafeas.v1.DiscoveryNote getDiscovery(); - /** - *
-   * A note describing the initial analysis of a resource.
-   * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - io.grafeas.v1.DiscoveryNoteOrBuilder getDiscoveryOrBuilder(); - - /** - *
-   * A note describing an attestation role.
-   * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - * @return Whether the attestation field is set. - */ - boolean hasAttestation(); - /** - *
-   * A note describing an attestation role.
-   * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - * @return The attestation. - */ - io.grafeas.v1.AttestationNote getAttestation(); - /** - *
-   * A note describing an attestation role.
-   * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - io.grafeas.v1.AttestationNoteOrBuilder getAttestationOrBuilder(); - - /** - *
-   * A note describing available package upgrades.
-   * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - * @return Whether the upgrade field is set. - */ - boolean hasUpgrade(); - /** - *
-   * A note describing available package upgrades.
-   * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - * @return The upgrade. - */ - io.grafeas.v1.UpgradeNote getUpgrade(); - /** - *
-   * A note describing available package upgrades.
-   * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - io.grafeas.v1.UpgradeNoteOrBuilder getUpgradeOrBuilder(); - - /** - *
-   * A note describing a compliance check.
-   * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - * @return Whether the compliance field is set. - */ - boolean hasCompliance(); - /** - *
-   * A note describing a compliance check.
-   * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - * @return The compliance. - */ - io.grafeas.v1.ComplianceNote getCompliance(); - /** - *
-   * A note describing a compliance check.
-   * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - io.grafeas.v1.ComplianceNoteOrBuilder getComplianceOrBuilder(); - - /** - *
-   * A note describing a dsse attestation note.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @return Whether the dsseAttestation field is set. - */ - boolean hasDsseAttestation(); - /** - *
-   * A note describing a dsse attestation note.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @return The dsseAttestation. - */ - io.grafeas.v1.DSSEAttestationNote getDsseAttestation(); - /** - *
-   * A note describing a dsse attestation note.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder(); - - public io.grafeas.v1.Note.TypeCase getTypeCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java deleted file mode 100644 index bc2470a2d0cf..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java +++ /dev/null @@ -1,4569 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * An instance of an analysis type that has been found on a resource.
- * 
- * - * Protobuf type {@code grafeas.v1.Occurrence} - */ -public final class Occurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Occurrence) - OccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use Occurrence.newBuilder() to construct. - private Occurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Occurrence() { - name_ = ""; - resourceUri_ = ""; - noteName_ = ""; - kind_ = 0; - remediation_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Occurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Occurrence.class, io.grafeas.v1.Occurrence.Builder.class); - } - - private int detailsCase_ = 0; - private java.lang.Object details_; - public enum DetailsCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VULNERABILITY(8), - BUILD(9), - IMAGE(10), - PACKAGE(11), - DEPLOYMENT(12), - DISCOVERY(13), - ATTESTATION(14), - UPGRADE(15), - COMPLIANCE(16), - DSSE_ATTESTATION(17), - DETAILS_NOT_SET(0); - private final int value; - private DetailsCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DetailsCase valueOf(int value) { - return forNumber(value); - } - - public static DetailsCase forNumber(int value) { - switch (value) { - case 8: return VULNERABILITY; - case 9: return BUILD; - case 10: return IMAGE; - case 11: return PACKAGE; - case 12: return DEPLOYMENT; - case 13: return DISCOVERY; - case 14: return ATTESTATION; - case 15: return UPGRADE; - case 16: return COMPLIANCE; - case 17: return DSSE_ATTESTATION; - case 0: return DETAILS_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public DetailsCase - getDetailsCase() { - return DetailsCase.forNumber( - detailsCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * Output only. The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Output only. The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_URI_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object resourceUri_ = ""; - /** - *
-   * Required. Immutable. A URI that represents the resource for which the
-   * occurrence applies. For example,
-   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-   * 
- * - * string resource_uri = 2; - * @return The resourceUri. - */ - @java.lang.Override - public java.lang.String getResourceUri() { - java.lang.Object ref = resourceUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUri_ = s; - return s; - } - } - /** - *
-   * Required. Immutable. A URI that represents the resource for which the
-   * occurrence applies. For example,
-   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-   * 
- * - * string resource_uri = 2; - * @return The bytes for resourceUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceUriBytes() { - java.lang.Object ref = resourceUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NOTE_NAME_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object noteName_ = ""; - /** - *
-   * Required. Immutable. The analysis note associated with this occurrence, in
-   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-   * used as a filter in list requests.
-   * 
- * - * string note_name = 3; - * @return The noteName. - */ - @java.lang.Override - public java.lang.String getNoteName() { - java.lang.Object ref = noteName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - noteName_ = s; - return s; - } - } - /** - *
-   * Required. Immutable. The analysis note associated with this occurrence, in
-   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-   * used as a filter in list requests.
-   * 
- * - * string note_name = 3; - * @return The bytes for noteName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNoteNameBytes() { - java.lang.Object ref = noteName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - noteName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KIND_FIELD_NUMBER = 4; - private int kind_ = 0; - /** - *
-   * Output only. This explicitly denotes which of the occurrence details are
-   * specified. This field can be used as a filter in list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-   * Output only. This explicitly denotes which of the occurrence details are
-   * specified. This field can be used as a filter in list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The kind. - */ - @java.lang.Override public io.grafeas.v1.NoteKind getKind() { - io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); - return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; - } - - public static final int REMEDIATION_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object remediation_ = ""; - /** - *
-   * A description of actions that can be taken to remedy the note.
-   * 
- * - * string remediation = 5; - * @return The remediation. - */ - @java.lang.Override - public java.lang.String getRemediation() { - java.lang.Object ref = remediation_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - remediation_ = s; - return s; - } - } - /** - *
-   * A description of actions that can be taken to remedy the note.
-   * 
- * - * string remediation = 5; - * @return The bytes for remediation. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRemediationBytes() { - java.lang.Object ref = remediation_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - remediation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The time this occurrence was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The time this occurrence was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The time this occurrence was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * Output only. The time this occurrence was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * Output only. The time this occurrence was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * Output only. The time this occurrence was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int VULNERABILITY_FIELD_NUMBER = 8; - /** - *
-   * Describes a security vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @return Whether the vulnerability field is set. - */ - @java.lang.Override - public boolean hasVulnerability() { - return detailsCase_ == 8; - } - /** - *
-   * Describes a security vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @return The vulnerability. - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence getVulnerability() { - if (detailsCase_ == 8) { - return (io.grafeas.v1.VulnerabilityOccurrence) details_; - } - return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes a security vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrenceOrBuilder getVulnerabilityOrBuilder() { - if (detailsCase_ == 8) { - return (io.grafeas.v1.VulnerabilityOccurrence) details_; - } - return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); - } - - public static final int BUILD_FIELD_NUMBER = 9; - /** - *
-   * Describes a verifiable build.
-   * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - * @return Whether the build field is set. - */ - @java.lang.Override - public boolean hasBuild() { - return detailsCase_ == 9; - } - /** - *
-   * Describes a verifiable build.
-   * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - * @return The build. - */ - @java.lang.Override - public io.grafeas.v1.BuildOccurrence getBuild() { - if (detailsCase_ == 9) { - return (io.grafeas.v1.BuildOccurrence) details_; - } - return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes a verifiable build.
-   * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - @java.lang.Override - public io.grafeas.v1.BuildOccurrenceOrBuilder getBuildOrBuilder() { - if (detailsCase_ == 9) { - return (io.grafeas.v1.BuildOccurrence) details_; - } - return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); - } - - public static final int IMAGE_FIELD_NUMBER = 10; - /** - *
-   * Describes how this resource derives from the basis in the associated
-   * note.
-   * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - * @return Whether the image field is set. - */ - @java.lang.Override - public boolean hasImage() { - return detailsCase_ == 10; - } - /** - *
-   * Describes how this resource derives from the basis in the associated
-   * note.
-   * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - * @return The image. - */ - @java.lang.Override - public io.grafeas.v1.ImageOccurrence getImage() { - if (detailsCase_ == 10) { - return (io.grafeas.v1.ImageOccurrence) details_; - } - return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes how this resource derives from the basis in the associated
-   * note.
-   * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - @java.lang.Override - public io.grafeas.v1.ImageOccurrenceOrBuilder getImageOrBuilder() { - if (detailsCase_ == 10) { - return (io.grafeas.v1.ImageOccurrence) details_; - } - return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); - } - - public static final int PACKAGE_FIELD_NUMBER = 11; - /** - *
-   * Describes the installation of a package on the linked resource.
-   * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - * @return Whether the package field is set. - */ - @java.lang.Override - public boolean hasPackage() { - return detailsCase_ == 11; - } - /** - *
-   * Describes the installation of a package on the linked resource.
-   * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - * @return The package. - */ - @java.lang.Override - public io.grafeas.v1.PackageOccurrence getPackage() { - if (detailsCase_ == 11) { - return (io.grafeas.v1.PackageOccurrence) details_; - } - return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes the installation of a package on the linked resource.
-   * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - @java.lang.Override - public io.grafeas.v1.PackageOccurrenceOrBuilder getPackageOrBuilder() { - if (detailsCase_ == 11) { - return (io.grafeas.v1.PackageOccurrence) details_; - } - return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); - } - - public static final int DEPLOYMENT_FIELD_NUMBER = 12; - /** - *
-   * Describes the deployment of an artifact on a runtime.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - * @return Whether the deployment field is set. - */ - @java.lang.Override - public boolean hasDeployment() { - return detailsCase_ == 12; - } - /** - *
-   * Describes the deployment of an artifact on a runtime.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - * @return The deployment. - */ - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrence getDeployment() { - if (detailsCase_ == 12) { - return (io.grafeas.v1.DeploymentOccurrence) details_; - } - return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes the deployment of an artifact on a runtime.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrenceOrBuilder getDeploymentOrBuilder() { - if (detailsCase_ == 12) { - return (io.grafeas.v1.DeploymentOccurrence) details_; - } - return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); - } - - public static final int DISCOVERY_FIELD_NUMBER = 13; - /** - *
-   * Describes when a resource was discovered.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @return Whether the discovery field is set. - */ - @java.lang.Override - public boolean hasDiscovery() { - return detailsCase_ == 13; - } - /** - *
-   * Describes when a resource was discovered.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @return The discovery. - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence getDiscovery() { - if (detailsCase_ == 13) { - return (io.grafeas.v1.DiscoveryOccurrence) details_; - } - return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes when a resource was discovered.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrenceOrBuilder getDiscoveryOrBuilder() { - if (detailsCase_ == 13) { - return (io.grafeas.v1.DiscoveryOccurrence) details_; - } - return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); - } - - public static final int ATTESTATION_FIELD_NUMBER = 14; - /** - *
-   * Describes an attestation of an artifact.
-   * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - * @return Whether the attestation field is set. - */ - @java.lang.Override - public boolean hasAttestation() { - return detailsCase_ == 14; - } - /** - *
-   * Describes an attestation of an artifact.
-   * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - * @return The attestation. - */ - @java.lang.Override - public io.grafeas.v1.AttestationOccurrence getAttestation() { - if (detailsCase_ == 14) { - return (io.grafeas.v1.AttestationOccurrence) details_; - } - return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes an attestation of an artifact.
-   * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - @java.lang.Override - public io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder() { - if (detailsCase_ == 14) { - return (io.grafeas.v1.AttestationOccurrence) details_; - } - return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); - } - - public static final int UPGRADE_FIELD_NUMBER = 15; - /** - *
-   * Describes an available package upgrade on the linked resource.
-   * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @return Whether the upgrade field is set. - */ - @java.lang.Override - public boolean hasUpgrade() { - return detailsCase_ == 15; - } - /** - *
-   * Describes an available package upgrade on the linked resource.
-   * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @return The upgrade. - */ - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrence getUpgrade() { - if (detailsCase_ == 15) { - return (io.grafeas.v1.UpgradeOccurrence) details_; - } - return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes an available package upgrade on the linked resource.
-   * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrenceOrBuilder getUpgradeOrBuilder() { - if (detailsCase_ == 15) { - return (io.grafeas.v1.UpgradeOccurrence) details_; - } - return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); - } - - public static final int COMPLIANCE_FIELD_NUMBER = 16; - /** - *
-   * Describes a compliance violation on a linked resource.
-   * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - * @return Whether the compliance field is set. - */ - @java.lang.Override - public boolean hasCompliance() { - return detailsCase_ == 16; - } - /** - *
-   * Describes a compliance violation on a linked resource.
-   * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - * @return The compliance. - */ - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrence getCompliance() { - if (detailsCase_ == 16) { - return (io.grafeas.v1.ComplianceOccurrence) details_; - } - return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes a compliance violation on a linked resource.
-   * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrenceOrBuilder getComplianceOrBuilder() { - if (detailsCase_ == 16) { - return (io.grafeas.v1.ComplianceOccurrence) details_; - } - return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); - } - - public static final int DSSE_ATTESTATION_FIELD_NUMBER = 17; - /** - *
-   * Describes an attestation of an artifact using dsse.
-   * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @return Whether the dsseAttestation field is set. - */ - @java.lang.Override - public boolean hasDsseAttestation() { - return detailsCase_ == 17; - } - /** - *
-   * Describes an attestation of an artifact using dsse.
-   * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @return The dsseAttestation. - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrence getDsseAttestation() { - if (detailsCase_ == 17) { - return (io.grafeas.v1.DSSEAttestationOccurrence) details_; - } - return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes an attestation of an artifact using dsse.
-   * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder getDsseAttestationOrBuilder() { - if (detailsCase_ == 17) { - return (io.grafeas.v1.DSSEAttestationOccurrence) details_; - } - return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); - } - - public static final int ENVELOPE_FIELD_NUMBER = 18; - private io.grafeas.v1.Envelope envelope_; - /** - *
-   * https://github.com/secure-systems-lab/dsse
-   * 
- * - * .grafeas.v1.Envelope envelope = 18; - * @return Whether the envelope field is set. - */ - @java.lang.Override - public boolean hasEnvelope() { - return envelope_ != null; - } - /** - *
-   * https://github.com/secure-systems-lab/dsse
-   * 
- * - * .grafeas.v1.Envelope envelope = 18; - * @return The envelope. - */ - @java.lang.Override - public io.grafeas.v1.Envelope getEnvelope() { - return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } - /** - *
-   * https://github.com/secure-systems-lab/dsse
-   * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - @java.lang.Override - public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { - return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, noteName_); - } - if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { - output.writeEnum(4, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remediation_); - } - if (createTime_ != null) { - output.writeMessage(6, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(7, getUpdateTime()); - } - if (detailsCase_ == 8) { - output.writeMessage(8, (io.grafeas.v1.VulnerabilityOccurrence) details_); - } - if (detailsCase_ == 9) { - output.writeMessage(9, (io.grafeas.v1.BuildOccurrence) details_); - } - if (detailsCase_ == 10) { - output.writeMessage(10, (io.grafeas.v1.ImageOccurrence) details_); - } - if (detailsCase_ == 11) { - output.writeMessage(11, (io.grafeas.v1.PackageOccurrence) details_); - } - if (detailsCase_ == 12) { - output.writeMessage(12, (io.grafeas.v1.DeploymentOccurrence) details_); - } - if (detailsCase_ == 13) { - output.writeMessage(13, (io.grafeas.v1.DiscoveryOccurrence) details_); - } - if (detailsCase_ == 14) { - output.writeMessage(14, (io.grafeas.v1.AttestationOccurrence) details_); - } - if (detailsCase_ == 15) { - output.writeMessage(15, (io.grafeas.v1.UpgradeOccurrence) details_); - } - if (detailsCase_ == 16) { - output.writeMessage(16, (io.grafeas.v1.ComplianceOccurrence) details_); - } - if (detailsCase_ == 17) { - output.writeMessage(17, (io.grafeas.v1.DSSEAttestationOccurrence) details_); - } - if (envelope_ != null) { - output.writeMessage(18, getEnvelope()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, noteName_); - } - if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remediation_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getUpdateTime()); - } - if (detailsCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, (io.grafeas.v1.VulnerabilityOccurrence) details_); - } - if (detailsCase_ == 9) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, (io.grafeas.v1.BuildOccurrence) details_); - } - if (detailsCase_ == 10) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, (io.grafeas.v1.ImageOccurrence) details_); - } - if (detailsCase_ == 11) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, (io.grafeas.v1.PackageOccurrence) details_); - } - if (detailsCase_ == 12) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, (io.grafeas.v1.DeploymentOccurrence) details_); - } - if (detailsCase_ == 13) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, (io.grafeas.v1.DiscoveryOccurrence) details_); - } - if (detailsCase_ == 14) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, (io.grafeas.v1.AttestationOccurrence) details_); - } - if (detailsCase_ == 15) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(15, (io.grafeas.v1.UpgradeOccurrence) details_); - } - if (detailsCase_ == 16) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(16, (io.grafeas.v1.ComplianceOccurrence) details_); - } - if (detailsCase_ == 17) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(17, (io.grafeas.v1.DSSEAttestationOccurrence) details_); - } - if (envelope_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(18, getEnvelope()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Occurrence)) { - return super.equals(obj); - } - io.grafeas.v1.Occurrence other = (io.grafeas.v1.Occurrence) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getResourceUri() - .equals(other.getResourceUri())) return false; - if (!getNoteName() - .equals(other.getNoteName())) return false; - if (kind_ != other.kind_) return false; - if (!getRemediation() - .equals(other.getRemediation())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (hasEnvelope() != other.hasEnvelope()) return false; - if (hasEnvelope()) { - if (!getEnvelope() - .equals(other.getEnvelope())) return false; - } - if (!getDetailsCase().equals(other.getDetailsCase())) return false; - switch (detailsCase_) { - case 8: - if (!getVulnerability() - .equals(other.getVulnerability())) return false; - break; - case 9: - if (!getBuild() - .equals(other.getBuild())) return false; - break; - case 10: - if (!getImage() - .equals(other.getImage())) return false; - break; - case 11: - if (!getPackage() - .equals(other.getPackage())) return false; - break; - case 12: - if (!getDeployment() - .equals(other.getDeployment())) return false; - break; - case 13: - if (!getDiscovery() - .equals(other.getDiscovery())) return false; - break; - case 14: - if (!getAttestation() - .equals(other.getAttestation())) return false; - break; - case 15: - if (!getUpgrade() - .equals(other.getUpgrade())) return false; - break; - case 16: - if (!getCompliance() - .equals(other.getCompliance())) return false; - break; - case 17: - if (!getDsseAttestation() - .equals(other.getDsseAttestation())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; - hash = (53 * hash) + getResourceUri().hashCode(); - hash = (37 * hash) + NOTE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getNoteName().hashCode(); - hash = (37 * hash) + KIND_FIELD_NUMBER; - hash = (53 * hash) + kind_; - hash = (37 * hash) + REMEDIATION_FIELD_NUMBER; - hash = (53 * hash) + getRemediation().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (hasEnvelope()) { - hash = (37 * hash) + ENVELOPE_FIELD_NUMBER; - hash = (53 * hash) + getEnvelope().hashCode(); - } - switch (detailsCase_) { - case 8: - hash = (37 * hash) + VULNERABILITY_FIELD_NUMBER; - hash = (53 * hash) + getVulnerability().hashCode(); - break; - case 9: - hash = (37 * hash) + BUILD_FIELD_NUMBER; - hash = (53 * hash) + getBuild().hashCode(); - break; - case 10: - hash = (37 * hash) + IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getImage().hashCode(); - break; - case 11: - hash = (37 * hash) + PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getPackage().hashCode(); - break; - case 12: - hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER; - hash = (53 * hash) + getDeployment().hashCode(); - break; - case 13: - hash = (37 * hash) + DISCOVERY_FIELD_NUMBER; - hash = (53 * hash) + getDiscovery().hashCode(); - break; - case 14: - hash = (37 * hash) + ATTESTATION_FIELD_NUMBER; - hash = (53 * hash) + getAttestation().hashCode(); - break; - case 15: - hash = (37 * hash) + UPGRADE_FIELD_NUMBER; - hash = (53 * hash) + getUpgrade().hashCode(); - break; - case 16: - hash = (37 * hash) + COMPLIANCE_FIELD_NUMBER; - hash = (53 * hash) + getCompliance().hashCode(); - break; - case 17: - hash = (37 * hash) + DSSE_ATTESTATION_FIELD_NUMBER; - hash = (53 * hash) + getDsseAttestation().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Occurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Occurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Occurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Occurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Occurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Occurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Occurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Occurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Occurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Occurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Occurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Occurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Occurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An instance of an analysis type that has been found on a resource.
-   * 
- * - * Protobuf type {@code grafeas.v1.Occurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Occurrence) - io.grafeas.v1.OccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Occurrence.class, io.grafeas.v1.Occurrence.Builder.class); - } - - // Construct using io.grafeas.v1.Occurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - resourceUri_ = ""; - noteName_ = ""; - kind_ = 0; - remediation_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - if (vulnerabilityBuilder_ != null) { - vulnerabilityBuilder_.clear(); - } - if (buildBuilder_ != null) { - buildBuilder_.clear(); - } - if (imageBuilder_ != null) { - imageBuilder_.clear(); - } - if (packageBuilder_ != null) { - packageBuilder_.clear(); - } - if (deploymentBuilder_ != null) { - deploymentBuilder_.clear(); - } - if (discoveryBuilder_ != null) { - discoveryBuilder_.clear(); - } - if (attestationBuilder_ != null) { - attestationBuilder_.clear(); - } - if (upgradeBuilder_ != null) { - upgradeBuilder_.clear(); - } - if (complianceBuilder_ != null) { - complianceBuilder_.clear(); - } - if (dsseAttestationBuilder_ != null) { - dsseAttestationBuilder_.clear(); - } - envelope_ = null; - if (envelopeBuilder_ != null) { - envelopeBuilder_.dispose(); - envelopeBuilder_ = null; - } - detailsCase_ = 0; - details_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Occurrence getDefaultInstanceForType() { - return io.grafeas.v1.Occurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Occurrence build() { - io.grafeas.v1.Occurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Occurrence buildPartial() { - io.grafeas.v1.Occurrence result = new io.grafeas.v1.Occurrence(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Occurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.resourceUri_ = resourceUri_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.noteName_ = noteName_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.kind_ = kind_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.remediation_ = remediation_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.createTime_ = createTimeBuilder_ == null - ? createTime_ - : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null - ? updateTime_ - : updateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00020000) != 0)) { - result.envelope_ = envelopeBuilder_ == null - ? envelope_ - : envelopeBuilder_.build(); - } - } - - private void buildPartialOneofs(io.grafeas.v1.Occurrence result) { - result.detailsCase_ = detailsCase_; - result.details_ = this.details_; - if (detailsCase_ == 8 && - vulnerabilityBuilder_ != null) { - result.details_ = vulnerabilityBuilder_.build(); - } - if (detailsCase_ == 9 && - buildBuilder_ != null) { - result.details_ = buildBuilder_.build(); - } - if (detailsCase_ == 10 && - imageBuilder_ != null) { - result.details_ = imageBuilder_.build(); - } - if (detailsCase_ == 11 && - packageBuilder_ != null) { - result.details_ = packageBuilder_.build(); - } - if (detailsCase_ == 12 && - deploymentBuilder_ != null) { - result.details_ = deploymentBuilder_.build(); - } - if (detailsCase_ == 13 && - discoveryBuilder_ != null) { - result.details_ = discoveryBuilder_.build(); - } - if (detailsCase_ == 14 && - attestationBuilder_ != null) { - result.details_ = attestationBuilder_.build(); - } - if (detailsCase_ == 15 && - upgradeBuilder_ != null) { - result.details_ = upgradeBuilder_.build(); - } - if (detailsCase_ == 16 && - complianceBuilder_ != null) { - result.details_ = complianceBuilder_.build(); - } - if (detailsCase_ == 17 && - dsseAttestationBuilder_ != null) { - result.details_ = dsseAttestationBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Occurrence) { - return mergeFrom((io.grafeas.v1.Occurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Occurrence other) { - if (other == io.grafeas.v1.Occurrence.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getResourceUri().isEmpty()) { - resourceUri_ = other.resourceUri_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getNoteName().isEmpty()) { - noteName_ = other.noteName_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.kind_ != 0) { - setKindValue(other.getKindValue()); - } - if (!other.getRemediation().isEmpty()) { - remediation_ = other.remediation_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasEnvelope()) { - mergeEnvelope(other.getEnvelope()); - } - switch (other.getDetailsCase()) { - case VULNERABILITY: { - mergeVulnerability(other.getVulnerability()); - break; - } - case BUILD: { - mergeBuild(other.getBuild()); - break; - } - case IMAGE: { - mergeImage(other.getImage()); - break; - } - case PACKAGE: { - mergePackage(other.getPackage()); - break; - } - case DEPLOYMENT: { - mergeDeployment(other.getDeployment()); - break; - } - case DISCOVERY: { - mergeDiscovery(other.getDiscovery()); - break; - } - case ATTESTATION: { - mergeAttestation(other.getAttestation()); - break; - } - case UPGRADE: { - mergeUpgrade(other.getUpgrade()); - break; - } - case COMPLIANCE: { - mergeCompliance(other.getCompliance()); - break; - } - case DSSE_ATTESTATION: { - mergeDsseAttestation(other.getDsseAttestation()); - break; - } - case DETAILS_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - resourceUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - noteName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: { - kind_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: { - remediation_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - input.readMessage( - getCreateTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - input.readMessage( - getUpdateTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: { - input.readMessage( - getVulnerabilityFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 8; - break; - } // case 66 - case 74: { - input.readMessage( - getBuildFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 9; - break; - } // case 74 - case 82: { - input.readMessage( - getImageFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 10; - break; - } // case 82 - case 90: { - input.readMessage( - getPackageFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 11; - break; - } // case 90 - case 98: { - input.readMessage( - getDeploymentFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 12; - break; - } // case 98 - case 106: { - input.readMessage( - getDiscoveryFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 13; - break; - } // case 106 - case 114: { - input.readMessage( - getAttestationFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 14; - break; - } // case 114 - case 122: { - input.readMessage( - getUpgradeFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 15; - break; - } // case 122 - case 130: { - input.readMessage( - getComplianceFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 16; - break; - } // case 130 - case 138: { - input.readMessage( - getDsseAttestationFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 17; - break; - } // case 138 - case 146: { - input.readMessage( - getEnvelopeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00020000; - break; - } // case 146 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int detailsCase_ = 0; - private java.lang.Object details_; - public DetailsCase - getDetailsCase() { - return DetailsCase.forNumber( - detailsCase_); - } - - public Builder clearDetails() { - detailsCase_ = 0; - details_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Output only. The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Output only. The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Output only. The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object resourceUri_ = ""; - /** - *
-     * Required. Immutable. A URI that represents the resource for which the
-     * occurrence applies. For example,
-     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-     * 
- * - * string resource_uri = 2; - * @return The resourceUri. - */ - public java.lang.String getResourceUri() { - java.lang.Object ref = resourceUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Immutable. A URI that represents the resource for which the
-     * occurrence applies. For example,
-     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-     * 
- * - * string resource_uri = 2; - * @return The bytes for resourceUri. - */ - public com.google.protobuf.ByteString - getResourceUriBytes() { - java.lang.Object ref = resourceUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Immutable. A URI that represents the resource for which the
-     * occurrence applies. For example,
-     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-     * 
- * - * string resource_uri = 2; - * @param value The resourceUri to set. - * @return This builder for chaining. - */ - public Builder setResourceUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - resourceUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. A URI that represents the resource for which the
-     * occurrence applies. For example,
-     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-     * 
- * - * string resource_uri = 2; - * @return This builder for chaining. - */ - public Builder clearResourceUri() { - resourceUri_ = getDefaultInstance().getResourceUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. A URI that represents the resource for which the
-     * occurrence applies. For example,
-     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-     * 
- * - * string resource_uri = 2; - * @param value The bytes for resourceUri to set. - * @return This builder for chaining. - */ - public Builder setResourceUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - resourceUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object noteName_ = ""; - /** - *
-     * Required. Immutable. The analysis note associated with this occurrence, in
-     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-     * used as a filter in list requests.
-     * 
- * - * string note_name = 3; - * @return The noteName. - */ - public java.lang.String getNoteName() { - java.lang.Object ref = noteName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - noteName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Immutable. The analysis note associated with this occurrence, in
-     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-     * used as a filter in list requests.
-     * 
- * - * string note_name = 3; - * @return The bytes for noteName. - */ - public com.google.protobuf.ByteString - getNoteNameBytes() { - java.lang.Object ref = noteName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - noteName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Immutable. The analysis note associated with this occurrence, in
-     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-     * used as a filter in list requests.
-     * 
- * - * string note_name = 3; - * @param value The noteName to set. - * @return This builder for chaining. - */ - public Builder setNoteName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - noteName_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The analysis note associated with this occurrence, in
-     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-     * used as a filter in list requests.
-     * 
- * - * string note_name = 3; - * @return This builder for chaining. - */ - public Builder clearNoteName() { - noteName_ = getDefaultInstance().getNoteName(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The analysis note associated with this occurrence, in
-     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-     * used as a filter in list requests.
-     * 
- * - * string note_name = 3; - * @param value The bytes for noteName to set. - * @return This builder for chaining. - */ - public Builder setNoteNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - noteName_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private int kind_ = 0; - /** - *
-     * Output only. This explicitly denotes which of the occurrence details are
-     * specified. This field can be used as a filter in list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-     * Output only. This explicitly denotes which of the occurrence details are
-     * specified. This field can be used as a filter in list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @param value The enum numeric value on the wire for kind to set. - * @return This builder for chaining. - */ - public Builder setKindValue(int value) { - kind_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Output only. This explicitly denotes which of the occurrence details are
-     * specified. This field can be used as a filter in list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The kind. - */ - @java.lang.Override - public io.grafeas.v1.NoteKind getKind() { - io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); - return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; - } - /** - *
-     * Output only. This explicitly denotes which of the occurrence details are
-     * specified. This field can be used as a filter in list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @param value The kind to set. - * @return This builder for chaining. - */ - public Builder setKind(io.grafeas.v1.NoteKind value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - kind_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. This explicitly denotes which of the occurrence details are
-     * specified. This field can be used as a filter in list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return This builder for chaining. - */ - public Builder clearKind() { - bitField0_ = (bitField0_ & ~0x00000008); - kind_ = 0; - onChanged(); - return this; - } - - private java.lang.Object remediation_ = ""; - /** - *
-     * A description of actions that can be taken to remedy the note.
-     * 
- * - * string remediation = 5; - * @return The remediation. - */ - public java.lang.String getRemediation() { - java.lang.Object ref = remediation_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - remediation_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A description of actions that can be taken to remedy the note.
-     * 
- * - * string remediation = 5; - * @return The bytes for remediation. - */ - public com.google.protobuf.ByteString - getRemediationBytes() { - java.lang.Object ref = remediation_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - remediation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A description of actions that can be taken to remedy the note.
-     * 
- * - * string remediation = 5; - * @param value The remediation to set. - * @return This builder for chaining. - */ - public Builder setRemediation( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - remediation_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * A description of actions that can be taken to remedy the note.
-     * 
- * - * string remediation = 5; - * @return This builder for chaining. - */ - public Builder clearRemediation() { - remediation_ = getDefaultInstance().getRemediation(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * A description of actions that can be taken to remedy the note.
-     * 
- * - * string remediation = 5; - * @param value The bytes for remediation to set. - * @return This builder for chaining. - */ - public Builder setRemediationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - remediation_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - createTime_ != null && - createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000020); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - updateTime_ != null && - updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000040); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityOccurrence, io.grafeas.v1.VulnerabilityOccurrence.Builder, io.grafeas.v1.VulnerabilityOccurrenceOrBuilder> vulnerabilityBuilder_; - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @return Whether the vulnerability field is set. - */ - @java.lang.Override - public boolean hasVulnerability() { - return detailsCase_ == 8; - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @return The vulnerability. - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence getVulnerability() { - if (vulnerabilityBuilder_ == null) { - if (detailsCase_ == 8) { - return (io.grafeas.v1.VulnerabilityOccurrence) details_; - } - return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 8) { - return vulnerabilityBuilder_.getMessage(); - } - return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - public Builder setVulnerability(io.grafeas.v1.VulnerabilityOccurrence value) { - if (vulnerabilityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - vulnerabilityBuilder_.setMessage(value); - } - detailsCase_ = 8; - return this; - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - public Builder setVulnerability( - io.grafeas.v1.VulnerabilityOccurrence.Builder builderForValue) { - if (vulnerabilityBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - vulnerabilityBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 8; - return this; - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - public Builder mergeVulnerability(io.grafeas.v1.VulnerabilityOccurrence value) { - if (vulnerabilityBuilder_ == null) { - if (detailsCase_ == 8 && - details_ != io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.VulnerabilityOccurrence.newBuilder((io.grafeas.v1.VulnerabilityOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 8) { - vulnerabilityBuilder_.mergeFrom(value); - } else { - vulnerabilityBuilder_.setMessage(value); - } - } - detailsCase_ = 8; - return this; - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - public Builder clearVulnerability() { - if (vulnerabilityBuilder_ == null) { - if (detailsCase_ == 8) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 8) { - detailsCase_ = 0; - details_ = null; - } - vulnerabilityBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - public io.grafeas.v1.VulnerabilityOccurrence.Builder getVulnerabilityBuilder() { - return getVulnerabilityFieldBuilder().getBuilder(); - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrenceOrBuilder getVulnerabilityOrBuilder() { - if ((detailsCase_ == 8) && (vulnerabilityBuilder_ != null)) { - return vulnerabilityBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 8) { - return (io.grafeas.v1.VulnerabilityOccurrence) details_; - } - return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityOccurrence, io.grafeas.v1.VulnerabilityOccurrence.Builder, io.grafeas.v1.VulnerabilityOccurrenceOrBuilder> - getVulnerabilityFieldBuilder() { - if (vulnerabilityBuilder_ == null) { - if (!(detailsCase_ == 8)) { - details_ = io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); - } - vulnerabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityOccurrence, io.grafeas.v1.VulnerabilityOccurrence.Builder, io.grafeas.v1.VulnerabilityOccurrenceOrBuilder>( - (io.grafeas.v1.VulnerabilityOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 8; - onChanged(); - return vulnerabilityBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildOccurrence, io.grafeas.v1.BuildOccurrence.Builder, io.grafeas.v1.BuildOccurrenceOrBuilder> buildBuilder_; - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - * @return Whether the build field is set. - */ - @java.lang.Override - public boolean hasBuild() { - return detailsCase_ == 9; - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - * @return The build. - */ - @java.lang.Override - public io.grafeas.v1.BuildOccurrence getBuild() { - if (buildBuilder_ == null) { - if (detailsCase_ == 9) { - return (io.grafeas.v1.BuildOccurrence) details_; - } - return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 9) { - return buildBuilder_.getMessage(); - } - return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - public Builder setBuild(io.grafeas.v1.BuildOccurrence value) { - if (buildBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - buildBuilder_.setMessage(value); - } - detailsCase_ = 9; - return this; - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - public Builder setBuild( - io.grafeas.v1.BuildOccurrence.Builder builderForValue) { - if (buildBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - buildBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 9; - return this; - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - public Builder mergeBuild(io.grafeas.v1.BuildOccurrence value) { - if (buildBuilder_ == null) { - if (detailsCase_ == 9 && - details_ != io.grafeas.v1.BuildOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.BuildOccurrence.newBuilder((io.grafeas.v1.BuildOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 9) { - buildBuilder_.mergeFrom(value); - } else { - buildBuilder_.setMessage(value); - } - } - detailsCase_ = 9; - return this; - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - public Builder clearBuild() { - if (buildBuilder_ == null) { - if (detailsCase_ == 9) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 9) { - detailsCase_ = 0; - details_ = null; - } - buildBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - public io.grafeas.v1.BuildOccurrence.Builder getBuildBuilder() { - return getBuildFieldBuilder().getBuilder(); - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - @java.lang.Override - public io.grafeas.v1.BuildOccurrenceOrBuilder getBuildOrBuilder() { - if ((detailsCase_ == 9) && (buildBuilder_ != null)) { - return buildBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 9) { - return (io.grafeas.v1.BuildOccurrence) details_; - } - return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildOccurrence, io.grafeas.v1.BuildOccurrence.Builder, io.grafeas.v1.BuildOccurrenceOrBuilder> - getBuildFieldBuilder() { - if (buildBuilder_ == null) { - if (!(detailsCase_ == 9)) { - details_ = io.grafeas.v1.BuildOccurrence.getDefaultInstance(); - } - buildBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildOccurrence, io.grafeas.v1.BuildOccurrence.Builder, io.grafeas.v1.BuildOccurrenceOrBuilder>( - (io.grafeas.v1.BuildOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 9; - onChanged(); - return buildBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ImageOccurrence, io.grafeas.v1.ImageOccurrence.Builder, io.grafeas.v1.ImageOccurrenceOrBuilder> imageBuilder_; - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - * @return Whether the image field is set. - */ - @java.lang.Override - public boolean hasImage() { - return detailsCase_ == 10; - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - * @return The image. - */ - @java.lang.Override - public io.grafeas.v1.ImageOccurrence getImage() { - if (imageBuilder_ == null) { - if (detailsCase_ == 10) { - return (io.grafeas.v1.ImageOccurrence) details_; - } - return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 10) { - return imageBuilder_.getMessage(); - } - return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - public Builder setImage(io.grafeas.v1.ImageOccurrence value) { - if (imageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - imageBuilder_.setMessage(value); - } - detailsCase_ = 10; - return this; - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - public Builder setImage( - io.grafeas.v1.ImageOccurrence.Builder builderForValue) { - if (imageBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - imageBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 10; - return this; - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - public Builder mergeImage(io.grafeas.v1.ImageOccurrence value) { - if (imageBuilder_ == null) { - if (detailsCase_ == 10 && - details_ != io.grafeas.v1.ImageOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.ImageOccurrence.newBuilder((io.grafeas.v1.ImageOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 10) { - imageBuilder_.mergeFrom(value); - } else { - imageBuilder_.setMessage(value); - } - } - detailsCase_ = 10; - return this; - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - public Builder clearImage() { - if (imageBuilder_ == null) { - if (detailsCase_ == 10) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 10) { - detailsCase_ = 0; - details_ = null; - } - imageBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - public io.grafeas.v1.ImageOccurrence.Builder getImageBuilder() { - return getImageFieldBuilder().getBuilder(); - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - @java.lang.Override - public io.grafeas.v1.ImageOccurrenceOrBuilder getImageOrBuilder() { - if ((detailsCase_ == 10) && (imageBuilder_ != null)) { - return imageBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 10) { - return (io.grafeas.v1.ImageOccurrence) details_; - } - return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ImageOccurrence, io.grafeas.v1.ImageOccurrence.Builder, io.grafeas.v1.ImageOccurrenceOrBuilder> - getImageFieldBuilder() { - if (imageBuilder_ == null) { - if (!(detailsCase_ == 10)) { - details_ = io.grafeas.v1.ImageOccurrence.getDefaultInstance(); - } - imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ImageOccurrence, io.grafeas.v1.ImageOccurrence.Builder, io.grafeas.v1.ImageOccurrenceOrBuilder>( - (io.grafeas.v1.ImageOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 10; - onChanged(); - return imageBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.PackageOccurrence, io.grafeas.v1.PackageOccurrence.Builder, io.grafeas.v1.PackageOccurrenceOrBuilder> packageBuilder_; - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - * @return Whether the package field is set. - */ - @java.lang.Override - public boolean hasPackage() { - return detailsCase_ == 11; - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - * @return The package. - */ - @java.lang.Override - public io.grafeas.v1.PackageOccurrence getPackage() { - if (packageBuilder_ == null) { - if (detailsCase_ == 11) { - return (io.grafeas.v1.PackageOccurrence) details_; - } - return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 11) { - return packageBuilder_.getMessage(); - } - return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - public Builder setPackage(io.grafeas.v1.PackageOccurrence value) { - if (packageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - packageBuilder_.setMessage(value); - } - detailsCase_ = 11; - return this; - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - public Builder setPackage( - io.grafeas.v1.PackageOccurrence.Builder builderForValue) { - if (packageBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - packageBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 11; - return this; - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - public Builder mergePackage(io.grafeas.v1.PackageOccurrence value) { - if (packageBuilder_ == null) { - if (detailsCase_ == 11 && - details_ != io.grafeas.v1.PackageOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.PackageOccurrence.newBuilder((io.grafeas.v1.PackageOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 11) { - packageBuilder_.mergeFrom(value); - } else { - packageBuilder_.setMessage(value); - } - } - detailsCase_ = 11; - return this; - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - public Builder clearPackage() { - if (packageBuilder_ == null) { - if (detailsCase_ == 11) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 11) { - detailsCase_ = 0; - details_ = null; - } - packageBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - public io.grafeas.v1.PackageOccurrence.Builder getPackageBuilder() { - return getPackageFieldBuilder().getBuilder(); - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - @java.lang.Override - public io.grafeas.v1.PackageOccurrenceOrBuilder getPackageOrBuilder() { - if ((detailsCase_ == 11) && (packageBuilder_ != null)) { - return packageBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 11) { - return (io.grafeas.v1.PackageOccurrence) details_; - } - return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.PackageOccurrence, io.grafeas.v1.PackageOccurrence.Builder, io.grafeas.v1.PackageOccurrenceOrBuilder> - getPackageFieldBuilder() { - if (packageBuilder_ == null) { - if (!(detailsCase_ == 11)) { - details_ = io.grafeas.v1.PackageOccurrence.getDefaultInstance(); - } - packageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.PackageOccurrence, io.grafeas.v1.PackageOccurrence.Builder, io.grafeas.v1.PackageOccurrenceOrBuilder>( - (io.grafeas.v1.PackageOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 11; - onChanged(); - return packageBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DeploymentOccurrence, io.grafeas.v1.DeploymentOccurrence.Builder, io.grafeas.v1.DeploymentOccurrenceOrBuilder> deploymentBuilder_; - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - * @return Whether the deployment field is set. - */ - @java.lang.Override - public boolean hasDeployment() { - return detailsCase_ == 12; - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - * @return The deployment. - */ - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrence getDeployment() { - if (deploymentBuilder_ == null) { - if (detailsCase_ == 12) { - return (io.grafeas.v1.DeploymentOccurrence) details_; - } - return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 12) { - return deploymentBuilder_.getMessage(); - } - return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - public Builder setDeployment(io.grafeas.v1.DeploymentOccurrence value) { - if (deploymentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - deploymentBuilder_.setMessage(value); - } - detailsCase_ = 12; - return this; - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - public Builder setDeployment( - io.grafeas.v1.DeploymentOccurrence.Builder builderForValue) { - if (deploymentBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - deploymentBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 12; - return this; - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - public Builder mergeDeployment(io.grafeas.v1.DeploymentOccurrence value) { - if (deploymentBuilder_ == null) { - if (detailsCase_ == 12 && - details_ != io.grafeas.v1.DeploymentOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.DeploymentOccurrence.newBuilder((io.grafeas.v1.DeploymentOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 12) { - deploymentBuilder_.mergeFrom(value); - } else { - deploymentBuilder_.setMessage(value); - } - } - detailsCase_ = 12; - return this; - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - public Builder clearDeployment() { - if (deploymentBuilder_ == null) { - if (detailsCase_ == 12) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 12) { - detailsCase_ = 0; - details_ = null; - } - deploymentBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - public io.grafeas.v1.DeploymentOccurrence.Builder getDeploymentBuilder() { - return getDeploymentFieldBuilder().getBuilder(); - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrenceOrBuilder getDeploymentOrBuilder() { - if ((detailsCase_ == 12) && (deploymentBuilder_ != null)) { - return deploymentBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 12) { - return (io.grafeas.v1.DeploymentOccurrence) details_; - } - return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DeploymentOccurrence, io.grafeas.v1.DeploymentOccurrence.Builder, io.grafeas.v1.DeploymentOccurrenceOrBuilder> - getDeploymentFieldBuilder() { - if (deploymentBuilder_ == null) { - if (!(detailsCase_ == 12)) { - details_ = io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); - } - deploymentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DeploymentOccurrence, io.grafeas.v1.DeploymentOccurrence.Builder, io.grafeas.v1.DeploymentOccurrenceOrBuilder>( - (io.grafeas.v1.DeploymentOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 12; - onChanged(); - return deploymentBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryOccurrence, io.grafeas.v1.DiscoveryOccurrence.Builder, io.grafeas.v1.DiscoveryOccurrenceOrBuilder> discoveryBuilder_; - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @return Whether the discovery field is set. - */ - @java.lang.Override - public boolean hasDiscovery() { - return detailsCase_ == 13; - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @return The discovery. - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence getDiscovery() { - if (discoveryBuilder_ == null) { - if (detailsCase_ == 13) { - return (io.grafeas.v1.DiscoveryOccurrence) details_; - } - return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 13) { - return discoveryBuilder_.getMessage(); - } - return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - public Builder setDiscovery(io.grafeas.v1.DiscoveryOccurrence value) { - if (discoveryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - discoveryBuilder_.setMessage(value); - } - detailsCase_ = 13; - return this; - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - public Builder setDiscovery( - io.grafeas.v1.DiscoveryOccurrence.Builder builderForValue) { - if (discoveryBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - discoveryBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 13; - return this; - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - public Builder mergeDiscovery(io.grafeas.v1.DiscoveryOccurrence value) { - if (discoveryBuilder_ == null) { - if (detailsCase_ == 13 && - details_ != io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.DiscoveryOccurrence.newBuilder((io.grafeas.v1.DiscoveryOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 13) { - discoveryBuilder_.mergeFrom(value); - } else { - discoveryBuilder_.setMessage(value); - } - } - detailsCase_ = 13; - return this; - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - public Builder clearDiscovery() { - if (discoveryBuilder_ == null) { - if (detailsCase_ == 13) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 13) { - detailsCase_ = 0; - details_ = null; - } - discoveryBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - public io.grafeas.v1.DiscoveryOccurrence.Builder getDiscoveryBuilder() { - return getDiscoveryFieldBuilder().getBuilder(); - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrenceOrBuilder getDiscoveryOrBuilder() { - if ((detailsCase_ == 13) && (discoveryBuilder_ != null)) { - return discoveryBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 13) { - return (io.grafeas.v1.DiscoveryOccurrence) details_; - } - return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryOccurrence, io.grafeas.v1.DiscoveryOccurrence.Builder, io.grafeas.v1.DiscoveryOccurrenceOrBuilder> - getDiscoveryFieldBuilder() { - if (discoveryBuilder_ == null) { - if (!(detailsCase_ == 13)) { - details_ = io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); - } - discoveryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryOccurrence, io.grafeas.v1.DiscoveryOccurrence.Builder, io.grafeas.v1.DiscoveryOccurrenceOrBuilder>( - (io.grafeas.v1.DiscoveryOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 13; - onChanged(); - return discoveryBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationOccurrence, io.grafeas.v1.AttestationOccurrence.Builder, io.grafeas.v1.AttestationOccurrenceOrBuilder> attestationBuilder_; - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - * @return Whether the attestation field is set. - */ - @java.lang.Override - public boolean hasAttestation() { - return detailsCase_ == 14; - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - * @return The attestation. - */ - @java.lang.Override - public io.grafeas.v1.AttestationOccurrence getAttestation() { - if (attestationBuilder_ == null) { - if (detailsCase_ == 14) { - return (io.grafeas.v1.AttestationOccurrence) details_; - } - return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 14) { - return attestationBuilder_.getMessage(); - } - return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - public Builder setAttestation(io.grafeas.v1.AttestationOccurrence value) { - if (attestationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - attestationBuilder_.setMessage(value); - } - detailsCase_ = 14; - return this; - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - public Builder setAttestation( - io.grafeas.v1.AttestationOccurrence.Builder builderForValue) { - if (attestationBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - attestationBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 14; - return this; - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - public Builder mergeAttestation(io.grafeas.v1.AttestationOccurrence value) { - if (attestationBuilder_ == null) { - if (detailsCase_ == 14 && - details_ != io.grafeas.v1.AttestationOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.AttestationOccurrence.newBuilder((io.grafeas.v1.AttestationOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 14) { - attestationBuilder_.mergeFrom(value); - } else { - attestationBuilder_.setMessage(value); - } - } - detailsCase_ = 14; - return this; - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - public Builder clearAttestation() { - if (attestationBuilder_ == null) { - if (detailsCase_ == 14) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 14) { - detailsCase_ = 0; - details_ = null; - } - attestationBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - public io.grafeas.v1.AttestationOccurrence.Builder getAttestationBuilder() { - return getAttestationFieldBuilder().getBuilder(); - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - @java.lang.Override - public io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder() { - if ((detailsCase_ == 14) && (attestationBuilder_ != null)) { - return attestationBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 14) { - return (io.grafeas.v1.AttestationOccurrence) details_; - } - return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationOccurrence, io.grafeas.v1.AttestationOccurrence.Builder, io.grafeas.v1.AttestationOccurrenceOrBuilder> - getAttestationFieldBuilder() { - if (attestationBuilder_ == null) { - if (!(detailsCase_ == 14)) { - details_ = io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); - } - attestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationOccurrence, io.grafeas.v1.AttestationOccurrence.Builder, io.grafeas.v1.AttestationOccurrenceOrBuilder>( - (io.grafeas.v1.AttestationOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 14; - onChanged(); - return attestationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeOccurrence, io.grafeas.v1.UpgradeOccurrence.Builder, io.grafeas.v1.UpgradeOccurrenceOrBuilder> upgradeBuilder_; - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @return Whether the upgrade field is set. - */ - @java.lang.Override - public boolean hasUpgrade() { - return detailsCase_ == 15; - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @return The upgrade. - */ - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrence getUpgrade() { - if (upgradeBuilder_ == null) { - if (detailsCase_ == 15) { - return (io.grafeas.v1.UpgradeOccurrence) details_; - } - return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 15) { - return upgradeBuilder_.getMessage(); - } - return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - public Builder setUpgrade(io.grafeas.v1.UpgradeOccurrence value) { - if (upgradeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - upgradeBuilder_.setMessage(value); - } - detailsCase_ = 15; - return this; - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - public Builder setUpgrade( - io.grafeas.v1.UpgradeOccurrence.Builder builderForValue) { - if (upgradeBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - upgradeBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 15; - return this; - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - public Builder mergeUpgrade(io.grafeas.v1.UpgradeOccurrence value) { - if (upgradeBuilder_ == null) { - if (detailsCase_ == 15 && - details_ != io.grafeas.v1.UpgradeOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.UpgradeOccurrence.newBuilder((io.grafeas.v1.UpgradeOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 15) { - upgradeBuilder_.mergeFrom(value); - } else { - upgradeBuilder_.setMessage(value); - } - } - detailsCase_ = 15; - return this; - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - public Builder clearUpgrade() { - if (upgradeBuilder_ == null) { - if (detailsCase_ == 15) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 15) { - detailsCase_ = 0; - details_ = null; - } - upgradeBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - public io.grafeas.v1.UpgradeOccurrence.Builder getUpgradeBuilder() { - return getUpgradeFieldBuilder().getBuilder(); - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrenceOrBuilder getUpgradeOrBuilder() { - if ((detailsCase_ == 15) && (upgradeBuilder_ != null)) { - return upgradeBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 15) { - return (io.grafeas.v1.UpgradeOccurrence) details_; - } - return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeOccurrence, io.grafeas.v1.UpgradeOccurrence.Builder, io.grafeas.v1.UpgradeOccurrenceOrBuilder> - getUpgradeFieldBuilder() { - if (upgradeBuilder_ == null) { - if (!(detailsCase_ == 15)) { - details_ = io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); - } - upgradeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeOccurrence, io.grafeas.v1.UpgradeOccurrence.Builder, io.grafeas.v1.UpgradeOccurrenceOrBuilder>( - (io.grafeas.v1.UpgradeOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 15; - onChanged(); - return upgradeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceOccurrence, io.grafeas.v1.ComplianceOccurrence.Builder, io.grafeas.v1.ComplianceOccurrenceOrBuilder> complianceBuilder_; - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - * @return Whether the compliance field is set. - */ - @java.lang.Override - public boolean hasCompliance() { - return detailsCase_ == 16; - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - * @return The compliance. - */ - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrence getCompliance() { - if (complianceBuilder_ == null) { - if (detailsCase_ == 16) { - return (io.grafeas.v1.ComplianceOccurrence) details_; - } - return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 16) { - return complianceBuilder_.getMessage(); - } - return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - public Builder setCompliance(io.grafeas.v1.ComplianceOccurrence value) { - if (complianceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - complianceBuilder_.setMessage(value); - } - detailsCase_ = 16; - return this; - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - public Builder setCompliance( - io.grafeas.v1.ComplianceOccurrence.Builder builderForValue) { - if (complianceBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - complianceBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 16; - return this; - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - public Builder mergeCompliance(io.grafeas.v1.ComplianceOccurrence value) { - if (complianceBuilder_ == null) { - if (detailsCase_ == 16 && - details_ != io.grafeas.v1.ComplianceOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.ComplianceOccurrence.newBuilder((io.grafeas.v1.ComplianceOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 16) { - complianceBuilder_.mergeFrom(value); - } else { - complianceBuilder_.setMessage(value); - } - } - detailsCase_ = 16; - return this; - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - public Builder clearCompliance() { - if (complianceBuilder_ == null) { - if (detailsCase_ == 16) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 16) { - detailsCase_ = 0; - details_ = null; - } - complianceBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - public io.grafeas.v1.ComplianceOccurrence.Builder getComplianceBuilder() { - return getComplianceFieldBuilder().getBuilder(); - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrenceOrBuilder getComplianceOrBuilder() { - if ((detailsCase_ == 16) && (complianceBuilder_ != null)) { - return complianceBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 16) { - return (io.grafeas.v1.ComplianceOccurrence) details_; - } - return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceOccurrence, io.grafeas.v1.ComplianceOccurrence.Builder, io.grafeas.v1.ComplianceOccurrenceOrBuilder> - getComplianceFieldBuilder() { - if (complianceBuilder_ == null) { - if (!(detailsCase_ == 16)) { - details_ = io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); - } - complianceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceOccurrence, io.grafeas.v1.ComplianceOccurrence.Builder, io.grafeas.v1.ComplianceOccurrenceOrBuilder>( - (io.grafeas.v1.ComplianceOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 16; - onChanged(); - return complianceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationOccurrence, io.grafeas.v1.DSSEAttestationOccurrence.Builder, io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder> dsseAttestationBuilder_; - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @return Whether the dsseAttestation field is set. - */ - @java.lang.Override - public boolean hasDsseAttestation() { - return detailsCase_ == 17; - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @return The dsseAttestation. - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrence getDsseAttestation() { - if (dsseAttestationBuilder_ == null) { - if (detailsCase_ == 17) { - return (io.grafeas.v1.DSSEAttestationOccurrence) details_; - } - return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 17) { - return dsseAttestationBuilder_.getMessage(); - } - return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - public Builder setDsseAttestation(io.grafeas.v1.DSSEAttestationOccurrence value) { - if (dsseAttestationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - dsseAttestationBuilder_.setMessage(value); - } - detailsCase_ = 17; - return this; - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - public Builder setDsseAttestation( - io.grafeas.v1.DSSEAttestationOccurrence.Builder builderForValue) { - if (dsseAttestationBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - dsseAttestationBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 17; - return this; - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - public Builder mergeDsseAttestation(io.grafeas.v1.DSSEAttestationOccurrence value) { - if (dsseAttestationBuilder_ == null) { - if (detailsCase_ == 17 && - details_ != io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.DSSEAttestationOccurrence.newBuilder((io.grafeas.v1.DSSEAttestationOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 17) { - dsseAttestationBuilder_.mergeFrom(value); - } else { - dsseAttestationBuilder_.setMessage(value); - } - } - detailsCase_ = 17; - return this; - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - public Builder clearDsseAttestation() { - if (dsseAttestationBuilder_ == null) { - if (detailsCase_ == 17) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 17) { - detailsCase_ = 0; - details_ = null; - } - dsseAttestationBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - public io.grafeas.v1.DSSEAttestationOccurrence.Builder getDsseAttestationBuilder() { - return getDsseAttestationFieldBuilder().getBuilder(); - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder getDsseAttestationOrBuilder() { - if ((detailsCase_ == 17) && (dsseAttestationBuilder_ != null)) { - return dsseAttestationBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 17) { - return (io.grafeas.v1.DSSEAttestationOccurrence) details_; - } - return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationOccurrence, io.grafeas.v1.DSSEAttestationOccurrence.Builder, io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder> - getDsseAttestationFieldBuilder() { - if (dsseAttestationBuilder_ == null) { - if (!(detailsCase_ == 17)) { - details_ = io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); - } - dsseAttestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationOccurrence, io.grafeas.v1.DSSEAttestationOccurrence.Builder, io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder>( - (io.grafeas.v1.DSSEAttestationOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 17; - onChanged(); - return dsseAttestationBuilder_; - } - - private io.grafeas.v1.Envelope envelope_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> envelopeBuilder_; - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - * @return Whether the envelope field is set. - */ - public boolean hasEnvelope() { - return ((bitField0_ & 0x00020000) != 0); - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - * @return The envelope. - */ - public io.grafeas.v1.Envelope getEnvelope() { - if (envelopeBuilder_ == null) { - return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } else { - return envelopeBuilder_.getMessage(); - } - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - public Builder setEnvelope(io.grafeas.v1.Envelope value) { - if (envelopeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - envelope_ = value; - } else { - envelopeBuilder_.setMessage(value); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - public Builder setEnvelope( - io.grafeas.v1.Envelope.Builder builderForValue) { - if (envelopeBuilder_ == null) { - envelope_ = builderForValue.build(); - } else { - envelopeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - public Builder mergeEnvelope(io.grafeas.v1.Envelope value) { - if (envelopeBuilder_ == null) { - if (((bitField0_ & 0x00020000) != 0) && - envelope_ != null && - envelope_ != io.grafeas.v1.Envelope.getDefaultInstance()) { - getEnvelopeBuilder().mergeFrom(value); - } else { - envelope_ = value; - } - } else { - envelopeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - public Builder clearEnvelope() { - bitField0_ = (bitField0_ & ~0x00020000); - envelope_ = null; - if (envelopeBuilder_ != null) { - envelopeBuilder_.dispose(); - envelopeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - public io.grafeas.v1.Envelope.Builder getEnvelopeBuilder() { - bitField0_ |= 0x00020000; - onChanged(); - return getEnvelopeFieldBuilder().getBuilder(); - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { - if (envelopeBuilder_ != null) { - return envelopeBuilder_.getMessageOrBuilder(); - } else { - return envelope_ == null ? - io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> - getEnvelopeFieldBuilder() { - if (envelopeBuilder_ == null) { - envelopeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder>( - getEnvelope(), - getParentForChildren(), - isClean()); - envelope_ = null; - } - return envelopeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Occurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Occurrence) - private static final io.grafeas.v1.Occurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Occurrence(); - } - - public static io.grafeas.v1.Occurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Occurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Occurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java deleted file mode 100644 index b4dc17a5f67a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class OccurrenceName implements ResourceName { - private static final PathTemplate PROJECT_OCCURRENCE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/occurrences/{occurrence}"); - private volatile Map fieldValuesMap; - private final String project; - private final String occurrence; - - @Deprecated - protected OccurrenceName() { - project = null; - occurrence = null; - } - - private OccurrenceName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - occurrence = Preconditions.checkNotNull(builder.getOccurrence()); - } - - public String getProject() { - return project; - } - - public String getOccurrence() { - return occurrence; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static OccurrenceName of(String project, String occurrence) { - return newBuilder().setProject(project).setOccurrence(occurrence).build(); - } - - public static String format(String project, String occurrence) { - return newBuilder().setProject(project).setOccurrence(occurrence).build().toString(); - } - - public static OccurrenceName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_OCCURRENCE.validatedMatch( - formattedString, "OccurrenceName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("occurrence")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (OccurrenceName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_OCCURRENCE.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (occurrence != null) { - fieldMapBuilder.put("occurrence", occurrence); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_OCCURRENCE.instantiate("project", project, "occurrence", occurrence); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - OccurrenceName that = ((OccurrenceName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.occurrence, that.occurrence); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(occurrence); - return h; - } - - /** Builder for projects/{project}/occurrences/{occurrence}. */ - public static class Builder { - private String project; - private String occurrence; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getOccurrence() { - return occurrence; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setOccurrence(String occurrence) { - this.occurrence = occurrence; - return this; - } - - private Builder(OccurrenceName occurrenceName) { - this.project = occurrenceName.project; - this.occurrence = occurrenceName.occurrence; - } - - public OccurrenceName build() { - return new OccurrenceName(this); - } - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java deleted file mode 100644 index bbc9843777f1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java +++ /dev/null @@ -1,476 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface OccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Occurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Output only. The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Output only. The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. Immutable. A URI that represents the resource for which the
-   * occurrence applies. For example,
-   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-   * 
- * - * string resource_uri = 2; - * @return The resourceUri. - */ - java.lang.String getResourceUri(); - /** - *
-   * Required. Immutable. A URI that represents the resource for which the
-   * occurrence applies. For example,
-   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-   * 
- * - * string resource_uri = 2; - * @return The bytes for resourceUri. - */ - com.google.protobuf.ByteString - getResourceUriBytes(); - - /** - *
-   * Required. Immutable. The analysis note associated with this occurrence, in
-   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-   * used as a filter in list requests.
-   * 
- * - * string note_name = 3; - * @return The noteName. - */ - java.lang.String getNoteName(); - /** - *
-   * Required. Immutable. The analysis note associated with this occurrence, in
-   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-   * used as a filter in list requests.
-   * 
- * - * string note_name = 3; - * @return The bytes for noteName. - */ - com.google.protobuf.ByteString - getNoteNameBytes(); - - /** - *
-   * Output only. This explicitly denotes which of the occurrence details are
-   * specified. This field can be used as a filter in list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - int getKindValue(); - /** - *
-   * Output only. This explicitly denotes which of the occurrence details are
-   * specified. This field can be used as a filter in list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The kind. - */ - io.grafeas.v1.NoteKind getKind(); - - /** - *
-   * A description of actions that can be taken to remedy the note.
-   * 
- * - * string remediation = 5; - * @return The remediation. - */ - java.lang.String getRemediation(); - /** - *
-   * A description of actions that can be taken to remedy the note.
-   * 
- * - * string remediation = 5; - * @return The bytes for remediation. - */ - com.google.protobuf.ByteString - getRemediationBytes(); - - /** - *
-   * Output only. The time this occurrence was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The time this occurrence was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The time this occurrence was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. The time this occurrence was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * Output only. The time this occurrence was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * Output only. The time this occurrence was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * Describes a security vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @return Whether the vulnerability field is set. - */ - boolean hasVulnerability(); - /** - *
-   * Describes a security vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @return The vulnerability. - */ - io.grafeas.v1.VulnerabilityOccurrence getVulnerability(); - /** - *
-   * Describes a security vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - io.grafeas.v1.VulnerabilityOccurrenceOrBuilder getVulnerabilityOrBuilder(); - - /** - *
-   * Describes a verifiable build.
-   * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - * @return Whether the build field is set. - */ - boolean hasBuild(); - /** - *
-   * Describes a verifiable build.
-   * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - * @return The build. - */ - io.grafeas.v1.BuildOccurrence getBuild(); - /** - *
-   * Describes a verifiable build.
-   * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - io.grafeas.v1.BuildOccurrenceOrBuilder getBuildOrBuilder(); - - /** - *
-   * Describes how this resource derives from the basis in the associated
-   * note.
-   * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - * @return Whether the image field is set. - */ - boolean hasImage(); - /** - *
-   * Describes how this resource derives from the basis in the associated
-   * note.
-   * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - * @return The image. - */ - io.grafeas.v1.ImageOccurrence getImage(); - /** - *
-   * Describes how this resource derives from the basis in the associated
-   * note.
-   * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - io.grafeas.v1.ImageOccurrenceOrBuilder getImageOrBuilder(); - - /** - *
-   * Describes the installation of a package on the linked resource.
-   * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - * @return Whether the package field is set. - */ - boolean hasPackage(); - /** - *
-   * Describes the installation of a package on the linked resource.
-   * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - * @return The package. - */ - io.grafeas.v1.PackageOccurrence getPackage(); - /** - *
-   * Describes the installation of a package on the linked resource.
-   * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - io.grafeas.v1.PackageOccurrenceOrBuilder getPackageOrBuilder(); - - /** - *
-   * Describes the deployment of an artifact on a runtime.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - * @return Whether the deployment field is set. - */ - boolean hasDeployment(); - /** - *
-   * Describes the deployment of an artifact on a runtime.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - * @return The deployment. - */ - io.grafeas.v1.DeploymentOccurrence getDeployment(); - /** - *
-   * Describes the deployment of an artifact on a runtime.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - io.grafeas.v1.DeploymentOccurrenceOrBuilder getDeploymentOrBuilder(); - - /** - *
-   * Describes when a resource was discovered.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @return Whether the discovery field is set. - */ - boolean hasDiscovery(); - /** - *
-   * Describes when a resource was discovered.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @return The discovery. - */ - io.grafeas.v1.DiscoveryOccurrence getDiscovery(); - /** - *
-   * Describes when a resource was discovered.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - io.grafeas.v1.DiscoveryOccurrenceOrBuilder getDiscoveryOrBuilder(); - - /** - *
-   * Describes an attestation of an artifact.
-   * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - * @return Whether the attestation field is set. - */ - boolean hasAttestation(); - /** - *
-   * Describes an attestation of an artifact.
-   * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - * @return The attestation. - */ - io.grafeas.v1.AttestationOccurrence getAttestation(); - /** - *
-   * Describes an attestation of an artifact.
-   * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder(); - - /** - *
-   * Describes an available package upgrade on the linked resource.
-   * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @return Whether the upgrade field is set. - */ - boolean hasUpgrade(); - /** - *
-   * Describes an available package upgrade on the linked resource.
-   * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @return The upgrade. - */ - io.grafeas.v1.UpgradeOccurrence getUpgrade(); - /** - *
-   * Describes an available package upgrade on the linked resource.
-   * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - io.grafeas.v1.UpgradeOccurrenceOrBuilder getUpgradeOrBuilder(); - - /** - *
-   * Describes a compliance violation on a linked resource.
-   * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - * @return Whether the compliance field is set. - */ - boolean hasCompliance(); - /** - *
-   * Describes a compliance violation on a linked resource.
-   * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - * @return The compliance. - */ - io.grafeas.v1.ComplianceOccurrence getCompliance(); - /** - *
-   * Describes a compliance violation on a linked resource.
-   * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - io.grafeas.v1.ComplianceOccurrenceOrBuilder getComplianceOrBuilder(); - - /** - *
-   * Describes an attestation of an artifact using dsse.
-   * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @return Whether the dsseAttestation field is set. - */ - boolean hasDsseAttestation(); - /** - *
-   * Describes an attestation of an artifact using dsse.
-   * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @return The dsseAttestation. - */ - io.grafeas.v1.DSSEAttestationOccurrence getDsseAttestation(); - /** - *
-   * Describes an attestation of an artifact using dsse.
-   * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder getDsseAttestationOrBuilder(); - - /** - *
-   * https://github.com/secure-systems-lab/dsse
-   * 
- * - * .grafeas.v1.Envelope envelope = 18; - * @return Whether the envelope field is set. - */ - boolean hasEnvelope(); - /** - *
-   * https://github.com/secure-systems-lab/dsse
-   * 
- * - * .grafeas.v1.Envelope envelope = 18; - * @return The envelope. - */ - io.grafeas.v1.Envelope getEnvelope(); - /** - *
-   * https://github.com/secure-systems-lab/dsse
-   * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder(); - - public io.grafeas.v1.Occurrence.DetailsCase getDetailsCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java deleted file mode 100644 index d25d6b95e71b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java +++ /dev/null @@ -1,132 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -public final class Package { - private Package() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Distribution_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Distribution_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Location_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Location_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_PackageNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_PackageNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_PackageOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Version_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Version_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\030grafeas/v1/package.proto\022\ngrafeas.v1\032\037" + - "google/api/field_behavior.proto\032\027grafeas" + - "/v1/common.proto\"\267\001\n\014Distribution\022\024\n\007cpe" + - "_uri\030\001 \001(\tB\003\340A\002\022.\n\014architecture\030\002 \001(\0162\030." + - "grafeas.v1.Architecture\022+\n\016latest_versio" + - "n\030\003 \001(\0132\023.grafeas.v1.Version\022\022\n\nmaintain" + - "er\030\004 \001(\t\022\013\n\003url\030\005 \001(\t\022\023\n\013description\030\006 \001" + - "(\t\"O\n\010Location\022\017\n\007cpe_uri\030\001 \001(\t\022$\n\007versi" + - "on\030\002 \001(\0132\023.grafeas.v1.Version\022\014\n\004path\030\003 " + - "\001(\t\"\320\002\n\013PackageNote\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A" + - "\005\022.\n\014distribution\030\n \003(\0132\030.grafeas.v1.Dis" + - "tribution\022\024\n\014package_type\030\013 \001(\t\022\017\n\007cpe_u" + - "ri\030\014 \001(\t\022.\n\014architecture\030\r \001(\0162\030.grafeas" + - ".v1.Architecture\022$\n\007version\030\016 \001(\0132\023.graf" + - "eas.v1.Version\022\022\n\nmaintainer\030\017 \001(\t\022\013\n\003ur" + - "l\030\020 \001(\t\022\023\n\013description\030\021 \001(\t\022$\n\007license\030" + - "\022 \001(\0132\023.grafeas.v1.License\022\"\n\006digest\030\023 \003" + - "(\0132\022.grafeas.v1.Digest\"\210\002\n\021PackageOccurr" + - "ence\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\003\022&\n\010location\030\002" + - " \003(\0132\024.grafeas.v1.Location\022\031\n\014package_ty" + - "pe\030\003 \001(\tB\003\340A\003\022\024\n\007cpe_uri\030\004 \001(\tB\003\340A\003\0223\n\014a" + - "rchitecture\030\005 \001(\0162\030.grafeas.v1.Architect" + - "ureB\003\340A\003\022$\n\007license\030\006 \001(\0132\023.grafeas.v1.L" + - "icense\022)\n\007version\030\007 \001(\0132\023.grafeas.v1.Ver" + - "sionB\003\340A\003\"\340\001\n\007Version\022\r\n\005epoch\030\001 \001(\005\022\014\n\004" + - "name\030\002 \001(\t\022\020\n\010revision\030\003 \001(\t\022\021\n\tinclusiv" + - "e\030\006 \001(\010\022-\n\004kind\030\004 \001(\0162\037.grafeas.v1.Versi" + - "on.VersionKind\022\021\n\tfull_name\030\005 \001(\t\"Q\n\013Ver" + - "sionKind\022\034\n\030VERSION_KIND_UNSPECIFIED\020\000\022\n" + - "\n\006NORMAL\020\001\022\013\n\007MINIMUM\020\002\022\013\n\007MAXIMUM\020\003*>\n\014" + - "Architecture\022\034\n\030ARCHITECTURE_UNSPECIFIED" + - "\020\000\022\007\n\003X86\020\001\022\007\n\003X64\020\002BQ\n\rio.grafeas.v1P\001Z" + - "8google.golang.org/genproto/googleapis/g" + - "rafeas/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - io.grafeas.v1.Common.getDescriptor(), - }); - internal_static_grafeas_v1_Distribution_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_Distribution_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Distribution_descriptor, - new java.lang.String[] { "CpeUri", "Architecture", "LatestVersion", "Maintainer", "Url", "Description", }); - internal_static_grafeas_v1_Location_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Location_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Location_descriptor, - new java.lang.String[] { "CpeUri", "Version", "Path", }); - internal_static_grafeas_v1_PackageNote_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_PackageNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_PackageNote_descriptor, - new java.lang.String[] { "Name", "Distribution", "PackageType", "CpeUri", "Architecture", "Version", "Maintainer", "Url", "Description", "License", "Digest", }); - internal_static_grafeas_v1_PackageOccurrence_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_PackageOccurrence_descriptor, - new java.lang.String[] { "Name", "Location", "PackageType", "CpeUri", "Architecture", "License", "Version", }); - internal_static_grafeas_v1_Version_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_grafeas_v1_Version_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Version_descriptor, - new java.lang.String[] { "Epoch", "Name", "Revision", "Inclusive", "Kind", "FullName", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - io.grafeas.v1.Common.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java deleted file mode 100644 index 0ef9a8e9eee2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java +++ /dev/null @@ -1,2942 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -/** - *
- * PackageNote represents a particular package version.
- * 
- * - * Protobuf type {@code grafeas.v1.PackageNote} - */ -public final class PackageNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.PackageNote) - PackageNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use PackageNote.newBuilder() to construct. - private PackageNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PackageNote() { - name_ = ""; - distribution_ = java.util.Collections.emptyList(); - packageType_ = ""; - cpeUri_ = ""; - architecture_ = 0; - maintainer_ = ""; - url_ = ""; - description_ = ""; - digest_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PackageNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.PackageNote.class, io.grafeas.v1.PackageNote.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISTRIBUTION_FIELD_NUMBER = 10; - @SuppressWarnings("serial") - private java.util.List distribution_; - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - @java.lang.Override - public java.util.List getDistributionList() { - return distribution_; - } - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - @java.lang.Override - public java.util.List - getDistributionOrBuilderList() { - return distribution_; - } - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - @java.lang.Override - public int getDistributionCount() { - return distribution_.size(); - } - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - @java.lang.Override - public io.grafeas.v1.Distribution getDistribution(int index) { - return distribution_.get(index); - } - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - @java.lang.Override - public io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder( - int index) { - return distribution_.get(index); - } - - public static final int PACKAGE_TYPE_FIELD_NUMBER = 11; - @SuppressWarnings("serial") - private volatile java.lang.Object packageType_ = ""; - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 11; - * @return The packageType. - */ - @java.lang.Override - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } - } - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 11; - * @return The bytes for packageType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CPE_URI_FIELD_NUMBER = 12; - @SuppressWarnings("serial") - private volatile java.lang.Object cpeUri_ = ""; - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 12; - * @return The cpeUri. - */ - @java.lang.Override - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } - } - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 12; - * @return The bytes for cpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARCHITECTURE_FIELD_NUMBER = 13; - private int architecture_ = 0; - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @return The enum numeric value on the wire for architecture. - */ - @java.lang.Override public int getArchitectureValue() { - return architecture_; - } - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @return The architecture. - */ - @java.lang.Override public io.grafeas.v1.Architecture getArchitecture() { - io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); - return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; - } - - public static final int VERSION_FIELD_NUMBER = 14; - private io.grafeas.v1.Version version_; - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 14; - * @return Whether the version field is set. - */ - @java.lang.Override - public boolean hasVersion() { - return version_ != null; - } - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 14; - * @return The version. - */ - @java.lang.Override - public io.grafeas.v1.Version getVersion() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 14; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - - public static final int MAINTAINER_FIELD_NUMBER = 15; - @SuppressWarnings("serial") - private volatile java.lang.Object maintainer_ = ""; - /** - *
-   * A freeform text denoting the maintainer of this package.
-   * 
- * - * string maintainer = 15; - * @return The maintainer. - */ - @java.lang.Override - public java.lang.String getMaintainer() { - java.lang.Object ref = maintainer_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - maintainer_ = s; - return s; - } - } - /** - *
-   * A freeform text denoting the maintainer of this package.
-   * 
- * - * string maintainer = 15; - * @return The bytes for maintainer. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMaintainerBytes() { - java.lang.Object ref = maintainer_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - maintainer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URL_FIELD_NUMBER = 16; - @SuppressWarnings("serial") - private volatile java.lang.Object url_ = ""; - /** - *
-   * The homepage for this package.
-   * 
- * - * string url = 16; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-   * The homepage for this package.
-   * 
- * - * string url = 16; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 17; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * The description of this package.
-   * 
- * - * string description = 17; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * The description of this package.
-   * 
- * - * string description = 17; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LICENSE_FIELD_NUMBER = 18; - private io.grafeas.v1.License license_; - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 18; - * @return Whether the license field is set. - */ - @java.lang.Override - public boolean hasLicense() { - return license_ != null; - } - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 18; - * @return The license. - */ - @java.lang.Override - public io.grafeas.v1.License getLicense() { - return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; - } - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 18; - */ - @java.lang.Override - public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { - return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; - } - - public static final int DIGEST_FIELD_NUMBER = 19; - @SuppressWarnings("serial") - private java.util.List digest_; - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - @java.lang.Override - public java.util.List getDigestList() { - return digest_; - } - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - @java.lang.Override - public java.util.List - getDigestOrBuilderList() { - return digest_; - } - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - @java.lang.Override - public int getDigestCount() { - return digest_.size(); - } - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - @java.lang.Override - public io.grafeas.v1.Digest getDigest(int index) { - return digest_.get(index); - } - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - @java.lang.Override - public io.grafeas.v1.DigestOrBuilder getDigestOrBuilder( - int index) { - return digest_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < distribution_.size(); i++) { - output.writeMessage(10, distribution_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, packageType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, cpeUri_); - } - if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { - output.writeEnum(13, architecture_); - } - if (version_ != null) { - output.writeMessage(14, getVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 15, maintainer_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 16, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 17, description_); - } - if (license_ != null) { - output.writeMessage(18, getLicense()); - } - for (int i = 0; i < digest_.size(); i++) { - output.writeMessage(19, digest_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - for (int i = 0; i < distribution_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, distribution_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, packageType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, cpeUri_); - } - if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(13, architecture_); - } - if (version_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, getVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, maintainer_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, description_); - } - if (license_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(18, getLicense()); - } - for (int i = 0; i < digest_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(19, digest_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.PackageNote)) { - return super.equals(obj); - } - io.grafeas.v1.PackageNote other = (io.grafeas.v1.PackageNote) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDistributionList() - .equals(other.getDistributionList())) return false; - if (!getPackageType() - .equals(other.getPackageType())) return false; - if (!getCpeUri() - .equals(other.getCpeUri())) return false; - if (architecture_ != other.architecture_) return false; - if (hasVersion() != other.hasVersion()) return false; - if (hasVersion()) { - if (!getVersion() - .equals(other.getVersion())) return false; - } - if (!getMaintainer() - .equals(other.getMaintainer())) return false; - if (!getUrl() - .equals(other.getUrl())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (hasLicense() != other.hasLicense()) return false; - if (hasLicense()) { - if (!getLicense() - .equals(other.getLicense())) return false; - } - if (!getDigestList() - .equals(other.getDigestList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getDistributionCount() > 0) { - hash = (37 * hash) + DISTRIBUTION_FIELD_NUMBER; - hash = (53 * hash) + getDistributionList().hashCode(); - } - hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getPackageType().hashCode(); - hash = (37 * hash) + CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCpeUri().hashCode(); - hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; - hash = (53 * hash) + architecture_; - if (hasVersion()) { - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - } - hash = (37 * hash) + MAINTAINER_FIELD_NUMBER; - hash = (53 * hash) + getMaintainer().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasLicense()) { - hash = (37 * hash) + LICENSE_FIELD_NUMBER; - hash = (53 * hash) + getLicense().hashCode(); - } - if (getDigestCount() > 0) { - hash = (37 * hash) + DIGEST_FIELD_NUMBER; - hash = (53 * hash) + getDigestList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.PackageNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.PackageNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.PackageNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.PackageNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.PackageNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.PackageNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.PackageNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.PackageNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.PackageNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.PackageNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.PackageNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.PackageNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.PackageNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PackageNote represents a particular package version.
-   * 
- * - * Protobuf type {@code grafeas.v1.PackageNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.PackageNote) - io.grafeas.v1.PackageNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.PackageNote.class, io.grafeas.v1.PackageNote.Builder.class); - } - - // Construct using io.grafeas.v1.PackageNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - if (distributionBuilder_ == null) { - distribution_ = java.util.Collections.emptyList(); - } else { - distribution_ = null; - distributionBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - packageType_ = ""; - cpeUri_ = ""; - architecture_ = 0; - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - maintainer_ = ""; - url_ = ""; - description_ = ""; - license_ = null; - if (licenseBuilder_ != null) { - licenseBuilder_.dispose(); - licenseBuilder_ = null; - } - if (digestBuilder_ == null) { - digest_ = java.util.Collections.emptyList(); - } else { - digest_ = null; - digestBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000400); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.PackageNote getDefaultInstanceForType() { - return io.grafeas.v1.PackageNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.PackageNote build() { - io.grafeas.v1.PackageNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.PackageNote buildPartial() { - io.grafeas.v1.PackageNote result = new io.grafeas.v1.PackageNote(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.PackageNote result) { - if (distributionBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - distribution_ = java.util.Collections.unmodifiableList(distribution_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.distribution_ = distribution_; - } else { - result.distribution_ = distributionBuilder_.build(); - } - if (digestBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0)) { - digest_ = java.util.Collections.unmodifiableList(digest_); - bitField0_ = (bitField0_ & ~0x00000400); - } - result.digest_ = digest_; - } else { - result.digest_ = digestBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.PackageNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.packageType_ = packageType_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.cpeUri_ = cpeUri_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.architecture_ = architecture_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.version_ = versionBuilder_ == null - ? version_ - : versionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.maintainer_ = maintainer_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.url_ = url_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.license_ = licenseBuilder_ == null - ? license_ - : licenseBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.PackageNote) { - return mergeFrom((io.grafeas.v1.PackageNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.PackageNote other) { - if (other == io.grafeas.v1.PackageNote.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (distributionBuilder_ == null) { - if (!other.distribution_.isEmpty()) { - if (distribution_.isEmpty()) { - distribution_ = other.distribution_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureDistributionIsMutable(); - distribution_.addAll(other.distribution_); - } - onChanged(); - } - } else { - if (!other.distribution_.isEmpty()) { - if (distributionBuilder_.isEmpty()) { - distributionBuilder_.dispose(); - distributionBuilder_ = null; - distribution_ = other.distribution_; - bitField0_ = (bitField0_ & ~0x00000002); - distributionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDistributionFieldBuilder() : null; - } else { - distributionBuilder_.addAllMessages(other.distribution_); - } - } - } - if (!other.getPackageType().isEmpty()) { - packageType_ = other.packageType_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getCpeUri().isEmpty()) { - cpeUri_ = other.cpeUri_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.architecture_ != 0) { - setArchitectureValue(other.getArchitectureValue()); - } - if (other.hasVersion()) { - mergeVersion(other.getVersion()); - } - if (!other.getMaintainer().isEmpty()) { - maintainer_ = other.maintainer_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - bitField0_ |= 0x00000080; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000100; - onChanged(); - } - if (other.hasLicense()) { - mergeLicense(other.getLicense()); - } - if (digestBuilder_ == null) { - if (!other.digest_.isEmpty()) { - if (digest_.isEmpty()) { - digest_ = other.digest_; - bitField0_ = (bitField0_ & ~0x00000400); - } else { - ensureDigestIsMutable(); - digest_.addAll(other.digest_); - } - onChanged(); - } - } else { - if (!other.digest_.isEmpty()) { - if (digestBuilder_.isEmpty()) { - digestBuilder_.dispose(); - digestBuilder_ = null; - digest_ = other.digest_; - bitField0_ = (bitField0_ & ~0x00000400); - digestBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDigestFieldBuilder() : null; - } else { - digestBuilder_.addAllMessages(other.digest_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 82: { - io.grafeas.v1.Distribution m = - input.readMessage( - io.grafeas.v1.Distribution.parser(), - extensionRegistry); - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - distribution_.add(m); - } else { - distributionBuilder_.addMessage(m); - } - break; - } // case 82 - case 90: { - packageType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 90 - case 98: { - cpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 98 - case 104: { - architecture_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 104 - case 114: { - input.readMessage( - getVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 114 - case 122: { - maintainer_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 122 - case 130: { - url_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 130 - case 138: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - break; - } // case 138 - case 146: { - input.readMessage( - getLicenseFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 146 - case 154: { - io.grafeas.v1.Digest m = - input.readMessage( - io.grafeas.v1.Digest.parser(), - extensionRegistry); - if (digestBuilder_ == null) { - ensureDigestIsMutable(); - digest_.add(m); - } else { - digestBuilder_.addMessage(m); - } - break; - } // case 154 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List distribution_ = - java.util.Collections.emptyList(); - private void ensureDistributionIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - distribution_ = new java.util.ArrayList(distribution_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Distribution, io.grafeas.v1.Distribution.Builder, io.grafeas.v1.DistributionOrBuilder> distributionBuilder_; - - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public java.util.List getDistributionList() { - if (distributionBuilder_ == null) { - return java.util.Collections.unmodifiableList(distribution_); - } else { - return distributionBuilder_.getMessageList(); - } - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public int getDistributionCount() { - if (distributionBuilder_ == null) { - return distribution_.size(); - } else { - return distributionBuilder_.getCount(); - } - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public io.grafeas.v1.Distribution getDistribution(int index) { - if (distributionBuilder_ == null) { - return distribution_.get(index); - } else { - return distributionBuilder_.getMessage(index); - } - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder setDistribution( - int index, io.grafeas.v1.Distribution value) { - if (distributionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDistributionIsMutable(); - distribution_.set(index, value); - onChanged(); - } else { - distributionBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder setDistribution( - int index, io.grafeas.v1.Distribution.Builder builderForValue) { - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - distribution_.set(index, builderForValue.build()); - onChanged(); - } else { - distributionBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder addDistribution(io.grafeas.v1.Distribution value) { - if (distributionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDistributionIsMutable(); - distribution_.add(value); - onChanged(); - } else { - distributionBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder addDistribution( - int index, io.grafeas.v1.Distribution value) { - if (distributionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDistributionIsMutable(); - distribution_.add(index, value); - onChanged(); - } else { - distributionBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder addDistribution( - io.grafeas.v1.Distribution.Builder builderForValue) { - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - distribution_.add(builderForValue.build()); - onChanged(); - } else { - distributionBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder addDistribution( - int index, io.grafeas.v1.Distribution.Builder builderForValue) { - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - distribution_.add(index, builderForValue.build()); - onChanged(); - } else { - distributionBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder addAllDistribution( - java.lang.Iterable values) { - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, distribution_); - onChanged(); - } else { - distributionBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder clearDistribution() { - if (distributionBuilder_ == null) { - distribution_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - distributionBuilder_.clear(); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder removeDistribution(int index) { - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - distribution_.remove(index); - onChanged(); - } else { - distributionBuilder_.remove(index); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public io.grafeas.v1.Distribution.Builder getDistributionBuilder( - int index) { - return getDistributionFieldBuilder().getBuilder(index); - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder( - int index) { - if (distributionBuilder_ == null) { - return distribution_.get(index); } else { - return distributionBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public java.util.List - getDistributionOrBuilderList() { - if (distributionBuilder_ != null) { - return distributionBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(distribution_); - } - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public io.grafeas.v1.Distribution.Builder addDistributionBuilder() { - return getDistributionFieldBuilder().addBuilder( - io.grafeas.v1.Distribution.getDefaultInstance()); - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public io.grafeas.v1.Distribution.Builder addDistributionBuilder( - int index) { - return getDistributionFieldBuilder().addBuilder( - index, io.grafeas.v1.Distribution.getDefaultInstance()); - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public java.util.List - getDistributionBuilderList() { - return getDistributionFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Distribution, io.grafeas.v1.Distribution.Builder, io.grafeas.v1.DistributionOrBuilder> - getDistributionFieldBuilder() { - if (distributionBuilder_ == null) { - distributionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Distribution, io.grafeas.v1.Distribution.Builder, io.grafeas.v1.DistributionOrBuilder>( - distribution_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - distribution_ = null; - } - return distributionBuilder_; - } - - private java.lang.Object packageType_ = ""; - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 11; - * @return The packageType. - */ - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 11; - * @return The bytes for packageType. - */ - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 11; - * @param value The packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - packageType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 11; - * @return This builder for chaining. - */ - public Builder clearPackageType() { - packageType_ = getDefaultInstance().getPackageType(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 11; - * @param value The bytes for packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - packageType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object cpeUri_ = ""; - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 12; - * @return The cpeUri. - */ - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 12; - * @return The bytes for cpeUri. - */ - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 12; - * @param value The cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 12; - * @return This builder for chaining. - */ - public Builder clearCpeUri() { - cpeUri_ = getDefaultInstance().getCpeUri(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 12; - * @param value The bytes for cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private int architecture_ = 0; - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @return The enum numeric value on the wire for architecture. - */ - @java.lang.Override public int getArchitectureValue() { - return architecture_; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @param value The enum numeric value on the wire for architecture to set. - * @return This builder for chaining. - */ - public Builder setArchitectureValue(int value) { - architecture_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @return The architecture. - */ - @java.lang.Override - public io.grafeas.v1.Architecture getArchitecture() { - io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); - return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @param value The architecture to set. - * @return This builder for chaining. - */ - public Builder setArchitecture(io.grafeas.v1.Architecture value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - architecture_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @return This builder for chaining. - */ - public Builder clearArchitecture() { - bitField0_ = (bitField0_ & ~0x00000010); - architecture_ = 0; - onChanged(); - return this; - } - - private io.grafeas.v1.Version version_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - * @return Whether the version field is set. - */ - public boolean hasVersion() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - * @return The version. - */ - public io.grafeas.v1.Version getVersion() { - if (versionBuilder_ == null) { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } else { - return versionBuilder_.getMessage(); - } - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - */ - public Builder setVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - } else { - versionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - */ - public Builder setVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (versionBuilder_ == null) { - version_ = builderForValue.build(); - } else { - versionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - */ - public Builder mergeVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - version_ != null && - version_ != io.grafeas.v1.Version.getDefaultInstance()) { - getVersionBuilder().mergeFrom(value); - } else { - version_ = value; - } - } else { - versionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - */ - public Builder clearVersion() { - bitField0_ = (bitField0_ & ~0x00000020); - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - */ - public io.grafeas.v1.Version.Builder getVersionBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getVersionFieldBuilder().getBuilder(); - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - */ - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - if (versionBuilder_ != null) { - return versionBuilder_.getMessageOrBuilder(); - } else { - return version_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : version_; - } - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getVersionFieldBuilder() { - if (versionBuilder_ == null) { - versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getVersion(), - getParentForChildren(), - isClean()); - version_ = null; - } - return versionBuilder_; - } - - private java.lang.Object maintainer_ = ""; - /** - *
-     * A freeform text denoting the maintainer of this package.
-     * 
- * - * string maintainer = 15; - * @return The maintainer. - */ - public java.lang.String getMaintainer() { - java.lang.Object ref = maintainer_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - maintainer_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A freeform text denoting the maintainer of this package.
-     * 
- * - * string maintainer = 15; - * @return The bytes for maintainer. - */ - public com.google.protobuf.ByteString - getMaintainerBytes() { - java.lang.Object ref = maintainer_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - maintainer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A freeform text denoting the maintainer of this package.
-     * 
- * - * string maintainer = 15; - * @param value The maintainer to set. - * @return This builder for chaining. - */ - public Builder setMaintainer( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - maintainer_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * A freeform text denoting the maintainer of this package.
-     * 
- * - * string maintainer = 15; - * @return This builder for chaining. - */ - public Builder clearMaintainer() { - maintainer_ = getDefaultInstance().getMaintainer(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - *
-     * A freeform text denoting the maintainer of this package.
-     * 
- * - * string maintainer = 15; - * @param value The bytes for maintainer to set. - * @return This builder for chaining. - */ - public Builder setMaintainerBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - maintainer_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-     * The homepage for this package.
-     * 
- * - * string url = 16; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The homepage for this package.
-     * 
- * - * string url = 16; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The homepage for this package.
-     * 
- * - * string url = 16; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - url_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The homepage for this package.
-     * 
- * - * string url = 16; - * @return This builder for chaining. - */ - public Builder clearUrl() { - url_ = getDefaultInstance().getUrl(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - /** - *
-     * The homepage for this package.
-     * 
- * - * string url = 16; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - url_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * The description of this package.
-     * 
- * - * string description = 17; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The description of this package.
-     * 
- * - * string description = 17; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The description of this package.
-     * 
- * - * string description = 17; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * The description of this package.
-     * 
- * - * string description = 17; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - *
-     * The description of this package.
-     * 
- * - * string description = 17; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - private io.grafeas.v1.License license_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> licenseBuilder_; - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - * @return Whether the license field is set. - */ - public boolean hasLicense() { - return ((bitField0_ & 0x00000200) != 0); - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - * @return The license. - */ - public io.grafeas.v1.License getLicense() { - if (licenseBuilder_ == null) { - return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; - } else { - return licenseBuilder_.getMessage(); - } - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - */ - public Builder setLicense(io.grafeas.v1.License value) { - if (licenseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - license_ = value; - } else { - licenseBuilder_.setMessage(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - */ - public Builder setLicense( - io.grafeas.v1.License.Builder builderForValue) { - if (licenseBuilder_ == null) { - license_ = builderForValue.build(); - } else { - licenseBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - */ - public Builder mergeLicense(io.grafeas.v1.License value) { - if (licenseBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) && - license_ != null && - license_ != io.grafeas.v1.License.getDefaultInstance()) { - getLicenseBuilder().mergeFrom(value); - } else { - license_ = value; - } - } else { - licenseBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - */ - public Builder clearLicense() { - bitField0_ = (bitField0_ & ~0x00000200); - license_ = null; - if (licenseBuilder_ != null) { - licenseBuilder_.dispose(); - licenseBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - */ - public io.grafeas.v1.License.Builder getLicenseBuilder() { - bitField0_ |= 0x00000200; - onChanged(); - return getLicenseFieldBuilder().getBuilder(); - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - */ - public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { - if (licenseBuilder_ != null) { - return licenseBuilder_.getMessageOrBuilder(); - } else { - return license_ == null ? - io.grafeas.v1.License.getDefaultInstance() : license_; - } - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> - getLicenseFieldBuilder() { - if (licenseBuilder_ == null) { - licenseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder>( - getLicense(), - getParentForChildren(), - isClean()); - license_ = null; - } - return licenseBuilder_; - } - - private java.util.List digest_ = - java.util.Collections.emptyList(); - private void ensureDigestIsMutable() { - if (!((bitField0_ & 0x00000400) != 0)) { - digest_ = new java.util.ArrayList(digest_); - bitField0_ |= 0x00000400; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder> digestBuilder_; - - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public java.util.List getDigestList() { - if (digestBuilder_ == null) { - return java.util.Collections.unmodifiableList(digest_); - } else { - return digestBuilder_.getMessageList(); - } - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public int getDigestCount() { - if (digestBuilder_ == null) { - return digest_.size(); - } else { - return digestBuilder_.getCount(); - } - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public io.grafeas.v1.Digest getDigest(int index) { - if (digestBuilder_ == null) { - return digest_.get(index); - } else { - return digestBuilder_.getMessage(index); - } - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder setDigest( - int index, io.grafeas.v1.Digest value) { - if (digestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDigestIsMutable(); - digest_.set(index, value); - onChanged(); - } else { - digestBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder setDigest( - int index, io.grafeas.v1.Digest.Builder builderForValue) { - if (digestBuilder_ == null) { - ensureDigestIsMutable(); - digest_.set(index, builderForValue.build()); - onChanged(); - } else { - digestBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder addDigest(io.grafeas.v1.Digest value) { - if (digestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDigestIsMutable(); - digest_.add(value); - onChanged(); - } else { - digestBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder addDigest( - int index, io.grafeas.v1.Digest value) { - if (digestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDigestIsMutable(); - digest_.add(index, value); - onChanged(); - } else { - digestBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder addDigest( - io.grafeas.v1.Digest.Builder builderForValue) { - if (digestBuilder_ == null) { - ensureDigestIsMutable(); - digest_.add(builderForValue.build()); - onChanged(); - } else { - digestBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder addDigest( - int index, io.grafeas.v1.Digest.Builder builderForValue) { - if (digestBuilder_ == null) { - ensureDigestIsMutable(); - digest_.add(index, builderForValue.build()); - onChanged(); - } else { - digestBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder addAllDigest( - java.lang.Iterable values) { - if (digestBuilder_ == null) { - ensureDigestIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, digest_); - onChanged(); - } else { - digestBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder clearDigest() { - if (digestBuilder_ == null) { - digest_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - } else { - digestBuilder_.clear(); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder removeDigest(int index) { - if (digestBuilder_ == null) { - ensureDigestIsMutable(); - digest_.remove(index); - onChanged(); - } else { - digestBuilder_.remove(index); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public io.grafeas.v1.Digest.Builder getDigestBuilder( - int index) { - return getDigestFieldBuilder().getBuilder(index); - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public io.grafeas.v1.DigestOrBuilder getDigestOrBuilder( - int index) { - if (digestBuilder_ == null) { - return digest_.get(index); } else { - return digestBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public java.util.List - getDigestOrBuilderList() { - if (digestBuilder_ != null) { - return digestBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(digest_); - } - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public io.grafeas.v1.Digest.Builder addDigestBuilder() { - return getDigestFieldBuilder().addBuilder( - io.grafeas.v1.Digest.getDefaultInstance()); - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public io.grafeas.v1.Digest.Builder addDigestBuilder( - int index) { - return getDigestFieldBuilder().addBuilder( - index, io.grafeas.v1.Digest.getDefaultInstance()); - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public java.util.List - getDigestBuilderList() { - return getDigestFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder> - getDigestFieldBuilder() { - if (digestBuilder_ == null) { - digestBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder>( - digest_, - ((bitField0_ & 0x00000400) != 0), - getParentForChildren(), - isClean()); - digest_ = null; - } - return digestBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.PackageNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.PackageNote) - private static final io.grafeas.v1.PackageNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.PackageNote(); - } - - public static io.grafeas.v1.PackageNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PackageNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.PackageNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java deleted file mode 100644 index e9bfeaf13aee..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java +++ /dev/null @@ -1,308 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -public interface PackageNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.PackageNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - java.util.List - getDistributionList(); - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - io.grafeas.v1.Distribution getDistribution(int index); - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - int getDistributionCount(); - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - java.util.List - getDistributionOrBuilderList(); - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder( - int index); - - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 11; - * @return The packageType. - */ - java.lang.String getPackageType(); - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 11; - * @return The bytes for packageType. - */ - com.google.protobuf.ByteString - getPackageTypeBytes(); - - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 12; - * @return The cpeUri. - */ - java.lang.String getCpeUri(); - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 12; - * @return The bytes for cpeUri. - */ - com.google.protobuf.ByteString - getCpeUriBytes(); - - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @return The enum numeric value on the wire for architecture. - */ - int getArchitectureValue(); - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @return The architecture. - */ - io.grafeas.v1.Architecture getArchitecture(); - - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 14; - * @return Whether the version field is set. - */ - boolean hasVersion(); - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 14; - * @return The version. - */ - io.grafeas.v1.Version getVersion(); - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 14; - */ - io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); - - /** - *
-   * A freeform text denoting the maintainer of this package.
-   * 
- * - * string maintainer = 15; - * @return The maintainer. - */ - java.lang.String getMaintainer(); - /** - *
-   * A freeform text denoting the maintainer of this package.
-   * 
- * - * string maintainer = 15; - * @return The bytes for maintainer. - */ - com.google.protobuf.ByteString - getMaintainerBytes(); - - /** - *
-   * The homepage for this package.
-   * 
- * - * string url = 16; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-   * The homepage for this package.
-   * 
- * - * string url = 16; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-   * The description of this package.
-   * 
- * - * string description = 17; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * The description of this package.
-   * 
- * - * string description = 17; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 18; - * @return Whether the license field is set. - */ - boolean hasLicense(); - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 18; - * @return The license. - */ - io.grafeas.v1.License getLicense(); - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 18; - */ - io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder(); - - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - java.util.List - getDigestList(); - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - io.grafeas.v1.Digest getDigest(int index); - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - int getDigestCount(); - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - java.util.List - getDigestOrBuilderList(); - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - io.grafeas.v1.DigestOrBuilder getDigestOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java deleted file mode 100644 index c5383f689414..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java +++ /dev/null @@ -1,1985 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -/** - *
- * Details on how a particular software package was installed on a system.
- * 
- * - * Protobuf type {@code grafeas.v1.PackageOccurrence} - */ -public final class PackageOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.PackageOccurrence) - PackageOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use PackageOccurrence.newBuilder() to construct. - private PackageOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PackageOccurrence() { - name_ = ""; - location_ = java.util.Collections.emptyList(); - packageType_ = ""; - cpeUri_ = ""; - architecture_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PackageOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.PackageOccurrence.class, io.grafeas.v1.PackageOccurrence.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the installed package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the installed package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List location_; - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - @java.lang.Override - public java.util.List getLocationList() { - return location_; - } - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - @java.lang.Override - public java.util.List - getLocationOrBuilderList() { - return location_; - } - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - @java.lang.Override - public int getLocationCount() { - return location_.size(); - } - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - @java.lang.Override - public io.grafeas.v1.Location getLocation(int index) { - return location_.get(index); - } - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - @java.lang.Override - public io.grafeas.v1.LocationOrBuilder getLocationOrBuilder( - int index) { - return location_.get(index); - } - - public static final int PACKAGE_TYPE_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object packageType_ = ""; - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The packageType. - */ - @java.lang.Override - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } - } - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for packageType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CPE_URI_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object cpeUri_ = ""; - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The cpeUri. - */ - @java.lang.Override - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } - } - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for cpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARCHITECTURE_FIELD_NUMBER = 5; - private int architecture_ = 0; - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for architecture. - */ - @java.lang.Override public int getArchitectureValue() { - return architecture_; - } - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The architecture. - */ - @java.lang.Override public io.grafeas.v1.Architecture getArchitecture() { - io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); - return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; - } - - public static final int LICENSE_FIELD_NUMBER = 6; - private io.grafeas.v1.License license_; - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 6; - * @return Whether the license field is set. - */ - @java.lang.Override - public boolean hasLicense() { - return license_ != null; - } - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 6; - * @return The license. - */ - @java.lang.Override - public io.grafeas.v1.License getLicense() { - return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; - } - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 6; - */ - @java.lang.Override - public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { - return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; - } - - public static final int VERSION_FIELD_NUMBER = 7; - private io.grafeas.v1.Version version_; - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the version field is set. - */ - @java.lang.Override - public boolean hasVersion() { - return version_ != null; - } - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The version. - */ - @java.lang.Override - public io.grafeas.v1.Version getVersion() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < location_.size(); i++) { - output.writeMessage(2, location_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, packageType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cpeUri_); - } - if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { - output.writeEnum(5, architecture_); - } - if (license_ != null) { - output.writeMessage(6, getLicense()); - } - if (version_ != null) { - output.writeMessage(7, getVersion()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - for (int i = 0; i < location_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, location_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, packageType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cpeUri_); - } - if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, architecture_); - } - if (license_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getLicense()); - } - if (version_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getVersion()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.PackageOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.PackageOccurrence other = (io.grafeas.v1.PackageOccurrence) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getLocationList() - .equals(other.getLocationList())) return false; - if (!getPackageType() - .equals(other.getPackageType())) return false; - if (!getCpeUri() - .equals(other.getCpeUri())) return false; - if (architecture_ != other.architecture_) return false; - if (hasLicense() != other.hasLicense()) return false; - if (hasLicense()) { - if (!getLicense() - .equals(other.getLicense())) return false; - } - if (hasVersion() != other.hasVersion()) return false; - if (hasVersion()) { - if (!getVersion() - .equals(other.getVersion())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getLocationCount() > 0) { - hash = (37 * hash) + LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getLocationList().hashCode(); - } - hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getPackageType().hashCode(); - hash = (37 * hash) + CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCpeUri().hashCode(); - hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; - hash = (53 * hash) + architecture_; - if (hasLicense()) { - hash = (37 * hash) + LICENSE_FIELD_NUMBER; - hash = (53 * hash) + getLicense().hashCode(); - } - if (hasVersion()) { - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.PackageOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.PackageOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.PackageOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.PackageOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.PackageOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.PackageOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.PackageOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.PackageOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.PackageOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.PackageOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.PackageOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.PackageOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.PackageOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Details on how a particular software package was installed on a system.
-   * 
- * - * Protobuf type {@code grafeas.v1.PackageOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.PackageOccurrence) - io.grafeas.v1.PackageOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.PackageOccurrence.class, io.grafeas.v1.PackageOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.PackageOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - if (locationBuilder_ == null) { - location_ = java.util.Collections.emptyList(); - } else { - location_ = null; - locationBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - packageType_ = ""; - cpeUri_ = ""; - architecture_ = 0; - license_ = null; - if (licenseBuilder_ != null) { - licenseBuilder_.dispose(); - licenseBuilder_ = null; - } - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.PackageOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.PackageOccurrence build() { - io.grafeas.v1.PackageOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.PackageOccurrence buildPartial() { - io.grafeas.v1.PackageOccurrence result = new io.grafeas.v1.PackageOccurrence(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.PackageOccurrence result) { - if (locationBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - location_ = java.util.Collections.unmodifiableList(location_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.location_ = location_; - } else { - result.location_ = locationBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.PackageOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.packageType_ = packageType_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.cpeUri_ = cpeUri_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.architecture_ = architecture_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.license_ = licenseBuilder_ == null - ? license_ - : licenseBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.version_ = versionBuilder_ == null - ? version_ - : versionBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.PackageOccurrence) { - return mergeFrom((io.grafeas.v1.PackageOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.PackageOccurrence other) { - if (other == io.grafeas.v1.PackageOccurrence.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (locationBuilder_ == null) { - if (!other.location_.isEmpty()) { - if (location_.isEmpty()) { - location_ = other.location_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLocationIsMutable(); - location_.addAll(other.location_); - } - onChanged(); - } - } else { - if (!other.location_.isEmpty()) { - if (locationBuilder_.isEmpty()) { - locationBuilder_.dispose(); - locationBuilder_ = null; - location_ = other.location_; - bitField0_ = (bitField0_ & ~0x00000002); - locationBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLocationFieldBuilder() : null; - } else { - locationBuilder_.addAllMessages(other.location_); - } - } - } - if (!other.getPackageType().isEmpty()) { - packageType_ = other.packageType_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getCpeUri().isEmpty()) { - cpeUri_ = other.cpeUri_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.architecture_ != 0) { - setArchitectureValue(other.getArchitectureValue()); - } - if (other.hasLicense()) { - mergeLicense(other.getLicense()); - } - if (other.hasVersion()) { - mergeVersion(other.getVersion()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - io.grafeas.v1.Location m = - input.readMessage( - io.grafeas.v1.Location.parser(), - extensionRegistry); - if (locationBuilder_ == null) { - ensureLocationIsMutable(); - location_.add(m); - } else { - locationBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: { - packageType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - cpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: { - architecture_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 50: { - input.readMessage( - getLicenseFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - input.readMessage( - getVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the installed package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the installed package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the installed package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the installed package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the installed package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List location_ = - java.util.Collections.emptyList(); - private void ensureLocationIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - location_ = new java.util.ArrayList(location_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Location, io.grafeas.v1.Location.Builder, io.grafeas.v1.LocationOrBuilder> locationBuilder_; - - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public java.util.List getLocationList() { - if (locationBuilder_ == null) { - return java.util.Collections.unmodifiableList(location_); - } else { - return locationBuilder_.getMessageList(); - } - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public int getLocationCount() { - if (locationBuilder_ == null) { - return location_.size(); - } else { - return locationBuilder_.getCount(); - } - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public io.grafeas.v1.Location getLocation(int index) { - if (locationBuilder_ == null) { - return location_.get(index); - } else { - return locationBuilder_.getMessage(index); - } - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder setLocation( - int index, io.grafeas.v1.Location value) { - if (locationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationIsMutable(); - location_.set(index, value); - onChanged(); - } else { - locationBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder setLocation( - int index, io.grafeas.v1.Location.Builder builderForValue) { - if (locationBuilder_ == null) { - ensureLocationIsMutable(); - location_.set(index, builderForValue.build()); - onChanged(); - } else { - locationBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder addLocation(io.grafeas.v1.Location value) { - if (locationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationIsMutable(); - location_.add(value); - onChanged(); - } else { - locationBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder addLocation( - int index, io.grafeas.v1.Location value) { - if (locationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationIsMutable(); - location_.add(index, value); - onChanged(); - } else { - locationBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder addLocation( - io.grafeas.v1.Location.Builder builderForValue) { - if (locationBuilder_ == null) { - ensureLocationIsMutable(); - location_.add(builderForValue.build()); - onChanged(); - } else { - locationBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder addLocation( - int index, io.grafeas.v1.Location.Builder builderForValue) { - if (locationBuilder_ == null) { - ensureLocationIsMutable(); - location_.add(index, builderForValue.build()); - onChanged(); - } else { - locationBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder addAllLocation( - java.lang.Iterable values) { - if (locationBuilder_ == null) { - ensureLocationIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, location_); - onChanged(); - } else { - locationBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder clearLocation() { - if (locationBuilder_ == null) { - location_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - locationBuilder_.clear(); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder removeLocation(int index) { - if (locationBuilder_ == null) { - ensureLocationIsMutable(); - location_.remove(index); - onChanged(); - } else { - locationBuilder_.remove(index); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public io.grafeas.v1.Location.Builder getLocationBuilder( - int index) { - return getLocationFieldBuilder().getBuilder(index); - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public io.grafeas.v1.LocationOrBuilder getLocationOrBuilder( - int index) { - if (locationBuilder_ == null) { - return location_.get(index); } else { - return locationBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public java.util.List - getLocationOrBuilderList() { - if (locationBuilder_ != null) { - return locationBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(location_); - } - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public io.grafeas.v1.Location.Builder addLocationBuilder() { - return getLocationFieldBuilder().addBuilder( - io.grafeas.v1.Location.getDefaultInstance()); - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public io.grafeas.v1.Location.Builder addLocationBuilder( - int index) { - return getLocationFieldBuilder().addBuilder( - index, io.grafeas.v1.Location.getDefaultInstance()); - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public java.util.List - getLocationBuilderList() { - return getLocationFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Location, io.grafeas.v1.Location.Builder, io.grafeas.v1.LocationOrBuilder> - getLocationFieldBuilder() { - if (locationBuilder_ == null) { - locationBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Location, io.grafeas.v1.Location.Builder, io.grafeas.v1.LocationOrBuilder>( - location_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - location_ = null; - } - return locationBuilder_; - } - - private java.lang.Object packageType_ = ""; - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The packageType. - */ - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for packageType. - */ - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - packageType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearPackageType() { - packageType_ = getDefaultInstance().getPackageType(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - packageType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object cpeUri_ = ""; - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The cpeUri. - */ - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for cpeUri. - */ - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearCpeUri() { - cpeUri_ = getDefaultInstance().getCpeUri(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private int architecture_ = 0; - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for architecture. - */ - @java.lang.Override public int getArchitectureValue() { - return architecture_; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The enum numeric value on the wire for architecture to set. - * @return This builder for chaining. - */ - public Builder setArchitectureValue(int value) { - architecture_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The architecture. - */ - @java.lang.Override - public io.grafeas.v1.Architecture getArchitecture() { - io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); - return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The architecture to set. - * @return This builder for chaining. - */ - public Builder setArchitecture(io.grafeas.v1.Architecture value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - architecture_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearArchitecture() { - bitField0_ = (bitField0_ & ~0x00000010); - architecture_ = 0; - onChanged(); - return this; - } - - private io.grafeas.v1.License license_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> licenseBuilder_; - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - * @return Whether the license field is set. - */ - public boolean hasLicense() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - * @return The license. - */ - public io.grafeas.v1.License getLicense() { - if (licenseBuilder_ == null) { - return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; - } else { - return licenseBuilder_.getMessage(); - } - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - */ - public Builder setLicense(io.grafeas.v1.License value) { - if (licenseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - license_ = value; - } else { - licenseBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - */ - public Builder setLicense( - io.grafeas.v1.License.Builder builderForValue) { - if (licenseBuilder_ == null) { - license_ = builderForValue.build(); - } else { - licenseBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - */ - public Builder mergeLicense(io.grafeas.v1.License value) { - if (licenseBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - license_ != null && - license_ != io.grafeas.v1.License.getDefaultInstance()) { - getLicenseBuilder().mergeFrom(value); - } else { - license_ = value; - } - } else { - licenseBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - */ - public Builder clearLicense() { - bitField0_ = (bitField0_ & ~0x00000020); - license_ = null; - if (licenseBuilder_ != null) { - licenseBuilder_.dispose(); - licenseBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - */ - public io.grafeas.v1.License.Builder getLicenseBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getLicenseFieldBuilder().getBuilder(); - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - */ - public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { - if (licenseBuilder_ != null) { - return licenseBuilder_.getMessageOrBuilder(); - } else { - return license_ == null ? - io.grafeas.v1.License.getDefaultInstance() : license_; - } - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> - getLicenseFieldBuilder() { - if (licenseBuilder_ == null) { - licenseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder>( - getLicense(), - getParentForChildren(), - isClean()); - license_ = null; - } - return licenseBuilder_; - } - - private io.grafeas.v1.Version version_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the version field is set. - */ - public boolean hasVersion() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The version. - */ - public io.grafeas.v1.Version getVersion() { - if (versionBuilder_ == null) { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } else { - return versionBuilder_.getMessage(); - } - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - } else { - versionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (versionBuilder_ == null) { - version_ = builderForValue.build(); - } else { - versionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - version_ != null && - version_ != io.grafeas.v1.Version.getDefaultInstance()) { - getVersionBuilder().mergeFrom(value); - } else { - version_ = value; - } - } else { - versionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearVersion() { - bitField0_ = (bitField0_ & ~0x00000040); - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public io.grafeas.v1.Version.Builder getVersionBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getVersionFieldBuilder().getBuilder(); - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - if (versionBuilder_ != null) { - return versionBuilder_.getMessageOrBuilder(); - } else { - return version_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : version_; - } - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getVersionFieldBuilder() { - if (versionBuilder_ == null) { - versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getVersion(), - getParentForChildren(), - isClean()); - version_ = null; - } - return versionBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.PackageOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.PackageOccurrence) - private static final io.grafeas.v1.PackageOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.PackageOccurrence(); - } - - public static io.grafeas.v1.PackageOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PackageOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.PackageOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java deleted file mode 100644 index 52fa9a813313..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java +++ /dev/null @@ -1,199 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -public interface PackageOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.PackageOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the installed package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the installed package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - java.util.List - getLocationList(); - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - io.grafeas.v1.Location getLocation(int index); - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - int getLocationCount(); - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - java.util.List - getLocationOrBuilderList(); - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - io.grafeas.v1.LocationOrBuilder getLocationOrBuilder( - int index); - - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The packageType. - */ - java.lang.String getPackageType(); - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for packageType. - */ - com.google.protobuf.ByteString - getPackageTypeBytes(); - - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The cpeUri. - */ - java.lang.String getCpeUri(); - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for cpeUri. - */ - com.google.protobuf.ByteString - getCpeUriBytes(); - - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for architecture. - */ - int getArchitectureValue(); - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The architecture. - */ - io.grafeas.v1.Architecture getArchitecture(); - - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 6; - * @return Whether the license field is set. - */ - boolean hasLicense(); - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 6; - * @return The license. - */ - io.grafeas.v1.License getLicense(); - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 6; - */ - io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder(); - - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the version field is set. - */ - boolean hasVersion(); - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The version. - */ - io.grafeas.v1.Version getVersion(); - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java deleted file mode 100644 index 8cfc04621ecb..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ProjectName implements ResourceName { - private static final PathTemplate PROJECT = - PathTemplate.createWithoutUrlEncoding("projects/{project}"); - private volatile Map fieldValuesMap; - private final String project; - - @Deprecated - protected ProjectName() { - project = null; - } - - private ProjectName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - } - - public String getProject() { - return project; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ProjectName of(String project) { - return newBuilder().setProject(project).build(); - } - - public static String format(String project) { - return newBuilder().setProject(project).build().toString(); - } - - public static ProjectName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT.validatedMatch( - formattedString, "ProjectName.parse: formattedString not in valid format"); - return of(matchMap.get("project")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ProjectName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT.instantiate("project", project); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ProjectName that = ((ProjectName) o); - return Objects.equals(this.project, that.project); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - return h; - } - - /** Builder for projects/{project}. */ - public static class Builder { - private String project; - - protected Builder() {} - - public String getProject() { - return project; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - private Builder(ProjectName projectName) { - this.project = projectName.project; - } - - public ProjectName build() { - return new ProjectName(this); - } - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java deleted file mode 100644 index 2e04badc87e5..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java +++ /dev/null @@ -1,746 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * Selects a repo using a Google Cloud Platform project ID (e.g.,
- * winged-cargo-31) and a repo name within that project.
- * 
- * - * Protobuf type {@code grafeas.v1.ProjectRepoId} - */ -public final class ProjectRepoId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ProjectRepoId) - ProjectRepoIdOrBuilder { -private static final long serialVersionUID = 0L; - // Use ProjectRepoId.newBuilder() to construct. - private ProjectRepoId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProjectRepoId() { - projectId_ = ""; - repoName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProjectRepoId(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ProjectRepoId.class, io.grafeas.v1.ProjectRepoId.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object projectId_ = ""; - /** - *
-   * The ID of the project.
-   * 
- * - * string project_id = 1; - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - *
-   * The ID of the project.
-   * 
- * - * string project_id = 1; - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REPO_NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object repoName_ = ""; - /** - *
-   * The name of the repo. Leave empty for the default repo.
-   * 
- * - * string repo_name = 2; - * @return The repoName. - */ - @java.lang.Override - public java.lang.String getRepoName() { - java.lang.Object ref = repoName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - repoName_ = s; - return s; - } - } - /** - *
-   * The name of the repo. Leave empty for the default repo.
-   * 
- * - * string repo_name = 2; - * @return The bytes for repoName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRepoNameBytes() { - java.lang.Object ref = repoName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - repoName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repoName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, repoName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repoName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, repoName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ProjectRepoId)) { - return super.equals(obj); - } - io.grafeas.v1.ProjectRepoId other = (io.grafeas.v1.ProjectRepoId) obj; - - if (!getProjectId() - .equals(other.getProjectId())) return false; - if (!getRepoName() - .equals(other.getRepoName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REPO_NAME_FIELD_NUMBER; - hash = (53 * hash) + getRepoName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ProjectRepoId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ProjectRepoId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ProjectRepoId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ProjectRepoId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ProjectRepoId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ProjectRepoId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ProjectRepoId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ProjectRepoId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ProjectRepoId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ProjectRepoId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ProjectRepoId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ProjectRepoId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ProjectRepoId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Selects a repo using a Google Cloud Platform project ID (e.g.,
-   * winged-cargo-31) and a repo name within that project.
-   * 
- * - * Protobuf type {@code grafeas.v1.ProjectRepoId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ProjectRepoId) - io.grafeas.v1.ProjectRepoIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ProjectRepoId.class, io.grafeas.v1.ProjectRepoId.Builder.class); - } - - // Construct using io.grafeas.v1.ProjectRepoId.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - projectId_ = ""; - repoName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ProjectRepoId getDefaultInstanceForType() { - return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ProjectRepoId build() { - io.grafeas.v1.ProjectRepoId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ProjectRepoId buildPartial() { - io.grafeas.v1.ProjectRepoId result = new io.grafeas.v1.ProjectRepoId(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.ProjectRepoId result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.projectId_ = projectId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.repoName_ = repoName_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ProjectRepoId) { - return mergeFrom((io.grafeas.v1.ProjectRepoId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ProjectRepoId other) { - if (other == io.grafeas.v1.ProjectRepoId.getDefaultInstance()) return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getRepoName().isEmpty()) { - repoName_ = other.repoName_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - projectId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - repoName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object projectId_ = ""; - /** - *
-     * The ID of the project.
-     * 
- * - * string project_id = 1; - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The ID of the project.
-     * 
- * - * string project_id = 1; - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The ID of the project.
-     * 
- * - * string project_id = 1; - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - projectId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The ID of the project.
-     * 
- * - * string project_id = 1; - * @return This builder for chaining. - */ - public Builder clearProjectId() { - projectId_ = getDefaultInstance().getProjectId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The ID of the project.
-     * 
- * - * string project_id = 1; - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - projectId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object repoName_ = ""; - /** - *
-     * The name of the repo. Leave empty for the default repo.
-     * 
- * - * string repo_name = 2; - * @return The repoName. - */ - public java.lang.String getRepoName() { - java.lang.Object ref = repoName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - repoName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the repo. Leave empty for the default repo.
-     * 
- * - * string repo_name = 2; - * @return The bytes for repoName. - */ - public com.google.protobuf.ByteString - getRepoNameBytes() { - java.lang.Object ref = repoName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - repoName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the repo. Leave empty for the default repo.
-     * 
- * - * string repo_name = 2; - * @param value The repoName to set. - * @return This builder for chaining. - */ - public Builder setRepoName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - repoName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The name of the repo. Leave empty for the default repo.
-     * 
- * - * string repo_name = 2; - * @return This builder for chaining. - */ - public Builder clearRepoName() { - repoName_ = getDefaultInstance().getRepoName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The name of the repo. Leave empty for the default repo.
-     * 
- * - * string repo_name = 2; - * @param value The bytes for repoName to set. - * @return This builder for chaining. - */ - public Builder setRepoNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - repoName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ProjectRepoId) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ProjectRepoId) - private static final io.grafeas.v1.ProjectRepoId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ProjectRepoId(); - } - - public static io.grafeas.v1.ProjectRepoId getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ProjectRepoId parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ProjectRepoId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java deleted file mode 100644 index 3c9ea6025916..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java +++ /dev/null @@ -1,49 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface ProjectRepoIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ProjectRepoId) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The ID of the project.
-   * 
- * - * string project_id = 1; - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - *
-   * The ID of the project.
-   * 
- * - * string project_id = 1; - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString - getProjectIdBytes(); - - /** - *
-   * The name of the repo. Leave empty for the default repo.
-   * 
- * - * string repo_name = 2; - * @return The repoName. - */ - java.lang.String getRepoName(); - /** - *
-   * The name of the repo. Leave empty for the default repo.
-   * 
- * - * string repo_name = 2; - * @return The bytes for repoName. - */ - com.google.protobuf.ByteString - getRepoNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java deleted file mode 100644 index 97c8f268ca63..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java +++ /dev/null @@ -1,266 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public final class Provenance { - private Provenance() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BuildProvenance_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Source_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Source_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Source_FileHashesEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Source_FileHashesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_FileHashes_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_FileHashes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Hash_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Hash_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Command_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Command_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Artifact_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Artifact_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SourceContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SourceContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SourceContext_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_AliasContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_AliasContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_GerritSourceContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_GitSourceContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_RepoId_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_RepoId_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ProjectRepoId_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\033grafeas/v1/provenance.proto\022\ngrafeas.v" + - "1\032\037google/protobuf/timestamp.proto\"\220\004\n\017B" + - "uildProvenance\022\n\n\002id\030\001 \001(\t\022\022\n\nproject_id" + - "\030\002 \001(\t\022%\n\010commands\030\003 \003(\0132\023.grafeas.v1.Co" + - "mmand\022-\n\017built_artifacts\030\004 \003(\0132\024.grafeas" + - ".v1.Artifact\022/\n\013create_time\030\005 \001(\0132\032.goog" + - "le.protobuf.Timestamp\022.\n\nstart_time\030\006 \001(" + - "\0132\032.google.protobuf.Timestamp\022,\n\010end_tim" + - "e\030\007 \001(\0132\032.google.protobuf.Timestamp\022\017\n\007c" + - "reator\030\010 \001(\t\022\020\n\010logs_uri\030\t \001(\t\022-\n\021source" + - "_provenance\030\n \001(\0132\022.grafeas.v1.Source\022\022\n" + - "\ntrigger_id\030\013 \001(\t\022D\n\rbuild_options\030\014 \003(\013" + - "2-.grafeas.v1.BuildProvenance.BuildOptio" + - "nsEntry\022\027\n\017builder_version\030\r \001(\t\0323\n\021Buil" + - "dOptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + - "\t:\0028\001\"\225\002\n\006Source\022#\n\033artifact_storage_sou" + - "rce_uri\030\001 \001(\t\0227\n\013file_hashes\030\002 \003(\0132\".gra" + - "feas.v1.Source.FileHashesEntry\022*\n\007contex" + - "t\030\003 \001(\0132\031.grafeas.v1.SourceContext\0226\n\023ad" + - "ditional_contexts\030\004 \003(\0132\031.grafeas.v1.Sou" + - "rceContext\032I\n\017FileHashesEntry\022\013\n\003key\030\001 \001" + - "(\t\022%\n\005value\030\002 \001(\0132\026.grafeas.v1.FileHashe" + - "s:\0028\001\"1\n\nFileHashes\022#\n\tfile_hash\030\001 \003(\0132\020" + - ".grafeas.v1.Hash\"#\n\004Hash\022\014\n\004type\030\001 \001(\t\022\r" + - "\n\005value\030\002 \001(\014\"]\n\007Command\022\014\n\004name\030\001 \001(\t\022\013" + - "\n\003env\030\002 \003(\t\022\014\n\004args\030\003 \003(\t\022\013\n\003dir\030\004 \001(\t\022\n" + - "\n\002id\030\005 \001(\t\022\020\n\010wait_for\030\006 \003(\t\"7\n\010Artifact" + - "\022\020\n\010checksum\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\r\n\005names\030" + - "\003 \003(\t\"\232\002\n\rSourceContext\0228\n\ncloud_repo\030\001 " + - "\001(\0132\".grafeas.v1.CloudRepoSourceContextH" + - "\000\0221\n\006gerrit\030\002 \001(\0132\037.grafeas.v1.GerritSou" + - "rceContextH\000\022+\n\003git\030\003 \001(\0132\034.grafeas.v1.G" + - "itSourceContextH\000\0225\n\006labels\030\004 \003(\0132%.graf" + - "eas.v1.SourceContext.LabelsEntry\032-\n\013Labe" + - "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B" + - "\t\n\007context\"\212\001\n\014AliasContext\022+\n\004kind\030\001 \001(" + - "\0162\035.grafeas.v1.AliasContext.Kind\022\014\n\004name" + - "\030\002 \001(\t\"?\n\004Kind\022\024\n\020KIND_UNSPECIFIED\020\000\022\t\n\005" + - "FIXED\020\001\022\013\n\007MOVABLE\020\002\022\t\n\005OTHER\020\004\"\223\001\n\026Clou" + - "dRepoSourceContext\022#\n\007repo_id\030\001 \001(\0132\022.gr" + - "afeas.v1.RepoId\022\025\n\013revision_id\030\002 \001(\tH\000\0221" + - "\n\ralias_context\030\003 \001(\0132\030.grafeas.v1.Alias" + - "ContextH\000B\n\n\010revision\"\225\001\n\023GerritSourceCo" + - "ntext\022\020\n\010host_uri\030\001 \001(\t\022\026\n\016gerrit_projec" + - "t\030\002 \001(\t\022\025\n\013revision_id\030\003 \001(\tH\000\0221\n\ralias_" + - "context\030\004 \001(\0132\030.grafeas.v1.AliasContextH" + - "\000B\n\n\010revision\"4\n\020GitSourceContext\022\013\n\003url" + - "\030\001 \001(\t\022\023\n\013revision_id\030\002 \001(\t\"S\n\006RepoId\0224\n" + - "\017project_repo_id\030\001 \001(\0132\031.grafeas.v1.Proj" + - "ectRepoIdH\000\022\r\n\003uid\030\002 \001(\tH\000B\004\n\002id\"6\n\rProj" + - "ectRepoId\022\022\n\nproject_id\030\001 \001(\t\022\021\n\trepo_na" + - "me\030\002 \001(\tBQ\n\rio.grafeas.v1P\001Z8google.gola" + - "ng.org/genproto/googleapis/grafeas/v1;gr" + - "afeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_grafeas_v1_BuildProvenance_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BuildProvenance_descriptor, - new java.lang.String[] { "Id", "ProjectId", "Commands", "BuiltArtifacts", "CreateTime", "StartTime", "EndTime", "Creator", "LogsUri", "SourceProvenance", "TriggerId", "BuildOptions", "BuilderVersion", }); - internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor = - internal_static_grafeas_v1_BuildProvenance_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grafeas_v1_Source_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Source_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Source_descriptor, - new java.lang.String[] { "ArtifactStorageSourceUri", "FileHashes", "Context", "AdditionalContexts", }); - internal_static_grafeas_v1_Source_FileHashesEntry_descriptor = - internal_static_grafeas_v1_Source_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_Source_FileHashesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Source_FileHashesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grafeas_v1_FileHashes_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_FileHashes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_FileHashes_descriptor, - new java.lang.String[] { "FileHash", }); - internal_static_grafeas_v1_Hash_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_Hash_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Hash_descriptor, - new java.lang.String[] { "Type", "Value", }); - internal_static_grafeas_v1_Command_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_grafeas_v1_Command_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Command_descriptor, - new java.lang.String[] { "Name", "Env", "Args", "Dir", "Id", "WaitFor", }); - internal_static_grafeas_v1_Artifact_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_grafeas_v1_Artifact_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Artifact_descriptor, - new java.lang.String[] { "Checksum", "Id", "Names", }); - internal_static_grafeas_v1_SourceContext_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_grafeas_v1_SourceContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SourceContext_descriptor, - new java.lang.String[] { "CloudRepo", "Gerrit", "Git", "Labels", "Context", }); - internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor = - internal_static_grafeas_v1_SourceContext_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_SourceContext_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grafeas_v1_AliasContext_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_grafeas_v1_AliasContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_AliasContext_descriptor, - new java.lang.String[] { "Kind", "Name", }); - internal_static_grafeas_v1_CloudRepoSourceContext_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_CloudRepoSourceContext_descriptor, - new java.lang.String[] { "RepoId", "RevisionId", "AliasContext", "Revision", }); - internal_static_grafeas_v1_GerritSourceContext_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_GerritSourceContext_descriptor, - new java.lang.String[] { "HostUri", "GerritProject", "RevisionId", "AliasContext", "Revision", }); - internal_static_grafeas_v1_GitSourceContext_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_GitSourceContext_descriptor, - new java.lang.String[] { "Url", "RevisionId", }); - internal_static_grafeas_v1_RepoId_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_grafeas_v1_RepoId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_RepoId_descriptor, - new java.lang.String[] { "ProjectRepoId", "Uid", "Id", }); - internal_static_grafeas_v1_ProjectRepoId_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ProjectRepoId_descriptor, - new java.lang.String[] { "ProjectId", "RepoName", }); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java deleted file mode 100644 index eb956626b15c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java +++ /dev/null @@ -1,1954 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -/** - *
- * Steps taken to build the artifact.
- * For a TaskRun, typically each container corresponds to one step in the
- * recipe.
- * 
- * - * Protobuf type {@code grafeas.v1.Recipe} - */ -public final class Recipe extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Recipe) - RecipeOrBuilder { -private static final long serialVersionUID = 0L; - // Use Recipe.newBuilder() to construct. - private Recipe(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Recipe() { - type_ = ""; - entryPoint_ = ""; - arguments_ = java.util.Collections.emptyList(); - environment_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Recipe(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Recipe.class, io.grafeas.v1.Recipe.Builder.class); - } - - public static final int TYPE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object type_ = ""; - /** - *
-   * URI indicating what type of recipe was performed. It determines the meaning
-   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-   * 
- * - * string type = 1; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } - } - /** - *
-   * URI indicating what type of recipe was performed. It determines the meaning
-   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-   * 
- * - * string type = 1; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEFINED_IN_MATERIAL_FIELD_NUMBER = 2; - private long definedInMaterial_ = 0L; - /** - *
-   * Index in materials containing the recipe steps that are not implied by
-   * recipe.type. For example, if the recipe type were "make", then this would
-   * point to the source containing the Makefile, not the make program itself.
-   * Set to -1 if the recipe doesn't come from a material, as zero is default
-   * unset value for int64.
-   * 
- * - * int64 defined_in_material = 2; - * @return The definedInMaterial. - */ - @java.lang.Override - public long getDefinedInMaterial() { - return definedInMaterial_; - } - - public static final int ENTRY_POINT_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object entryPoint_ = ""; - /** - *
-   * String identifying the entry point into the build.
-   * This is often a path to a configuration file and/or a target label within
-   * that file. The syntax and meaning are defined by recipe.type. For example,
-   * if the recipe type were "make", then this would reference the directory in
-   * which to run make as well as which target to use.
-   * 
- * - * string entry_point = 3; - * @return The entryPoint. - */ - @java.lang.Override - public java.lang.String getEntryPoint() { - java.lang.Object ref = entryPoint_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entryPoint_ = s; - return s; - } - } - /** - *
-   * String identifying the entry point into the build.
-   * This is often a path to a configuration file and/or a target label within
-   * that file. The syntax and meaning are defined by recipe.type. For example,
-   * if the recipe type were "make", then this would reference the directory in
-   * which to run make as well as which target to use.
-   * 
- * - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEntryPointBytes() { - java.lang.Object ref = entryPoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entryPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARGUMENTS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List arguments_; - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - @java.lang.Override - public java.util.List getArgumentsList() { - return arguments_; - } - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - @java.lang.Override - public java.util.List - getArgumentsOrBuilderList() { - return arguments_; - } - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - @java.lang.Override - public int getArgumentsCount() { - return arguments_.size(); - } - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - @java.lang.Override - public com.google.protobuf.Any getArguments(int index) { - return arguments_.get(index); - } - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder( - int index) { - return arguments_.get(index); - } - - public static final int ENVIRONMENT_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private java.util.List environment_; - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - @java.lang.Override - public java.util.List getEnvironmentList() { - return environment_; - } - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - @java.lang.Override - public java.util.List - getEnvironmentOrBuilderList() { - return environment_; - } - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - @java.lang.Override - public int getEnvironmentCount() { - return environment_.size(); - } - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - @java.lang.Override - public com.google.protobuf.Any getEnvironment(int index) { - return environment_.get(index); - } - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder( - int index) { - return environment_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); - } - if (definedInMaterial_ != 0L) { - output.writeInt64(2, definedInMaterial_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entryPoint_); - } - for (int i = 0; i < arguments_.size(); i++) { - output.writeMessage(4, arguments_.get(i)); - } - for (int i = 0; i < environment_.size(); i++) { - output.writeMessage(5, environment_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); - } - if (definedInMaterial_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, definedInMaterial_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entryPoint_); - } - for (int i = 0; i < arguments_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, arguments_.get(i)); - } - for (int i = 0; i < environment_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, environment_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Recipe)) { - return super.equals(obj); - } - io.grafeas.v1.Recipe other = (io.grafeas.v1.Recipe) obj; - - if (!getType() - .equals(other.getType())) return false; - if (getDefinedInMaterial() - != other.getDefinedInMaterial()) return false; - if (!getEntryPoint() - .equals(other.getEntryPoint())) return false; - if (!getArgumentsList() - .equals(other.getArgumentsList())) return false; - if (!getEnvironmentList() - .equals(other.getEnvironmentList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - hash = (37 * hash) + DEFINED_IN_MATERIAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getDefinedInMaterial()); - hash = (37 * hash) + ENTRY_POINT_FIELD_NUMBER; - hash = (53 * hash) + getEntryPoint().hashCode(); - if (getArgumentsCount() > 0) { - hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; - hash = (53 * hash) + getArgumentsList().hashCode(); - } - if (getEnvironmentCount() > 0) { - hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; - hash = (53 * hash) + getEnvironmentList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Recipe parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Recipe parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Recipe parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Recipe parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Recipe parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Recipe parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Recipe parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Recipe parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Recipe parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Recipe parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Recipe parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Recipe parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Recipe prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Steps taken to build the artifact.
-   * For a TaskRun, typically each container corresponds to one step in the
-   * recipe.
-   * 
- * - * Protobuf type {@code grafeas.v1.Recipe} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Recipe) - io.grafeas.v1.RecipeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Recipe.class, io.grafeas.v1.Recipe.Builder.class); - } - - // Construct using io.grafeas.v1.Recipe.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = ""; - definedInMaterial_ = 0L; - entryPoint_ = ""; - if (argumentsBuilder_ == null) { - arguments_ = java.util.Collections.emptyList(); - } else { - arguments_ = null; - argumentsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - if (environmentBuilder_ == null) { - environment_ = java.util.Collections.emptyList(); - } else { - environment_ = null; - environmentBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Recipe getDefaultInstanceForType() { - return io.grafeas.v1.Recipe.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Recipe build() { - io.grafeas.v1.Recipe result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Recipe buildPartial() { - io.grafeas.v1.Recipe result = new io.grafeas.v1.Recipe(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.Recipe result) { - if (argumentsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - arguments_ = java.util.Collections.unmodifiableList(arguments_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.arguments_ = arguments_; - } else { - result.arguments_ = argumentsBuilder_.build(); - } - if (environmentBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - environment_ = java.util.Collections.unmodifiableList(environment_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.environment_ = environment_; - } else { - result.environment_ = environmentBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.Recipe result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.definedInMaterial_ = definedInMaterial_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.entryPoint_ = entryPoint_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Recipe) { - return mergeFrom((io.grafeas.v1.Recipe)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Recipe other) { - if (other == io.grafeas.v1.Recipe.getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getDefinedInMaterial() != 0L) { - setDefinedInMaterial(other.getDefinedInMaterial()); - } - if (!other.getEntryPoint().isEmpty()) { - entryPoint_ = other.entryPoint_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (argumentsBuilder_ == null) { - if (!other.arguments_.isEmpty()) { - if (arguments_.isEmpty()) { - arguments_ = other.arguments_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureArgumentsIsMutable(); - arguments_.addAll(other.arguments_); - } - onChanged(); - } - } else { - if (!other.arguments_.isEmpty()) { - if (argumentsBuilder_.isEmpty()) { - argumentsBuilder_.dispose(); - argumentsBuilder_ = null; - arguments_ = other.arguments_; - bitField0_ = (bitField0_ & ~0x00000008); - argumentsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getArgumentsFieldBuilder() : null; - } else { - argumentsBuilder_.addAllMessages(other.arguments_); - } - } - } - if (environmentBuilder_ == null) { - if (!other.environment_.isEmpty()) { - if (environment_.isEmpty()) { - environment_ = other.environment_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureEnvironmentIsMutable(); - environment_.addAll(other.environment_); - } - onChanged(); - } - } else { - if (!other.environment_.isEmpty()) { - if (environmentBuilder_.isEmpty()) { - environmentBuilder_.dispose(); - environmentBuilder_ = null; - environment_ = other.environment_; - bitField0_ = (bitField0_ & ~0x00000010); - environmentBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getEnvironmentFieldBuilder() : null; - } else { - environmentBuilder_.addAllMessages(other.environment_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - type_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - definedInMaterial_ = input.readInt64(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - entryPoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - com.google.protobuf.Any m = - input.readMessage( - com.google.protobuf.Any.parser(), - extensionRegistry); - if (argumentsBuilder_ == null) { - ensureArgumentsIsMutable(); - arguments_.add(m); - } else { - argumentsBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: { - com.google.protobuf.Any m = - input.readMessage( - com.google.protobuf.Any.parser(), - extensionRegistry); - if (environmentBuilder_ == null) { - ensureEnvironmentIsMutable(); - environment_.add(m); - } else { - environmentBuilder_.addMessage(m); - } - break; - } // case 42 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object type_ = ""; - /** - *
-     * URI indicating what type of recipe was performed. It determines the meaning
-     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-     * 
- * - * string type = 1; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * URI indicating what type of recipe was performed. It determines the meaning
-     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-     * 
- * - * string type = 1; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * URI indicating what type of recipe was performed. It determines the meaning
-     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-     * 
- * - * string type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * URI indicating what type of recipe was performed. It determines the meaning
-     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-     * 
- * - * string type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - type_ = getDefaultInstance().getType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * URI indicating what type of recipe was performed. It determines the meaning
-     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-     * 
- * - * string type = 1; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private long definedInMaterial_ ; - /** - *
-     * Index in materials containing the recipe steps that are not implied by
-     * recipe.type. For example, if the recipe type were "make", then this would
-     * point to the source containing the Makefile, not the make program itself.
-     * Set to -1 if the recipe doesn't come from a material, as zero is default
-     * unset value for int64.
-     * 
- * - * int64 defined_in_material = 2; - * @return The definedInMaterial. - */ - @java.lang.Override - public long getDefinedInMaterial() { - return definedInMaterial_; - } - /** - *
-     * Index in materials containing the recipe steps that are not implied by
-     * recipe.type. For example, if the recipe type were "make", then this would
-     * point to the source containing the Makefile, not the make program itself.
-     * Set to -1 if the recipe doesn't come from a material, as zero is default
-     * unset value for int64.
-     * 
- * - * int64 defined_in_material = 2; - * @param value The definedInMaterial to set. - * @return This builder for chaining. - */ - public Builder setDefinedInMaterial(long value) { - - definedInMaterial_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Index in materials containing the recipe steps that are not implied by
-     * recipe.type. For example, if the recipe type were "make", then this would
-     * point to the source containing the Makefile, not the make program itself.
-     * Set to -1 if the recipe doesn't come from a material, as zero is default
-     * unset value for int64.
-     * 
- * - * int64 defined_in_material = 2; - * @return This builder for chaining. - */ - public Builder clearDefinedInMaterial() { - bitField0_ = (bitField0_ & ~0x00000002); - definedInMaterial_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object entryPoint_ = ""; - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For example,
-     * if the recipe type were "make", then this would reference the directory in
-     * which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @return The entryPoint. - */ - public java.lang.String getEntryPoint() { - java.lang.Object ref = entryPoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entryPoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For example,
-     * if the recipe type were "make", then this would reference the directory in
-     * which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - public com.google.protobuf.ByteString - getEntryPointBytes() { - java.lang.Object ref = entryPoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entryPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For example,
-     * if the recipe type were "make", then this would reference the directory in
-     * which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @param value The entryPoint to set. - * @return This builder for chaining. - */ - public Builder setEntryPoint( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - entryPoint_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For example,
-     * if the recipe type were "make", then this would reference the directory in
-     * which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @return This builder for chaining. - */ - public Builder clearEntryPoint() { - entryPoint_ = getDefaultInstance().getEntryPoint(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For example,
-     * if the recipe type were "make", then this would reference the directory in
-     * which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @param value The bytes for entryPoint to set. - * @return This builder for chaining. - */ - public Builder setEntryPointBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - entryPoint_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.util.List arguments_ = - java.util.Collections.emptyList(); - private void ensureArgumentsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - arguments_ = new java.util.ArrayList(arguments_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> argumentsBuilder_; - - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public java.util.List getArgumentsList() { - if (argumentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(arguments_); - } else { - return argumentsBuilder_.getMessageList(); - } - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public int getArgumentsCount() { - if (argumentsBuilder_ == null) { - return arguments_.size(); - } else { - return argumentsBuilder_.getCount(); - } - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public com.google.protobuf.Any getArguments(int index) { - if (argumentsBuilder_ == null) { - return arguments_.get(index); - } else { - return argumentsBuilder_.getMessage(index); - } - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder setArguments( - int index, com.google.protobuf.Any value) { - if (argumentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgumentsIsMutable(); - arguments_.set(index, value); - onChanged(); - } else { - argumentsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder setArguments( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (argumentsBuilder_ == null) { - ensureArgumentsIsMutable(); - arguments_.set(index, builderForValue.build()); - onChanged(); - } else { - argumentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder addArguments(com.google.protobuf.Any value) { - if (argumentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgumentsIsMutable(); - arguments_.add(value); - onChanged(); - } else { - argumentsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder addArguments( - int index, com.google.protobuf.Any value) { - if (argumentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgumentsIsMutable(); - arguments_.add(index, value); - onChanged(); - } else { - argumentsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder addArguments( - com.google.protobuf.Any.Builder builderForValue) { - if (argumentsBuilder_ == null) { - ensureArgumentsIsMutable(); - arguments_.add(builderForValue.build()); - onChanged(); - } else { - argumentsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder addArguments( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (argumentsBuilder_ == null) { - ensureArgumentsIsMutable(); - arguments_.add(index, builderForValue.build()); - onChanged(); - } else { - argumentsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder addAllArguments( - java.lang.Iterable values) { - if (argumentsBuilder_ == null) { - ensureArgumentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, arguments_); - onChanged(); - } else { - argumentsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder clearArguments() { - if (argumentsBuilder_ == null) { - arguments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - argumentsBuilder_.clear(); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder removeArguments(int index) { - if (argumentsBuilder_ == null) { - ensureArgumentsIsMutable(); - arguments_.remove(index); - onChanged(); - } else { - argumentsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public com.google.protobuf.Any.Builder getArgumentsBuilder( - int index) { - return getArgumentsFieldBuilder().getBuilder(index); - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder( - int index) { - if (argumentsBuilder_ == null) { - return arguments_.get(index); } else { - return argumentsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public java.util.List - getArgumentsOrBuilderList() { - if (argumentsBuilder_ != null) { - return argumentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(arguments_); - } - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public com.google.protobuf.Any.Builder addArgumentsBuilder() { - return getArgumentsFieldBuilder().addBuilder( - com.google.protobuf.Any.getDefaultInstance()); - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public com.google.protobuf.Any.Builder addArgumentsBuilder( - int index) { - return getArgumentsFieldBuilder().addBuilder( - index, com.google.protobuf.Any.getDefaultInstance()); - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public java.util.List - getArgumentsBuilderList() { - return getArgumentsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getArgumentsFieldBuilder() { - if (argumentsBuilder_ == null) { - argumentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - arguments_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - arguments_ = null; - } - return argumentsBuilder_; - } - - private java.util.List environment_ = - java.util.Collections.emptyList(); - private void ensureEnvironmentIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - environment_ = new java.util.ArrayList(environment_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> environmentBuilder_; - - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public java.util.List getEnvironmentList() { - if (environmentBuilder_ == null) { - return java.util.Collections.unmodifiableList(environment_); - } else { - return environmentBuilder_.getMessageList(); - } - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public int getEnvironmentCount() { - if (environmentBuilder_ == null) { - return environment_.size(); - } else { - return environmentBuilder_.getCount(); - } - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public com.google.protobuf.Any getEnvironment(int index) { - if (environmentBuilder_ == null) { - return environment_.get(index); - } else { - return environmentBuilder_.getMessage(index); - } - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder setEnvironment( - int index, com.google.protobuf.Any value) { - if (environmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnvironmentIsMutable(); - environment_.set(index, value); - onChanged(); - } else { - environmentBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder setEnvironment( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (environmentBuilder_ == null) { - ensureEnvironmentIsMutable(); - environment_.set(index, builderForValue.build()); - onChanged(); - } else { - environmentBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder addEnvironment(com.google.protobuf.Any value) { - if (environmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnvironmentIsMutable(); - environment_.add(value); - onChanged(); - } else { - environmentBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder addEnvironment( - int index, com.google.protobuf.Any value) { - if (environmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnvironmentIsMutable(); - environment_.add(index, value); - onChanged(); - } else { - environmentBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder addEnvironment( - com.google.protobuf.Any.Builder builderForValue) { - if (environmentBuilder_ == null) { - ensureEnvironmentIsMutable(); - environment_.add(builderForValue.build()); - onChanged(); - } else { - environmentBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder addEnvironment( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (environmentBuilder_ == null) { - ensureEnvironmentIsMutable(); - environment_.add(index, builderForValue.build()); - onChanged(); - } else { - environmentBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder addAllEnvironment( - java.lang.Iterable values) { - if (environmentBuilder_ == null) { - ensureEnvironmentIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, environment_); - onChanged(); - } else { - environmentBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder clearEnvironment() { - if (environmentBuilder_ == null) { - environment_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - environmentBuilder_.clear(); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder removeEnvironment(int index) { - if (environmentBuilder_ == null) { - ensureEnvironmentIsMutable(); - environment_.remove(index); - onChanged(); - } else { - environmentBuilder_.remove(index); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public com.google.protobuf.Any.Builder getEnvironmentBuilder( - int index) { - return getEnvironmentFieldBuilder().getBuilder(index); - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder( - int index) { - if (environmentBuilder_ == null) { - return environment_.get(index); } else { - return environmentBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public java.util.List - getEnvironmentOrBuilderList() { - if (environmentBuilder_ != null) { - return environmentBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(environment_); - } - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public com.google.protobuf.Any.Builder addEnvironmentBuilder() { - return getEnvironmentFieldBuilder().addBuilder( - com.google.protobuf.Any.getDefaultInstance()); - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public com.google.protobuf.Any.Builder addEnvironmentBuilder( - int index) { - return getEnvironmentFieldBuilder().addBuilder( - index, com.google.protobuf.Any.getDefaultInstance()); - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public java.util.List - getEnvironmentBuilderList() { - return getEnvironmentFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getEnvironmentFieldBuilder() { - if (environmentBuilder_ == null) { - environmentBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - environment_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - environment_ = null; - } - return environmentBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Recipe) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Recipe) - private static final io.grafeas.v1.Recipe DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Recipe(); - } - - public static io.grafeas.v1.Recipe getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Recipe parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Recipe getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java deleted file mode 100644 index c45233e0a691..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java +++ /dev/null @@ -1,201 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -public interface RecipeOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Recipe) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * URI indicating what type of recipe was performed. It determines the meaning
-   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-   * 
- * - * string type = 1; - * @return The type. - */ - java.lang.String getType(); - /** - *
-   * URI indicating what type of recipe was performed. It determines the meaning
-   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-   * 
- * - * string type = 1; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - *
-   * Index in materials containing the recipe steps that are not implied by
-   * recipe.type. For example, if the recipe type were "make", then this would
-   * point to the source containing the Makefile, not the make program itself.
-   * Set to -1 if the recipe doesn't come from a material, as zero is default
-   * unset value for int64.
-   * 
- * - * int64 defined_in_material = 2; - * @return The definedInMaterial. - */ - long getDefinedInMaterial(); - - /** - *
-   * String identifying the entry point into the build.
-   * This is often a path to a configuration file and/or a target label within
-   * that file. The syntax and meaning are defined by recipe.type. For example,
-   * if the recipe type were "make", then this would reference the directory in
-   * which to run make as well as which target to use.
-   * 
- * - * string entry_point = 3; - * @return The entryPoint. - */ - java.lang.String getEntryPoint(); - /** - *
-   * String identifying the entry point into the build.
-   * This is often a path to a configuration file and/or a target label within
-   * that file. The syntax and meaning are defined by recipe.type. For example,
-   * if the recipe type were "make", then this would reference the directory in
-   * which to run make as well as which target to use.
-   * 
- * - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - com.google.protobuf.ByteString - getEntryPointBytes(); - - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - java.util.List - getArgumentsList(); - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - com.google.protobuf.Any getArguments(int index); - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - int getArgumentsCount(); - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - java.util.List - getArgumentsOrBuilderList(); - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder( - int index); - - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - java.util.List - getEnvironmentList(); - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - com.google.protobuf.Any getEnvironment(int index); - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - int getEnvironmentCount(); - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - java.util.List - getEnvironmentOrBuilderList(); - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java deleted file mode 100644 index 6f36de79b4d2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java +++ /dev/null @@ -1,744 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - *
- * Metadata for any related URL information.
- * 
- * - * Protobuf type {@code grafeas.v1.RelatedUrl} - */ -public final class RelatedUrl extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.RelatedUrl) - RelatedUrlOrBuilder { -private static final long serialVersionUID = 0L; - // Use RelatedUrl.newBuilder() to construct. - private RelatedUrl(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RelatedUrl() { - url_ = ""; - label_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RelatedUrl(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.RelatedUrl.class, io.grafeas.v1.RelatedUrl.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object url_ = ""; - /** - *
-   * Specific URL associated with the resource.
-   * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-   * Specific URL associated with the resource.
-   * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABEL_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object label_ = ""; - /** - *
-   * Label to describe usage of the URL.
-   * 
- * - * string label = 2; - * @return The label. - */ - @java.lang.Override - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } - } - /** - *
-   * Label to describe usage of the URL.
-   * 
- * - * string label = 2; - * @return The bytes for label. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, label_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, label_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.RelatedUrl)) { - return super.equals(obj); - } - io.grafeas.v1.RelatedUrl other = (io.grafeas.v1.RelatedUrl) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (!getLabel() - .equals(other.getLabel())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + LABEL_FIELD_NUMBER; - hash = (53 * hash) + getLabel().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.RelatedUrl parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.RelatedUrl parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.RelatedUrl parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.RelatedUrl parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.RelatedUrl parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.RelatedUrl parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.RelatedUrl parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.RelatedUrl parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.RelatedUrl parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.RelatedUrl parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.RelatedUrl parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.RelatedUrl parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.RelatedUrl prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Metadata for any related URL information.
-   * 
- * - * Protobuf type {@code grafeas.v1.RelatedUrl} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.RelatedUrl) - io.grafeas.v1.RelatedUrlOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.RelatedUrl.class, io.grafeas.v1.RelatedUrl.Builder.class); - } - - // Construct using io.grafeas.v1.RelatedUrl.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - url_ = ""; - label_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.RelatedUrl getDefaultInstanceForType() { - return io.grafeas.v1.RelatedUrl.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.RelatedUrl build() { - io.grafeas.v1.RelatedUrl result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.RelatedUrl buildPartial() { - io.grafeas.v1.RelatedUrl result = new io.grafeas.v1.RelatedUrl(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.RelatedUrl result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.url_ = url_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.label_ = label_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.RelatedUrl) { - return mergeFrom((io.grafeas.v1.RelatedUrl)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.RelatedUrl other) { - if (other == io.grafeas.v1.RelatedUrl.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getLabel().isEmpty()) { - label_ = other.label_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - url_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - label_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object url_ = ""; - /** - *
-     * Specific URL associated with the resource.
-     * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Specific URL associated with the resource.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Specific URL associated with the resource.
-     * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - url_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Specific URL associated with the resource.
-     * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - url_ = getDefaultInstance().getUrl(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Specific URL associated with the resource.
-     * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - url_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object label_ = ""; - /** - *
-     * Label to describe usage of the URL.
-     * 
- * - * string label = 2; - * @return The label. - */ - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Label to describe usage of the URL.
-     * 
- * - * string label = 2; - * @return The bytes for label. - */ - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Label to describe usage of the URL.
-     * 
- * - * string label = 2; - * @param value The label to set. - * @return This builder for chaining. - */ - public Builder setLabel( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - label_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Label to describe usage of the URL.
-     * 
- * - * string label = 2; - * @return This builder for chaining. - */ - public Builder clearLabel() { - label_ = getDefaultInstance().getLabel(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Label to describe usage of the URL.
-     * 
- * - * string label = 2; - * @param value The bytes for label to set. - * @return This builder for chaining. - */ - public Builder setLabelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - label_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.RelatedUrl) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.RelatedUrl) - private static final io.grafeas.v1.RelatedUrl DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.RelatedUrl(); - } - - public static io.grafeas.v1.RelatedUrl getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RelatedUrl parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.RelatedUrl getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java deleted file mode 100644 index f90406db3f4f..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java +++ /dev/null @@ -1,49 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public interface RelatedUrlOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.RelatedUrl) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Specific URL associated with the resource.
-   * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-   * Specific URL associated with the resource.
-   * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-   * Label to describe usage of the URL.
-   * 
- * - * string label = 2; - * @return The label. - */ - java.lang.String getLabel(); - /** - *
-   * Label to describe usage of the URL.
-   * 
- * - * string label = 2; - * @return The bytes for label. - */ - com.google.protobuf.ByteString - getLabelBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java deleted file mode 100644 index 0ee53da9cea2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java +++ /dev/null @@ -1,955 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * A unique identifier for a Cloud Repo.
- * 
- * - * Protobuf type {@code grafeas.v1.RepoId} - */ -public final class RepoId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.RepoId) - RepoIdOrBuilder { -private static final long serialVersionUID = 0L; - // Use RepoId.newBuilder() to construct. - private RepoId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RepoId() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RepoId(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.RepoId.class, io.grafeas.v1.RepoId.Builder.class); - } - - private int idCase_ = 0; - private java.lang.Object id_; - public enum IdCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - PROJECT_REPO_ID(1), - UID(2), - ID_NOT_SET(0); - private final int value; - private IdCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static IdCase valueOf(int value) { - return forNumber(value); - } - - public static IdCase forNumber(int value) { - switch (value) { - case 1: return PROJECT_REPO_ID; - case 2: return UID; - case 0: return ID_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public IdCase - getIdCase() { - return IdCase.forNumber( - idCase_); - } - - public static final int PROJECT_REPO_ID_FIELD_NUMBER = 1; - /** - *
-   * A combination of a project ID and a repo name.
-   * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @return Whether the projectRepoId field is set. - */ - @java.lang.Override - public boolean hasProjectRepoId() { - return idCase_ == 1; - } - /** - *
-   * A combination of a project ID and a repo name.
-   * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @return The projectRepoId. - */ - @java.lang.Override - public io.grafeas.v1.ProjectRepoId getProjectRepoId() { - if (idCase_ == 1) { - return (io.grafeas.v1.ProjectRepoId) id_; - } - return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); - } - /** - *
-   * A combination of a project ID and a repo name.
-   * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - @java.lang.Override - public io.grafeas.v1.ProjectRepoIdOrBuilder getProjectRepoIdOrBuilder() { - if (idCase_ == 1) { - return (io.grafeas.v1.ProjectRepoId) id_; - } - return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); - } - - public static final int UID_FIELD_NUMBER = 2; - /** - *
-   * A server-assigned, globally unique identifier.
-   * 
- * - * string uid = 2; - * @return Whether the uid field is set. - */ - public boolean hasUid() { - return idCase_ == 2; - } - /** - *
-   * A server-assigned, globally unique identifier.
-   * 
- * - * string uid = 2; - * @return The uid. - */ - public java.lang.String getUid() { - java.lang.Object ref = ""; - if (idCase_ == 2) { - ref = id_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (idCase_ == 2) { - id_ = s; - } - return s; - } - } - /** - *
-   * A server-assigned, globally unique identifier.
-   * 
- * - * string uid = 2; - * @return The bytes for uid. - */ - public com.google.protobuf.ByteString - getUidBytes() { - java.lang.Object ref = ""; - if (idCase_ == 2) { - ref = id_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (idCase_ == 2) { - id_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (idCase_ == 1) { - output.writeMessage(1, (io.grafeas.v1.ProjectRepoId) id_); - } - if (idCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (idCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (io.grafeas.v1.ProjectRepoId) id_); - } - if (idCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.RepoId)) { - return super.equals(obj); - } - io.grafeas.v1.RepoId other = (io.grafeas.v1.RepoId) obj; - - if (!getIdCase().equals(other.getIdCase())) return false; - switch (idCase_) { - case 1: - if (!getProjectRepoId() - .equals(other.getProjectRepoId())) return false; - break; - case 2: - if (!getUid() - .equals(other.getUid())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (idCase_) { - case 1: - hash = (37 * hash) + PROJECT_REPO_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectRepoId().hashCode(); - break; - case 2: - hash = (37 * hash) + UID_FIELD_NUMBER; - hash = (53 * hash) + getUid().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.RepoId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.RepoId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.RepoId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.RepoId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.RepoId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.RepoId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.RepoId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.RepoId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.RepoId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.RepoId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.RepoId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.RepoId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.RepoId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A unique identifier for a Cloud Repo.
-   * 
- * - * Protobuf type {@code grafeas.v1.RepoId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.RepoId) - io.grafeas.v1.RepoIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.RepoId.class, io.grafeas.v1.RepoId.Builder.class); - } - - // Construct using io.grafeas.v1.RepoId.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (projectRepoIdBuilder_ != null) { - projectRepoIdBuilder_.clear(); - } - idCase_ = 0; - id_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.RepoId getDefaultInstanceForType() { - return io.grafeas.v1.RepoId.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.RepoId build() { - io.grafeas.v1.RepoId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.RepoId buildPartial() { - io.grafeas.v1.RepoId result = new io.grafeas.v1.RepoId(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.RepoId result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(io.grafeas.v1.RepoId result) { - result.idCase_ = idCase_; - result.id_ = this.id_; - if (idCase_ == 1 && - projectRepoIdBuilder_ != null) { - result.id_ = projectRepoIdBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.RepoId) { - return mergeFrom((io.grafeas.v1.RepoId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.RepoId other) { - if (other == io.grafeas.v1.RepoId.getDefaultInstance()) return this; - switch (other.getIdCase()) { - case PROJECT_REPO_ID: { - mergeProjectRepoId(other.getProjectRepoId()); - break; - } - case UID: { - idCase_ = 2; - id_ = other.id_; - onChanged(); - break; - } - case ID_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getProjectRepoIdFieldBuilder().getBuilder(), - extensionRegistry); - idCase_ = 1; - break; - } // case 10 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - idCase_ = 2; - id_ = s; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int idCase_ = 0; - private java.lang.Object id_; - public IdCase - getIdCase() { - return IdCase.forNumber( - idCase_); - } - - public Builder clearId() { - idCase_ = 0; - id_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ProjectRepoId, io.grafeas.v1.ProjectRepoId.Builder, io.grafeas.v1.ProjectRepoIdOrBuilder> projectRepoIdBuilder_; - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @return Whether the projectRepoId field is set. - */ - @java.lang.Override - public boolean hasProjectRepoId() { - return idCase_ == 1; - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @return The projectRepoId. - */ - @java.lang.Override - public io.grafeas.v1.ProjectRepoId getProjectRepoId() { - if (projectRepoIdBuilder_ == null) { - if (idCase_ == 1) { - return (io.grafeas.v1.ProjectRepoId) id_; - } - return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); - } else { - if (idCase_ == 1) { - return projectRepoIdBuilder_.getMessage(); - } - return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); - } - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - public Builder setProjectRepoId(io.grafeas.v1.ProjectRepoId value) { - if (projectRepoIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - id_ = value; - onChanged(); - } else { - projectRepoIdBuilder_.setMessage(value); - } - idCase_ = 1; - return this; - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - public Builder setProjectRepoId( - io.grafeas.v1.ProjectRepoId.Builder builderForValue) { - if (projectRepoIdBuilder_ == null) { - id_ = builderForValue.build(); - onChanged(); - } else { - projectRepoIdBuilder_.setMessage(builderForValue.build()); - } - idCase_ = 1; - return this; - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - public Builder mergeProjectRepoId(io.grafeas.v1.ProjectRepoId value) { - if (projectRepoIdBuilder_ == null) { - if (idCase_ == 1 && - id_ != io.grafeas.v1.ProjectRepoId.getDefaultInstance()) { - id_ = io.grafeas.v1.ProjectRepoId.newBuilder((io.grafeas.v1.ProjectRepoId) id_) - .mergeFrom(value).buildPartial(); - } else { - id_ = value; - } - onChanged(); - } else { - if (idCase_ == 1) { - projectRepoIdBuilder_.mergeFrom(value); - } else { - projectRepoIdBuilder_.setMessage(value); - } - } - idCase_ = 1; - return this; - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - public Builder clearProjectRepoId() { - if (projectRepoIdBuilder_ == null) { - if (idCase_ == 1) { - idCase_ = 0; - id_ = null; - onChanged(); - } - } else { - if (idCase_ == 1) { - idCase_ = 0; - id_ = null; - } - projectRepoIdBuilder_.clear(); - } - return this; - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - public io.grafeas.v1.ProjectRepoId.Builder getProjectRepoIdBuilder() { - return getProjectRepoIdFieldBuilder().getBuilder(); - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - @java.lang.Override - public io.grafeas.v1.ProjectRepoIdOrBuilder getProjectRepoIdOrBuilder() { - if ((idCase_ == 1) && (projectRepoIdBuilder_ != null)) { - return projectRepoIdBuilder_.getMessageOrBuilder(); - } else { - if (idCase_ == 1) { - return (io.grafeas.v1.ProjectRepoId) id_; - } - return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); - } - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ProjectRepoId, io.grafeas.v1.ProjectRepoId.Builder, io.grafeas.v1.ProjectRepoIdOrBuilder> - getProjectRepoIdFieldBuilder() { - if (projectRepoIdBuilder_ == null) { - if (!(idCase_ == 1)) { - id_ = io.grafeas.v1.ProjectRepoId.getDefaultInstance(); - } - projectRepoIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ProjectRepoId, io.grafeas.v1.ProjectRepoId.Builder, io.grafeas.v1.ProjectRepoIdOrBuilder>( - (io.grafeas.v1.ProjectRepoId) id_, - getParentForChildren(), - isClean()); - id_ = null; - } - idCase_ = 1; - onChanged(); - return projectRepoIdBuilder_; - } - - /** - *
-     * A server-assigned, globally unique identifier.
-     * 
- * - * string uid = 2; - * @return Whether the uid field is set. - */ - @java.lang.Override - public boolean hasUid() { - return idCase_ == 2; - } - /** - *
-     * A server-assigned, globally unique identifier.
-     * 
- * - * string uid = 2; - * @return The uid. - */ - @java.lang.Override - public java.lang.String getUid() { - java.lang.Object ref = ""; - if (idCase_ == 2) { - ref = id_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (idCase_ == 2) { - id_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A server-assigned, globally unique identifier.
-     * 
- * - * string uid = 2; - * @return The bytes for uid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUidBytes() { - java.lang.Object ref = ""; - if (idCase_ == 2) { - ref = id_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (idCase_ == 2) { - id_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A server-assigned, globally unique identifier.
-     * 
- * - * string uid = 2; - * @param value The uid to set. - * @return This builder for chaining. - */ - public Builder setUid( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - idCase_ = 2; - id_ = value; - onChanged(); - return this; - } - /** - *
-     * A server-assigned, globally unique identifier.
-     * 
- * - * string uid = 2; - * @return This builder for chaining. - */ - public Builder clearUid() { - if (idCase_ == 2) { - idCase_ = 0; - id_ = null; - onChanged(); - } - return this; - } - /** - *
-     * A server-assigned, globally unique identifier.
-     * 
- * - * string uid = 2; - * @param value The bytes for uid to set. - * @return This builder for chaining. - */ - public Builder setUidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - idCase_ = 2; - id_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.RepoId) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.RepoId) - private static final io.grafeas.v1.RepoId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.RepoId(); - } - - public static io.grafeas.v1.RepoId getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepoId parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.RepoId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java deleted file mode 100644 index 0bc7c33ef942..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java +++ /dev/null @@ -1,67 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface RepoIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.RepoId) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A combination of a project ID and a repo name.
-   * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @return Whether the projectRepoId field is set. - */ - boolean hasProjectRepoId(); - /** - *
-   * A combination of a project ID and a repo name.
-   * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @return The projectRepoId. - */ - io.grafeas.v1.ProjectRepoId getProjectRepoId(); - /** - *
-   * A combination of a project ID and a repo name.
-   * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - io.grafeas.v1.ProjectRepoIdOrBuilder getProjectRepoIdOrBuilder(); - - /** - *
-   * A server-assigned, globally unique identifier.
-   * 
- * - * string uid = 2; - * @return Whether the uid field is set. - */ - boolean hasUid(); - /** - *
-   * A server-assigned, globally unique identifier.
-   * 
- * - * string uid = 2; - * @return The uid. - */ - java.lang.String getUid(); - /** - *
-   * A server-assigned, globally unique identifier.
-   * 
- * - * string uid = 2; - * @return The bytes for uid. - */ - com.google.protobuf.ByteString - getUidBytes(); - - public io.grafeas.v1.RepoId.IdCase getIdCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java deleted file mode 100644 index 5201a5381fd1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java +++ /dev/null @@ -1,201 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/severity.proto - -package io.grafeas.v1; - -/** - *
- * Note provider assigned severity/impact ranking.
- * 
- * - * Protobuf enum {@code grafeas.v1.Severity} - */ -public enum Severity - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unknown.
-   * 
- * - * SEVERITY_UNSPECIFIED = 0; - */ - SEVERITY_UNSPECIFIED(0), - /** - *
-   * Minimal severity.
-   * 
- * - * MINIMAL = 1; - */ - MINIMAL(1), - /** - *
-   * Low severity.
-   * 
- * - * LOW = 2; - */ - LOW(2), - /** - *
-   * Medium severity.
-   * 
- * - * MEDIUM = 3; - */ - MEDIUM(3), - /** - *
-   * High severity.
-   * 
- * - * HIGH = 4; - */ - HIGH(4), - /** - *
-   * Critical severity.
-   * 
- * - * CRITICAL = 5; - */ - CRITICAL(5), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unknown.
-   * 
- * - * SEVERITY_UNSPECIFIED = 0; - */ - public static final int SEVERITY_UNSPECIFIED_VALUE = 0; - /** - *
-   * Minimal severity.
-   * 
- * - * MINIMAL = 1; - */ - public static final int MINIMAL_VALUE = 1; - /** - *
-   * Low severity.
-   * 
- * - * LOW = 2; - */ - public static final int LOW_VALUE = 2; - /** - *
-   * Medium severity.
-   * 
- * - * MEDIUM = 3; - */ - public static final int MEDIUM_VALUE = 3; - /** - *
-   * High severity.
-   * 
- * - * HIGH = 4; - */ - public static final int HIGH_VALUE = 4; - /** - *
-   * Critical severity.
-   * 
- * - * CRITICAL = 5; - */ - public static final int CRITICAL_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Severity valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Severity forNumber(int value) { - switch (value) { - case 0: return SEVERITY_UNSPECIFIED; - case 1: return MINIMAL; - case 2: return LOW; - case 3: return MEDIUM; - case 4: return HIGH; - case 5: return CRITICAL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Severity> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Severity findValueByNumber(int number) { - return Severity.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.SeverityOuterClass.getDescriptor().getEnumTypes().get(0); - } - - private static final Severity[] VALUES = values(); - - public static Severity valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Severity(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.Severity) -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java deleted file mode 100644 index 2181e45065aa..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java +++ /dev/null @@ -1,40 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/severity.proto - -package io.grafeas.v1; - -public final class SeverityOuterClass { - private SeverityOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\031grafeas/v1/severity.proto\022\ngrafeas.v1*" + - "^\n\010Severity\022\030\n\024SEVERITY_UNSPECIFIED\020\000\022\013\n" + - "\007MINIMAL\020\001\022\007\n\003LOW\020\002\022\n\n\006MEDIUM\020\003\022\010\n\004HIGH\020" + - "\004\022\014\n\010CRITICAL\020\005BQ\n\rio.grafeas.v1P\001Z8goog" + - "le.golang.org/genproto/googleapis/grafea" + - "s/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java deleted file mode 100644 index 66964ee7bd73..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java +++ /dev/null @@ -1,812 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - *
- * Verifiers (e.g. Kritis implementations) MUST verify signatures
- * with respect to the trust anchors defined in policy (e.g. a Kritis policy).
- * Typically this means that the verifier has been configured with a map from
- * `public_key_id` to public key material (and any required parameters, e.g.
- * signing algorithm).
- * In particular, verification implementations MUST NOT treat the signature
- * `public_key_id` as anything more than a key lookup hint. The `public_key_id`
- * DOES NOT validate or authenticate a public key; it only provides a mechanism
- * for quickly selecting a public key ALREADY CONFIGURED on the verifier through
- * a trusted channel. Verification implementations MUST reject signatures in any
- * of the following circumstances:
- *   * The `public_key_id` is not recognized by the verifier.
- *   * The public key that `public_key_id` refers to does not verify the
- *     signature with respect to the payload.
- * The `signature` contents SHOULD NOT be "attached" (where the payload is
- * included with the serialized `signature` bytes). Verifiers MUST ignore any
- * "attached" payload and only verify signatures with respect to explicitly
- * provided payload (e.g. a `payload` field on the proto message that holds
- * this Signature, or the canonical serialization of the proto message that
- * holds this signature).
- * 
- * - * Protobuf type {@code grafeas.v1.Signature} - */ -public final class Signature extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Signature) - SignatureOrBuilder { -private static final long serialVersionUID = 0L; - // Use Signature.newBuilder() to construct. - private Signature(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Signature() { - signature_ = com.google.protobuf.ByteString.EMPTY; - publicKeyId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Signature(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Signature.class, io.grafeas.v1.Signature.Builder.class); - } - - public static final int SIGNATURE_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-   * The content of the signature, an opaque bytestring.
-   * The payload that this signature verifies MUST be unambiguously provided
-   * with the Signature during verification. A wrapper message might provide
-   * the payload explicitly. Alternatively, a message might have a canonical
-   * serialization that can always be unambiguously computed to derive the
-   * payload.
-   * 
- * - * bytes signature = 1; - * @return The signature. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSignature() { - return signature_; - } - - public static final int PUBLIC_KEY_ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object publicKeyId_ = ""; - /** - *
-   * The identifier for the public key that verifies this signature.
-   *   * The `public_key_id` is required.
-   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-   *     such as a cryptographic digest.
-   * Examples of valid `public_key_id`s:
-   * OpenPGP V4 public key fingerprint:
-   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-   * details on this scheme.
-   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-   * serialization):
-   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-   * 
- * - * string public_key_id = 2; - * @return The publicKeyId. - */ - @java.lang.Override - public java.lang.String getPublicKeyId() { - java.lang.Object ref = publicKeyId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKeyId_ = s; - return s; - } - } - /** - *
-   * The identifier for the public key that verifies this signature.
-   *   * The `public_key_id` is required.
-   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-   *     such as a cryptographic digest.
-   * Examples of valid `public_key_id`s:
-   * OpenPGP V4 public key fingerprint:
-   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-   * details on this scheme.
-   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-   * serialization):
-   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-   * 
- * - * string public_key_id = 2; - * @return The bytes for publicKeyId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPublicKeyIdBytes() { - java.lang.Object ref = publicKeyId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKeyId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!signature_.isEmpty()) { - output.writeBytes(1, signature_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, publicKeyId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!signature_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, signature_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, publicKeyId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Signature)) { - return super.equals(obj); - } - io.grafeas.v1.Signature other = (io.grafeas.v1.Signature) obj; - - if (!getSignature() - .equals(other.getSignature())) return false; - if (!getPublicKeyId() - .equals(other.getPublicKeyId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; - hash = (53 * hash) + getSignature().hashCode(); - hash = (37 * hash) + PUBLIC_KEY_ID_FIELD_NUMBER; - hash = (53 * hash) + getPublicKeyId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Signature parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Signature parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Signature parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Signature parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Signature parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Signature parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Signature parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Signature parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Signature parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Signature parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Signature parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Signature parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Signature prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Verifiers (e.g. Kritis implementations) MUST verify signatures
-   * with respect to the trust anchors defined in policy (e.g. a Kritis policy).
-   * Typically this means that the verifier has been configured with a map from
-   * `public_key_id` to public key material (and any required parameters, e.g.
-   * signing algorithm).
-   * In particular, verification implementations MUST NOT treat the signature
-   * `public_key_id` as anything more than a key lookup hint. The `public_key_id`
-   * DOES NOT validate or authenticate a public key; it only provides a mechanism
-   * for quickly selecting a public key ALREADY CONFIGURED on the verifier through
-   * a trusted channel. Verification implementations MUST reject signatures in any
-   * of the following circumstances:
-   *   * The `public_key_id` is not recognized by the verifier.
-   *   * The public key that `public_key_id` refers to does not verify the
-   *     signature with respect to the payload.
-   * The `signature` contents SHOULD NOT be "attached" (where the payload is
-   * included with the serialized `signature` bytes). Verifiers MUST ignore any
-   * "attached" payload and only verify signatures with respect to explicitly
-   * provided payload (e.g. a `payload` field on the proto message that holds
-   * this Signature, or the canonical serialization of the proto message that
-   * holds this signature).
-   * 
- * - * Protobuf type {@code grafeas.v1.Signature} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Signature) - io.grafeas.v1.SignatureOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Signature.class, io.grafeas.v1.Signature.Builder.class); - } - - // Construct using io.grafeas.v1.Signature.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - signature_ = com.google.protobuf.ByteString.EMPTY; - publicKeyId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Signature getDefaultInstanceForType() { - return io.grafeas.v1.Signature.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Signature build() { - io.grafeas.v1.Signature result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Signature buildPartial() { - io.grafeas.v1.Signature result = new io.grafeas.v1.Signature(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Signature result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.signature_ = signature_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.publicKeyId_ = publicKeyId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Signature) { - return mergeFrom((io.grafeas.v1.Signature)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Signature other) { - if (other == io.grafeas.v1.Signature.getDefaultInstance()) return this; - if (other.getSignature() != com.google.protobuf.ByteString.EMPTY) { - setSignature(other.getSignature()); - } - if (!other.getPublicKeyId().isEmpty()) { - publicKeyId_ = other.publicKeyId_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - signature_ = input.readBytes(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - publicKeyId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * The content of the signature, an opaque bytestring.
-     * The payload that this signature verifies MUST be unambiguously provided
-     * with the Signature during verification. A wrapper message might provide
-     * the payload explicitly. Alternatively, a message might have a canonical
-     * serialization that can always be unambiguously computed to derive the
-     * payload.
-     * 
- * - * bytes signature = 1; - * @return The signature. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSignature() { - return signature_; - } - /** - *
-     * The content of the signature, an opaque bytestring.
-     * The payload that this signature verifies MUST be unambiguously provided
-     * with the Signature during verification. A wrapper message might provide
-     * the payload explicitly. Alternatively, a message might have a canonical
-     * serialization that can always be unambiguously computed to derive the
-     * payload.
-     * 
- * - * bytes signature = 1; - * @param value The signature to set. - * @return This builder for chaining. - */ - public Builder setSignature(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - signature_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The content of the signature, an opaque bytestring.
-     * The payload that this signature verifies MUST be unambiguously provided
-     * with the Signature during verification. A wrapper message might provide
-     * the payload explicitly. Alternatively, a message might have a canonical
-     * serialization that can always be unambiguously computed to derive the
-     * payload.
-     * 
- * - * bytes signature = 1; - * @return This builder for chaining. - */ - public Builder clearSignature() { - bitField0_ = (bitField0_ & ~0x00000001); - signature_ = getDefaultInstance().getSignature(); - onChanged(); - return this; - } - - private java.lang.Object publicKeyId_ = ""; - /** - *
-     * The identifier for the public key that verifies this signature.
-     *   * The `public_key_id` is required.
-     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-     *     such as a cryptographic digest.
-     * Examples of valid `public_key_id`s:
-     * OpenPGP V4 public key fingerprint:
-     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-     * details on this scheme.
-     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-     * serialization):
-     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-     * 
- * - * string public_key_id = 2; - * @return The publicKeyId. - */ - public java.lang.String getPublicKeyId() { - java.lang.Object ref = publicKeyId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKeyId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The identifier for the public key that verifies this signature.
-     *   * The `public_key_id` is required.
-     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-     *     such as a cryptographic digest.
-     * Examples of valid `public_key_id`s:
-     * OpenPGP V4 public key fingerprint:
-     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-     * details on this scheme.
-     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-     * serialization):
-     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-     * 
- * - * string public_key_id = 2; - * @return The bytes for publicKeyId. - */ - public com.google.protobuf.ByteString - getPublicKeyIdBytes() { - java.lang.Object ref = publicKeyId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKeyId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The identifier for the public key that verifies this signature.
-     *   * The `public_key_id` is required.
-     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-     *     such as a cryptographic digest.
-     * Examples of valid `public_key_id`s:
-     * OpenPGP V4 public key fingerprint:
-     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-     * details on this scheme.
-     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-     * serialization):
-     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-     * 
- * - * string public_key_id = 2; - * @param value The publicKeyId to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - publicKeyId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The identifier for the public key that verifies this signature.
-     *   * The `public_key_id` is required.
-     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-     *     such as a cryptographic digest.
-     * Examples of valid `public_key_id`s:
-     * OpenPGP V4 public key fingerprint:
-     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-     * details on this scheme.
-     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-     * serialization):
-     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-     * 
- * - * string public_key_id = 2; - * @return This builder for chaining. - */ - public Builder clearPublicKeyId() { - publicKeyId_ = getDefaultInstance().getPublicKeyId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The identifier for the public key that verifies this signature.
-     *   * The `public_key_id` is required.
-     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-     *     such as a cryptographic digest.
-     * Examples of valid `public_key_id`s:
-     * OpenPGP V4 public key fingerprint:
-     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-     * details on this scheme.
-     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-     * serialization):
-     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-     * 
- * - * string public_key_id = 2; - * @param value The bytes for publicKeyId to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - publicKeyId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Signature) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Signature) - private static final io.grafeas.v1.Signature DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Signature(); - } - - public static io.grafeas.v1.Signature getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Signature parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Signature getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java deleted file mode 100644 index abe4d6a9a8d9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java +++ /dev/null @@ -1,70 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public interface SignatureOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Signature) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The content of the signature, an opaque bytestring.
-   * The payload that this signature verifies MUST be unambiguously provided
-   * with the Signature during verification. A wrapper message might provide
-   * the payload explicitly. Alternatively, a message might have a canonical
-   * serialization that can always be unambiguously computed to derive the
-   * payload.
-   * 
- * - * bytes signature = 1; - * @return The signature. - */ - com.google.protobuf.ByteString getSignature(); - - /** - *
-   * The identifier for the public key that verifies this signature.
-   *   * The `public_key_id` is required.
-   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-   *     such as a cryptographic digest.
-   * Examples of valid `public_key_id`s:
-   * OpenPGP V4 public key fingerprint:
-   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-   * details on this scheme.
-   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-   * serialization):
-   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-   * 
- * - * string public_key_id = 2; - * @return The publicKeyId. - */ - java.lang.String getPublicKeyId(); - /** - *
-   * The identifier for the public key that verifies this signature.
-   *   * The `public_key_id` is required.
-   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-   *     such as a cryptographic digest.
-   * Examples of valid `public_key_id`s:
-   * OpenPGP V4 public key fingerprint:
-   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-   * details on this scheme.
-   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-   * serialization):
-   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-   * 
- * - * string public_key_id = 2; - * @return The bytes for publicKeyId. - */ - com.google.protobuf.ByteString - getPublicKeyIdBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java deleted file mode 100644 index e4dd833a02bd..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java +++ /dev/null @@ -1,6801 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/slsa_provenance.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.SlsaProvenance} - */ -public final class SlsaProvenance extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance) - SlsaProvenanceOrBuilder { -private static final long serialVersionUID = 0L; - // Use SlsaProvenance.newBuilder() to construct. - private SlsaProvenance(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaProvenance() { - materials_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaProvenance(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.class, io.grafeas.v1.SlsaProvenance.Builder.class); - } - - public interface SlsaRecipeOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaRecipe) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * URI indicating what type of recipe was performed. It determines the
-     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-     * materials.
-     * 
- * - * string type = 1; - * @return The type. - */ - java.lang.String getType(); - /** - *
-     * URI indicating what type of recipe was performed. It determines the
-     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-     * materials.
-     * 
- * - * string type = 1; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - *
-     * Index in materials containing the recipe steps that are not implied by
-     * recipe.type. For example, if the recipe type were "make", then this would
-     * point to the source containing the Makefile, not the make program itself.
-     * Set to -1 if the recipe doesn't come from a material, as zero is default
-     * unset value for int64.
-     * 
- * - * int64 defined_in_material = 2; - * @return The definedInMaterial. - */ - long getDefinedInMaterial(); - - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For
-     * example, if the recipe type were "make", then this would reference the
-     * directory in which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @return The entryPoint. - */ - java.lang.String getEntryPoint(); - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For
-     * example, if the recipe type were "make", then this would reference the
-     * directory in which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - com.google.protobuf.ByteString - getEntryPointBytes(); - - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-     * recipe type were "make", then this might be the flags passed to make
-     * aside from the target, which is captured in recipe.entryPoint. Depending
-     * on the recipe Type, the structure may be different.
-     * 
- * - * .google.protobuf.Any arguments = 4; - * @return Whether the arguments field is set. - */ - boolean hasArguments(); - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-     * recipe type were "make", then this might be the flags passed to make
-     * aside from the target, which is captured in recipe.entryPoint. Depending
-     * on the recipe Type, the structure may be different.
-     * 
- * - * .google.protobuf.Any arguments = 4; - * @return The arguments. - */ - com.google.protobuf.Any getArguments(); - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-     * recipe type were "make", then this might be the flags passed to make
-     * aside from the target, which is captured in recipe.entryPoint. Depending
-     * on the recipe Type, the structure may be different.
-     * 
- * - * .google.protobuf.Any arguments = 4; - */ - com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder(); - - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating
-     * the recipe. Usually only needed for reproducing the build but not
-     * evaluated as part of policy. Depending on the recipe Type, the structure
-     * may be different.
-     * 
- * - * .google.protobuf.Any environment = 5; - * @return Whether the environment field is set. - */ - boolean hasEnvironment(); - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating
-     * the recipe. Usually only needed for reproducing the build but not
-     * evaluated as part of policy. Depending on the recipe Type, the structure
-     * may be different.
-     * 
- * - * .google.protobuf.Any environment = 5; - * @return The environment. - */ - com.google.protobuf.Any getEnvironment(); - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating
-     * the recipe. Usually only needed for reproducing the build but not
-     * evaluated as part of policy. Depending on the recipe Type, the structure
-     * may be different.
-     * 
- * - * .google.protobuf.Any environment = 5; - */ - com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder(); - } - /** - *
-   * Steps taken to build the artifact.
-   * For a TaskRun, typically each container corresponds to one step in the
-   * recipe.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaRecipe} - */ - public static final class SlsaRecipe extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaRecipe) - SlsaRecipeOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaRecipe.newBuilder() to construct. - private SlsaRecipe(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaRecipe() { - type_ = ""; - entryPoint_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaRecipe(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaRecipe.class, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder.class); - } - - public static final int TYPE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object type_ = ""; - /** - *
-     * URI indicating what type of recipe was performed. It determines the
-     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-     * materials.
-     * 
- * - * string type = 1; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } - } - /** - *
-     * URI indicating what type of recipe was performed. It determines the
-     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-     * materials.
-     * 
- * - * string type = 1; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEFINED_IN_MATERIAL_FIELD_NUMBER = 2; - private long definedInMaterial_ = 0L; - /** - *
-     * Index in materials containing the recipe steps that are not implied by
-     * recipe.type. For example, if the recipe type were "make", then this would
-     * point to the source containing the Makefile, not the make program itself.
-     * Set to -1 if the recipe doesn't come from a material, as zero is default
-     * unset value for int64.
-     * 
- * - * int64 defined_in_material = 2; - * @return The definedInMaterial. - */ - @java.lang.Override - public long getDefinedInMaterial() { - return definedInMaterial_; - } - - public static final int ENTRY_POINT_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object entryPoint_ = ""; - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For
-     * example, if the recipe type were "make", then this would reference the
-     * directory in which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @return The entryPoint. - */ - @java.lang.Override - public java.lang.String getEntryPoint() { - java.lang.Object ref = entryPoint_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entryPoint_ = s; - return s; - } - } - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For
-     * example, if the recipe type were "make", then this would reference the
-     * directory in which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEntryPointBytes() { - java.lang.Object ref = entryPoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entryPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARGUMENTS_FIELD_NUMBER = 4; - private com.google.protobuf.Any arguments_; - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-     * recipe type were "make", then this might be the flags passed to make
-     * aside from the target, which is captured in recipe.entryPoint. Depending
-     * on the recipe Type, the structure may be different.
-     * 
- * - * .google.protobuf.Any arguments = 4; - * @return Whether the arguments field is set. - */ - @java.lang.Override - public boolean hasArguments() { - return arguments_ != null; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-     * recipe type were "make", then this might be the flags passed to make
-     * aside from the target, which is captured in recipe.entryPoint. Depending
-     * on the recipe Type, the structure may be different.
-     * 
- * - * .google.protobuf.Any arguments = 4; - * @return The arguments. - */ - @java.lang.Override - public com.google.protobuf.Any getArguments() { - return arguments_ == null ? com.google.protobuf.Any.getDefaultInstance() : arguments_; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-     * recipe type were "make", then this might be the flags passed to make
-     * aside from the target, which is captured in recipe.entryPoint. Depending
-     * on the recipe Type, the structure may be different.
-     * 
- * - * .google.protobuf.Any arguments = 4; - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder() { - return arguments_ == null ? com.google.protobuf.Any.getDefaultInstance() : arguments_; - } - - public static final int ENVIRONMENT_FIELD_NUMBER = 5; - private com.google.protobuf.Any environment_; - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating
-     * the recipe. Usually only needed for reproducing the build but not
-     * evaluated as part of policy. Depending on the recipe Type, the structure
-     * may be different.
-     * 
- * - * .google.protobuf.Any environment = 5; - * @return Whether the environment field is set. - */ - @java.lang.Override - public boolean hasEnvironment() { - return environment_ != null; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating
-     * the recipe. Usually only needed for reproducing the build but not
-     * evaluated as part of policy. Depending on the recipe Type, the structure
-     * may be different.
-     * 
- * - * .google.protobuf.Any environment = 5; - * @return The environment. - */ - @java.lang.Override - public com.google.protobuf.Any getEnvironment() { - return environment_ == null ? com.google.protobuf.Any.getDefaultInstance() : environment_; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating
-     * the recipe. Usually only needed for reproducing the build but not
-     * evaluated as part of policy. Depending on the recipe Type, the structure
-     * may be different.
-     * 
- * - * .google.protobuf.Any environment = 5; - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder() { - return environment_ == null ? com.google.protobuf.Any.getDefaultInstance() : environment_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); - } - if (definedInMaterial_ != 0L) { - output.writeInt64(2, definedInMaterial_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entryPoint_); - } - if (arguments_ != null) { - output.writeMessage(4, getArguments()); - } - if (environment_ != null) { - output.writeMessage(5, getEnvironment()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); - } - if (definedInMaterial_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, definedInMaterial_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entryPoint_); - } - if (arguments_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getArguments()); - } - if (environment_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getEnvironment()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaRecipe)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenance.SlsaRecipe other = (io.grafeas.v1.SlsaProvenance.SlsaRecipe) obj; - - if (!getType() - .equals(other.getType())) return false; - if (getDefinedInMaterial() - != other.getDefinedInMaterial()) return false; - if (!getEntryPoint() - .equals(other.getEntryPoint())) return false; - if (hasArguments() != other.hasArguments()) return false; - if (hasArguments()) { - if (!getArguments() - .equals(other.getArguments())) return false; - } - if (hasEnvironment() != other.hasEnvironment()) return false; - if (hasEnvironment()) { - if (!getEnvironment() - .equals(other.getEnvironment())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - hash = (37 * hash) + DEFINED_IN_MATERIAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getDefinedInMaterial()); - hash = (37 * hash) + ENTRY_POINT_FIELD_NUMBER; - hash = (53 * hash) + getEntryPoint().hashCode(); - if (hasArguments()) { - hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; - hash = (53 * hash) + getArguments().hashCode(); - } - if (hasEnvironment()) { - hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; - hash = (53 * hash) + getEnvironment().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaRecipe prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Steps taken to build the artifact.
-     * For a TaskRun, typically each container corresponds to one step in the
-     * recipe.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaRecipe} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaRecipe) - io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaRecipe.class, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenance.SlsaRecipe.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = ""; - definedInMaterial_ = 0L; - entryPoint_ = ""; - arguments_ = null; - if (argumentsBuilder_ != null) { - argumentsBuilder_.dispose(); - argumentsBuilder_ = null; - } - environment_ = null; - if (environmentBuilder_ != null) { - environmentBuilder_.dispose(); - environmentBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaRecipe getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaRecipe build() { - io.grafeas.v1.SlsaProvenance.SlsaRecipe result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaRecipe buildPartial() { - io.grafeas.v1.SlsaProvenance.SlsaRecipe result = new io.grafeas.v1.SlsaProvenance.SlsaRecipe(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaRecipe result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.definedInMaterial_ = definedInMaterial_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.entryPoint_ = entryPoint_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.arguments_ = argumentsBuilder_ == null - ? arguments_ - : argumentsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.environment_ = environmentBuilder_ == null - ? environment_ - : environmentBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaRecipe) { - return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaRecipe)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaRecipe other) { - if (other == io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getDefinedInMaterial() != 0L) { - setDefinedInMaterial(other.getDefinedInMaterial()); - } - if (!other.getEntryPoint().isEmpty()) { - entryPoint_ = other.entryPoint_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasArguments()) { - mergeArguments(other.getArguments()); - } - if (other.hasEnvironment()) { - mergeEnvironment(other.getEnvironment()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - type_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - definedInMaterial_ = input.readInt64(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - entryPoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getArgumentsFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - input.readMessage( - getEnvironmentFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object type_ = ""; - /** - *
-       * URI indicating what type of recipe was performed. It determines the
-       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-       * materials.
-       * 
- * - * string type = 1; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * URI indicating what type of recipe was performed. It determines the
-       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-       * materials.
-       * 
- * - * string type = 1; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * URI indicating what type of recipe was performed. It determines the
-       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-       * materials.
-       * 
- * - * string type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * URI indicating what type of recipe was performed. It determines the
-       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-       * materials.
-       * 
- * - * string type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - type_ = getDefaultInstance().getType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * URI indicating what type of recipe was performed. It determines the
-       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-       * materials.
-       * 
- * - * string type = 1; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private long definedInMaterial_ ; - /** - *
-       * Index in materials containing the recipe steps that are not implied by
-       * recipe.type. For example, if the recipe type were "make", then this would
-       * point to the source containing the Makefile, not the make program itself.
-       * Set to -1 if the recipe doesn't come from a material, as zero is default
-       * unset value for int64.
-       * 
- * - * int64 defined_in_material = 2; - * @return The definedInMaterial. - */ - @java.lang.Override - public long getDefinedInMaterial() { - return definedInMaterial_; - } - /** - *
-       * Index in materials containing the recipe steps that are not implied by
-       * recipe.type. For example, if the recipe type were "make", then this would
-       * point to the source containing the Makefile, not the make program itself.
-       * Set to -1 if the recipe doesn't come from a material, as zero is default
-       * unset value for int64.
-       * 
- * - * int64 defined_in_material = 2; - * @param value The definedInMaterial to set. - * @return This builder for chaining. - */ - public Builder setDefinedInMaterial(long value) { - - definedInMaterial_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * Index in materials containing the recipe steps that are not implied by
-       * recipe.type. For example, if the recipe type were "make", then this would
-       * point to the source containing the Makefile, not the make program itself.
-       * Set to -1 if the recipe doesn't come from a material, as zero is default
-       * unset value for int64.
-       * 
- * - * int64 defined_in_material = 2; - * @return This builder for chaining. - */ - public Builder clearDefinedInMaterial() { - bitField0_ = (bitField0_ & ~0x00000002); - definedInMaterial_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object entryPoint_ = ""; - /** - *
-       * String identifying the entry point into the build.
-       * This is often a path to a configuration file and/or a target label within
-       * that file. The syntax and meaning are defined by recipe.type. For
-       * example, if the recipe type were "make", then this would reference the
-       * directory in which to run make as well as which target to use.
-       * 
- * - * string entry_point = 3; - * @return The entryPoint. - */ - public java.lang.String getEntryPoint() { - java.lang.Object ref = entryPoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entryPoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * String identifying the entry point into the build.
-       * This is often a path to a configuration file and/or a target label within
-       * that file. The syntax and meaning are defined by recipe.type. For
-       * example, if the recipe type were "make", then this would reference the
-       * directory in which to run make as well as which target to use.
-       * 
- * - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - public com.google.protobuf.ByteString - getEntryPointBytes() { - java.lang.Object ref = entryPoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entryPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * String identifying the entry point into the build.
-       * This is often a path to a configuration file and/or a target label within
-       * that file. The syntax and meaning are defined by recipe.type. For
-       * example, if the recipe type were "make", then this would reference the
-       * directory in which to run make as well as which target to use.
-       * 
- * - * string entry_point = 3; - * @param value The entryPoint to set. - * @return This builder for chaining. - */ - public Builder setEntryPoint( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - entryPoint_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * String identifying the entry point into the build.
-       * This is often a path to a configuration file and/or a target label within
-       * that file. The syntax and meaning are defined by recipe.type. For
-       * example, if the recipe type were "make", then this would reference the
-       * directory in which to run make as well as which target to use.
-       * 
- * - * string entry_point = 3; - * @return This builder for chaining. - */ - public Builder clearEntryPoint() { - entryPoint_ = getDefaultInstance().getEntryPoint(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-       * String identifying the entry point into the build.
-       * This is often a path to a configuration file and/or a target label within
-       * that file. The syntax and meaning are defined by recipe.type. For
-       * example, if the recipe type were "make", then this would reference the
-       * directory in which to run make as well as which target to use.
-       * 
- * - * string entry_point = 3; - * @param value The bytes for entryPoint to set. - * @return This builder for chaining. - */ - public Builder setEntryPointBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - entryPoint_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private com.google.protobuf.Any arguments_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> argumentsBuilder_; - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - * @return Whether the arguments field is set. - */ - public boolean hasArguments() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - * @return The arguments. - */ - public com.google.protobuf.Any getArguments() { - if (argumentsBuilder_ == null) { - return arguments_ == null ? com.google.protobuf.Any.getDefaultInstance() : arguments_; - } else { - return argumentsBuilder_.getMessage(); - } - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - */ - public Builder setArguments(com.google.protobuf.Any value) { - if (argumentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - arguments_ = value; - } else { - argumentsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - */ - public Builder setArguments( - com.google.protobuf.Any.Builder builderForValue) { - if (argumentsBuilder_ == null) { - arguments_ = builderForValue.build(); - } else { - argumentsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - */ - public Builder mergeArguments(com.google.protobuf.Any value) { - if (argumentsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - arguments_ != null && - arguments_ != com.google.protobuf.Any.getDefaultInstance()) { - getArgumentsBuilder().mergeFrom(value); - } else { - arguments_ = value; - } - } else { - argumentsBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - */ - public Builder clearArguments() { - bitField0_ = (bitField0_ & ~0x00000008); - arguments_ = null; - if (argumentsBuilder_ != null) { - argumentsBuilder_.dispose(); - argumentsBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - */ - public com.google.protobuf.Any.Builder getArgumentsBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getArgumentsFieldBuilder().getBuilder(); - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - */ - public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder() { - if (argumentsBuilder_ != null) { - return argumentsBuilder_.getMessageOrBuilder(); - } else { - return arguments_ == null ? - com.google.protobuf.Any.getDefaultInstance() : arguments_; - } - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getArgumentsFieldBuilder() { - if (argumentsBuilder_ == null) { - argumentsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getArguments(), - getParentForChildren(), - isClean()); - arguments_ = null; - } - return argumentsBuilder_; - } - - private com.google.protobuf.Any environment_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> environmentBuilder_; - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - * @return Whether the environment field is set. - */ - public boolean hasEnvironment() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - * @return The environment. - */ - public com.google.protobuf.Any getEnvironment() { - if (environmentBuilder_ == null) { - return environment_ == null ? com.google.protobuf.Any.getDefaultInstance() : environment_; - } else { - return environmentBuilder_.getMessage(); - } - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - */ - public Builder setEnvironment(com.google.protobuf.Any value) { - if (environmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - environment_ = value; - } else { - environmentBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - */ - public Builder setEnvironment( - com.google.protobuf.Any.Builder builderForValue) { - if (environmentBuilder_ == null) { - environment_ = builderForValue.build(); - } else { - environmentBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - */ - public Builder mergeEnvironment(com.google.protobuf.Any value) { - if (environmentBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - environment_ != null && - environment_ != com.google.protobuf.Any.getDefaultInstance()) { - getEnvironmentBuilder().mergeFrom(value); - } else { - environment_ = value; - } - } else { - environmentBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - */ - public Builder clearEnvironment() { - bitField0_ = (bitField0_ & ~0x00000010); - environment_ = null; - if (environmentBuilder_ != null) { - environmentBuilder_.dispose(); - environmentBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - */ - public com.google.protobuf.Any.Builder getEnvironmentBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getEnvironmentFieldBuilder().getBuilder(); - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - */ - public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder() { - if (environmentBuilder_ != null) { - return environmentBuilder_.getMessageOrBuilder(); - } else { - return environment_ == null ? - com.google.protobuf.Any.getDefaultInstance() : environment_; - } - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getEnvironmentFieldBuilder() { - if (environmentBuilder_ == null) { - environmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getEnvironment(), - getParentForChildren(), - isClean()); - environment_ = null; - } - return environmentBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaRecipe) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaRecipe) - private static final io.grafeas.v1.SlsaProvenance.SlsaRecipe DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaRecipe(); - } - - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaRecipe parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaRecipe getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaCompletenessOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaCompleteness) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * If true, the builder claims that recipe.arguments is complete, meaning
-     * that all external inputs are properly captured in the recipe.
-     * 
- * - * bool arguments = 1; - * @return The arguments. - */ - boolean getArguments(); - - /** - *
-     * If true, the builder claims that recipe.environment is claimed to be
-     * complete.
-     * 
- * - * bool environment = 2; - * @return The environment. - */ - boolean getEnvironment(); - - /** - *
-     * If true, the builder claims that materials are complete, usually through
-     * some controls to prevent network access. Sometimes called "hermetic".
-     * 
- * - * bool materials = 3; - * @return The materials. - */ - boolean getMaterials(); - } - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaCompleteness} - */ - public static final class SlsaCompleteness extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaCompleteness) - SlsaCompletenessOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaCompleteness.newBuilder() to construct. - private SlsaCompleteness(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaCompleteness() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaCompleteness(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder.class); - } - - public static final int ARGUMENTS_FIELD_NUMBER = 1; - private boolean arguments_ = false; - /** - *
-     * If true, the builder claims that recipe.arguments is complete, meaning
-     * that all external inputs are properly captured in the recipe.
-     * 
- * - * bool arguments = 1; - * @return The arguments. - */ - @java.lang.Override - public boolean getArguments() { - return arguments_; - } - - public static final int ENVIRONMENT_FIELD_NUMBER = 2; - private boolean environment_ = false; - /** - *
-     * If true, the builder claims that recipe.environment is claimed to be
-     * complete.
-     * 
- * - * bool environment = 2; - * @return The environment. - */ - @java.lang.Override - public boolean getEnvironment() { - return environment_; - } - - public static final int MATERIALS_FIELD_NUMBER = 3; - private boolean materials_ = false; - /** - *
-     * If true, the builder claims that materials are complete, usually through
-     * some controls to prevent network access. Sometimes called "hermetic".
-     * 
- * - * bool materials = 3; - * @return The materials. - */ - @java.lang.Override - public boolean getMaterials() { - return materials_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (arguments_ != false) { - output.writeBool(1, arguments_); - } - if (environment_ != false) { - output.writeBool(2, environment_); - } - if (materials_ != false) { - output.writeBool(3, materials_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (arguments_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, arguments_); - } - if (environment_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, environment_); - } - if (materials_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, materials_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaCompleteness)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenance.SlsaCompleteness other = (io.grafeas.v1.SlsaProvenance.SlsaCompleteness) obj; - - if (getArguments() - != other.getArguments()) return false; - if (getEnvironment() - != other.getEnvironment()) return false; - if (getMaterials() - != other.getMaterials()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getArguments()); - hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getEnvironment()); - hash = (37 * hash) + MATERIALS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getMaterials()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaCompleteness prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaCompleteness} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaCompleteness) - io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenance.SlsaCompleteness.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - arguments_ = false; - environment_ = false; - materials_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaCompleteness build() { - io.grafeas.v1.SlsaProvenance.SlsaCompleteness result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaCompleteness buildPartial() { - io.grafeas.v1.SlsaProvenance.SlsaCompleteness result = new io.grafeas.v1.SlsaProvenance.SlsaCompleteness(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaCompleteness result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.arguments_ = arguments_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.environment_ = environment_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.materials_ = materials_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaCompleteness) { - return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaCompleteness)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaCompleteness other) { - if (other == io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance()) return this; - if (other.getArguments() != false) { - setArguments(other.getArguments()); - } - if (other.getEnvironment() != false) { - setEnvironment(other.getEnvironment()); - } - if (other.getMaterials() != false) { - setMaterials(other.getMaterials()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - arguments_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - environment_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: { - materials_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private boolean arguments_ ; - /** - *
-       * If true, the builder claims that recipe.arguments is complete, meaning
-       * that all external inputs are properly captured in the recipe.
-       * 
- * - * bool arguments = 1; - * @return The arguments. - */ - @java.lang.Override - public boolean getArguments() { - return arguments_; - } - /** - *
-       * If true, the builder claims that recipe.arguments is complete, meaning
-       * that all external inputs are properly captured in the recipe.
-       * 
- * - * bool arguments = 1; - * @param value The arguments to set. - * @return This builder for chaining. - */ - public Builder setArguments(boolean value) { - - arguments_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * If true, the builder claims that recipe.arguments is complete, meaning
-       * that all external inputs are properly captured in the recipe.
-       * 
- * - * bool arguments = 1; - * @return This builder for chaining. - */ - public Builder clearArguments() { - bitField0_ = (bitField0_ & ~0x00000001); - arguments_ = false; - onChanged(); - return this; - } - - private boolean environment_ ; - /** - *
-       * If true, the builder claims that recipe.environment is claimed to be
-       * complete.
-       * 
- * - * bool environment = 2; - * @return The environment. - */ - @java.lang.Override - public boolean getEnvironment() { - return environment_; - } - /** - *
-       * If true, the builder claims that recipe.environment is claimed to be
-       * complete.
-       * 
- * - * bool environment = 2; - * @param value The environment to set. - * @return This builder for chaining. - */ - public Builder setEnvironment(boolean value) { - - environment_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * If true, the builder claims that recipe.environment is claimed to be
-       * complete.
-       * 
- * - * bool environment = 2; - * @return This builder for chaining. - */ - public Builder clearEnvironment() { - bitField0_ = (bitField0_ & ~0x00000002); - environment_ = false; - onChanged(); - return this; - } - - private boolean materials_ ; - /** - *
-       * If true, the builder claims that materials are complete, usually through
-       * some controls to prevent network access. Sometimes called "hermetic".
-       * 
- * - * bool materials = 3; - * @return The materials. - */ - @java.lang.Override - public boolean getMaterials() { - return materials_; - } - /** - *
-       * If true, the builder claims that materials are complete, usually through
-       * some controls to prevent network access. Sometimes called "hermetic".
-       * 
- * - * bool materials = 3; - * @param value The materials to set. - * @return This builder for chaining. - */ - public Builder setMaterials(boolean value) { - - materials_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * If true, the builder claims that materials are complete, usually through
-       * some controls to prevent network access. Sometimes called "hermetic".
-       * 
- * - * bool materials = 3; - * @return This builder for chaining. - */ - public Builder clearMaterials() { - bitField0_ = (bitField0_ & ~0x00000004); - materials_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaCompleteness) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaCompleteness) - private static final io.grafeas.v1.SlsaProvenance.SlsaCompleteness DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaCompleteness(); - } - - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaCompleteness parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Identifies the particular build invocation, which can be useful for
-     * finding associated logs or other ad-hoc analysis. The value SHOULD be
-     * globally unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - java.lang.String getBuildInvocationId(); - /** - *
-     * Identifies the particular build invocation, which can be useful for
-     * finding associated logs or other ad-hoc analysis. The value SHOULD be
-     * globally unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - com.google.protobuf.ByteString - getBuildInvocationIdBytes(); - - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - boolean hasBuildStartedOn(); - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - com.google.protobuf.Timestamp getBuildStartedOn(); - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder(); - - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - boolean hasBuildFinishedOn(); - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - com.google.protobuf.Timestamp getBuildFinishedOn(); - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder(); - - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @return Whether the completeness field is set. - */ - boolean hasCompleteness(); - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @return The completeness. - */ - io.grafeas.v1.SlsaProvenance.SlsaCompleteness getCompleteness(); - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder getCompletenessOrBuilder(); - - /** - *
-     * If true, the builder claims that running the recipe on materials will
-     * produce bit-for-bit identical output.
-     * 
- * - * bool reproducible = 5; - * @return The reproducible. - */ - boolean getReproducible(); - } - /** - *
-   * Other properties of the build.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaMetadata} - */ - public static final class SlsaMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaMetadata) - SlsaMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaMetadata.newBuilder() to construct. - private SlsaMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaMetadata() { - buildInvocationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaMetadata.class, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder.class); - } - - public static final int BUILD_INVOCATION_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object buildInvocationId_ = ""; - /** - *
-     * Identifies the particular build invocation, which can be useful for
-     * finding associated logs or other ad-hoc analysis. The value SHOULD be
-     * globally unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - @java.lang.Override - public java.lang.String getBuildInvocationId() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildInvocationId_ = s; - return s; - } - } - /** - *
-     * Identifies the particular build invocation, which can be useful for
-     * finding associated logs or other ad-hoc analysis. The value SHOULD be
-     * globally unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBuildInvocationIdBytes() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildInvocationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BUILD_STARTED_ON_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp buildStartedOn_; - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - @java.lang.Override - public boolean hasBuildStartedOn() { - return buildStartedOn_ != null; - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getBuildStartedOn() { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - - public static final int BUILD_FINISHED_ON_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp buildFinishedOn_; - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - @java.lang.Override - public boolean hasBuildFinishedOn() { - return buildFinishedOn_ != null; - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getBuildFinishedOn() { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - - public static final int COMPLETENESS_FIELD_NUMBER = 4; - private io.grafeas.v1.SlsaProvenance.SlsaCompleteness completeness_; - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @return Whether the completeness field is set. - */ - @java.lang.Override - public boolean hasCompleteness() { - return completeness_ != null; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @return The completeness. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getCompleteness() { - return completeness_ == null ? io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { - return completeness_ == null ? io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; - } - - public static final int REPRODUCIBLE_FIELD_NUMBER = 5; - private boolean reproducible_ = false; - /** - *
-     * If true, the builder claims that running the recipe on materials will
-     * produce bit-for-bit identical output.
-     * 
- * - * bool reproducible = 5; - * @return The reproducible. - */ - @java.lang.Override - public boolean getReproducible() { - return reproducible_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, buildInvocationId_); - } - if (buildStartedOn_ != null) { - output.writeMessage(2, getBuildStartedOn()); - } - if (buildFinishedOn_ != null) { - output.writeMessage(3, getBuildFinishedOn()); - } - if (completeness_ != null) { - output.writeMessage(4, getCompleteness()); - } - if (reproducible_ != false) { - output.writeBool(5, reproducible_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, buildInvocationId_); - } - if (buildStartedOn_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBuildStartedOn()); - } - if (buildFinishedOn_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getBuildFinishedOn()); - } - if (completeness_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCompleteness()); - } - if (reproducible_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, reproducible_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaMetadata)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenance.SlsaMetadata other = (io.grafeas.v1.SlsaProvenance.SlsaMetadata) obj; - - if (!getBuildInvocationId() - .equals(other.getBuildInvocationId())) return false; - if (hasBuildStartedOn() != other.hasBuildStartedOn()) return false; - if (hasBuildStartedOn()) { - if (!getBuildStartedOn() - .equals(other.getBuildStartedOn())) return false; - } - if (hasBuildFinishedOn() != other.hasBuildFinishedOn()) return false; - if (hasBuildFinishedOn()) { - if (!getBuildFinishedOn() - .equals(other.getBuildFinishedOn())) return false; - } - if (hasCompleteness() != other.hasCompleteness()) return false; - if (hasCompleteness()) { - if (!getCompleteness() - .equals(other.getCompleteness())) return false; - } - if (getReproducible() - != other.getReproducible()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BUILD_INVOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getBuildInvocationId().hashCode(); - if (hasBuildStartedOn()) { - hash = (37 * hash) + BUILD_STARTED_ON_FIELD_NUMBER; - hash = (53 * hash) + getBuildStartedOn().hashCode(); - } - if (hasBuildFinishedOn()) { - hash = (37 * hash) + BUILD_FINISHED_ON_FIELD_NUMBER; - hash = (53 * hash) + getBuildFinishedOn().hashCode(); - } - if (hasCompleteness()) { - hash = (37 * hash) + COMPLETENESS_FIELD_NUMBER; - hash = (53 * hash) + getCompleteness().hashCode(); - } - hash = (37 * hash) + REPRODUCIBLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getReproducible()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Other properties of the build.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaMetadata) - io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaMetadata.class, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenance.SlsaMetadata.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - buildInvocationId_ = ""; - buildStartedOn_ = null; - if (buildStartedOnBuilder_ != null) { - buildStartedOnBuilder_.dispose(); - buildStartedOnBuilder_ = null; - } - buildFinishedOn_ = null; - if (buildFinishedOnBuilder_ != null) { - buildFinishedOnBuilder_.dispose(); - buildFinishedOnBuilder_ = null; - } - completeness_ = null; - if (completenessBuilder_ != null) { - completenessBuilder_.dispose(); - completenessBuilder_ = null; - } - reproducible_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaMetadata getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaMetadata build() { - io.grafeas.v1.SlsaProvenance.SlsaMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaMetadata buildPartial() { - io.grafeas.v1.SlsaProvenance.SlsaMetadata result = new io.grafeas.v1.SlsaProvenance.SlsaMetadata(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.buildInvocationId_ = buildInvocationId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.buildStartedOn_ = buildStartedOnBuilder_ == null - ? buildStartedOn_ - : buildStartedOnBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.buildFinishedOn_ = buildFinishedOnBuilder_ == null - ? buildFinishedOn_ - : buildFinishedOnBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.completeness_ = completenessBuilder_ == null - ? completeness_ - : completenessBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.reproducible_ = reproducible_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaMetadata) { - return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaMetadata other) { - if (other == io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance()) return this; - if (!other.getBuildInvocationId().isEmpty()) { - buildInvocationId_ = other.buildInvocationId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasBuildStartedOn()) { - mergeBuildStartedOn(other.getBuildStartedOn()); - } - if (other.hasBuildFinishedOn()) { - mergeBuildFinishedOn(other.getBuildFinishedOn()); - } - if (other.hasCompleteness()) { - mergeCompleteness(other.getCompleteness()); - } - if (other.getReproducible() != false) { - setReproducible(other.getReproducible()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - buildInvocationId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getBuildStartedOnFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getBuildFinishedOnFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getCompletenessFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: { - reproducible_ = input.readBool(); - bitField0_ |= 0x00000010; - break; - } // case 40 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object buildInvocationId_ = ""; - /** - *
-       * Identifies the particular build invocation, which can be useful for
-       * finding associated logs or other ad-hoc analysis. The value SHOULD be
-       * globally unique, per in-toto Provenance spec.
-       * 
- * - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - public java.lang.String getBuildInvocationId() { - java.lang.Object ref = buildInvocationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildInvocationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Identifies the particular build invocation, which can be useful for
-       * finding associated logs or other ad-hoc analysis. The value SHOULD be
-       * globally unique, per in-toto Provenance spec.
-       * 
- * - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - public com.google.protobuf.ByteString - getBuildInvocationIdBytes() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildInvocationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Identifies the particular build invocation, which can be useful for
-       * finding associated logs or other ad-hoc analysis. The value SHOULD be
-       * globally unique, per in-toto Provenance spec.
-       * 
- * - * string build_invocation_id = 1; - * @param value The buildInvocationId to set. - * @return This builder for chaining. - */ - public Builder setBuildInvocationId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - buildInvocationId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * Identifies the particular build invocation, which can be useful for
-       * finding associated logs or other ad-hoc analysis. The value SHOULD be
-       * globally unique, per in-toto Provenance spec.
-       * 
- * - * string build_invocation_id = 1; - * @return This builder for chaining. - */ - public Builder clearBuildInvocationId() { - buildInvocationId_ = getDefaultInstance().getBuildInvocationId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * Identifies the particular build invocation, which can be useful for
-       * finding associated logs or other ad-hoc analysis. The value SHOULD be
-       * globally unique, per in-toto Provenance spec.
-       * 
- * - * string build_invocation_id = 1; - * @param value The bytes for buildInvocationId to set. - * @return This builder for chaining. - */ - public Builder setBuildInvocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - buildInvocationId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp buildStartedOn_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildStartedOnBuilder_; - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - public boolean hasBuildStartedOn() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - public com.google.protobuf.Timestamp getBuildStartedOn() { - if (buildStartedOnBuilder_ == null) { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } else { - return buildStartedOnBuilder_.getMessage(); - } - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder setBuildStartedOn(com.google.protobuf.Timestamp value) { - if (buildStartedOnBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - buildStartedOn_ = value; - } else { - buildStartedOnBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder setBuildStartedOn( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (buildStartedOnBuilder_ == null) { - buildStartedOn_ = builderForValue.build(); - } else { - buildStartedOnBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder mergeBuildStartedOn(com.google.protobuf.Timestamp value) { - if (buildStartedOnBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - buildStartedOn_ != null && - buildStartedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getBuildStartedOnBuilder().mergeFrom(value); - } else { - buildStartedOn_ = value; - } - } else { - buildStartedOnBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder clearBuildStartedOn() { - bitField0_ = (bitField0_ & ~0x00000002); - buildStartedOn_ = null; - if (buildStartedOnBuilder_ != null) { - buildStartedOnBuilder_.dispose(); - buildStartedOnBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public com.google.protobuf.Timestamp.Builder getBuildStartedOnBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getBuildStartedOnFieldBuilder().getBuilder(); - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { - if (buildStartedOnBuilder_ != null) { - return buildStartedOnBuilder_.getMessageOrBuilder(); - } else { - return buildStartedOn_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getBuildStartedOnFieldBuilder() { - if (buildStartedOnBuilder_ == null) { - buildStartedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getBuildStartedOn(), - getParentForChildren(), - isClean()); - buildStartedOn_ = null; - } - return buildStartedOnBuilder_; - } - - private com.google.protobuf.Timestamp buildFinishedOn_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildFinishedOnBuilder_; - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - public boolean hasBuildFinishedOn() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - public com.google.protobuf.Timestamp getBuildFinishedOn() { - if (buildFinishedOnBuilder_ == null) { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } else { - return buildFinishedOnBuilder_.getMessage(); - } - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder setBuildFinishedOn(com.google.protobuf.Timestamp value) { - if (buildFinishedOnBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - buildFinishedOn_ = value; - } else { - buildFinishedOnBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder setBuildFinishedOn( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (buildFinishedOnBuilder_ == null) { - buildFinishedOn_ = builderForValue.build(); - } else { - buildFinishedOnBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder mergeBuildFinishedOn(com.google.protobuf.Timestamp value) { - if (buildFinishedOnBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - buildFinishedOn_ != null && - buildFinishedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getBuildFinishedOnBuilder().mergeFrom(value); - } else { - buildFinishedOn_ = value; - } - } else { - buildFinishedOnBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder clearBuildFinishedOn() { - bitField0_ = (bitField0_ & ~0x00000004); - buildFinishedOn_ = null; - if (buildFinishedOnBuilder_ != null) { - buildFinishedOnBuilder_.dispose(); - buildFinishedOnBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public com.google.protobuf.Timestamp.Builder getBuildFinishedOnBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getBuildFinishedOnFieldBuilder().getBuilder(); - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { - if (buildFinishedOnBuilder_ != null) { - return buildFinishedOnBuilder_.getMessageOrBuilder(); - } else { - return buildFinishedOn_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getBuildFinishedOnFieldBuilder() { - if (buildFinishedOnBuilder_ == null) { - buildFinishedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getBuildFinishedOn(), - getParentForChildren(), - isClean()); - buildFinishedOn_ = null; - } - return buildFinishedOnBuilder_; - } - - private io.grafeas.v1.SlsaProvenance.SlsaCompleteness completeness_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaCompleteness, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder> completenessBuilder_; - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @return Whether the completeness field is set. - */ - public boolean hasCompleteness() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @return The completeness. - */ - public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getCompleteness() { - if (completenessBuilder_ == null) { - return completeness_ == null ? io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; - } else { - return completenessBuilder_.getMessage(); - } - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - public Builder setCompleteness(io.grafeas.v1.SlsaProvenance.SlsaCompleteness value) { - if (completenessBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - completeness_ = value; - } else { - completenessBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - public Builder setCompleteness( - io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder builderForValue) { - if (completenessBuilder_ == null) { - completeness_ = builderForValue.build(); - } else { - completenessBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - public Builder mergeCompleteness(io.grafeas.v1.SlsaProvenance.SlsaCompleteness value) { - if (completenessBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - completeness_ != null && - completeness_ != io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance()) { - getCompletenessBuilder().mergeFrom(value); - } else { - completeness_ = value; - } - } else { - completenessBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - public Builder clearCompleteness() { - bitField0_ = (bitField0_ & ~0x00000008); - completeness_ = null; - if (completenessBuilder_ != null) { - completenessBuilder_.dispose(); - completenessBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - public io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder getCompletenessBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCompletenessFieldBuilder().getBuilder(); - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - public io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { - if (completenessBuilder_ != null) { - return completenessBuilder_.getMessageOrBuilder(); - } else { - return completeness_ == null ? - io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; - } - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaCompleteness, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder> - getCompletenessFieldBuilder() { - if (completenessBuilder_ == null) { - completenessBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaCompleteness, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder>( - getCompleteness(), - getParentForChildren(), - isClean()); - completeness_ = null; - } - return completenessBuilder_; - } - - private boolean reproducible_ ; - /** - *
-       * If true, the builder claims that running the recipe on materials will
-       * produce bit-for-bit identical output.
-       * 
- * - * bool reproducible = 5; - * @return The reproducible. - */ - @java.lang.Override - public boolean getReproducible() { - return reproducible_; - } - /** - *
-       * If true, the builder claims that running the recipe on materials will
-       * produce bit-for-bit identical output.
-       * 
- * - * bool reproducible = 5; - * @param value The reproducible to set. - * @return This builder for chaining. - */ - public Builder setReproducible(boolean value) { - - reproducible_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-       * If true, the builder claims that running the recipe on materials will
-       * produce bit-for-bit identical output.
-       * 
- * - * bool reproducible = 5; - * @return This builder for chaining. - */ - public Builder clearReproducible() { - bitField0_ = (bitField0_ & ~0x00000010); - reproducible_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaMetadata) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaMetadata) - private static final io.grafeas.v1.SlsaProvenance.SlsaMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaMetadata(); - } - - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaBuilderOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaBuilder) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1; - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - } - /** - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaBuilder} - */ - public static final class SlsaBuilder extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaBuilder) - SlsaBuilderOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaBuilder.newBuilder() to construct. - private SlsaBuilder(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaBuilder() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaBuilder(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaBuilder.class, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaBuilder)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenance.SlsaBuilder other = (io.grafeas.v1.SlsaProvenance.SlsaBuilder) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaBuilder prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaBuilder} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaBuilder) - io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaBuilder.class, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenance.SlsaBuilder.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaBuilder getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaBuilder build() { - io.grafeas.v1.SlsaProvenance.SlsaBuilder result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaBuilder buildPartial() { - io.grafeas.v1.SlsaProvenance.SlsaBuilder result = new io.grafeas.v1.SlsaProvenance.SlsaBuilder(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaBuilder result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaBuilder) { - return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaBuilder)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaBuilder other) { - if (other == io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaBuilder) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaBuilder) - private static final io.grafeas.v1.SlsaProvenance.SlsaBuilder DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaBuilder(); - } - - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaBuilder parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaBuilder getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface MaterialOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.Material) - com.google.protobuf.MessageOrBuilder { - - /** - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - * map<string, string> digest = 2; - */ - int getDigestCount(); - /** - * map<string, string> digest = 2; - */ - boolean containsDigest( - java.lang.String key); - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getDigest(); - /** - * map<string, string> digest = 2; - */ - java.util.Map - getDigestMap(); - /** - * map<string, string> digest = 2; - */ - /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<string, string> digest = 2; - */ - java.lang.String getDigestOrThrow( - java.lang.String key); - } - /** - * Protobuf type {@code grafeas.v1.SlsaProvenance.Material} - */ - public static final class Material extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.Material) - MaterialOrBuilder { - private static final long serialVersionUID = 0L; - // Use Material.newBuilder() to construct. - private Material(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Material() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Material(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.Material.class, io.grafeas.v1.SlsaProvenance.Material.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - /** - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DIGEST_FIELD_NUMBER = 2; - private static final class DigestDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetDigest(), - DigestDefaultEntryHolder.defaultEntry, - 2); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - for (java.util.Map.Entry entry - : internalGetDigest().getMap().entrySet()) { - com.google.protobuf.MapEntry - digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, digest__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenance.Material)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenance.Material other = (io.grafeas.v1.SlsaProvenance.Material) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (!internalGetDigest().equals( - other.internalGetDigest())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - if (!internalGetDigest().getMap().isEmpty()) { - hash = (37 * hash) + DIGEST_FIELD_NUMBER; - hash = (53 * hash) + internalGetDigest().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.Material parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.Material parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.Material prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.SlsaProvenance.Material} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.Material) - io.grafeas.v1.SlsaProvenance.MaterialOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.Material.class, io.grafeas.v1.SlsaProvenance.Material.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenance.Material.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - uri_ = ""; - internalGetMutableDigest().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.Material getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.Material build() { - io.grafeas.v1.SlsaProvenance.Material result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.Material buildPartial() { - io.grafeas.v1.SlsaProvenance.Material result = new io.grafeas.v1.SlsaProvenance.Material(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenance.Material result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.uri_ = uri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.digest_ = internalGetDigest(); - result.digest_.makeImmutable(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenance.Material) { - return mergeFrom((io.grafeas.v1.SlsaProvenance.Material)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.Material other) { - if (other == io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableDigest().mergeFrom( - other.internalGetDigest()); - bitField0_ |= 0x00000002; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - com.google.protobuf.MapEntry - digest__ = input.readMessage( - DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableDigest().getMutableMap().put( - digest__.getKey(), digest__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object uri_ = ""; - /** - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - private com.google.protobuf.MapField - internalGetMutableDigest() { - if (digest_ == null) { - digest_ = com.google.protobuf.MapField.newMapField( - DigestDefaultEntryHolder.defaultEntry); - } - if (!digest_.isMutable()) { - digest_ = digest_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearDigest() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableDigest().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> digest = 2; - */ - public Builder removeDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableDigest().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableDigest() { - bitField0_ |= 0x00000002; - return internalGetMutableDigest().getMutableMap(); - } - /** - * map<string, string> digest = 2; - */ - public Builder putDigest( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableDigest().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - * map<string, string> digest = 2; - */ - public Builder putAllDigest( - java.util.Map values) { - internalGetMutableDigest().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000002; - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.Material) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.Material) - private static final io.grafeas.v1.SlsaProvenance.Material DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.Material(); - } - - public static io.grafeas.v1.SlsaProvenance.Material getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Material parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.Material getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int BUILDER_FIELD_NUMBER = 1; - private io.grafeas.v1.SlsaProvenance.SlsaBuilder builder_; - /** - *
-   * required
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @return Whether the builder field is set. - */ - @java.lang.Override - public boolean hasBuilder() { - return builder_ != null; - } - /** - *
-   * required
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @return The builder. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaBuilder getBuilder() { - return builder_ == null ? io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; - } - /** - *
-   * required
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder getBuilderOrBuilder() { - return builder_ == null ? io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; - } - - public static final int RECIPE_FIELD_NUMBER = 2; - private io.grafeas.v1.SlsaProvenance.SlsaRecipe recipe_; - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @return Whether the recipe field is set. - */ - @java.lang.Override - public boolean hasRecipe() { - return recipe_ != null; - } - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @return The recipe. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaRecipe getRecipe() { - return recipe_ == null ? io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; - } - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder getRecipeOrBuilder() { - return recipe_ == null ? io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; - } - - public static final int METADATA_FIELD_NUMBER = 3; - private io.grafeas.v1.SlsaProvenance.SlsaMetadata metadata_; - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return metadata_ != null; - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @return The metadata. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaMetadata getMetadata() { - return metadata_ == null ? io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; - } - - public static final int MATERIALS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List materials_; - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - @java.lang.Override - public java.util.List getMaterialsList() { - return materials_; - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - @java.lang.Override - public java.util.List - getMaterialsOrBuilderList() { - return materials_; - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - @java.lang.Override - public int getMaterialsCount() { - return materials_.size(); - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.Material getMaterials(int index) { - return materials_.get(index); - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.MaterialOrBuilder getMaterialsOrBuilder( - int index) { - return materials_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (builder_ != null) { - output.writeMessage(1, getBuilder()); - } - if (recipe_ != null) { - output.writeMessage(2, getRecipe()); - } - if (metadata_ != null) { - output.writeMessage(3, getMetadata()); - } - for (int i = 0; i < materials_.size(); i++) { - output.writeMessage(4, materials_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (builder_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBuilder()); - } - if (recipe_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getRecipe()); - } - if (metadata_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getMetadata()); - } - for (int i = 0; i < materials_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, materials_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenance)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenance other = (io.grafeas.v1.SlsaProvenance) obj; - - if (hasBuilder() != other.hasBuilder()) return false; - if (hasBuilder()) { - if (!getBuilder() - .equals(other.getBuilder())) return false; - } - if (hasRecipe() != other.hasRecipe()) return false; - if (hasRecipe()) { - if (!getRecipe() - .equals(other.getRecipe())) return false; - } - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getMaterialsList() - .equals(other.getMaterialsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBuilder()) { - hash = (37 * hash) + BUILDER_FIELD_NUMBER; - hash = (53 * hash) + getBuilder().hashCode(); - } - if (hasRecipe()) { - hash = (37 * hash) + RECIPE_FIELD_NUMBER; - hash = (53 * hash) + getRecipe().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - if (getMaterialsCount() > 0) { - hash = (37 * hash) + MATERIALS_FIELD_NUMBER; - hash = (53 * hash) + getMaterialsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenance parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenance prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.SlsaProvenance} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance) - io.grafeas.v1.SlsaProvenanceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.class, io.grafeas.v1.SlsaProvenance.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenance.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - builder_ = null; - if (builderBuilder_ != null) { - builderBuilder_.dispose(); - builderBuilder_ = null; - } - recipe_ = null; - if (recipeBuilder_ != null) { - recipeBuilder_.dispose(); - recipeBuilder_ = null; - } - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - if (materialsBuilder_ == null) { - materials_ = java.util.Collections.emptyList(); - } else { - materials_ = null; - materialsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance build() { - io.grafeas.v1.SlsaProvenance result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance buildPartial() { - io.grafeas.v1.SlsaProvenance result = new io.grafeas.v1.SlsaProvenance(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.SlsaProvenance result) { - if (materialsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - materials_ = java.util.Collections.unmodifiableList(materials_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.materials_ = materials_; - } else { - result.materials_ = materialsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenance result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.builder_ = builderBuilder_ == null - ? builder_ - : builderBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.recipe_ = recipeBuilder_ == null - ? recipe_ - : recipeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenance) { - return mergeFrom((io.grafeas.v1.SlsaProvenance)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenance other) { - if (other == io.grafeas.v1.SlsaProvenance.getDefaultInstance()) return this; - if (other.hasBuilder()) { - mergeBuilder(other.getBuilder()); - } - if (other.hasRecipe()) { - mergeRecipe(other.getRecipe()); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (materialsBuilder_ == null) { - if (!other.materials_.isEmpty()) { - if (materials_.isEmpty()) { - materials_ = other.materials_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureMaterialsIsMutable(); - materials_.addAll(other.materials_); - } - onChanged(); - } - } else { - if (!other.materials_.isEmpty()) { - if (materialsBuilder_.isEmpty()) { - materialsBuilder_.dispose(); - materialsBuilder_ = null; - materials_ = other.materials_; - bitField0_ = (bitField0_ & ~0x00000008); - materialsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getMaterialsFieldBuilder() : null; - } else { - materialsBuilder_.addAllMessages(other.materials_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getBuilderFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getRecipeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - io.grafeas.v1.SlsaProvenance.Material m = - input.readMessage( - io.grafeas.v1.SlsaProvenance.Material.parser(), - extensionRegistry); - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.add(m); - } else { - materialsBuilder_.addMessage(m); - } - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.SlsaProvenance.SlsaBuilder builder_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaBuilder, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder> builderBuilder_; - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @return Whether the builder field is set. - */ - public boolean hasBuilder() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @return The builder. - */ - public io.grafeas.v1.SlsaProvenance.SlsaBuilder getBuilder() { - if (builderBuilder_ == null) { - return builder_ == null ? io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; - } else { - return builderBuilder_.getMessage(); - } - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - public Builder setBuilder(io.grafeas.v1.SlsaProvenance.SlsaBuilder value) { - if (builderBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - builder_ = value; - } else { - builderBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - public Builder setBuilder( - io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder builderForValue) { - if (builderBuilder_ == null) { - builder_ = builderForValue.build(); - } else { - builderBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - public Builder mergeBuilder(io.grafeas.v1.SlsaProvenance.SlsaBuilder value) { - if (builderBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - builder_ != null && - builder_ != io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance()) { - getBuilderBuilder().mergeFrom(value); - } else { - builder_ = value; - } - } else { - builderBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - public Builder clearBuilder() { - bitField0_ = (bitField0_ & ~0x00000001); - builder_ = null; - if (builderBuilder_ != null) { - builderBuilder_.dispose(); - builderBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - public io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder getBuilderBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getBuilderFieldBuilder().getBuilder(); - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - public io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder getBuilderOrBuilder() { - if (builderBuilder_ != null) { - return builderBuilder_.getMessageOrBuilder(); - } else { - return builder_ == null ? - io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; - } - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaBuilder, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder> - getBuilderFieldBuilder() { - if (builderBuilder_ == null) { - builderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaBuilder, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder>( - getBuilder(), - getParentForChildren(), - isClean()); - builder_ = null; - } - return builderBuilder_; - } - - private io.grafeas.v1.SlsaProvenance.SlsaRecipe recipe_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaRecipe, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder, io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder> recipeBuilder_; - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @return Whether the recipe field is set. - */ - public boolean hasRecipe() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @return The recipe. - */ - public io.grafeas.v1.SlsaProvenance.SlsaRecipe getRecipe() { - if (recipeBuilder_ == null) { - return recipe_ == null ? io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; - } else { - return recipeBuilder_.getMessage(); - } - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - public Builder setRecipe(io.grafeas.v1.SlsaProvenance.SlsaRecipe value) { - if (recipeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - recipe_ = value; - } else { - recipeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - public Builder setRecipe( - io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder builderForValue) { - if (recipeBuilder_ == null) { - recipe_ = builderForValue.build(); - } else { - recipeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - public Builder mergeRecipe(io.grafeas.v1.SlsaProvenance.SlsaRecipe value) { - if (recipeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - recipe_ != null && - recipe_ != io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance()) { - getRecipeBuilder().mergeFrom(value); - } else { - recipe_ = value; - } - } else { - recipeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - public Builder clearRecipe() { - bitField0_ = (bitField0_ & ~0x00000002); - recipe_ = null; - if (recipeBuilder_ != null) { - recipeBuilder_.dispose(); - recipeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - public io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder getRecipeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getRecipeFieldBuilder().getBuilder(); - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - public io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder getRecipeOrBuilder() { - if (recipeBuilder_ != null) { - return recipeBuilder_.getMessageOrBuilder(); - } else { - return recipe_ == null ? - io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; - } - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaRecipe, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder, io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder> - getRecipeFieldBuilder() { - if (recipeBuilder_ == null) { - recipeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaRecipe, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder, io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder>( - getRecipe(), - getParentForChildren(), - isClean()); - recipe_ = null; - } - return recipeBuilder_; - } - - private io.grafeas.v1.SlsaProvenance.SlsaMetadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaMetadata, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder> metadataBuilder_; - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @return The metadata. - */ - public io.grafeas.v1.SlsaProvenance.SlsaMetadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - public Builder setMetadata(io.grafeas.v1.SlsaProvenance.SlsaMetadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - public Builder setMetadata( - io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - public Builder mergeMetadata(io.grafeas.v1.SlsaProvenance.SlsaMetadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - metadata_ != null && - metadata_ != io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000004); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - public io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - public io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; - } - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaMetadata, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaMetadata, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private java.util.List materials_ = - java.util.Collections.emptyList(); - private void ensureMaterialsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - materials_ = new java.util.ArrayList(materials_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.Material, io.grafeas.v1.SlsaProvenance.Material.Builder, io.grafeas.v1.SlsaProvenance.MaterialOrBuilder> materialsBuilder_; - - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public java.util.List getMaterialsList() { - if (materialsBuilder_ == null) { - return java.util.Collections.unmodifiableList(materials_); - } else { - return materialsBuilder_.getMessageList(); - } - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public int getMaterialsCount() { - if (materialsBuilder_ == null) { - return materials_.size(); - } else { - return materialsBuilder_.getCount(); - } - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public io.grafeas.v1.SlsaProvenance.Material getMaterials(int index) { - if (materialsBuilder_ == null) { - return materials_.get(index); - } else { - return materialsBuilder_.getMessage(index); - } - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder setMaterials( - int index, io.grafeas.v1.SlsaProvenance.Material value) { - if (materialsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMaterialsIsMutable(); - materials_.set(index, value); - onChanged(); - } else { - materialsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder setMaterials( - int index, io.grafeas.v1.SlsaProvenance.Material.Builder builderForValue) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.set(index, builderForValue.build()); - onChanged(); - } else { - materialsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder addMaterials(io.grafeas.v1.SlsaProvenance.Material value) { - if (materialsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMaterialsIsMutable(); - materials_.add(value); - onChanged(); - } else { - materialsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder addMaterials( - int index, io.grafeas.v1.SlsaProvenance.Material value) { - if (materialsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMaterialsIsMutable(); - materials_.add(index, value); - onChanged(); - } else { - materialsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder addMaterials( - io.grafeas.v1.SlsaProvenance.Material.Builder builderForValue) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.add(builderForValue.build()); - onChanged(); - } else { - materialsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder addMaterials( - int index, io.grafeas.v1.SlsaProvenance.Material.Builder builderForValue) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.add(index, builderForValue.build()); - onChanged(); - } else { - materialsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder addAllMaterials( - java.lang.Iterable values) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, materials_); - onChanged(); - } else { - materialsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder clearMaterials() { - if (materialsBuilder_ == null) { - materials_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - materialsBuilder_.clear(); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder removeMaterials(int index) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.remove(index); - onChanged(); - } else { - materialsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public io.grafeas.v1.SlsaProvenance.Material.Builder getMaterialsBuilder( - int index) { - return getMaterialsFieldBuilder().getBuilder(index); - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public io.grafeas.v1.SlsaProvenance.MaterialOrBuilder getMaterialsOrBuilder( - int index) { - if (materialsBuilder_ == null) { - return materials_.get(index); } else { - return materialsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public java.util.List - getMaterialsOrBuilderList() { - if (materialsBuilder_ != null) { - return materialsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(materials_); - } - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public io.grafeas.v1.SlsaProvenance.Material.Builder addMaterialsBuilder() { - return getMaterialsFieldBuilder().addBuilder( - io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance()); - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public io.grafeas.v1.SlsaProvenance.Material.Builder addMaterialsBuilder( - int index) { - return getMaterialsFieldBuilder().addBuilder( - index, io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance()); - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public java.util.List - getMaterialsBuilderList() { - return getMaterialsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.Material, io.grafeas.v1.SlsaProvenance.Material.Builder, io.grafeas.v1.SlsaProvenance.MaterialOrBuilder> - getMaterialsFieldBuilder() { - if (materialsBuilder_ == null) { - materialsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.Material, io.grafeas.v1.SlsaProvenance.Material.Builder, io.grafeas.v1.SlsaProvenance.MaterialOrBuilder>( - materials_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - materials_ = null; - } - return materialsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance) - private static final io.grafeas.v1.SlsaProvenance DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance(); - } - - public static io.grafeas.v1.SlsaProvenance getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaProvenance parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java deleted file mode 100644 index d7b66088f1c3..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java +++ /dev/null @@ -1,146 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/slsa_provenance.proto - -package io.grafeas.v1; - -public interface SlsaProvenanceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * required
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @return Whether the builder field is set. - */ - boolean hasBuilder(); - /** - *
-   * required
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @return The builder. - */ - io.grafeas.v1.SlsaProvenance.SlsaBuilder getBuilder(); - /** - *
-   * required
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder getBuilderOrBuilder(); - - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @return Whether the recipe field is set. - */ - boolean hasRecipe(); - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @return The recipe. - */ - io.grafeas.v1.SlsaProvenance.SlsaRecipe getRecipe(); - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder getRecipeOrBuilder(); - - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @return The metadata. - */ - io.grafeas.v1.SlsaProvenance.SlsaMetadata getMetadata(); - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder getMetadataOrBuilder(); - - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - java.util.List - getMaterialsList(); - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - io.grafeas.v1.SlsaProvenance.Material getMaterials(int index); - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - int getMaterialsCount(); - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - java.util.List - getMaterialsOrBuilderList(); - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - io.grafeas.v1.SlsaProvenance.MaterialOrBuilder getMaterialsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java deleted file mode 100644 index f58193641147..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java +++ /dev/null @@ -1,143 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/slsa_provenance.proto - -package io.grafeas.v1; - -public final class SlsaProvenanceProto { - private SlsaProvenanceProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenance_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n grafeas/v1/slsa_provenance.proto\022\ngraf" + - "eas.v1\032\031google/protobuf/any.proto\032\037googl" + - "e/protobuf/timestamp.proto\"\376\006\n\016SlsaProve" + - "nance\0227\n\007builder\030\001 \001(\0132&.grafeas.v1.Slsa" + - "Provenance.SlsaBuilder\0225\n\006recipe\030\002 \001(\0132%" + - ".grafeas.v1.SlsaProvenance.SlsaRecipe\0229\n" + - "\010metadata\030\003 \001(\0132\'.grafeas.v1.SlsaProvena" + - "nce.SlsaMetadata\0226\n\tmaterials\030\004 \003(\0132#.gr" + - "afeas.v1.SlsaProvenance.Material\032\240\001\n\nSls" + - "aRecipe\022\014\n\004type\030\001 \001(\t\022\033\n\023defined_in_mate" + - "rial\030\002 \001(\003\022\023\n\013entry_point\030\003 \001(\t\022\'\n\targum" + - "ents\030\004 \001(\0132\024.google.protobuf.Any\022)\n\013envi" + - "ronment\030\005 \001(\0132\024.google.protobuf.Any\032M\n\020S" + - "lsaCompleteness\022\021\n\targuments\030\001 \001(\010\022\023\n\013en" + - "vironment\030\002 \001(\010\022\021\n\tmaterials\030\003 \001(\010\032\361\001\n\014S" + - "lsaMetadata\022\033\n\023build_invocation_id\030\001 \001(\t" + - "\0224\n\020build_started_on\030\002 \001(\0132\032.google.prot" + - "obuf.Timestamp\0225\n\021build_finished_on\030\003 \001(" + - "\0132\032.google.protobuf.Timestamp\022A\n\014complet" + - "eness\030\004 \001(\0132+.grafeas.v1.SlsaProvenance." + - "SlsaCompleteness\022\024\n\014reproducible\030\005 \001(\010\032\031" + - "\n\013SlsaBuilder\022\n\n\002id\030\001 \001(\t\032\207\001\n\010Material\022\013" + - "\n\003uri\030\001 \001(\t\022?\n\006digest\030\002 \003(\0132/.grafeas.v1" + - ".SlsaProvenance.Material.DigestEntry\032-\n\013" + - "DigestEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + - "\0028\001Bf\n\rio.grafeas.v1B\023SlsaProvenanceProt" + - "oP\001Z8google.golang.org/genproto/googleap" + - "is/grafeas/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.AnyProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_grafeas_v1_SlsaProvenance_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenance_descriptor, - new java.lang.String[] { "Builder", "Recipe", "Metadata", "Materials", }); - internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor = - internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor, - new java.lang.String[] { "Type", "DefinedInMaterial", "EntryPoint", "Arguments", "Environment", }); - internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor = - internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(1); - internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor, - new java.lang.String[] { "Arguments", "Environment", "Materials", }); - internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor = - internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(2); - internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor, - new java.lang.String[] { "BuildInvocationId", "BuildStartedOn", "BuildFinishedOn", "Completeness", "Reproducible", }); - internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor = - internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(3); - internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor, - new java.lang.String[] { "Id", }); - internal_static_grafeas_v1_SlsaProvenance_Material_descriptor = - internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(4); - internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenance_Material_descriptor, - new java.lang.String[] { "Uri", "Digest", }); - internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor = - internal_static_grafeas_v1_SlsaProvenance_Material_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - com.google.protobuf.AnyProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java deleted file mode 100644 index 41831c9804aa..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java +++ /dev/null @@ -1,6962 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/slsa_provenance_zero_two.proto - -package io.grafeas.v1; - -/** - *
- * See full explanation of fields at slsa.dev/provenance/v0.2.
- * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo} - */ -public final class SlsaProvenanceZeroTwo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo) - SlsaProvenanceZeroTwoOrBuilder { -private static final long serialVersionUID = 0L; - // Use SlsaProvenanceZeroTwo.newBuilder() to construct. - private SlsaProvenanceZeroTwo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaProvenanceZeroTwo() { - buildType_ = ""; - materials_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaProvenanceZeroTwo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.class, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder.class); - } - - public interface SlsaBuilderOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1; - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - } - /** - *
-   * Identifies the entity that executed the recipe, which is trusted to have
-   * correctly performed the operation and populated this provenance.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder} - */ - public static final class SlsaBuilder extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) - SlsaBuilderOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaBuilder.newBuilder() to construct. - private SlsaBuilder(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaBuilder() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaBuilder(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Identifies the entity that executed the recipe, which is trusted to have
-     * correctly performed the operation and populated this provenance.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder build() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder buildPartial() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) { - return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder other) { - if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) - private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder(); - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaBuilder parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaMaterialOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) - com.google.protobuf.MessageOrBuilder { - - /** - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - * map<string, string> digest = 2; - */ - int getDigestCount(); - /** - * map<string, string> digest = 2; - */ - boolean containsDigest( - java.lang.String key); - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getDigest(); - /** - * map<string, string> digest = 2; - */ - java.util.Map - getDigestMap(); - /** - * map<string, string> digest = 2; - */ - /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<string, string> digest = 2; - */ - java.lang.String getDigestOrThrow( - java.lang.String key); - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial} - */ - public static final class SlsaMaterial extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) - SlsaMaterialOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaMaterial.newBuilder() to construct. - private SlsaMaterial(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaMaterial() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaMaterial(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - /** - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DIGEST_FIELD_NUMBER = 2; - private static final class DigestDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetDigest(), - DigestDefaultEntryHolder.defaultEntry, - 2); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - for (java.util.Map.Entry entry - : internalGetDigest().getMap().entrySet()) { - com.google.protobuf.MapEntry - digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, digest__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (!internalGetDigest().equals( - other.internalGetDigest())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - if (!internalGetDigest().getMap().isEmpty()) { - hash = (37 * hash) + DIGEST_FIELD_NUMBER; - hash = (53 * hash) + internalGetDigest().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - uri_ = ""; - internalGetMutableDigest().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial build() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial buildPartial() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.uri_ = uri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.digest_ = internalGetDigest(); - result.digest_.makeImmutable(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) { - return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial other) { - if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableDigest().mergeFrom( - other.internalGetDigest()); - bitField0_ |= 0x00000002; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - com.google.protobuf.MapEntry - digest__ = input.readMessage( - DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableDigest().getMutableMap().put( - digest__.getKey(), digest__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object uri_ = ""; - /** - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - private com.google.protobuf.MapField - internalGetMutableDigest() { - if (digest_ == null) { - digest_ = com.google.protobuf.MapField.newMapField( - DigestDefaultEntryHolder.defaultEntry); - } - if (!digest_.isMutable()) { - digest_ = digest_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearDigest() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableDigest().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> digest = 2; - */ - public Builder removeDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableDigest().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableDigest() { - bitField0_ |= 0x00000002; - return internalGetMutableDigest().getMutableMap(); - } - /** - * map<string, string> digest = 2; - */ - public Builder putDigest( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableDigest().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - * map<string, string> digest = 2; - */ - public Builder putAllDigest( - java.util.Map values) { - internalGetMutableDigest().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000002; - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) - private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial(); - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaMaterial parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaInvocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) - com.google.protobuf.MessageOrBuilder { - - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @return Whether the configSource field is set. - */ - boolean hasConfigSource(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @return The configSource. - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getConfigSource(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder getConfigSourceOrBuilder(); - - /** - * .google.protobuf.Struct parameters = 2; - * @return Whether the parameters field is set. - */ - boolean hasParameters(); - /** - * .google.protobuf.Struct parameters = 2; - * @return The parameters. - */ - com.google.protobuf.Struct getParameters(); - /** - * .google.protobuf.Struct parameters = 2; - */ - com.google.protobuf.StructOrBuilder getParametersOrBuilder(); - - /** - * .google.protobuf.Struct environment = 3; - * @return Whether the environment field is set. - */ - boolean hasEnvironment(); - /** - * .google.protobuf.Struct environment = 3; - * @return The environment. - */ - com.google.protobuf.Struct getEnvironment(); - /** - * .google.protobuf.Struct environment = 3; - */ - com.google.protobuf.StructOrBuilder getEnvironmentOrBuilder(); - } - /** - *
-   * Identifies the event that kicked off the build.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation} - */ - public static final class SlsaInvocation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) - SlsaInvocationOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaInvocation.newBuilder() to construct. - private SlsaInvocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaInvocation() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaInvocation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder.class); - } - - public static final int CONFIG_SOURCE_FIELD_NUMBER = 1; - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource configSource_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @return Whether the configSource field is set. - */ - @java.lang.Override - public boolean hasConfigSource() { - return configSource_ != null; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @return The configSource. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getConfigSource() { - return configSource_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder getConfigSourceOrBuilder() { - return configSource_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; - } - - public static final int PARAMETERS_FIELD_NUMBER = 2; - private com.google.protobuf.Struct parameters_; - /** - * .google.protobuf.Struct parameters = 2; - * @return Whether the parameters field is set. - */ - @java.lang.Override - public boolean hasParameters() { - return parameters_ != null; - } - /** - * .google.protobuf.Struct parameters = 2; - * @return The parameters. - */ - @java.lang.Override - public com.google.protobuf.Struct getParameters() { - return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; - } - /** - * .google.protobuf.Struct parameters = 2; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { - return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; - } - - public static final int ENVIRONMENT_FIELD_NUMBER = 3; - private com.google.protobuf.Struct environment_; - /** - * .google.protobuf.Struct environment = 3; - * @return Whether the environment field is set. - */ - @java.lang.Override - public boolean hasEnvironment() { - return environment_ != null; - } - /** - * .google.protobuf.Struct environment = 3; - * @return The environment. - */ - @java.lang.Override - public com.google.protobuf.Struct getEnvironment() { - return environment_ == null ? com.google.protobuf.Struct.getDefaultInstance() : environment_; - } - /** - * .google.protobuf.Struct environment = 3; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getEnvironmentOrBuilder() { - return environment_ == null ? com.google.protobuf.Struct.getDefaultInstance() : environment_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (configSource_ != null) { - output.writeMessage(1, getConfigSource()); - } - if (parameters_ != null) { - output.writeMessage(2, getParameters()); - } - if (environment_ != null) { - output.writeMessage(3, getEnvironment()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (configSource_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getConfigSource()); - } - if (parameters_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getParameters()); - } - if (environment_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getEnvironment()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) obj; - - if (hasConfigSource() != other.hasConfigSource()) return false; - if (hasConfigSource()) { - if (!getConfigSource() - .equals(other.getConfigSource())) return false; - } - if (hasParameters() != other.hasParameters()) return false; - if (hasParameters()) { - if (!getParameters() - .equals(other.getParameters())) return false; - } - if (hasEnvironment() != other.hasEnvironment()) return false; - if (hasEnvironment()) { - if (!getEnvironment() - .equals(other.getEnvironment())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConfigSource()) { - hash = (37 * hash) + CONFIG_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getConfigSource().hashCode(); - } - if (hasParameters()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParameters().hashCode(); - } - if (hasEnvironment()) { - hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; - hash = (53 * hash) + getEnvironment().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Identifies the event that kicked off the build.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - configSource_ = null; - if (configSourceBuilder_ != null) { - configSourceBuilder_.dispose(); - configSourceBuilder_ = null; - } - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - environment_ = null; - if (environmentBuilder_ != null) { - environmentBuilder_.dispose(); - environmentBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation build() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation buildPartial() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.configSource_ = configSourceBuilder_ == null - ? configSource_ - : configSourceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.parameters_ = parametersBuilder_ == null - ? parameters_ - : parametersBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.environment_ = environmentBuilder_ == null - ? environment_ - : environmentBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) { - return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation other) { - if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance()) return this; - if (other.hasConfigSource()) { - mergeConfigSource(other.getConfigSource()); - } - if (other.hasParameters()) { - mergeParameters(other.getParameters()); - } - if (other.hasEnvironment()) { - mergeEnvironment(other.getEnvironment()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getConfigSourceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getParametersFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getEnvironmentFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource configSource_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder> configSourceBuilder_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @return Whether the configSource field is set. - */ - public boolean hasConfigSource() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @return The configSource. - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getConfigSource() { - if (configSourceBuilder_ == null) { - return configSource_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; - } else { - return configSourceBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - public Builder setConfigSource(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource value) { - if (configSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - configSource_ = value; - } else { - configSourceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - public Builder setConfigSource( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder builderForValue) { - if (configSourceBuilder_ == null) { - configSource_ = builderForValue.build(); - } else { - configSourceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - public Builder mergeConfigSource(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource value) { - if (configSourceBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - configSource_ != null && - configSource_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance()) { - getConfigSourceBuilder().mergeFrom(value); - } else { - configSource_ = value; - } - } else { - configSourceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - public Builder clearConfigSource() { - bitField0_ = (bitField0_ & ~0x00000001); - configSource_ = null; - if (configSourceBuilder_ != null) { - configSourceBuilder_.dispose(); - configSourceBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder getConfigSourceBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getConfigSourceFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder getConfigSourceOrBuilder() { - if (configSourceBuilder_ != null) { - return configSourceBuilder_.getMessageOrBuilder(); - } else { - return configSource_ == null ? - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder> - getConfigSourceFieldBuilder() { - if (configSourceBuilder_ == null) { - configSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder>( - getConfigSource(), - getParentForChildren(), - isClean()); - configSource_ = null; - } - return configSourceBuilder_; - } - - private com.google.protobuf.Struct parameters_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> parametersBuilder_; - /** - * .google.protobuf.Struct parameters = 2; - * @return Whether the parameters field is set. - */ - public boolean hasParameters() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .google.protobuf.Struct parameters = 2; - * @return The parameters. - */ - public com.google.protobuf.Struct getParameters() { - if (parametersBuilder_ == null) { - return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; - } else { - return parametersBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Struct parameters = 2; - */ - public Builder setParameters(com.google.protobuf.Struct value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parameters_ = value; - } else { - parametersBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct parameters = 2; - */ - public Builder setParameters( - com.google.protobuf.Struct.Builder builderForValue) { - if (parametersBuilder_ == null) { - parameters_ = builderForValue.build(); - } else { - parametersBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct parameters = 2; - */ - public Builder mergeParameters(com.google.protobuf.Struct value) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - parameters_ != null && - parameters_ != com.google.protobuf.Struct.getDefaultInstance()) { - getParametersBuilder().mergeFrom(value); - } else { - parameters_ = value; - } - } else { - parametersBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct parameters = 2; - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00000002); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Struct parameters = 2; - */ - public com.google.protobuf.Struct.Builder getParametersBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getParametersFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Struct parameters = 2; - */ - public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilder(); - } else { - return parameters_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : parameters_; - } - } - /** - * .google.protobuf.Struct parameters = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getParameters(), - getParentForChildren(), - isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - private com.google.protobuf.Struct environment_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> environmentBuilder_; - /** - * .google.protobuf.Struct environment = 3; - * @return Whether the environment field is set. - */ - public boolean hasEnvironment() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .google.protobuf.Struct environment = 3; - * @return The environment. - */ - public com.google.protobuf.Struct getEnvironment() { - if (environmentBuilder_ == null) { - return environment_ == null ? com.google.protobuf.Struct.getDefaultInstance() : environment_; - } else { - return environmentBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Struct environment = 3; - */ - public Builder setEnvironment(com.google.protobuf.Struct value) { - if (environmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - environment_ = value; - } else { - environmentBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct environment = 3; - */ - public Builder setEnvironment( - com.google.protobuf.Struct.Builder builderForValue) { - if (environmentBuilder_ == null) { - environment_ = builderForValue.build(); - } else { - environmentBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct environment = 3; - */ - public Builder mergeEnvironment(com.google.protobuf.Struct value) { - if (environmentBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - environment_ != null && - environment_ != com.google.protobuf.Struct.getDefaultInstance()) { - getEnvironmentBuilder().mergeFrom(value); - } else { - environment_ = value; - } - } else { - environmentBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct environment = 3; - */ - public Builder clearEnvironment() { - bitField0_ = (bitField0_ & ~0x00000004); - environment_ = null; - if (environmentBuilder_ != null) { - environmentBuilder_.dispose(); - environmentBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Struct environment = 3; - */ - public com.google.protobuf.Struct.Builder getEnvironmentBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getEnvironmentFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Struct environment = 3; - */ - public com.google.protobuf.StructOrBuilder getEnvironmentOrBuilder() { - if (environmentBuilder_ != null) { - return environmentBuilder_.getMessageOrBuilder(); - } else { - return environment_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : environment_; - } - } - /** - * .google.protobuf.Struct environment = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getEnvironmentFieldBuilder() { - if (environmentBuilder_ == null) { - environmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getEnvironment(), - getParentForChildren(), - isClean()); - environment_ = null; - } - return environmentBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) - private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation(); - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaInvocation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaConfigSourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) - com.google.protobuf.MessageOrBuilder { - - /** - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - * map<string, string> digest = 2; - */ - int getDigestCount(); - /** - * map<string, string> digest = 2; - */ - boolean containsDigest( - java.lang.String key); - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getDigest(); - /** - * map<string, string> digest = 2; - */ - java.util.Map - getDigestMap(); - /** - * map<string, string> digest = 2; - */ - /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<string, string> digest = 2; - */ - java.lang.String getDigestOrThrow( - java.lang.String key); - - /** - * string entry_point = 3; - * @return The entryPoint. - */ - java.lang.String getEntryPoint(); - /** - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - com.google.protobuf.ByteString - getEntryPointBytes(); - } - /** - *
-   * Describes where the config file that kicked off the build came from.
-   * This is effectively a pointer to the source where buildConfig came from.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource} - */ - public static final class SlsaConfigSource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) - SlsaConfigSourceOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaConfigSource.newBuilder() to construct. - private SlsaConfigSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaConfigSource() { - uri_ = ""; - entryPoint_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaConfigSource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - /** - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DIGEST_FIELD_NUMBER = 2; - private static final class DigestDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ENTRY_POINT_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object entryPoint_ = ""; - /** - * string entry_point = 3; - * @return The entryPoint. - */ - @java.lang.Override - public java.lang.String getEntryPoint() { - java.lang.Object ref = entryPoint_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entryPoint_ = s; - return s; - } - } - /** - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEntryPointBytes() { - java.lang.Object ref = entryPoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entryPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetDigest(), - DigestDefaultEntryHolder.defaultEntry, - 2); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entryPoint_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - for (java.util.Map.Entry entry - : internalGetDigest().getMap().entrySet()) { - com.google.protobuf.MapEntry - digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, digest__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entryPoint_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (!internalGetDigest().equals( - other.internalGetDigest())) return false; - if (!getEntryPoint() - .equals(other.getEntryPoint())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - if (!internalGetDigest().getMap().isEmpty()) { - hash = (37 * hash) + DIGEST_FIELD_NUMBER; - hash = (53 * hash) + internalGetDigest().hashCode(); - } - hash = (37 * hash) + ENTRY_POINT_FIELD_NUMBER; - hash = (53 * hash) + getEntryPoint().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Describes where the config file that kicked off the build came from.
-     * This is effectively a pointer to the source where buildConfig came from.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - uri_ = ""; - internalGetMutableDigest().clear(); - entryPoint_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource build() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource buildPartial() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.uri_ = uri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.digest_ = internalGetDigest(); - result.digest_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.entryPoint_ = entryPoint_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) { - return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource other) { - if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableDigest().mergeFrom( - other.internalGetDigest()); - bitField0_ |= 0x00000002; - if (!other.getEntryPoint().isEmpty()) { - entryPoint_ = other.entryPoint_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - com.google.protobuf.MapEntry - digest__ = input.readMessage( - DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableDigest().getMutableMap().put( - digest__.getKey(), digest__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - entryPoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object uri_ = ""; - /** - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - private com.google.protobuf.MapField - internalGetMutableDigest() { - if (digest_ == null) { - digest_ = com.google.protobuf.MapField.newMapField( - DigestDefaultEntryHolder.defaultEntry); - } - if (!digest_.isMutable()) { - digest_ = digest_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearDigest() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableDigest().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> digest = 2; - */ - public Builder removeDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableDigest().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableDigest() { - bitField0_ |= 0x00000002; - return internalGetMutableDigest().getMutableMap(); - } - /** - * map<string, string> digest = 2; - */ - public Builder putDigest( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableDigest().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - * map<string, string> digest = 2; - */ - public Builder putAllDigest( - java.util.Map values) { - internalGetMutableDigest().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000002; - return this; - } - - private java.lang.Object entryPoint_ = ""; - /** - * string entry_point = 3; - * @return The entryPoint. - */ - public java.lang.String getEntryPoint() { - java.lang.Object ref = entryPoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entryPoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - public com.google.protobuf.ByteString - getEntryPointBytes() { - java.lang.Object ref = entryPoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entryPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string entry_point = 3; - * @param value The entryPoint to set. - * @return This builder for chaining. - */ - public Builder setEntryPoint( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - entryPoint_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * string entry_point = 3; - * @return This builder for chaining. - */ - public Builder clearEntryPoint() { - entryPoint_ = getDefaultInstance().getEntryPoint(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * string entry_point = 3; - * @param value The bytes for entryPoint to set. - * @return This builder for chaining. - */ - public Builder setEntryPointBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - entryPoint_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) - private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource(); - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaConfigSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - java.lang.String getBuildInvocationId(); - /** - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - com.google.protobuf.ByteString - getBuildInvocationIdBytes(); - - /** - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - boolean hasBuildStartedOn(); - /** - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - com.google.protobuf.Timestamp getBuildStartedOn(); - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder(); - - /** - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - boolean hasBuildFinishedOn(); - /** - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - com.google.protobuf.Timestamp getBuildFinishedOn(); - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder(); - - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @return Whether the completeness field is set. - */ - boolean hasCompleteness(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @return The completeness. - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getCompleteness(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder getCompletenessOrBuilder(); - - /** - * bool reproducible = 5; - * @return The reproducible. - */ - boolean getReproducible(); - } - /** - *
-   * Other properties of the build.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata} - */ - public static final class SlsaMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) - SlsaMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaMetadata.newBuilder() to construct. - private SlsaMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaMetadata() { - buildInvocationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder.class); - } - - public static final int BUILD_INVOCATION_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object buildInvocationId_ = ""; - /** - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - @java.lang.Override - public java.lang.String getBuildInvocationId() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildInvocationId_ = s; - return s; - } - } - /** - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBuildInvocationIdBytes() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildInvocationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BUILD_STARTED_ON_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp buildStartedOn_; - /** - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - @java.lang.Override - public boolean hasBuildStartedOn() { - return buildStartedOn_ != null; - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getBuildStartedOn() { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - - public static final int BUILD_FINISHED_ON_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp buildFinishedOn_; - /** - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - @java.lang.Override - public boolean hasBuildFinishedOn() { - return buildFinishedOn_ != null; - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getBuildFinishedOn() { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - - public static final int COMPLETENESS_FIELD_NUMBER = 4; - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @return Whether the completeness field is set. - */ - @java.lang.Override - public boolean hasCompleteness() { - return completeness_ != null; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @return The completeness. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getCompleteness() { - return completeness_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { - return completeness_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; - } - - public static final int REPRODUCIBLE_FIELD_NUMBER = 5; - private boolean reproducible_ = false; - /** - * bool reproducible = 5; - * @return The reproducible. - */ - @java.lang.Override - public boolean getReproducible() { - return reproducible_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, buildInvocationId_); - } - if (buildStartedOn_ != null) { - output.writeMessage(2, getBuildStartedOn()); - } - if (buildFinishedOn_ != null) { - output.writeMessage(3, getBuildFinishedOn()); - } - if (completeness_ != null) { - output.writeMessage(4, getCompleteness()); - } - if (reproducible_ != false) { - output.writeBool(5, reproducible_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, buildInvocationId_); - } - if (buildStartedOn_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBuildStartedOn()); - } - if (buildFinishedOn_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getBuildFinishedOn()); - } - if (completeness_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCompleteness()); - } - if (reproducible_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, reproducible_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) obj; - - if (!getBuildInvocationId() - .equals(other.getBuildInvocationId())) return false; - if (hasBuildStartedOn() != other.hasBuildStartedOn()) return false; - if (hasBuildStartedOn()) { - if (!getBuildStartedOn() - .equals(other.getBuildStartedOn())) return false; - } - if (hasBuildFinishedOn() != other.hasBuildFinishedOn()) return false; - if (hasBuildFinishedOn()) { - if (!getBuildFinishedOn() - .equals(other.getBuildFinishedOn())) return false; - } - if (hasCompleteness() != other.hasCompleteness()) return false; - if (hasCompleteness()) { - if (!getCompleteness() - .equals(other.getCompleteness())) return false; - } - if (getReproducible() - != other.getReproducible()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BUILD_INVOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getBuildInvocationId().hashCode(); - if (hasBuildStartedOn()) { - hash = (37 * hash) + BUILD_STARTED_ON_FIELD_NUMBER; - hash = (53 * hash) + getBuildStartedOn().hashCode(); - } - if (hasBuildFinishedOn()) { - hash = (37 * hash) + BUILD_FINISHED_ON_FIELD_NUMBER; - hash = (53 * hash) + getBuildFinishedOn().hashCode(); - } - if (hasCompleteness()) { - hash = (37 * hash) + COMPLETENESS_FIELD_NUMBER; - hash = (53 * hash) + getCompleteness().hashCode(); - } - hash = (37 * hash) + REPRODUCIBLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getReproducible()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Other properties of the build.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - buildInvocationId_ = ""; - buildStartedOn_ = null; - if (buildStartedOnBuilder_ != null) { - buildStartedOnBuilder_.dispose(); - buildStartedOnBuilder_ = null; - } - buildFinishedOn_ = null; - if (buildFinishedOnBuilder_ != null) { - buildFinishedOnBuilder_.dispose(); - buildFinishedOnBuilder_ = null; - } - completeness_ = null; - if (completenessBuilder_ != null) { - completenessBuilder_.dispose(); - completenessBuilder_ = null; - } - reproducible_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata build() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata buildPartial() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.buildInvocationId_ = buildInvocationId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.buildStartedOn_ = buildStartedOnBuilder_ == null - ? buildStartedOn_ - : buildStartedOnBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.buildFinishedOn_ = buildFinishedOnBuilder_ == null - ? buildFinishedOn_ - : buildFinishedOnBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.completeness_ = completenessBuilder_ == null - ? completeness_ - : completenessBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.reproducible_ = reproducible_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) { - return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata other) { - if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance()) return this; - if (!other.getBuildInvocationId().isEmpty()) { - buildInvocationId_ = other.buildInvocationId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasBuildStartedOn()) { - mergeBuildStartedOn(other.getBuildStartedOn()); - } - if (other.hasBuildFinishedOn()) { - mergeBuildFinishedOn(other.getBuildFinishedOn()); - } - if (other.hasCompleteness()) { - mergeCompleteness(other.getCompleteness()); - } - if (other.getReproducible() != false) { - setReproducible(other.getReproducible()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - buildInvocationId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getBuildStartedOnFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getBuildFinishedOnFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getCompletenessFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: { - reproducible_ = input.readBool(); - bitField0_ |= 0x00000010; - break; - } // case 40 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object buildInvocationId_ = ""; - /** - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - public java.lang.String getBuildInvocationId() { - java.lang.Object ref = buildInvocationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildInvocationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - public com.google.protobuf.ByteString - getBuildInvocationIdBytes() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildInvocationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string build_invocation_id = 1; - * @param value The buildInvocationId to set. - * @return This builder for chaining. - */ - public Builder setBuildInvocationId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - buildInvocationId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string build_invocation_id = 1; - * @return This builder for chaining. - */ - public Builder clearBuildInvocationId() { - buildInvocationId_ = getDefaultInstance().getBuildInvocationId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string build_invocation_id = 1; - * @param value The bytes for buildInvocationId to set. - * @return This builder for chaining. - */ - public Builder setBuildInvocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - buildInvocationId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp buildStartedOn_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildStartedOnBuilder_; - /** - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - public boolean hasBuildStartedOn() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - public com.google.protobuf.Timestamp getBuildStartedOn() { - if (buildStartedOnBuilder_ == null) { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } else { - return buildStartedOnBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder setBuildStartedOn(com.google.protobuf.Timestamp value) { - if (buildStartedOnBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - buildStartedOn_ = value; - } else { - buildStartedOnBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder setBuildStartedOn( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (buildStartedOnBuilder_ == null) { - buildStartedOn_ = builderForValue.build(); - } else { - buildStartedOnBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder mergeBuildStartedOn(com.google.protobuf.Timestamp value) { - if (buildStartedOnBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - buildStartedOn_ != null && - buildStartedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getBuildStartedOnBuilder().mergeFrom(value); - } else { - buildStartedOn_ = value; - } - } else { - buildStartedOnBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder clearBuildStartedOn() { - bitField0_ = (bitField0_ & ~0x00000002); - buildStartedOn_ = null; - if (buildStartedOnBuilder_ != null) { - buildStartedOnBuilder_.dispose(); - buildStartedOnBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - public com.google.protobuf.Timestamp.Builder getBuildStartedOnBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getBuildStartedOnFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { - if (buildStartedOnBuilder_ != null) { - return buildStartedOnBuilder_.getMessageOrBuilder(); - } else { - return buildStartedOn_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getBuildStartedOnFieldBuilder() { - if (buildStartedOnBuilder_ == null) { - buildStartedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getBuildStartedOn(), - getParentForChildren(), - isClean()); - buildStartedOn_ = null; - } - return buildStartedOnBuilder_; - } - - private com.google.protobuf.Timestamp buildFinishedOn_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildFinishedOnBuilder_; - /** - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - public boolean hasBuildFinishedOn() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - public com.google.protobuf.Timestamp getBuildFinishedOn() { - if (buildFinishedOnBuilder_ == null) { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } else { - return buildFinishedOnBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder setBuildFinishedOn(com.google.protobuf.Timestamp value) { - if (buildFinishedOnBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - buildFinishedOn_ = value; - } else { - buildFinishedOnBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder setBuildFinishedOn( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (buildFinishedOnBuilder_ == null) { - buildFinishedOn_ = builderForValue.build(); - } else { - buildFinishedOnBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder mergeBuildFinishedOn(com.google.protobuf.Timestamp value) { - if (buildFinishedOnBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - buildFinishedOn_ != null && - buildFinishedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getBuildFinishedOnBuilder().mergeFrom(value); - } else { - buildFinishedOn_ = value; - } - } else { - buildFinishedOnBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder clearBuildFinishedOn() { - bitField0_ = (bitField0_ & ~0x00000004); - buildFinishedOn_ = null; - if (buildFinishedOnBuilder_ != null) { - buildFinishedOnBuilder_.dispose(); - buildFinishedOnBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public com.google.protobuf.Timestamp.Builder getBuildFinishedOnBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getBuildFinishedOnFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { - if (buildFinishedOnBuilder_ != null) { - return buildFinishedOnBuilder_.getMessageOrBuilder(); - } else { - return buildFinishedOn_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getBuildFinishedOnFieldBuilder() { - if (buildFinishedOnBuilder_ == null) { - buildFinishedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getBuildFinishedOn(), - getParentForChildren(), - isClean()); - buildFinishedOn_ = null; - } - return buildFinishedOnBuilder_; - } - - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder> completenessBuilder_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @return Whether the completeness field is set. - */ - public boolean hasCompleteness() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @return The completeness. - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getCompleteness() { - if (completenessBuilder_ == null) { - return completeness_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; - } else { - return completenessBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - public Builder setCompleteness(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness value) { - if (completenessBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - completeness_ = value; - } else { - completenessBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - public Builder setCompleteness( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder builderForValue) { - if (completenessBuilder_ == null) { - completeness_ = builderForValue.build(); - } else { - completenessBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - public Builder mergeCompleteness(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness value) { - if (completenessBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - completeness_ != null && - completeness_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance()) { - getCompletenessBuilder().mergeFrom(value); - } else { - completeness_ = value; - } - } else { - completenessBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - public Builder clearCompleteness() { - bitField0_ = (bitField0_ & ~0x00000008); - completeness_ = null; - if (completenessBuilder_ != null) { - completenessBuilder_.dispose(); - completenessBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder getCompletenessBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCompletenessFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { - if (completenessBuilder_ != null) { - return completenessBuilder_.getMessageOrBuilder(); - } else { - return completeness_ == null ? - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder> - getCompletenessFieldBuilder() { - if (completenessBuilder_ == null) { - completenessBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder>( - getCompleteness(), - getParentForChildren(), - isClean()); - completeness_ = null; - } - return completenessBuilder_; - } - - private boolean reproducible_ ; - /** - * bool reproducible = 5; - * @return The reproducible. - */ - @java.lang.Override - public boolean getReproducible() { - return reproducible_; - } - /** - * bool reproducible = 5; - * @param value The reproducible to set. - * @return This builder for chaining. - */ - public Builder setReproducible(boolean value) { - - reproducible_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * bool reproducible = 5; - * @return This builder for chaining. - */ - public Builder clearReproducible() { - bitField0_ = (bitField0_ & ~0x00000010); - reproducible_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) - private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata(); - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaCompletenessOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) - com.google.protobuf.MessageOrBuilder { - - /** - * bool parameters = 1; - * @return The parameters. - */ - boolean getParameters(); - - /** - * bool environment = 2; - * @return The environment. - */ - boolean getEnvironment(); - - /** - * bool materials = 3; - * @return The materials. - */ - boolean getMaterials(); - } - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness} - */ - public static final class SlsaCompleteness extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) - SlsaCompletenessOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaCompleteness.newBuilder() to construct. - private SlsaCompleteness(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaCompleteness() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaCompleteness(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder.class); - } - - public static final int PARAMETERS_FIELD_NUMBER = 1; - private boolean parameters_ = false; - /** - * bool parameters = 1; - * @return The parameters. - */ - @java.lang.Override - public boolean getParameters() { - return parameters_; - } - - public static final int ENVIRONMENT_FIELD_NUMBER = 2; - private boolean environment_ = false; - /** - * bool environment = 2; - * @return The environment. - */ - @java.lang.Override - public boolean getEnvironment() { - return environment_; - } - - public static final int MATERIALS_FIELD_NUMBER = 3; - private boolean materials_ = false; - /** - * bool materials = 3; - * @return The materials. - */ - @java.lang.Override - public boolean getMaterials() { - return materials_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (parameters_ != false) { - output.writeBool(1, parameters_); - } - if (environment_ != false) { - output.writeBool(2, environment_); - } - if (materials_ != false) { - output.writeBool(3, materials_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (parameters_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, parameters_); - } - if (environment_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, environment_); - } - if (materials_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, materials_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) obj; - - if (getParameters() - != other.getParameters()) return false; - if (getEnvironment() - != other.getEnvironment()) return false; - if (getMaterials() - != other.getMaterials()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getParameters()); - hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getEnvironment()); - hash = (37 * hash) + MATERIALS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getMaterials()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parameters_ = false; - environment_ = false; - materials_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness build() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness buildPartial() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parameters_ = parameters_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.environment_ = environment_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.materials_ = materials_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) { - return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness other) { - if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance()) return this; - if (other.getParameters() != false) { - setParameters(other.getParameters()); - } - if (other.getEnvironment() != false) { - setEnvironment(other.getEnvironment()); - } - if (other.getMaterials() != false) { - setMaterials(other.getMaterials()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - parameters_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - environment_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: { - materials_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private boolean parameters_ ; - /** - * bool parameters = 1; - * @return The parameters. - */ - @java.lang.Override - public boolean getParameters() { - return parameters_; - } - /** - * bool parameters = 1; - * @param value The parameters to set. - * @return This builder for chaining. - */ - public Builder setParameters(boolean value) { - - parameters_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bool parameters = 1; - * @return This builder for chaining. - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00000001); - parameters_ = false; - onChanged(); - return this; - } - - private boolean environment_ ; - /** - * bool environment = 2; - * @return The environment. - */ - @java.lang.Override - public boolean getEnvironment() { - return environment_; - } - /** - * bool environment = 2; - * @param value The environment to set. - * @return This builder for chaining. - */ - public Builder setEnvironment(boolean value) { - - environment_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * bool environment = 2; - * @return This builder for chaining. - */ - public Builder clearEnvironment() { - bitField0_ = (bitField0_ & ~0x00000002); - environment_ = false; - onChanged(); - return this; - } - - private boolean materials_ ; - /** - * bool materials = 3; - * @return The materials. - */ - @java.lang.Override - public boolean getMaterials() { - return materials_; - } - /** - * bool materials = 3; - * @param value The materials to set. - * @return This builder for chaining. - */ - public Builder setMaterials(boolean value) { - - materials_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * bool materials = 3; - * @return This builder for chaining. - */ - public Builder clearMaterials() { - bitField0_ = (bitField0_ & ~0x00000004); - materials_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) - private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness(); - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaCompleteness parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int BUILDER_FIELD_NUMBER = 1; - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @return Whether the builder field is set. - */ - @java.lang.Override - public boolean hasBuilder() { - return builder_ != null; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @return The builder. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getBuilder() { - return builder_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder getBuilderOrBuilder() { - return builder_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; - } - - public static final int BUILD_TYPE_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object buildType_ = ""; - /** - * string build_type = 2; - * @return The buildType. - */ - @java.lang.Override - public java.lang.String getBuildType() { - java.lang.Object ref = buildType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildType_ = s; - return s; - } - } - /** - * string build_type = 2; - * @return The bytes for buildType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBuildTypeBytes() { - java.lang.Object ref = buildType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INVOCATION_FIELD_NUMBER = 3; - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @return Whether the invocation field is set. - */ - @java.lang.Override - public boolean hasInvocation() { - return invocation_ != null; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @return The invocation. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getInvocation() { - return invocation_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder getInvocationOrBuilder() { - return invocation_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; - } - - public static final int BUILD_CONFIG_FIELD_NUMBER = 4; - private com.google.protobuf.Struct buildConfig_; - /** - * .google.protobuf.Struct build_config = 4; - * @return Whether the buildConfig field is set. - */ - @java.lang.Override - public boolean hasBuildConfig() { - return buildConfig_ != null; - } - /** - * .google.protobuf.Struct build_config = 4; - * @return The buildConfig. - */ - @java.lang.Override - public com.google.protobuf.Struct getBuildConfig() { - return buildConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; - } - /** - * .google.protobuf.Struct build_config = 4; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getBuildConfigOrBuilder() { - return buildConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; - } - - public static final int METADATA_FIELD_NUMBER = 5; - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return metadata_ != null; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @return The metadata. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getMetadata() { - return metadata_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; - } - - public static final int MATERIALS_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private java.util.List materials_; - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - @java.lang.Override - public java.util.List getMaterialsList() { - return materials_; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - @java.lang.Override - public java.util.List - getMaterialsOrBuilderList() { - return materials_; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - @java.lang.Override - public int getMaterialsCount() { - return materials_.size(); - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getMaterials(int index) { - return materials_.get(index); - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder getMaterialsOrBuilder( - int index) { - return materials_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (builder_ != null) { - output.writeMessage(1, getBuilder()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, buildType_); - } - if (invocation_ != null) { - output.writeMessage(3, getInvocation()); - } - if (buildConfig_ != null) { - output.writeMessage(4, getBuildConfig()); - } - if (metadata_ != null) { - output.writeMessage(5, getMetadata()); - } - for (int i = 0; i < materials_.size(); i++) { - output.writeMessage(6, materials_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (builder_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBuilder()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, buildType_); - } - if (invocation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getInvocation()); - } - if (buildConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getBuildConfig()); - } - if (metadata_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getMetadata()); - } - for (int i = 0; i < materials_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, materials_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenanceZeroTwo other = (io.grafeas.v1.SlsaProvenanceZeroTwo) obj; - - if (hasBuilder() != other.hasBuilder()) return false; - if (hasBuilder()) { - if (!getBuilder() - .equals(other.getBuilder())) return false; - } - if (!getBuildType() - .equals(other.getBuildType())) return false; - if (hasInvocation() != other.hasInvocation()) return false; - if (hasInvocation()) { - if (!getInvocation() - .equals(other.getInvocation())) return false; - } - if (hasBuildConfig() != other.hasBuildConfig()) return false; - if (hasBuildConfig()) { - if (!getBuildConfig() - .equals(other.getBuildConfig())) return false; - } - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getMaterialsList() - .equals(other.getMaterialsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBuilder()) { - hash = (37 * hash) + BUILDER_FIELD_NUMBER; - hash = (53 * hash) + getBuilder().hashCode(); - } - hash = (37 * hash) + BUILD_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getBuildType().hashCode(); - if (hasInvocation()) { - hash = (37 * hash) + INVOCATION_FIELD_NUMBER; - hash = (53 * hash) + getInvocation().hashCode(); - } - if (hasBuildConfig()) { - hash = (37 * hash) + BUILD_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getBuildConfig().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - if (getMaterialsCount() > 0) { - hash = (37 * hash) + MATERIALS_FIELD_NUMBER; - hash = (53 * hash) + getMaterialsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * See full explanation of fields at slsa.dev/provenance/v0.2.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo) - io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.class, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - builder_ = null; - if (builderBuilder_ != null) { - builderBuilder_.dispose(); - builderBuilder_ = null; - } - buildType_ = ""; - invocation_ = null; - if (invocationBuilder_ != null) { - invocationBuilder_.dispose(); - invocationBuilder_ = null; - } - buildConfig_ = null; - if (buildConfigBuilder_ != null) { - buildConfigBuilder_.dispose(); - buildConfigBuilder_ = null; - } - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - if (materialsBuilder_ == null) { - materials_ = java.util.Collections.emptyList(); - } else { - materials_ = null; - materialsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo build() { - io.grafeas.v1.SlsaProvenanceZeroTwo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo buildPartial() { - io.grafeas.v1.SlsaProvenanceZeroTwo result = new io.grafeas.v1.SlsaProvenanceZeroTwo(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.SlsaProvenanceZeroTwo result) { - if (materialsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - materials_ = java.util.Collections.unmodifiableList(materials_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.materials_ = materials_; - } else { - result.materials_ = materialsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.builder_ = builderBuilder_ == null - ? builder_ - : builderBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.buildType_ = buildType_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.invocation_ = invocationBuilder_ == null - ? invocation_ - : invocationBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.buildConfig_ = buildConfigBuilder_ == null - ? buildConfig_ - : buildConfigBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo) { - return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo other) { - if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance()) return this; - if (other.hasBuilder()) { - mergeBuilder(other.getBuilder()); - } - if (!other.getBuildType().isEmpty()) { - buildType_ = other.buildType_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasInvocation()) { - mergeInvocation(other.getInvocation()); - } - if (other.hasBuildConfig()) { - mergeBuildConfig(other.getBuildConfig()); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (materialsBuilder_ == null) { - if (!other.materials_.isEmpty()) { - if (materials_.isEmpty()) { - materials_ = other.materials_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureMaterialsIsMutable(); - materials_.addAll(other.materials_); - } - onChanged(); - } - } else { - if (!other.materials_.isEmpty()) { - if (materialsBuilder_.isEmpty()) { - materialsBuilder_.dispose(); - materialsBuilder_ = null; - materials_ = other.materials_; - bitField0_ = (bitField0_ & ~0x00000020); - materialsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getMaterialsFieldBuilder() : null; - } else { - materialsBuilder_.addAllMessages(other.materials_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getBuilderFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - buildType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getInvocationFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getBuildConfigFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial m = - input.readMessage( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.parser(), - extensionRegistry); - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.add(m); - } else { - materialsBuilder_.addMessage(m); - } - break; - } // case 50 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder> builderBuilder_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @return Whether the builder field is set. - */ - public boolean hasBuilder() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @return The builder. - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getBuilder() { - if (builderBuilder_ == null) { - return builder_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; - } else { - return builderBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - public Builder setBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder value) { - if (builderBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - builder_ = value; - } else { - builderBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - public Builder setBuilder( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder builderForValue) { - if (builderBuilder_ == null) { - builder_ = builderForValue.build(); - } else { - builderBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - public Builder mergeBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder value) { - if (builderBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - builder_ != null && - builder_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance()) { - getBuilderBuilder().mergeFrom(value); - } else { - builder_ = value; - } - } else { - builderBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - public Builder clearBuilder() { - bitField0_ = (bitField0_ & ~0x00000001); - builder_ = null; - if (builderBuilder_ != null) { - builderBuilder_.dispose(); - builderBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder getBuilderBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getBuilderFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder getBuilderOrBuilder() { - if (builderBuilder_ != null) { - return builderBuilder_.getMessageOrBuilder(); - } else { - return builder_ == null ? - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder> - getBuilderFieldBuilder() { - if (builderBuilder_ == null) { - builderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder>( - getBuilder(), - getParentForChildren(), - isClean()); - builder_ = null; - } - return builderBuilder_; - } - - private java.lang.Object buildType_ = ""; - /** - * string build_type = 2; - * @return The buildType. - */ - public java.lang.String getBuildType() { - java.lang.Object ref = buildType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string build_type = 2; - * @return The bytes for buildType. - */ - public com.google.protobuf.ByteString - getBuildTypeBytes() { - java.lang.Object ref = buildType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string build_type = 2; - * @param value The buildType to set. - * @return This builder for chaining. - */ - public Builder setBuildType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - buildType_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string build_type = 2; - * @return This builder for chaining. - */ - public Builder clearBuildType() { - buildType_ = getDefaultInstance().getBuildType(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string build_type = 2; - * @param value The bytes for buildType to set. - * @return This builder for chaining. - */ - public Builder setBuildTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - buildType_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder> invocationBuilder_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @return Whether the invocation field is set. - */ - public boolean hasInvocation() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @return The invocation. - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getInvocation() { - if (invocationBuilder_ == null) { - return invocation_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; - } else { - return invocationBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - public Builder setInvocation(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation value) { - if (invocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - invocation_ = value; - } else { - invocationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - public Builder setInvocation( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder builderForValue) { - if (invocationBuilder_ == null) { - invocation_ = builderForValue.build(); - } else { - invocationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - public Builder mergeInvocation(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation value) { - if (invocationBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - invocation_ != null && - invocation_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance()) { - getInvocationBuilder().mergeFrom(value); - } else { - invocation_ = value; - } - } else { - invocationBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - public Builder clearInvocation() { - bitField0_ = (bitField0_ & ~0x00000004); - invocation_ = null; - if (invocationBuilder_ != null) { - invocationBuilder_.dispose(); - invocationBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder getInvocationBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getInvocationFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder getInvocationOrBuilder() { - if (invocationBuilder_ != null) { - return invocationBuilder_.getMessageOrBuilder(); - } else { - return invocation_ == null ? - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder> - getInvocationFieldBuilder() { - if (invocationBuilder_ == null) { - invocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder>( - getInvocation(), - getParentForChildren(), - isClean()); - invocation_ = null; - } - return invocationBuilder_; - } - - private com.google.protobuf.Struct buildConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> buildConfigBuilder_; - /** - * .google.protobuf.Struct build_config = 4; - * @return Whether the buildConfig field is set. - */ - public boolean hasBuildConfig() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * .google.protobuf.Struct build_config = 4; - * @return The buildConfig. - */ - public com.google.protobuf.Struct getBuildConfig() { - if (buildConfigBuilder_ == null) { - return buildConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; - } else { - return buildConfigBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Struct build_config = 4; - */ - public Builder setBuildConfig(com.google.protobuf.Struct value) { - if (buildConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - buildConfig_ = value; - } else { - buildConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct build_config = 4; - */ - public Builder setBuildConfig( - com.google.protobuf.Struct.Builder builderForValue) { - if (buildConfigBuilder_ == null) { - buildConfig_ = builderForValue.build(); - } else { - buildConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct build_config = 4; - */ - public Builder mergeBuildConfig(com.google.protobuf.Struct value) { - if (buildConfigBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - buildConfig_ != null && - buildConfig_ != com.google.protobuf.Struct.getDefaultInstance()) { - getBuildConfigBuilder().mergeFrom(value); - } else { - buildConfig_ = value; - } - } else { - buildConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct build_config = 4; - */ - public Builder clearBuildConfig() { - bitField0_ = (bitField0_ & ~0x00000008); - buildConfig_ = null; - if (buildConfigBuilder_ != null) { - buildConfigBuilder_.dispose(); - buildConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Struct build_config = 4; - */ - public com.google.protobuf.Struct.Builder getBuildConfigBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getBuildConfigFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Struct build_config = 4; - */ - public com.google.protobuf.StructOrBuilder getBuildConfigOrBuilder() { - if (buildConfigBuilder_ != null) { - return buildConfigBuilder_.getMessageOrBuilder(); - } else { - return buildConfig_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; - } - } - /** - * .google.protobuf.Struct build_config = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getBuildConfigFieldBuilder() { - if (buildConfigBuilder_ == null) { - buildConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getBuildConfig(), - getParentForChildren(), - isClean()); - buildConfig_ = null; - } - return buildConfigBuilder_; - } - - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder> metadataBuilder_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @return The metadata. - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - public Builder setMetadata(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - public Builder setMetadata( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - public Builder mergeMetadata(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - metadata_ != null && - metadata_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000010); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private java.util.List materials_ = - java.util.Collections.emptyList(); - private void ensureMaterialsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - materials_ = new java.util.ArrayList(materials_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder> materialsBuilder_; - - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public java.util.List getMaterialsList() { - if (materialsBuilder_ == null) { - return java.util.Collections.unmodifiableList(materials_); - } else { - return materialsBuilder_.getMessageList(); - } - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public int getMaterialsCount() { - if (materialsBuilder_ == null) { - return materials_.size(); - } else { - return materialsBuilder_.getCount(); - } - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getMaterials(int index) { - if (materialsBuilder_ == null) { - return materials_.get(index); - } else { - return materialsBuilder_.getMessage(index); - } - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder setMaterials( - int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial value) { - if (materialsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMaterialsIsMutable(); - materials_.set(index, value); - onChanged(); - } else { - materialsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder setMaterials( - int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder builderForValue) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.set(index, builderForValue.build()); - onChanged(); - } else { - materialsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder addMaterials(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial value) { - if (materialsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMaterialsIsMutable(); - materials_.add(value); - onChanged(); - } else { - materialsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder addMaterials( - int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial value) { - if (materialsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMaterialsIsMutable(); - materials_.add(index, value); - onChanged(); - } else { - materialsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder addMaterials( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder builderForValue) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.add(builderForValue.build()); - onChanged(); - } else { - materialsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder addMaterials( - int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder builderForValue) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.add(index, builderForValue.build()); - onChanged(); - } else { - materialsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder addAllMaterials( - java.lang.Iterable values) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, materials_); - onChanged(); - } else { - materialsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder clearMaterials() { - if (materialsBuilder_ == null) { - materials_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - materialsBuilder_.clear(); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder removeMaterials(int index) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.remove(index); - onChanged(); - } else { - materialsBuilder_.remove(index); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder getMaterialsBuilder( - int index) { - return getMaterialsFieldBuilder().getBuilder(index); - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder getMaterialsOrBuilder( - int index) { - if (materialsBuilder_ == null) { - return materials_.get(index); } else { - return materialsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public java.util.List - getMaterialsOrBuilderList() { - if (materialsBuilder_ != null) { - return materialsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(materials_); - } - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder addMaterialsBuilder() { - return getMaterialsFieldBuilder().addBuilder( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder addMaterialsBuilder( - int index) { - return getMaterialsFieldBuilder().addBuilder( - index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public java.util.List - getMaterialsBuilderList() { - return getMaterialsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder> - getMaterialsFieldBuilder() { - if (materialsBuilder_ == null) { - materialsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder>( - materials_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - materials_ = null; - } - return materialsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo) - private static final io.grafeas.v1.SlsaProvenanceZeroTwo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo(); - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaProvenanceZeroTwo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java deleted file mode 100644 index 42e35172f0ca..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java +++ /dev/null @@ -1,105 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/slsa_provenance_zero_two.proto - -package io.grafeas.v1; - -public interface SlsaProvenanceZeroTwoOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo) - com.google.protobuf.MessageOrBuilder { - - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @return Whether the builder field is set. - */ - boolean hasBuilder(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @return The builder. - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getBuilder(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder getBuilderOrBuilder(); - - /** - * string build_type = 2; - * @return The buildType. - */ - java.lang.String getBuildType(); - /** - * string build_type = 2; - * @return The bytes for buildType. - */ - com.google.protobuf.ByteString - getBuildTypeBytes(); - - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @return Whether the invocation field is set. - */ - boolean hasInvocation(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @return The invocation. - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getInvocation(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder getInvocationOrBuilder(); - - /** - * .google.protobuf.Struct build_config = 4; - * @return Whether the buildConfig field is set. - */ - boolean hasBuildConfig(); - /** - * .google.protobuf.Struct build_config = 4; - * @return The buildConfig. - */ - com.google.protobuf.Struct getBuildConfig(); - /** - * .google.protobuf.Struct build_config = 4; - */ - com.google.protobuf.StructOrBuilder getBuildConfigOrBuilder(); - - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @return The metadata. - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getMetadata(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder getMetadataOrBuilder(); - - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - java.util.List - getMaterialsList(); - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getMaterials(int index); - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - int getMaterialsCount(); - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - java.util.List - getMaterialsOrBuilderList(); - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder getMaterialsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java deleted file mode 100644 index eec7126b0270..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java +++ /dev/null @@ -1,174 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/slsa_provenance_zero_two.proto - -package io.grafeas.v1; - -public final class SlsaProvenanceZeroTwoProto { - private SlsaProvenanceZeroTwoProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n)grafeas/v1/slsa_provenance_zero_two.pr" + - "oto\022\ngrafeas.v1\032\034google/protobuf/struct." + - "proto\032\037google/protobuf/timestamp.proto\"\323" + - "\t\n\025SlsaProvenanceZeroTwo\022>\n\007builder\030\001 \001(" + - "\0132-.grafeas.v1.SlsaProvenanceZeroTwo.Sls" + - "aBuilder\022\022\n\nbuild_type\030\002 \001(\t\022D\n\ninvocati" + - "on\030\003 \001(\01320.grafeas.v1.SlsaProvenanceZero" + - "Two.SlsaInvocation\022-\n\014build_config\030\004 \001(\013" + - "2\027.google.protobuf.Struct\022@\n\010metadata\030\005 " + - "\001(\0132..grafeas.v1.SlsaProvenanceZeroTwo.S" + - "lsaMetadata\022A\n\tmaterials\030\006 \003(\0132..grafeas" + - ".v1.SlsaProvenanceZeroTwo.SlsaMaterial\032\031" + - "\n\013SlsaBuilder\022\n\n\002id\030\001 \001(\t\032\226\001\n\014SlsaMateri" + - "al\022\013\n\003uri\030\001 \001(\t\022J\n\006digest\030\002 \003(\0132:.grafea" + - "s.v1.SlsaProvenanceZeroTwo.SlsaMaterial." + - "DigestEntry\032-\n\013DigestEntry\022\013\n\003key\030\001 \001(\t\022" + - "\r\n\005value\030\002 \001(\t:\0028\001\032\266\001\n\016SlsaInvocation\022I\n" + - "\rconfig_source\030\001 \001(\01322.grafeas.v1.SlsaPr" + - "ovenanceZeroTwo.SlsaConfigSource\022+\n\npara" + - "meters\030\002 \001(\0132\027.google.protobuf.Struct\022,\n" + - "\013environment\030\003 \001(\0132\027.google.protobuf.Str" + - "uct\032\263\001\n\020SlsaConfigSource\022\013\n\003uri\030\001 \001(\t\022N\n" + - "\006digest\030\002 \003(\0132>.grafeas.v1.SlsaProvenanc" + - "eZeroTwo.SlsaConfigSource.DigestEntry\022\023\n" + - "\013entry_point\030\003 \001(\t\032-\n\013DigestEntry\022\013\n\003key" + - "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032\370\001\n\014SlsaMetada" + - "ta\022\033\n\023build_invocation_id\030\001 \001(\t\0224\n\020build" + - "_started_on\030\002 \001(\0132\032.google.protobuf.Time" + - "stamp\0225\n\021build_finished_on\030\003 \001(\0132\032.googl" + - "e.protobuf.Timestamp\022H\n\014completeness\030\004 \001" + - "(\01322.grafeas.v1.SlsaProvenanceZeroTwo.Sl" + - "saCompleteness\022\024\n\014reproducible\030\005 \001(\010\032N\n\020" + - "SlsaCompleteness\022\022\n\nparameters\030\001 \001(\010\022\023\n\013" + - "environment\030\002 \001(\010\022\021\n\tmaterials\030\003 \001(\010Bm\n\r" + - "io.grafeas.v1B\032SlsaProvenanceZeroTwoProt" + - "oP\001Z8google.golang.org/genproto/googleap" + - "is/grafeas/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.StructProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor, - new java.lang.String[] { "Builder", "BuildType", "Invocation", "BuildConfig", "Metadata", "Materials", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor, - new java.lang.String[] { "Id", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(1); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor, - new java.lang.String[] { "Uri", "Digest", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(2); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor, - new java.lang.String[] { "ConfigSource", "Parameters", "Environment", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(3); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor, - new java.lang.String[] { "Uri", "Digest", "EntryPoint", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(4); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor, - new java.lang.String[] { "BuildInvocationId", "BuildStartedOn", "BuildFinishedOn", "Completeness", "Reproducible", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(5); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor, - new java.lang.String[] { "Parameters", "Environment", "Materials", }); - com.google.protobuf.StructProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java deleted file mode 100644 index 17dcda68fad0..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java +++ /dev/null @@ -1,1709 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * Source describes the location of the source used for the build.
- * 
- * - * Protobuf type {@code grafeas.v1.Source} - */ -public final class Source extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Source) - SourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use Source.newBuilder() to construct. - private Source(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Source() { - artifactStorageSourceUri_ = ""; - additionalContexts_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Source(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetFileHashes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Source.class, io.grafeas.v1.Source.Builder.class); - } - - public static final int ARTIFACT_STORAGE_SOURCE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object artifactStorageSourceUri_ = ""; - /** - *
-   * If provided, the input binary artifacts for the build came from this
-   * location.
-   * 
- * - * string artifact_storage_source_uri = 1; - * @return The artifactStorageSourceUri. - */ - @java.lang.Override - public java.lang.String getArtifactStorageSourceUri() { - java.lang.Object ref = artifactStorageSourceUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - artifactStorageSourceUri_ = s; - return s; - } - } - /** - *
-   * If provided, the input binary artifacts for the build came from this
-   * location.
-   * 
- * - * string artifact_storage_source_uri = 1; - * @return The bytes for artifactStorageSourceUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getArtifactStorageSourceUriBytes() { - java.lang.Object ref = artifactStorageSourceUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - artifactStorageSourceUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILE_HASHES_FIELD_NUMBER = 2; - private static final class FileHashesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, io.grafeas.v1.FileHashes> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_FileHashesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - io.grafeas.v1.FileHashes.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, io.grafeas.v1.FileHashes> fileHashes_; - private com.google.protobuf.MapField - internalGetFileHashes() { - if (fileHashes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - FileHashesDefaultEntryHolder.defaultEntry); - } - return fileHashes_; - } - public int getFileHashesCount() { - return internalGetFileHashes().getMap().size(); - } - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public boolean containsFileHashes( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetFileHashes().getMap().containsKey(key); - } - /** - * Use {@link #getFileHashesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getFileHashes() { - return getFileHashesMap(); - } - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public java.util.Map getFileHashesMap() { - return internalGetFileHashes().getMap(); - } - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public /* nullable */ -io.grafeas.v1.FileHashes getFileHashesOrDefault( - java.lang.String key, - /* nullable */ -io.grafeas.v1.FileHashes defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetFileHashes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public io.grafeas.v1.FileHashes getFileHashesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetFileHashes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int CONTEXT_FIELD_NUMBER = 3; - private io.grafeas.v1.SourceContext context_; - /** - *
-   * If provided, the source code used for the build came from this location.
-   * 
- * - * .grafeas.v1.SourceContext context = 3; - * @return Whether the context field is set. - */ - @java.lang.Override - public boolean hasContext() { - return context_ != null; - } - /** - *
-   * If provided, the source code used for the build came from this location.
-   * 
- * - * .grafeas.v1.SourceContext context = 3; - * @return The context. - */ - @java.lang.Override - public io.grafeas.v1.SourceContext getContext() { - return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_; - } - /** - *
-   * If provided, the source code used for the build came from this location.
-   * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - @java.lang.Override - public io.grafeas.v1.SourceContextOrBuilder getContextOrBuilder() { - return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_; - } - - public static final int ADDITIONAL_CONTEXTS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List additionalContexts_; - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - @java.lang.Override - public java.util.List getAdditionalContextsList() { - return additionalContexts_; - } - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - @java.lang.Override - public java.util.List - getAdditionalContextsOrBuilderList() { - return additionalContexts_; - } - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - @java.lang.Override - public int getAdditionalContextsCount() { - return additionalContexts_.size(); - } - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - @java.lang.Override - public io.grafeas.v1.SourceContext getAdditionalContexts(int index) { - return additionalContexts_.get(index); - } - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - @java.lang.Override - public io.grafeas.v1.SourceContextOrBuilder getAdditionalContextsOrBuilder( - int index) { - return additionalContexts_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorageSourceUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, artifactStorageSourceUri_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetFileHashes(), - FileHashesDefaultEntryHolder.defaultEntry, - 2); - if (context_ != null) { - output.writeMessage(3, getContext()); - } - for (int i = 0; i < additionalContexts_.size(); i++) { - output.writeMessage(4, additionalContexts_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorageSourceUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, artifactStorageSourceUri_); - } - for (java.util.Map.Entry entry - : internalGetFileHashes().getMap().entrySet()) { - com.google.protobuf.MapEntry - fileHashes__ = FileHashesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, fileHashes__); - } - if (context_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getContext()); - } - for (int i = 0; i < additionalContexts_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, additionalContexts_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Source)) { - return super.equals(obj); - } - io.grafeas.v1.Source other = (io.grafeas.v1.Source) obj; - - if (!getArtifactStorageSourceUri() - .equals(other.getArtifactStorageSourceUri())) return false; - if (!internalGetFileHashes().equals( - other.internalGetFileHashes())) return false; - if (hasContext() != other.hasContext()) return false; - if (hasContext()) { - if (!getContext() - .equals(other.getContext())) return false; - } - if (!getAdditionalContextsList() - .equals(other.getAdditionalContextsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ARTIFACT_STORAGE_SOURCE_URI_FIELD_NUMBER; - hash = (53 * hash) + getArtifactStorageSourceUri().hashCode(); - if (!internalGetFileHashes().getMap().isEmpty()) { - hash = (37 * hash) + FILE_HASHES_FIELD_NUMBER; - hash = (53 * hash) + internalGetFileHashes().hashCode(); - } - if (hasContext()) { - hash = (37 * hash) + CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getContext().hashCode(); - } - if (getAdditionalContextsCount() > 0) { - hash = (37 * hash) + ADDITIONAL_CONTEXTS_FIELD_NUMBER; - hash = (53 * hash) + getAdditionalContextsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Source parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Source parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Source parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Source parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Source parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Source parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Source parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Source parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Source parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Source parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Source parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Source parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Source prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Source describes the location of the source used for the build.
-   * 
- * - * Protobuf type {@code grafeas.v1.Source} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Source) - io.grafeas.v1.SourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetFileHashes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableFileHashes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Source.class, io.grafeas.v1.Source.Builder.class); - } - - // Construct using io.grafeas.v1.Source.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - artifactStorageSourceUri_ = ""; - internalGetMutableFileHashes().clear(); - context_ = null; - if (contextBuilder_ != null) { - contextBuilder_.dispose(); - contextBuilder_ = null; - } - if (additionalContextsBuilder_ == null) { - additionalContexts_ = java.util.Collections.emptyList(); - } else { - additionalContexts_ = null; - additionalContextsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Source getDefaultInstanceForType() { - return io.grafeas.v1.Source.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Source build() { - io.grafeas.v1.Source result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Source buildPartial() { - io.grafeas.v1.Source result = new io.grafeas.v1.Source(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.Source result) { - if (additionalContextsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - additionalContexts_ = java.util.Collections.unmodifiableList(additionalContexts_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.additionalContexts_ = additionalContexts_; - } else { - result.additionalContexts_ = additionalContextsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.Source result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.artifactStorageSourceUri_ = artifactStorageSourceUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.fileHashes_ = internalGetFileHashes(); - result.fileHashes_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.context_ = contextBuilder_ == null - ? context_ - : contextBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Source) { - return mergeFrom((io.grafeas.v1.Source)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Source other) { - if (other == io.grafeas.v1.Source.getDefaultInstance()) return this; - if (!other.getArtifactStorageSourceUri().isEmpty()) { - artifactStorageSourceUri_ = other.artifactStorageSourceUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableFileHashes().mergeFrom( - other.internalGetFileHashes()); - bitField0_ |= 0x00000002; - if (other.hasContext()) { - mergeContext(other.getContext()); - } - if (additionalContextsBuilder_ == null) { - if (!other.additionalContexts_.isEmpty()) { - if (additionalContexts_.isEmpty()) { - additionalContexts_ = other.additionalContexts_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAdditionalContextsIsMutable(); - additionalContexts_.addAll(other.additionalContexts_); - } - onChanged(); - } - } else { - if (!other.additionalContexts_.isEmpty()) { - if (additionalContextsBuilder_.isEmpty()) { - additionalContextsBuilder_.dispose(); - additionalContextsBuilder_ = null; - additionalContexts_ = other.additionalContexts_; - bitField0_ = (bitField0_ & ~0x00000008); - additionalContextsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAdditionalContextsFieldBuilder() : null; - } else { - additionalContextsBuilder_.addAllMessages(other.additionalContexts_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - artifactStorageSourceUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - com.google.protobuf.MapEntry - fileHashes__ = input.readMessage( - FileHashesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableFileHashes().getMutableMap().put( - fileHashes__.getKey(), fileHashes__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getContextFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - io.grafeas.v1.SourceContext m = - input.readMessage( - io.grafeas.v1.SourceContext.parser(), - extensionRegistry); - if (additionalContextsBuilder_ == null) { - ensureAdditionalContextsIsMutable(); - additionalContexts_.add(m); - } else { - additionalContextsBuilder_.addMessage(m); - } - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object artifactStorageSourceUri_ = ""; - /** - *
-     * If provided, the input binary artifacts for the build came from this
-     * location.
-     * 
- * - * string artifact_storage_source_uri = 1; - * @return The artifactStorageSourceUri. - */ - public java.lang.String getArtifactStorageSourceUri() { - java.lang.Object ref = artifactStorageSourceUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - artifactStorageSourceUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * If provided, the input binary artifacts for the build came from this
-     * location.
-     * 
- * - * string artifact_storage_source_uri = 1; - * @return The bytes for artifactStorageSourceUri. - */ - public com.google.protobuf.ByteString - getArtifactStorageSourceUriBytes() { - java.lang.Object ref = artifactStorageSourceUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - artifactStorageSourceUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * If provided, the input binary artifacts for the build came from this
-     * location.
-     * 
- * - * string artifact_storage_source_uri = 1; - * @param value The artifactStorageSourceUri to set. - * @return This builder for chaining. - */ - public Builder setArtifactStorageSourceUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - artifactStorageSourceUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * If provided, the input binary artifacts for the build came from this
-     * location.
-     * 
- * - * string artifact_storage_source_uri = 1; - * @return This builder for chaining. - */ - public Builder clearArtifactStorageSourceUri() { - artifactStorageSourceUri_ = getDefaultInstance().getArtifactStorageSourceUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * If provided, the input binary artifacts for the build came from this
-     * location.
-     * 
- * - * string artifact_storage_source_uri = 1; - * @param value The bytes for artifactStorageSourceUri to set. - * @return This builder for chaining. - */ - public Builder setArtifactStorageSourceUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - artifactStorageSourceUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, io.grafeas.v1.FileHashes> fileHashes_; - private com.google.protobuf.MapField - internalGetFileHashes() { - if (fileHashes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - FileHashesDefaultEntryHolder.defaultEntry); - } - return fileHashes_; - } - private com.google.protobuf.MapField - internalGetMutableFileHashes() { - if (fileHashes_ == null) { - fileHashes_ = com.google.protobuf.MapField.newMapField( - FileHashesDefaultEntryHolder.defaultEntry); - } - if (!fileHashes_.isMutable()) { - fileHashes_ = fileHashes_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return fileHashes_; - } - public int getFileHashesCount() { - return internalGetFileHashes().getMap().size(); - } - /** - *
-     * Hash(es) of the build source, which can be used to verify that the original
-     * source integrity was maintained in the build.
-     * The keys to this map are file paths used as build source and the values
-     * contain the hash values for those files.
-     * If the build source came in a single package such as a gzipped tarfile
-     * (.tar.gz), the FileHash will be for the single path to that file.
-     * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public boolean containsFileHashes( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetFileHashes().getMap().containsKey(key); - } - /** - * Use {@link #getFileHashesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getFileHashes() { - return getFileHashesMap(); - } - /** - *
-     * Hash(es) of the build source, which can be used to verify that the original
-     * source integrity was maintained in the build.
-     * The keys to this map are file paths used as build source and the values
-     * contain the hash values for those files.
-     * If the build source came in a single package such as a gzipped tarfile
-     * (.tar.gz), the FileHash will be for the single path to that file.
-     * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public java.util.Map getFileHashesMap() { - return internalGetFileHashes().getMap(); - } - /** - *
-     * Hash(es) of the build source, which can be used to verify that the original
-     * source integrity was maintained in the build.
-     * The keys to this map are file paths used as build source and the values
-     * contain the hash values for those files.
-     * If the build source came in a single package such as a gzipped tarfile
-     * (.tar.gz), the FileHash will be for the single path to that file.
-     * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public /* nullable */ -io.grafeas.v1.FileHashes getFileHashesOrDefault( - java.lang.String key, - /* nullable */ -io.grafeas.v1.FileHashes defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetFileHashes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Hash(es) of the build source, which can be used to verify that the original
-     * source integrity was maintained in the build.
-     * The keys to this map are file paths used as build source and the values
-     * contain the hash values for those files.
-     * If the build source came in a single package such as a gzipped tarfile
-     * (.tar.gz), the FileHash will be for the single path to that file.
-     * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public io.grafeas.v1.FileHashes getFileHashesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetFileHashes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearFileHashes() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableFileHashes().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Hash(es) of the build source, which can be used to verify that the original
-     * source integrity was maintained in the build.
-     * The keys to this map are file paths used as build source and the values
-     * contain the hash values for those files.
-     * If the build source came in a single package such as a gzipped tarfile
-     * (.tar.gz), the FileHash will be for the single path to that file.
-     * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - public Builder removeFileHashes( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableFileHashes().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableFileHashes() { - bitField0_ |= 0x00000002; - return internalGetMutableFileHashes().getMutableMap(); - } - /** - *
-     * Hash(es) of the build source, which can be used to verify that the original
-     * source integrity was maintained in the build.
-     * The keys to this map are file paths used as build source and the values
-     * contain the hash values for those files.
-     * If the build source came in a single package such as a gzipped tarfile
-     * (.tar.gz), the FileHash will be for the single path to that file.
-     * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - public Builder putFileHashes( - java.lang.String key, - io.grafeas.v1.FileHashes value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableFileHashes().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - *
-     * Hash(es) of the build source, which can be used to verify that the original
-     * source integrity was maintained in the build.
-     * The keys to this map are file paths used as build source and the values
-     * contain the hash values for those files.
-     * If the build source came in a single package such as a gzipped tarfile
-     * (.tar.gz), the FileHash will be for the single path to that file.
-     * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - public Builder putAllFileHashes( - java.util.Map values) { - internalGetMutableFileHashes().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000002; - return this; - } - - private io.grafeas.v1.SourceContext context_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> contextBuilder_; - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - * @return Whether the context field is set. - */ - public boolean hasContext() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - * @return The context. - */ - public io.grafeas.v1.SourceContext getContext() { - if (contextBuilder_ == null) { - return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_; - } else { - return contextBuilder_.getMessage(); - } - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - public Builder setContext(io.grafeas.v1.SourceContext value) { - if (contextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - } else { - contextBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - public Builder setContext( - io.grafeas.v1.SourceContext.Builder builderForValue) { - if (contextBuilder_ == null) { - context_ = builderForValue.build(); - } else { - contextBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - public Builder mergeContext(io.grafeas.v1.SourceContext value) { - if (contextBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - context_ != null && - context_ != io.grafeas.v1.SourceContext.getDefaultInstance()) { - getContextBuilder().mergeFrom(value); - } else { - context_ = value; - } - } else { - contextBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - public Builder clearContext() { - bitField0_ = (bitField0_ & ~0x00000004); - context_ = null; - if (contextBuilder_ != null) { - contextBuilder_.dispose(); - contextBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - public io.grafeas.v1.SourceContext.Builder getContextBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getContextFieldBuilder().getBuilder(); - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - public io.grafeas.v1.SourceContextOrBuilder getContextOrBuilder() { - if (contextBuilder_ != null) { - return contextBuilder_.getMessageOrBuilder(); - } else { - return context_ == null ? - io.grafeas.v1.SourceContext.getDefaultInstance() : context_; - } - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> - getContextFieldBuilder() { - if (contextBuilder_ == null) { - contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder>( - getContext(), - getParentForChildren(), - isClean()); - context_ = null; - } - return contextBuilder_; - } - - private java.util.List additionalContexts_ = - java.util.Collections.emptyList(); - private void ensureAdditionalContextsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - additionalContexts_ = new java.util.ArrayList(additionalContexts_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> additionalContextsBuilder_; - - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public java.util.List getAdditionalContextsList() { - if (additionalContextsBuilder_ == null) { - return java.util.Collections.unmodifiableList(additionalContexts_); - } else { - return additionalContextsBuilder_.getMessageList(); - } - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public int getAdditionalContextsCount() { - if (additionalContextsBuilder_ == null) { - return additionalContexts_.size(); - } else { - return additionalContextsBuilder_.getCount(); - } - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public io.grafeas.v1.SourceContext getAdditionalContexts(int index) { - if (additionalContextsBuilder_ == null) { - return additionalContexts_.get(index); - } else { - return additionalContextsBuilder_.getMessage(index); - } - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder setAdditionalContexts( - int index, io.grafeas.v1.SourceContext value) { - if (additionalContextsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdditionalContextsIsMutable(); - additionalContexts_.set(index, value); - onChanged(); - } else { - additionalContextsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder setAdditionalContexts( - int index, io.grafeas.v1.SourceContext.Builder builderForValue) { - if (additionalContextsBuilder_ == null) { - ensureAdditionalContextsIsMutable(); - additionalContexts_.set(index, builderForValue.build()); - onChanged(); - } else { - additionalContextsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder addAdditionalContexts(io.grafeas.v1.SourceContext value) { - if (additionalContextsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdditionalContextsIsMutable(); - additionalContexts_.add(value); - onChanged(); - } else { - additionalContextsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder addAdditionalContexts( - int index, io.grafeas.v1.SourceContext value) { - if (additionalContextsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdditionalContextsIsMutable(); - additionalContexts_.add(index, value); - onChanged(); - } else { - additionalContextsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder addAdditionalContexts( - io.grafeas.v1.SourceContext.Builder builderForValue) { - if (additionalContextsBuilder_ == null) { - ensureAdditionalContextsIsMutable(); - additionalContexts_.add(builderForValue.build()); - onChanged(); - } else { - additionalContextsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder addAdditionalContexts( - int index, io.grafeas.v1.SourceContext.Builder builderForValue) { - if (additionalContextsBuilder_ == null) { - ensureAdditionalContextsIsMutable(); - additionalContexts_.add(index, builderForValue.build()); - onChanged(); - } else { - additionalContextsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder addAllAdditionalContexts( - java.lang.Iterable values) { - if (additionalContextsBuilder_ == null) { - ensureAdditionalContextsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, additionalContexts_); - onChanged(); - } else { - additionalContextsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder clearAdditionalContexts() { - if (additionalContextsBuilder_ == null) { - additionalContexts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - additionalContextsBuilder_.clear(); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder removeAdditionalContexts(int index) { - if (additionalContextsBuilder_ == null) { - ensureAdditionalContextsIsMutable(); - additionalContexts_.remove(index); - onChanged(); - } else { - additionalContextsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public io.grafeas.v1.SourceContext.Builder getAdditionalContextsBuilder( - int index) { - return getAdditionalContextsFieldBuilder().getBuilder(index); - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public io.grafeas.v1.SourceContextOrBuilder getAdditionalContextsOrBuilder( - int index) { - if (additionalContextsBuilder_ == null) { - return additionalContexts_.get(index); } else { - return additionalContextsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public java.util.List - getAdditionalContextsOrBuilderList() { - if (additionalContextsBuilder_ != null) { - return additionalContextsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(additionalContexts_); - } - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public io.grafeas.v1.SourceContext.Builder addAdditionalContextsBuilder() { - return getAdditionalContextsFieldBuilder().addBuilder( - io.grafeas.v1.SourceContext.getDefaultInstance()); - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public io.grafeas.v1.SourceContext.Builder addAdditionalContextsBuilder( - int index) { - return getAdditionalContextsFieldBuilder().addBuilder( - index, io.grafeas.v1.SourceContext.getDefaultInstance()); - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public java.util.List - getAdditionalContextsBuilderList() { - return getAdditionalContextsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> - getAdditionalContextsFieldBuilder() { - if (additionalContextsBuilder_ == null) { - additionalContextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder>( - additionalContexts_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - additionalContexts_ = null; - } - return additionalContextsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Source) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Source) - private static final io.grafeas.v1.Source DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Source(); - } - - public static io.grafeas.v1.Source getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Source parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Source getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java deleted file mode 100644 index bb5845b66bc9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java +++ /dev/null @@ -1,1583 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * A SourceContext is a reference to a tree of files. A SourceContext together
- * with a path point to a unique revision of a single file or directory.
- * 
- * - * Protobuf type {@code grafeas.v1.SourceContext} - */ -public final class SourceContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SourceContext) - SourceContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use SourceContext.newBuilder() to construct. - private SourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SourceContext() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SourceContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SourceContext.class, io.grafeas.v1.SourceContext.Builder.class); - } - - private int contextCase_ = 0; - private java.lang.Object context_; - public enum ContextCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CLOUD_REPO(1), - GERRIT(2), - GIT(3), - CONTEXT_NOT_SET(0); - private final int value; - private ContextCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ContextCase valueOf(int value) { - return forNumber(value); - } - - public static ContextCase forNumber(int value) { - switch (value) { - case 1: return CLOUD_REPO; - case 2: return GERRIT; - case 3: return GIT; - case 0: return CONTEXT_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ContextCase - getContextCase() { - return ContextCase.forNumber( - contextCase_); - } - - public static final int CLOUD_REPO_FIELD_NUMBER = 1; - /** - *
-   * A SourceContext referring to a revision in a Google Cloud Source Repo.
-   * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @return Whether the cloudRepo field is set. - */ - @java.lang.Override - public boolean hasCloudRepo() { - return contextCase_ == 1; - } - /** - *
-   * A SourceContext referring to a revision in a Google Cloud Source Repo.
-   * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @return The cloudRepo. - */ - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContext getCloudRepo() { - if (contextCase_ == 1) { - return (io.grafeas.v1.CloudRepoSourceContext) context_; - } - return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); - } - /** - *
-   * A SourceContext referring to a revision in a Google Cloud Source Repo.
-   * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder() { - if (contextCase_ == 1) { - return (io.grafeas.v1.CloudRepoSourceContext) context_; - } - return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); - } - - public static final int GERRIT_FIELD_NUMBER = 2; - /** - *
-   * A SourceContext referring to a Gerrit project.
-   * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - * @return Whether the gerrit field is set. - */ - @java.lang.Override - public boolean hasGerrit() { - return contextCase_ == 2; - } - /** - *
-   * A SourceContext referring to a Gerrit project.
-   * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - * @return The gerrit. - */ - @java.lang.Override - public io.grafeas.v1.GerritSourceContext getGerrit() { - if (contextCase_ == 2) { - return (io.grafeas.v1.GerritSourceContext) context_; - } - return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); - } - /** - *
-   * A SourceContext referring to a Gerrit project.
-   * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - @java.lang.Override - public io.grafeas.v1.GerritSourceContextOrBuilder getGerritOrBuilder() { - if (contextCase_ == 2) { - return (io.grafeas.v1.GerritSourceContext) context_; - } - return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); - } - - public static final int GIT_FIELD_NUMBER = 3; - /** - *
-   * A SourceContext referring to any third party Git repo (e.g., GitHub).
-   * 
- * - * .grafeas.v1.GitSourceContext git = 3; - * @return Whether the git field is set. - */ - @java.lang.Override - public boolean hasGit() { - return contextCase_ == 3; - } - /** - *
-   * A SourceContext referring to any third party Git repo (e.g., GitHub).
-   * 
- * - * .grafeas.v1.GitSourceContext git = 3; - * @return The git. - */ - @java.lang.Override - public io.grafeas.v1.GitSourceContext getGit() { - if (contextCase_ == 3) { - return (io.grafeas.v1.GitSourceContext) context_; - } - return io.grafeas.v1.GitSourceContext.getDefaultInstance(); - } - /** - *
-   * A SourceContext referring to any third party Git repo (e.g., GitHub).
-   * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - @java.lang.Override - public io.grafeas.v1.GitSourceContextOrBuilder getGitOrBuilder() { - if (contextCase_ == 3) { - return (io.grafeas.v1.GitSourceContext) context_; - } - return io.grafeas.v1.GitSourceContext.getDefaultInstance(); - } - - public static final int LABELS_FIELD_NUMBER = 4; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextCase_ == 1) { - output.writeMessage(1, (io.grafeas.v1.CloudRepoSourceContext) context_); - } - if (contextCase_ == 2) { - output.writeMessage(2, (io.grafeas.v1.GerritSourceContext) context_); - } - if (contextCase_ == 3) { - output.writeMessage(3, (io.grafeas.v1.GitSourceContext) context_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 4); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (io.grafeas.v1.CloudRepoSourceContext) context_); - } - if (contextCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (io.grafeas.v1.GerritSourceContext) context_); - } - if (contextCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (io.grafeas.v1.GitSourceContext) context_); - } - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, labels__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SourceContext)) { - return super.equals(obj); - } - io.grafeas.v1.SourceContext other = (io.grafeas.v1.SourceContext) obj; - - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (!getContextCase().equals(other.getContextCase())) return false; - switch (contextCase_) { - case 1: - if (!getCloudRepo() - .equals(other.getCloudRepo())) return false; - break; - case 2: - if (!getGerrit() - .equals(other.getGerrit())) return false; - break; - case 3: - if (!getGit() - .equals(other.getGit())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - switch (contextCase_) { - case 1: - hash = (37 * hash) + CLOUD_REPO_FIELD_NUMBER; - hash = (53 * hash) + getCloudRepo().hashCode(); - break; - case 2: - hash = (37 * hash) + GERRIT_FIELD_NUMBER; - hash = (53 * hash) + getGerrit().hashCode(); - break; - case 3: - hash = (37 * hash) + GIT_FIELD_NUMBER; - hash = (53 * hash) + getGit().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SourceContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SourceContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SourceContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SourceContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SourceContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SourceContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SourceContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SourceContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SourceContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SourceContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SourceContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SourceContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SourceContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A SourceContext is a reference to a tree of files. A SourceContext together
-   * with a path point to a unique revision of a single file or directory.
-   * 
- * - * Protobuf type {@code grafeas.v1.SourceContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SourceContext) - io.grafeas.v1.SourceContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 4: - return internalGetMutableLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SourceContext.class, io.grafeas.v1.SourceContext.Builder.class); - } - - // Construct using io.grafeas.v1.SourceContext.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (cloudRepoBuilder_ != null) { - cloudRepoBuilder_.clear(); - } - if (gerritBuilder_ != null) { - gerritBuilder_.clear(); - } - if (gitBuilder_ != null) { - gitBuilder_.clear(); - } - internalGetMutableLabels().clear(); - contextCase_ = 0; - context_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SourceContext getDefaultInstanceForType() { - return io.grafeas.v1.SourceContext.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SourceContext build() { - io.grafeas.v1.SourceContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SourceContext buildPartial() { - io.grafeas.v1.SourceContext result = new io.grafeas.v1.SourceContext(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SourceContext result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - } - - private void buildPartialOneofs(io.grafeas.v1.SourceContext result) { - result.contextCase_ = contextCase_; - result.context_ = this.context_; - if (contextCase_ == 1 && - cloudRepoBuilder_ != null) { - result.context_ = cloudRepoBuilder_.build(); - } - if (contextCase_ == 2 && - gerritBuilder_ != null) { - result.context_ = gerritBuilder_.build(); - } - if (contextCase_ == 3 && - gitBuilder_ != null) { - result.context_ = gitBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SourceContext) { - return mergeFrom((io.grafeas.v1.SourceContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SourceContext other) { - if (other == io.grafeas.v1.SourceContext.getDefaultInstance()) return this; - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - bitField0_ |= 0x00000008; - switch (other.getContextCase()) { - case CLOUD_REPO: { - mergeCloudRepo(other.getCloudRepo()); - break; - } - case GERRIT: { - mergeGerrit(other.getGerrit()); - break; - } - case GIT: { - mergeGit(other.getGit()); - break; - } - case CONTEXT_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getCloudRepoFieldBuilder().getBuilder(), - extensionRegistry); - contextCase_ = 1; - break; - } // case 10 - case 18: { - input.readMessage( - getGerritFieldBuilder().getBuilder(), - extensionRegistry); - contextCase_ = 2; - break; - } // case 18 - case 26: { - input.readMessage( - getGitFieldBuilder().getBuilder(), - extensionRegistry); - contextCase_ = 3; - break; - } // case 26 - case 34: { - com.google.protobuf.MapEntry - labels__ = input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableLabels().getMutableMap().put( - labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int contextCase_ = 0; - private java.lang.Object context_; - public ContextCase - getContextCase() { - return ContextCase.forNumber( - contextCase_); - } - - public Builder clearContext() { - contextCase_ = 0; - context_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CloudRepoSourceContext, io.grafeas.v1.CloudRepoSourceContext.Builder, io.grafeas.v1.CloudRepoSourceContextOrBuilder> cloudRepoBuilder_; - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @return Whether the cloudRepo field is set. - */ - @java.lang.Override - public boolean hasCloudRepo() { - return contextCase_ == 1; - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @return The cloudRepo. - */ - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContext getCloudRepo() { - if (cloudRepoBuilder_ == null) { - if (contextCase_ == 1) { - return (io.grafeas.v1.CloudRepoSourceContext) context_; - } - return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); - } else { - if (contextCase_ == 1) { - return cloudRepoBuilder_.getMessage(); - } - return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); - } - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - public Builder setCloudRepo(io.grafeas.v1.CloudRepoSourceContext value) { - if (cloudRepoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - onChanged(); - } else { - cloudRepoBuilder_.setMessage(value); - } - contextCase_ = 1; - return this; - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - public Builder setCloudRepo( - io.grafeas.v1.CloudRepoSourceContext.Builder builderForValue) { - if (cloudRepoBuilder_ == null) { - context_ = builderForValue.build(); - onChanged(); - } else { - cloudRepoBuilder_.setMessage(builderForValue.build()); - } - contextCase_ = 1; - return this; - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - public Builder mergeCloudRepo(io.grafeas.v1.CloudRepoSourceContext value) { - if (cloudRepoBuilder_ == null) { - if (contextCase_ == 1 && - context_ != io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance()) { - context_ = io.grafeas.v1.CloudRepoSourceContext.newBuilder((io.grafeas.v1.CloudRepoSourceContext) context_) - .mergeFrom(value).buildPartial(); - } else { - context_ = value; - } - onChanged(); - } else { - if (contextCase_ == 1) { - cloudRepoBuilder_.mergeFrom(value); - } else { - cloudRepoBuilder_.setMessage(value); - } - } - contextCase_ = 1; - return this; - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - public Builder clearCloudRepo() { - if (cloudRepoBuilder_ == null) { - if (contextCase_ == 1) { - contextCase_ = 0; - context_ = null; - onChanged(); - } - } else { - if (contextCase_ == 1) { - contextCase_ = 0; - context_ = null; - } - cloudRepoBuilder_.clear(); - } - return this; - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - public io.grafeas.v1.CloudRepoSourceContext.Builder getCloudRepoBuilder() { - return getCloudRepoFieldBuilder().getBuilder(); - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder() { - if ((contextCase_ == 1) && (cloudRepoBuilder_ != null)) { - return cloudRepoBuilder_.getMessageOrBuilder(); - } else { - if (contextCase_ == 1) { - return (io.grafeas.v1.CloudRepoSourceContext) context_; - } - return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); - } - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CloudRepoSourceContext, io.grafeas.v1.CloudRepoSourceContext.Builder, io.grafeas.v1.CloudRepoSourceContextOrBuilder> - getCloudRepoFieldBuilder() { - if (cloudRepoBuilder_ == null) { - if (!(contextCase_ == 1)) { - context_ = io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); - } - cloudRepoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CloudRepoSourceContext, io.grafeas.v1.CloudRepoSourceContext.Builder, io.grafeas.v1.CloudRepoSourceContextOrBuilder>( - (io.grafeas.v1.CloudRepoSourceContext) context_, - getParentForChildren(), - isClean()); - context_ = null; - } - contextCase_ = 1; - onChanged(); - return cloudRepoBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.GerritSourceContext, io.grafeas.v1.GerritSourceContext.Builder, io.grafeas.v1.GerritSourceContextOrBuilder> gerritBuilder_; - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - * @return Whether the gerrit field is set. - */ - @java.lang.Override - public boolean hasGerrit() { - return contextCase_ == 2; - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - * @return The gerrit. - */ - @java.lang.Override - public io.grafeas.v1.GerritSourceContext getGerrit() { - if (gerritBuilder_ == null) { - if (contextCase_ == 2) { - return (io.grafeas.v1.GerritSourceContext) context_; - } - return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); - } else { - if (contextCase_ == 2) { - return gerritBuilder_.getMessage(); - } - return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); - } - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - public Builder setGerrit(io.grafeas.v1.GerritSourceContext value) { - if (gerritBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - onChanged(); - } else { - gerritBuilder_.setMessage(value); - } - contextCase_ = 2; - return this; - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - public Builder setGerrit( - io.grafeas.v1.GerritSourceContext.Builder builderForValue) { - if (gerritBuilder_ == null) { - context_ = builderForValue.build(); - onChanged(); - } else { - gerritBuilder_.setMessage(builderForValue.build()); - } - contextCase_ = 2; - return this; - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - public Builder mergeGerrit(io.grafeas.v1.GerritSourceContext value) { - if (gerritBuilder_ == null) { - if (contextCase_ == 2 && - context_ != io.grafeas.v1.GerritSourceContext.getDefaultInstance()) { - context_ = io.grafeas.v1.GerritSourceContext.newBuilder((io.grafeas.v1.GerritSourceContext) context_) - .mergeFrom(value).buildPartial(); - } else { - context_ = value; - } - onChanged(); - } else { - if (contextCase_ == 2) { - gerritBuilder_.mergeFrom(value); - } else { - gerritBuilder_.setMessage(value); - } - } - contextCase_ = 2; - return this; - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - public Builder clearGerrit() { - if (gerritBuilder_ == null) { - if (contextCase_ == 2) { - contextCase_ = 0; - context_ = null; - onChanged(); - } - } else { - if (contextCase_ == 2) { - contextCase_ = 0; - context_ = null; - } - gerritBuilder_.clear(); - } - return this; - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - public io.grafeas.v1.GerritSourceContext.Builder getGerritBuilder() { - return getGerritFieldBuilder().getBuilder(); - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - @java.lang.Override - public io.grafeas.v1.GerritSourceContextOrBuilder getGerritOrBuilder() { - if ((contextCase_ == 2) && (gerritBuilder_ != null)) { - return gerritBuilder_.getMessageOrBuilder(); - } else { - if (contextCase_ == 2) { - return (io.grafeas.v1.GerritSourceContext) context_; - } - return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); - } - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.GerritSourceContext, io.grafeas.v1.GerritSourceContext.Builder, io.grafeas.v1.GerritSourceContextOrBuilder> - getGerritFieldBuilder() { - if (gerritBuilder_ == null) { - if (!(contextCase_ == 2)) { - context_ = io.grafeas.v1.GerritSourceContext.getDefaultInstance(); - } - gerritBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.GerritSourceContext, io.grafeas.v1.GerritSourceContext.Builder, io.grafeas.v1.GerritSourceContextOrBuilder>( - (io.grafeas.v1.GerritSourceContext) context_, - getParentForChildren(), - isClean()); - context_ = null; - } - contextCase_ = 2; - onChanged(); - return gerritBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.GitSourceContext, io.grafeas.v1.GitSourceContext.Builder, io.grafeas.v1.GitSourceContextOrBuilder> gitBuilder_; - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - * @return Whether the git field is set. - */ - @java.lang.Override - public boolean hasGit() { - return contextCase_ == 3; - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - * @return The git. - */ - @java.lang.Override - public io.grafeas.v1.GitSourceContext getGit() { - if (gitBuilder_ == null) { - if (contextCase_ == 3) { - return (io.grafeas.v1.GitSourceContext) context_; - } - return io.grafeas.v1.GitSourceContext.getDefaultInstance(); - } else { - if (contextCase_ == 3) { - return gitBuilder_.getMessage(); - } - return io.grafeas.v1.GitSourceContext.getDefaultInstance(); - } - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - public Builder setGit(io.grafeas.v1.GitSourceContext value) { - if (gitBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - onChanged(); - } else { - gitBuilder_.setMessage(value); - } - contextCase_ = 3; - return this; - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - public Builder setGit( - io.grafeas.v1.GitSourceContext.Builder builderForValue) { - if (gitBuilder_ == null) { - context_ = builderForValue.build(); - onChanged(); - } else { - gitBuilder_.setMessage(builderForValue.build()); - } - contextCase_ = 3; - return this; - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - public Builder mergeGit(io.grafeas.v1.GitSourceContext value) { - if (gitBuilder_ == null) { - if (contextCase_ == 3 && - context_ != io.grafeas.v1.GitSourceContext.getDefaultInstance()) { - context_ = io.grafeas.v1.GitSourceContext.newBuilder((io.grafeas.v1.GitSourceContext) context_) - .mergeFrom(value).buildPartial(); - } else { - context_ = value; - } - onChanged(); - } else { - if (contextCase_ == 3) { - gitBuilder_.mergeFrom(value); - } else { - gitBuilder_.setMessage(value); - } - } - contextCase_ = 3; - return this; - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - public Builder clearGit() { - if (gitBuilder_ == null) { - if (contextCase_ == 3) { - contextCase_ = 0; - context_ = null; - onChanged(); - } - } else { - if (contextCase_ == 3) { - contextCase_ = 0; - context_ = null; - } - gitBuilder_.clear(); - } - return this; - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - public io.grafeas.v1.GitSourceContext.Builder getGitBuilder() { - return getGitFieldBuilder().getBuilder(); - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - @java.lang.Override - public io.grafeas.v1.GitSourceContextOrBuilder getGitOrBuilder() { - if ((contextCase_ == 3) && (gitBuilder_ != null)) { - return gitBuilder_.getMessageOrBuilder(); - } else { - if (contextCase_ == 3) { - return (io.grafeas.v1.GitSourceContext) context_; - } - return io.grafeas.v1.GitSourceContext.getDefaultInstance(); - } - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.GitSourceContext, io.grafeas.v1.GitSourceContext.Builder, io.grafeas.v1.GitSourceContextOrBuilder> - getGitFieldBuilder() { - if (gitBuilder_ == null) { - if (!(contextCase_ == 3)) { - context_ = io.grafeas.v1.GitSourceContext.getDefaultInstance(); - } - gitBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.GitSourceContext, io.grafeas.v1.GitSourceContext.Builder, io.grafeas.v1.GitSourceContextOrBuilder>( - (io.grafeas.v1.GitSourceContext) context_, - getParentForChildren(), - isClean()); - context_ = null; - } - contextCase_ = 3; - onChanged(); - return gitBuilder_; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - bitField0_ |= 0x00000008; - onChanged(); - return labels_; - } - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-     * Labels with user defined metadata.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-     * Labels with user defined metadata.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * Labels with user defined metadata.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Labels with user defined metadata.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableLabels().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Labels with user defined metadata.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder removeLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableLabels().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableLabels() { - bitField0_ |= 0x00000008; - return internalGetMutableLabels().getMutableMap(); - } - /** - *
-     * Labels with user defined metadata.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putLabels( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableLabels().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000008; - return this; - } - /** - *
-     * Labels with user defined metadata.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000008; - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SourceContext) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SourceContext) - private static final io.grafeas.v1.SourceContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SourceContext(); - } - - public static io.grafeas.v1.SourceContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SourceContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SourceContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java deleted file mode 100644 index 3c735c2fd76a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java +++ /dev/null @@ -1,146 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface SourceContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SourceContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A SourceContext referring to a revision in a Google Cloud Source Repo.
-   * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @return Whether the cloudRepo field is set. - */ - boolean hasCloudRepo(); - /** - *
-   * A SourceContext referring to a revision in a Google Cloud Source Repo.
-   * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @return The cloudRepo. - */ - io.grafeas.v1.CloudRepoSourceContext getCloudRepo(); - /** - *
-   * A SourceContext referring to a revision in a Google Cloud Source Repo.
-   * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - io.grafeas.v1.CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder(); - - /** - *
-   * A SourceContext referring to a Gerrit project.
-   * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - * @return Whether the gerrit field is set. - */ - boolean hasGerrit(); - /** - *
-   * A SourceContext referring to a Gerrit project.
-   * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - * @return The gerrit. - */ - io.grafeas.v1.GerritSourceContext getGerrit(); - /** - *
-   * A SourceContext referring to a Gerrit project.
-   * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - io.grafeas.v1.GerritSourceContextOrBuilder getGerritOrBuilder(); - - /** - *
-   * A SourceContext referring to any third party Git repo (e.g., GitHub).
-   * 
- * - * .grafeas.v1.GitSourceContext git = 3; - * @return Whether the git field is set. - */ - boolean hasGit(); - /** - *
-   * A SourceContext referring to any third party Git repo (e.g., GitHub).
-   * 
- * - * .grafeas.v1.GitSourceContext git = 3; - * @return The git. - */ - io.grafeas.v1.GitSourceContext getGit(); - /** - *
-   * A SourceContext referring to any third party Git repo (e.g., GitHub).
-   * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - io.grafeas.v1.GitSourceContextOrBuilder getGitOrBuilder(); - - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - int getLabelsCount(); - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - java.lang.String getLabelsOrThrow( - java.lang.String key); - - public io.grafeas.v1.SourceContext.ContextCase getContextCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java deleted file mode 100644 index 875eea1d4768..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java +++ /dev/null @@ -1,196 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface SourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Source) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If provided, the input binary artifacts for the build came from this
-   * location.
-   * 
- * - * string artifact_storage_source_uri = 1; - * @return The artifactStorageSourceUri. - */ - java.lang.String getArtifactStorageSourceUri(); - /** - *
-   * If provided, the input binary artifacts for the build came from this
-   * location.
-   * 
- * - * string artifact_storage_source_uri = 1; - * @return The bytes for artifactStorageSourceUri. - */ - com.google.protobuf.ByteString - getArtifactStorageSourceUriBytes(); - - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - int getFileHashesCount(); - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - boolean containsFileHashes( - java.lang.String key); - /** - * Use {@link #getFileHashesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getFileHashes(); - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - java.util.Map - getFileHashesMap(); - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - /* nullable */ -io.grafeas.v1.FileHashes getFileHashesOrDefault( - java.lang.String key, - /* nullable */ -io.grafeas.v1.FileHashes defaultValue); - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - io.grafeas.v1.FileHashes getFileHashesOrThrow( - java.lang.String key); - - /** - *
-   * If provided, the source code used for the build came from this location.
-   * 
- * - * .grafeas.v1.SourceContext context = 3; - * @return Whether the context field is set. - */ - boolean hasContext(); - /** - *
-   * If provided, the source code used for the build came from this location.
-   * 
- * - * .grafeas.v1.SourceContext context = 3; - * @return The context. - */ - io.grafeas.v1.SourceContext getContext(); - /** - *
-   * If provided, the source code used for the build came from this location.
-   * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - io.grafeas.v1.SourceContextOrBuilder getContextOrBuilder(); - - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - java.util.List - getAdditionalContextsList(); - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - io.grafeas.v1.SourceContext getAdditionalContexts(int index); - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - int getAdditionalContextsCount(); - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - java.util.List - getAdditionalContextsOrBuilderList(); - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - io.grafeas.v1.SourceContextOrBuilder getAdditionalContextsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java deleted file mode 100644 index b5d14fc26d97..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java +++ /dev/null @@ -1,900 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_statement.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.Subject} - */ -public final class Subject extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Subject) - SubjectOrBuilder { -private static final long serialVersionUID = 0L; - // Use Subject.newBuilder() to construct. - private Subject(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Subject() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Subject(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Subject.class, io.grafeas.v1.Subject.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DIGEST_FIELD_NUMBER = 2; - private static final class DigestDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_DigestEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetDigest(), - DigestDefaultEntryHolder.defaultEntry, - 2); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - for (java.util.Map.Entry entry - : internalGetDigest().getMap().entrySet()) { - com.google.protobuf.MapEntry - digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, digest__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Subject)) { - return super.equals(obj); - } - io.grafeas.v1.Subject other = (io.grafeas.v1.Subject) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!internalGetDigest().equals( - other.internalGetDigest())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (!internalGetDigest().getMap().isEmpty()) { - hash = (37 * hash) + DIGEST_FIELD_NUMBER; - hash = (53 * hash) + internalGetDigest().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Subject parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Subject parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Subject parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Subject parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Subject parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Subject parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Subject parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Subject parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Subject parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Subject parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Subject parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Subject parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Subject prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.Subject} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Subject) - io.grafeas.v1.SubjectOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Subject.class, io.grafeas.v1.Subject.Builder.class); - } - - // Construct using io.grafeas.v1.Subject.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - internalGetMutableDigest().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Subject getDefaultInstanceForType() { - return io.grafeas.v1.Subject.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Subject build() { - io.grafeas.v1.Subject result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Subject buildPartial() { - io.grafeas.v1.Subject result = new io.grafeas.v1.Subject(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Subject result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.digest_ = internalGetDigest(); - result.digest_.makeImmutable(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Subject) { - return mergeFrom((io.grafeas.v1.Subject)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Subject other) { - if (other == io.grafeas.v1.Subject.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableDigest().mergeFrom( - other.internalGetDigest()); - bitField0_ |= 0x00000002; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - com.google.protobuf.MapEntry - digest__ = input.readMessage( - DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableDigest().getMutableMap().put( - digest__.getKey(), digest__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - private com.google.protobuf.MapField - internalGetMutableDigest() { - if (digest_ == null) { - digest_ = com.google.protobuf.MapField.newMapField( - DigestDefaultEntryHolder.defaultEntry); - } - if (!digest_.isMutable()) { - digest_ = digest_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - *
-     * `"<ALGORITHM>": "<HEX_VALUE>"`
-     * Algorithms can be e.g. sha256, sha512
-     * See
-     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-     * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - *
-     * `"<ALGORITHM>": "<HEX_VALUE>"`
-     * Algorithms can be e.g. sha256, sha512
-     * See
-     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-     * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - *
-     * `"<ALGORITHM>": "<HEX_VALUE>"`
-     * Algorithms can be e.g. sha256, sha512
-     * See
-     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-     * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * `"<ALGORITHM>": "<HEX_VALUE>"`
-     * Algorithms can be e.g. sha256, sha512
-     * See
-     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-     * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearDigest() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableDigest().getMutableMap() - .clear(); - return this; - } - /** - *
-     * `"<ALGORITHM>": "<HEX_VALUE>"`
-     * Algorithms can be e.g. sha256, sha512
-     * See
-     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-     * 
- * - * map<string, string> digest = 2; - */ - public Builder removeDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableDigest().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableDigest() { - bitField0_ |= 0x00000002; - return internalGetMutableDigest().getMutableMap(); - } - /** - *
-     * `"<ALGORITHM>": "<HEX_VALUE>"`
-     * Algorithms can be e.g. sha256, sha512
-     * See
-     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-     * 
- * - * map<string, string> digest = 2; - */ - public Builder putDigest( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableDigest().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - *
-     * `"<ALGORITHM>": "<HEX_VALUE>"`
-     * Algorithms can be e.g. sha256, sha512
-     * See
-     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-     * 
- * - * map<string, string> digest = 2; - */ - public Builder putAllDigest( - java.util.Map values) { - internalGetMutableDigest().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000002; - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Subject) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Subject) - private static final io.grafeas.v1.Subject DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Subject(); - } - - public static io.grafeas.v1.Subject getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Subject parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Subject getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java deleted file mode 100644 index b196d4c7afe9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java +++ /dev/null @@ -1,90 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_statement.proto - -package io.grafeas.v1; - -public interface SubjectOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Subject) - com.google.protobuf.MessageOrBuilder { - - /** - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - int getDigestCount(); - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - boolean containsDigest( - java.lang.String key); - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getDigest(); - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - java.util.Map - getDigestMap(); - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - java.lang.String getDigestOrThrow( - java.lang.String key); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java deleted file mode 100644 index 3f5c80409510..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to update a note.
- * 
- * - * Protobuf type {@code grafeas.v1.UpdateNoteRequest} - */ -public final class UpdateNoteRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.UpdateNoteRequest) - UpdateNoteRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateNoteRequest.newBuilder() to construct. - private UpdateNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateNoteRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateNoteRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpdateNoteRequest.class, io.grafeas.v1.UpdateNoteRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NOTE_FIELD_NUMBER = 2; - private io.grafeas.v1.Note note_; - /** - *
-   * The updated note.
-   * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the note field is set. - */ - @java.lang.Override - public boolean hasNote() { - return note_ != null; - } - /** - *
-   * The updated note.
-   * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The note. - */ - @java.lang.Override - public io.grafeas.v1.Note getNote() { - return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; - } - /** - *
-   * The updated note.
-   * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { - return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 3; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (note_ != null) { - output.writeMessage(2, getNote()); - } - if (updateMask_ != null) { - output.writeMessage(3, getUpdateMask()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (note_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getNote()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getUpdateMask()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.UpdateNoteRequest)) { - return super.equals(obj); - } - io.grafeas.v1.UpdateNoteRequest other = (io.grafeas.v1.UpdateNoteRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (hasNote() != other.hasNote()) return false; - if (hasNote()) { - if (!getNote() - .equals(other.getNote())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasNote()) { - hash = (37 * hash) + NOTE_FIELD_NUMBER; - hash = (53 * hash) + getNote().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpdateNoteRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpdateNoteRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.UpdateNoteRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to update a note.
-   * 
- * - * Protobuf type {@code grafeas.v1.UpdateNoteRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.UpdateNoteRequest) - io.grafeas.v1.UpdateNoteRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpdateNoteRequest.class, io.grafeas.v1.UpdateNoteRequest.Builder.class); - } - - // Construct using io.grafeas.v1.UpdateNoteRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - note_ = null; - if (noteBuilder_ != null) { - noteBuilder_.dispose(); - noteBuilder_ = null; - } - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.UpdateNoteRequest getDefaultInstanceForType() { - return io.grafeas.v1.UpdateNoteRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.UpdateNoteRequest build() { - io.grafeas.v1.UpdateNoteRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.UpdateNoteRequest buildPartial() { - io.grafeas.v1.UpdateNoteRequest result = new io.grafeas.v1.UpdateNoteRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.UpdateNoteRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.note_ = noteBuilder_ == null - ? note_ - : noteBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null - ? updateMask_ - : updateMaskBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.UpdateNoteRequest) { - return mergeFrom((io.grafeas.v1.UpdateNoteRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.UpdateNoteRequest other) { - if (other == io.grafeas.v1.UpdateNoteRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasNote()) { - mergeNote(other.getNote()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getNoteFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getUpdateMaskFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.grafeas.v1.Note note_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> noteBuilder_; - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the note field is set. - */ - public boolean hasNote() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The note. - */ - public io.grafeas.v1.Note getNote() { - if (noteBuilder_ == null) { - return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; - } else { - return noteBuilder_.getMessage(); - } - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setNote(io.grafeas.v1.Note value) { - if (noteBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - note_ = value; - } else { - noteBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setNote( - io.grafeas.v1.Note.Builder builderForValue) { - if (noteBuilder_ == null) { - note_ = builderForValue.build(); - } else { - noteBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeNote(io.grafeas.v1.Note value) { - if (noteBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - note_ != null && - note_ != io.grafeas.v1.Note.getDefaultInstance()) { - getNoteBuilder().mergeFrom(value); - } else { - note_ = value; - } - } else { - noteBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearNote() { - bitField0_ = (bitField0_ & ~0x00000002); - note_ = null; - if (noteBuilder_ != null) { - noteBuilder_.dispose(); - noteBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Note.Builder getNoteBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getNoteFieldBuilder().getBuilder(); - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { - if (noteBuilder_ != null) { - return noteBuilder_.getMessageOrBuilder(); - } else { - return note_ == null ? - io.grafeas.v1.Note.getDefaultInstance() : note_; - } - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> - getNoteFieldBuilder() { - if (noteBuilder_ == null) { - noteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( - getNote(), - getParentForChildren(), - isClean()); - note_ = null; - } - return noteBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - } else { - updateMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - updateMask_ != null && - updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000004); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.UpdateNoteRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.UpdateNoteRequest) - private static final io.grafeas.v1.UpdateNoteRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.UpdateNoteRequest(); - } - - public static io.grafeas.v1.UpdateNoteRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateNoteRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.UpdateNoteRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java deleted file mode 100644 index 4d7ef876c432..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface UpdateNoteRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.UpdateNoteRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The updated note.
-   * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the note field is set. - */ - boolean hasNote(); - /** - *
-   * The updated note.
-   * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The note. - */ - io.grafeas.v1.Note getNote(); - /** - *
-   * The updated note.
-   * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - io.grafeas.v1.NoteOrBuilder getNoteOrBuilder(); - - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java deleted file mode 100644 index f6f6febe0d11..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to update an occurrence.
- * 
- * - * Protobuf type {@code grafeas.v1.UpdateOccurrenceRequest} - */ -public final class UpdateOccurrenceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.UpdateOccurrenceRequest) - UpdateOccurrenceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateOccurrenceRequest.newBuilder() to construct. - private UpdateOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateOccurrenceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateOccurrenceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpdateOccurrenceRequest.class, io.grafeas.v1.UpdateOccurrenceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OCCURRENCE_FIELD_NUMBER = 2; - private io.grafeas.v1.Occurrence occurrence_; - /** - *
-   * The updated occurrence.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the occurrence field is set. - */ - @java.lang.Override - public boolean hasOccurrence() { - return occurrence_ != null; - } - /** - *
-   * The updated occurrence.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The occurrence. - */ - @java.lang.Override - public io.grafeas.v1.Occurrence getOccurrence() { - return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } - /** - *
-   * The updated occurrence.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { - return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 3; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (occurrence_ != null) { - output.writeMessage(2, getOccurrence()); - } - if (updateMask_ != null) { - output.writeMessage(3, getUpdateMask()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (occurrence_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getOccurrence()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getUpdateMask()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.UpdateOccurrenceRequest)) { - return super.equals(obj); - } - io.grafeas.v1.UpdateOccurrenceRequest other = (io.grafeas.v1.UpdateOccurrenceRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (hasOccurrence() != other.hasOccurrence()) return false; - if (hasOccurrence()) { - if (!getOccurrence() - .equals(other.getOccurrence())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasOccurrence()) { - hash = (37 * hash) + OCCURRENCE_FIELD_NUMBER; - hash = (53 * hash) + getOccurrence().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.UpdateOccurrenceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to update an occurrence.
-   * 
- * - * Protobuf type {@code grafeas.v1.UpdateOccurrenceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.UpdateOccurrenceRequest) - io.grafeas.v1.UpdateOccurrenceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpdateOccurrenceRequest.class, io.grafeas.v1.UpdateOccurrenceRequest.Builder.class); - } - - // Construct using io.grafeas.v1.UpdateOccurrenceRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - occurrence_ = null; - if (occurrenceBuilder_ != null) { - occurrenceBuilder_.dispose(); - occurrenceBuilder_ = null; - } - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.UpdateOccurrenceRequest getDefaultInstanceForType() { - return io.grafeas.v1.UpdateOccurrenceRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.UpdateOccurrenceRequest build() { - io.grafeas.v1.UpdateOccurrenceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.UpdateOccurrenceRequest buildPartial() { - io.grafeas.v1.UpdateOccurrenceRequest result = new io.grafeas.v1.UpdateOccurrenceRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.UpdateOccurrenceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.occurrence_ = occurrenceBuilder_ == null - ? occurrence_ - : occurrenceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null - ? updateMask_ - : updateMaskBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.UpdateOccurrenceRequest) { - return mergeFrom((io.grafeas.v1.UpdateOccurrenceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.UpdateOccurrenceRequest other) { - if (other == io.grafeas.v1.UpdateOccurrenceRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasOccurrence()) { - mergeOccurrence(other.getOccurrence()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getOccurrenceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getUpdateMaskFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.grafeas.v1.Occurrence occurrence_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrenceBuilder_; - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the occurrence field is set. - */ - public boolean hasOccurrence() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The occurrence. - */ - public io.grafeas.v1.Occurrence getOccurrence() { - if (occurrenceBuilder_ == null) { - return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } else { - return occurrenceBuilder_.getMessage(); - } - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOccurrence(io.grafeas.v1.Occurrence value) { - if (occurrenceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - occurrence_ = value; - } else { - occurrenceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOccurrence( - io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrenceBuilder_ == null) { - occurrence_ = builderForValue.build(); - } else { - occurrenceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeOccurrence(io.grafeas.v1.Occurrence value) { - if (occurrenceBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - occurrence_ != null && - occurrence_ != io.grafeas.v1.Occurrence.getDefaultInstance()) { - getOccurrenceBuilder().mergeFrom(value); - } else { - occurrence_ = value; - } - } else { - occurrenceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearOccurrence() { - bitField0_ = (bitField0_ & ~0x00000002); - occurrence_ = null; - if (occurrenceBuilder_ != null) { - occurrenceBuilder_.dispose(); - occurrenceBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Occurrence.Builder getOccurrenceBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getOccurrenceFieldBuilder().getBuilder(); - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { - if (occurrenceBuilder_ != null) { - return occurrenceBuilder_.getMessageOrBuilder(); - } else { - return occurrence_ == null ? - io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> - getOccurrenceFieldBuilder() { - if (occurrenceBuilder_ == null) { - occurrenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( - getOccurrence(), - getParentForChildren(), - isClean()); - occurrence_ = null; - } - return occurrenceBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - } else { - updateMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - updateMask_ != null && - updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000004); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.UpdateOccurrenceRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.UpdateOccurrenceRequest) - private static final io.grafeas.v1.UpdateOccurrenceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.UpdateOccurrenceRequest(); - } - - public static io.grafeas.v1.UpdateOccurrenceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateOccurrenceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.UpdateOccurrenceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java deleted file mode 100644 index ccec13dc04a7..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface UpdateOccurrenceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.UpdateOccurrenceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The updated occurrence.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the occurrence field is set. - */ - boolean hasOccurrence(); - /** - *
-   * The updated occurrence.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The occurrence. - */ - io.grafeas.v1.Occurrence getOccurrence(); - /** - *
-   * The updated occurrence.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder(); - - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java deleted file mode 100644 index 4872b0e752da..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java +++ /dev/null @@ -1,130 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -public final class Upgrade { - private Upgrade() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_UpgradeNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_UpgradeDistribution_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_WindowsUpdate_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_UpgradeOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\030grafeas/v1/upgrade.proto\022\ngrafeas.v1\032\037" + - "google/protobuf/timestamp.proto\032\030grafeas" + - "/v1/package.proto\"\257\001\n\013UpgradeNote\022\017\n\007pac" + - "kage\030\001 \001(\t\022$\n\007version\030\002 \001(\0132\023.grafeas.v1" + - ".Version\0226\n\rdistributions\030\003 \003(\0132\037.grafea" + - "s.v1.UpgradeDistribution\0221\n\016windows_upda" + - "te\030\004 \001(\0132\031.grafeas.v1.WindowsUpdate\"]\n\023U" + - "pgradeDistribution\022\017\n\007cpe_uri\030\001 \001(\t\022\026\n\016c" + - "lassification\030\002 \001(\t\022\020\n\010severity\030\003 \001(\t\022\013\n" + - "\003cve\030\004 \003(\t\"\354\002\n\rWindowsUpdate\0224\n\010identity" + - "\030\001 \001(\0132\".grafeas.v1.WindowsUpdate.Identi" + - "ty\022\r\n\005title\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\0226" + - "\n\ncategories\030\004 \003(\0132\".grafeas.v1.WindowsU" + - "pdate.Category\022\026\n\016kb_article_ids\030\005 \003(\t\022\023" + - "\n\013support_url\030\006 \001(\t\022<\n\030last_published_ti" + - "mestamp\030\007 \001(\0132\032.google.protobuf.Timestam" + - "p\032/\n\010Identity\022\021\n\tupdate_id\030\001 \001(\t\022\020\n\010revi" + - "sion\030\002 \001(\005\032-\n\010Category\022\023\n\013category_id\030\001 " + - "\001(\t\022\014\n\004name\030\002 \001(\t\"\273\001\n\021UpgradeOccurrence\022" + - "\017\n\007package\030\001 \001(\t\022+\n\016parsed_version\030\003 \001(\013" + - "2\023.grafeas.v1.Version\0225\n\014distribution\030\004 " + - "\001(\0132\037.grafeas.v1.UpgradeDistribution\0221\n\016" + - "windows_update\030\005 \001(\0132\031.grafeas.v1.Window" + - "sUpdateBQ\n\rio.grafeas.v1P\001Z8google.golan" + - "g.org/genproto/googleapis/grafeas/v1;gra" + - "feas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.TimestampProto.getDescriptor(), - io.grafeas.v1.Package.getDescriptor(), - }); - internal_static_grafeas_v1_UpgradeNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_UpgradeNote_descriptor, - new java.lang.String[] { "Package", "Version", "Distributions", "WindowsUpdate", }); - internal_static_grafeas_v1_UpgradeDistribution_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_UpgradeDistribution_descriptor, - new java.lang.String[] { "CpeUri", "Classification", "Severity", "Cve", }); - internal_static_grafeas_v1_WindowsUpdate_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_WindowsUpdate_descriptor, - new java.lang.String[] { "Identity", "Title", "Description", "Categories", "KbArticleIds", "SupportUrl", "LastPublishedTimestamp", }); - internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor = - internal_static_grafeas_v1_WindowsUpdate_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor, - new java.lang.String[] { "UpdateId", "Revision", }); - internal_static_grafeas_v1_WindowsUpdate_Category_descriptor = - internal_static_grafeas_v1_WindowsUpdate_descriptor.getNestedTypes().get(1); - internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_WindowsUpdate_Category_descriptor, - new java.lang.String[] { "CategoryId", "Name", }); - internal_static_grafeas_v1_UpgradeOccurrence_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_UpgradeOccurrence_descriptor, - new java.lang.String[] { "Package", "ParsedVersion", "Distribution", "WindowsUpdate", }); - com.google.protobuf.TimestampProto.getDescriptor(); - io.grafeas.v1.Package.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java deleted file mode 100644 index 0a867618fecf..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java +++ /dev/null @@ -1,1177 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -/** - *
- * The Upgrade Distribution represents metadata about the Upgrade for each
- * operating system (CPE). Some distributions have additional metadata around
- * updates, classifying them into various categories and severities.
- * 
- * - * Protobuf type {@code grafeas.v1.UpgradeDistribution} - */ -public final class UpgradeDistribution extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeDistribution) - UpgradeDistributionOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpgradeDistribution.newBuilder() to construct. - private UpgradeDistribution(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpgradeDistribution() { - cpeUri_ = ""; - classification_ = ""; - severity_ = ""; - cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpgradeDistribution(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpgradeDistribution.class, io.grafeas.v1.UpgradeDistribution.Builder.class); - } - - public static final int CPE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object cpeUri_ = ""; - /** - *
-   * Required - The specific operating system this metadata applies to. See
-   * https://cpe.mitre.org/specification/.
-   * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - @java.lang.Override - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } - } - /** - *
-   * Required - The specific operating system this metadata applies to. See
-   * https://cpe.mitre.org/specification/.
-   * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLASSIFICATION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object classification_ = ""; - /** - *
-   * The operating system classification of this Upgrade, as specified by the
-   * upstream operating system upgrade feed. For Windows the classification is
-   * one of the category_ids listed at
-   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-   * 
- * - * string classification = 2; - * @return The classification. - */ - @java.lang.Override - public java.lang.String getClassification() { - java.lang.Object ref = classification_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - classification_ = s; - return s; - } - } - /** - *
-   * The operating system classification of this Upgrade, as specified by the
-   * upstream operating system upgrade feed. For Windows the classification is
-   * one of the category_ids listed at
-   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-   * 
- * - * string classification = 2; - * @return The bytes for classification. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getClassificationBytes() { - java.lang.Object ref = classification_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - classification_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SEVERITY_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object severity_ = ""; - /** - *
-   * The severity as specified by the upstream operating system.
-   * 
- * - * string severity = 3; - * @return The severity. - */ - @java.lang.Override - public java.lang.String getSeverity() { - java.lang.Object ref = severity_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - severity_ = s; - return s; - } - } - /** - *
-   * The severity as specified by the upstream operating system.
-   * 
- * - * string severity = 3; - * @return The bytes for severity. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSeverityBytes() { - java.lang.Object ref = severity_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - severity_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CVE_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList cve_; - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @return A list containing the cve. - */ - public com.google.protobuf.ProtocolStringList - getCveList() { - return cve_; - } - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @return The count of cve. - */ - public int getCveCount() { - return cve_.size(); - } - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @param index The index of the element to return. - * @return The cve at the given index. - */ - public java.lang.String getCve(int index) { - return cve_.get(index); - } - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @param index The index of the value to return. - * @return The bytes of the cve at the given index. - */ - public com.google.protobuf.ByteString - getCveBytes(int index) { - return cve_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(classification_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, classification_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severity_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, severity_); - } - for (int i = 0; i < cve_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cve_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(classification_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, classification_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severity_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, severity_); - } - { - int dataSize = 0; - for (int i = 0; i < cve_.size(); i++) { - dataSize += computeStringSizeNoTag(cve_.getRaw(i)); - } - size += dataSize; - size += 1 * getCveList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.UpgradeDistribution)) { - return super.equals(obj); - } - io.grafeas.v1.UpgradeDistribution other = (io.grafeas.v1.UpgradeDistribution) obj; - - if (!getCpeUri() - .equals(other.getCpeUri())) return false; - if (!getClassification() - .equals(other.getClassification())) return false; - if (!getSeverity() - .equals(other.getSeverity())) return false; - if (!getCveList() - .equals(other.getCveList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCpeUri().hashCode(); - hash = (37 * hash) + CLASSIFICATION_FIELD_NUMBER; - hash = (53 * hash) + getClassification().hashCode(); - hash = (37 * hash) + SEVERITY_FIELD_NUMBER; - hash = (53 * hash) + getSeverity().hashCode(); - if (getCveCount() > 0) { - hash = (37 * hash) + CVE_FIELD_NUMBER; - hash = (53 * hash) + getCveList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.UpgradeDistribution parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpgradeDistribution parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeDistribution parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.UpgradeDistribution prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The Upgrade Distribution represents metadata about the Upgrade for each
-   * operating system (CPE). Some distributions have additional metadata around
-   * updates, classifying them into various categories and severities.
-   * 
- * - * Protobuf type {@code grafeas.v1.UpgradeDistribution} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeDistribution) - io.grafeas.v1.UpgradeDistributionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpgradeDistribution.class, io.grafeas.v1.UpgradeDistribution.Builder.class); - } - - // Construct using io.grafeas.v1.UpgradeDistribution.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - cpeUri_ = ""; - classification_ = ""; - severity_ = ""; - cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeDistribution getDefaultInstanceForType() { - return io.grafeas.v1.UpgradeDistribution.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.UpgradeDistribution build() { - io.grafeas.v1.UpgradeDistribution result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeDistribution buildPartial() { - io.grafeas.v1.UpgradeDistribution result = new io.grafeas.v1.UpgradeDistribution(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.UpgradeDistribution result) { - if (((bitField0_ & 0x00000008) != 0)) { - cve_ = cve_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.cve_ = cve_; - } - - private void buildPartial0(io.grafeas.v1.UpgradeDistribution result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.cpeUri_ = cpeUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.classification_ = classification_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.severity_ = severity_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.UpgradeDistribution) { - return mergeFrom((io.grafeas.v1.UpgradeDistribution)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.UpgradeDistribution other) { - if (other == io.grafeas.v1.UpgradeDistribution.getDefaultInstance()) return this; - if (!other.getCpeUri().isEmpty()) { - cpeUri_ = other.cpeUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getClassification().isEmpty()) { - classification_ = other.classification_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getSeverity().isEmpty()) { - severity_ = other.severity_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.cve_.isEmpty()) { - if (cve_.isEmpty()) { - cve_ = other.cve_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureCveIsMutable(); - cve_.addAll(other.cve_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - cpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - classification_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - severity_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - ensureCveIsMutable(); - cve_.add(s); - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object cpeUri_ = ""; - /** - *
-     * Required - The specific operating system this metadata applies to. See
-     * https://cpe.mitre.org/specification/.
-     * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required - The specific operating system this metadata applies to. See
-     * https://cpe.mitre.org/specification/.
-     * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required - The specific operating system this metadata applies to. See
-     * https://cpe.mitre.org/specification/.
-     * 
- * - * string cpe_uri = 1; - * @param value The cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required - The specific operating system this metadata applies to. See
-     * https://cpe.mitre.org/specification/.
-     * 
- * - * string cpe_uri = 1; - * @return This builder for chaining. - */ - public Builder clearCpeUri() { - cpeUri_ = getDefaultInstance().getCpeUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required - The specific operating system this metadata applies to. See
-     * https://cpe.mitre.org/specification/.
-     * 
- * - * string cpe_uri = 1; - * @param value The bytes for cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object classification_ = ""; - /** - *
-     * The operating system classification of this Upgrade, as specified by the
-     * upstream operating system upgrade feed. For Windows the classification is
-     * one of the category_ids listed at
-     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-     * 
- * - * string classification = 2; - * @return The classification. - */ - public java.lang.String getClassification() { - java.lang.Object ref = classification_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - classification_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The operating system classification of this Upgrade, as specified by the
-     * upstream operating system upgrade feed. For Windows the classification is
-     * one of the category_ids listed at
-     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-     * 
- * - * string classification = 2; - * @return The bytes for classification. - */ - public com.google.protobuf.ByteString - getClassificationBytes() { - java.lang.Object ref = classification_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - classification_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The operating system classification of this Upgrade, as specified by the
-     * upstream operating system upgrade feed. For Windows the classification is
-     * one of the category_ids listed at
-     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-     * 
- * - * string classification = 2; - * @param value The classification to set. - * @return This builder for chaining. - */ - public Builder setClassification( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - classification_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The operating system classification of this Upgrade, as specified by the
-     * upstream operating system upgrade feed. For Windows the classification is
-     * one of the category_ids listed at
-     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-     * 
- * - * string classification = 2; - * @return This builder for chaining. - */ - public Builder clearClassification() { - classification_ = getDefaultInstance().getClassification(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The operating system classification of this Upgrade, as specified by the
-     * upstream operating system upgrade feed. For Windows the classification is
-     * one of the category_ids listed at
-     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-     * 
- * - * string classification = 2; - * @param value The bytes for classification to set. - * @return This builder for chaining. - */ - public Builder setClassificationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - classification_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object severity_ = ""; - /** - *
-     * The severity as specified by the upstream operating system.
-     * 
- * - * string severity = 3; - * @return The severity. - */ - public java.lang.String getSeverity() { - java.lang.Object ref = severity_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - severity_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The severity as specified by the upstream operating system.
-     * 
- * - * string severity = 3; - * @return The bytes for severity. - */ - public com.google.protobuf.ByteString - getSeverityBytes() { - java.lang.Object ref = severity_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - severity_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The severity as specified by the upstream operating system.
-     * 
- * - * string severity = 3; - * @param value The severity to set. - * @return This builder for chaining. - */ - public Builder setSeverity( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - severity_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The severity as specified by the upstream operating system.
-     * 
- * - * string severity = 3; - * @return This builder for chaining. - */ - public Builder clearSeverity() { - severity_ = getDefaultInstance().getSeverity(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The severity as specified by the upstream operating system.
-     * 
- * - * string severity = 3; - * @param value The bytes for severity to set. - * @return This builder for chaining. - */ - public Builder setSeverityBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - severity_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureCveIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - cve_ = new com.google.protobuf.LazyStringArrayList(cve_); - bitField0_ |= 0x00000008; - } - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @return A list containing the cve. - */ - public com.google.protobuf.ProtocolStringList - getCveList() { - return cve_.getUnmodifiableView(); - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @return The count of cve. - */ - public int getCveCount() { - return cve_.size(); - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @param index The index of the element to return. - * @return The cve at the given index. - */ - public java.lang.String getCve(int index) { - return cve_.get(index); - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @param index The index of the value to return. - * @return The bytes of the cve at the given index. - */ - public com.google.protobuf.ByteString - getCveBytes(int index) { - return cve_.getByteString(index); - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @param index The index to set the value at. - * @param value The cve to set. - * @return This builder for chaining. - */ - public Builder setCve( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureCveIsMutable(); - cve_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @param value The cve to add. - * @return This builder for chaining. - */ - public Builder addCve( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureCveIsMutable(); - cve_.add(value); - onChanged(); - return this; - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @param values The cve to add. - * @return This builder for chaining. - */ - public Builder addAllCve( - java.lang.Iterable values) { - ensureCveIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, cve_); - onChanged(); - return this; - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @return This builder for chaining. - */ - public Builder clearCve() { - cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @param value The bytes of the cve to add. - * @return This builder for chaining. - */ - public Builder addCveBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureCveIsMutable(); - cve_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.UpgradeDistribution) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeDistribution) - private static final io.grafeas.v1.UpgradeDistribution DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeDistribution(); - } - - public static io.grafeas.v1.UpgradeDistribution getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpgradeDistribution parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeDistribution getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java deleted file mode 100644 index ae654ff74cbf..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -public interface UpgradeDistributionOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.UpgradeDistribution) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required - The specific operating system this metadata applies to. See
-   * https://cpe.mitre.org/specification/.
-   * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - java.lang.String getCpeUri(); - /** - *
-   * Required - The specific operating system this metadata applies to. See
-   * https://cpe.mitre.org/specification/.
-   * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - com.google.protobuf.ByteString - getCpeUriBytes(); - - /** - *
-   * The operating system classification of this Upgrade, as specified by the
-   * upstream operating system upgrade feed. For Windows the classification is
-   * one of the category_ids listed at
-   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-   * 
- * - * string classification = 2; - * @return The classification. - */ - java.lang.String getClassification(); - /** - *
-   * The operating system classification of this Upgrade, as specified by the
-   * upstream operating system upgrade feed. For Windows the classification is
-   * one of the category_ids listed at
-   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-   * 
- * - * string classification = 2; - * @return The bytes for classification. - */ - com.google.protobuf.ByteString - getClassificationBytes(); - - /** - *
-   * The severity as specified by the upstream operating system.
-   * 
- * - * string severity = 3; - * @return The severity. - */ - java.lang.String getSeverity(); - /** - *
-   * The severity as specified by the upstream operating system.
-   * 
- * - * string severity = 3; - * @return The bytes for severity. - */ - com.google.protobuf.ByteString - getSeverityBytes(); - - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @return A list containing the cve. - */ - java.util.List - getCveList(); - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @return The count of cve. - */ - int getCveCount(); - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @param index The index of the element to return. - * @return The cve at the given index. - */ - java.lang.String getCve(int index); - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @param index The index of the value to return. - * @return The bytes of the cve at the given index. - */ - com.google.protobuf.ByteString - getCveBytes(int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java deleted file mode 100644 index 98cf3755164e..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java +++ /dev/null @@ -1,1502 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -/** - *
- * An Upgrade Note represents a potential upgrade of a package to a given
- * version. For each package version combination (i.e. bash 4.0, bash 4.1,
- * bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field
- * represents the information related to the update.
- * 
- * - * Protobuf type {@code grafeas.v1.UpgradeNote} - */ -public final class UpgradeNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeNote) - UpgradeNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpgradeNote.newBuilder() to construct. - private UpgradeNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpgradeNote() { - package_ = ""; - distributions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpgradeNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpgradeNote.class, io.grafeas.v1.UpgradeNote.Builder.class); - } - - public static final int PACKAGE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object package_ = ""; - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The package. - */ - @java.lang.Override - public java.lang.String getPackage() { - java.lang.Object ref = package_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - package_ = s; - return s; - } - } - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The bytes for package. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPackageBytes() { - java.lang.Object ref = package_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - package_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 2; - private io.grafeas.v1.Version version_; - /** - *
-   * Required for non-Windows OS. The version of the package in machine + human
-   * readable form.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return Whether the version field is set. - */ - @java.lang.Override - public boolean hasVersion() { - return version_ != null; - } - /** - *
-   * Required for non-Windows OS. The version of the package in machine + human
-   * readable form.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return The version. - */ - @java.lang.Override - public io.grafeas.v1.Version getVersion() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - /** - *
-   * Required for non-Windows OS. The version of the package in machine + human
-   * readable form.
-   * 
- * - * .grafeas.v1.Version version = 2; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - - public static final int DISTRIBUTIONS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List distributions_; - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - @java.lang.Override - public java.util.List getDistributionsList() { - return distributions_; - } - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - @java.lang.Override - public java.util.List - getDistributionsOrBuilderList() { - return distributions_; - } - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - @java.lang.Override - public int getDistributionsCount() { - return distributions_.size(); - } - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - @java.lang.Override - public io.grafeas.v1.UpgradeDistribution getDistributions(int index) { - return distributions_.get(index); - } - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - @java.lang.Override - public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder( - int index) { - return distributions_.get(index); - } - - public static final int WINDOWS_UPDATE_FIELD_NUMBER = 4; - private io.grafeas.v1.WindowsUpdate windowsUpdate_; - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - * @return Whether the windowsUpdate field is set. - */ - @java.lang.Override - public boolean hasWindowsUpdate() { - return windowsUpdate_ != null; - } - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - * @return The windowsUpdate. - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { - return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { - return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, package_); - } - if (version_ != null) { - output.writeMessage(2, getVersion()); - } - for (int i = 0; i < distributions_.size(); i++) { - output.writeMessage(3, distributions_.get(i)); - } - if (windowsUpdate_ != null) { - output.writeMessage(4, getWindowsUpdate()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, package_); - } - if (version_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getVersion()); - } - for (int i = 0; i < distributions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, distributions_.get(i)); - } - if (windowsUpdate_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getWindowsUpdate()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.UpgradeNote)) { - return super.equals(obj); - } - io.grafeas.v1.UpgradeNote other = (io.grafeas.v1.UpgradeNote) obj; - - if (!getPackage() - .equals(other.getPackage())) return false; - if (hasVersion() != other.hasVersion()) return false; - if (hasVersion()) { - if (!getVersion() - .equals(other.getVersion())) return false; - } - if (!getDistributionsList() - .equals(other.getDistributionsList())) return false; - if (hasWindowsUpdate() != other.hasWindowsUpdate()) return false; - if (hasWindowsUpdate()) { - if (!getWindowsUpdate() - .equals(other.getWindowsUpdate())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getPackage().hashCode(); - if (hasVersion()) { - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - } - if (getDistributionsCount() > 0) { - hash = (37 * hash) + DISTRIBUTIONS_FIELD_NUMBER; - hash = (53 * hash) + getDistributionsList().hashCode(); - } - if (hasWindowsUpdate()) { - hash = (37 * hash) + WINDOWS_UPDATE_FIELD_NUMBER; - hash = (53 * hash) + getWindowsUpdate().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.UpgradeNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpgradeNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpgradeNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.UpgradeNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An Upgrade Note represents a potential upgrade of a package to a given
-   * version. For each package version combination (i.e. bash 4.0, bash 4.1,
-   * bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field
-   * represents the information related to the update.
-   * 
- * - * Protobuf type {@code grafeas.v1.UpgradeNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeNote) - io.grafeas.v1.UpgradeNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpgradeNote.class, io.grafeas.v1.UpgradeNote.Builder.class); - } - - // Construct using io.grafeas.v1.UpgradeNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - package_ = ""; - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - if (distributionsBuilder_ == null) { - distributions_ = java.util.Collections.emptyList(); - } else { - distributions_ = null; - distributionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - windowsUpdate_ = null; - if (windowsUpdateBuilder_ != null) { - windowsUpdateBuilder_.dispose(); - windowsUpdateBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeNote getDefaultInstanceForType() { - return io.grafeas.v1.UpgradeNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.UpgradeNote build() { - io.grafeas.v1.UpgradeNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeNote buildPartial() { - io.grafeas.v1.UpgradeNote result = new io.grafeas.v1.UpgradeNote(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.UpgradeNote result) { - if (distributionsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - distributions_ = java.util.Collections.unmodifiableList(distributions_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.distributions_ = distributions_; - } else { - result.distributions_ = distributionsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.UpgradeNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.package_ = package_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.version_ = versionBuilder_ == null - ? version_ - : versionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.windowsUpdate_ = windowsUpdateBuilder_ == null - ? windowsUpdate_ - : windowsUpdateBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.UpgradeNote) { - return mergeFrom((io.grafeas.v1.UpgradeNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.UpgradeNote other) { - if (other == io.grafeas.v1.UpgradeNote.getDefaultInstance()) return this; - if (!other.getPackage().isEmpty()) { - package_ = other.package_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasVersion()) { - mergeVersion(other.getVersion()); - } - if (distributionsBuilder_ == null) { - if (!other.distributions_.isEmpty()) { - if (distributions_.isEmpty()) { - distributions_ = other.distributions_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureDistributionsIsMutable(); - distributions_.addAll(other.distributions_); - } - onChanged(); - } - } else { - if (!other.distributions_.isEmpty()) { - if (distributionsBuilder_.isEmpty()) { - distributionsBuilder_.dispose(); - distributionsBuilder_ = null; - distributions_ = other.distributions_; - bitField0_ = (bitField0_ & ~0x00000004); - distributionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDistributionsFieldBuilder() : null; - } else { - distributionsBuilder_.addAllMessages(other.distributions_); - } - } - } - if (other.hasWindowsUpdate()) { - mergeWindowsUpdate(other.getWindowsUpdate()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - package_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - io.grafeas.v1.UpgradeDistribution m = - input.readMessage( - io.grafeas.v1.UpgradeDistribution.parser(), - extensionRegistry); - if (distributionsBuilder_ == null) { - ensureDistributionsIsMutable(); - distributions_.add(m); - } else { - distributionsBuilder_.addMessage(m); - } - break; - } // case 26 - case 34: { - input.readMessage( - getWindowsUpdateFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object package_ = ""; - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @return The package. - */ - public java.lang.String getPackage() { - java.lang.Object ref = package_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - package_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @return The bytes for package. - */ - public com.google.protobuf.ByteString - getPackageBytes() { - java.lang.Object ref = package_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - package_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @param value The package to set. - * @return This builder for chaining. - */ - public Builder setPackage( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - package_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @return This builder for chaining. - */ - public Builder clearPackage() { - package_ = getDefaultInstance().getPackage(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @param value The bytes for package to set. - * @return This builder for chaining. - */ - public Builder setPackageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - package_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.grafeas.v1.Version version_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - * @return Whether the version field is set. - */ - public boolean hasVersion() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - * @return The version. - */ - public io.grafeas.v1.Version getVersion() { - if (versionBuilder_ == null) { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } else { - return versionBuilder_.getMessage(); - } - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder setVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - } else { - versionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder setVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (versionBuilder_ == null) { - version_ = builderForValue.build(); - } else { - versionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder mergeVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - version_ != null && - version_ != io.grafeas.v1.Version.getDefaultInstance()) { - getVersionBuilder().mergeFrom(value); - } else { - version_ = value; - } - } else { - versionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder clearVersion() { - bitField0_ = (bitField0_ & ~0x00000002); - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public io.grafeas.v1.Version.Builder getVersionBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getVersionFieldBuilder().getBuilder(); - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - if (versionBuilder_ != null) { - return versionBuilder_.getMessageOrBuilder(); - } else { - return version_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : version_; - } - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getVersionFieldBuilder() { - if (versionBuilder_ == null) { - versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getVersion(), - getParentForChildren(), - isClean()); - version_ = null; - } - return versionBuilder_; - } - - private java.util.List distributions_ = - java.util.Collections.emptyList(); - private void ensureDistributionsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - distributions_ = new java.util.ArrayList(distributions_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> distributionsBuilder_; - - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public java.util.List getDistributionsList() { - if (distributionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(distributions_); - } else { - return distributionsBuilder_.getMessageList(); - } - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public int getDistributionsCount() { - if (distributionsBuilder_ == null) { - return distributions_.size(); - } else { - return distributionsBuilder_.getCount(); - } - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public io.grafeas.v1.UpgradeDistribution getDistributions(int index) { - if (distributionsBuilder_ == null) { - return distributions_.get(index); - } else { - return distributionsBuilder_.getMessage(index); - } - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder setDistributions( - int index, io.grafeas.v1.UpgradeDistribution value) { - if (distributionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDistributionsIsMutable(); - distributions_.set(index, value); - onChanged(); - } else { - distributionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder setDistributions( - int index, io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { - if (distributionsBuilder_ == null) { - ensureDistributionsIsMutable(); - distributions_.set(index, builderForValue.build()); - onChanged(); - } else { - distributionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder addDistributions(io.grafeas.v1.UpgradeDistribution value) { - if (distributionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDistributionsIsMutable(); - distributions_.add(value); - onChanged(); - } else { - distributionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder addDistributions( - int index, io.grafeas.v1.UpgradeDistribution value) { - if (distributionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDistributionsIsMutable(); - distributions_.add(index, value); - onChanged(); - } else { - distributionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder addDistributions( - io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { - if (distributionsBuilder_ == null) { - ensureDistributionsIsMutable(); - distributions_.add(builderForValue.build()); - onChanged(); - } else { - distributionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder addDistributions( - int index, io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { - if (distributionsBuilder_ == null) { - ensureDistributionsIsMutable(); - distributions_.add(index, builderForValue.build()); - onChanged(); - } else { - distributionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder addAllDistributions( - java.lang.Iterable values) { - if (distributionsBuilder_ == null) { - ensureDistributionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, distributions_); - onChanged(); - } else { - distributionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder clearDistributions() { - if (distributionsBuilder_ == null) { - distributions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - distributionsBuilder_.clear(); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder removeDistributions(int index) { - if (distributionsBuilder_ == null) { - ensureDistributionsIsMutable(); - distributions_.remove(index); - onChanged(); - } else { - distributionsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public io.grafeas.v1.UpgradeDistribution.Builder getDistributionsBuilder( - int index) { - return getDistributionsFieldBuilder().getBuilder(index); - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder( - int index) { - if (distributionsBuilder_ == null) { - return distributions_.get(index); } else { - return distributionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public java.util.List - getDistributionsOrBuilderList() { - if (distributionsBuilder_ != null) { - return distributionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(distributions_); - } - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public io.grafeas.v1.UpgradeDistribution.Builder addDistributionsBuilder() { - return getDistributionsFieldBuilder().addBuilder( - io.grafeas.v1.UpgradeDistribution.getDefaultInstance()); - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public io.grafeas.v1.UpgradeDistribution.Builder addDistributionsBuilder( - int index) { - return getDistributionsFieldBuilder().addBuilder( - index, io.grafeas.v1.UpgradeDistribution.getDefaultInstance()); - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public java.util.List - getDistributionsBuilderList() { - return getDistributionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> - getDistributionsFieldBuilder() { - if (distributionsBuilder_ == null) { - distributionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder>( - distributions_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - distributions_ = null; - } - return distributionsBuilder_; - } - - private io.grafeas.v1.WindowsUpdate windowsUpdate_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> windowsUpdateBuilder_; - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - * @return Whether the windowsUpdate field is set. - */ - public boolean hasWindowsUpdate() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - * @return The windowsUpdate. - */ - public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { - if (windowsUpdateBuilder_ == null) { - return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } else { - return windowsUpdateBuilder_.getMessage(); - } - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - public Builder setWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { - if (windowsUpdateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - windowsUpdate_ = value; - } else { - windowsUpdateBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - public Builder setWindowsUpdate( - io.grafeas.v1.WindowsUpdate.Builder builderForValue) { - if (windowsUpdateBuilder_ == null) { - windowsUpdate_ = builderForValue.build(); - } else { - windowsUpdateBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - public Builder mergeWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { - if (windowsUpdateBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - windowsUpdate_ != null && - windowsUpdate_ != io.grafeas.v1.WindowsUpdate.getDefaultInstance()) { - getWindowsUpdateBuilder().mergeFrom(value); - } else { - windowsUpdate_ = value; - } - } else { - windowsUpdateBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - public Builder clearWindowsUpdate() { - bitField0_ = (bitField0_ & ~0x00000008); - windowsUpdate_ = null; - if (windowsUpdateBuilder_ != null) { - windowsUpdateBuilder_.dispose(); - windowsUpdateBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - public io.grafeas.v1.WindowsUpdate.Builder getWindowsUpdateBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getWindowsUpdateFieldBuilder().getBuilder(); - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { - if (windowsUpdateBuilder_ != null) { - return windowsUpdateBuilder_.getMessageOrBuilder(); - } else { - return windowsUpdate_ == null ? - io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> - getWindowsUpdateFieldBuilder() { - if (windowsUpdateBuilder_ == null) { - windowsUpdateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder>( - getWindowsUpdate(), - getParentForChildren(), - isClean()); - windowsUpdate_ = null; - } - return windowsUpdateBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.UpgradeNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeNote) - private static final io.grafeas.v1.UpgradeNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeNote(); - } - - public static io.grafeas.v1.UpgradeNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpgradeNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java deleted file mode 100644 index 5ba319277bdd..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java +++ /dev/null @@ -1,130 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -public interface UpgradeNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.UpgradeNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The package. - */ - java.lang.String getPackage(); - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The bytes for package. - */ - com.google.protobuf.ByteString - getPackageBytes(); - - /** - *
-   * Required for non-Windows OS. The version of the package in machine + human
-   * readable form.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return Whether the version field is set. - */ - boolean hasVersion(); - /** - *
-   * Required for non-Windows OS. The version of the package in machine + human
-   * readable form.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return The version. - */ - io.grafeas.v1.Version getVersion(); - /** - *
-   * Required for non-Windows OS. The version of the package in machine + human
-   * readable form.
-   * 
- * - * .grafeas.v1.Version version = 2; - */ - io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); - - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - java.util.List - getDistributionsList(); - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - io.grafeas.v1.UpgradeDistribution getDistributions(int index); - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - int getDistributionsCount(); - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - java.util.List - getDistributionsOrBuilderList(); - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder( - int index); - - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - * @return Whether the windowsUpdate field is set. - */ - boolean hasWindowsUpdate(); - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - * @return The windowsUpdate. - */ - io.grafeas.v1.WindowsUpdate getWindowsUpdate(); - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java deleted file mode 100644 index c82c44559daa..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java +++ /dev/null @@ -1,1311 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -/** - *
- * An Upgrade Occurrence represents that a specific resource_url could install a
- * specific upgrade. This presence is supplied via local sources (i.e. it is
- * present in the mirror and the running system has noticed its availability).
- * For Windows, both distribution and windows_update contain information for the
- * Windows update.
- * 
- * - * Protobuf type {@code grafeas.v1.UpgradeOccurrence} - */ -public final class UpgradeOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeOccurrence) - UpgradeOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpgradeOccurrence.newBuilder() to construct. - private UpgradeOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpgradeOccurrence() { - package_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpgradeOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpgradeOccurrence.class, io.grafeas.v1.UpgradeOccurrence.Builder.class); - } - - public static final int PACKAGE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object package_ = ""; - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The package. - */ - @java.lang.Override - public java.lang.String getPackage() { - java.lang.Object ref = package_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - package_ = s; - return s; - } - } - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The bytes for package. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPackageBytes() { - java.lang.Object ref = package_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - package_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARSED_VERSION_FIELD_NUMBER = 3; - private io.grafeas.v1.Version parsedVersion_; - /** - *
-   * Required for non-Windows OS. The version of the package in a machine +
-   * human readable form.
-   * 
- * - * .grafeas.v1.Version parsed_version = 3; - * @return Whether the parsedVersion field is set. - */ - @java.lang.Override - public boolean hasParsedVersion() { - return parsedVersion_ != null; - } - /** - *
-   * Required for non-Windows OS. The version of the package in a machine +
-   * human readable form.
-   * 
- * - * .grafeas.v1.Version parsed_version = 3; - * @return The parsedVersion. - */ - @java.lang.Override - public io.grafeas.v1.Version getParsedVersion() { - return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; - } - /** - *
-   * Required for non-Windows OS. The version of the package in a machine +
-   * human readable form.
-   * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder() { - return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; - } - - public static final int DISTRIBUTION_FIELD_NUMBER = 4; - private io.grafeas.v1.UpgradeDistribution distribution_; - /** - *
-   * Metadata about the upgrade for available for the specific operating system
-   * for the resource_url. This allows efficient filtering, as well as
-   * making it easier to use the occurrence.
-   * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - * @return Whether the distribution field is set. - */ - @java.lang.Override - public boolean hasDistribution() { - return distribution_ != null; - } - /** - *
-   * Metadata about the upgrade for available for the specific operating system
-   * for the resource_url. This allows efficient filtering, as well as
-   * making it easier to use the occurrence.
-   * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - * @return The distribution. - */ - @java.lang.Override - public io.grafeas.v1.UpgradeDistribution getDistribution() { - return distribution_ == null ? io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; - } - /** - *
-   * Metadata about the upgrade for available for the specific operating system
-   * for the resource_url. This allows efficient filtering, as well as
-   * making it easier to use the occurrence.
-   * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - @java.lang.Override - public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder() { - return distribution_ == null ? io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; - } - - public static final int WINDOWS_UPDATE_FIELD_NUMBER = 5; - private io.grafeas.v1.WindowsUpdate windowsUpdate_; - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - * @return Whether the windowsUpdate field is set. - */ - @java.lang.Override - public boolean hasWindowsUpdate() { - return windowsUpdate_ != null; - } - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - * @return The windowsUpdate. - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { - return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { - return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, package_); - } - if (parsedVersion_ != null) { - output.writeMessage(3, getParsedVersion()); - } - if (distribution_ != null) { - output.writeMessage(4, getDistribution()); - } - if (windowsUpdate_ != null) { - output.writeMessage(5, getWindowsUpdate()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, package_); - } - if (parsedVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getParsedVersion()); - } - if (distribution_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getDistribution()); - } - if (windowsUpdate_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getWindowsUpdate()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.UpgradeOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.UpgradeOccurrence other = (io.grafeas.v1.UpgradeOccurrence) obj; - - if (!getPackage() - .equals(other.getPackage())) return false; - if (hasParsedVersion() != other.hasParsedVersion()) return false; - if (hasParsedVersion()) { - if (!getParsedVersion() - .equals(other.getParsedVersion())) return false; - } - if (hasDistribution() != other.hasDistribution()) return false; - if (hasDistribution()) { - if (!getDistribution() - .equals(other.getDistribution())) return false; - } - if (hasWindowsUpdate() != other.hasWindowsUpdate()) return false; - if (hasWindowsUpdate()) { - if (!getWindowsUpdate() - .equals(other.getWindowsUpdate())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getPackage().hashCode(); - if (hasParsedVersion()) { - hash = (37 * hash) + PARSED_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getParsedVersion().hashCode(); - } - if (hasDistribution()) { - hash = (37 * hash) + DISTRIBUTION_FIELD_NUMBER; - hash = (53 * hash) + getDistribution().hashCode(); - } - if (hasWindowsUpdate()) { - hash = (37 * hash) + WINDOWS_UPDATE_FIELD_NUMBER; - hash = (53 * hash) + getWindowsUpdate().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpgradeOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.UpgradeOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An Upgrade Occurrence represents that a specific resource_url could install a
-   * specific upgrade. This presence is supplied via local sources (i.e. it is
-   * present in the mirror and the running system has noticed its availability).
-   * For Windows, both distribution and windows_update contain information for the
-   * Windows update.
-   * 
- * - * Protobuf type {@code grafeas.v1.UpgradeOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeOccurrence) - io.grafeas.v1.UpgradeOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpgradeOccurrence.class, io.grafeas.v1.UpgradeOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.UpgradeOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - package_ = ""; - parsedVersion_ = null; - if (parsedVersionBuilder_ != null) { - parsedVersionBuilder_.dispose(); - parsedVersionBuilder_ = null; - } - distribution_ = null; - if (distributionBuilder_ != null) { - distributionBuilder_.dispose(); - distributionBuilder_ = null; - } - windowsUpdate_ = null; - if (windowsUpdateBuilder_ != null) { - windowsUpdateBuilder_.dispose(); - windowsUpdateBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrence build() { - io.grafeas.v1.UpgradeOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrence buildPartial() { - io.grafeas.v1.UpgradeOccurrence result = new io.grafeas.v1.UpgradeOccurrence(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.UpgradeOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.package_ = package_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.parsedVersion_ = parsedVersionBuilder_ == null - ? parsedVersion_ - : parsedVersionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.distribution_ = distributionBuilder_ == null - ? distribution_ - : distributionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.windowsUpdate_ = windowsUpdateBuilder_ == null - ? windowsUpdate_ - : windowsUpdateBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.UpgradeOccurrence) { - return mergeFrom((io.grafeas.v1.UpgradeOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.UpgradeOccurrence other) { - if (other == io.grafeas.v1.UpgradeOccurrence.getDefaultInstance()) return this; - if (!other.getPackage().isEmpty()) { - package_ = other.package_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasParsedVersion()) { - mergeParsedVersion(other.getParsedVersion()); - } - if (other.hasDistribution()) { - mergeDistribution(other.getDistribution()); - } - if (other.hasWindowsUpdate()) { - mergeWindowsUpdate(other.getWindowsUpdate()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - package_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 26: { - input.readMessage( - getParsedVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 26 - case 34: { - input.readMessage( - getDistributionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 34 - case 42: { - input.readMessage( - getWindowsUpdateFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 42 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object package_ = ""; - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @return The package. - */ - public java.lang.String getPackage() { - java.lang.Object ref = package_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - package_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @return The bytes for package. - */ - public com.google.protobuf.ByteString - getPackageBytes() { - java.lang.Object ref = package_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - package_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @param value The package to set. - * @return This builder for chaining. - */ - public Builder setPackage( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - package_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @return This builder for chaining. - */ - public Builder clearPackage() { - package_ = getDefaultInstance().getPackage(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @param value The bytes for package to set. - * @return This builder for chaining. - */ - public Builder setPackageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - package_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.grafeas.v1.Version parsedVersion_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> parsedVersionBuilder_; - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - * @return Whether the parsedVersion field is set. - */ - public boolean hasParsedVersion() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - * @return The parsedVersion. - */ - public io.grafeas.v1.Version getParsedVersion() { - if (parsedVersionBuilder_ == null) { - return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; - } else { - return parsedVersionBuilder_.getMessage(); - } - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - public Builder setParsedVersion(io.grafeas.v1.Version value) { - if (parsedVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parsedVersion_ = value; - } else { - parsedVersionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - public Builder setParsedVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (parsedVersionBuilder_ == null) { - parsedVersion_ = builderForValue.build(); - } else { - parsedVersionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - public Builder mergeParsedVersion(io.grafeas.v1.Version value) { - if (parsedVersionBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - parsedVersion_ != null && - parsedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { - getParsedVersionBuilder().mergeFrom(value); - } else { - parsedVersion_ = value; - } - } else { - parsedVersionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - public Builder clearParsedVersion() { - bitField0_ = (bitField0_ & ~0x00000002); - parsedVersion_ = null; - if (parsedVersionBuilder_ != null) { - parsedVersionBuilder_.dispose(); - parsedVersionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - public io.grafeas.v1.Version.Builder getParsedVersionBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getParsedVersionFieldBuilder().getBuilder(); - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - public io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder() { - if (parsedVersionBuilder_ != null) { - return parsedVersionBuilder_.getMessageOrBuilder(); - } else { - return parsedVersion_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; - } - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getParsedVersionFieldBuilder() { - if (parsedVersionBuilder_ == null) { - parsedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getParsedVersion(), - getParentForChildren(), - isClean()); - parsedVersion_ = null; - } - return parsedVersionBuilder_; - } - - private io.grafeas.v1.UpgradeDistribution distribution_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> distributionBuilder_; - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - * @return Whether the distribution field is set. - */ - public boolean hasDistribution() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - * @return The distribution. - */ - public io.grafeas.v1.UpgradeDistribution getDistribution() { - if (distributionBuilder_ == null) { - return distribution_ == null ? io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; - } else { - return distributionBuilder_.getMessage(); - } - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - public Builder setDistribution(io.grafeas.v1.UpgradeDistribution value) { - if (distributionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - distribution_ = value; - } else { - distributionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - public Builder setDistribution( - io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { - if (distributionBuilder_ == null) { - distribution_ = builderForValue.build(); - } else { - distributionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - public Builder mergeDistribution(io.grafeas.v1.UpgradeDistribution value) { - if (distributionBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - distribution_ != null && - distribution_ != io.grafeas.v1.UpgradeDistribution.getDefaultInstance()) { - getDistributionBuilder().mergeFrom(value); - } else { - distribution_ = value; - } - } else { - distributionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - public Builder clearDistribution() { - bitField0_ = (bitField0_ & ~0x00000004); - distribution_ = null; - if (distributionBuilder_ != null) { - distributionBuilder_.dispose(); - distributionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - public io.grafeas.v1.UpgradeDistribution.Builder getDistributionBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getDistributionFieldBuilder().getBuilder(); - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder() { - if (distributionBuilder_ != null) { - return distributionBuilder_.getMessageOrBuilder(); - } else { - return distribution_ == null ? - io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; - } - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> - getDistributionFieldBuilder() { - if (distributionBuilder_ == null) { - distributionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder>( - getDistribution(), - getParentForChildren(), - isClean()); - distribution_ = null; - } - return distributionBuilder_; - } - - private io.grafeas.v1.WindowsUpdate windowsUpdate_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> windowsUpdateBuilder_; - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - * @return Whether the windowsUpdate field is set. - */ - public boolean hasWindowsUpdate() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - * @return The windowsUpdate. - */ - public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { - if (windowsUpdateBuilder_ == null) { - return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } else { - return windowsUpdateBuilder_.getMessage(); - } - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - public Builder setWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { - if (windowsUpdateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - windowsUpdate_ = value; - } else { - windowsUpdateBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - public Builder setWindowsUpdate( - io.grafeas.v1.WindowsUpdate.Builder builderForValue) { - if (windowsUpdateBuilder_ == null) { - windowsUpdate_ = builderForValue.build(); - } else { - windowsUpdateBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - public Builder mergeWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { - if (windowsUpdateBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - windowsUpdate_ != null && - windowsUpdate_ != io.grafeas.v1.WindowsUpdate.getDefaultInstance()) { - getWindowsUpdateBuilder().mergeFrom(value); - } else { - windowsUpdate_ = value; - } - } else { - windowsUpdateBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - public Builder clearWindowsUpdate() { - bitField0_ = (bitField0_ & ~0x00000008); - windowsUpdate_ = null; - if (windowsUpdateBuilder_ != null) { - windowsUpdateBuilder_.dispose(); - windowsUpdateBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - public io.grafeas.v1.WindowsUpdate.Builder getWindowsUpdateBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getWindowsUpdateFieldBuilder().getBuilder(); - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { - if (windowsUpdateBuilder_ != null) { - return windowsUpdateBuilder_.getMessageOrBuilder(); - } else { - return windowsUpdate_ == null ? - io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> - getWindowsUpdateFieldBuilder() { - if (windowsUpdateBuilder_ == null) { - windowsUpdateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder>( - getWindowsUpdate(), - getParentForChildren(), - isClean()); - windowsUpdate_ = null; - } - return windowsUpdateBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.UpgradeOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeOccurrence) - private static final io.grafeas.v1.UpgradeOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeOccurrence(); - } - - public static io.grafeas.v1.UpgradeOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpgradeOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java deleted file mode 100644 index 0b38a1018b82..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java +++ /dev/null @@ -1,119 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -public interface UpgradeOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.UpgradeOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The package. - */ - java.lang.String getPackage(); - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The bytes for package. - */ - com.google.protobuf.ByteString - getPackageBytes(); - - /** - *
-   * Required for non-Windows OS. The version of the package in a machine +
-   * human readable form.
-   * 
- * - * .grafeas.v1.Version parsed_version = 3; - * @return Whether the parsedVersion field is set. - */ - boolean hasParsedVersion(); - /** - *
-   * Required for non-Windows OS. The version of the package in a machine +
-   * human readable form.
-   * 
- * - * .grafeas.v1.Version parsed_version = 3; - * @return The parsedVersion. - */ - io.grafeas.v1.Version getParsedVersion(); - /** - *
-   * Required for non-Windows OS. The version of the package in a machine +
-   * human readable form.
-   * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder(); - - /** - *
-   * Metadata about the upgrade for available for the specific operating system
-   * for the resource_url. This allows efficient filtering, as well as
-   * making it easier to use the occurrence.
-   * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - * @return Whether the distribution field is set. - */ - boolean hasDistribution(); - /** - *
-   * Metadata about the upgrade for available for the specific operating system
-   * for the resource_url. This allows efficient filtering, as well as
-   * making it easier to use the occurrence.
-   * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - * @return The distribution. - */ - io.grafeas.v1.UpgradeDistribution getDistribution(); - /** - *
-   * Metadata about the upgrade for available for the specific operating system
-   * for the resource_url. This allows efficient filtering, as well as
-   * making it easier to use the occurrence.
-   * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder(); - - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - * @return Whether the windowsUpdate field is set. - */ - boolean hasWindowsUpdate(); - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - * @return The windowsUpdate. - */ - io.grafeas.v1.WindowsUpdate getWindowsUpdate(); - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java deleted file mode 100644 index 327a4d2a0671..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java +++ /dev/null @@ -1,1398 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -/** - *
- * Version contains structured information about the version of a package.
- * 
- * - * Protobuf type {@code grafeas.v1.Version} - */ -public final class Version extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Version) - VersionOrBuilder { -private static final long serialVersionUID = 0L; - // Use Version.newBuilder() to construct. - private Version(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Version() { - name_ = ""; - revision_ = ""; - kind_ = 0; - fullName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Version(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Version.class, io.grafeas.v1.Version.Builder.class); - } - - /** - *
-   * Whether this is an ordinary package version or a sentinel MIN/MAX version.
-   * 
- * - * Protobuf enum {@code grafeas.v1.Version.VersionKind} - */ - public enum VersionKind - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown.
-     * 
- * - * VERSION_KIND_UNSPECIFIED = 0; - */ - VERSION_KIND_UNSPECIFIED(0), - /** - *
-     * A standard package version.
-     * 
- * - * NORMAL = 1; - */ - NORMAL(1), - /** - *
-     * A special version representing negative infinity.
-     * 
- * - * MINIMUM = 2; - */ - MINIMUM(2), - /** - *
-     * A special version representing positive infinity.
-     * 
- * - * MAXIMUM = 3; - */ - MAXIMUM(3), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unknown.
-     * 
- * - * VERSION_KIND_UNSPECIFIED = 0; - */ - public static final int VERSION_KIND_UNSPECIFIED_VALUE = 0; - /** - *
-     * A standard package version.
-     * 
- * - * NORMAL = 1; - */ - public static final int NORMAL_VALUE = 1; - /** - *
-     * A special version representing negative infinity.
-     * 
- * - * MINIMUM = 2; - */ - public static final int MINIMUM_VALUE = 2; - /** - *
-     * A special version representing positive infinity.
-     * 
- * - * MAXIMUM = 3; - */ - public static final int MAXIMUM_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static VersionKind valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static VersionKind forNumber(int value) { - switch (value) { - case 0: return VERSION_KIND_UNSPECIFIED; - case 1: return NORMAL; - case 2: return MINIMUM; - case 3: return MAXIMUM; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - VersionKind> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public VersionKind findValueByNumber(int number) { - return VersionKind.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.Version.getDescriptor().getEnumTypes().get(0); - } - - private static final VersionKind[] VALUES = values(); - - public static VersionKind valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private VersionKind(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.Version.VersionKind) - } - - public static final int EPOCH_FIELD_NUMBER = 1; - private int epoch_ = 0; - /** - *
-   * Used to correct mistakes in the version numbering scheme.
-   * 
- * - * int32 epoch = 1; - * @return The epoch. - */ - @java.lang.Override - public int getEpoch() { - return epoch_; - } - - public static final int NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * Required only when version kind is NORMAL. The main part of the version
-   * name.
-   * 
- * - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required only when version kind is NORMAL. The main part of the version
-   * name.
-   * 
- * - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REVISION_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object revision_ = ""; - /** - *
-   * The iteration of the package build from the above version.
-   * 
- * - * string revision = 3; - * @return The revision. - */ - @java.lang.Override - public java.lang.String getRevision() { - java.lang.Object ref = revision_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revision_ = s; - return s; - } - } - /** - *
-   * The iteration of the package build from the above version.
-   * 
- * - * string revision = 3; - * @return The bytes for revision. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRevisionBytes() { - java.lang.Object ref = revision_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revision_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INCLUSIVE_FIELD_NUMBER = 6; - private boolean inclusive_ = false; - /** - *
-   * Whether this version is specifying part of an inclusive range. Grafeas
-   * does not have the capability to specify version ranges; instead we have
-   * fields that specify start version and end versions. At times this is
-   * insufficient - we also need to specify whether the version is included in
-   * the range or is excluded from the range. This boolean is expected to be set
-   * to true when the version is included in a range.
-   * 
- * - * bool inclusive = 6; - * @return The inclusive. - */ - @java.lang.Override - public boolean getInclusive() { - return inclusive_; - } - - public static final int KIND_FIELD_NUMBER = 4; - private int kind_ = 0; - /** - *
-   * Required. Distinguishes between sentinel MIN/MAX versions and normal
-   * versions.
-   * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-   * Required. Distinguishes between sentinel MIN/MAX versions and normal
-   * versions.
-   * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @return The kind. - */ - @java.lang.Override public io.grafeas.v1.Version.VersionKind getKind() { - io.grafeas.v1.Version.VersionKind result = io.grafeas.v1.Version.VersionKind.forNumber(kind_); - return result == null ? io.grafeas.v1.Version.VersionKind.UNRECOGNIZED : result; - } - - public static final int FULL_NAME_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object fullName_ = ""; - /** - *
-   * Human readable version string. This string is of the form
-   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-   * 
- * - * string full_name = 5; - * @return The fullName. - */ - @java.lang.Override - public java.lang.String getFullName() { - java.lang.Object ref = fullName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullName_ = s; - return s; - } - } - /** - *
-   * Human readable version string. This string is of the form
-   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-   * 
- * - * string full_name = 5; - * @return The bytes for fullName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFullNameBytes() { - java.lang.Object ref = fullName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (epoch_ != 0) { - output.writeInt32(1, epoch_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, revision_); - } - if (kind_ != io.grafeas.v1.Version.VersionKind.VERSION_KIND_UNSPECIFIED.getNumber()) { - output.writeEnum(4, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fullName_); - } - if (inclusive_ != false) { - output.writeBool(6, inclusive_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (epoch_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, epoch_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, revision_); - } - if (kind_ != io.grafeas.v1.Version.VersionKind.VERSION_KIND_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, fullName_); - } - if (inclusive_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, inclusive_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Version)) { - return super.equals(obj); - } - io.grafeas.v1.Version other = (io.grafeas.v1.Version) obj; - - if (getEpoch() - != other.getEpoch()) return false; - if (!getName() - .equals(other.getName())) return false; - if (!getRevision() - .equals(other.getRevision())) return false; - if (getInclusive() - != other.getInclusive()) return false; - if (kind_ != other.kind_) return false; - if (!getFullName() - .equals(other.getFullName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + EPOCH_FIELD_NUMBER; - hash = (53 * hash) + getEpoch(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + REVISION_FIELD_NUMBER; - hash = (53 * hash) + getRevision().hashCode(); - hash = (37 * hash) + INCLUSIVE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getInclusive()); - hash = (37 * hash) + KIND_FIELD_NUMBER; - hash = (53 * hash) + kind_; - hash = (37 * hash) + FULL_NAME_FIELD_NUMBER; - hash = (53 * hash) + getFullName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Version parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Version parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Version parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Version parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Version parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Version parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Version parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Version parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Version parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Version parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Version parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Version parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Version prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Version contains structured information about the version of a package.
-   * 
- * - * Protobuf type {@code grafeas.v1.Version} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Version) - io.grafeas.v1.VersionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Version.class, io.grafeas.v1.Version.Builder.class); - } - - // Construct using io.grafeas.v1.Version.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - epoch_ = 0; - name_ = ""; - revision_ = ""; - inclusive_ = false; - kind_ = 0; - fullName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Version getDefaultInstanceForType() { - return io.grafeas.v1.Version.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Version build() { - io.grafeas.v1.Version result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Version buildPartial() { - io.grafeas.v1.Version result = new io.grafeas.v1.Version(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Version result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.epoch_ = epoch_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.revision_ = revision_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.inclusive_ = inclusive_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.kind_ = kind_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.fullName_ = fullName_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Version) { - return mergeFrom((io.grafeas.v1.Version)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Version other) { - if (other == io.grafeas.v1.Version.getDefaultInstance()) return this; - if (other.getEpoch() != 0) { - setEpoch(other.getEpoch()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getRevision().isEmpty()) { - revision_ = other.revision_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.getInclusive() != false) { - setInclusive(other.getInclusive()); - } - if (other.kind_ != 0) { - setKindValue(other.getKindValue()); - } - if (!other.getFullName().isEmpty()) { - fullName_ = other.fullName_; - bitField0_ |= 0x00000020; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - epoch_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - revision_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: { - kind_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 32 - case 42: { - fullName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 42 - case 48: { - inclusive_ = input.readBool(); - bitField0_ |= 0x00000008; - break; - } // case 48 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int epoch_ ; - /** - *
-     * Used to correct mistakes in the version numbering scheme.
-     * 
- * - * int32 epoch = 1; - * @return The epoch. - */ - @java.lang.Override - public int getEpoch() { - return epoch_; - } - /** - *
-     * Used to correct mistakes in the version numbering scheme.
-     * 
- * - * int32 epoch = 1; - * @param value The epoch to set. - * @return This builder for chaining. - */ - public Builder setEpoch(int value) { - - epoch_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Used to correct mistakes in the version numbering scheme.
-     * 
- * - * int32 epoch = 1; - * @return This builder for chaining. - */ - public Builder clearEpoch() { - bitField0_ = (bitField0_ & ~0x00000001); - epoch_ = 0; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required only when version kind is NORMAL. The main part of the version
-     * name.
-     * 
- * - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required only when version kind is NORMAL. The main part of the version
-     * name.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required only when version kind is NORMAL. The main part of the version
-     * name.
-     * 
- * - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required only when version kind is NORMAL. The main part of the version
-     * name.
-     * 
- * - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Required only when version kind is NORMAL. The main part of the version
-     * name.
-     * 
- * - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object revision_ = ""; - /** - *
-     * The iteration of the package build from the above version.
-     * 
- * - * string revision = 3; - * @return The revision. - */ - public java.lang.String getRevision() { - java.lang.Object ref = revision_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revision_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The iteration of the package build from the above version.
-     * 
- * - * string revision = 3; - * @return The bytes for revision. - */ - public com.google.protobuf.ByteString - getRevisionBytes() { - java.lang.Object ref = revision_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revision_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The iteration of the package build from the above version.
-     * 
- * - * string revision = 3; - * @param value The revision to set. - * @return This builder for chaining. - */ - public Builder setRevision( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - revision_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The iteration of the package build from the above version.
-     * 
- * - * string revision = 3; - * @return This builder for chaining. - */ - public Builder clearRevision() { - revision_ = getDefaultInstance().getRevision(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The iteration of the package build from the above version.
-     * 
- * - * string revision = 3; - * @param value The bytes for revision to set. - * @return This builder for chaining. - */ - public Builder setRevisionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - revision_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private boolean inclusive_ ; - /** - *
-     * Whether this version is specifying part of an inclusive range. Grafeas
-     * does not have the capability to specify version ranges; instead we have
-     * fields that specify start version and end versions. At times this is
-     * insufficient - we also need to specify whether the version is included in
-     * the range or is excluded from the range. This boolean is expected to be set
-     * to true when the version is included in a range.
-     * 
- * - * bool inclusive = 6; - * @return The inclusive. - */ - @java.lang.Override - public boolean getInclusive() { - return inclusive_; - } - /** - *
-     * Whether this version is specifying part of an inclusive range. Grafeas
-     * does not have the capability to specify version ranges; instead we have
-     * fields that specify start version and end versions. At times this is
-     * insufficient - we also need to specify whether the version is included in
-     * the range or is excluded from the range. This boolean is expected to be set
-     * to true when the version is included in a range.
-     * 
- * - * bool inclusive = 6; - * @param value The inclusive to set. - * @return This builder for chaining. - */ - public Builder setInclusive(boolean value) { - - inclusive_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Whether this version is specifying part of an inclusive range. Grafeas
-     * does not have the capability to specify version ranges; instead we have
-     * fields that specify start version and end versions. At times this is
-     * insufficient - we also need to specify whether the version is included in
-     * the range or is excluded from the range. This boolean is expected to be set
-     * to true when the version is included in a range.
-     * 
- * - * bool inclusive = 6; - * @return This builder for chaining. - */ - public Builder clearInclusive() { - bitField0_ = (bitField0_ & ~0x00000008); - inclusive_ = false; - onChanged(); - return this; - } - - private int kind_ = 0; - /** - *
-     * Required. Distinguishes between sentinel MIN/MAX versions and normal
-     * versions.
-     * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-     * Required. Distinguishes between sentinel MIN/MAX versions and normal
-     * versions.
-     * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @param value The enum numeric value on the wire for kind to set. - * @return This builder for chaining. - */ - public Builder setKindValue(int value) { - kind_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Required. Distinguishes between sentinel MIN/MAX versions and normal
-     * versions.
-     * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @return The kind. - */ - @java.lang.Override - public io.grafeas.v1.Version.VersionKind getKind() { - io.grafeas.v1.Version.VersionKind result = io.grafeas.v1.Version.VersionKind.forNumber(kind_); - return result == null ? io.grafeas.v1.Version.VersionKind.UNRECOGNIZED : result; - } - /** - *
-     * Required. Distinguishes between sentinel MIN/MAX versions and normal
-     * versions.
-     * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @param value The kind to set. - * @return This builder for chaining. - */ - public Builder setKind(io.grafeas.v1.Version.VersionKind value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - kind_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Required. Distinguishes between sentinel MIN/MAX versions and normal
-     * versions.
-     * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @return This builder for chaining. - */ - public Builder clearKind() { - bitField0_ = (bitField0_ & ~0x00000010); - kind_ = 0; - onChanged(); - return this; - } - - private java.lang.Object fullName_ = ""; - /** - *
-     * Human readable version string. This string is of the form
-     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-     * 
- * - * string full_name = 5; - * @return The fullName. - */ - public java.lang.String getFullName() { - java.lang.Object ref = fullName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Human readable version string. This string is of the form
-     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-     * 
- * - * string full_name = 5; - * @return The bytes for fullName. - */ - public com.google.protobuf.ByteString - getFullNameBytes() { - java.lang.Object ref = fullName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Human readable version string. This string is of the form
-     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-     * 
- * - * string full_name = 5; - * @param value The fullName to set. - * @return This builder for chaining. - */ - public Builder setFullName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fullName_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Human readable version string. This string is of the form
-     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-     * 
- * - * string full_name = 5; - * @return This builder for chaining. - */ - public Builder clearFullName() { - fullName_ = getDefaultInstance().getFullName(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * Human readable version string. This string is of the form
-     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-     * 
- * - * string full_name = 5; - * @param value The bytes for fullName to set. - * @return This builder for chaining. - */ - public Builder setFullNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fullName_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Version) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Version) - private static final io.grafeas.v1.Version DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Version(); - } - - public static io.grafeas.v1.Version getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Version parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Version getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java deleted file mode 100644 index 07895ef1f299..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java +++ /dev/null @@ -1,119 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -public interface VersionOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Version) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Used to correct mistakes in the version numbering scheme.
-   * 
- * - * int32 epoch = 1; - * @return The epoch. - */ - int getEpoch(); - - /** - *
-   * Required only when version kind is NORMAL. The main part of the version
-   * name.
-   * 
- * - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required only when version kind is NORMAL. The main part of the version
-   * name.
-   * 
- * - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The iteration of the package build from the above version.
-   * 
- * - * string revision = 3; - * @return The revision. - */ - java.lang.String getRevision(); - /** - *
-   * The iteration of the package build from the above version.
-   * 
- * - * string revision = 3; - * @return The bytes for revision. - */ - com.google.protobuf.ByteString - getRevisionBytes(); - - /** - *
-   * Whether this version is specifying part of an inclusive range. Grafeas
-   * does not have the capability to specify version ranges; instead we have
-   * fields that specify start version and end versions. At times this is
-   * insufficient - we also need to specify whether the version is included in
-   * the range or is excluded from the range. This boolean is expected to be set
-   * to true when the version is included in a range.
-   * 
- * - * bool inclusive = 6; - * @return The inclusive. - */ - boolean getInclusive(); - - /** - *
-   * Required. Distinguishes between sentinel MIN/MAX versions and normal
-   * versions.
-   * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - int getKindValue(); - /** - *
-   * Required. Distinguishes between sentinel MIN/MAX versions and normal
-   * versions.
-   * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @return The kind. - */ - io.grafeas.v1.Version.VersionKind getKind(); - - /** - *
-   * Human readable version string. This string is of the form
-   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-   * 
- * - * string full_name = 5; - * @return The fullName. - */ - java.lang.String getFullName(); - /** - *
-   * Human readable version string. This string is of the form
-   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-   * 
- * - * string full_name = 5; - * @return The bytes for fullName. - */ - com.google.protobuf.ByteString - getFullNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java deleted file mode 100644 index c98eefd77fd0..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java +++ /dev/null @@ -1,171 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/vulnerability.proto - -package io.grafeas.v1; - -public final class Vulnerability { - private Vulnerability() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\036grafeas/v1/vulnerability.proto\022\ngrafea" + - "s.v1\032\037google/api/field_behavior.proto\032\037g" + - "oogle/protobuf/timestamp.proto\032\027grafeas/" + - "v1/common.proto\032\025grafeas/v1/cvss.proto\032\030" + - "grafeas/v1/package.proto\032\031grafeas/v1/sev" + - "erity.proto\"\354\007\n\021VulnerabilityNote\022\022\n\ncvs" + - "s_score\030\001 \001(\002\022&\n\010severity\030\002 \001(\0162\024.grafea" + - "s.v1.Severity\0225\n\007details\030\003 \003(\0132$.grafeas" + - ".v1.VulnerabilityNote.Detail\022#\n\007cvss_v3\030" + - "\004 \001(\0132\022.grafeas.v1.CVSSv3\022D\n\017windows_det" + - "ails\030\005 \003(\0132+.grafeas.v1.VulnerabilityNot" + - "e.WindowsDetail\0226\n\022source_update_time\030\006 " + - "\001(\0132\032.google.protobuf.Timestamp\022-\n\014cvss_" + - "version\030\007 \001(\0162\027.grafeas.v1.CVSSVersion\022!" + - "\n\007cvss_v2\030\010 \001(\0132\020.grafeas.v1.CVSS\032\255\003\n\006De" + - "tail\022\025\n\rseverity_name\030\001 \001(\t\022\023\n\013descripti" + - "on\030\002 \001(\t\022\024\n\014package_type\030\003 \001(\t\022\030\n\020affect" + - "ed_cpe_uri\030\004 \001(\t\022\030\n\020affected_package\030\005 \001" + - "(\t\0223\n\026affected_version_start\030\006 \001(\0132\023.gra" + - "feas.v1.Version\0221\n\024affected_version_end\030" + - "\007 \001(\0132\023.grafeas.v1.Version\022\025\n\rfixed_cpe_" + - "uri\030\010 \001(\t\022\025\n\rfixed_package\030\t \001(\t\022*\n\rfixe" + - "d_version\030\n \001(\0132\023.grafeas.v1.Version\022\023\n\013" + - "is_obsolete\030\013 \001(\010\0226\n\022source_update_time\030" + - "\014 \001(\0132\032.google.protobuf.Timestamp\022\016\n\006sou" + - "rce\030\r \001(\t\022\016\n\006vendor\030\016 \001(\t\032\276\001\n\rWindowsDet" + - "ail\022\017\n\007cpe_uri\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\023\n\013de" + - "scription\030\003 \001(\t\022M\n\nfixing_kbs\030\004 \003(\01329.gr" + - "afeas.v1.VulnerabilityNote.WindowsDetail" + - ".KnowledgeBase\032*\n\rKnowledgeBase\022\014\n\004name\030" + - "\001 \001(\t\022\013\n\003url\030\002 \001(\t\"\257\006\n\027VulnerabilityOccu" + - "rrence\022\014\n\004type\030\001 \001(\t\022&\n\010severity\030\002 \001(\0162\024" + - ".grafeas.v1.Severity\022\022\n\ncvss_score\030\003 \001(\002" + - "\022 \n\006cvssv3\030\n \001(\0132\020.grafeas.v1.CVSS\022G\n\rpa" + - "ckage_issue\030\004 \003(\01320.grafeas.v1.Vulnerabi" + - "lityOccurrence.PackageIssue\022\031\n\021short_des" + - "cription\030\005 \001(\t\022\030\n\020long_description\030\006 \001(\t" + - "\022,\n\014related_urls\030\007 \003(\0132\026.grafeas.v1.Rela" + - "tedUrl\0220\n\022effective_severity\030\010 \001(\0162\024.gra" + - "feas.v1.Severity\022\025\n\rfix_available\030\t \001(\010\022" + - "-\n\014cvss_version\030\013 \001(\0162\027.grafeas.v1.CVSSV" + - "ersion\022!\n\007cvss_v2\030\014 \001(\0132\020.grafeas.v1.CVS" + - "S\032\340\002\n\014PackageIssue\022\030\n\020affected_cpe_uri\030\001" + - " \001(\t\022\030\n\020affected_package\030\002 \001(\t\022-\n\020affect" + - "ed_version\030\003 \001(\0132\023.grafeas.v1.Version\022\025\n" + - "\rfixed_cpe_uri\030\004 \001(\t\022\025\n\rfixed_package\030\005 " + - "\001(\t\022*\n\rfixed_version\030\006 \001(\0132\023.grafeas.v1." + - "Version\022\025\n\rfix_available\030\007 \001(\010\022\024\n\014packag" + - "e_type\030\010 \001(\t\0225\n\022effective_severity\030\t \001(\016" + - "2\024.grafeas.v1.SeverityB\003\340A\003\022/\n\rfile_loca" + - "tion\030\n \003(\0132\030.grafeas.v1.FileLocationBQ\n\r" + - "io.grafeas.v1P\001Z8google.golang.org/genpr" + - "oto/googleapis/grafeas/v1;grafeas\242\002\003GRAb" + - "\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - io.grafeas.v1.Common.getDescriptor(), - io.grafeas.v1.CVSSProto.getDescriptor(), - io.grafeas.v1.Package.getDescriptor(), - io.grafeas.v1.SeverityOuterClass.getDescriptor(), - }); - internal_static_grafeas_v1_VulnerabilityNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityNote_descriptor, - new java.lang.String[] { "CvssScore", "Severity", "Details", "CvssV3", "WindowsDetails", "SourceUpdateTime", "CvssVersion", "CvssV2", }); - internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor = - internal_static_grafeas_v1_VulnerabilityNote_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor, - new java.lang.String[] { "SeverityName", "Description", "PackageType", "AffectedCpeUri", "AffectedPackage", "AffectedVersionStart", "AffectedVersionEnd", "FixedCpeUri", "FixedPackage", "FixedVersion", "IsObsolete", "SourceUpdateTime", "Source", "Vendor", }); - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor = - internal_static_grafeas_v1_VulnerabilityNote_descriptor.getNestedTypes().get(1); - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor, - new java.lang.String[] { "CpeUri", "Name", "Description", "FixingKbs", }); - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor = - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor, - new java.lang.String[] { "Name", "Url", }); - internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor, - new java.lang.String[] { "Type", "Severity", "CvssScore", "Cvssv3", "PackageIssue", "ShortDescription", "LongDescription", "RelatedUrls", "EffectiveSeverity", "FixAvailable", "CvssVersion", "CvssV2", }); - internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor = - internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor, - new java.lang.String[] { "AffectedCpeUri", "AffectedPackage", "AffectedVersion", "FixedCpeUri", "FixedPackage", "FixedVersion", "FixAvailable", "PackageType", "EffectiveSeverity", "FileLocation", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - io.grafeas.v1.Common.getDescriptor(); - io.grafeas.v1.CVSSProto.getDescriptor(); - io.grafeas.v1.Package.getDescriptor(); - io.grafeas.v1.SeverityOuterClass.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java deleted file mode 100644 index 30c6784762cc..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java +++ /dev/null @@ -1,8231 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/vulnerability.proto - -package io.grafeas.v1; - -/** - *
- * A security vulnerability that can be found in resources.
- * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityNote} - */ -public final class VulnerabilityNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote) - VulnerabilityNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use VulnerabilityNote.newBuilder() to construct. - private VulnerabilityNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private VulnerabilityNote() { - severity_ = 0; - details_ = java.util.Collections.emptyList(); - windowsDetails_ = java.util.Collections.emptyList(); - cvssVersion_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new VulnerabilityNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.class, io.grafeas.v1.VulnerabilityNote.Builder.class); - } - - public interface DetailOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote.Detail) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The distro assigned severity of this vulnerability.
-     * 
- * - * string severity_name = 1; - * @return The severityName. - */ - java.lang.String getSeverityName(); - /** - *
-     * The distro assigned severity of this vulnerability.
-     * 
- * - * string severity_name = 1; - * @return The bytes for severityName. - */ - com.google.protobuf.ByteString - getSeverityNameBytes(); - - /** - *
-     * A vendor-specific description of this vulnerability.
-     * 
- * - * string description = 2; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-     * A vendor-specific description of this vulnerability.
-     * 
- * - * string description = 2; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3; - * @return The packageType. - */ - java.lang.String getPackageType(); - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3; - * @return The bytes for packageType. - */ - com.google.protobuf.ByteString - getPackageTypeBytes(); - - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string affected_cpe_uri = 4; - * @return The affectedCpeUri. - */ - java.lang.String getAffectedCpeUri(); - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string affected_cpe_uri = 4; - * @return The bytes for affectedCpeUri. - */ - com.google.protobuf.ByteString - getAffectedCpeUriBytes(); - - /** - *
-     * Required. The package this vulnerability affects.
-     * 
- * - * string affected_package = 5; - * @return The affectedPackage. - */ - java.lang.String getAffectedPackage(); - /** - *
-     * Required. The package this vulnerability affects.
-     * 
- * - * string affected_package = 5; - * @return The bytes for affectedPackage. - */ - com.google.protobuf.ByteString - getAffectedPackageBytes(); - - /** - *
-     * The version number at the start of an interval in which this
-     * vulnerability exists. A vulnerability can affect a package between
-     * version numbers that are disjoint sets of intervals (example:
-     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-     * represented in its own Detail. If a specific affected version is provided
-     * by a vulnerability database, affected_version_start and
-     * affected_version_end will be the same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_start = 6; - * @return Whether the affectedVersionStart field is set. - */ - boolean hasAffectedVersionStart(); - /** - *
-     * The version number at the start of an interval in which this
-     * vulnerability exists. A vulnerability can affect a package between
-     * version numbers that are disjoint sets of intervals (example:
-     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-     * represented in its own Detail. If a specific affected version is provided
-     * by a vulnerability database, affected_version_start and
-     * affected_version_end will be the same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_start = 6; - * @return The affectedVersionStart. - */ - io.grafeas.v1.Version getAffectedVersionStart(); - /** - *
-     * The version number at the start of an interval in which this
-     * vulnerability exists. A vulnerability can affect a package between
-     * version numbers that are disjoint sets of intervals (example:
-     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-     * represented in its own Detail. If a specific affected version is provided
-     * by a vulnerability database, affected_version_start and
-     * affected_version_end will be the same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - io.grafeas.v1.VersionOrBuilder getAffectedVersionStartOrBuilder(); - - /** - *
-     * The version number at the end of an interval in which this vulnerability
-     * exists. A vulnerability can affect a package between version numbers
-     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-     * own Detail. If a specific affected version is provided by a vulnerability
-     * database, affected_version_start and affected_version_end will be the
-     * same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_end = 7; - * @return Whether the affectedVersionEnd field is set. - */ - boolean hasAffectedVersionEnd(); - /** - *
-     * The version number at the end of an interval in which this vulnerability
-     * exists. A vulnerability can affect a package between version numbers
-     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-     * own Detail. If a specific affected version is provided by a vulnerability
-     * database, affected_version_start and affected_version_end will be the
-     * same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_end = 7; - * @return The affectedVersionEnd. - */ - io.grafeas.v1.Version getAffectedVersionEnd(); - /** - *
-     * The version number at the end of an interval in which this vulnerability
-     * exists. A vulnerability can affect a package between version numbers
-     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-     * own Detail. If a specific affected version is provided by a vulnerability
-     * database, affected_version_start and affected_version_end will be the
-     * same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - io.grafeas.v1.VersionOrBuilder getAffectedVersionEndOrBuilder(); - - /** - *
-     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-     * to update to that contains a fix for this vulnerability. It is possible
-     * for this to be different from the affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 8; - * @return The fixedCpeUri. - */ - java.lang.String getFixedCpeUri(); - /** - *
-     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-     * to update to that contains a fix for this vulnerability. It is possible
-     * for this to be different from the affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 8; - * @return The bytes for fixedCpeUri. - */ - com.google.protobuf.ByteString - getFixedCpeUriBytes(); - - /** - *
-     * The distro recommended package to update to that contains a fix for this
-     * vulnerability. It is possible for this to be different from the
-     * affected_package.
-     * 
- * - * string fixed_package = 9; - * @return The fixedPackage. - */ - java.lang.String getFixedPackage(); - /** - *
-     * The distro recommended package to update to that contains a fix for this
-     * vulnerability. It is possible for this to be different from the
-     * affected_package.
-     * 
- * - * string fixed_package = 9; - * @return The bytes for fixedPackage. - */ - com.google.protobuf.ByteString - getFixedPackageBytes(); - - /** - *
-     * The distro recommended version to update to that contains a
-     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-     * such version is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 10; - * @return Whether the fixedVersion field is set. - */ - boolean hasFixedVersion(); - /** - *
-     * The distro recommended version to update to that contains a
-     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-     * such version is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 10; - * @return The fixedVersion. - */ - io.grafeas.v1.Version getFixedVersion(); - /** - *
-     * The distro recommended version to update to that contains a
-     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-     * such version is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder(); - - /** - *
-     * Whether this detail is obsolete. Occurrences are expected not to point to
-     * obsolete details.
-     * 
- * - * bool is_obsolete = 11; - * @return The isObsolete. - */ - boolean getIsObsolete(); - - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - * @return Whether the sourceUpdateTime field is set. - */ - boolean hasSourceUpdateTime(); - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - * @return The sourceUpdateTime. - */ - com.google.protobuf.Timestamp getSourceUpdateTime(); - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder(); - - /** - *
-     * The source from which the information in this Detail was obtained.
-     * 
- * - * string source = 13; - * @return The source. - */ - java.lang.String getSource(); - /** - *
-     * The source from which the information in this Detail was obtained.
-     * 
- * - * string source = 13; - * @return The bytes for source. - */ - com.google.protobuf.ByteString - getSourceBytes(); - - /** - *
-     * The name of the vendor of the product.
-     * 
- * - * string vendor = 14; - * @return The vendor. - */ - java.lang.String getVendor(); - /** - *
-     * The name of the vendor of the product.
-     * 
- * - * string vendor = 14; - * @return The bytes for vendor. - */ - com.google.protobuf.ByteString - getVendorBytes(); - } - /** - *
-   * A detail for a distro and package affected by this vulnerability and its
-   * associated fix (if one is available).
-   * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityNote.Detail} - */ - public static final class Detail extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote.Detail) - DetailOrBuilder { - private static final long serialVersionUID = 0L; - // Use Detail.newBuilder() to construct. - private Detail(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Detail() { - severityName_ = ""; - description_ = ""; - packageType_ = ""; - affectedCpeUri_ = ""; - affectedPackage_ = ""; - fixedCpeUri_ = ""; - fixedPackage_ = ""; - source_ = ""; - vendor_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Detail(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.Detail.class, io.grafeas.v1.VulnerabilityNote.Detail.Builder.class); - } - - public static final int SEVERITY_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object severityName_ = ""; - /** - *
-     * The distro assigned severity of this vulnerability.
-     * 
- * - * string severity_name = 1; - * @return The severityName. - */ - @java.lang.Override - public java.lang.String getSeverityName() { - java.lang.Object ref = severityName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - severityName_ = s; - return s; - } - } - /** - *
-     * The distro assigned severity of this vulnerability.
-     * 
- * - * string severity_name = 1; - * @return The bytes for severityName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSeverityNameBytes() { - java.lang.Object ref = severityName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - severityName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-     * A vendor-specific description of this vulnerability.
-     * 
- * - * string description = 2; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-     * A vendor-specific description of this vulnerability.
-     * 
- * - * string description = 2; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PACKAGE_TYPE_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object packageType_ = ""; - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3; - * @return The packageType. - */ - @java.lang.Override - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3; - * @return The bytes for packageType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AFFECTED_CPE_URI_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object affectedCpeUri_ = ""; - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string affected_cpe_uri = 4; - * @return The affectedCpeUri. - */ - @java.lang.Override - public java.lang.String getAffectedCpeUri() { - java.lang.Object ref = affectedCpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedCpeUri_ = s; - return s; - } - } - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string affected_cpe_uri = 4; - * @return The bytes for affectedCpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAffectedCpeUriBytes() { - java.lang.Object ref = affectedCpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AFFECTED_PACKAGE_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object affectedPackage_ = ""; - /** - *
-     * Required. The package this vulnerability affects.
-     * 
- * - * string affected_package = 5; - * @return The affectedPackage. - */ - @java.lang.Override - public java.lang.String getAffectedPackage() { - java.lang.Object ref = affectedPackage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedPackage_ = s; - return s; - } - } - /** - *
-     * Required. The package this vulnerability affects.
-     * 
- * - * string affected_package = 5; - * @return The bytes for affectedPackage. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAffectedPackageBytes() { - java.lang.Object ref = affectedPackage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AFFECTED_VERSION_START_FIELD_NUMBER = 6; - private io.grafeas.v1.Version affectedVersionStart_; - /** - *
-     * The version number at the start of an interval in which this
-     * vulnerability exists. A vulnerability can affect a package between
-     * version numbers that are disjoint sets of intervals (example:
-     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-     * represented in its own Detail. If a specific affected version is provided
-     * by a vulnerability database, affected_version_start and
-     * affected_version_end will be the same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_start = 6; - * @return Whether the affectedVersionStart field is set. - */ - @java.lang.Override - public boolean hasAffectedVersionStart() { - return affectedVersionStart_ != null; - } - /** - *
-     * The version number at the start of an interval in which this
-     * vulnerability exists. A vulnerability can affect a package between
-     * version numbers that are disjoint sets of intervals (example:
-     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-     * represented in its own Detail. If a specific affected version is provided
-     * by a vulnerability database, affected_version_start and
-     * affected_version_end will be the same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_start = 6; - * @return The affectedVersionStart. - */ - @java.lang.Override - public io.grafeas.v1.Version getAffectedVersionStart() { - return affectedVersionStart_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; - } - /** - *
-     * The version number at the start of an interval in which this
-     * vulnerability exists. A vulnerability can affect a package between
-     * version numbers that are disjoint sets of intervals (example:
-     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-     * represented in its own Detail. If a specific affected version is provided
-     * by a vulnerability database, affected_version_start and
-     * affected_version_end will be the same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getAffectedVersionStartOrBuilder() { - return affectedVersionStart_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; - } - - public static final int AFFECTED_VERSION_END_FIELD_NUMBER = 7; - private io.grafeas.v1.Version affectedVersionEnd_; - /** - *
-     * The version number at the end of an interval in which this vulnerability
-     * exists. A vulnerability can affect a package between version numbers
-     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-     * own Detail. If a specific affected version is provided by a vulnerability
-     * database, affected_version_start and affected_version_end will be the
-     * same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_end = 7; - * @return Whether the affectedVersionEnd field is set. - */ - @java.lang.Override - public boolean hasAffectedVersionEnd() { - return affectedVersionEnd_ != null; - } - /** - *
-     * The version number at the end of an interval in which this vulnerability
-     * exists. A vulnerability can affect a package between version numbers
-     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-     * own Detail. If a specific affected version is provided by a vulnerability
-     * database, affected_version_start and affected_version_end will be the
-     * same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_end = 7; - * @return The affectedVersionEnd. - */ - @java.lang.Override - public io.grafeas.v1.Version getAffectedVersionEnd() { - return affectedVersionEnd_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; - } - /** - *
-     * The version number at the end of an interval in which this vulnerability
-     * exists. A vulnerability can affect a package between version numbers
-     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-     * own Detail. If a specific affected version is provided by a vulnerability
-     * database, affected_version_start and affected_version_end will be the
-     * same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getAffectedVersionEndOrBuilder() { - return affectedVersionEnd_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; - } - - public static final int FIXED_CPE_URI_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private volatile java.lang.Object fixedCpeUri_ = ""; - /** - *
-     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-     * to update to that contains a fix for this vulnerability. It is possible
-     * for this to be different from the affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 8; - * @return The fixedCpeUri. - */ - @java.lang.Override - public java.lang.String getFixedCpeUri() { - java.lang.Object ref = fixedCpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedCpeUri_ = s; - return s; - } - } - /** - *
-     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-     * to update to that contains a fix for this vulnerability. It is possible
-     * for this to be different from the affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 8; - * @return The bytes for fixedCpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFixedCpeUriBytes() { - java.lang.Object ref = fixedCpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FIXED_PACKAGE_FIELD_NUMBER = 9; - @SuppressWarnings("serial") - private volatile java.lang.Object fixedPackage_ = ""; - /** - *
-     * The distro recommended package to update to that contains a fix for this
-     * vulnerability. It is possible for this to be different from the
-     * affected_package.
-     * 
- * - * string fixed_package = 9; - * @return The fixedPackage. - */ - @java.lang.Override - public java.lang.String getFixedPackage() { - java.lang.Object ref = fixedPackage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedPackage_ = s; - return s; - } - } - /** - *
-     * The distro recommended package to update to that contains a fix for this
-     * vulnerability. It is possible for this to be different from the
-     * affected_package.
-     * 
- * - * string fixed_package = 9; - * @return The bytes for fixedPackage. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFixedPackageBytes() { - java.lang.Object ref = fixedPackage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FIXED_VERSION_FIELD_NUMBER = 10; - private io.grafeas.v1.Version fixedVersion_; - /** - *
-     * The distro recommended version to update to that contains a
-     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-     * such version is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 10; - * @return Whether the fixedVersion field is set. - */ - @java.lang.Override - public boolean hasFixedVersion() { - return fixedVersion_ != null; - } - /** - *
-     * The distro recommended version to update to that contains a
-     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-     * such version is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 10; - * @return The fixedVersion. - */ - @java.lang.Override - public io.grafeas.v1.Version getFixedVersion() { - return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } - /** - *
-     * The distro recommended version to update to that contains a
-     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-     * such version is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { - return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } - - public static final int IS_OBSOLETE_FIELD_NUMBER = 11; - private boolean isObsolete_ = false; - /** - *
-     * Whether this detail is obsolete. Occurrences are expected not to point to
-     * obsolete details.
-     * 
- * - * bool is_obsolete = 11; - * @return The isObsolete. - */ - @java.lang.Override - public boolean getIsObsolete() { - return isObsolete_; - } - - public static final int SOURCE_UPDATE_TIME_FIELD_NUMBER = 12; - private com.google.protobuf.Timestamp sourceUpdateTime_; - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - * @return Whether the sourceUpdateTime field is set. - */ - @java.lang.Override - public boolean hasSourceUpdateTime() { - return sourceUpdateTime_ != null; - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - * @return The sourceUpdateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getSourceUpdateTime() { - return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { - return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } - - public static final int SOURCE_FIELD_NUMBER = 13; - @SuppressWarnings("serial") - private volatile java.lang.Object source_ = ""; - /** - *
-     * The source from which the information in this Detail was obtained.
-     * 
- * - * string source = 13; - * @return The source. - */ - @java.lang.Override - public java.lang.String getSource() { - java.lang.Object ref = source_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - source_ = s; - return s; - } - } - /** - *
-     * The source from which the information in this Detail was obtained.
-     * 
- * - * string source = 13; - * @return The bytes for source. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VENDOR_FIELD_NUMBER = 14; - @SuppressWarnings("serial") - private volatile java.lang.Object vendor_ = ""; - /** - *
-     * The name of the vendor of the product.
-     * 
- * - * string vendor = 14; - * @return The vendor. - */ - @java.lang.Override - public java.lang.String getVendor() { - java.lang.Object ref = vendor_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - vendor_ = s; - return s; - } - } - /** - *
-     * The name of the vendor of the product.
-     * 
- * - * string vendor = 14; - * @return The bytes for vendor. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVendorBytes() { - java.lang.Object ref = vendor_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - vendor_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severityName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, severityName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, packageType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, affectedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, affectedPackage_); - } - if (affectedVersionStart_ != null) { - output.writeMessage(6, getAffectedVersionStart()); - } - if (affectedVersionEnd_ != null) { - output.writeMessage(7, getAffectedVersionEnd()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, fixedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, fixedPackage_); - } - if (fixedVersion_ != null) { - output.writeMessage(10, getFixedVersion()); - } - if (isObsolete_ != false) { - output.writeBool(11, isObsolete_); - } - if (sourceUpdateTime_ != null) { - output.writeMessage(12, getSourceUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, source_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vendor_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 14, vendor_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severityName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, severityName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, packageType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, affectedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, affectedPackage_); - } - if (affectedVersionStart_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getAffectedVersionStart()); - } - if (affectedVersionEnd_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getAffectedVersionEnd()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, fixedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, fixedPackage_); - } - if (fixedVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getFixedVersion()); - } - if (isObsolete_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(11, isObsolete_); - } - if (sourceUpdateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getSourceUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, source_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vendor_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, vendor_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.VulnerabilityNote.Detail)) { - return super.equals(obj); - } - io.grafeas.v1.VulnerabilityNote.Detail other = (io.grafeas.v1.VulnerabilityNote.Detail) obj; - - if (!getSeverityName() - .equals(other.getSeverityName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getPackageType() - .equals(other.getPackageType())) return false; - if (!getAffectedCpeUri() - .equals(other.getAffectedCpeUri())) return false; - if (!getAffectedPackage() - .equals(other.getAffectedPackage())) return false; - if (hasAffectedVersionStart() != other.hasAffectedVersionStart()) return false; - if (hasAffectedVersionStart()) { - if (!getAffectedVersionStart() - .equals(other.getAffectedVersionStart())) return false; - } - if (hasAffectedVersionEnd() != other.hasAffectedVersionEnd()) return false; - if (hasAffectedVersionEnd()) { - if (!getAffectedVersionEnd() - .equals(other.getAffectedVersionEnd())) return false; - } - if (!getFixedCpeUri() - .equals(other.getFixedCpeUri())) return false; - if (!getFixedPackage() - .equals(other.getFixedPackage())) return false; - if (hasFixedVersion() != other.hasFixedVersion()) return false; - if (hasFixedVersion()) { - if (!getFixedVersion() - .equals(other.getFixedVersion())) return false; - } - if (getIsObsolete() - != other.getIsObsolete()) return false; - if (hasSourceUpdateTime() != other.hasSourceUpdateTime()) return false; - if (hasSourceUpdateTime()) { - if (!getSourceUpdateTime() - .equals(other.getSourceUpdateTime())) return false; - } - if (!getSource() - .equals(other.getSource())) return false; - if (!getVendor() - .equals(other.getVendor())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SEVERITY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getSeverityName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getPackageType().hashCode(); - hash = (37 * hash) + AFFECTED_CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getAffectedCpeUri().hashCode(); - hash = (37 * hash) + AFFECTED_PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getAffectedPackage().hashCode(); - if (hasAffectedVersionStart()) { - hash = (37 * hash) + AFFECTED_VERSION_START_FIELD_NUMBER; - hash = (53 * hash) + getAffectedVersionStart().hashCode(); - } - if (hasAffectedVersionEnd()) { - hash = (37 * hash) + AFFECTED_VERSION_END_FIELD_NUMBER; - hash = (53 * hash) + getAffectedVersionEnd().hashCode(); - } - hash = (37 * hash) + FIXED_CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getFixedCpeUri().hashCode(); - hash = (37 * hash) + FIXED_PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getFixedPackage().hashCode(); - if (hasFixedVersion()) { - hash = (37 * hash) + FIXED_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getFixedVersion().hashCode(); - } - hash = (37 * hash) + IS_OBSOLETE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsObsolete()); - if (hasSourceUpdateTime()) { - hash = (37 * hash) + SOURCE_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getSourceUpdateTime().hashCode(); - } - hash = (37 * hash) + SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getSource().hashCode(); - hash = (37 * hash) + VENDOR_FIELD_NUMBER; - hash = (53 * hash) + getVendor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote.Detail prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A detail for a distro and package affected by this vulnerability and its
-     * associated fix (if one is available).
-     * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityNote.Detail} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote.Detail) - io.grafeas.v1.VulnerabilityNote.DetailOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.Detail.class, io.grafeas.v1.VulnerabilityNote.Detail.Builder.class); - } - - // Construct using io.grafeas.v1.VulnerabilityNote.Detail.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - severityName_ = ""; - description_ = ""; - packageType_ = ""; - affectedCpeUri_ = ""; - affectedPackage_ = ""; - affectedVersionStart_ = null; - if (affectedVersionStartBuilder_ != null) { - affectedVersionStartBuilder_.dispose(); - affectedVersionStartBuilder_ = null; - } - affectedVersionEnd_ = null; - if (affectedVersionEndBuilder_ != null) { - affectedVersionEndBuilder_.dispose(); - affectedVersionEndBuilder_ = null; - } - fixedCpeUri_ = ""; - fixedPackage_ = ""; - fixedVersion_ = null; - if (fixedVersionBuilder_ != null) { - fixedVersionBuilder_.dispose(); - fixedVersionBuilder_ = null; - } - isObsolete_ = false; - sourceUpdateTime_ = null; - if (sourceUpdateTimeBuilder_ != null) { - sourceUpdateTimeBuilder_.dispose(); - sourceUpdateTimeBuilder_ = null; - } - source_ = ""; - vendor_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.Detail getDefaultInstanceForType() { - return io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.Detail build() { - io.grafeas.v1.VulnerabilityNote.Detail result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.Detail buildPartial() { - io.grafeas.v1.VulnerabilityNote.Detail result = new io.grafeas.v1.VulnerabilityNote.Detail(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.VulnerabilityNote.Detail result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.severityName_ = severityName_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.packageType_ = packageType_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.affectedCpeUri_ = affectedCpeUri_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.affectedPackage_ = affectedPackage_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.affectedVersionStart_ = affectedVersionStartBuilder_ == null - ? affectedVersionStart_ - : affectedVersionStartBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.affectedVersionEnd_ = affectedVersionEndBuilder_ == null - ? affectedVersionEnd_ - : affectedVersionEndBuilder_.build(); - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.fixedCpeUri_ = fixedCpeUri_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.fixedPackage_ = fixedPackage_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.fixedVersion_ = fixedVersionBuilder_ == null - ? fixedVersion_ - : fixedVersionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.isObsolete_ = isObsolete_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.sourceUpdateTime_ = sourceUpdateTimeBuilder_ == null - ? sourceUpdateTime_ - : sourceUpdateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.source_ = source_; - } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.vendor_ = vendor_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.VulnerabilityNote.Detail) { - return mergeFrom((io.grafeas.v1.VulnerabilityNote.Detail)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote.Detail other) { - if (other == io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance()) return this; - if (!other.getSeverityName().isEmpty()) { - severityName_ = other.severityName_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getPackageType().isEmpty()) { - packageType_ = other.packageType_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getAffectedCpeUri().isEmpty()) { - affectedCpeUri_ = other.affectedCpeUri_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getAffectedPackage().isEmpty()) { - affectedPackage_ = other.affectedPackage_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasAffectedVersionStart()) { - mergeAffectedVersionStart(other.getAffectedVersionStart()); - } - if (other.hasAffectedVersionEnd()) { - mergeAffectedVersionEnd(other.getAffectedVersionEnd()); - } - if (!other.getFixedCpeUri().isEmpty()) { - fixedCpeUri_ = other.fixedCpeUri_; - bitField0_ |= 0x00000080; - onChanged(); - } - if (!other.getFixedPackage().isEmpty()) { - fixedPackage_ = other.fixedPackage_; - bitField0_ |= 0x00000100; - onChanged(); - } - if (other.hasFixedVersion()) { - mergeFixedVersion(other.getFixedVersion()); - } - if (other.getIsObsolete() != false) { - setIsObsolete(other.getIsObsolete()); - } - if (other.hasSourceUpdateTime()) { - mergeSourceUpdateTime(other.getSourceUpdateTime()); - } - if (!other.getSource().isEmpty()) { - source_ = other.source_; - bitField0_ |= 0x00001000; - onChanged(); - } - if (!other.getVendor().isEmpty()) { - vendor_ = other.vendor_; - bitField0_ |= 0x00002000; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - severityName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - packageType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - affectedCpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - affectedPackage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - input.readMessage( - getAffectedVersionStartFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - input.readMessage( - getAffectedVersionEndFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: { - fixedCpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 66 - case 74: { - fixedPackage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - break; - } // case 74 - case 82: { - input.readMessage( - getFixedVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 82 - case 88: { - isObsolete_ = input.readBool(); - bitField0_ |= 0x00000400; - break; - } // case 88 - case 98: { - input.readMessage( - getSourceUpdateTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000800; - break; - } // case 98 - case 106: { - source_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - break; - } // case 106 - case 114: { - vendor_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - break; - } // case 114 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object severityName_ = ""; - /** - *
-       * The distro assigned severity of this vulnerability.
-       * 
- * - * string severity_name = 1; - * @return The severityName. - */ - public java.lang.String getSeverityName() { - java.lang.Object ref = severityName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - severityName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The distro assigned severity of this vulnerability.
-       * 
- * - * string severity_name = 1; - * @return The bytes for severityName. - */ - public com.google.protobuf.ByteString - getSeverityNameBytes() { - java.lang.Object ref = severityName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - severityName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The distro assigned severity of this vulnerability.
-       * 
- * - * string severity_name = 1; - * @param value The severityName to set. - * @return This builder for chaining. - */ - public Builder setSeverityName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - severityName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * The distro assigned severity of this vulnerability.
-       * 
- * - * string severity_name = 1; - * @return This builder for chaining. - */ - public Builder clearSeverityName() { - severityName_ = getDefaultInstance().getSeverityName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * The distro assigned severity of this vulnerability.
-       * 
- * - * string severity_name = 1; - * @param value The bytes for severityName to set. - * @return This builder for chaining. - */ - public Builder setSeverityNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - severityName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-       * A vendor-specific description of this vulnerability.
-       * 
- * - * string description = 2; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * A vendor-specific description of this vulnerability.
-       * 
- * - * string description = 2; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * A vendor-specific description of this vulnerability.
-       * 
- * - * string description = 2; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * A vendor-specific description of this vulnerability.
-       * 
- * - * string description = 2; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-       * A vendor-specific description of this vulnerability.
-       * 
- * - * string description = 2; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object packageType_ = ""; - /** - *
-       * The type of package; whether native or non native (e.g., ruby gems,
-       * node.js packages, etc.).
-       * 
- * - * string package_type = 3; - * @return The packageType. - */ - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The type of package; whether native or non native (e.g., ruby gems,
-       * node.js packages, etc.).
-       * 
- * - * string package_type = 3; - * @return The bytes for packageType. - */ - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The type of package; whether native or non native (e.g., ruby gems,
-       * node.js packages, etc.).
-       * 
- * - * string package_type = 3; - * @param value The packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - packageType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * The type of package; whether native or non native (e.g., ruby gems,
-       * node.js packages, etc.).
-       * 
- * - * string package_type = 3; - * @return This builder for chaining. - */ - public Builder clearPackageType() { - packageType_ = getDefaultInstance().getPackageType(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-       * The type of package; whether native or non native (e.g., ruby gems,
-       * node.js packages, etc.).
-       * 
- * - * string package_type = 3; - * @param value The bytes for packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - packageType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object affectedCpeUri_ = ""; - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string affected_cpe_uri = 4; - * @return The affectedCpeUri. - */ - public java.lang.String getAffectedCpeUri() { - java.lang.Object ref = affectedCpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedCpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string affected_cpe_uri = 4; - * @return The bytes for affectedCpeUri. - */ - public com.google.protobuf.ByteString - getAffectedCpeUriBytes() { - java.lang.Object ref = affectedCpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string affected_cpe_uri = 4; - * @param value The affectedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setAffectedCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - affectedCpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string affected_cpe_uri = 4; - * @return This builder for chaining. - */ - public Builder clearAffectedCpeUri() { - affectedCpeUri_ = getDefaultInstance().getAffectedCpeUri(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string affected_cpe_uri = 4; - * @param value The bytes for affectedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setAffectedCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - affectedCpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object affectedPackage_ = ""; - /** - *
-       * Required. The package this vulnerability affects.
-       * 
- * - * string affected_package = 5; - * @return The affectedPackage. - */ - public java.lang.String getAffectedPackage() { - java.lang.Object ref = affectedPackage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedPackage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The package this vulnerability affects.
-       * 
- * - * string affected_package = 5; - * @return The bytes for affectedPackage. - */ - public com.google.protobuf.ByteString - getAffectedPackageBytes() { - java.lang.Object ref = affectedPackage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The package this vulnerability affects.
-       * 
- * - * string affected_package = 5; - * @param value The affectedPackage to set. - * @return This builder for chaining. - */ - public Builder setAffectedPackage( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - affectedPackage_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-       * Required. The package this vulnerability affects.
-       * 
- * - * string affected_package = 5; - * @return This builder for chaining. - */ - public Builder clearAffectedPackage() { - affectedPackage_ = getDefaultInstance().getAffectedPackage(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-       * Required. The package this vulnerability affects.
-       * 
- * - * string affected_package = 5; - * @param value The bytes for affectedPackage to set. - * @return This builder for chaining. - */ - public Builder setAffectedPackageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - affectedPackage_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private io.grafeas.v1.Version affectedVersionStart_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> affectedVersionStartBuilder_; - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - * @return Whether the affectedVersionStart field is set. - */ - public boolean hasAffectedVersionStart() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - * @return The affectedVersionStart. - */ - public io.grafeas.v1.Version getAffectedVersionStart() { - if (affectedVersionStartBuilder_ == null) { - return affectedVersionStart_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; - } else { - return affectedVersionStartBuilder_.getMessage(); - } - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - public Builder setAffectedVersionStart(io.grafeas.v1.Version value) { - if (affectedVersionStartBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - affectedVersionStart_ = value; - } else { - affectedVersionStartBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - public Builder setAffectedVersionStart( - io.grafeas.v1.Version.Builder builderForValue) { - if (affectedVersionStartBuilder_ == null) { - affectedVersionStart_ = builderForValue.build(); - } else { - affectedVersionStartBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - public Builder mergeAffectedVersionStart(io.grafeas.v1.Version value) { - if (affectedVersionStartBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - affectedVersionStart_ != null && - affectedVersionStart_ != io.grafeas.v1.Version.getDefaultInstance()) { - getAffectedVersionStartBuilder().mergeFrom(value); - } else { - affectedVersionStart_ = value; - } - } else { - affectedVersionStartBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - public Builder clearAffectedVersionStart() { - bitField0_ = (bitField0_ & ~0x00000020); - affectedVersionStart_ = null; - if (affectedVersionStartBuilder_ != null) { - affectedVersionStartBuilder_.dispose(); - affectedVersionStartBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - public io.grafeas.v1.Version.Builder getAffectedVersionStartBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getAffectedVersionStartFieldBuilder().getBuilder(); - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - public io.grafeas.v1.VersionOrBuilder getAffectedVersionStartOrBuilder() { - if (affectedVersionStartBuilder_ != null) { - return affectedVersionStartBuilder_.getMessageOrBuilder(); - } else { - return affectedVersionStart_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; - } - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getAffectedVersionStartFieldBuilder() { - if (affectedVersionStartBuilder_ == null) { - affectedVersionStartBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getAffectedVersionStart(), - getParentForChildren(), - isClean()); - affectedVersionStart_ = null; - } - return affectedVersionStartBuilder_; - } - - private io.grafeas.v1.Version affectedVersionEnd_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> affectedVersionEndBuilder_; - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - * @return Whether the affectedVersionEnd field is set. - */ - public boolean hasAffectedVersionEnd() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - * @return The affectedVersionEnd. - */ - public io.grafeas.v1.Version getAffectedVersionEnd() { - if (affectedVersionEndBuilder_ == null) { - return affectedVersionEnd_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; - } else { - return affectedVersionEndBuilder_.getMessage(); - } - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - public Builder setAffectedVersionEnd(io.grafeas.v1.Version value) { - if (affectedVersionEndBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - affectedVersionEnd_ = value; - } else { - affectedVersionEndBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - public Builder setAffectedVersionEnd( - io.grafeas.v1.Version.Builder builderForValue) { - if (affectedVersionEndBuilder_ == null) { - affectedVersionEnd_ = builderForValue.build(); - } else { - affectedVersionEndBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - public Builder mergeAffectedVersionEnd(io.grafeas.v1.Version value) { - if (affectedVersionEndBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - affectedVersionEnd_ != null && - affectedVersionEnd_ != io.grafeas.v1.Version.getDefaultInstance()) { - getAffectedVersionEndBuilder().mergeFrom(value); - } else { - affectedVersionEnd_ = value; - } - } else { - affectedVersionEndBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - public Builder clearAffectedVersionEnd() { - bitField0_ = (bitField0_ & ~0x00000040); - affectedVersionEnd_ = null; - if (affectedVersionEndBuilder_ != null) { - affectedVersionEndBuilder_.dispose(); - affectedVersionEndBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - public io.grafeas.v1.Version.Builder getAffectedVersionEndBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getAffectedVersionEndFieldBuilder().getBuilder(); - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - public io.grafeas.v1.VersionOrBuilder getAffectedVersionEndOrBuilder() { - if (affectedVersionEndBuilder_ != null) { - return affectedVersionEndBuilder_.getMessageOrBuilder(); - } else { - return affectedVersionEnd_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; - } - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getAffectedVersionEndFieldBuilder() { - if (affectedVersionEndBuilder_ == null) { - affectedVersionEndBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getAffectedVersionEnd(), - getParentForChildren(), - isClean()); - affectedVersionEnd_ = null; - } - return affectedVersionEndBuilder_; - } - - private java.lang.Object fixedCpeUri_ = ""; - /** - *
-       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-       * to update to that contains a fix for this vulnerability. It is possible
-       * for this to be different from the affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 8; - * @return The fixedCpeUri. - */ - public java.lang.String getFixedCpeUri() { - java.lang.Object ref = fixedCpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedCpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-       * to update to that contains a fix for this vulnerability. It is possible
-       * for this to be different from the affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 8; - * @return The bytes for fixedCpeUri. - */ - public com.google.protobuf.ByteString - getFixedCpeUriBytes() { - java.lang.Object ref = fixedCpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-       * to update to that contains a fix for this vulnerability. It is possible
-       * for this to be different from the affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 8; - * @param value The fixedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setFixedCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fixedCpeUri_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-       * to update to that contains a fix for this vulnerability. It is possible
-       * for this to be different from the affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 8; - * @return This builder for chaining. - */ - public Builder clearFixedCpeUri() { - fixedCpeUri_ = getDefaultInstance().getFixedCpeUri(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - /** - *
-       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-       * to update to that contains a fix for this vulnerability. It is possible
-       * for this to be different from the affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 8; - * @param value The bytes for fixedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setFixedCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fixedCpeUri_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - private java.lang.Object fixedPackage_ = ""; - /** - *
-       * The distro recommended package to update to that contains a fix for this
-       * vulnerability. It is possible for this to be different from the
-       * affected_package.
-       * 
- * - * string fixed_package = 9; - * @return The fixedPackage. - */ - public java.lang.String getFixedPackage() { - java.lang.Object ref = fixedPackage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedPackage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The distro recommended package to update to that contains a fix for this
-       * vulnerability. It is possible for this to be different from the
-       * affected_package.
-       * 
- * - * string fixed_package = 9; - * @return The bytes for fixedPackage. - */ - public com.google.protobuf.ByteString - getFixedPackageBytes() { - java.lang.Object ref = fixedPackage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The distro recommended package to update to that contains a fix for this
-       * vulnerability. It is possible for this to be different from the
-       * affected_package.
-       * 
- * - * string fixed_package = 9; - * @param value The fixedPackage to set. - * @return This builder for chaining. - */ - public Builder setFixedPackage( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fixedPackage_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-       * The distro recommended package to update to that contains a fix for this
-       * vulnerability. It is possible for this to be different from the
-       * affected_package.
-       * 
- * - * string fixed_package = 9; - * @return This builder for chaining. - */ - public Builder clearFixedPackage() { - fixedPackage_ = getDefaultInstance().getFixedPackage(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - *
-       * The distro recommended package to update to that contains a fix for this
-       * vulnerability. It is possible for this to be different from the
-       * affected_package.
-       * 
- * - * string fixed_package = 9; - * @param value The bytes for fixedPackage to set. - * @return This builder for chaining. - */ - public Builder setFixedPackageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fixedPackage_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - private io.grafeas.v1.Version fixedVersion_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> fixedVersionBuilder_; - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - * @return Whether the fixedVersion field is set. - */ - public boolean hasFixedVersion() { - return ((bitField0_ & 0x00000200) != 0); - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - * @return The fixedVersion. - */ - public io.grafeas.v1.Version getFixedVersion() { - if (fixedVersionBuilder_ == null) { - return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } else { - return fixedVersionBuilder_.getMessage(); - } - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - public Builder setFixedVersion(io.grafeas.v1.Version value) { - if (fixedVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fixedVersion_ = value; - } else { - fixedVersionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - public Builder setFixedVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (fixedVersionBuilder_ == null) { - fixedVersion_ = builderForValue.build(); - } else { - fixedVersionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - public Builder mergeFixedVersion(io.grafeas.v1.Version value) { - if (fixedVersionBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) && - fixedVersion_ != null && - fixedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { - getFixedVersionBuilder().mergeFrom(value); - } else { - fixedVersion_ = value; - } - } else { - fixedVersionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - public Builder clearFixedVersion() { - bitField0_ = (bitField0_ & ~0x00000200); - fixedVersion_ = null; - if (fixedVersionBuilder_ != null) { - fixedVersionBuilder_.dispose(); - fixedVersionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - public io.grafeas.v1.Version.Builder getFixedVersionBuilder() { - bitField0_ |= 0x00000200; - onChanged(); - return getFixedVersionFieldBuilder().getBuilder(); - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { - if (fixedVersionBuilder_ != null) { - return fixedVersionBuilder_.getMessageOrBuilder(); - } else { - return fixedVersion_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getFixedVersionFieldBuilder() { - if (fixedVersionBuilder_ == null) { - fixedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getFixedVersion(), - getParentForChildren(), - isClean()); - fixedVersion_ = null; - } - return fixedVersionBuilder_; - } - - private boolean isObsolete_ ; - /** - *
-       * Whether this detail is obsolete. Occurrences are expected not to point to
-       * obsolete details.
-       * 
- * - * bool is_obsolete = 11; - * @return The isObsolete. - */ - @java.lang.Override - public boolean getIsObsolete() { - return isObsolete_; - } - /** - *
-       * Whether this detail is obsolete. Occurrences are expected not to point to
-       * obsolete details.
-       * 
- * - * bool is_obsolete = 11; - * @param value The isObsolete to set. - * @return This builder for chaining. - */ - public Builder setIsObsolete(boolean value) { - - isObsolete_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - *
-       * Whether this detail is obsolete. Occurrences are expected not to point to
-       * obsolete details.
-       * 
- * - * bool is_obsolete = 11; - * @return This builder for chaining. - */ - public Builder clearIsObsolete() { - bitField0_ = (bitField0_ & ~0x00000400); - isObsolete_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp sourceUpdateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> sourceUpdateTimeBuilder_; - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - * @return Whether the sourceUpdateTime field is set. - */ - public boolean hasSourceUpdateTime() { - return ((bitField0_ & 0x00000800) != 0); - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - * @return The sourceUpdateTime. - */ - public com.google.protobuf.Timestamp getSourceUpdateTime() { - if (sourceUpdateTimeBuilder_ == null) { - return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } else { - return sourceUpdateTimeBuilder_.getMessage(); - } - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - public Builder setSourceUpdateTime(com.google.protobuf.Timestamp value) { - if (sourceUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sourceUpdateTime_ = value; - } else { - sourceUpdateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - public Builder setSourceUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (sourceUpdateTimeBuilder_ == null) { - sourceUpdateTime_ = builderForValue.build(); - } else { - sourceUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - public Builder mergeSourceUpdateTime(com.google.protobuf.Timestamp value) { - if (sourceUpdateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000800) != 0) && - sourceUpdateTime_ != null && - sourceUpdateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getSourceUpdateTimeBuilder().mergeFrom(value); - } else { - sourceUpdateTime_ = value; - } - } else { - sourceUpdateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - public Builder clearSourceUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000800); - sourceUpdateTime_ = null; - if (sourceUpdateTimeBuilder_ != null) { - sourceUpdateTimeBuilder_.dispose(); - sourceUpdateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - public com.google.protobuf.Timestamp.Builder getSourceUpdateTimeBuilder() { - bitField0_ |= 0x00000800; - onChanged(); - return getSourceUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { - if (sourceUpdateTimeBuilder_ != null) { - return sourceUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return sourceUpdateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getSourceUpdateTimeFieldBuilder() { - if (sourceUpdateTimeBuilder_ == null) { - sourceUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getSourceUpdateTime(), - getParentForChildren(), - isClean()); - sourceUpdateTime_ = null; - } - return sourceUpdateTimeBuilder_; - } - - private java.lang.Object source_ = ""; - /** - *
-       * The source from which the information in this Detail was obtained.
-       * 
- * - * string source = 13; - * @return The source. - */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - source_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The source from which the information in this Detail was obtained.
-       * 
- * - * string source = 13; - * @return The bytes for source. - */ - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The source from which the information in this Detail was obtained.
-       * 
- * - * string source = 13; - * @param value The source to set. - * @return This builder for chaining. - */ - public Builder setSource( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - source_ = value; - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - *
-       * The source from which the information in this Detail was obtained.
-       * 
- * - * string source = 13; - * @return This builder for chaining. - */ - public Builder clearSource() { - source_ = getDefaultInstance().getSource(); - bitField0_ = (bitField0_ & ~0x00001000); - onChanged(); - return this; - } - /** - *
-       * The source from which the information in this Detail was obtained.
-       * 
- * - * string source = 13; - * @param value The bytes for source to set. - * @return This builder for chaining. - */ - public Builder setSourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - source_ = value; - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - - private java.lang.Object vendor_ = ""; - /** - *
-       * The name of the vendor of the product.
-       * 
- * - * string vendor = 14; - * @return The vendor. - */ - public java.lang.String getVendor() { - java.lang.Object ref = vendor_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - vendor_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the vendor of the product.
-       * 
- * - * string vendor = 14; - * @return The bytes for vendor. - */ - public com.google.protobuf.ByteString - getVendorBytes() { - java.lang.Object ref = vendor_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - vendor_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the vendor of the product.
-       * 
- * - * string vendor = 14; - * @param value The vendor to set. - * @return This builder for chaining. - */ - public Builder setVendor( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - vendor_ = value; - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - *
-       * The name of the vendor of the product.
-       * 
- * - * string vendor = 14; - * @return This builder for chaining. - */ - public Builder clearVendor() { - vendor_ = getDefaultInstance().getVendor(); - bitField0_ = (bitField0_ & ~0x00002000); - onChanged(); - return this; - } - /** - *
-       * The name of the vendor of the product.
-       * 
- * - * string vendor = 14; - * @param value The bytes for vendor to set. - * @return This builder for chaining. - */ - public Builder setVendorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - vendor_ = value; - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote.Detail) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote.Detail) - private static final io.grafeas.v1.VulnerabilityNote.Detail DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote.Detail(); - } - - public static io.grafeas.v1.VulnerabilityNote.Detail getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Detail parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.Detail getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WindowsDetailOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote.WindowsDetail) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - java.lang.String getCpeUri(); - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - com.google.protobuf.ByteString - getCpeUriBytes(); - - /** - *
-     * Required. The name of this vulnerability.
-     * 
- * - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * Required. The name of this vulnerability.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-     * The description of this vulnerability.
-     * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-     * The description of this vulnerability.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - java.util.List - getFixingKbsList(); - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getFixingKbs(int index); - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - int getFixingKbsCount(); - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - java.util.List - getFixingKbsOrBuilderList(); - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder getFixingKbsOrBuilder( - int index); - } - /** - * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail} - */ - public static final class WindowsDetail extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote.WindowsDetail) - WindowsDetailOrBuilder { - private static final long serialVersionUID = 0L; - // Use WindowsDetail.newBuilder() to construct. - private WindowsDetail(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WindowsDetail() { - cpeUri_ = ""; - name_ = ""; - description_ = ""; - fixingKbs_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WindowsDetail(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder.class); - } - - public interface KnowledgeBaseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-       * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-       * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-       * A link to the KB in the [Windows update catalog]
-       * (https://www.catalog.update.microsoft.com/).
-       * 
- * - * string url = 2; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-       * A link to the KB in the [Windows update catalog]
-       * (https://www.catalog.update.microsoft.com/).
-       * 
- * - * string url = 2; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - } - /** - * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} - */ - public static final class KnowledgeBase extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) - KnowledgeBaseOrBuilder { - private static final long serialVersionUID = 0L; - // Use KnowledgeBase.newBuilder() to construct. - private KnowledgeBase(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KnowledgeBase() { - name_ = ""; - url_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KnowledgeBase(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-       * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-       * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URL_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object url_ = ""; - /** - *
-       * A link to the KB in the [Windows update catalog]
-       * (https://www.catalog.update.microsoft.com/).
-       * 
- * - * string url = 2; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-       * A link to the KB in the [Windows update catalog]
-       * (https://www.catalog.update.microsoft.com/).
-       * 
- * - * string url = 2; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase)) { - return super.equals(obj); - } - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase other = (io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUrl() - .equals(other.getUrl())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder.class); - } - - // Construct using io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - url_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getDefaultInstanceForType() { - return io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase build() { - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase buildPartial() { - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase result = new io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.url_ = url_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) { - return mergeFrom((io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase other) { - if (other == io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - url_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-         * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-         * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-         * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-         * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-         * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-         * A link to the KB in the [Windows update catalog]
-         * (https://www.catalog.update.microsoft.com/).
-         * 
- * - * string url = 2; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-         * A link to the KB in the [Windows update catalog]
-         * (https://www.catalog.update.microsoft.com/).
-         * 
- * - * string url = 2; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-         * A link to the KB in the [Windows update catalog]
-         * (https://www.catalog.update.microsoft.com/).
-         * 
- * - * string url = 2; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - url_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-         * A link to the KB in the [Windows update catalog]
-         * (https://www.catalog.update.microsoft.com/).
-         * 
- * - * string url = 2; - * @return This builder for chaining. - */ - public Builder clearUrl() { - url_ = getDefaultInstance().getUrl(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-         * A link to the KB in the [Windows update catalog]
-         * (https://www.catalog.update.microsoft.com/).
-         * 
- * - * string url = 2; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - url_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) - private static final io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase(); - } - - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KnowledgeBase parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int CPE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object cpeUri_ = ""; - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - @java.lang.Override - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } - } - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-     * Required. The name of this vulnerability.
-     * 
- * - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-     * Required. The name of this vulnerability.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-     * The description of this vulnerability.
-     * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-     * The description of this vulnerability.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FIXING_KBS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List fixingKbs_; - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - @java.lang.Override - public java.util.List getFixingKbsList() { - return fixingKbs_; - } - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - @java.lang.Override - public java.util.List - getFixingKbsOrBuilderList() { - return fixingKbs_; - } - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - @java.lang.Override - public int getFixingKbsCount() { - return fixingKbs_.size(); - } - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getFixingKbs(int index) { - return fixingKbs_.get(index); - } - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder getFixingKbsOrBuilder( - int index) { - return fixingKbs_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - for (int i = 0; i < fixingKbs_.size(); i++) { - output.writeMessage(4, fixingKbs_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - for (int i = 0; i < fixingKbs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, fixingKbs_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail)) { - return super.equals(obj); - } - io.grafeas.v1.VulnerabilityNote.WindowsDetail other = (io.grafeas.v1.VulnerabilityNote.WindowsDetail) obj; - - if (!getCpeUri() - .equals(other.getCpeUri())) return false; - if (!getName() - .equals(other.getName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getFixingKbsList() - .equals(other.getFixingKbsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCpeUri().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (getFixingKbsCount() > 0) { - hash = (37 * hash) + FIXING_KBS_FIELD_NUMBER; - hash = (53 * hash) + getFixingKbsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote.WindowsDetail prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote.WindowsDetail) - io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder.class); - } - - // Construct using io.grafeas.v1.VulnerabilityNote.WindowsDetail.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - cpeUri_ = ""; - name_ = ""; - description_ = ""; - if (fixingKbsBuilder_ == null) { - fixingKbs_ = java.util.Collections.emptyList(); - } else { - fixingKbs_ = null; - fixingKbsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail getDefaultInstanceForType() { - return io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail build() { - io.grafeas.v1.VulnerabilityNote.WindowsDetail result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail buildPartial() { - io.grafeas.v1.VulnerabilityNote.WindowsDetail result = new io.grafeas.v1.VulnerabilityNote.WindowsDetail(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityNote.WindowsDetail result) { - if (fixingKbsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - fixingKbs_ = java.util.Collections.unmodifiableList(fixingKbs_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.fixingKbs_ = fixingKbs_; - } else { - result.fixingKbs_ = fixingKbsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.VulnerabilityNote.WindowsDetail result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.cpeUri_ = cpeUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.description_ = description_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail) { - return mergeFrom((io.grafeas.v1.VulnerabilityNote.WindowsDetail)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote.WindowsDetail other) { - if (other == io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance()) return this; - if (!other.getCpeUri().isEmpty()) { - cpeUri_ = other.cpeUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (fixingKbsBuilder_ == null) { - if (!other.fixingKbs_.isEmpty()) { - if (fixingKbs_.isEmpty()) { - fixingKbs_ = other.fixingKbs_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureFixingKbsIsMutable(); - fixingKbs_.addAll(other.fixingKbs_); - } - onChanged(); - } - } else { - if (!other.fixingKbs_.isEmpty()) { - if (fixingKbsBuilder_.isEmpty()) { - fixingKbsBuilder_.dispose(); - fixingKbsBuilder_ = null; - fixingKbs_ = other.fixingKbs_; - bitField0_ = (bitField0_ & ~0x00000008); - fixingKbsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFixingKbsFieldBuilder() : null; - } else { - fixingKbsBuilder_.addAllMessages(other.fixingKbs_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - cpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase m = - input.readMessage( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.parser(), - extensionRegistry); - if (fixingKbsBuilder_ == null) { - ensureFixingKbsIsMutable(); - fixingKbs_.add(m); - } else { - fixingKbsBuilder_.addMessage(m); - } - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object cpeUri_ = ""; - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string cpe_uri = 1; - * @param value The cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string cpe_uri = 1; - * @return This builder for chaining. - */ - public Builder clearCpeUri() { - cpeUri_ = getDefaultInstance().getCpeUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string cpe_uri = 1; - * @param value The bytes for cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-       * Required. The name of this vulnerability.
-       * 
- * - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The name of this vulnerability.
-       * 
- * - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The name of this vulnerability.
-       * 
- * - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * Required. The name of this vulnerability.
-       * 
- * - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-       * Required. The name of this vulnerability.
-       * 
- * - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-       * The description of this vulnerability.
-       * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The description of this vulnerability.
-       * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The description of this vulnerability.
-       * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * The description of this vulnerability.
-       * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-       * The description of this vulnerability.
-       * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.util.List fixingKbs_ = - java.util.Collections.emptyList(); - private void ensureFixingKbsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - fixingKbs_ = new java.util.ArrayList(fixingKbs_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder> fixingKbsBuilder_; - - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public java.util.List getFixingKbsList() { - if (fixingKbsBuilder_ == null) { - return java.util.Collections.unmodifiableList(fixingKbs_); - } else { - return fixingKbsBuilder_.getMessageList(); - } - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public int getFixingKbsCount() { - if (fixingKbsBuilder_ == null) { - return fixingKbs_.size(); - } else { - return fixingKbsBuilder_.getCount(); - } - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getFixingKbs(int index) { - if (fixingKbsBuilder_ == null) { - return fixingKbs_.get(index); - } else { - return fixingKbsBuilder_.getMessage(index); - } - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder setFixingKbs( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase value) { - if (fixingKbsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFixingKbsIsMutable(); - fixingKbs_.set(index, value); - onChanged(); - } else { - fixingKbsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder setFixingKbs( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder builderForValue) { - if (fixingKbsBuilder_ == null) { - ensureFixingKbsIsMutable(); - fixingKbs_.set(index, builderForValue.build()); - onChanged(); - } else { - fixingKbsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder addFixingKbs(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase value) { - if (fixingKbsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFixingKbsIsMutable(); - fixingKbs_.add(value); - onChanged(); - } else { - fixingKbsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder addFixingKbs( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase value) { - if (fixingKbsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFixingKbsIsMutable(); - fixingKbs_.add(index, value); - onChanged(); - } else { - fixingKbsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder addFixingKbs( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder builderForValue) { - if (fixingKbsBuilder_ == null) { - ensureFixingKbsIsMutable(); - fixingKbs_.add(builderForValue.build()); - onChanged(); - } else { - fixingKbsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder addFixingKbs( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder builderForValue) { - if (fixingKbsBuilder_ == null) { - ensureFixingKbsIsMutable(); - fixingKbs_.add(index, builderForValue.build()); - onChanged(); - } else { - fixingKbsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder addAllFixingKbs( - java.lang.Iterable values) { - if (fixingKbsBuilder_ == null) { - ensureFixingKbsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fixingKbs_); - onChanged(); - } else { - fixingKbsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder clearFixingKbs() { - if (fixingKbsBuilder_ == null) { - fixingKbs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - fixingKbsBuilder_.clear(); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder removeFixingKbs(int index) { - if (fixingKbsBuilder_ == null) { - ensureFixingKbsIsMutable(); - fixingKbs_.remove(index); - onChanged(); - } else { - fixingKbsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder getFixingKbsBuilder( - int index) { - return getFixingKbsFieldBuilder().getBuilder(index); - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder getFixingKbsOrBuilder( - int index) { - if (fixingKbsBuilder_ == null) { - return fixingKbs_.get(index); } else { - return fixingKbsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public java.util.List - getFixingKbsOrBuilderList() { - if (fixingKbsBuilder_ != null) { - return fixingKbsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fixingKbs_); - } - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder addFixingKbsBuilder() { - return getFixingKbsFieldBuilder().addBuilder( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance()); - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder addFixingKbsBuilder( - int index) { - return getFixingKbsFieldBuilder().addBuilder( - index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance()); - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public java.util.List - getFixingKbsBuilderList() { - return getFixingKbsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder> - getFixingKbsFieldBuilder() { - if (fixingKbsBuilder_ == null) { - fixingKbsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder>( - fixingKbs_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - fixingKbs_ = null; - } - return fixingKbsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote.WindowsDetail) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote.WindowsDetail) - private static final io.grafeas.v1.VulnerabilityNote.WindowsDetail DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote.WindowsDetail(); - } - - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WindowsDetail parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int CVSS_SCORE_FIELD_NUMBER = 1; - private float cvssScore_ = 0F; - /** - *
-   * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
-   * where 0 indicates low severity and 10 indicates high severity.
-   * 
- * - * float cvss_score = 1; - * @return The cvssScore. - */ - @java.lang.Override - public float getCvssScore() { - return cvssScore_; - } - - public static final int SEVERITY_FIELD_NUMBER = 2; - private int severity_ = 0; - /** - *
-   * The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override public int getSeverityValue() { - return severity_; - } - /** - *
-   * The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - @java.lang.Override public io.grafeas.v1.Severity getSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - - public static final int DETAILS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List details_; - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - @java.lang.Override - public java.util.List getDetailsList() { - return details_; - } - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - @java.lang.Override - public java.util.List - getDetailsOrBuilderList() { - return details_; - } - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - @java.lang.Override - public int getDetailsCount() { - return details_.size(); - } - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.Detail getDetails(int index) { - return details_.get(index); - } - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.DetailOrBuilder getDetailsOrBuilder( - int index) { - return details_.get(index); - } - - public static final int CVSS_V3_FIELD_NUMBER = 4; - private io.grafeas.v1.CVSSv3 cvssV3_; - /** - *
-   * The full description of the CVSSv3 for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @return Whether the cvssV3 field is set. - */ - @java.lang.Override - public boolean hasCvssV3() { - return cvssV3_ != null; - } - /** - *
-   * The full description of the CVSSv3 for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @return The cvssV3. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3 getCvssV3() { - return cvssV3_ == null ? io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; - } - /** - *
-   * The full description of the CVSSv3 for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3OrBuilder getCvssV3OrBuilder() { - return cvssV3_ == null ? io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; - } - - public static final int WINDOWS_DETAILS_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private java.util.List windowsDetails_; - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - @java.lang.Override - public java.util.List getWindowsDetailsList() { - return windowsDetails_; - } - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - @java.lang.Override - public java.util.List - getWindowsDetailsOrBuilderList() { - return windowsDetails_; - } - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - @java.lang.Override - public int getWindowsDetailsCount() { - return windowsDetails_.size(); - } - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail getWindowsDetails(int index) { - return windowsDetails_.get(index); - } - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder getWindowsDetailsOrBuilder( - int index) { - return windowsDetails_.get(index); - } - - public static final int SOURCE_UPDATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp sourceUpdateTime_; - /** - *
-   * The time this information was last changed at the source. This is an
-   * upstream timestamp from the underlying information source - e.g. Ubuntu
-   * security tracker.
-   * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - * @return Whether the sourceUpdateTime field is set. - */ - @java.lang.Override - public boolean hasSourceUpdateTime() { - return sourceUpdateTime_ != null; - } - /** - *
-   * The time this information was last changed at the source. This is an
-   * upstream timestamp from the underlying information source - e.g. Ubuntu
-   * security tracker.
-   * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - * @return The sourceUpdateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getSourceUpdateTime() { - return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } - /** - *
-   * The time this information was last changed at the source. This is an
-   * upstream timestamp from the underlying information source - e.g. Ubuntu
-   * security tracker.
-   * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { - return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } - - public static final int CVSS_VERSION_FIELD_NUMBER = 7; - private int cvssVersion_ = 0; - /** - *
-   * CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @return The enum numeric value on the wire for cvssVersion. - */ - @java.lang.Override public int getCvssVersionValue() { - return cvssVersion_; - } - /** - *
-   * CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @return The cvssVersion. - */ - @java.lang.Override public io.grafeas.v1.CVSSVersion getCvssVersion() { - io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); - return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; - } - - public static final int CVSS_V2_FIELD_NUMBER = 8; - private io.grafeas.v1.CVSS cvssV2_; - /** - *
-   * The full description of the v2 CVSS for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - * @return Whether the cvssV2 field is set. - */ - @java.lang.Override - public boolean hasCvssV2() { - return cvssV2_ != null; - } - /** - *
-   * The full description of the v2 CVSS for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - * @return The cvssV2. - */ - @java.lang.Override - public io.grafeas.v1.CVSS getCvssV2() { - return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } - /** - *
-   * The full description of the v2 CVSS for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - @java.lang.Override - public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { - return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { - output.writeFloat(1, cvssScore_); - } - if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - output.writeEnum(2, severity_); - } - for (int i = 0; i < details_.size(); i++) { - output.writeMessage(3, details_.get(i)); - } - if (cvssV3_ != null) { - output.writeMessage(4, getCvssV3()); - } - for (int i = 0; i < windowsDetails_.size(); i++) { - output.writeMessage(5, windowsDetails_.get(i)); - } - if (sourceUpdateTime_ != null) { - output.writeMessage(6, getSourceUpdateTime()); - } - if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { - output.writeEnum(7, cvssVersion_); - } - if (cvssV2_ != null) { - output.writeMessage(8, getCvssV2()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, cvssScore_); - } - if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, severity_); - } - for (int i = 0; i < details_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, details_.get(i)); - } - if (cvssV3_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCvssV3()); - } - for (int i = 0; i < windowsDetails_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, windowsDetails_.get(i)); - } - if (sourceUpdateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getSourceUpdateTime()); - } - if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(7, cvssVersion_); - } - if (cvssV2_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getCvssV2()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.VulnerabilityNote)) { - return super.equals(obj); - } - io.grafeas.v1.VulnerabilityNote other = (io.grafeas.v1.VulnerabilityNote) obj; - - if (java.lang.Float.floatToIntBits(getCvssScore()) - != java.lang.Float.floatToIntBits( - other.getCvssScore())) return false; - if (severity_ != other.severity_) return false; - if (!getDetailsList() - .equals(other.getDetailsList())) return false; - if (hasCvssV3() != other.hasCvssV3()) return false; - if (hasCvssV3()) { - if (!getCvssV3() - .equals(other.getCvssV3())) return false; - } - if (!getWindowsDetailsList() - .equals(other.getWindowsDetailsList())) return false; - if (hasSourceUpdateTime() != other.hasSourceUpdateTime()) return false; - if (hasSourceUpdateTime()) { - if (!getSourceUpdateTime() - .equals(other.getSourceUpdateTime())) return false; - } - if (cvssVersion_ != other.cvssVersion_) return false; - if (hasCvssV2() != other.hasCvssV2()) return false; - if (hasCvssV2()) { - if (!getCvssV2() - .equals(other.getCvssV2())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CVSS_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getCvssScore()); - hash = (37 * hash) + SEVERITY_FIELD_NUMBER; - hash = (53 * hash) + severity_; - if (getDetailsCount() > 0) { - hash = (37 * hash) + DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getDetailsList().hashCode(); - } - if (hasCvssV3()) { - hash = (37 * hash) + CVSS_V3_FIELD_NUMBER; - hash = (53 * hash) + getCvssV3().hashCode(); - } - if (getWindowsDetailsCount() > 0) { - hash = (37 * hash) + WINDOWS_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getWindowsDetailsList().hashCode(); - } - if (hasSourceUpdateTime()) { - hash = (37 * hash) + SOURCE_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getSourceUpdateTime().hashCode(); - } - hash = (37 * hash) + CVSS_VERSION_FIELD_NUMBER; - hash = (53 * hash) + cvssVersion_; - if (hasCvssV2()) { - hash = (37 * hash) + CVSS_V2_FIELD_NUMBER; - hash = (53 * hash) + getCvssV2().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.VulnerabilityNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A security vulnerability that can be found in resources.
-   * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote) - io.grafeas.v1.VulnerabilityNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.class, io.grafeas.v1.VulnerabilityNote.Builder.class); - } - - // Construct using io.grafeas.v1.VulnerabilityNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - cvssScore_ = 0F; - severity_ = 0; - if (detailsBuilder_ == null) { - details_ = java.util.Collections.emptyList(); - } else { - details_ = null; - detailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - cvssV3_ = null; - if (cvssV3Builder_ != null) { - cvssV3Builder_.dispose(); - cvssV3Builder_ = null; - } - if (windowsDetailsBuilder_ == null) { - windowsDetails_ = java.util.Collections.emptyList(); - } else { - windowsDetails_ = null; - windowsDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - sourceUpdateTime_ = null; - if (sourceUpdateTimeBuilder_ != null) { - sourceUpdateTimeBuilder_.dispose(); - sourceUpdateTimeBuilder_ = null; - } - cvssVersion_ = 0; - cvssV2_ = null; - if (cvssV2Builder_ != null) { - cvssV2Builder_.dispose(); - cvssV2Builder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote getDefaultInstanceForType() { - return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote build() { - io.grafeas.v1.VulnerabilityNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote buildPartial() { - io.grafeas.v1.VulnerabilityNote result = new io.grafeas.v1.VulnerabilityNote(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityNote result) { - if (detailsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - details_ = java.util.Collections.unmodifiableList(details_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.details_ = details_; - } else { - result.details_ = detailsBuilder_.build(); - } - if (windowsDetailsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - windowsDetails_ = java.util.Collections.unmodifiableList(windowsDetails_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.windowsDetails_ = windowsDetails_; - } else { - result.windowsDetails_ = windowsDetailsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.VulnerabilityNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.cvssScore_ = cvssScore_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.severity_ = severity_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.cvssV3_ = cvssV3Builder_ == null - ? cvssV3_ - : cvssV3Builder_.build(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.sourceUpdateTime_ = sourceUpdateTimeBuilder_ == null - ? sourceUpdateTime_ - : sourceUpdateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.cvssVersion_ = cvssVersion_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.cvssV2_ = cvssV2Builder_ == null - ? cvssV2_ - : cvssV2Builder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.VulnerabilityNote) { - return mergeFrom((io.grafeas.v1.VulnerabilityNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote other) { - if (other == io.grafeas.v1.VulnerabilityNote.getDefaultInstance()) return this; - if (other.getCvssScore() != 0F) { - setCvssScore(other.getCvssScore()); - } - if (other.severity_ != 0) { - setSeverityValue(other.getSeverityValue()); - } - if (detailsBuilder_ == null) { - if (!other.details_.isEmpty()) { - if (details_.isEmpty()) { - details_ = other.details_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureDetailsIsMutable(); - details_.addAll(other.details_); - } - onChanged(); - } - } else { - if (!other.details_.isEmpty()) { - if (detailsBuilder_.isEmpty()) { - detailsBuilder_.dispose(); - detailsBuilder_ = null; - details_ = other.details_; - bitField0_ = (bitField0_ & ~0x00000004); - detailsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDetailsFieldBuilder() : null; - } else { - detailsBuilder_.addAllMessages(other.details_); - } - } - } - if (other.hasCvssV3()) { - mergeCvssV3(other.getCvssV3()); - } - if (windowsDetailsBuilder_ == null) { - if (!other.windowsDetails_.isEmpty()) { - if (windowsDetails_.isEmpty()) { - windowsDetails_ = other.windowsDetails_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureWindowsDetailsIsMutable(); - windowsDetails_.addAll(other.windowsDetails_); - } - onChanged(); - } - } else { - if (!other.windowsDetails_.isEmpty()) { - if (windowsDetailsBuilder_.isEmpty()) { - windowsDetailsBuilder_.dispose(); - windowsDetailsBuilder_ = null; - windowsDetails_ = other.windowsDetails_; - bitField0_ = (bitField0_ & ~0x00000010); - windowsDetailsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getWindowsDetailsFieldBuilder() : null; - } else { - windowsDetailsBuilder_.addAllMessages(other.windowsDetails_); - } - } - } - if (other.hasSourceUpdateTime()) { - mergeSourceUpdateTime(other.getSourceUpdateTime()); - } - if (other.cvssVersion_ != 0) { - setCvssVersionValue(other.getCvssVersionValue()); - } - if (other.hasCvssV2()) { - mergeCvssV2(other.getCvssV2()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - cvssScore_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - case 16: { - severity_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - io.grafeas.v1.VulnerabilityNote.Detail m = - input.readMessage( - io.grafeas.v1.VulnerabilityNote.Detail.parser(), - extensionRegistry); - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - details_.add(m); - } else { - detailsBuilder_.addMessage(m); - } - break; - } // case 26 - case 34: { - input.readMessage( - getCvssV3FieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - io.grafeas.v1.VulnerabilityNote.WindowsDetail m = - input.readMessage( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.parser(), - extensionRegistry); - if (windowsDetailsBuilder_ == null) { - ensureWindowsDetailsIsMutable(); - windowsDetails_.add(m); - } else { - windowsDetailsBuilder_.addMessage(m); - } - break; - } // case 42 - case 50: { - input.readMessage( - getSourceUpdateTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 56: { - cvssVersion_ = input.readEnum(); - bitField0_ |= 0x00000040; - break; - } // case 56 - case 66: { - input.readMessage( - getCvssV2FieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 66 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private float cvssScore_ ; - /** - *
-     * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
-     * where 0 indicates low severity and 10 indicates high severity.
-     * 
- * - * float cvss_score = 1; - * @return The cvssScore. - */ - @java.lang.Override - public float getCvssScore() { - return cvssScore_; - } - /** - *
-     * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
-     * where 0 indicates low severity and 10 indicates high severity.
-     * 
- * - * float cvss_score = 1; - * @param value The cvssScore to set. - * @return This builder for chaining. - */ - public Builder setCvssScore(float value) { - - cvssScore_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
-     * where 0 indicates low severity and 10 indicates high severity.
-     * 
- * - * float cvss_score = 1; - * @return This builder for chaining. - */ - public Builder clearCvssScore() { - bitField0_ = (bitField0_ & ~0x00000001); - cvssScore_ = 0F; - onChanged(); - return this; - } - - private int severity_ = 0; - /** - *
-     * The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override public int getSeverityValue() { - return severity_; - } - /** - *
-     * The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @param value The enum numeric value on the wire for severity to set. - * @return This builder for chaining. - */ - public Builder setSeverityValue(int value) { - severity_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - @java.lang.Override - public io.grafeas.v1.Severity getSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - /** - *
-     * The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @param value The severity to set. - * @return This builder for chaining. - */ - public Builder setSeverity(io.grafeas.v1.Severity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - severity_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @return This builder for chaining. - */ - public Builder clearSeverity() { - bitField0_ = (bitField0_ & ~0x00000002); - severity_ = 0; - onChanged(); - return this; - } - - private java.util.List details_ = - java.util.Collections.emptyList(); - private void ensureDetailsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - details_ = new java.util.ArrayList(details_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.Detail, io.grafeas.v1.VulnerabilityNote.Detail.Builder, io.grafeas.v1.VulnerabilityNote.DetailOrBuilder> detailsBuilder_; - - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public java.util.List getDetailsList() { - if (detailsBuilder_ == null) { - return java.util.Collections.unmodifiableList(details_); - } else { - return detailsBuilder_.getMessageList(); - } - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public int getDetailsCount() { - if (detailsBuilder_ == null) { - return details_.size(); - } else { - return detailsBuilder_.getCount(); - } - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public io.grafeas.v1.VulnerabilityNote.Detail getDetails(int index) { - if (detailsBuilder_ == null) { - return details_.get(index); - } else { - return detailsBuilder_.getMessage(index); - } - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder setDetails( - int index, io.grafeas.v1.VulnerabilityNote.Detail value) { - if (detailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetailsIsMutable(); - details_.set(index, value); - onChanged(); - } else { - detailsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder setDetails( - int index, io.grafeas.v1.VulnerabilityNote.Detail.Builder builderForValue) { - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - details_.set(index, builderForValue.build()); - onChanged(); - } else { - detailsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder addDetails(io.grafeas.v1.VulnerabilityNote.Detail value) { - if (detailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetailsIsMutable(); - details_.add(value); - onChanged(); - } else { - detailsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder addDetails( - int index, io.grafeas.v1.VulnerabilityNote.Detail value) { - if (detailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetailsIsMutable(); - details_.add(index, value); - onChanged(); - } else { - detailsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder addDetails( - io.grafeas.v1.VulnerabilityNote.Detail.Builder builderForValue) { - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - details_.add(builderForValue.build()); - onChanged(); - } else { - detailsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder addDetails( - int index, io.grafeas.v1.VulnerabilityNote.Detail.Builder builderForValue) { - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - details_.add(index, builderForValue.build()); - onChanged(); - } else { - detailsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder addAllDetails( - java.lang.Iterable values) { - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, details_); - onChanged(); - } else { - detailsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder clearDetails() { - if (detailsBuilder_ == null) { - details_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - detailsBuilder_.clear(); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder removeDetails(int index) { - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - details_.remove(index); - onChanged(); - } else { - detailsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public io.grafeas.v1.VulnerabilityNote.Detail.Builder getDetailsBuilder( - int index) { - return getDetailsFieldBuilder().getBuilder(index); - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public io.grafeas.v1.VulnerabilityNote.DetailOrBuilder getDetailsOrBuilder( - int index) { - if (detailsBuilder_ == null) { - return details_.get(index); } else { - return detailsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public java.util.List - getDetailsOrBuilderList() { - if (detailsBuilder_ != null) { - return detailsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(details_); - } - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public io.grafeas.v1.VulnerabilityNote.Detail.Builder addDetailsBuilder() { - return getDetailsFieldBuilder().addBuilder( - io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance()); - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public io.grafeas.v1.VulnerabilityNote.Detail.Builder addDetailsBuilder( - int index) { - return getDetailsFieldBuilder().addBuilder( - index, io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance()); - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public java.util.List - getDetailsBuilderList() { - return getDetailsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.Detail, io.grafeas.v1.VulnerabilityNote.Detail.Builder, io.grafeas.v1.VulnerabilityNote.DetailOrBuilder> - getDetailsFieldBuilder() { - if (detailsBuilder_ == null) { - detailsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.Detail, io.grafeas.v1.VulnerabilityNote.Detail.Builder, io.grafeas.v1.VulnerabilityNote.DetailOrBuilder>( - details_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - details_ = null; - } - return detailsBuilder_; - } - - private io.grafeas.v1.CVSSv3 cvssV3_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSSv3, io.grafeas.v1.CVSSv3.Builder, io.grafeas.v1.CVSSv3OrBuilder> cvssV3Builder_; - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @return Whether the cvssV3 field is set. - */ - public boolean hasCvssV3() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @return The cvssV3. - */ - public io.grafeas.v1.CVSSv3 getCvssV3() { - if (cvssV3Builder_ == null) { - return cvssV3_ == null ? io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; - } else { - return cvssV3Builder_.getMessage(); - } - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - public Builder setCvssV3(io.grafeas.v1.CVSSv3 value) { - if (cvssV3Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cvssV3_ = value; - } else { - cvssV3Builder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - public Builder setCvssV3( - io.grafeas.v1.CVSSv3.Builder builderForValue) { - if (cvssV3Builder_ == null) { - cvssV3_ = builderForValue.build(); - } else { - cvssV3Builder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - public Builder mergeCvssV3(io.grafeas.v1.CVSSv3 value) { - if (cvssV3Builder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - cvssV3_ != null && - cvssV3_ != io.grafeas.v1.CVSSv3.getDefaultInstance()) { - getCvssV3Builder().mergeFrom(value); - } else { - cvssV3_ = value; - } - } else { - cvssV3Builder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - public Builder clearCvssV3() { - bitField0_ = (bitField0_ & ~0x00000008); - cvssV3_ = null; - if (cvssV3Builder_ != null) { - cvssV3Builder_.dispose(); - cvssV3Builder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - public io.grafeas.v1.CVSSv3.Builder getCvssV3Builder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCvssV3FieldBuilder().getBuilder(); - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - public io.grafeas.v1.CVSSv3OrBuilder getCvssV3OrBuilder() { - if (cvssV3Builder_ != null) { - return cvssV3Builder_.getMessageOrBuilder(); - } else { - return cvssV3_ == null ? - io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; - } - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSSv3, io.grafeas.v1.CVSSv3.Builder, io.grafeas.v1.CVSSv3OrBuilder> - getCvssV3FieldBuilder() { - if (cvssV3Builder_ == null) { - cvssV3Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSSv3, io.grafeas.v1.CVSSv3.Builder, io.grafeas.v1.CVSSv3OrBuilder>( - getCvssV3(), - getParentForChildren(), - isClean()); - cvssV3_ = null; - } - return cvssV3Builder_; - } - - private java.util.List windowsDetails_ = - java.util.Collections.emptyList(); - private void ensureWindowsDetailsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - windowsDetails_ = new java.util.ArrayList(windowsDetails_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.WindowsDetail, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder> windowsDetailsBuilder_; - - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public java.util.List getWindowsDetailsList() { - if (windowsDetailsBuilder_ == null) { - return java.util.Collections.unmodifiableList(windowsDetails_); - } else { - return windowsDetailsBuilder_.getMessageList(); - } - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public int getWindowsDetailsCount() { - if (windowsDetailsBuilder_ == null) { - return windowsDetails_.size(); - } else { - return windowsDetailsBuilder_.getCount(); - } - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail getWindowsDetails(int index) { - if (windowsDetailsBuilder_ == null) { - return windowsDetails_.get(index); - } else { - return windowsDetailsBuilder_.getMessage(index); - } - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder setWindowsDetails( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail value) { - if (windowsDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWindowsDetailsIsMutable(); - windowsDetails_.set(index, value); - onChanged(); - } else { - windowsDetailsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder setWindowsDetails( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder builderForValue) { - if (windowsDetailsBuilder_ == null) { - ensureWindowsDetailsIsMutable(); - windowsDetails_.set(index, builderForValue.build()); - onChanged(); - } else { - windowsDetailsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder addWindowsDetails(io.grafeas.v1.VulnerabilityNote.WindowsDetail value) { - if (windowsDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWindowsDetailsIsMutable(); - windowsDetails_.add(value); - onChanged(); - } else { - windowsDetailsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder addWindowsDetails( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail value) { - if (windowsDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWindowsDetailsIsMutable(); - windowsDetails_.add(index, value); - onChanged(); - } else { - windowsDetailsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder addWindowsDetails( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder builderForValue) { - if (windowsDetailsBuilder_ == null) { - ensureWindowsDetailsIsMutable(); - windowsDetails_.add(builderForValue.build()); - onChanged(); - } else { - windowsDetailsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder addWindowsDetails( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder builderForValue) { - if (windowsDetailsBuilder_ == null) { - ensureWindowsDetailsIsMutable(); - windowsDetails_.add(index, builderForValue.build()); - onChanged(); - } else { - windowsDetailsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder addAllWindowsDetails( - java.lang.Iterable values) { - if (windowsDetailsBuilder_ == null) { - ensureWindowsDetailsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, windowsDetails_); - onChanged(); - } else { - windowsDetailsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder clearWindowsDetails() { - if (windowsDetailsBuilder_ == null) { - windowsDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - windowsDetailsBuilder_.clear(); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder removeWindowsDetails(int index) { - if (windowsDetailsBuilder_ == null) { - ensureWindowsDetailsIsMutable(); - windowsDetails_.remove(index); - onChanged(); - } else { - windowsDetailsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder getWindowsDetailsBuilder( - int index) { - return getWindowsDetailsFieldBuilder().getBuilder(index); - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder getWindowsDetailsOrBuilder( - int index) { - if (windowsDetailsBuilder_ == null) { - return windowsDetails_.get(index); } else { - return windowsDetailsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public java.util.List - getWindowsDetailsOrBuilderList() { - if (windowsDetailsBuilder_ != null) { - return windowsDetailsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(windowsDetails_); - } - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder addWindowsDetailsBuilder() { - return getWindowsDetailsFieldBuilder().addBuilder( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance()); - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder addWindowsDetailsBuilder( - int index) { - return getWindowsDetailsFieldBuilder().addBuilder( - index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance()); - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public java.util.List - getWindowsDetailsBuilderList() { - return getWindowsDetailsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.WindowsDetail, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder> - getWindowsDetailsFieldBuilder() { - if (windowsDetailsBuilder_ == null) { - windowsDetailsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.WindowsDetail, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder>( - windowsDetails_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - windowsDetails_ = null; - } - return windowsDetailsBuilder_; - } - - private com.google.protobuf.Timestamp sourceUpdateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> sourceUpdateTimeBuilder_; - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - * @return Whether the sourceUpdateTime field is set. - */ - public boolean hasSourceUpdateTime() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - * @return The sourceUpdateTime. - */ - public com.google.protobuf.Timestamp getSourceUpdateTime() { - if (sourceUpdateTimeBuilder_ == null) { - return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } else { - return sourceUpdateTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - public Builder setSourceUpdateTime(com.google.protobuf.Timestamp value) { - if (sourceUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sourceUpdateTime_ = value; - } else { - sourceUpdateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - public Builder setSourceUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (sourceUpdateTimeBuilder_ == null) { - sourceUpdateTime_ = builderForValue.build(); - } else { - sourceUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - public Builder mergeSourceUpdateTime(com.google.protobuf.Timestamp value) { - if (sourceUpdateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - sourceUpdateTime_ != null && - sourceUpdateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getSourceUpdateTimeBuilder().mergeFrom(value); - } else { - sourceUpdateTime_ = value; - } - } else { - sourceUpdateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - public Builder clearSourceUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000020); - sourceUpdateTime_ = null; - if (sourceUpdateTimeBuilder_ != null) { - sourceUpdateTimeBuilder_.dispose(); - sourceUpdateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - public com.google.protobuf.Timestamp.Builder getSourceUpdateTimeBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getSourceUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { - if (sourceUpdateTimeBuilder_ != null) { - return sourceUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return sourceUpdateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getSourceUpdateTimeFieldBuilder() { - if (sourceUpdateTimeBuilder_ == null) { - sourceUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getSourceUpdateTime(), - getParentForChildren(), - isClean()); - sourceUpdateTime_ = null; - } - return sourceUpdateTimeBuilder_; - } - - private int cvssVersion_ = 0; - /** - *
-     * CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @return The enum numeric value on the wire for cvssVersion. - */ - @java.lang.Override public int getCvssVersionValue() { - return cvssVersion_; - } - /** - *
-     * CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @param value The enum numeric value on the wire for cvssVersion to set. - * @return This builder for chaining. - */ - public Builder setCvssVersionValue(int value) { - cvssVersion_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @return The cvssVersion. - */ - @java.lang.Override - public io.grafeas.v1.CVSSVersion getCvssVersion() { - io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); - return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; - } - /** - *
-     * CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @param value The cvssVersion to set. - * @return This builder for chaining. - */ - public Builder setCvssVersion(io.grafeas.v1.CVSSVersion value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - cvssVersion_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @return This builder for chaining. - */ - public Builder clearCvssVersion() { - bitField0_ = (bitField0_ & ~0x00000040); - cvssVersion_ = 0; - onChanged(); - return this; - } - - private io.grafeas.v1.CVSS cvssV2_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> cvssV2Builder_; - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - * @return Whether the cvssV2 field is set. - */ - public boolean hasCvssV2() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - * @return The cvssV2. - */ - public io.grafeas.v1.CVSS getCvssV2() { - if (cvssV2Builder_ == null) { - return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } else { - return cvssV2Builder_.getMessage(); - } - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - public Builder setCvssV2(io.grafeas.v1.CVSS value) { - if (cvssV2Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cvssV2_ = value; - } else { - cvssV2Builder_.setMessage(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - public Builder setCvssV2( - io.grafeas.v1.CVSS.Builder builderForValue) { - if (cvssV2Builder_ == null) { - cvssV2_ = builderForValue.build(); - } else { - cvssV2Builder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - public Builder mergeCvssV2(io.grafeas.v1.CVSS value) { - if (cvssV2Builder_ == null) { - if (((bitField0_ & 0x00000080) != 0) && - cvssV2_ != null && - cvssV2_ != io.grafeas.v1.CVSS.getDefaultInstance()) { - getCvssV2Builder().mergeFrom(value); - } else { - cvssV2_ = value; - } - } else { - cvssV2Builder_.mergeFrom(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - public Builder clearCvssV2() { - bitField0_ = (bitField0_ & ~0x00000080); - cvssV2_ = null; - if (cvssV2Builder_ != null) { - cvssV2Builder_.dispose(); - cvssV2Builder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - public io.grafeas.v1.CVSS.Builder getCvssV2Builder() { - bitField0_ |= 0x00000080; - onChanged(); - return getCvssV2FieldBuilder().getBuilder(); - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { - if (cvssV2Builder_ != null) { - return cvssV2Builder_.getMessageOrBuilder(); - } else { - return cvssV2_ == null ? - io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> - getCvssV2FieldBuilder() { - if (cvssV2Builder_ == null) { - cvssV2Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( - getCvssV2(), - getParentForChildren(), - isClean()); - cvssV2_ = null; - } - return cvssV2Builder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote) - private static final io.grafeas.v1.VulnerabilityNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote(); - } - - public static io.grafeas.v1.VulnerabilityNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VulnerabilityNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java deleted file mode 100644 index 1e1b884465be..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java +++ /dev/null @@ -1,248 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/vulnerability.proto - -package io.grafeas.v1; - -public interface VulnerabilityNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
-   * where 0 indicates low severity and 10 indicates high severity.
-   * 
- * - * float cvss_score = 1; - * @return The cvssScore. - */ - float getCvssScore(); - - /** - *
-   * The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - int getSeverityValue(); - /** - *
-   * The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - io.grafeas.v1.Severity getSeverity(); - - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - java.util.List - getDetailsList(); - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - io.grafeas.v1.VulnerabilityNote.Detail getDetails(int index); - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - int getDetailsCount(); - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - java.util.List - getDetailsOrBuilderList(); - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - io.grafeas.v1.VulnerabilityNote.DetailOrBuilder getDetailsOrBuilder( - int index); - - /** - *
-   * The full description of the CVSSv3 for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @return Whether the cvssV3 field is set. - */ - boolean hasCvssV3(); - /** - *
-   * The full description of the CVSSv3 for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @return The cvssV3. - */ - io.grafeas.v1.CVSSv3 getCvssV3(); - /** - *
-   * The full description of the CVSSv3 for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - io.grafeas.v1.CVSSv3OrBuilder getCvssV3OrBuilder(); - - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - java.util.List - getWindowsDetailsList(); - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - io.grafeas.v1.VulnerabilityNote.WindowsDetail getWindowsDetails(int index); - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - int getWindowsDetailsCount(); - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - java.util.List - getWindowsDetailsOrBuilderList(); - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder getWindowsDetailsOrBuilder( - int index); - - /** - *
-   * The time this information was last changed at the source. This is an
-   * upstream timestamp from the underlying information source - e.g. Ubuntu
-   * security tracker.
-   * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - * @return Whether the sourceUpdateTime field is set. - */ - boolean hasSourceUpdateTime(); - /** - *
-   * The time this information was last changed at the source. This is an
-   * upstream timestamp from the underlying information source - e.g. Ubuntu
-   * security tracker.
-   * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - * @return The sourceUpdateTime. - */ - com.google.protobuf.Timestamp getSourceUpdateTime(); - /** - *
-   * The time this information was last changed at the source. This is an
-   * upstream timestamp from the underlying information source - e.g. Ubuntu
-   * security tracker.
-   * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder(); - - /** - *
-   * CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @return The enum numeric value on the wire for cvssVersion. - */ - int getCvssVersionValue(); - /** - *
-   * CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @return The cvssVersion. - */ - io.grafeas.v1.CVSSVersion getCvssVersion(); - - /** - *
-   * The full description of the v2 CVSS for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - * @return Whether the cvssV2 field is set. - */ - boolean hasCvssV2(); - /** - *
-   * The full description of the v2 CVSS for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - * @return The cvssV2. - */ - io.grafeas.v1.CVSS getCvssV2(); - /** - *
-   * The full description of the v2 CVSS for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java deleted file mode 100644 index 94bc5e1bf8fe..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java +++ /dev/null @@ -1,5542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/vulnerability.proto - -package io.grafeas.v1; - -/** - *
- * An occurrence of a severity vulnerability on a resource.
- * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence} - */ -public final class VulnerabilityOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityOccurrence) - VulnerabilityOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use VulnerabilityOccurrence.newBuilder() to construct. - private VulnerabilityOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private VulnerabilityOccurrence() { - type_ = ""; - severity_ = 0; - packageIssue_ = java.util.Collections.emptyList(); - shortDescription_ = ""; - longDescription_ = ""; - relatedUrls_ = java.util.Collections.emptyList(); - effectiveSeverity_ = 0; - cvssVersion_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new VulnerabilityOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityOccurrence.class, io.grafeas.v1.VulnerabilityOccurrence.Builder.class); - } - - public interface PackageIssueOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityOccurrence.PackageIssue) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability was found in.
-     * 
- * - * string affected_cpe_uri = 1; - * @return The affectedCpeUri. - */ - java.lang.String getAffectedCpeUri(); - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability was found in.
-     * 
- * - * string affected_cpe_uri = 1; - * @return The bytes for affectedCpeUri. - */ - com.google.protobuf.ByteString - getAffectedCpeUriBytes(); - - /** - *
-     * Required. The package this vulnerability was found in.
-     * 
- * - * string affected_package = 2; - * @return The affectedPackage. - */ - java.lang.String getAffectedPackage(); - /** - *
-     * Required. The package this vulnerability was found in.
-     * 
- * - * string affected_package = 2; - * @return The bytes for affectedPackage. - */ - com.google.protobuf.ByteString - getAffectedPackageBytes(); - - /** - *
-     * Required. The version of the package that is installed on the resource
-     * affected by this vulnerability.
-     * 
- * - * .grafeas.v1.Version affected_version = 3; - * @return Whether the affectedVersion field is set. - */ - boolean hasAffectedVersion(); - /** - *
-     * Required. The version of the package that is installed on the resource
-     * affected by this vulnerability.
-     * 
- * - * .grafeas.v1.Version affected_version = 3; - * @return The affectedVersion. - */ - io.grafeas.v1.Version getAffectedVersion(); - /** - *
-     * Required. The version of the package that is installed on the resource
-     * affected by this vulnerability.
-     * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - io.grafeas.v1.VersionOrBuilder getAffectedVersionOrBuilder(); - - /** - *
-     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-     * was fixed in. It is possible for this to be different from the
-     * affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 4; - * @return The fixedCpeUri. - */ - java.lang.String getFixedCpeUri(); - /** - *
-     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-     * was fixed in. It is possible for this to be different from the
-     * affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 4; - * @return The bytes for fixedCpeUri. - */ - com.google.protobuf.ByteString - getFixedCpeUriBytes(); - - /** - *
-     * The package this vulnerability was fixed in. It is possible for this to
-     * be different from the affected_package.
-     * 
- * - * string fixed_package = 5; - * @return The fixedPackage. - */ - java.lang.String getFixedPackage(); - /** - *
-     * The package this vulnerability was fixed in. It is possible for this to
-     * be different from the affected_package.
-     * 
- * - * string fixed_package = 5; - * @return The bytes for fixedPackage. - */ - com.google.protobuf.ByteString - getFixedPackageBytes(); - - /** - *
-     * Required. The version of the package this vulnerability was fixed in.
-     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 6; - * @return Whether the fixedVersion field is set. - */ - boolean hasFixedVersion(); - /** - *
-     * Required. The version of the package this vulnerability was fixed in.
-     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 6; - * @return The fixedVersion. - */ - io.grafeas.v1.Version getFixedVersion(); - /** - *
-     * Required. The version of the package this vulnerability was fixed in.
-     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder(); - - /** - *
-     * Output only. Whether a fix is available for this package.
-     * 
- * - * bool fix_available = 7; - * @return The fixAvailable. - */ - boolean getFixAvailable(); - - /** - *
-     * The type of package (e.g. OS, MAVEN, GO).
-     * 
- * - * string package_type = 8; - * @return The packageType. - */ - java.lang.String getPackageType(); - /** - *
-     * The type of package (e.g. OS, MAVEN, GO).
-     * 
- * - * string package_type = 8; - * @return The bytes for packageType. - */ - com.google.protobuf.ByteString - getPackageTypeBytes(); - - /** - *
-     * The distro or language system assigned severity for this vulnerability
-     * when that is available and note provider assigned severity when it is not
-     * available.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for effectiveSeverity. - */ - int getEffectiveSeverityValue(); - /** - *
-     * The distro or language system assigned severity for this vulnerability
-     * when that is available and note provider assigned severity when it is not
-     * available.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The effectiveSeverity. - */ - io.grafeas.v1.Severity getEffectiveSeverity(); - - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - java.util.List - getFileLocationList(); - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - io.grafeas.v1.FileLocation getFileLocation(int index); - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - int getFileLocationCount(); - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - java.util.List - getFileLocationOrBuilderList(); - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - io.grafeas.v1.FileLocationOrBuilder getFileLocationOrBuilder( - int index); - } - /** - *
-   * A detail for a distro and package this vulnerability occurrence was found
-   * in and its associated fix (if one is available).
-   * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.PackageIssue} - */ - public static final class PackageIssue extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityOccurrence.PackageIssue) - PackageIssueOrBuilder { - private static final long serialVersionUID = 0L; - // Use PackageIssue.newBuilder() to construct. - private PackageIssue(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PackageIssue() { - affectedCpeUri_ = ""; - affectedPackage_ = ""; - fixedCpeUri_ = ""; - fixedPackage_ = ""; - packageType_ = ""; - effectiveSeverity_ = 0; - fileLocation_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PackageIssue(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.class, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder.class); - } - - public static final int AFFECTED_CPE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object affectedCpeUri_ = ""; - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability was found in.
-     * 
- * - * string affected_cpe_uri = 1; - * @return The affectedCpeUri. - */ - @java.lang.Override - public java.lang.String getAffectedCpeUri() { - java.lang.Object ref = affectedCpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedCpeUri_ = s; - return s; - } - } - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability was found in.
-     * 
- * - * string affected_cpe_uri = 1; - * @return The bytes for affectedCpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAffectedCpeUriBytes() { - java.lang.Object ref = affectedCpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AFFECTED_PACKAGE_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object affectedPackage_ = ""; - /** - *
-     * Required. The package this vulnerability was found in.
-     * 
- * - * string affected_package = 2; - * @return The affectedPackage. - */ - @java.lang.Override - public java.lang.String getAffectedPackage() { - java.lang.Object ref = affectedPackage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedPackage_ = s; - return s; - } - } - /** - *
-     * Required. The package this vulnerability was found in.
-     * 
- * - * string affected_package = 2; - * @return The bytes for affectedPackage. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAffectedPackageBytes() { - java.lang.Object ref = affectedPackage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AFFECTED_VERSION_FIELD_NUMBER = 3; - private io.grafeas.v1.Version affectedVersion_; - /** - *
-     * Required. The version of the package that is installed on the resource
-     * affected by this vulnerability.
-     * 
- * - * .grafeas.v1.Version affected_version = 3; - * @return Whether the affectedVersion field is set. - */ - @java.lang.Override - public boolean hasAffectedVersion() { - return affectedVersion_ != null; - } - /** - *
-     * Required. The version of the package that is installed on the resource
-     * affected by this vulnerability.
-     * 
- * - * .grafeas.v1.Version affected_version = 3; - * @return The affectedVersion. - */ - @java.lang.Override - public io.grafeas.v1.Version getAffectedVersion() { - return affectedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; - } - /** - *
-     * Required. The version of the package that is installed on the resource
-     * affected by this vulnerability.
-     * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getAffectedVersionOrBuilder() { - return affectedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; - } - - public static final int FIXED_CPE_URI_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object fixedCpeUri_ = ""; - /** - *
-     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-     * was fixed in. It is possible for this to be different from the
-     * affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 4; - * @return The fixedCpeUri. - */ - @java.lang.Override - public java.lang.String getFixedCpeUri() { - java.lang.Object ref = fixedCpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedCpeUri_ = s; - return s; - } - } - /** - *
-     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-     * was fixed in. It is possible for this to be different from the
-     * affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 4; - * @return The bytes for fixedCpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFixedCpeUriBytes() { - java.lang.Object ref = fixedCpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FIXED_PACKAGE_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object fixedPackage_ = ""; - /** - *
-     * The package this vulnerability was fixed in. It is possible for this to
-     * be different from the affected_package.
-     * 
- * - * string fixed_package = 5; - * @return The fixedPackage. - */ - @java.lang.Override - public java.lang.String getFixedPackage() { - java.lang.Object ref = fixedPackage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedPackage_ = s; - return s; - } - } - /** - *
-     * The package this vulnerability was fixed in. It is possible for this to
-     * be different from the affected_package.
-     * 
- * - * string fixed_package = 5; - * @return The bytes for fixedPackage. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFixedPackageBytes() { - java.lang.Object ref = fixedPackage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FIXED_VERSION_FIELD_NUMBER = 6; - private io.grafeas.v1.Version fixedVersion_; - /** - *
-     * Required. The version of the package this vulnerability was fixed in.
-     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 6; - * @return Whether the fixedVersion field is set. - */ - @java.lang.Override - public boolean hasFixedVersion() { - return fixedVersion_ != null; - } - /** - *
-     * Required. The version of the package this vulnerability was fixed in.
-     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 6; - * @return The fixedVersion. - */ - @java.lang.Override - public io.grafeas.v1.Version getFixedVersion() { - return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } - /** - *
-     * Required. The version of the package this vulnerability was fixed in.
-     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { - return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } - - public static final int FIX_AVAILABLE_FIELD_NUMBER = 7; - private boolean fixAvailable_ = false; - /** - *
-     * Output only. Whether a fix is available for this package.
-     * 
- * - * bool fix_available = 7; - * @return The fixAvailable. - */ - @java.lang.Override - public boolean getFixAvailable() { - return fixAvailable_; - } - - public static final int PACKAGE_TYPE_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private volatile java.lang.Object packageType_ = ""; - /** - *
-     * The type of package (e.g. OS, MAVEN, GO).
-     * 
- * - * string package_type = 8; - * @return The packageType. - */ - @java.lang.Override - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } - } - /** - *
-     * The type of package (e.g. OS, MAVEN, GO).
-     * 
- * - * string package_type = 8; - * @return The bytes for packageType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EFFECTIVE_SEVERITY_FIELD_NUMBER = 9; - private int effectiveSeverity_ = 0; - /** - *
-     * The distro or language system assigned severity for this vulnerability
-     * when that is available and note provider assigned severity when it is not
-     * available.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for effectiveSeverity. - */ - @java.lang.Override public int getEffectiveSeverityValue() { - return effectiveSeverity_; - } - /** - *
-     * The distro or language system assigned severity for this vulnerability
-     * when that is available and note provider assigned severity when it is not
-     * available.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The effectiveSeverity. - */ - @java.lang.Override public io.grafeas.v1.Severity getEffectiveSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - - public static final int FILE_LOCATION_FIELD_NUMBER = 10; - @SuppressWarnings("serial") - private java.util.List fileLocation_; - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - @java.lang.Override - public java.util.List getFileLocationList() { - return fileLocation_; - } - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - @java.lang.Override - public java.util.List - getFileLocationOrBuilderList() { - return fileLocation_; - } - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - @java.lang.Override - public int getFileLocationCount() { - return fileLocation_.size(); - } - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - @java.lang.Override - public io.grafeas.v1.FileLocation getFileLocation(int index) { - return fileLocation_.get(index); - } - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - @java.lang.Override - public io.grafeas.v1.FileLocationOrBuilder getFileLocationOrBuilder( - int index) { - return fileLocation_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, affectedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, affectedPackage_); - } - if (affectedVersion_ != null) { - output.writeMessage(3, getAffectedVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, fixedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fixedPackage_); - } - if (fixedVersion_ != null) { - output.writeMessage(6, getFixedVersion()); - } - if (fixAvailable_ != false) { - output.writeBool(7, fixAvailable_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, packageType_); - } - if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - output.writeEnum(9, effectiveSeverity_); - } - for (int i = 0; i < fileLocation_.size(); i++) { - output.writeMessage(10, fileLocation_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, affectedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, affectedPackage_); - } - if (affectedVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getAffectedVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, fixedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, fixedPackage_); - } - if (fixedVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getFixedVersion()); - } - if (fixAvailable_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(7, fixAvailable_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, packageType_); - } - if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, effectiveSeverity_); - } - for (int i = 0; i < fileLocation_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, fileLocation_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.VulnerabilityOccurrence.PackageIssue)) { - return super.equals(obj); - } - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue other = (io.grafeas.v1.VulnerabilityOccurrence.PackageIssue) obj; - - if (!getAffectedCpeUri() - .equals(other.getAffectedCpeUri())) return false; - if (!getAffectedPackage() - .equals(other.getAffectedPackage())) return false; - if (hasAffectedVersion() != other.hasAffectedVersion()) return false; - if (hasAffectedVersion()) { - if (!getAffectedVersion() - .equals(other.getAffectedVersion())) return false; - } - if (!getFixedCpeUri() - .equals(other.getFixedCpeUri())) return false; - if (!getFixedPackage() - .equals(other.getFixedPackage())) return false; - if (hasFixedVersion() != other.hasFixedVersion()) return false; - if (hasFixedVersion()) { - if (!getFixedVersion() - .equals(other.getFixedVersion())) return false; - } - if (getFixAvailable() - != other.getFixAvailable()) return false; - if (!getPackageType() - .equals(other.getPackageType())) return false; - if (effectiveSeverity_ != other.effectiveSeverity_) return false; - if (!getFileLocationList() - .equals(other.getFileLocationList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + AFFECTED_CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getAffectedCpeUri().hashCode(); - hash = (37 * hash) + AFFECTED_PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getAffectedPackage().hashCode(); - if (hasAffectedVersion()) { - hash = (37 * hash) + AFFECTED_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getAffectedVersion().hashCode(); - } - hash = (37 * hash) + FIXED_CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getFixedCpeUri().hashCode(); - hash = (37 * hash) + FIXED_PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getFixedPackage().hashCode(); - if (hasFixedVersion()) { - hash = (37 * hash) + FIXED_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getFixedVersion().hashCode(); - } - hash = (37 * hash) + FIX_AVAILABLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getFixAvailable()); - hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getPackageType().hashCode(); - hash = (37 * hash) + EFFECTIVE_SEVERITY_FIELD_NUMBER; - hash = (53 * hash) + effectiveSeverity_; - if (getFileLocationCount() > 0) { - hash = (37 * hash) + FILE_LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getFileLocationList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A detail for a distro and package this vulnerability occurrence was found
-     * in and its associated fix (if one is available).
-     * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.PackageIssue} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityOccurrence.PackageIssue) - io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.class, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder.class); - } - - // Construct using io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - affectedCpeUri_ = ""; - affectedPackage_ = ""; - affectedVersion_ = null; - if (affectedVersionBuilder_ != null) { - affectedVersionBuilder_.dispose(); - affectedVersionBuilder_ = null; - } - fixedCpeUri_ = ""; - fixedPackage_ = ""; - fixedVersion_ = null; - if (fixedVersionBuilder_ != null) { - fixedVersionBuilder_.dispose(); - fixedVersionBuilder_ = null; - } - fixAvailable_ = false; - packageType_ = ""; - effectiveSeverity_ = 0; - if (fileLocationBuilder_ == null) { - fileLocation_ = java.util.Collections.emptyList(); - } else { - fileLocation_ = null; - fileLocationBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000200); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getDefaultInstanceForType() { - return io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue build() { - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue buildPartial() { - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result = new io.grafeas.v1.VulnerabilityOccurrence.PackageIssue(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result) { - if (fileLocationBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0)) { - fileLocation_ = java.util.Collections.unmodifiableList(fileLocation_); - bitField0_ = (bitField0_ & ~0x00000200); - } - result.fileLocation_ = fileLocation_; - } else { - result.fileLocation_ = fileLocationBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.affectedCpeUri_ = affectedCpeUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.affectedPackage_ = affectedPackage_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.affectedVersion_ = affectedVersionBuilder_ == null - ? affectedVersion_ - : affectedVersionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.fixedCpeUri_ = fixedCpeUri_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.fixedPackage_ = fixedPackage_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.fixedVersion_ = fixedVersionBuilder_ == null - ? fixedVersion_ - : fixedVersionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.fixAvailable_ = fixAvailable_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.packageType_ = packageType_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.effectiveSeverity_ = effectiveSeverity_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.VulnerabilityOccurrence.PackageIssue) { - return mergeFrom((io.grafeas.v1.VulnerabilityOccurrence.PackageIssue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue other) { - if (other == io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance()) return this; - if (!other.getAffectedCpeUri().isEmpty()) { - affectedCpeUri_ = other.affectedCpeUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getAffectedPackage().isEmpty()) { - affectedPackage_ = other.affectedPackage_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasAffectedVersion()) { - mergeAffectedVersion(other.getAffectedVersion()); - } - if (!other.getFixedCpeUri().isEmpty()) { - fixedCpeUri_ = other.fixedCpeUri_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getFixedPackage().isEmpty()) { - fixedPackage_ = other.fixedPackage_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasFixedVersion()) { - mergeFixedVersion(other.getFixedVersion()); - } - if (other.getFixAvailable() != false) { - setFixAvailable(other.getFixAvailable()); - } - if (!other.getPackageType().isEmpty()) { - packageType_ = other.packageType_; - bitField0_ |= 0x00000080; - onChanged(); - } - if (other.effectiveSeverity_ != 0) { - setEffectiveSeverityValue(other.getEffectiveSeverityValue()); - } - if (fileLocationBuilder_ == null) { - if (!other.fileLocation_.isEmpty()) { - if (fileLocation_.isEmpty()) { - fileLocation_ = other.fileLocation_; - bitField0_ = (bitField0_ & ~0x00000200); - } else { - ensureFileLocationIsMutable(); - fileLocation_.addAll(other.fileLocation_); - } - onChanged(); - } - } else { - if (!other.fileLocation_.isEmpty()) { - if (fileLocationBuilder_.isEmpty()) { - fileLocationBuilder_.dispose(); - fileLocationBuilder_ = null; - fileLocation_ = other.fileLocation_; - bitField0_ = (bitField0_ & ~0x00000200); - fileLocationBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFileLocationFieldBuilder() : null; - } else { - fileLocationBuilder_.addAllMessages(other.fileLocation_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - affectedCpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - affectedPackage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getAffectedVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - fixedCpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - fixedPackage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - input.readMessage( - getFixedVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 56: { - fixAvailable_ = input.readBool(); - bitField0_ |= 0x00000040; - break; - } // case 56 - case 66: { - packageType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 66 - case 72: { - effectiveSeverity_ = input.readEnum(); - bitField0_ |= 0x00000100; - break; - } // case 72 - case 82: { - io.grafeas.v1.FileLocation m = - input.readMessage( - io.grafeas.v1.FileLocation.parser(), - extensionRegistry); - if (fileLocationBuilder_ == null) { - ensureFileLocationIsMutable(); - fileLocation_.add(m); - } else { - fileLocationBuilder_.addMessage(m); - } - break; - } // case 82 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object affectedCpeUri_ = ""; - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability was found in.
-       * 
- * - * string affected_cpe_uri = 1; - * @return The affectedCpeUri. - */ - public java.lang.String getAffectedCpeUri() { - java.lang.Object ref = affectedCpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedCpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability was found in.
-       * 
- * - * string affected_cpe_uri = 1; - * @return The bytes for affectedCpeUri. - */ - public com.google.protobuf.ByteString - getAffectedCpeUriBytes() { - java.lang.Object ref = affectedCpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability was found in.
-       * 
- * - * string affected_cpe_uri = 1; - * @param value The affectedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setAffectedCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - affectedCpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability was found in.
-       * 
- * - * string affected_cpe_uri = 1; - * @return This builder for chaining. - */ - public Builder clearAffectedCpeUri() { - affectedCpeUri_ = getDefaultInstance().getAffectedCpeUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability was found in.
-       * 
- * - * string affected_cpe_uri = 1; - * @param value The bytes for affectedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setAffectedCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - affectedCpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object affectedPackage_ = ""; - /** - *
-       * Required. The package this vulnerability was found in.
-       * 
- * - * string affected_package = 2; - * @return The affectedPackage. - */ - public java.lang.String getAffectedPackage() { - java.lang.Object ref = affectedPackage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedPackage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The package this vulnerability was found in.
-       * 
- * - * string affected_package = 2; - * @return The bytes for affectedPackage. - */ - public com.google.protobuf.ByteString - getAffectedPackageBytes() { - java.lang.Object ref = affectedPackage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The package this vulnerability was found in.
-       * 
- * - * string affected_package = 2; - * @param value The affectedPackage to set. - * @return This builder for chaining. - */ - public Builder setAffectedPackage( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - affectedPackage_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * Required. The package this vulnerability was found in.
-       * 
- * - * string affected_package = 2; - * @return This builder for chaining. - */ - public Builder clearAffectedPackage() { - affectedPackage_ = getDefaultInstance().getAffectedPackage(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-       * Required. The package this vulnerability was found in.
-       * 
- * - * string affected_package = 2; - * @param value The bytes for affectedPackage to set. - * @return This builder for chaining. - */ - public Builder setAffectedPackageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - affectedPackage_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private io.grafeas.v1.Version affectedVersion_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> affectedVersionBuilder_; - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - * @return Whether the affectedVersion field is set. - */ - public boolean hasAffectedVersion() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - * @return The affectedVersion. - */ - public io.grafeas.v1.Version getAffectedVersion() { - if (affectedVersionBuilder_ == null) { - return affectedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; - } else { - return affectedVersionBuilder_.getMessage(); - } - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - public Builder setAffectedVersion(io.grafeas.v1.Version value) { - if (affectedVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - affectedVersion_ = value; - } else { - affectedVersionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - public Builder setAffectedVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (affectedVersionBuilder_ == null) { - affectedVersion_ = builderForValue.build(); - } else { - affectedVersionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - public Builder mergeAffectedVersion(io.grafeas.v1.Version value) { - if (affectedVersionBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - affectedVersion_ != null && - affectedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { - getAffectedVersionBuilder().mergeFrom(value); - } else { - affectedVersion_ = value; - } - } else { - affectedVersionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - public Builder clearAffectedVersion() { - bitField0_ = (bitField0_ & ~0x00000004); - affectedVersion_ = null; - if (affectedVersionBuilder_ != null) { - affectedVersionBuilder_.dispose(); - affectedVersionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - public io.grafeas.v1.Version.Builder getAffectedVersionBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getAffectedVersionFieldBuilder().getBuilder(); - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - public io.grafeas.v1.VersionOrBuilder getAffectedVersionOrBuilder() { - if (affectedVersionBuilder_ != null) { - return affectedVersionBuilder_.getMessageOrBuilder(); - } else { - return affectedVersion_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; - } - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getAffectedVersionFieldBuilder() { - if (affectedVersionBuilder_ == null) { - affectedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getAffectedVersion(), - getParentForChildren(), - isClean()); - affectedVersion_ = null; - } - return affectedVersionBuilder_; - } - - private java.lang.Object fixedCpeUri_ = ""; - /** - *
-       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-       * was fixed in. It is possible for this to be different from the
-       * affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 4; - * @return The fixedCpeUri. - */ - public java.lang.String getFixedCpeUri() { - java.lang.Object ref = fixedCpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedCpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-       * was fixed in. It is possible for this to be different from the
-       * affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 4; - * @return The bytes for fixedCpeUri. - */ - public com.google.protobuf.ByteString - getFixedCpeUriBytes() { - java.lang.Object ref = fixedCpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-       * was fixed in. It is possible for this to be different from the
-       * affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 4; - * @param value The fixedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setFixedCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fixedCpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-       * was fixed in. It is possible for this to be different from the
-       * affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 4; - * @return This builder for chaining. - */ - public Builder clearFixedCpeUri() { - fixedCpeUri_ = getDefaultInstance().getFixedCpeUri(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-       * was fixed in. It is possible for this to be different from the
-       * affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 4; - * @param value The bytes for fixedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setFixedCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fixedCpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object fixedPackage_ = ""; - /** - *
-       * The package this vulnerability was fixed in. It is possible for this to
-       * be different from the affected_package.
-       * 
- * - * string fixed_package = 5; - * @return The fixedPackage. - */ - public java.lang.String getFixedPackage() { - java.lang.Object ref = fixedPackage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedPackage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The package this vulnerability was fixed in. It is possible for this to
-       * be different from the affected_package.
-       * 
- * - * string fixed_package = 5; - * @return The bytes for fixedPackage. - */ - public com.google.protobuf.ByteString - getFixedPackageBytes() { - java.lang.Object ref = fixedPackage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The package this vulnerability was fixed in. It is possible for this to
-       * be different from the affected_package.
-       * 
- * - * string fixed_package = 5; - * @param value The fixedPackage to set. - * @return This builder for chaining. - */ - public Builder setFixedPackage( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fixedPackage_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-       * The package this vulnerability was fixed in. It is possible for this to
-       * be different from the affected_package.
-       * 
- * - * string fixed_package = 5; - * @return This builder for chaining. - */ - public Builder clearFixedPackage() { - fixedPackage_ = getDefaultInstance().getFixedPackage(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-       * The package this vulnerability was fixed in. It is possible for this to
-       * be different from the affected_package.
-       * 
- * - * string fixed_package = 5; - * @param value The bytes for fixedPackage to set. - * @return This builder for chaining. - */ - public Builder setFixedPackageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fixedPackage_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private io.grafeas.v1.Version fixedVersion_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> fixedVersionBuilder_; - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - * @return Whether the fixedVersion field is set. - */ - public boolean hasFixedVersion() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - * @return The fixedVersion. - */ - public io.grafeas.v1.Version getFixedVersion() { - if (fixedVersionBuilder_ == null) { - return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } else { - return fixedVersionBuilder_.getMessage(); - } - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - public Builder setFixedVersion(io.grafeas.v1.Version value) { - if (fixedVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fixedVersion_ = value; - } else { - fixedVersionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - public Builder setFixedVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (fixedVersionBuilder_ == null) { - fixedVersion_ = builderForValue.build(); - } else { - fixedVersionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - public Builder mergeFixedVersion(io.grafeas.v1.Version value) { - if (fixedVersionBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - fixedVersion_ != null && - fixedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { - getFixedVersionBuilder().mergeFrom(value); - } else { - fixedVersion_ = value; - } - } else { - fixedVersionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - public Builder clearFixedVersion() { - bitField0_ = (bitField0_ & ~0x00000020); - fixedVersion_ = null; - if (fixedVersionBuilder_ != null) { - fixedVersionBuilder_.dispose(); - fixedVersionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - public io.grafeas.v1.Version.Builder getFixedVersionBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getFixedVersionFieldBuilder().getBuilder(); - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { - if (fixedVersionBuilder_ != null) { - return fixedVersionBuilder_.getMessageOrBuilder(); - } else { - return fixedVersion_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getFixedVersionFieldBuilder() { - if (fixedVersionBuilder_ == null) { - fixedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getFixedVersion(), - getParentForChildren(), - isClean()); - fixedVersion_ = null; - } - return fixedVersionBuilder_; - } - - private boolean fixAvailable_ ; - /** - *
-       * Output only. Whether a fix is available for this package.
-       * 
- * - * bool fix_available = 7; - * @return The fixAvailable. - */ - @java.lang.Override - public boolean getFixAvailable() { - return fixAvailable_; - } - /** - *
-       * Output only. Whether a fix is available for this package.
-       * 
- * - * bool fix_available = 7; - * @param value The fixAvailable to set. - * @return This builder for chaining. - */ - public Builder setFixAvailable(boolean value) { - - fixAvailable_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-       * Output only. Whether a fix is available for this package.
-       * 
- * - * bool fix_available = 7; - * @return This builder for chaining. - */ - public Builder clearFixAvailable() { - bitField0_ = (bitField0_ & ~0x00000040); - fixAvailable_ = false; - onChanged(); - return this; - } - - private java.lang.Object packageType_ = ""; - /** - *
-       * The type of package (e.g. OS, MAVEN, GO).
-       * 
- * - * string package_type = 8; - * @return The packageType. - */ - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The type of package (e.g. OS, MAVEN, GO).
-       * 
- * - * string package_type = 8; - * @return The bytes for packageType. - */ - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The type of package (e.g. OS, MAVEN, GO).
-       * 
- * - * string package_type = 8; - * @param value The packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - packageType_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-       * The type of package (e.g. OS, MAVEN, GO).
-       * 
- * - * string package_type = 8; - * @return This builder for chaining. - */ - public Builder clearPackageType() { - packageType_ = getDefaultInstance().getPackageType(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - /** - *
-       * The type of package (e.g. OS, MAVEN, GO).
-       * 
- * - * string package_type = 8; - * @param value The bytes for packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - packageType_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - private int effectiveSeverity_ = 0; - /** - *
-       * The distro or language system assigned severity for this vulnerability
-       * when that is available and note provider assigned severity when it is not
-       * available.
-       * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for effectiveSeverity. - */ - @java.lang.Override public int getEffectiveSeverityValue() { - return effectiveSeverity_; - } - /** - *
-       * The distro or language system assigned severity for this vulnerability
-       * when that is available and note provider assigned severity when it is not
-       * available.
-       * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The enum numeric value on the wire for effectiveSeverity to set. - * @return This builder for chaining. - */ - public Builder setEffectiveSeverityValue(int value) { - effectiveSeverity_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-       * The distro or language system assigned severity for this vulnerability
-       * when that is available and note provider assigned severity when it is not
-       * available.
-       * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The effectiveSeverity. - */ - @java.lang.Override - public io.grafeas.v1.Severity getEffectiveSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - /** - *
-       * The distro or language system assigned severity for this vulnerability
-       * when that is available and note provider assigned severity when it is not
-       * available.
-       * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The effectiveSeverity to set. - * @return This builder for chaining. - */ - public Builder setEffectiveSeverity(io.grafeas.v1.Severity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - effectiveSeverity_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The distro or language system assigned severity for this vulnerability
-       * when that is available and note provider assigned severity when it is not
-       * available.
-       * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearEffectiveSeverity() { - bitField0_ = (bitField0_ & ~0x00000100); - effectiveSeverity_ = 0; - onChanged(); - return this; - } - - private java.util.List fileLocation_ = - java.util.Collections.emptyList(); - private void ensureFileLocationIsMutable() { - if (!((bitField0_ & 0x00000200) != 0)) { - fileLocation_ = new java.util.ArrayList(fileLocation_); - bitField0_ |= 0x00000200; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.FileLocation, io.grafeas.v1.FileLocation.Builder, io.grafeas.v1.FileLocationOrBuilder> fileLocationBuilder_; - - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public java.util.List getFileLocationList() { - if (fileLocationBuilder_ == null) { - return java.util.Collections.unmodifiableList(fileLocation_); - } else { - return fileLocationBuilder_.getMessageList(); - } - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public int getFileLocationCount() { - if (fileLocationBuilder_ == null) { - return fileLocation_.size(); - } else { - return fileLocationBuilder_.getCount(); - } - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public io.grafeas.v1.FileLocation getFileLocation(int index) { - if (fileLocationBuilder_ == null) { - return fileLocation_.get(index); - } else { - return fileLocationBuilder_.getMessage(index); - } - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder setFileLocation( - int index, io.grafeas.v1.FileLocation value) { - if (fileLocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileLocationIsMutable(); - fileLocation_.set(index, value); - onChanged(); - } else { - fileLocationBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder setFileLocation( - int index, io.grafeas.v1.FileLocation.Builder builderForValue) { - if (fileLocationBuilder_ == null) { - ensureFileLocationIsMutable(); - fileLocation_.set(index, builderForValue.build()); - onChanged(); - } else { - fileLocationBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder addFileLocation(io.grafeas.v1.FileLocation value) { - if (fileLocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileLocationIsMutable(); - fileLocation_.add(value); - onChanged(); - } else { - fileLocationBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder addFileLocation( - int index, io.grafeas.v1.FileLocation value) { - if (fileLocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileLocationIsMutable(); - fileLocation_.add(index, value); - onChanged(); - } else { - fileLocationBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder addFileLocation( - io.grafeas.v1.FileLocation.Builder builderForValue) { - if (fileLocationBuilder_ == null) { - ensureFileLocationIsMutable(); - fileLocation_.add(builderForValue.build()); - onChanged(); - } else { - fileLocationBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder addFileLocation( - int index, io.grafeas.v1.FileLocation.Builder builderForValue) { - if (fileLocationBuilder_ == null) { - ensureFileLocationIsMutable(); - fileLocation_.add(index, builderForValue.build()); - onChanged(); - } else { - fileLocationBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder addAllFileLocation( - java.lang.Iterable values) { - if (fileLocationBuilder_ == null) { - ensureFileLocationIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fileLocation_); - onChanged(); - } else { - fileLocationBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder clearFileLocation() { - if (fileLocationBuilder_ == null) { - fileLocation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - } else { - fileLocationBuilder_.clear(); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder removeFileLocation(int index) { - if (fileLocationBuilder_ == null) { - ensureFileLocationIsMutable(); - fileLocation_.remove(index); - onChanged(); - } else { - fileLocationBuilder_.remove(index); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public io.grafeas.v1.FileLocation.Builder getFileLocationBuilder( - int index) { - return getFileLocationFieldBuilder().getBuilder(index); - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public io.grafeas.v1.FileLocationOrBuilder getFileLocationOrBuilder( - int index) { - if (fileLocationBuilder_ == null) { - return fileLocation_.get(index); } else { - return fileLocationBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public java.util.List - getFileLocationOrBuilderList() { - if (fileLocationBuilder_ != null) { - return fileLocationBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fileLocation_); - } - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public io.grafeas.v1.FileLocation.Builder addFileLocationBuilder() { - return getFileLocationFieldBuilder().addBuilder( - io.grafeas.v1.FileLocation.getDefaultInstance()); - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public io.grafeas.v1.FileLocation.Builder addFileLocationBuilder( - int index) { - return getFileLocationFieldBuilder().addBuilder( - index, io.grafeas.v1.FileLocation.getDefaultInstance()); - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public java.util.List - getFileLocationBuilderList() { - return getFileLocationFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.FileLocation, io.grafeas.v1.FileLocation.Builder, io.grafeas.v1.FileLocationOrBuilder> - getFileLocationFieldBuilder() { - if (fileLocationBuilder_ == null) { - fileLocationBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.FileLocation, io.grafeas.v1.FileLocation.Builder, io.grafeas.v1.FileLocationOrBuilder>( - fileLocation_, - ((bitField0_ & 0x00000200) != 0), - getParentForChildren(), - isClean()); - fileLocation_ = null; - } - return fileLocationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityOccurrence.PackageIssue) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityOccurrence.PackageIssue) - private static final io.grafeas.v1.VulnerabilityOccurrence.PackageIssue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityOccurrence.PackageIssue(); - } - - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PackageIssue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int TYPE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object type_ = ""; - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems, node.js
-   * packages, etc.).
-   * 
- * - * string type = 1; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } - } - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems, node.js
-   * packages, etc.).
-   * 
- * - * string type = 1; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SEVERITY_FIELD_NUMBER = 2; - private int severity_ = 0; - /** - *
-   * Output only. The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override public int getSeverityValue() { - return severity_; - } - /** - *
-   * Output only. The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - @java.lang.Override public io.grafeas.v1.Severity getSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - - public static final int CVSS_SCORE_FIELD_NUMBER = 3; - private float cvssScore_ = 0F; - /** - *
-   * Output only. The CVSS score of this vulnerability. CVSS score is on a
-   * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
-   * severity.
-   * 
- * - * float cvss_score = 3; - * @return The cvssScore. - */ - @java.lang.Override - public float getCvssScore() { - return cvssScore_; - } - - public static final int CVSSV3_FIELD_NUMBER = 10; - private io.grafeas.v1.CVSS cvssv3_; - /** - *
-   * The cvss v3 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - * @return Whether the cvssv3 field is set. - */ - @java.lang.Override - public boolean hasCvssv3() { - return cvssv3_ != null; - } - /** - *
-   * The cvss v3 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - * @return The cvssv3. - */ - @java.lang.Override - public io.grafeas.v1.CVSS getCvssv3() { - return cvssv3_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; - } - /** - *
-   * The cvss v3 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - @java.lang.Override - public io.grafeas.v1.CVSSOrBuilder getCvssv3OrBuilder() { - return cvssv3_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; - } - - public static final int PACKAGE_ISSUE_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List packageIssue_; - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - @java.lang.Override - public java.util.List getPackageIssueList() { - return packageIssue_; - } - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - @java.lang.Override - public java.util.List - getPackageIssueOrBuilderList() { - return packageIssue_; - } - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - @java.lang.Override - public int getPackageIssueCount() { - return packageIssue_.size(); - } - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getPackageIssue(int index) { - return packageIssue_.get(index); - } - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder getPackageIssueOrBuilder( - int index) { - return packageIssue_.get(index); - } - - public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object shortDescription_ = ""; - /** - *
-   * Output only. A one sentence description of this vulnerability.
-   * 
- * - * string short_description = 5; - * @return The shortDescription. - */ - @java.lang.Override - public java.lang.String getShortDescription() { - java.lang.Object ref = shortDescription_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - shortDescription_ = s; - return s; - } - } - /** - *
-   * Output only. A one sentence description of this vulnerability.
-   * 
- * - * string short_description = 5; - * @return The bytes for shortDescription. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getShortDescriptionBytes() { - java.lang.Object ref = shortDescription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - shortDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LONG_DESCRIPTION_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private volatile java.lang.Object longDescription_ = ""; - /** - *
-   * Output only. A detailed description of this vulnerability.
-   * 
- * - * string long_description = 6; - * @return The longDescription. - */ - @java.lang.Override - public java.lang.String getLongDescription() { - java.lang.Object ref = longDescription_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - longDescription_ = s; - return s; - } - } - /** - *
-   * Output only. A detailed description of this vulnerability.
-   * 
- * - * string long_description = 6; - * @return The bytes for longDescription. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLongDescriptionBytes() { - java.lang.Object ref = longDescription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - longDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RELATED_URLS_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private java.util.List relatedUrls_; - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - @java.lang.Override - public java.util.List getRelatedUrlsList() { - return relatedUrls_; - } - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - @java.lang.Override - public java.util.List - getRelatedUrlsOrBuilderList() { - return relatedUrls_; - } - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - @java.lang.Override - public int getRelatedUrlsCount() { - return relatedUrls_.size(); - } - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - @java.lang.Override - public io.grafeas.v1.RelatedUrl getRelatedUrls(int index) { - return relatedUrls_.get(index); - } - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - @java.lang.Override - public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlsOrBuilder( - int index) { - return relatedUrls_.get(index); - } - - public static final int EFFECTIVE_SEVERITY_FIELD_NUMBER = 8; - private int effectiveSeverity_ = 0; - /** - *
-   * The distro assigned severity for this vulnerability when it is available,
-   * otherwise this is the note provider assigned severity.
-   * When there are multiple PackageIssues for this vulnerability, they can have
-   * different effective severities because some might be provided by the distro
-   * while others are provided by the language ecosystem for a language pack.
-   * For this reason, it is advised to use the effective severity on the
-   * PackageIssue level. In the case where multiple PackageIssues have differing
-   * effective severities, this field should be the highest severity for any of
-   * the PackageIssues.
-   * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @return The enum numeric value on the wire for effectiveSeverity. - */ - @java.lang.Override public int getEffectiveSeverityValue() { - return effectiveSeverity_; - } - /** - *
-   * The distro assigned severity for this vulnerability when it is available,
-   * otherwise this is the note provider assigned severity.
-   * When there are multiple PackageIssues for this vulnerability, they can have
-   * different effective severities because some might be provided by the distro
-   * while others are provided by the language ecosystem for a language pack.
-   * For this reason, it is advised to use the effective severity on the
-   * PackageIssue level. In the case where multiple PackageIssues have differing
-   * effective severities, this field should be the highest severity for any of
-   * the PackageIssues.
-   * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @return The effectiveSeverity. - */ - @java.lang.Override public io.grafeas.v1.Severity getEffectiveSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - - public static final int FIX_AVAILABLE_FIELD_NUMBER = 9; - private boolean fixAvailable_ = false; - /** - *
-   * Output only. Whether at least one of the affected packages has a fix
-   * available.
-   * 
- * - * bool fix_available = 9; - * @return The fixAvailable. - */ - @java.lang.Override - public boolean getFixAvailable() { - return fixAvailable_; - } - - public static final int CVSS_VERSION_FIELD_NUMBER = 11; - private int cvssVersion_ = 0; - /** - *
-   * Output only. CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @return The enum numeric value on the wire for cvssVersion. - */ - @java.lang.Override public int getCvssVersionValue() { - return cvssVersion_; - } - /** - *
-   * Output only. CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @return The cvssVersion. - */ - @java.lang.Override public io.grafeas.v1.CVSSVersion getCvssVersion() { - io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); - return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; - } - - public static final int CVSS_V2_FIELD_NUMBER = 12; - private io.grafeas.v1.CVSS cvssV2_; - /** - *
-   * The cvss v2 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - * @return Whether the cvssV2 field is set. - */ - @java.lang.Override - public boolean hasCvssV2() { - return cvssV2_ != null; - } - /** - *
-   * The cvss v2 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - * @return The cvssV2. - */ - @java.lang.Override - public io.grafeas.v1.CVSS getCvssV2() { - return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } - /** - *
-   * The cvss v2 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - @java.lang.Override - public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { - return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); - } - if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - output.writeEnum(2, severity_); - } - if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { - output.writeFloat(3, cvssScore_); - } - for (int i = 0; i < packageIssue_.size(); i++) { - output.writeMessage(4, packageIssue_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, shortDescription_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, longDescription_); - } - for (int i = 0; i < relatedUrls_.size(); i++) { - output.writeMessage(7, relatedUrls_.get(i)); - } - if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - output.writeEnum(8, effectiveSeverity_); - } - if (fixAvailable_ != false) { - output.writeBool(9, fixAvailable_); - } - if (cvssv3_ != null) { - output.writeMessage(10, getCvssv3()); - } - if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { - output.writeEnum(11, cvssVersion_); - } - if (cvssV2_ != null) { - output.writeMessage(12, getCvssV2()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); - } - if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, severity_); - } - if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, cvssScore_); - } - for (int i = 0; i < packageIssue_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, packageIssue_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, shortDescription_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, longDescription_); - } - for (int i = 0; i < relatedUrls_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, relatedUrls_.get(i)); - } - if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(8, effectiveSeverity_); - } - if (fixAvailable_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(9, fixAvailable_); - } - if (cvssv3_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getCvssv3()); - } - if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, cvssVersion_); - } - if (cvssV2_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getCvssV2()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.VulnerabilityOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.VulnerabilityOccurrence other = (io.grafeas.v1.VulnerabilityOccurrence) obj; - - if (!getType() - .equals(other.getType())) return false; - if (severity_ != other.severity_) return false; - if (java.lang.Float.floatToIntBits(getCvssScore()) - != java.lang.Float.floatToIntBits( - other.getCvssScore())) return false; - if (hasCvssv3() != other.hasCvssv3()) return false; - if (hasCvssv3()) { - if (!getCvssv3() - .equals(other.getCvssv3())) return false; - } - if (!getPackageIssueList() - .equals(other.getPackageIssueList())) return false; - if (!getShortDescription() - .equals(other.getShortDescription())) return false; - if (!getLongDescription() - .equals(other.getLongDescription())) return false; - if (!getRelatedUrlsList() - .equals(other.getRelatedUrlsList())) return false; - if (effectiveSeverity_ != other.effectiveSeverity_) return false; - if (getFixAvailable() - != other.getFixAvailable()) return false; - if (cvssVersion_ != other.cvssVersion_) return false; - if (hasCvssV2() != other.hasCvssV2()) return false; - if (hasCvssV2()) { - if (!getCvssV2() - .equals(other.getCvssV2())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - hash = (37 * hash) + SEVERITY_FIELD_NUMBER; - hash = (53 * hash) + severity_; - hash = (37 * hash) + CVSS_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getCvssScore()); - if (hasCvssv3()) { - hash = (37 * hash) + CVSSV3_FIELD_NUMBER; - hash = (53 * hash) + getCvssv3().hashCode(); - } - if (getPackageIssueCount() > 0) { - hash = (37 * hash) + PACKAGE_ISSUE_FIELD_NUMBER; - hash = (53 * hash) + getPackageIssueList().hashCode(); - } - hash = (37 * hash) + SHORT_DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getShortDescription().hashCode(); - hash = (37 * hash) + LONG_DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getLongDescription().hashCode(); - if (getRelatedUrlsCount() > 0) { - hash = (37 * hash) + RELATED_URLS_FIELD_NUMBER; - hash = (53 * hash) + getRelatedUrlsList().hashCode(); - } - hash = (37 * hash) + EFFECTIVE_SEVERITY_FIELD_NUMBER; - hash = (53 * hash) + effectiveSeverity_; - hash = (37 * hash) + FIX_AVAILABLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getFixAvailable()); - hash = (37 * hash) + CVSS_VERSION_FIELD_NUMBER; - hash = (53 * hash) + cvssVersion_; - if (hasCvssV2()) { - hash = (37 * hash) + CVSS_V2_FIELD_NUMBER; - hash = (53 * hash) + getCvssV2().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An occurrence of a severity vulnerability on a resource.
-   * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityOccurrence) - io.grafeas.v1.VulnerabilityOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityOccurrence.class, io.grafeas.v1.VulnerabilityOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.VulnerabilityOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = ""; - severity_ = 0; - cvssScore_ = 0F; - cvssv3_ = null; - if (cvssv3Builder_ != null) { - cvssv3Builder_.dispose(); - cvssv3Builder_ = null; - } - if (packageIssueBuilder_ == null) { - packageIssue_ = java.util.Collections.emptyList(); - } else { - packageIssue_ = null; - packageIssueBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - shortDescription_ = ""; - longDescription_ = ""; - if (relatedUrlsBuilder_ == null) { - relatedUrls_ = java.util.Collections.emptyList(); - } else { - relatedUrls_ = null; - relatedUrlsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000080); - effectiveSeverity_ = 0; - fixAvailable_ = false; - cvssVersion_ = 0; - cvssV2_ = null; - if (cvssV2Builder_ != null) { - cvssV2Builder_.dispose(); - cvssV2Builder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence build() { - io.grafeas.v1.VulnerabilityOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence buildPartial() { - io.grafeas.v1.VulnerabilityOccurrence result = new io.grafeas.v1.VulnerabilityOccurrence(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityOccurrence result) { - if (packageIssueBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - packageIssue_ = java.util.Collections.unmodifiableList(packageIssue_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.packageIssue_ = packageIssue_; - } else { - result.packageIssue_ = packageIssueBuilder_.build(); - } - if (relatedUrlsBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0)) { - relatedUrls_ = java.util.Collections.unmodifiableList(relatedUrls_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.relatedUrls_ = relatedUrls_; - } else { - result.relatedUrls_ = relatedUrlsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.VulnerabilityOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.severity_ = severity_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.cvssScore_ = cvssScore_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.cvssv3_ = cvssv3Builder_ == null - ? cvssv3_ - : cvssv3Builder_.build(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.shortDescription_ = shortDescription_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.longDescription_ = longDescription_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.effectiveSeverity_ = effectiveSeverity_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.fixAvailable_ = fixAvailable_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.cvssVersion_ = cvssVersion_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.cvssV2_ = cvssV2Builder_ == null - ? cvssV2_ - : cvssV2Builder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.VulnerabilityOccurrence) { - return mergeFrom((io.grafeas.v1.VulnerabilityOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence other) { - if (other == io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.severity_ != 0) { - setSeverityValue(other.getSeverityValue()); - } - if (other.getCvssScore() != 0F) { - setCvssScore(other.getCvssScore()); - } - if (other.hasCvssv3()) { - mergeCvssv3(other.getCvssv3()); - } - if (packageIssueBuilder_ == null) { - if (!other.packageIssue_.isEmpty()) { - if (packageIssue_.isEmpty()) { - packageIssue_ = other.packageIssue_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensurePackageIssueIsMutable(); - packageIssue_.addAll(other.packageIssue_); - } - onChanged(); - } - } else { - if (!other.packageIssue_.isEmpty()) { - if (packageIssueBuilder_.isEmpty()) { - packageIssueBuilder_.dispose(); - packageIssueBuilder_ = null; - packageIssue_ = other.packageIssue_; - bitField0_ = (bitField0_ & ~0x00000010); - packageIssueBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPackageIssueFieldBuilder() : null; - } else { - packageIssueBuilder_.addAllMessages(other.packageIssue_); - } - } - } - if (!other.getShortDescription().isEmpty()) { - shortDescription_ = other.shortDescription_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (!other.getLongDescription().isEmpty()) { - longDescription_ = other.longDescription_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (relatedUrlsBuilder_ == null) { - if (!other.relatedUrls_.isEmpty()) { - if (relatedUrls_.isEmpty()) { - relatedUrls_ = other.relatedUrls_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureRelatedUrlsIsMutable(); - relatedUrls_.addAll(other.relatedUrls_); - } - onChanged(); - } - } else { - if (!other.relatedUrls_.isEmpty()) { - if (relatedUrlsBuilder_.isEmpty()) { - relatedUrlsBuilder_.dispose(); - relatedUrlsBuilder_ = null; - relatedUrls_ = other.relatedUrls_; - bitField0_ = (bitField0_ & ~0x00000080); - relatedUrlsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRelatedUrlsFieldBuilder() : null; - } else { - relatedUrlsBuilder_.addAllMessages(other.relatedUrls_); - } - } - } - if (other.effectiveSeverity_ != 0) { - setEffectiveSeverityValue(other.getEffectiveSeverityValue()); - } - if (other.getFixAvailable() != false) { - setFixAvailable(other.getFixAvailable()); - } - if (other.cvssVersion_ != 0) { - setCvssVersionValue(other.getCvssVersionValue()); - } - if (other.hasCvssV2()) { - mergeCvssV2(other.getCvssV2()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - type_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - severity_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 29: { - cvssScore_ = input.readFloat(); - bitField0_ |= 0x00000004; - break; - } // case 29 - case 34: { - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue m = - input.readMessage( - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.parser(), - extensionRegistry); - if (packageIssueBuilder_ == null) { - ensurePackageIssueIsMutable(); - packageIssue_.add(m); - } else { - packageIssueBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: { - shortDescription_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 42 - case 50: { - longDescription_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 50 - case 58: { - io.grafeas.v1.RelatedUrl m = - input.readMessage( - io.grafeas.v1.RelatedUrl.parser(), - extensionRegistry); - if (relatedUrlsBuilder_ == null) { - ensureRelatedUrlsIsMutable(); - relatedUrls_.add(m); - } else { - relatedUrlsBuilder_.addMessage(m); - } - break; - } // case 58 - case 64: { - effectiveSeverity_ = input.readEnum(); - bitField0_ |= 0x00000100; - break; - } // case 64 - case 72: { - fixAvailable_ = input.readBool(); - bitField0_ |= 0x00000200; - break; - } // case 72 - case 82: { - input.readMessage( - getCvssv3FieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 82 - case 88: { - cvssVersion_ = input.readEnum(); - bitField0_ |= 0x00000400; - break; - } // case 88 - case 98: { - input.readMessage( - getCvssV2FieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000800; - break; - } // case 98 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object type_ = ""; - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems, node.js
-     * packages, etc.).
-     * 
- * - * string type = 1; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems, node.js
-     * packages, etc.).
-     * 
- * - * string type = 1; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems, node.js
-     * packages, etc.).
-     * 
- * - * string type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems, node.js
-     * packages, etc.).
-     * 
- * - * string type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - type_ = getDefaultInstance().getType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems, node.js
-     * packages, etc.).
-     * 
- * - * string type = 1; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int severity_ = 0; - /** - *
-     * Output only. The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override public int getSeverityValue() { - return severity_; - } - /** - *
-     * Output only. The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @param value The enum numeric value on the wire for severity to set. - * @return This builder for chaining. - */ - public Builder setSeverityValue(int value) { - severity_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Output only. The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - @java.lang.Override - public io.grafeas.v1.Severity getSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - /** - *
-     * Output only. The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @param value The severity to set. - * @return This builder for chaining. - */ - public Builder setSeverity(io.grafeas.v1.Severity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - severity_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @return This builder for chaining. - */ - public Builder clearSeverity() { - bitField0_ = (bitField0_ & ~0x00000002); - severity_ = 0; - onChanged(); - return this; - } - - private float cvssScore_ ; - /** - *
-     * Output only. The CVSS score of this vulnerability. CVSS score is on a
-     * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
-     * severity.
-     * 
- * - * float cvss_score = 3; - * @return The cvssScore. - */ - @java.lang.Override - public float getCvssScore() { - return cvssScore_; - } - /** - *
-     * Output only. The CVSS score of this vulnerability. CVSS score is on a
-     * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
-     * severity.
-     * 
- * - * float cvss_score = 3; - * @param value The cvssScore to set. - * @return This builder for chaining. - */ - public Builder setCvssScore(float value) { - - cvssScore_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Output only. The CVSS score of this vulnerability. CVSS score is on a
-     * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
-     * severity.
-     * 
- * - * float cvss_score = 3; - * @return This builder for chaining. - */ - public Builder clearCvssScore() { - bitField0_ = (bitField0_ & ~0x00000004); - cvssScore_ = 0F; - onChanged(); - return this; - } - - private io.grafeas.v1.CVSS cvssv3_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> cvssv3Builder_; - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - * @return Whether the cvssv3 field is set. - */ - public boolean hasCvssv3() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - * @return The cvssv3. - */ - public io.grafeas.v1.CVSS getCvssv3() { - if (cvssv3Builder_ == null) { - return cvssv3_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; - } else { - return cvssv3Builder_.getMessage(); - } - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - public Builder setCvssv3(io.grafeas.v1.CVSS value) { - if (cvssv3Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cvssv3_ = value; - } else { - cvssv3Builder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - public Builder setCvssv3( - io.grafeas.v1.CVSS.Builder builderForValue) { - if (cvssv3Builder_ == null) { - cvssv3_ = builderForValue.build(); - } else { - cvssv3Builder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - public Builder mergeCvssv3(io.grafeas.v1.CVSS value) { - if (cvssv3Builder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - cvssv3_ != null && - cvssv3_ != io.grafeas.v1.CVSS.getDefaultInstance()) { - getCvssv3Builder().mergeFrom(value); - } else { - cvssv3_ = value; - } - } else { - cvssv3Builder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - public Builder clearCvssv3() { - bitField0_ = (bitField0_ & ~0x00000008); - cvssv3_ = null; - if (cvssv3Builder_ != null) { - cvssv3Builder_.dispose(); - cvssv3Builder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - public io.grafeas.v1.CVSS.Builder getCvssv3Builder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCvssv3FieldBuilder().getBuilder(); - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - public io.grafeas.v1.CVSSOrBuilder getCvssv3OrBuilder() { - if (cvssv3Builder_ != null) { - return cvssv3Builder_.getMessageOrBuilder(); - } else { - return cvssv3_ == null ? - io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; - } - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> - getCvssv3FieldBuilder() { - if (cvssv3Builder_ == null) { - cvssv3Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( - getCvssv3(), - getParentForChildren(), - isClean()); - cvssv3_ = null; - } - return cvssv3Builder_; - } - - private java.util.List packageIssue_ = - java.util.Collections.emptyList(); - private void ensurePackageIssueIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - packageIssue_ = new java.util.ArrayList(packageIssue_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder, io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder> packageIssueBuilder_; - - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public java.util.List getPackageIssueList() { - if (packageIssueBuilder_ == null) { - return java.util.Collections.unmodifiableList(packageIssue_); - } else { - return packageIssueBuilder_.getMessageList(); - } - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public int getPackageIssueCount() { - if (packageIssueBuilder_ == null) { - return packageIssue_.size(); - } else { - return packageIssueBuilder_.getCount(); - } - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getPackageIssue(int index) { - if (packageIssueBuilder_ == null) { - return packageIssue_.get(index); - } else { - return packageIssueBuilder_.getMessage(index); - } - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder setPackageIssue( - int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue value) { - if (packageIssueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePackageIssueIsMutable(); - packageIssue_.set(index, value); - onChanged(); - } else { - packageIssueBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder setPackageIssue( - int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder builderForValue) { - if (packageIssueBuilder_ == null) { - ensurePackageIssueIsMutable(); - packageIssue_.set(index, builderForValue.build()); - onChanged(); - } else { - packageIssueBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder addPackageIssue(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue value) { - if (packageIssueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePackageIssueIsMutable(); - packageIssue_.add(value); - onChanged(); - } else { - packageIssueBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder addPackageIssue( - int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue value) { - if (packageIssueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePackageIssueIsMutable(); - packageIssue_.add(index, value); - onChanged(); - } else { - packageIssueBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder addPackageIssue( - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder builderForValue) { - if (packageIssueBuilder_ == null) { - ensurePackageIssueIsMutable(); - packageIssue_.add(builderForValue.build()); - onChanged(); - } else { - packageIssueBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder addPackageIssue( - int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder builderForValue) { - if (packageIssueBuilder_ == null) { - ensurePackageIssueIsMutable(); - packageIssue_.add(index, builderForValue.build()); - onChanged(); - } else { - packageIssueBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder addAllPackageIssue( - java.lang.Iterable values) { - if (packageIssueBuilder_ == null) { - ensurePackageIssueIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, packageIssue_); - onChanged(); - } else { - packageIssueBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder clearPackageIssue() { - if (packageIssueBuilder_ == null) { - packageIssue_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - packageIssueBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder removePackageIssue(int index) { - if (packageIssueBuilder_ == null) { - ensurePackageIssueIsMutable(); - packageIssue_.remove(index); - onChanged(); - } else { - packageIssueBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder getPackageIssueBuilder( - int index) { - return getPackageIssueFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder getPackageIssueOrBuilder( - int index) { - if (packageIssueBuilder_ == null) { - return packageIssue_.get(index); } else { - return packageIssueBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public java.util.List - getPackageIssueOrBuilderList() { - if (packageIssueBuilder_ != null) { - return packageIssueBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(packageIssue_); - } - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder addPackageIssueBuilder() { - return getPackageIssueFieldBuilder().addBuilder( - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance()); - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder addPackageIssueBuilder( - int index) { - return getPackageIssueFieldBuilder().addBuilder( - index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance()); - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public java.util.List - getPackageIssueBuilderList() { - return getPackageIssueFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder, io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder> - getPackageIssueFieldBuilder() { - if (packageIssueBuilder_ == null) { - packageIssueBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder, io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder>( - packageIssue_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - packageIssue_ = null; - } - return packageIssueBuilder_; - } - - private java.lang.Object shortDescription_ = ""; - /** - *
-     * Output only. A one sentence description of this vulnerability.
-     * 
- * - * string short_description = 5; - * @return The shortDescription. - */ - public java.lang.String getShortDescription() { - java.lang.Object ref = shortDescription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - shortDescription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. A one sentence description of this vulnerability.
-     * 
- * - * string short_description = 5; - * @return The bytes for shortDescription. - */ - public com.google.protobuf.ByteString - getShortDescriptionBytes() { - java.lang.Object ref = shortDescription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - shortDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. A one sentence description of this vulnerability.
-     * 
- * - * string short_description = 5; - * @param value The shortDescription to set. - * @return This builder for chaining. - */ - public Builder setShortDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - shortDescription_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Output only. A one sentence description of this vulnerability.
-     * 
- * - * string short_description = 5; - * @return This builder for chaining. - */ - public Builder clearShortDescription() { - shortDescription_ = getDefaultInstance().getShortDescription(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * Output only. A one sentence description of this vulnerability.
-     * 
- * - * string short_description = 5; - * @param value The bytes for shortDescription to set. - * @return This builder for chaining. - */ - public Builder setShortDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - shortDescription_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private java.lang.Object longDescription_ = ""; - /** - *
-     * Output only. A detailed description of this vulnerability.
-     * 
- * - * string long_description = 6; - * @return The longDescription. - */ - public java.lang.String getLongDescription() { - java.lang.Object ref = longDescription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - longDescription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. A detailed description of this vulnerability.
-     * 
- * - * string long_description = 6; - * @return The bytes for longDescription. - */ - public com.google.protobuf.ByteString - getLongDescriptionBytes() { - java.lang.Object ref = longDescription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - longDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. A detailed description of this vulnerability.
-     * 
- * - * string long_description = 6; - * @param value The longDescription to set. - * @return This builder for chaining. - */ - public Builder setLongDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - longDescription_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Output only. A detailed description of this vulnerability.
-     * 
- * - * string long_description = 6; - * @return This builder for chaining. - */ - public Builder clearLongDescription() { - longDescription_ = getDefaultInstance().getLongDescription(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - *
-     * Output only. A detailed description of this vulnerability.
-     * 
- * - * string long_description = 6; - * @param value The bytes for longDescription to set. - * @return This builder for chaining. - */ - public Builder setLongDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - longDescription_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private java.util.List relatedUrls_ = - java.util.Collections.emptyList(); - private void ensureRelatedUrlsIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { - relatedUrls_ = new java.util.ArrayList(relatedUrls_); - bitField0_ |= 0x00000080; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> relatedUrlsBuilder_; - - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public java.util.List getRelatedUrlsList() { - if (relatedUrlsBuilder_ == null) { - return java.util.Collections.unmodifiableList(relatedUrls_); - } else { - return relatedUrlsBuilder_.getMessageList(); - } - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public int getRelatedUrlsCount() { - if (relatedUrlsBuilder_ == null) { - return relatedUrls_.size(); - } else { - return relatedUrlsBuilder_.getCount(); - } - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public io.grafeas.v1.RelatedUrl getRelatedUrls(int index) { - if (relatedUrlsBuilder_ == null) { - return relatedUrls_.get(index); - } else { - return relatedUrlsBuilder_.getMessage(index); - } - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder setRelatedUrls( - int index, io.grafeas.v1.RelatedUrl value) { - if (relatedUrlsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedUrlsIsMutable(); - relatedUrls_.set(index, value); - onChanged(); - } else { - relatedUrlsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder setRelatedUrls( - int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { - if (relatedUrlsBuilder_ == null) { - ensureRelatedUrlsIsMutable(); - relatedUrls_.set(index, builderForValue.build()); - onChanged(); - } else { - relatedUrlsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder addRelatedUrls(io.grafeas.v1.RelatedUrl value) { - if (relatedUrlsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedUrlsIsMutable(); - relatedUrls_.add(value); - onChanged(); - } else { - relatedUrlsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder addRelatedUrls( - int index, io.grafeas.v1.RelatedUrl value) { - if (relatedUrlsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedUrlsIsMutable(); - relatedUrls_.add(index, value); - onChanged(); - } else { - relatedUrlsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder addRelatedUrls( - io.grafeas.v1.RelatedUrl.Builder builderForValue) { - if (relatedUrlsBuilder_ == null) { - ensureRelatedUrlsIsMutable(); - relatedUrls_.add(builderForValue.build()); - onChanged(); - } else { - relatedUrlsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder addRelatedUrls( - int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { - if (relatedUrlsBuilder_ == null) { - ensureRelatedUrlsIsMutable(); - relatedUrls_.add(index, builderForValue.build()); - onChanged(); - } else { - relatedUrlsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder addAllRelatedUrls( - java.lang.Iterable values) { - if (relatedUrlsBuilder_ == null) { - ensureRelatedUrlsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, relatedUrls_); - onChanged(); - } else { - relatedUrlsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder clearRelatedUrls() { - if (relatedUrlsBuilder_ == null) { - relatedUrls_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - } else { - relatedUrlsBuilder_.clear(); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder removeRelatedUrls(int index) { - if (relatedUrlsBuilder_ == null) { - ensureRelatedUrlsIsMutable(); - relatedUrls_.remove(index); - onChanged(); - } else { - relatedUrlsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public io.grafeas.v1.RelatedUrl.Builder getRelatedUrlsBuilder( - int index) { - return getRelatedUrlsFieldBuilder().getBuilder(index); - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlsOrBuilder( - int index) { - if (relatedUrlsBuilder_ == null) { - return relatedUrls_.get(index); } else { - return relatedUrlsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public java.util.List - getRelatedUrlsOrBuilderList() { - if (relatedUrlsBuilder_ != null) { - return relatedUrlsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(relatedUrls_); - } - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlsBuilder() { - return getRelatedUrlsFieldBuilder().addBuilder( - io.grafeas.v1.RelatedUrl.getDefaultInstance()); - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlsBuilder( - int index) { - return getRelatedUrlsFieldBuilder().addBuilder( - index, io.grafeas.v1.RelatedUrl.getDefaultInstance()); - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public java.util.List - getRelatedUrlsBuilderList() { - return getRelatedUrlsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> - getRelatedUrlsFieldBuilder() { - if (relatedUrlsBuilder_ == null) { - relatedUrlsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder>( - relatedUrls_, - ((bitField0_ & 0x00000080) != 0), - getParentForChildren(), - isClean()); - relatedUrls_ = null; - } - return relatedUrlsBuilder_; - } - - private int effectiveSeverity_ = 0; - /** - *
-     * The distro assigned severity for this vulnerability when it is available,
-     * otherwise this is the note provider assigned severity.
-     * When there are multiple PackageIssues for this vulnerability, they can have
-     * different effective severities because some might be provided by the distro
-     * while others are provided by the language ecosystem for a language pack.
-     * For this reason, it is advised to use the effective severity on the
-     * PackageIssue level. In the case where multiple PackageIssues have differing
-     * effective severities, this field should be the highest severity for any of
-     * the PackageIssues.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @return The enum numeric value on the wire for effectiveSeverity. - */ - @java.lang.Override public int getEffectiveSeverityValue() { - return effectiveSeverity_; - } - /** - *
-     * The distro assigned severity for this vulnerability when it is available,
-     * otherwise this is the note provider assigned severity.
-     * When there are multiple PackageIssues for this vulnerability, they can have
-     * different effective severities because some might be provided by the distro
-     * while others are provided by the language ecosystem for a language pack.
-     * For this reason, it is advised to use the effective severity on the
-     * PackageIssue level. In the case where multiple PackageIssues have differing
-     * effective severities, this field should be the highest severity for any of
-     * the PackageIssues.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @param value The enum numeric value on the wire for effectiveSeverity to set. - * @return This builder for chaining. - */ - public Builder setEffectiveSeverityValue(int value) { - effectiveSeverity_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * The distro assigned severity for this vulnerability when it is available,
-     * otherwise this is the note provider assigned severity.
-     * When there are multiple PackageIssues for this vulnerability, they can have
-     * different effective severities because some might be provided by the distro
-     * while others are provided by the language ecosystem for a language pack.
-     * For this reason, it is advised to use the effective severity on the
-     * PackageIssue level. In the case where multiple PackageIssues have differing
-     * effective severities, this field should be the highest severity for any of
-     * the PackageIssues.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @return The effectiveSeverity. - */ - @java.lang.Override - public io.grafeas.v1.Severity getEffectiveSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - /** - *
-     * The distro assigned severity for this vulnerability when it is available,
-     * otherwise this is the note provider assigned severity.
-     * When there are multiple PackageIssues for this vulnerability, they can have
-     * different effective severities because some might be provided by the distro
-     * while others are provided by the language ecosystem for a language pack.
-     * For this reason, it is advised to use the effective severity on the
-     * PackageIssue level. In the case where multiple PackageIssues have differing
-     * effective severities, this field should be the highest severity for any of
-     * the PackageIssues.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @param value The effectiveSeverity to set. - * @return This builder for chaining. - */ - public Builder setEffectiveSeverity(io.grafeas.v1.Severity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - effectiveSeverity_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The distro assigned severity for this vulnerability when it is available,
-     * otherwise this is the note provider assigned severity.
-     * When there are multiple PackageIssues for this vulnerability, they can have
-     * different effective severities because some might be provided by the distro
-     * while others are provided by the language ecosystem for a language pack.
-     * For this reason, it is advised to use the effective severity on the
-     * PackageIssue level. In the case where multiple PackageIssues have differing
-     * effective severities, this field should be the highest severity for any of
-     * the PackageIssues.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @return This builder for chaining. - */ - public Builder clearEffectiveSeverity() { - bitField0_ = (bitField0_ & ~0x00000100); - effectiveSeverity_ = 0; - onChanged(); - return this; - } - - private boolean fixAvailable_ ; - /** - *
-     * Output only. Whether at least one of the affected packages has a fix
-     * available.
-     * 
- * - * bool fix_available = 9; - * @return The fixAvailable. - */ - @java.lang.Override - public boolean getFixAvailable() { - return fixAvailable_; - } - /** - *
-     * Output only. Whether at least one of the affected packages has a fix
-     * available.
-     * 
- * - * bool fix_available = 9; - * @param value The fixAvailable to set. - * @return This builder for chaining. - */ - public Builder setFixAvailable(boolean value) { - - fixAvailable_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * Output only. Whether at least one of the affected packages has a fix
-     * available.
-     * 
- * - * bool fix_available = 9; - * @return This builder for chaining. - */ - public Builder clearFixAvailable() { - bitField0_ = (bitField0_ & ~0x00000200); - fixAvailable_ = false; - onChanged(); - return this; - } - - private int cvssVersion_ = 0; - /** - *
-     * Output only. CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @return The enum numeric value on the wire for cvssVersion. - */ - @java.lang.Override public int getCvssVersionValue() { - return cvssVersion_; - } - /** - *
-     * Output only. CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @param value The enum numeric value on the wire for cvssVersion to set. - * @return This builder for chaining. - */ - public Builder setCvssVersionValue(int value) { - cvssVersion_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - *
-     * Output only. CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @return The cvssVersion. - */ - @java.lang.Override - public io.grafeas.v1.CVSSVersion getCvssVersion() { - io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); - return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; - } - /** - *
-     * Output only. CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @param value The cvssVersion to set. - * @return This builder for chaining. - */ - public Builder setCvssVersion(io.grafeas.v1.CVSSVersion value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - cvssVersion_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @return This builder for chaining. - */ - public Builder clearCvssVersion() { - bitField0_ = (bitField0_ & ~0x00000400); - cvssVersion_ = 0; - onChanged(); - return this; - } - - private io.grafeas.v1.CVSS cvssV2_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> cvssV2Builder_; - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - * @return Whether the cvssV2 field is set. - */ - public boolean hasCvssV2() { - return ((bitField0_ & 0x00000800) != 0); - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - * @return The cvssV2. - */ - public io.grafeas.v1.CVSS getCvssV2() { - if (cvssV2Builder_ == null) { - return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } else { - return cvssV2Builder_.getMessage(); - } - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - public Builder setCvssV2(io.grafeas.v1.CVSS value) { - if (cvssV2Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cvssV2_ = value; - } else { - cvssV2Builder_.setMessage(value); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - public Builder setCvssV2( - io.grafeas.v1.CVSS.Builder builderForValue) { - if (cvssV2Builder_ == null) { - cvssV2_ = builderForValue.build(); - } else { - cvssV2Builder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - public Builder mergeCvssV2(io.grafeas.v1.CVSS value) { - if (cvssV2Builder_ == null) { - if (((bitField0_ & 0x00000800) != 0) && - cvssV2_ != null && - cvssV2_ != io.grafeas.v1.CVSS.getDefaultInstance()) { - getCvssV2Builder().mergeFrom(value); - } else { - cvssV2_ = value; - } - } else { - cvssV2Builder_.mergeFrom(value); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - public Builder clearCvssV2() { - bitField0_ = (bitField0_ & ~0x00000800); - cvssV2_ = null; - if (cvssV2Builder_ != null) { - cvssV2Builder_.dispose(); - cvssV2Builder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - public io.grafeas.v1.CVSS.Builder getCvssV2Builder() { - bitField0_ |= 0x00000800; - onChanged(); - return getCvssV2FieldBuilder().getBuilder(); - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { - if (cvssV2Builder_ != null) { - return cvssV2Builder_.getMessageOrBuilder(); - } else { - return cvssV2_ == null ? - io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> - getCvssV2FieldBuilder() { - if (cvssV2Builder_ == null) { - cvssV2Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( - getCvssV2(), - getParentForChildren(), - isClean()); - cvssV2_ = null; - } - return cvssV2Builder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityOccurrence) - private static final io.grafeas.v1.VulnerabilityOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityOccurrence(); - } - - public static io.grafeas.v1.VulnerabilityOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VulnerabilityOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java deleted file mode 100644 index 5f02f3065344..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java +++ /dev/null @@ -1,314 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/vulnerability.proto - -package io.grafeas.v1; - -public interface VulnerabilityOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems, node.js
-   * packages, etc.).
-   * 
- * - * string type = 1; - * @return The type. - */ - java.lang.String getType(); - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems, node.js
-   * packages, etc.).
-   * 
- * - * string type = 1; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - *
-   * Output only. The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - int getSeverityValue(); - /** - *
-   * Output only. The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - io.grafeas.v1.Severity getSeverity(); - - /** - *
-   * Output only. The CVSS score of this vulnerability. CVSS score is on a
-   * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
-   * severity.
-   * 
- * - * float cvss_score = 3; - * @return The cvssScore. - */ - float getCvssScore(); - - /** - *
-   * The cvss v3 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - * @return Whether the cvssv3 field is set. - */ - boolean hasCvssv3(); - /** - *
-   * The cvss v3 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - * @return The cvssv3. - */ - io.grafeas.v1.CVSS getCvssv3(); - /** - *
-   * The cvss v3 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - io.grafeas.v1.CVSSOrBuilder getCvssv3OrBuilder(); - - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - java.util.List - getPackageIssueList(); - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getPackageIssue(int index); - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - int getPackageIssueCount(); - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - java.util.List - getPackageIssueOrBuilderList(); - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder getPackageIssueOrBuilder( - int index); - - /** - *
-   * Output only. A one sentence description of this vulnerability.
-   * 
- * - * string short_description = 5; - * @return The shortDescription. - */ - java.lang.String getShortDescription(); - /** - *
-   * Output only. A one sentence description of this vulnerability.
-   * 
- * - * string short_description = 5; - * @return The bytes for shortDescription. - */ - com.google.protobuf.ByteString - getShortDescriptionBytes(); - - /** - *
-   * Output only. A detailed description of this vulnerability.
-   * 
- * - * string long_description = 6; - * @return The longDescription. - */ - java.lang.String getLongDescription(); - /** - *
-   * Output only. A detailed description of this vulnerability.
-   * 
- * - * string long_description = 6; - * @return The bytes for longDescription. - */ - com.google.protobuf.ByteString - getLongDescriptionBytes(); - - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - java.util.List - getRelatedUrlsList(); - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - io.grafeas.v1.RelatedUrl getRelatedUrls(int index); - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - int getRelatedUrlsCount(); - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - java.util.List - getRelatedUrlsOrBuilderList(); - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlsOrBuilder( - int index); - - /** - *
-   * The distro assigned severity for this vulnerability when it is available,
-   * otherwise this is the note provider assigned severity.
-   * When there are multiple PackageIssues for this vulnerability, they can have
-   * different effective severities because some might be provided by the distro
-   * while others are provided by the language ecosystem for a language pack.
-   * For this reason, it is advised to use the effective severity on the
-   * PackageIssue level. In the case where multiple PackageIssues have differing
-   * effective severities, this field should be the highest severity for any of
-   * the PackageIssues.
-   * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @return The enum numeric value on the wire for effectiveSeverity. - */ - int getEffectiveSeverityValue(); - /** - *
-   * The distro assigned severity for this vulnerability when it is available,
-   * otherwise this is the note provider assigned severity.
-   * When there are multiple PackageIssues for this vulnerability, they can have
-   * different effective severities because some might be provided by the distro
-   * while others are provided by the language ecosystem for a language pack.
-   * For this reason, it is advised to use the effective severity on the
-   * PackageIssue level. In the case where multiple PackageIssues have differing
-   * effective severities, this field should be the highest severity for any of
-   * the PackageIssues.
-   * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @return The effectiveSeverity. - */ - io.grafeas.v1.Severity getEffectiveSeverity(); - - /** - *
-   * Output only. Whether at least one of the affected packages has a fix
-   * available.
-   * 
- * - * bool fix_available = 9; - * @return The fixAvailable. - */ - boolean getFixAvailable(); - - /** - *
-   * Output only. CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @return The enum numeric value on the wire for cvssVersion. - */ - int getCvssVersionValue(); - /** - *
-   * Output only. CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @return The cvssVersion. - */ - io.grafeas.v1.CVSSVersion getCvssVersion(); - - /** - *
-   * The cvss v2 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - * @return Whether the cvssV2 field is set. - */ - boolean hasCvssV2(); - /** - *
-   * The cvss v2 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - * @return The cvssV2. - */ - io.grafeas.v1.CVSS getCvssV2(); - /** - *
-   * The cvss v2 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java deleted file mode 100644 index 1491d466fd35..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java +++ /dev/null @@ -1,3538 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -/** - *
- * Windows Update represents the metadata about the update for the Windows
- * operating system. The fields in this message come from the Windows Update API
- * documented at
- * https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate.
- * 
- * - * Protobuf type {@code grafeas.v1.WindowsUpdate} - */ -public final class WindowsUpdate extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.WindowsUpdate) - WindowsUpdateOrBuilder { -private static final long serialVersionUID = 0L; - // Use WindowsUpdate.newBuilder() to construct. - private WindowsUpdate(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WindowsUpdate() { - title_ = ""; - description_ = ""; - categories_ = java.util.Collections.emptyList(); - kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - supportUrl_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WindowsUpdate(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.WindowsUpdate.class, io.grafeas.v1.WindowsUpdate.Builder.class); - } - - public interface IdentityOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.WindowsUpdate.Identity) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The revision independent identifier of the update.
-     * 
- * - * string update_id = 1; - * @return The updateId. - */ - java.lang.String getUpdateId(); - /** - *
-     * The revision independent identifier of the update.
-     * 
- * - * string update_id = 1; - * @return The bytes for updateId. - */ - com.google.protobuf.ByteString - getUpdateIdBytes(); - - /** - *
-     * The revision number of the update.
-     * 
- * - * int32 revision = 2; - * @return The revision. - */ - int getRevision(); - } - /** - *
-   * The unique identifier of the update.
-   * 
- * - * Protobuf type {@code grafeas.v1.WindowsUpdate.Identity} - */ - public static final class Identity extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.WindowsUpdate.Identity) - IdentityOrBuilder { - private static final long serialVersionUID = 0L; - // Use Identity.newBuilder() to construct. - private Identity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Identity() { - updateId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Identity(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.WindowsUpdate.Identity.class, io.grafeas.v1.WindowsUpdate.Identity.Builder.class); - } - - public static final int UPDATE_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object updateId_ = ""; - /** - *
-     * The revision independent identifier of the update.
-     * 
- * - * string update_id = 1; - * @return The updateId. - */ - @java.lang.Override - public java.lang.String getUpdateId() { - java.lang.Object ref = updateId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - updateId_ = s; - return s; - } - } - /** - *
-     * The revision independent identifier of the update.
-     * 
- * - * string update_id = 1; - * @return The bytes for updateId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUpdateIdBytes() { - java.lang.Object ref = updateId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - updateId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REVISION_FIELD_NUMBER = 2; - private int revision_ = 0; - /** - *
-     * The revision number of the update.
-     * 
- * - * int32 revision = 2; - * @return The revision. - */ - @java.lang.Override - public int getRevision() { - return revision_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, updateId_); - } - if (revision_ != 0) { - output.writeInt32(2, revision_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, updateId_); - } - if (revision_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, revision_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.WindowsUpdate.Identity)) { - return super.equals(obj); - } - io.grafeas.v1.WindowsUpdate.Identity other = (io.grafeas.v1.WindowsUpdate.Identity) obj; - - if (!getUpdateId() - .equals(other.getUpdateId())) return false; - if (getRevision() - != other.getRevision()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + UPDATE_ID_FIELD_NUMBER; - hash = (53 * hash) + getUpdateId().hashCode(); - hash = (37 * hash) + REVISION_FIELD_NUMBER; - hash = (53 * hash) + getRevision(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.WindowsUpdate.Identity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * The unique identifier of the update.
-     * 
- * - * Protobuf type {@code grafeas.v1.WindowsUpdate.Identity} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.WindowsUpdate.Identity) - io.grafeas.v1.WindowsUpdate.IdentityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.WindowsUpdate.Identity.class, io.grafeas.v1.WindowsUpdate.Identity.Builder.class); - } - - // Construct using io.grafeas.v1.WindowsUpdate.Identity.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - updateId_ = ""; - revision_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Identity getDefaultInstanceForType() { - return io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Identity build() { - io.grafeas.v1.WindowsUpdate.Identity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Identity buildPartial() { - io.grafeas.v1.WindowsUpdate.Identity result = new io.grafeas.v1.WindowsUpdate.Identity(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.WindowsUpdate.Identity result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.updateId_ = updateId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.revision_ = revision_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.WindowsUpdate.Identity) { - return mergeFrom((io.grafeas.v1.WindowsUpdate.Identity)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.WindowsUpdate.Identity other) { - if (other == io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance()) return this; - if (!other.getUpdateId().isEmpty()) { - updateId_ = other.updateId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getRevision() != 0) { - setRevision(other.getRevision()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - updateId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - revision_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object updateId_ = ""; - /** - *
-       * The revision independent identifier of the update.
-       * 
- * - * string update_id = 1; - * @return The updateId. - */ - public java.lang.String getUpdateId() { - java.lang.Object ref = updateId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - updateId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The revision independent identifier of the update.
-       * 
- * - * string update_id = 1; - * @return The bytes for updateId. - */ - public com.google.protobuf.ByteString - getUpdateIdBytes() { - java.lang.Object ref = updateId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - updateId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The revision independent identifier of the update.
-       * 
- * - * string update_id = 1; - * @param value The updateId to set. - * @return This builder for chaining. - */ - public Builder setUpdateId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - updateId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * The revision independent identifier of the update.
-       * 
- * - * string update_id = 1; - * @return This builder for chaining. - */ - public Builder clearUpdateId() { - updateId_ = getDefaultInstance().getUpdateId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * The revision independent identifier of the update.
-       * 
- * - * string update_id = 1; - * @param value The bytes for updateId to set. - * @return This builder for chaining. - */ - public Builder setUpdateIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - updateId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int revision_ ; - /** - *
-       * The revision number of the update.
-       * 
- * - * int32 revision = 2; - * @return The revision. - */ - @java.lang.Override - public int getRevision() { - return revision_; - } - /** - *
-       * The revision number of the update.
-       * 
- * - * int32 revision = 2; - * @param value The revision to set. - * @return This builder for chaining. - */ - public Builder setRevision(int value) { - - revision_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * The revision number of the update.
-       * 
- * - * int32 revision = 2; - * @return This builder for chaining. - */ - public Builder clearRevision() { - bitField0_ = (bitField0_ & ~0x00000002); - revision_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.WindowsUpdate.Identity) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate.Identity) - private static final io.grafeas.v1.WindowsUpdate.Identity DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.WindowsUpdate.Identity(); - } - - public static io.grafeas.v1.WindowsUpdate.Identity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Identity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Identity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface CategoryOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.WindowsUpdate.Category) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The identifier of the category.
-     * 
- * - * string category_id = 1; - * @return The categoryId. - */ - java.lang.String getCategoryId(); - /** - *
-     * The identifier of the category.
-     * 
- * - * string category_id = 1; - * @return The bytes for categoryId. - */ - com.google.protobuf.ByteString - getCategoryIdBytes(); - - /** - *
-     * The localized name of the category.
-     * 
- * - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * The localized name of the category.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - } - /** - *
-   * The category to which the update belongs.
-   * 
- * - * Protobuf type {@code grafeas.v1.WindowsUpdate.Category} - */ - public static final class Category extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.WindowsUpdate.Category) - CategoryOrBuilder { - private static final long serialVersionUID = 0L; - // Use Category.newBuilder() to construct. - private Category(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Category() { - categoryId_ = ""; - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Category(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.WindowsUpdate.Category.class, io.grafeas.v1.WindowsUpdate.Category.Builder.class); - } - - public static final int CATEGORY_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object categoryId_ = ""; - /** - *
-     * The identifier of the category.
-     * 
- * - * string category_id = 1; - * @return The categoryId. - */ - @java.lang.Override - public java.lang.String getCategoryId() { - java.lang.Object ref = categoryId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - categoryId_ = s; - return s; - } - } - /** - *
-     * The identifier of the category.
-     * 
- * - * string category_id = 1; - * @return The bytes for categoryId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCategoryIdBytes() { - java.lang.Object ref = categoryId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - categoryId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-     * The localized name of the category.
-     * 
- * - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-     * The localized name of the category.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(categoryId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, categoryId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(categoryId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, categoryId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.WindowsUpdate.Category)) { - return super.equals(obj); - } - io.grafeas.v1.WindowsUpdate.Category other = (io.grafeas.v1.WindowsUpdate.Category) obj; - - if (!getCategoryId() - .equals(other.getCategoryId())) return false; - if (!getName() - .equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CATEGORY_ID_FIELD_NUMBER; - hash = (53 * hash) + getCategoryId().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Category parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate.Category parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.WindowsUpdate.Category prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * The category to which the update belongs.
-     * 
- * - * Protobuf type {@code grafeas.v1.WindowsUpdate.Category} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.WindowsUpdate.Category) - io.grafeas.v1.WindowsUpdate.CategoryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.WindowsUpdate.Category.class, io.grafeas.v1.WindowsUpdate.Category.Builder.class); - } - - // Construct using io.grafeas.v1.WindowsUpdate.Category.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - categoryId_ = ""; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Category getDefaultInstanceForType() { - return io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Category build() { - io.grafeas.v1.WindowsUpdate.Category result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Category buildPartial() { - io.grafeas.v1.WindowsUpdate.Category result = new io.grafeas.v1.WindowsUpdate.Category(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.WindowsUpdate.Category result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.categoryId_ = categoryId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.WindowsUpdate.Category) { - return mergeFrom((io.grafeas.v1.WindowsUpdate.Category)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.WindowsUpdate.Category other) { - if (other == io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance()) return this; - if (!other.getCategoryId().isEmpty()) { - categoryId_ = other.categoryId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - categoryId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object categoryId_ = ""; - /** - *
-       * The identifier of the category.
-       * 
- * - * string category_id = 1; - * @return The categoryId. - */ - public java.lang.String getCategoryId() { - java.lang.Object ref = categoryId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - categoryId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The identifier of the category.
-       * 
- * - * string category_id = 1; - * @return The bytes for categoryId. - */ - public com.google.protobuf.ByteString - getCategoryIdBytes() { - java.lang.Object ref = categoryId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - categoryId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The identifier of the category.
-       * 
- * - * string category_id = 1; - * @param value The categoryId to set. - * @return This builder for chaining. - */ - public Builder setCategoryId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - categoryId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * The identifier of the category.
-       * 
- * - * string category_id = 1; - * @return This builder for chaining. - */ - public Builder clearCategoryId() { - categoryId_ = getDefaultInstance().getCategoryId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * The identifier of the category.
-       * 
- * - * string category_id = 1; - * @param value The bytes for categoryId to set. - * @return This builder for chaining. - */ - public Builder setCategoryIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - categoryId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-       * The localized name of the category.
-       * 
- * - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The localized name of the category.
-       * 
- * - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The localized name of the category.
-       * 
- * - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * The localized name of the category.
-       * 
- * - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-       * The localized name of the category.
-       * 
- * - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.WindowsUpdate.Category) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate.Category) - private static final io.grafeas.v1.WindowsUpdate.Category DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.WindowsUpdate.Category(); - } - - public static io.grafeas.v1.WindowsUpdate.Category getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Category parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Category getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int IDENTITY_FIELD_NUMBER = 1; - private io.grafeas.v1.WindowsUpdate.Identity identity_; - /** - *
-   * Required - The unique identifier for the update.
-   * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @return Whether the identity field is set. - */ - @java.lang.Override - public boolean hasIdentity() { - return identity_ != null; - } - /** - *
-   * Required - The unique identifier for the update.
-   * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @return The identity. - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Identity getIdentity() { - return identity_ == null ? io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; - } - /** - *
-   * Required - The unique identifier for the update.
-   * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.IdentityOrBuilder getIdentityOrBuilder() { - return identity_ == null ? io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; - } - - public static final int TITLE_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; - /** - *
-   * The localized title of the update.
-   * 
- * - * string title = 2; - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } - } - /** - *
-   * The localized title of the update.
-   * 
- * - * string title = 2; - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * The localized description of the update.
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * The localized description of the update.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CATEGORIES_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List categories_; - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - @java.lang.Override - public java.util.List getCategoriesList() { - return categories_; - } - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - @java.lang.Override - public java.util.List - getCategoriesOrBuilderList() { - return categories_; - } - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - @java.lang.Override - public int getCategoriesCount() { - return categories_.size(); - } - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Category getCategories(int index) { - return categories_.get(index); - } - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.CategoryOrBuilder getCategoriesOrBuilder( - int index) { - return categories_.get(index); - } - - public static final int KB_ARTICLE_IDS_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList kbArticleIds_; - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @return A list containing the kbArticleIds. - */ - public com.google.protobuf.ProtocolStringList - getKbArticleIdsList() { - return kbArticleIds_; - } - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @return The count of kbArticleIds. - */ - public int getKbArticleIdsCount() { - return kbArticleIds_.size(); - } - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @param index The index of the element to return. - * @return The kbArticleIds at the given index. - */ - public java.lang.String getKbArticleIds(int index) { - return kbArticleIds_.get(index); - } - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @param index The index of the value to return. - * @return The bytes of the kbArticleIds at the given index. - */ - public com.google.protobuf.ByteString - getKbArticleIdsBytes(int index) { - return kbArticleIds_.getByteString(index); - } - - public static final int SUPPORT_URL_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private volatile java.lang.Object supportUrl_ = ""; - /** - *
-   * The hyperlink to the support information for the update.
-   * 
- * - * string support_url = 6; - * @return The supportUrl. - */ - @java.lang.Override - public java.lang.String getSupportUrl() { - java.lang.Object ref = supportUrl_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - supportUrl_ = s; - return s; - } - } - /** - *
-   * The hyperlink to the support information for the update.
-   * 
- * - * string support_url = 6; - * @return The bytes for supportUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSupportUrlBytes() { - java.lang.Object ref = supportUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - supportUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LAST_PUBLISHED_TIMESTAMP_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp lastPublishedTimestamp_; - /** - *
-   * The last published timestamp of the update.
-   * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - * @return Whether the lastPublishedTimestamp field is set. - */ - @java.lang.Override - public boolean hasLastPublishedTimestamp() { - return lastPublishedTimestamp_ != null; - } - /** - *
-   * The last published timestamp of the update.
-   * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - * @return The lastPublishedTimestamp. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLastPublishedTimestamp() { - return lastPublishedTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; - } - /** - *
-   * The last published timestamp of the update.
-   * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLastPublishedTimestampOrBuilder() { - return lastPublishedTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (identity_ != null) { - output.writeMessage(1, getIdentity()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - for (int i = 0; i < categories_.size(); i++) { - output.writeMessage(4, categories_.get(i)); - } - for (int i = 0; i < kbArticleIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, kbArticleIds_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(supportUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, supportUrl_); - } - if (lastPublishedTimestamp_ != null) { - output.writeMessage(7, getLastPublishedTimestamp()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (identity_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getIdentity()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - for (int i = 0; i < categories_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, categories_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < kbArticleIds_.size(); i++) { - dataSize += computeStringSizeNoTag(kbArticleIds_.getRaw(i)); - } - size += dataSize; - size += 1 * getKbArticleIdsList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(supportUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, supportUrl_); - } - if (lastPublishedTimestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getLastPublishedTimestamp()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.WindowsUpdate)) { - return super.equals(obj); - } - io.grafeas.v1.WindowsUpdate other = (io.grafeas.v1.WindowsUpdate) obj; - - if (hasIdentity() != other.hasIdentity()) return false; - if (hasIdentity()) { - if (!getIdentity() - .equals(other.getIdentity())) return false; - } - if (!getTitle() - .equals(other.getTitle())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getCategoriesList() - .equals(other.getCategoriesList())) return false; - if (!getKbArticleIdsList() - .equals(other.getKbArticleIdsList())) return false; - if (!getSupportUrl() - .equals(other.getSupportUrl())) return false; - if (hasLastPublishedTimestamp() != other.hasLastPublishedTimestamp()) return false; - if (hasLastPublishedTimestamp()) { - if (!getLastPublishedTimestamp() - .equals(other.getLastPublishedTimestamp())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasIdentity()) { - hash = (37 * hash) + IDENTITY_FIELD_NUMBER; - hash = (53 * hash) + getIdentity().hashCode(); - } - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (getCategoriesCount() > 0) { - hash = (37 * hash) + CATEGORIES_FIELD_NUMBER; - hash = (53 * hash) + getCategoriesList().hashCode(); - } - if (getKbArticleIdsCount() > 0) { - hash = (37 * hash) + KB_ARTICLE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getKbArticleIdsList().hashCode(); - } - hash = (37 * hash) + SUPPORT_URL_FIELD_NUMBER; - hash = (53 * hash) + getSupportUrl().hashCode(); - if (hasLastPublishedTimestamp()) { - hash = (37 * hash) + LAST_PUBLISHED_TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getLastPublishedTimestamp().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.WindowsUpdate parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.WindowsUpdate prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Windows Update represents the metadata about the update for the Windows
-   * operating system. The fields in this message come from the Windows Update API
-   * documented at
-   * https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate.
-   * 
- * - * Protobuf type {@code grafeas.v1.WindowsUpdate} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.WindowsUpdate) - io.grafeas.v1.WindowsUpdateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.WindowsUpdate.class, io.grafeas.v1.WindowsUpdate.Builder.class); - } - - // Construct using io.grafeas.v1.WindowsUpdate.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - identity_ = null; - if (identityBuilder_ != null) { - identityBuilder_.dispose(); - identityBuilder_ = null; - } - title_ = ""; - description_ = ""; - if (categoriesBuilder_ == null) { - categories_ = java.util.Collections.emptyList(); - } else { - categories_ = null; - categoriesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - supportUrl_ = ""; - lastPublishedTimestamp_ = null; - if (lastPublishedTimestampBuilder_ != null) { - lastPublishedTimestampBuilder_.dispose(); - lastPublishedTimestampBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate getDefaultInstanceForType() { - return io.grafeas.v1.WindowsUpdate.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate build() { - io.grafeas.v1.WindowsUpdate result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate buildPartial() { - io.grafeas.v1.WindowsUpdate result = new io.grafeas.v1.WindowsUpdate(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.WindowsUpdate result) { - if (categoriesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - categories_ = java.util.Collections.unmodifiableList(categories_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.categories_ = categories_; - } else { - result.categories_ = categoriesBuilder_.build(); - } - if (((bitField0_ & 0x00000010) != 0)) { - kbArticleIds_ = kbArticleIds_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.kbArticleIds_ = kbArticleIds_; - } - - private void buildPartial0(io.grafeas.v1.WindowsUpdate result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.identity_ = identityBuilder_ == null - ? identity_ - : identityBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.title_ = title_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.supportUrl_ = supportUrl_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.lastPublishedTimestamp_ = lastPublishedTimestampBuilder_ == null - ? lastPublishedTimestamp_ - : lastPublishedTimestampBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.WindowsUpdate) { - return mergeFrom((io.grafeas.v1.WindowsUpdate)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.WindowsUpdate other) { - if (other == io.grafeas.v1.WindowsUpdate.getDefaultInstance()) return this; - if (other.hasIdentity()) { - mergeIdentity(other.getIdentity()); - } - if (!other.getTitle().isEmpty()) { - title_ = other.title_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (categoriesBuilder_ == null) { - if (!other.categories_.isEmpty()) { - if (categories_.isEmpty()) { - categories_ = other.categories_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureCategoriesIsMutable(); - categories_.addAll(other.categories_); - } - onChanged(); - } - } else { - if (!other.categories_.isEmpty()) { - if (categoriesBuilder_.isEmpty()) { - categoriesBuilder_.dispose(); - categoriesBuilder_ = null; - categories_ = other.categories_; - bitField0_ = (bitField0_ & ~0x00000008); - categoriesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getCategoriesFieldBuilder() : null; - } else { - categoriesBuilder_.addAllMessages(other.categories_); - } - } - } - if (!other.kbArticleIds_.isEmpty()) { - if (kbArticleIds_.isEmpty()) { - kbArticleIds_ = other.kbArticleIds_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureKbArticleIdsIsMutable(); - kbArticleIds_.addAll(other.kbArticleIds_); - } - onChanged(); - } - if (!other.getSupportUrl().isEmpty()) { - supportUrl_ = other.supportUrl_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (other.hasLastPublishedTimestamp()) { - mergeLastPublishedTimestamp(other.getLastPublishedTimestamp()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getIdentityFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - io.grafeas.v1.WindowsUpdate.Category m = - input.readMessage( - io.grafeas.v1.WindowsUpdate.Category.parser(), - extensionRegistry); - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - categories_.add(m); - } else { - categoriesBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - ensureKbArticleIdsIsMutable(); - kbArticleIds_.add(s); - break; - } // case 42 - case 50: { - supportUrl_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - input.readMessage( - getLastPublishedTimestampFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.WindowsUpdate.Identity identity_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate.Identity, io.grafeas.v1.WindowsUpdate.Identity.Builder, io.grafeas.v1.WindowsUpdate.IdentityOrBuilder> identityBuilder_; - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @return Whether the identity field is set. - */ - public boolean hasIdentity() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @return The identity. - */ - public io.grafeas.v1.WindowsUpdate.Identity getIdentity() { - if (identityBuilder_ == null) { - return identity_ == null ? io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; - } else { - return identityBuilder_.getMessage(); - } - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - public Builder setIdentity(io.grafeas.v1.WindowsUpdate.Identity value) { - if (identityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - identity_ = value; - } else { - identityBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - public Builder setIdentity( - io.grafeas.v1.WindowsUpdate.Identity.Builder builderForValue) { - if (identityBuilder_ == null) { - identity_ = builderForValue.build(); - } else { - identityBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - public Builder mergeIdentity(io.grafeas.v1.WindowsUpdate.Identity value) { - if (identityBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - identity_ != null && - identity_ != io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance()) { - getIdentityBuilder().mergeFrom(value); - } else { - identity_ = value; - } - } else { - identityBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - public Builder clearIdentity() { - bitField0_ = (bitField0_ & ~0x00000001); - identity_ = null; - if (identityBuilder_ != null) { - identityBuilder_.dispose(); - identityBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - public io.grafeas.v1.WindowsUpdate.Identity.Builder getIdentityBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getIdentityFieldBuilder().getBuilder(); - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - public io.grafeas.v1.WindowsUpdate.IdentityOrBuilder getIdentityOrBuilder() { - if (identityBuilder_ != null) { - return identityBuilder_.getMessageOrBuilder(); - } else { - return identity_ == null ? - io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; - } - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate.Identity, io.grafeas.v1.WindowsUpdate.Identity.Builder, io.grafeas.v1.WindowsUpdate.IdentityOrBuilder> - getIdentityFieldBuilder() { - if (identityBuilder_ == null) { - identityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate.Identity, io.grafeas.v1.WindowsUpdate.Identity.Builder, io.grafeas.v1.WindowsUpdate.IdentityOrBuilder>( - getIdentity(), - getParentForChildren(), - isClean()); - identity_ = null; - } - return identityBuilder_; - } - - private java.lang.Object title_ = ""; - /** - *
-     * The localized title of the update.
-     * 
- * - * string title = 2; - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The localized title of the update.
-     * 
- * - * string title = 2; - * @return The bytes for title. - */ - public com.google.protobuf.ByteString - getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The localized title of the update.
-     * 
- * - * string title = 2; - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - title_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The localized title of the update.
-     * 
- * - * string title = 2; - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The localized title of the update.
-     * 
- * - * string title = 2; - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * The localized description of the update.
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The localized description of the update.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The localized description of the update.
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The localized description of the update.
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The localized description of the update.
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.util.List categories_ = - java.util.Collections.emptyList(); - private void ensureCategoriesIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - categories_ = new java.util.ArrayList(categories_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.WindowsUpdate.Category, io.grafeas.v1.WindowsUpdate.Category.Builder, io.grafeas.v1.WindowsUpdate.CategoryOrBuilder> categoriesBuilder_; - - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public java.util.List getCategoriesList() { - if (categoriesBuilder_ == null) { - return java.util.Collections.unmodifiableList(categories_); - } else { - return categoriesBuilder_.getMessageList(); - } - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public int getCategoriesCount() { - if (categoriesBuilder_ == null) { - return categories_.size(); - } else { - return categoriesBuilder_.getCount(); - } - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public io.grafeas.v1.WindowsUpdate.Category getCategories(int index) { - if (categoriesBuilder_ == null) { - return categories_.get(index); - } else { - return categoriesBuilder_.getMessage(index); - } - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder setCategories( - int index, io.grafeas.v1.WindowsUpdate.Category value) { - if (categoriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCategoriesIsMutable(); - categories_.set(index, value); - onChanged(); - } else { - categoriesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder setCategories( - int index, io.grafeas.v1.WindowsUpdate.Category.Builder builderForValue) { - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - categories_.set(index, builderForValue.build()); - onChanged(); - } else { - categoriesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder addCategories(io.grafeas.v1.WindowsUpdate.Category value) { - if (categoriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCategoriesIsMutable(); - categories_.add(value); - onChanged(); - } else { - categoriesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder addCategories( - int index, io.grafeas.v1.WindowsUpdate.Category value) { - if (categoriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCategoriesIsMutable(); - categories_.add(index, value); - onChanged(); - } else { - categoriesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder addCategories( - io.grafeas.v1.WindowsUpdate.Category.Builder builderForValue) { - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - categories_.add(builderForValue.build()); - onChanged(); - } else { - categoriesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder addCategories( - int index, io.grafeas.v1.WindowsUpdate.Category.Builder builderForValue) { - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - categories_.add(index, builderForValue.build()); - onChanged(); - } else { - categoriesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder addAllCategories( - java.lang.Iterable values) { - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, categories_); - onChanged(); - } else { - categoriesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder clearCategories() { - if (categoriesBuilder_ == null) { - categories_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - categoriesBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder removeCategories(int index) { - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - categories_.remove(index); - onChanged(); - } else { - categoriesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public io.grafeas.v1.WindowsUpdate.Category.Builder getCategoriesBuilder( - int index) { - return getCategoriesFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public io.grafeas.v1.WindowsUpdate.CategoryOrBuilder getCategoriesOrBuilder( - int index) { - if (categoriesBuilder_ == null) { - return categories_.get(index); } else { - return categoriesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public java.util.List - getCategoriesOrBuilderList() { - if (categoriesBuilder_ != null) { - return categoriesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(categories_); - } - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public io.grafeas.v1.WindowsUpdate.Category.Builder addCategoriesBuilder() { - return getCategoriesFieldBuilder().addBuilder( - io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance()); - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public io.grafeas.v1.WindowsUpdate.Category.Builder addCategoriesBuilder( - int index) { - return getCategoriesFieldBuilder().addBuilder( - index, io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance()); - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public java.util.List - getCategoriesBuilderList() { - return getCategoriesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.WindowsUpdate.Category, io.grafeas.v1.WindowsUpdate.Category.Builder, io.grafeas.v1.WindowsUpdate.CategoryOrBuilder> - getCategoriesFieldBuilder() { - if (categoriesBuilder_ == null) { - categoriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.WindowsUpdate.Category, io.grafeas.v1.WindowsUpdate.Category.Builder, io.grafeas.v1.WindowsUpdate.CategoryOrBuilder>( - categories_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - categories_ = null; - } - return categoriesBuilder_; - } - - private com.google.protobuf.LazyStringList kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureKbArticleIdsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - kbArticleIds_ = new com.google.protobuf.LazyStringArrayList(kbArticleIds_); - bitField0_ |= 0x00000010; - } - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @return A list containing the kbArticleIds. - */ - public com.google.protobuf.ProtocolStringList - getKbArticleIdsList() { - return kbArticleIds_.getUnmodifiableView(); - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @return The count of kbArticleIds. - */ - public int getKbArticleIdsCount() { - return kbArticleIds_.size(); - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @param index The index of the element to return. - * @return The kbArticleIds at the given index. - */ - public java.lang.String getKbArticleIds(int index) { - return kbArticleIds_.get(index); - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @param index The index of the value to return. - * @return The bytes of the kbArticleIds at the given index. - */ - public com.google.protobuf.ByteString - getKbArticleIdsBytes(int index) { - return kbArticleIds_.getByteString(index); - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @param index The index to set the value at. - * @param value The kbArticleIds to set. - * @return This builder for chaining. - */ - public Builder setKbArticleIds( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureKbArticleIdsIsMutable(); - kbArticleIds_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @param value The kbArticleIds to add. - * @return This builder for chaining. - */ - public Builder addKbArticleIds( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureKbArticleIdsIsMutable(); - kbArticleIds_.add(value); - onChanged(); - return this; - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @param values The kbArticleIds to add. - * @return This builder for chaining. - */ - public Builder addAllKbArticleIds( - java.lang.Iterable values) { - ensureKbArticleIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kbArticleIds_); - onChanged(); - return this; - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @return This builder for chaining. - */ - public Builder clearKbArticleIds() { - kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @param value The bytes of the kbArticleIds to add. - * @return This builder for chaining. - */ - public Builder addKbArticleIdsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureKbArticleIdsIsMutable(); - kbArticleIds_.add(value); - onChanged(); - return this; - } - - private java.lang.Object supportUrl_ = ""; - /** - *
-     * The hyperlink to the support information for the update.
-     * 
- * - * string support_url = 6; - * @return The supportUrl. - */ - public java.lang.String getSupportUrl() { - java.lang.Object ref = supportUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - supportUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The hyperlink to the support information for the update.
-     * 
- * - * string support_url = 6; - * @return The bytes for supportUrl. - */ - public com.google.protobuf.ByteString - getSupportUrlBytes() { - java.lang.Object ref = supportUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - supportUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The hyperlink to the support information for the update.
-     * 
- * - * string support_url = 6; - * @param value The supportUrl to set. - * @return This builder for chaining. - */ - public Builder setSupportUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - supportUrl_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The hyperlink to the support information for the update.
-     * 
- * - * string support_url = 6; - * @return This builder for chaining. - */ - public Builder clearSupportUrl() { - supportUrl_ = getDefaultInstance().getSupportUrl(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * The hyperlink to the support information for the update.
-     * 
- * - * string support_url = 6; - * @param value The bytes for supportUrl to set. - * @return This builder for chaining. - */ - public Builder setSupportUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - supportUrl_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp lastPublishedTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastPublishedTimestampBuilder_; - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - * @return Whether the lastPublishedTimestamp field is set. - */ - public boolean hasLastPublishedTimestamp() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - * @return The lastPublishedTimestamp. - */ - public com.google.protobuf.Timestamp getLastPublishedTimestamp() { - if (lastPublishedTimestampBuilder_ == null) { - return lastPublishedTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; - } else { - return lastPublishedTimestampBuilder_.getMessage(); - } - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - public Builder setLastPublishedTimestamp(com.google.protobuf.Timestamp value) { - if (lastPublishedTimestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lastPublishedTimestamp_ = value; - } else { - lastPublishedTimestampBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - public Builder setLastPublishedTimestamp( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (lastPublishedTimestampBuilder_ == null) { - lastPublishedTimestamp_ = builderForValue.build(); - } else { - lastPublishedTimestampBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - public Builder mergeLastPublishedTimestamp(com.google.protobuf.Timestamp value) { - if (lastPublishedTimestampBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - lastPublishedTimestamp_ != null && - lastPublishedTimestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getLastPublishedTimestampBuilder().mergeFrom(value); - } else { - lastPublishedTimestamp_ = value; - } - } else { - lastPublishedTimestampBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - public Builder clearLastPublishedTimestamp() { - bitField0_ = (bitField0_ & ~0x00000040); - lastPublishedTimestamp_ = null; - if (lastPublishedTimestampBuilder_ != null) { - lastPublishedTimestampBuilder_.dispose(); - lastPublishedTimestampBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - public com.google.protobuf.Timestamp.Builder getLastPublishedTimestampBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getLastPublishedTimestampFieldBuilder().getBuilder(); - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - public com.google.protobuf.TimestampOrBuilder getLastPublishedTimestampOrBuilder() { - if (lastPublishedTimestampBuilder_ != null) { - return lastPublishedTimestampBuilder_.getMessageOrBuilder(); - } else { - return lastPublishedTimestamp_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; - } - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getLastPublishedTimestampFieldBuilder() { - if (lastPublishedTimestampBuilder_ == null) { - lastPublishedTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getLastPublishedTimestamp(), - getParentForChildren(), - isClean()); - lastPublishedTimestamp_ = null; - } - return lastPublishedTimestampBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.WindowsUpdate) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate) - private static final io.grafeas.v1.WindowsUpdate DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.WindowsUpdate(); - } - - public static io.grafeas.v1.WindowsUpdate getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WindowsUpdate parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java deleted file mode 100644 index 730df0265e64..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java +++ /dev/null @@ -1,212 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -public interface WindowsUpdateOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.WindowsUpdate) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required - The unique identifier for the update.
-   * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @return Whether the identity field is set. - */ - boolean hasIdentity(); - /** - *
-   * Required - The unique identifier for the update.
-   * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @return The identity. - */ - io.grafeas.v1.WindowsUpdate.Identity getIdentity(); - /** - *
-   * Required - The unique identifier for the update.
-   * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - io.grafeas.v1.WindowsUpdate.IdentityOrBuilder getIdentityOrBuilder(); - - /** - *
-   * The localized title of the update.
-   * 
- * - * string title = 2; - * @return The title. - */ - java.lang.String getTitle(); - /** - *
-   * The localized title of the update.
-   * 
- * - * string title = 2; - * @return The bytes for title. - */ - com.google.protobuf.ByteString - getTitleBytes(); - - /** - *
-   * The localized description of the update.
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * The localized description of the update.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - java.util.List - getCategoriesList(); - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - io.grafeas.v1.WindowsUpdate.Category getCategories(int index); - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - int getCategoriesCount(); - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - java.util.List - getCategoriesOrBuilderList(); - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - io.grafeas.v1.WindowsUpdate.CategoryOrBuilder getCategoriesOrBuilder( - int index); - - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @return A list containing the kbArticleIds. - */ - java.util.List - getKbArticleIdsList(); - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @return The count of kbArticleIds. - */ - int getKbArticleIdsCount(); - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @param index The index of the element to return. - * @return The kbArticleIds at the given index. - */ - java.lang.String getKbArticleIds(int index); - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @param index The index of the value to return. - * @return The bytes of the kbArticleIds at the given index. - */ - com.google.protobuf.ByteString - getKbArticleIdsBytes(int index); - - /** - *
-   * The hyperlink to the support information for the update.
-   * 
- * - * string support_url = 6; - * @return The supportUrl. - */ - java.lang.String getSupportUrl(); - /** - *
-   * The hyperlink to the support information for the update.
-   * 
- * - * string support_url = 6; - * @return The bytes for supportUrl. - */ - com.google.protobuf.ByteString - getSupportUrlBytes(); - - /** - *
-   * The last published timestamp of the update.
-   * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - * @return Whether the lastPublishedTimestamp field is set. - */ - boolean hasLastPublishedTimestamp(); - /** - *
-   * The last published timestamp of the update.
-   * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - * @return The lastPublishedTimestamp. - */ - com.google.protobuf.Timestamp getLastPublishedTimestamp(); - /** - *
-   * The last published timestamp of the update.
-   * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - com.google.protobuf.TimestampOrBuilder getLastPublishedTimestampOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json deleted file mode 100644 index 2fad5f7d0feb..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "grafeas.v1", - "libraryPackage": "io.grafeas.v1", - "services": { - "Grafeas": { - "clients": { - "grpc": { - "libraryClient": "GrafeasClient", - "rpcs": { - "BatchCreateNotes": { - "methods": ["batchCreateNotes", "batchCreateNotes", "batchCreateNotes", "batchCreateNotesCallable"] - }, - "BatchCreateOccurrences": { - "methods": ["batchCreateOccurrences", "batchCreateOccurrences", "batchCreateOccurrences", "batchCreateOccurrencesCallable"] - }, - "CreateNote": { - "methods": ["createNote", "createNote", "createNote", "createNoteCallable"] - }, - "CreateOccurrence": { - "methods": ["createOccurrence", "createOccurrence", "createOccurrence", "createOccurrenceCallable"] - }, - "DeleteNote": { - "methods": ["deleteNote", "deleteNote", "deleteNote", "deleteNoteCallable"] - }, - "DeleteOccurrence": { - "methods": ["deleteOccurrence", "deleteOccurrence", "deleteOccurrence", "deleteOccurrenceCallable"] - }, - "GetNote": { - "methods": ["getNote", "getNote", "getNote", "getNoteCallable"] - }, - "GetOccurrence": { - "methods": ["getOccurrence", "getOccurrence", "getOccurrence", "getOccurrenceCallable"] - }, - "GetOccurrenceNote": { - "methods": ["getOccurrenceNote", "getOccurrenceNote", "getOccurrenceNote", "getOccurrenceNoteCallable"] - }, - "ListNoteOccurrences": { - "methods": ["listNoteOccurrences", "listNoteOccurrences", "listNoteOccurrences", "listNoteOccurrencesPagedCallable", "listNoteOccurrencesCallable"] - }, - "ListNotes": { - "methods": ["listNotes", "listNotes", "listNotes", "listNotesPagedCallable", "listNotesCallable"] - }, - "ListOccurrences": { - "methods": ["listOccurrences", "listOccurrences", "listOccurrences", "listOccurrencesPagedCallable", "listOccurrencesCallable"] - }, - "UpdateNote": { - "methods": ["updateNote", "updateNote", "updateNote", "updateNoteCallable"] - }, - "UpdateOccurrence": { - "methods": ["updateOccurrence", "updateOccurrence", "updateOccurrence", "updateOccurrenceCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java deleted file mode 100644 index 925587289f71..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A client to Container Analysis API - * - *

The interfaces provided are listed below, along with usage samples. - * - *

======================= GrafeasClient ======================= - * - *

Service Description: [Grafeas](https://grafeas.io) API. - * - *

Retrieves analysis results of Cloud components such as Docker container images. - * - *

Analysis results are stored as a series of occurrences. An `Occurrence` contains information - * about a specific analysis instance on a resource. An occurrence refers to a `Note`. A note - * contains details describing the analysis and is generally stored in a separate project, called a - * `Provider`. Multiple occurrences can refer to the same note. - * - *

For example, an SSL vulnerability could affect multiple images. In this case, there would be - * one note for the vulnerability and an occurrence for each image with the vulnerability referring - * to that note. - * - *

Sample for GrafeasClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
- *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
- *   Occurrence response = grafeasClient.getOccurrence(name);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package io.grafeas.v1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java deleted file mode 100644 index 671d1b9faa7c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1.stub; - -import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.protobuf.Empty; -import io.grafeas.v1.BatchCreateNotesRequest; -import io.grafeas.v1.BatchCreateNotesResponse; -import io.grafeas.v1.BatchCreateOccurrencesRequest; -import io.grafeas.v1.BatchCreateOccurrencesResponse; -import io.grafeas.v1.CreateNoteRequest; -import io.grafeas.v1.CreateOccurrenceRequest; -import io.grafeas.v1.DeleteNoteRequest; -import io.grafeas.v1.DeleteOccurrenceRequest; -import io.grafeas.v1.GetNoteRequest; -import io.grafeas.v1.GetOccurrenceNoteRequest; -import io.grafeas.v1.GetOccurrenceRequest; -import io.grafeas.v1.ListNoteOccurrencesRequest; -import io.grafeas.v1.ListNoteOccurrencesResponse; -import io.grafeas.v1.ListNotesRequest; -import io.grafeas.v1.ListNotesResponse; -import io.grafeas.v1.ListOccurrencesRequest; -import io.grafeas.v1.ListOccurrencesResponse; -import io.grafeas.v1.Note; -import io.grafeas.v1.Occurrence; -import io.grafeas.v1.UpdateNoteRequest; -import io.grafeas.v1.UpdateOccurrenceRequest; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the Grafeas service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class GrafeasStub implements BackgroundResource { - - public UnaryCallable getOccurrenceCallable() { - throw new UnsupportedOperationException("Not implemented: getOccurrenceCallable()"); - } - - public UnaryCallable - listOccurrencesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listOccurrencesPagedCallable()"); - } - - public UnaryCallable listOccurrencesCallable() { - throw new UnsupportedOperationException("Not implemented: listOccurrencesCallable()"); - } - - public UnaryCallable deleteOccurrenceCallable() { - throw new UnsupportedOperationException("Not implemented: deleteOccurrenceCallable()"); - } - - public UnaryCallable createOccurrenceCallable() { - throw new UnsupportedOperationException("Not implemented: createOccurrenceCallable()"); - } - - public UnaryCallable - batchCreateOccurrencesCallable() { - throw new UnsupportedOperationException("Not implemented: batchCreateOccurrencesCallable()"); - } - - public UnaryCallable updateOccurrenceCallable() { - throw new UnsupportedOperationException("Not implemented: updateOccurrenceCallable()"); - } - - public UnaryCallable getOccurrenceNoteCallable() { - throw new UnsupportedOperationException("Not implemented: getOccurrenceNoteCallable()"); - } - - public UnaryCallable getNoteCallable() { - throw new UnsupportedOperationException("Not implemented: getNoteCallable()"); - } - - public UnaryCallable listNotesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listNotesPagedCallable()"); - } - - public UnaryCallable listNotesCallable() { - throw new UnsupportedOperationException("Not implemented: listNotesCallable()"); - } - - public UnaryCallable deleteNoteCallable() { - throw new UnsupportedOperationException("Not implemented: deleteNoteCallable()"); - } - - public UnaryCallable createNoteCallable() { - throw new UnsupportedOperationException("Not implemented: createNoteCallable()"); - } - - public UnaryCallable - batchCreateNotesCallable() { - throw new UnsupportedOperationException("Not implemented: batchCreateNotesCallable()"); - } - - public UnaryCallable updateNoteCallable() { - throw new UnsupportedOperationException("Not implemented: updateNoteCallable()"); - } - - public UnaryCallable - listNoteOccurrencesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listNoteOccurrencesPagedCallable()"); - } - - public UnaryCallable - listNoteOccurrencesCallable() { - throw new UnsupportedOperationException("Not implemented: listNoteOccurrencesCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java deleted file mode 100644 index e240f1e74096..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java +++ /dev/null @@ -1,819 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1.stub; - -import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.protobuf.Empty; -import io.grafeas.v1.BatchCreateNotesRequest; -import io.grafeas.v1.BatchCreateNotesResponse; -import io.grafeas.v1.BatchCreateOccurrencesRequest; -import io.grafeas.v1.BatchCreateOccurrencesResponse; -import io.grafeas.v1.CreateNoteRequest; -import io.grafeas.v1.CreateOccurrenceRequest; -import io.grafeas.v1.DeleteNoteRequest; -import io.grafeas.v1.DeleteOccurrenceRequest; -import io.grafeas.v1.GetNoteRequest; -import io.grafeas.v1.GetOccurrenceNoteRequest; -import io.grafeas.v1.GetOccurrenceRequest; -import io.grafeas.v1.ListNoteOccurrencesRequest; -import io.grafeas.v1.ListNoteOccurrencesResponse; -import io.grafeas.v1.ListNotesRequest; -import io.grafeas.v1.ListNotesResponse; -import io.grafeas.v1.ListOccurrencesRequest; -import io.grafeas.v1.ListOccurrencesResponse; -import io.grafeas.v1.Note; -import io.grafeas.v1.Occurrence; -import io.grafeas.v1.UpdateNoteRequest; -import io.grafeas.v1.UpdateOccurrenceRequest; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link GrafeasStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (containeranalysis.googleapis.com) and default port (443) are - * used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of getOccurrence to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GrafeasStubSettings.Builder grafeasSettingsBuilder = GrafeasStubSettings.newBuilder();
- * grafeasSettingsBuilder
- *     .getOccurrenceSettings()
- *     .setRetrySettings(
- *         grafeasSettingsBuilder
- *             .getOccurrenceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * GrafeasStubSettings grafeasSettings = grafeasSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class GrafeasStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().build(); - - private final UnaryCallSettings getOccurrenceSettings; - private final PagedCallSettings< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> - listOccurrencesSettings; - private final UnaryCallSettings deleteOccurrenceSettings; - private final UnaryCallSettings createOccurrenceSettings; - private final UnaryCallSettings - batchCreateOccurrencesSettings; - private final UnaryCallSettings updateOccurrenceSettings; - private final UnaryCallSettings getOccurrenceNoteSettings; - private final UnaryCallSettings getNoteSettings; - private final PagedCallSettings - listNotesSettings; - private final UnaryCallSettings deleteNoteSettings; - private final UnaryCallSettings createNoteSettings; - private final UnaryCallSettings - batchCreateNotesSettings; - private final UnaryCallSettings updateNoteSettings; - private final PagedCallSettings< - ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> - listNoteOccurrencesSettings; - - private static final PagedListDescriptor< - ListOccurrencesRequest, ListOccurrencesResponse, Occurrence> - LIST_OCCURRENCES_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListOccurrencesRequest injectToken( - ListOccurrencesRequest payload, String token) { - return ListOccurrencesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListOccurrencesRequest injectPageSize( - ListOccurrencesRequest payload, int pageSize) { - return ListOccurrencesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListOccurrencesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListOccurrencesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListOccurrencesResponse payload) { - return payload.getOccurrencesList() == null - ? ImmutableList.of() - : payload.getOccurrencesList(); - } - }; - - private static final PagedListDescriptor - LIST_NOTES_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListNotesRequest injectToken(ListNotesRequest payload, String token) { - return ListNotesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListNotesRequest injectPageSize(ListNotesRequest payload, int pageSize) { - return ListNotesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListNotesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListNotesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListNotesResponse payload) { - return payload.getNotesList() == null - ? ImmutableList.of() - : payload.getNotesList(); - } - }; - - private static final PagedListDescriptor< - ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, Occurrence> - LIST_NOTE_OCCURRENCES_PAGE_STR_DESC = - new PagedListDescriptor< - ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, Occurrence>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListNoteOccurrencesRequest injectToken( - ListNoteOccurrencesRequest payload, String token) { - return ListNoteOccurrencesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListNoteOccurrencesRequest injectPageSize( - ListNoteOccurrencesRequest payload, int pageSize) { - return ListNoteOccurrencesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListNoteOccurrencesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListNoteOccurrencesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListNoteOccurrencesResponse payload) { - return payload.getOccurrencesList() == null - ? ImmutableList.of() - : payload.getOccurrencesList(); - } - }; - - private static final PagedListResponseFactory< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> - LIST_OCCURRENCES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListOccurrencesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_OCCURRENCES_PAGE_STR_DESC, request, context); - return ListOccurrencesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListNotesRequest, ListNotesResponse, ListNotesPagedResponse> - LIST_NOTES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListNotesRequest, ListNotesResponse, ListNotesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListNotesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_NOTES_PAGE_STR_DESC, request, context); - return ListNotesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> - LIST_NOTE_OCCURRENCES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListNoteOccurrencesRequest, - ListNoteOccurrencesResponse, - ListNoteOccurrencesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListNoteOccurrencesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_NOTE_OCCURRENCES_PAGE_STR_DESC, request, context); - return ListNoteOccurrencesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to getOccurrence. */ - public UnaryCallSettings getOccurrenceSettings() { - return getOccurrenceSettings; - } - - /** Returns the object with the settings used for calls to listOccurrences. */ - public PagedCallSettings< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> - listOccurrencesSettings() { - return listOccurrencesSettings; - } - - /** Returns the object with the settings used for calls to deleteOccurrence. */ - public UnaryCallSettings deleteOccurrenceSettings() { - return deleteOccurrenceSettings; - } - - /** Returns the object with the settings used for calls to createOccurrence. */ - public UnaryCallSettings createOccurrenceSettings() { - return createOccurrenceSettings; - } - - /** Returns the object with the settings used for calls to batchCreateOccurrences. */ - public UnaryCallSettings - batchCreateOccurrencesSettings() { - return batchCreateOccurrencesSettings; - } - - /** Returns the object with the settings used for calls to updateOccurrence. */ - public UnaryCallSettings updateOccurrenceSettings() { - return updateOccurrenceSettings; - } - - /** Returns the object with the settings used for calls to getOccurrenceNote. */ - public UnaryCallSettings getOccurrenceNoteSettings() { - return getOccurrenceNoteSettings; - } - - /** Returns the object with the settings used for calls to getNote. */ - public UnaryCallSettings getNoteSettings() { - return getNoteSettings; - } - - /** Returns the object with the settings used for calls to listNotes. */ - public PagedCallSettings - listNotesSettings() { - return listNotesSettings; - } - - /** Returns the object with the settings used for calls to deleteNote. */ - public UnaryCallSettings deleteNoteSettings() { - return deleteNoteSettings; - } - - /** Returns the object with the settings used for calls to createNote. */ - public UnaryCallSettings createNoteSettings() { - return createNoteSettings; - } - - /** Returns the object with the settings used for calls to batchCreateNotes. */ - public UnaryCallSettings - batchCreateNotesSettings() { - return batchCreateNotesSettings; - } - - /** Returns the object with the settings used for calls to updateNote. */ - public UnaryCallSettings updateNoteSettings() { - return updateNoteSettings; - } - - /** Returns the object with the settings used for calls to listNoteOccurrences. */ - public PagedCallSettings< - ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> - listNoteOccurrencesSettings() { - return listNoteOccurrencesSettings; - } - - public GrafeasStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcGrafeasStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "containeranalysis.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "containeranalysis.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(GrafeasStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected GrafeasStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - getOccurrenceSettings = settingsBuilder.getOccurrenceSettings().build(); - listOccurrencesSettings = settingsBuilder.listOccurrencesSettings().build(); - deleteOccurrenceSettings = settingsBuilder.deleteOccurrenceSettings().build(); - createOccurrenceSettings = settingsBuilder.createOccurrenceSettings().build(); - batchCreateOccurrencesSettings = settingsBuilder.batchCreateOccurrencesSettings().build(); - updateOccurrenceSettings = settingsBuilder.updateOccurrenceSettings().build(); - getOccurrenceNoteSettings = settingsBuilder.getOccurrenceNoteSettings().build(); - getNoteSettings = settingsBuilder.getNoteSettings().build(); - listNotesSettings = settingsBuilder.listNotesSettings().build(); - deleteNoteSettings = settingsBuilder.deleteNoteSettings().build(); - createNoteSettings = settingsBuilder.createNoteSettings().build(); - batchCreateNotesSettings = settingsBuilder.batchCreateNotesSettings().build(); - updateNoteSettings = settingsBuilder.updateNoteSettings().build(); - listNoteOccurrencesSettings = settingsBuilder.listNoteOccurrencesSettings().build(); - } - - /** Builder for GrafeasStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder getOccurrenceSettings; - private final PagedCallSettings.Builder< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> - listOccurrencesSettings; - private final UnaryCallSettings.Builder - deleteOccurrenceSettings; - private final UnaryCallSettings.Builder - createOccurrenceSettings; - private final UnaryCallSettings.Builder< - BatchCreateOccurrencesRequest, BatchCreateOccurrencesResponse> - batchCreateOccurrencesSettings; - private final UnaryCallSettings.Builder - updateOccurrenceSettings; - private final UnaryCallSettings.Builder - getOccurrenceNoteSettings; - private final UnaryCallSettings.Builder getNoteSettings; - private final PagedCallSettings.Builder< - ListNotesRequest, ListNotesResponse, ListNotesPagedResponse> - listNotesSettings; - private final UnaryCallSettings.Builder deleteNoteSettings; - private final UnaryCallSettings.Builder createNoteSettings; - private final UnaryCallSettings.Builder - batchCreateNotesSettings; - private final UnaryCallSettings.Builder updateNoteSettings; - private final PagedCallSettings.Builder< - ListNoteOccurrencesRequest, - ListNoteOccurrencesResponse, - ListNoteOccurrencesPagedResponse> - listNoteOccurrencesSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(30000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(30000L)) - .setTotalTimeout(Duration.ofMillis(30000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(30000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(30000L)) - .setTotalTimeout(Duration.ofMillis(30000L)) - .build(); - definitions.put("no_retry_1_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - getOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listOccurrencesSettings = PagedCallSettings.newBuilder(LIST_OCCURRENCES_PAGE_STR_FACT); - deleteOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchCreateOccurrencesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getOccurrenceNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listNotesSettings = PagedCallSettings.newBuilder(LIST_NOTES_PAGE_STR_FACT); - deleteNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchCreateNotesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listNoteOccurrencesSettings = - PagedCallSettings.newBuilder(LIST_NOTE_OCCURRENCES_PAGE_STR_FACT); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - getOccurrenceSettings, - listOccurrencesSettings, - deleteOccurrenceSettings, - createOccurrenceSettings, - batchCreateOccurrencesSettings, - updateOccurrenceSettings, - getOccurrenceNoteSettings, - getNoteSettings, - listNotesSettings, - deleteNoteSettings, - createNoteSettings, - batchCreateNotesSettings, - updateNoteSettings, - listNoteOccurrencesSettings); - initDefaults(this); - } - - protected Builder(GrafeasStubSettings settings) { - super(settings); - - getOccurrenceSettings = settings.getOccurrenceSettings.toBuilder(); - listOccurrencesSettings = settings.listOccurrencesSettings.toBuilder(); - deleteOccurrenceSettings = settings.deleteOccurrenceSettings.toBuilder(); - createOccurrenceSettings = settings.createOccurrenceSettings.toBuilder(); - batchCreateOccurrencesSettings = settings.batchCreateOccurrencesSettings.toBuilder(); - updateOccurrenceSettings = settings.updateOccurrenceSettings.toBuilder(); - getOccurrenceNoteSettings = settings.getOccurrenceNoteSettings.toBuilder(); - getNoteSettings = settings.getNoteSettings.toBuilder(); - listNotesSettings = settings.listNotesSettings.toBuilder(); - deleteNoteSettings = settings.deleteNoteSettings.toBuilder(); - createNoteSettings = settings.createNoteSettings.toBuilder(); - batchCreateNotesSettings = settings.batchCreateNotesSettings.toBuilder(); - updateNoteSettings = settings.updateNoteSettings.toBuilder(); - listNoteOccurrencesSettings = settings.listNoteOccurrencesSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - getOccurrenceSettings, - listOccurrencesSettings, - deleteOccurrenceSettings, - createOccurrenceSettings, - batchCreateOccurrencesSettings, - updateOccurrenceSettings, - getOccurrenceNoteSettings, - getNoteSettings, - listNotesSettings, - deleteNoteSettings, - createNoteSettings, - batchCreateNotesSettings, - updateNoteSettings, - listNoteOccurrencesSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .getOccurrenceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listOccurrencesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteOccurrenceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createOccurrenceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .batchCreateOccurrencesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateOccurrenceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .getOccurrenceNoteSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getNoteSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listNotesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteNoteSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createNoteSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .batchCreateNotesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateNoteSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .listNoteOccurrencesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to getOccurrence. */ - public UnaryCallSettings.Builder getOccurrenceSettings() { - return getOccurrenceSettings; - } - - /** Returns the builder for the settings used for calls to listOccurrences. */ - public PagedCallSettings.Builder< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> - listOccurrencesSettings() { - return listOccurrencesSettings; - } - - /** Returns the builder for the settings used for calls to deleteOccurrence. */ - public UnaryCallSettings.Builder deleteOccurrenceSettings() { - return deleteOccurrenceSettings; - } - - /** Returns the builder for the settings used for calls to createOccurrence. */ - public UnaryCallSettings.Builder - createOccurrenceSettings() { - return createOccurrenceSettings; - } - - /** Returns the builder for the settings used for calls to batchCreateOccurrences. */ - public UnaryCallSettings.Builder - batchCreateOccurrencesSettings() { - return batchCreateOccurrencesSettings; - } - - /** Returns the builder for the settings used for calls to updateOccurrence. */ - public UnaryCallSettings.Builder - updateOccurrenceSettings() { - return updateOccurrenceSettings; - } - - /** Returns the builder for the settings used for calls to getOccurrenceNote. */ - public UnaryCallSettings.Builder getOccurrenceNoteSettings() { - return getOccurrenceNoteSettings; - } - - /** Returns the builder for the settings used for calls to getNote. */ - public UnaryCallSettings.Builder getNoteSettings() { - return getNoteSettings; - } - - /** Returns the builder for the settings used for calls to listNotes. */ - public PagedCallSettings.Builder - listNotesSettings() { - return listNotesSettings; - } - - /** Returns the builder for the settings used for calls to deleteNote. */ - public UnaryCallSettings.Builder deleteNoteSettings() { - return deleteNoteSettings; - } - - /** Returns the builder for the settings used for calls to createNote. */ - public UnaryCallSettings.Builder createNoteSettings() { - return createNoteSettings; - } - - /** Returns the builder for the settings used for calls to batchCreateNotes. */ - public UnaryCallSettings.Builder - batchCreateNotesSettings() { - return batchCreateNotesSettings; - } - - /** Returns the builder for the settings used for calls to updateNote. */ - public UnaryCallSettings.Builder updateNoteSettings() { - return updateNoteSettings; - } - - /** Returns the builder for the settings used for calls to listNoteOccurrences. */ - public PagedCallSettings.Builder< - ListNoteOccurrencesRequest, - ListNoteOccurrencesResponse, - ListNoteOccurrencesPagedResponse> - listNoteOccurrencesSettings() { - return listNoteOccurrencesSettings; - } - - @Override - public GrafeasStubSettings build() throws IOException { - return new GrafeasStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java deleted file mode 100644 index b5a6c1879d69..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1.stub; - -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the Grafeas service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcGrafeasCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java deleted file mode 100644 index ef18c902d9f3..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java +++ /dev/null @@ -1,607 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1.stub; - -import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grafeas.v1.BatchCreateNotesRequest; -import io.grafeas.v1.BatchCreateNotesResponse; -import io.grafeas.v1.BatchCreateOccurrencesRequest; -import io.grafeas.v1.BatchCreateOccurrencesResponse; -import io.grafeas.v1.CreateNoteRequest; -import io.grafeas.v1.CreateOccurrenceRequest; -import io.grafeas.v1.DeleteNoteRequest; -import io.grafeas.v1.DeleteOccurrenceRequest; -import io.grafeas.v1.GetNoteRequest; -import io.grafeas.v1.GetOccurrenceNoteRequest; -import io.grafeas.v1.GetOccurrenceRequest; -import io.grafeas.v1.ListNoteOccurrencesRequest; -import io.grafeas.v1.ListNoteOccurrencesResponse; -import io.grafeas.v1.ListNotesRequest; -import io.grafeas.v1.ListNotesResponse; -import io.grafeas.v1.ListOccurrencesRequest; -import io.grafeas.v1.ListOccurrencesResponse; -import io.grafeas.v1.Note; -import io.grafeas.v1.Occurrence; -import io.grafeas.v1.UpdateNoteRequest; -import io.grafeas.v1.UpdateOccurrenceRequest; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the Grafeas service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcGrafeasStub extends GrafeasStub { - private static final MethodDescriptor - getOccurrenceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/GetOccurrence") - .setRequestMarshaller( - ProtoUtils.marshaller(GetOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Occurrence.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listOccurrencesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/ListOccurrences") - .setRequestMarshaller( - ProtoUtils.marshaller(ListOccurrencesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListOccurrencesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteOccurrenceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/DeleteOccurrence") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createOccurrenceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/CreateOccurrence") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Occurrence.getDefaultInstance())) - .build(); - - private static final MethodDescriptor< - BatchCreateOccurrencesRequest, BatchCreateOccurrencesResponse> - batchCreateOccurrencesMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/BatchCreateOccurrences") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchCreateOccurrencesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchCreateOccurrencesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateOccurrenceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/UpdateOccurrence") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Occurrence.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getOccurrenceNoteMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/GetOccurrenceNote") - .setRequestMarshaller( - ProtoUtils.marshaller(GetOccurrenceNoteRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getNoteMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/GetNote") - .setRequestMarshaller(ProtoUtils.marshaller(GetNoteRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listNotesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/ListNotes") - .setRequestMarshaller(ProtoUtils.marshaller(ListNotesRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ListNotesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor deleteNoteMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/DeleteNote") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteNoteRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor createNoteMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/CreateNote") - .setRequestMarshaller(ProtoUtils.marshaller(CreateNoteRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - batchCreateNotesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/BatchCreateNotes") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchCreateNotesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchCreateNotesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor updateNoteMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/UpdateNote") - .setRequestMarshaller(ProtoUtils.marshaller(UpdateNoteRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listNoteOccurrencesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/ListNoteOccurrences") - .setRequestMarshaller( - ProtoUtils.marshaller(ListNoteOccurrencesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListNoteOccurrencesResponse.getDefaultInstance())) - .build(); - - private final UnaryCallable getOccurrenceCallable; - private final UnaryCallable - listOccurrencesCallable; - private final UnaryCallable - listOccurrencesPagedCallable; - private final UnaryCallable deleteOccurrenceCallable; - private final UnaryCallable createOccurrenceCallable; - private final UnaryCallable - batchCreateOccurrencesCallable; - private final UnaryCallable updateOccurrenceCallable; - private final UnaryCallable getOccurrenceNoteCallable; - private final UnaryCallable getNoteCallable; - private final UnaryCallable listNotesCallable; - private final UnaryCallable listNotesPagedCallable; - private final UnaryCallable deleteNoteCallable; - private final UnaryCallable createNoteCallable; - private final UnaryCallable - batchCreateNotesCallable; - private final UnaryCallable updateNoteCallable; - private final UnaryCallable - listNoteOccurrencesCallable; - private final UnaryCallable - listNoteOccurrencesPagedCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcGrafeasStub create(GrafeasStubSettings settings) throws IOException { - return new GrpcGrafeasStub(settings, ClientContext.create(settings)); - } - - public static final GrpcGrafeasStub create(ClientContext clientContext) throws IOException { - return new GrpcGrafeasStub(GrafeasStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcGrafeasStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcGrafeasStub( - GrafeasStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcGrafeasStub, using the given settings. This is protected so that - * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. - */ - protected GrpcGrafeasStub(GrafeasStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcGrafeasCallableFactory()); - } - - /** - * Constructs an instance of GrpcGrafeasStub, using the given settings. This is protected so that - * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. - */ - protected GrpcGrafeasStub( - GrafeasStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings getOccurrenceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getOccurrenceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listOccurrencesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listOccurrencesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteOccurrenceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteOccurrenceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createOccurrenceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createOccurrenceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - batchCreateOccurrencesTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(batchCreateOccurrencesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateOccurrenceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateOccurrenceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings getOccurrenceNoteTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getOccurrenceNoteMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings getNoteTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getNoteMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings listNotesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listNotesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteNoteTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteNoteMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createNoteTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createNoteMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - batchCreateNotesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchCreateNotesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateNoteTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateNoteMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listNoteOccurrencesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listNoteOccurrencesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - - this.getOccurrenceCallable = - callableFactory.createUnaryCallable( - getOccurrenceTransportSettings, settings.getOccurrenceSettings(), clientContext); - this.listOccurrencesCallable = - callableFactory.createUnaryCallable( - listOccurrencesTransportSettings, settings.listOccurrencesSettings(), clientContext); - this.listOccurrencesPagedCallable = - callableFactory.createPagedCallable( - listOccurrencesTransportSettings, settings.listOccurrencesSettings(), clientContext); - this.deleteOccurrenceCallable = - callableFactory.createUnaryCallable( - deleteOccurrenceTransportSettings, settings.deleteOccurrenceSettings(), clientContext); - this.createOccurrenceCallable = - callableFactory.createUnaryCallable( - createOccurrenceTransportSettings, settings.createOccurrenceSettings(), clientContext); - this.batchCreateOccurrencesCallable = - callableFactory.createUnaryCallable( - batchCreateOccurrencesTransportSettings, - settings.batchCreateOccurrencesSettings(), - clientContext); - this.updateOccurrenceCallable = - callableFactory.createUnaryCallable( - updateOccurrenceTransportSettings, settings.updateOccurrenceSettings(), clientContext); - this.getOccurrenceNoteCallable = - callableFactory.createUnaryCallable( - getOccurrenceNoteTransportSettings, - settings.getOccurrenceNoteSettings(), - clientContext); - this.getNoteCallable = - callableFactory.createUnaryCallable( - getNoteTransportSettings, settings.getNoteSettings(), clientContext); - this.listNotesCallable = - callableFactory.createUnaryCallable( - listNotesTransportSettings, settings.listNotesSettings(), clientContext); - this.listNotesPagedCallable = - callableFactory.createPagedCallable( - listNotesTransportSettings, settings.listNotesSettings(), clientContext); - this.deleteNoteCallable = - callableFactory.createUnaryCallable( - deleteNoteTransportSettings, settings.deleteNoteSettings(), clientContext); - this.createNoteCallable = - callableFactory.createUnaryCallable( - createNoteTransportSettings, settings.createNoteSettings(), clientContext); - this.batchCreateNotesCallable = - callableFactory.createUnaryCallable( - batchCreateNotesTransportSettings, settings.batchCreateNotesSettings(), clientContext); - this.updateNoteCallable = - callableFactory.createUnaryCallable( - updateNoteTransportSettings, settings.updateNoteSettings(), clientContext); - this.listNoteOccurrencesCallable = - callableFactory.createUnaryCallable( - listNoteOccurrencesTransportSettings, - settings.listNoteOccurrencesSettings(), - clientContext); - this.listNoteOccurrencesPagedCallable = - callableFactory.createPagedCallable( - listNoteOccurrencesTransportSettings, - settings.listNoteOccurrencesSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable getOccurrenceCallable() { - return getOccurrenceCallable; - } - - @Override - public UnaryCallable listOccurrencesCallable() { - return listOccurrencesCallable; - } - - @Override - public UnaryCallable - listOccurrencesPagedCallable() { - return listOccurrencesPagedCallable; - } - - @Override - public UnaryCallable deleteOccurrenceCallable() { - return deleteOccurrenceCallable; - } - - @Override - public UnaryCallable createOccurrenceCallable() { - return createOccurrenceCallable; - } - - @Override - public UnaryCallable - batchCreateOccurrencesCallable() { - return batchCreateOccurrencesCallable; - } - - @Override - public UnaryCallable updateOccurrenceCallable() { - return updateOccurrenceCallable; - } - - @Override - public UnaryCallable getOccurrenceNoteCallable() { - return getOccurrenceNoteCallable; - } - - @Override - public UnaryCallable getNoteCallable() { - return getNoteCallable; - } - - @Override - public UnaryCallable listNotesCallable() { - return listNotesCallable; - } - - @Override - public UnaryCallable listNotesPagedCallable() { - return listNotesPagedCallable; - } - - @Override - public UnaryCallable deleteNoteCallable() { - return deleteNoteCallable; - } - - @Override - public UnaryCallable createNoteCallable() { - return createNoteCallable; - } - - @Override - public UnaryCallable - batchCreateNotesCallable() { - return batchCreateNotesCallable; - } - - @Override - public UnaryCallable updateNoteCallable() { - return updateNoteCallable; - } - - @Override - public UnaryCallable - listNoteOccurrencesCallable() { - return listNoteOccurrencesCallable; - } - - @Override - public UnaryCallable - listNoteOccurrencesPagedCallable() { - return listNoteOccurrencesPagedCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto deleted file mode 100644 index f2854fe686b2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "grafeas/v1/common.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// An attestation wrapper with a PGP-compatible signature. This message only -// supports `ATTACHED` signatures, where the payload that is signed is included -// alongside the signature itself in the same file. - -// Note kind that represents a logical attestation "role" or "authority". For -// example, an organization might have one `Authority` for "QA" and one for -// "build". This note is intended to act strictly as a grouping mechanism for -// the attached occurrences (Attestations). This grouping mechanism also -// provides a security boundary, since IAM ACLs gate the ability for a principle -// to attach an occurrence to a given note. It also provides a single point of -// lookup to find all attached attestation occurrences, even if they don't all -// live in the same project. -message AttestationNote { - // This submessage provides human-readable hints about the purpose of the - // authority. Because the name of a note acts as its resource reference, it is - // important to disambiguate the canonical name of the Note (which might be a - // UUID for security purposes) from "readable" names more suitable for debug - // output. Note that these hints should not be used to look up authorities in - // security sensitive contexts, such as when looking up attestations to - // verify. - message Hint { - // Required. The human readable name of this attestation authority, for - // example "qa". - string human_readable_name = 1; - } - - // Hint hints at the purpose of the attestation authority. - Hint hint = 1; -} - -message Jwt { - // The compact encoding of a JWS, which is always three base64 encoded strings - // joined by periods. For details, see: - // https://tools.ietf.org/html/rfc7515.html#section-3.1 - string compact_jwt = 1; -} - -// Occurrence that represents a single "attestation". The authenticity of an -// attestation can be verified using the attached signature. If the verifier -// trusts the public key of the signer, then verifying the signature is -// sufficient to establish trust. In this circumstance, the authority to which -// this attestation is attached is primarily useful for lookup (how to find -// this attestation if you already know the authority and artifact to be -// verified) and intent (for which authority this attestation was intended to -// sign. -message AttestationOccurrence { - // Required. The serialized payload that is verified by one or more - // `signatures`. - bytes serialized_payload = 1; - // One or more signatures over `serialized_payload`. Verifier implementations - // should consider this attestation message verified if at least one - // `signature` verifies `serialized_payload`. See `Signature` in common.proto - // for more details on signature structure and verification. - repeated Signature signatures = 2; - // One or more JWTs encoding a self-contained attestation. - // Each JWT encodes the payload that it verifies within the JWT itself. - // Verifier implementation SHOULD ignore the `serialized_payload` field - // when verifying these JWTs. - // If only JWTs are present on this AttestationOccurrence, then the - // `serialized_payload` SHOULD be left empty. - // Each JWT SHOULD encode a claim specific to the `resource_uri` of this - // Occurrence, but this is not validated by Grafeas metadata API - // implementations. The JWT itself is opaque to Grafeas. - repeated Jwt jwts = 3; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto deleted file mode 100644 index 172637fd4596..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "grafeas/v1/intoto_provenance.proto"; -import "grafeas/v1/intoto_statement.proto"; -import "grafeas/v1/provenance.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Note holding the version of the provider's builder and the signature of the -// provenance message in the build details occurrence. -message BuildNote { - // Required. Immutable. Version of the builder which produced this build. - string builder_version = 1; -} - -// Details of a build occurrence. -message BuildOccurrence { - // The actual provenance for the build. - grafeas.v1.BuildProvenance provenance = 1; - - // Serialized JSON representation of the provenance, used in generating the - // build signature in the corresponding build note. After verifying the - // signature, `provenance_bytes` can be unmarshalled and compared to the - // provenance to confirm that it is unchanged. A base64-encoded string - // representation of the provenance bytes is used for the signature in order - // to interoperate with openssl which expects this format for signature - // verification. - // - // The serialized form is captured both to avoid ambiguity in how the - // provenance is marshalled to json as well to prevent incompatibilities with - // future changes. - string provenance_bytes = 2; - - // Deprecated. See InTotoStatement for the replacement. - // In-toto Provenance representation as defined in spec. - InTotoProvenance intoto_provenance = 3; - - // In-toto Statement representation as defined in spec. - // The intoto_statement can contain any type of provenance. The serialized - // payload of the statement can be stored and signed in the Occurrence's - // envelope. - InTotoStatement intoto_statement = 4; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto deleted file mode 100644 index 80bd7869968a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Kind represents the kinds of notes supported. -enum NoteKind { - // Default value. This value is unused. - NOTE_KIND_UNSPECIFIED = 0; - // The note and occurrence represent a package vulnerability. - VULNERABILITY = 1; - // The note and occurrence assert build provenance. - BUILD = 2; - // This represents an image basis relationship. - IMAGE = 3; - // This represents a package installed via a package manager. - PACKAGE = 4; - // The note and occurrence track deployment events. - DEPLOYMENT = 5; - // The note and occurrence track the initial discovery status of a resource. - DISCOVERY = 6; - // This represents a logical "role" that can attest to artifacts. - ATTESTATION = 7; - // This represents an available package upgrade. - UPGRADE = 8; - // This represents a Compliance Note - COMPLIANCE = 9; - // This represents a DSSE attestation Note - DSSE_ATTESTATION = 10; -} - -// Metadata for any related URL information. -message RelatedUrl { - // Specific URL associated with the resource. - string url = 1; - // Label to describe usage of the URL. - string label = 2; -} - -// Verifiers (e.g. Kritis implementations) MUST verify signatures -// with respect to the trust anchors defined in policy (e.g. a Kritis policy). -// Typically this means that the verifier has been configured with a map from -// `public_key_id` to public key material (and any required parameters, e.g. -// signing algorithm). -// -// In particular, verification implementations MUST NOT treat the signature -// `public_key_id` as anything more than a key lookup hint. The `public_key_id` -// DOES NOT validate or authenticate a public key; it only provides a mechanism -// for quickly selecting a public key ALREADY CONFIGURED on the verifier through -// a trusted channel. Verification implementations MUST reject signatures in any -// of the following circumstances: -// * The `public_key_id` is not recognized by the verifier. -// * The public key that `public_key_id` refers to does not verify the -// signature with respect to the payload. -// -// The `signature` contents SHOULD NOT be "attached" (where the payload is -// included with the serialized `signature` bytes). Verifiers MUST ignore any -// "attached" payload and only verify signatures with respect to explicitly -// provided payload (e.g. a `payload` field on the proto message that holds -// this Signature, or the canonical serialization of the proto message that -// holds this signature). -message Signature { - // The content of the signature, an opaque bytestring. - // The payload that this signature verifies MUST be unambiguously provided - // with the Signature during verification. A wrapper message might provide - // the payload explicitly. Alternatively, a message might have a canonical - // serialization that can always be unambiguously computed to derive the - // payload. - bytes signature = 1; - - // The identifier for the public key that verifies this signature. - // * The `public_key_id` is required. - // * The `public_key_id` SHOULD be an RFC3986 conformant URI. - // * When possible, the `public_key_id` SHOULD be an immutable reference, - // such as a cryptographic digest. - // - // Examples of valid `public_key_id`s: - // - // OpenPGP V4 public key fingerprint: - // * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" - // See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more - // details on this scheme. - // - // RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER - // serialization): - // * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" - // * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" - string public_key_id = 2; -} - -// MUST match -// https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An -// authenticated message of arbitrary type. -message Envelope { - bytes payload = 1; - string payload_type = 2; - repeated EnvelopeSignature signatures = 3; -} - -message EnvelopeSignature { - bytes sig = 1; - string keyid = 2; -} - -// Indicates the location at which a package was found. -message FileLocation { - // For jars that are contained inside .war files, this filepath - // can indicate the path to war file combined with the path to jar file. - string file_path = 1; -} - -// License information. -message License { - // Often a single license can be used to represent the licensing terms. - // Sometimes it is necessary to include a choice of one or more licenses - // or some combination of license identifiers. - // Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", - // "GPL-2.0-or-later WITH Bison-exception-2.2". - string expression = 1; - - // Comments - string comments = 2; -} - -// Digest information. -message Digest { - // `SHA1`, `SHA512` etc. - string algo = 1; - - // Value of the digest. - bytes digest_bytes = 2; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto deleted file mode 100644 index 688fa82596b1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2021 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "grafeas/v1/severity.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -message ComplianceNote { - // The title that identifies this compliance check. - string title = 1; - // A description about this compliance check. - string description = 2; - // The OS and config versions the benchmark applies to. - repeated grafeas.v1.ComplianceVersion version = 3; - // A rationale for the existence of this compliance check. - string rationale = 4; - // A description of remediation steps if the compliance check fails. - string remediation = 5; - // A compliance check that is a CIS benchmark. - message CisBenchmark { - int32 profile_level = 1; - grafeas.v1.Severity severity = 2; - } - oneof compliance_type { - CisBenchmark cis_benchmark = 6; - } - // Serialized scan instructions with a predefined format. - bytes scan_instructions = 7; -} - -// Describes the CIS benchmark version that is applicable to a given OS and -// os version. -message ComplianceVersion { - // The CPE URI (https://cpe.mitre.org/specification/) this benchmark is - // applicable to. - string cpe_uri = 1; - // The name of the document that defines this benchmark, e.g. "CIS - // Container-Optimized OS". - string benchmark_document = 3; - // The version of the benchmark. This is set to the version of the OS-specific - // CIS document the benchmark is defined in. - string version = 2; -} - -// An indication that the compliance checks in the associated ComplianceNote -// were not satisfied for particular resources or a specified reason. -message ComplianceOccurrence { - repeated NonCompliantFile non_compliant_files = 2; - string non_compliance_reason = 3; -} - -// Details about files that caused a compliance check to fail. -message NonCompliantFile { - // display_command is a single command that can be used to display a list of - // non compliant files. When there is no such command, we can also iterate a - // list of non compliant file using 'path'. - - // Empty if `display_command` is set. - string path = 1; - // Command to display the non-compliant files. - string display_command = 2; - // Explains why a file is non compliant for a CIS check. - string reason = 3; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto deleted file mode 100644 index 181ec052fe42..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; -option java_outer_classname = "CVSSProto"; - -// Common Vulnerability Scoring System version 3. -// For details, see https://www.first.org/cvss/specification-document -message CVSSv3 { - // The base score is a function of the base metric scores. - float base_score = 1; - - float exploitability_score = 2; - - float impact_score = 3; - - // Base Metrics - // Represents the intrinsic characteristics of a vulnerability that are - // constant over time and across user environments. - AttackVector attack_vector = 5; - AttackComplexity attack_complexity = 6; - PrivilegesRequired privileges_required = 7; - UserInteraction user_interaction = 8; - Scope scope = 9; - Impact confidentiality_impact = 10; - Impact integrity_impact = 11; - Impact availability_impact = 12; - - enum AttackVector { - ATTACK_VECTOR_UNSPECIFIED = 0; - ATTACK_VECTOR_NETWORK = 1; - ATTACK_VECTOR_ADJACENT = 2; - ATTACK_VECTOR_LOCAL = 3; - ATTACK_VECTOR_PHYSICAL = 4; - } - - enum AttackComplexity { - ATTACK_COMPLEXITY_UNSPECIFIED = 0; - ATTACK_COMPLEXITY_LOW = 1; - ATTACK_COMPLEXITY_HIGH = 2; - } - - enum PrivilegesRequired { - PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - PRIVILEGES_REQUIRED_NONE = 1; - PRIVILEGES_REQUIRED_LOW = 2; - PRIVILEGES_REQUIRED_HIGH = 3; - } - - enum UserInteraction { - USER_INTERACTION_UNSPECIFIED = 0; - USER_INTERACTION_NONE = 1; - USER_INTERACTION_REQUIRED = 2; - } - - enum Scope { - SCOPE_UNSPECIFIED = 0; - SCOPE_UNCHANGED = 1; - SCOPE_CHANGED = 2; - } - - enum Impact { - IMPACT_UNSPECIFIED = 0; - IMPACT_HIGH = 1; - IMPACT_LOW = 2; - IMPACT_NONE = 3; - } -} - -// Common Vulnerability Scoring System. -// For details, see https://www.first.org/cvss/specification-document -// This is a message we will try to use for storing various versions of CVSS -// rather than making a separate proto for storing a specific version. -message CVSS { - // The base score is a function of the base metric scores. - float base_score = 1; - - float exploitability_score = 2; - - float impact_score = 3; - - // Base Metrics - // Represents the intrinsic characteristics of a vulnerability that are - // constant over time and across user environments. - AttackVector attack_vector = 4; - AttackComplexity attack_complexity = 5; - Authentication authentication = 6; - PrivilegesRequired privileges_required = 7; - UserInteraction user_interaction = 8; - Scope scope = 9; - Impact confidentiality_impact = 10; - Impact integrity_impact = 11; - Impact availability_impact = 12; - - enum AttackVector { - ATTACK_VECTOR_UNSPECIFIED = 0; - ATTACK_VECTOR_NETWORK = 1; - ATTACK_VECTOR_ADJACENT = 2; - ATTACK_VECTOR_LOCAL = 3; - ATTACK_VECTOR_PHYSICAL = 4; - } - - enum AttackComplexity { - ATTACK_COMPLEXITY_UNSPECIFIED = 0; - ATTACK_COMPLEXITY_LOW = 1; - ATTACK_COMPLEXITY_HIGH = 2; - } - - enum Authentication { - AUTHENTICATION_UNSPECIFIED = 0; - AUTHENTICATION_MULTIPLE = 1; - AUTHENTICATION_SINGLE = 2; - AUTHENTICATION_NONE = 3; - } - - enum PrivilegesRequired { - PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - PRIVILEGES_REQUIRED_NONE = 1; - PRIVILEGES_REQUIRED_LOW = 2; - PRIVILEGES_REQUIRED_HIGH = 3; - } - - enum UserInteraction { - USER_INTERACTION_UNSPECIFIED = 0; - USER_INTERACTION_NONE = 1; - USER_INTERACTION_REQUIRED = 2; - } - - enum Scope { - SCOPE_UNSPECIFIED = 0; - SCOPE_UNCHANGED = 1; - SCOPE_CHANGED = 2; - } - - enum Impact { - IMPACT_UNSPECIFIED = 0; - IMPACT_HIGH = 1; - IMPACT_LOW = 2; - IMPACT_NONE = 3; - } -} - -// CVSS Version. -enum CVSSVersion { - CVSS_VERSION_UNSPECIFIED = 0; - CVSS_VERSION_2 = 1; - CVSS_VERSION_3 = 2; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto deleted file mode 100644 index 5204004fd646..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// An artifact that can be deployed in some runtime. -message DeploymentNote { - // Required. Resource URI for the artifact being deployed. - repeated string resource_uri = 1; -} - -// The period during which some deployable was active in a runtime. -message DeploymentOccurrence { - // Identity of the user that triggered this deployment. - string user_email = 1; - - // Required. Beginning of the lifetime of this deployment. - google.protobuf.Timestamp deploy_time = 2; - - // End of the lifetime of this deployment. - google.protobuf.Timestamp undeploy_time = 3; - - // Configuration used to create this deployment. - string config = 4; - - // Address of the runtime element hosting this deployment. - string address = 5; - - // Output only. Resource URI for the artifact being deployed taken from - // the deployable field with the same name. - repeated string resource_uri = 6; - - // Types of platforms. - enum Platform { - // Unknown. - PLATFORM_UNSPECIFIED = 0; - // Google Container Engine. - GKE = 1; - // Google App Engine: Flexible Environment. - FLEX = 2; - // Custom user-defined platform. - CUSTOM = 3; - } - // Platform hosting this deployment. - Platform platform = 7; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto deleted file mode 100644 index bfb94e4a3474..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; -import "grafeas/v1/common.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// A note that indicates a type of analysis a provider would perform. This note -// exists in a provider's project. A `Discovery` occurrence is created in a -// consumer's project at the start of analysis. -message DiscoveryNote { - // Required. Immutable. The kind of analysis that is handled by this - // discovery. - grafeas.v1.NoteKind analysis_kind = 1; -} - -// Provides information about the analysis status of a discovered resource. -message DiscoveryOccurrence { - // Whether the resource is continuously analyzed. - enum ContinuousAnalysis { - // Unknown. - CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; - // The resource is continuously analyzed. - ACTIVE = 1; - // The resource is ignored for continuous analysis. - INACTIVE = 2; - } - - // Whether the resource is continuously analyzed. - ContinuousAnalysis continuous_analysis = 1; - - // Analysis status for a resource. Currently for initial analysis only (not - // updated in continuous analysis). - enum AnalysisStatus { - option allow_alias = true; - - // Unknown. - ANALYSIS_STATUS_UNSPECIFIED = 0; - // Resource is known but no action has been taken yet. - PENDING = 1; - // Resource is being analyzed. - SCANNING = 2; - // Analysis has finished successfully. - FINISHED_SUCCESS = 3; - // Analysis has completed. - COMPLETE = 3; - // Analysis has finished unsuccessfully, the analysis itself is in a bad - // state. - FINISHED_FAILED = 4; - // The resource is known not to be supported. - FINISHED_UNSUPPORTED = 5; - } - - // The status of discovery for the resource. - AnalysisStatus analysis_status = 2; - - // Indicates which analysis completed successfully. Multiple types of - // analysis can be performed on a single resource. - message AnalysisCompleted { - repeated string analysis_type = 1; - } - - AnalysisCompleted analysis_completed = 7; - - // Indicates any errors encountered during analysis of a resource. There - // could be 0 or more of these errors. - repeated google.rpc.Status analysis_error = 8; - - // When an error is encountered this will contain a LocalizedMessage under - // details to show to the user. The LocalizedMessage is output only and - // populated by the API. - google.rpc.Status analysis_status_error = 3; - - // The CPE of the resource being scanned. - string cpe = 4; - - // The last time this resource was scanned. - google.protobuf.Timestamp last_scan_time = 5; - - // The time occurrences related to this discovery occurrence were archived. - google.protobuf.Timestamp archive_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto deleted file mode 100644 index 34ba3df9f9be..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2021 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -syntax = "proto3"; - -package grafeas.v1; - -import "grafeas/v1/common.proto"; -import "grafeas/v1/intoto_statement.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -message DSSEAttestationNote { - // This submessage provides human-readable hints about the purpose of the - // authority. Because the name of a note acts as its resource reference, it is - // important to disambiguate the canonical name of the Note (which might be a - // UUID for security purposes) from "readable" names more suitable for debug - // output. Note that these hints should not be used to look up authorities in - // security sensitive contexts, such as when looking up attestations to - // verify. - message DSSEHint { - // Required. The human readable name of this attestation authority, for - // example "cloudbuild-prod". - string human_readable_name = 1; - } - // DSSEHint hints at the purpose of the attestation authority. - DSSEHint hint = 1; -} - -// Deprecated. Prefer to use a regular Occurrence, and populate the -// Envelope at the top level of the Occurrence. -message DSSEAttestationOccurrence { - // If doing something security critical, make sure to verify the signatures in - // this metadata. - Envelope envelope = 1; - oneof decoded_payload { - InTotoStatement statement = 2; - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto deleted file mode 100644 index 5665fe3623e6..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto +++ /dev/null @@ -1,544 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "grafeas/v1/attestation.proto"; -import "grafeas/v1/build.proto"; -import "grafeas/v1/common.proto"; -import "grafeas/v1/compliance.proto"; -import "grafeas/v1/deployment.proto"; -import "grafeas/v1/discovery.proto"; -import "grafeas/v1/dsse_attestation.proto"; -import "grafeas/v1/image.proto"; -import "grafeas/v1/package.proto"; -import "grafeas/v1/upgrade.proto"; -import "grafeas/v1/vulnerability.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; -option (google.api.resource_definition) = { - type: "grafeas.io/Project" - pattern: "projects/{project}" -}; - -// [Grafeas](https://grafeas.io) API. -// -// Retrieves analysis results of Cloud components such as Docker container -// images. -// -// Analysis results are stored as a series of occurrences. An `Occurrence` -// contains information about a specific analysis instance on a resource. An -// occurrence refers to a `Note`. A note contains details describing the -// analysis and is generally stored in a separate project, called a `Provider`. -// Multiple occurrences can refer to the same note. -// -// For example, an SSL vulnerability could affect multiple images. In this case, -// there would be one note for the vulnerability and an occurrence for each -// image with the vulnerability referring to that note. -service Grafeas { - option (google.api.default_host) = "containeranalysis.googleapis.com"; - - // Gets the specified occurrence. - rpc GetOccurrence(GetOccurrenceRequest) returns (Occurrence) { - option (google.api.http) = { - get: "/v1/{name=projects/*/occurrences/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists occurrences for the specified project. - rpc ListOccurrences(ListOccurrencesRequest) - returns (ListOccurrencesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*}/occurrences" - }; - option (google.api.method_signature) = "parent,filter"; - } - - // Deletes the specified occurrence. For example, use this method to delete an - // occurrence when the occurrence is no longer applicable for the given - // resource. - rpc DeleteOccurrence(DeleteOccurrenceRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/occurrences/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new occurrence. - rpc CreateOccurrence(CreateOccurrenceRequest) returns (Occurrence) { - option (google.api.http) = { - post: "/v1/{parent=projects/*}/occurrences" - body: "occurrence" - }; - option (google.api.method_signature) = "parent,occurrence"; - } - - // Creates new occurrences in batch. - rpc BatchCreateOccurrences(BatchCreateOccurrencesRequest) - returns (BatchCreateOccurrencesResponse) { - option (google.api.http) = { - post: "/v1/{parent=projects/*}/occurrences:batchCreate" - body: "*" - }; - option (google.api.method_signature) = "parent,occurrences"; - } - - // Updates the specified occurrence. - rpc UpdateOccurrence(UpdateOccurrenceRequest) returns (Occurrence) { - option (google.api.http) = { - patch: "/v1/{name=projects/*/occurrences/*}" - body: "occurrence" - }; - option (google.api.method_signature) = "name,occurrence,update_mask"; - } - - // Gets the note attached to the specified occurrence. Consumer projects can - // use this method to get a note that belongs to a provider project. - rpc GetOccurrenceNote(GetOccurrenceNoteRequest) returns (Note) { - option (google.api.http) = { - get: "/v1/{name=projects/*/occurrences/*}/notes" - }; - option (google.api.method_signature) = "name"; - } - - // Gets the specified note. - rpc GetNote(GetNoteRequest) returns (Note) { - option (google.api.http) = { - get: "/v1/{name=projects/*/notes/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists notes for the specified project. - rpc ListNotes(ListNotesRequest) returns (ListNotesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*}/notes" - }; - option (google.api.method_signature) = "parent,filter"; - } - - // Deletes the specified note. - rpc DeleteNote(DeleteNoteRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/notes/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new note. - rpc CreateNote(CreateNoteRequest) returns (Note) { - option (google.api.http) = { - post: "/v1/{parent=projects/*}/notes" - body: "note" - }; - option (google.api.method_signature) = "parent,note_id,note"; - } - - // Creates new notes in batch. - rpc BatchCreateNotes(BatchCreateNotesRequest) - returns (BatchCreateNotesResponse) { - option (google.api.http) = { - post: "/v1/{parent=projects/*}/notes:batchCreate" - body: "*" - }; - option (google.api.method_signature) = "parent,notes"; - } - - // Updates the specified note. - rpc UpdateNote(UpdateNoteRequest) returns (Note) { - option (google.api.http) = { - patch: "/v1/{name=projects/*/notes/*}" - body: "note" - }; - option (google.api.method_signature) = "name,note,update_mask"; - } - - // Lists occurrences referencing the specified note. Provider projects can use - // this method to get all occurrences across consumer projects referencing the - // specified note. - rpc ListNoteOccurrences(ListNoteOccurrencesRequest) - returns (ListNoteOccurrencesResponse) { - option (google.api.http) = { - get: "/v1/{name=projects/*/notes/*}/occurrences" - }; - option (google.api.method_signature) = "name,filter"; - } -} - -// An instance of an analysis type that has been found on a resource. -message Occurrence { - option (google.api.resource) = { - type: "grafeas.io/Occurrence" - pattern: "projects/{project}/occurrences/{occurrence}" - }; - - // Output only. The name of the occurrence in the form of - // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1; - - // Required. Immutable. A URI that represents the resource for which the - // occurrence applies. For example, - // `https://gcr.io/project/image@sha256:123abc` for a Docker image. - string resource_uri = 2; - - // Required. Immutable. The analysis note associated with this occurrence, in - // the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be - // used as a filter in list requests. - string note_name = 3; - - // Output only. This explicitly denotes which of the occurrence details are - // specified. This field can be used as a filter in list requests. - grafeas.v1.NoteKind kind = 4; - - // A description of actions that can be taken to remedy the note. - string remediation = 5; - - // Output only. The time this occurrence was created. - google.protobuf.Timestamp create_time = 6; - - // Output only. The time this occurrence was last updated. - google.protobuf.Timestamp update_time = 7; - - // Required. Immutable. Describes the details of the note kind found on this - // resource. - oneof details { - // Describes a security vulnerability. - grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - // Describes a verifiable build. - grafeas.v1.BuildOccurrence build = 9; - // Describes how this resource derives from the basis in the associated - // note. - grafeas.v1.ImageOccurrence image = 10; - // Describes the installation of a package on the linked resource. - grafeas.v1.PackageOccurrence package = 11; - // Describes the deployment of an artifact on a runtime. - grafeas.v1.DeploymentOccurrence deployment = 12; - // Describes when a resource was discovered. - grafeas.v1.DiscoveryOccurrence discovery = 13; - // Describes an attestation of an artifact. - grafeas.v1.AttestationOccurrence attestation = 14; - // Describes an available package upgrade on the linked resource. - grafeas.v1.UpgradeOccurrence upgrade = 15; - // Describes a compliance violation on a linked resource. - grafeas.v1.ComplianceOccurrence compliance = 16; - // Describes an attestation of an artifact using dsse. - grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - } - - // https://github.com/secure-systems-lab/dsse - grafeas.v1.Envelope envelope = 18; -} - -// A type of analysis that can be done for a resource. -message Note { - option (google.api.resource) = { - type: "grafeas.io/Note" - pattern: "projects/{project}/notes/{note}" - }; - - // Output only. The name of the note in the form of - // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1; - - // A one sentence description of this note. - string short_description = 2; - - // A detailed description of this note. - string long_description = 3; - - // Output only. The type of analysis. This field can be used as a filter in - // list requests. - grafeas.v1.NoteKind kind = 4; - - // URLs associated with this note. - repeated grafeas.v1.RelatedUrl related_url = 5; - - // Time of expiration for this note. Empty if note does not expire. - google.protobuf.Timestamp expiration_time = 6; - - // Output only. The time this note was created. This field can be used as a - // filter in list requests. - google.protobuf.Timestamp create_time = 7; - - // Output only. The time this note was last updated. This field can be used as - // a filter in list requests. - google.protobuf.Timestamp update_time = 8; - - // Other notes related to this note. - repeated string related_note_names = 9; - - // Required. Immutable. The type of analysis this note represents. - oneof type { - // A note describing a package vulnerability. - grafeas.v1.VulnerabilityNote vulnerability = 10; - // A note describing build provenance for a verifiable build. - grafeas.v1.BuildNote build = 11; - // A note describing a base image. - grafeas.v1.ImageNote image = 12; - // A note describing a package hosted by various package managers. - grafeas.v1.PackageNote package = 13; - // A note describing something that can be deployed. - grafeas.v1.DeploymentNote deployment = 14; - // A note describing the initial analysis of a resource. - grafeas.v1.DiscoveryNote discovery = 15; - // A note describing an attestation role. - grafeas.v1.AttestationNote attestation = 16; - // A note describing available package upgrades. - grafeas.v1.UpgradeNote upgrade = 17; - // A note describing a compliance check. - grafeas.v1.ComplianceNote compliance = 18; - // A note describing a dsse attestation note. - grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - } -} - -// Request to get an occurrence. -message GetOccurrenceRequest { - // The name of the occurrence in the form of - // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Occurrence" - ]; -} - -// Request to list occurrences. -message ListOccurrencesRequest { - // The name of the project to list occurrences for in the form of - // `projects/[PROJECT_ID]`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - - // The filter expression. - string filter = 2; - - // Number of occurrences to return in the list. Must be positive. Max allowed - // page size is 1000. If not specified, page size defaults to 20. - int32 page_size = 3; - - // Token to provide to skip to a particular spot in the list. - string page_token = 4; -} - -// Response for listing occurrences. -message ListOccurrencesResponse { - // The occurrences requested. - repeated Occurrence occurrences = 1; - // The next pagination token in the list response. It should be used as - // `page_token` for the following request. An empty value means no more - // results. - string next_page_token = 2; -} - -// Request to delete an occurrence. -message DeleteOccurrenceRequest { - // The name of the occurrence in the form of - // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Occurrence" - ]; -} - -// Request to create a new occurrence. -message CreateOccurrenceRequest { - // The name of the project in the form of `projects/[PROJECT_ID]`, under which - // the occurrence is to be created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - // The occurrence to create. - Occurrence occurrence = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request to update an occurrence. -message UpdateOccurrenceRequest { - // The name of the occurrence in the form of - // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Occurrence" - ]; - // The updated occurrence. - Occurrence occurrence = 2 [(google.api.field_behavior) = REQUIRED]; - // The fields to update. - google.protobuf.FieldMask update_mask = 3; -} - -// Request to get a note. -message GetNoteRequest { - // The name of the note in the form of - // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Note" - ]; -} - -// Request to get the note to which the specified occurrence is attached. -message GetOccurrenceNoteRequest { - // The name of the occurrence in the form of - // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Occurrence" - ]; -} - -// Request to list notes. -message ListNotesRequest { - // The name of the project to list notes for in the form of - // `projects/[PROJECT_ID]`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - - // The filter expression. - string filter = 2; - - // Number of notes to return in the list. Must be positive. Max allowed page - // size is 1000. If not specified, page size defaults to 20. - int32 page_size = 3; - - // Token to provide to skip to a particular spot in the list. - string page_token = 4; -} - -// Response for listing notes. -message ListNotesResponse { - // The notes requested. - repeated Note notes = 1; - // The next pagination token in the list response. It should be used as - // `page_token` for the following request. An empty value means no more - // results. - string next_page_token = 2; -} - -// Request to delete a note. -message DeleteNoteRequest { - // The name of the note in the form of - // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Note" - ]; -} - -// Request to create a new note. -message CreateNoteRequest { - // The name of the project in the form of `projects/[PROJECT_ID]`, under which - // the note is to be created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - // The ID to use for this note. - string note_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The note to create. - Note note = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request to update a note. -message UpdateNoteRequest { - // The name of the note in the form of - // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Note" - ]; - // The updated note. - Note note = 2 [(google.api.field_behavior) = REQUIRED]; - // The fields to update. - google.protobuf.FieldMask update_mask = 3; -} - -// Request to list occurrences for a note. -message ListNoteOccurrencesRequest { - // The name of the note to list occurrences for in the form of - // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Note" - ]; - // The filter expression. - string filter = 2; - // Number of occurrences to return in the list. - int32 page_size = 3; - // Token to provide to skip to a particular spot in the list. - string page_token = 4; -} - -// Response for listing occurrences for a note. -message ListNoteOccurrencesResponse { - // The occurrences attached to the specified note. - repeated Occurrence occurrences = 1; - // Token to provide to skip to a particular spot in the list. - string next_page_token = 2; -} - -// Request to create notes in batch. -message BatchCreateNotesRequest { - // The name of the project in the form of `projects/[PROJECT_ID]`, under which - // the notes are to be created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - - // The notes to create. Max allowed length is 1000. - map notes = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Response for creating notes in batch. -message BatchCreateNotesResponse { - // The notes that were created. - repeated Note notes = 1; -} - -// Request to create occurrences in batch. -message BatchCreateOccurrencesRequest { - // The name of the project in the form of `projects/[PROJECT_ID]`, under which - // the occurrences are to be created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - - // The occurrences to create. Max allowed length is 1000. - repeated Occurrence occurrences = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Response for creating occurrences in batch. -message BatchCreateOccurrencesResponse { - // The occurrences that were created. - repeated Occurrence occurrences = 1; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto deleted file mode 100644 index 9ac162cec22f..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Layer holds metadata specific to a layer of a Docker image. -message Layer { - // Required. The recovered Dockerfile directive used to construct this layer. - // See https://docs.docker.com/engine/reference/builder/ for more information. - string directive = 1; - - // The recovered arguments to the Dockerfile directive. - string arguments = 2; -} - -// A set of properties that uniquely identify a given Docker image. -message Fingerprint { - // Required. The layer ID of the final layer in the Docker image's v1 - // representation. - string v1_name = 1; - - // Required. The ordered list of v2 blobs that represent a given image. - repeated string v2_blob = 2; - - // Output only. The name of the image's v2 blobs computed via: - // [bottom] := v2_blob[bottom] - // [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) - // Only the name of the final blob is kept. - string v2_name = 3; -} - -// Basis describes the base image portion (Note) of the DockerImage -// relationship. Linked occurrences are derived from this or an equivalent image -// via: -// FROM -// Or an equivalent reference, e.g., a tag of the resource_url. -message ImageNote { - // Required. Immutable. The resource_url for the resource representing the - // basis of associated occurrence images. - string resource_url = 1; - - // Required. Immutable. The fingerprint of the base image. - Fingerprint fingerprint = 2; -} - -// Details of the derived image portion of the DockerImage relationship. This -// image would be produced from a Dockerfile with FROM . -message ImageOccurrence { - // Required. The fingerprint of the derived image. - Fingerprint fingerprint = 1; - - // Output only. The number of layers by which this image differs from the - // associated image basis. - int32 distance = 2; - - // This contains layer-specific metadata, if populated it has length - // "distance" and is ordered with [distance] being the layer immediately - // following the base image and [1] being the final layer. - repeated Layer layer_info = 3; - - // Output only. This contains the base image URL for the derived image - // occurrence. - string base_resource_url = 4; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto deleted file mode 100644 index 78886b66e487..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2021 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; -option java_outer_classname = "InTotoProvenanceProto"; - -// Spec defined at -// https://github.com/in-toto/attestation/blob/main/spec/predicates/provenance.md - -// Steps taken to build the artifact. -// For a TaskRun, typically each container corresponds to one step in the -// recipe. -message Recipe { - // URI indicating what type of recipe was performed. It determines the meaning - // of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. - string type = 1; - // Index in materials containing the recipe steps that are not implied by - // recipe.type. For example, if the recipe type were "make", then this would - // point to the source containing the Makefile, not the make program itself. - // Set to -1 if the recipe doesn't come from a material, as zero is default - // unset value for int64. - int64 defined_in_material = 2; - // String identifying the entry point into the build. - // This is often a path to a configuration file and/or a target label within - // that file. The syntax and meaning are defined by recipe.type. For example, - // if the recipe type were "make", then this would reference the directory in - // which to run make as well as which target to use. - string entry_point = 3; - // Collection of all external inputs that influenced the build on top of - // recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe - // type were "make", then this might be the flags passed to make aside from - // the target, which is captured in recipe.entryPoint. Since the arguments - // field can greatly vary in structure, depending on the builder and recipe - // type, this is of form "Any". - repeated google.protobuf.Any arguments = 4; - // Any other builder-controlled inputs necessary for correctly evaluating the - // recipe. Usually only needed for reproducing the build but not evaluated as - // part of policy. Since the environment field can greatly vary in structure, - // depending on the builder and recipe type, this is of form "Any". - repeated google.protobuf.Any environment = 5; -} - -// Indicates that the builder claims certain fields in this message to be -// complete. -message Completeness { - // If true, the builder claims that recipe.arguments is complete, meaning that - // all external inputs are properly captured in the recipe. - bool arguments = 1; - // If true, the builder claims that recipe.environment is claimed to be - // complete. - bool environment = 2; - // If true, the builder claims that materials are complete, usually through - // some controls to prevent network access. Sometimes called "hermetic". - bool materials = 3; -} - -// Other properties of the build. -message Metadata { - // Identifies the particular build invocation, which can be useful for finding - // associated logs or other ad-hoc analysis. The value SHOULD be globally - // unique, per in-toto Provenance spec. - string build_invocation_id = 1; - // The timestamp of when the build started. - google.protobuf.Timestamp build_started_on = 2; - // The timestamp of when the build completed. - google.protobuf.Timestamp build_finished_on = 3; - // Indicates that the builder claims certain fields in this message to be - // complete. - Completeness completeness = 4; - // If true, the builder claims that running the recipe on materials will - // produce bit-for-bit identical output. - bool reproducible = 5; -} - -message BuilderConfig { - string id = 1; -} - -message InTotoProvenance { - BuilderConfig builder_config = 1; // required - // Identifies the configuration used for the build. - // When combined with materials, this SHOULD fully describe the build, - // such that re-running this recipe results in bit-for-bit identical output - // (if the build is reproducible). - Recipe recipe = 2; // required - Metadata metadata = 3; - // The collection of artifacts that influenced the build including sources, - // dependencies, build tools, base images, and so on. This is considered to be - // incomplete unless metadata.completeness.materials is true. Unset or null is - // equivalent to empty. - repeated string materials = 4; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto deleted file mode 100644 index 1f798d0d65f1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2021 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "grafeas/v1/intoto_provenance.proto"; -import "grafeas/v1/slsa_provenance.proto"; -import "grafeas/v1/slsa_provenance_zero_two.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; -option java_outer_classname = "InTotoStatementProto"; - -// Spec defined at -// https://github.com/in-toto/attestation/tree/main/spec#statement The -// serialized InTotoStatement will be stored as Envelope.payload. -// Envelope.payloadType is always "application/vnd.in-toto+json". -message InTotoStatement { - // Always `https://in-toto.io/Statement/v0.1`. - string type = 1 [json_name = "_type"]; - repeated Subject subject = 2; - // `https://slsa.dev/provenance/v0.1` for SlsaProvenance. - string predicate_type = 3; - oneof predicate { - InTotoProvenance provenance = 4; - SlsaProvenance slsa_provenance = 5; - SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - } -} -message Subject { - string name = 1; - // `"": ""` - // Algorithms can be e.g. sha256, sha512 - // See - // https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet - map digest = 2; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto deleted file mode 100644 index 61b21dbf0323..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/api/field_behavior.proto"; -import "grafeas/v1/common.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Instruction set architectures supported by various package managers. -enum Architecture { - // Unknown architecture. - ARCHITECTURE_UNSPECIFIED = 0; - // X86 architecture. - X86 = 1; - // X64 architecture. - X64 = 2; -} - -// This represents a particular channel of distribution for a given package. -// E.g., Debian's jessie-backports dpkg mirror. -message Distribution { - // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - // denoting the package manager version distributing a package. - string cpe_uri = 1 [(google.api.field_behavior) = REQUIRED]; - - // The CPU architecture for which packages in this distribution channel were - // built. - Architecture architecture = 2; - - // The latest available version of this package in this distribution channel. - Version latest_version = 3; - - // A freeform string denoting the maintainer of this package. - string maintainer = 4; - - // The distribution channel-specific homepage for this package. - string url = 5; - - // The distribution channel-specific description of this package. - string description = 6; -} - -// An occurrence of a particular package installation found within a system's -// filesystem. E.g., glibc was found in `/var/lib/dpkg/status`. -message Location { - // Deprecated. - // The CPE URI in [CPE format](https://cpe.mitre.org/specification/) - string cpe_uri = 1; - - // Deprecated. - // The version installed at this location. - Version version = 2; - - // The path from which we gathered that this package/version is installed. - string path = 3; -} - -// PackageNote represents a particular package version. -message PackageNote { - // The name of the package. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Deprecated. - // The various channels by which a package is distributed. - repeated Distribution distribution = 10; - - // The type of package; whether native or non native (e.g., ruby gems, - // node.js packages, etc.). - string package_type = 11; - - // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - // denoting the package manager version distributing a package. - // The cpe_uri will be blank for language packages. - string cpe_uri = 12; - - // The CPU architecture for which packages in this distribution channel were - // built. Architecture will be blank for language packages. - Architecture architecture = 13; - - // The version of the package. - Version version = 14; - - // A freeform text denoting the maintainer of this package. - string maintainer = 15; - - // The homepage for this package. - string url = 16; - - // The description of this package. - string description = 17; - - // Licenses that have been declared by the authors of the package. - License license = 18; - - // Hash value, typically a file digest, that allows unique - // identification a specific package. - repeated Digest digest = 19; -} - -// Details on how a particular software package was installed on a system. -message PackageOccurrence { - // The name of the installed package. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // All of the places within the filesystem versions of this package - // have been found. - repeated Location location = 2; - - // The type of package; whether native or non native (e.g., ruby gems, - // node.js packages, etc.). - string package_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - // denoting the package manager version distributing a package. - // The cpe_uri will be blank for language packages. - string cpe_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The CPU architecture for which packages in this distribution channel were - // built. Architecture will be blank for language packages. - Architecture architecture = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Licenses that have been declared by the authors of the package. - License license = 6; - - // The version of the package. - Version version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Version contains structured information about the version of a package. -message Version { - // Used to correct mistakes in the version numbering scheme. - int32 epoch = 1; - - // Required only when version kind is NORMAL. The main part of the version - // name. - string name = 2; - - // The iteration of the package build from the above version. - string revision = 3; - - // Whether this version is specifying part of an inclusive range. Grafeas - // does not have the capability to specify version ranges; instead we have - // fields that specify start version and end versions. At times this is - // insufficient - we also need to specify whether the version is included in - // the range or is excluded from the range. This boolean is expected to be set - // to true when the version is included in a range. - bool inclusive = 6; - - // Whether this is an ordinary package version or a sentinel MIN/MAX version. - enum VersionKind { - // Unknown. - VERSION_KIND_UNSPECIFIED = 0; - // A standard package version. - NORMAL = 1; - // A special version representing negative infinity. - MINIMUM = 2; - // A special version representing positive infinity. - MAXIMUM = 3; - } - - // Required. Distinguishes between sentinel MIN/MAX versions and normal - // versions. - VersionKind kind = 4; - - // Human readable version string. This string is of the form - // :- and is only set when kind is NORMAL. - string full_name = 5; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto deleted file mode 100644 index 06b109785f8a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Provenance of a build. Contains all information needed to verify the full -// details about the build from source to completion. -message BuildProvenance { - // Required. Unique identifier of the build. - string id = 1; - - // ID of the project. - string project_id = 2; - - // Commands requested by the build. - repeated Command commands = 3; - - // Output of the build. - repeated Artifact built_artifacts = 4; - - // Time at which the build was created. - google.protobuf.Timestamp create_time = 5; - - // Time at which execution of the build was started. - google.protobuf.Timestamp start_time = 6; - - // Time at which execution of the build was finished. - google.protobuf.Timestamp end_time = 7; - - // E-mail address of the user who initiated this build. Note that this was the - // user's e-mail address at the time the build was initiated; this address may - // not represent the same end-user for all time. - string creator = 8; - - // URI where any logs for this provenance were written. - string logs_uri = 9; - - // Details of the Source input to the build. - Source source_provenance = 10; - - // Trigger identifier if the build was triggered automatically; empty if not. - string trigger_id = 11; - - // Special options applied to this build. This is a catch-all field where - // build providers can enter any desired additional details. - map build_options = 12; - - // Version string of the builder at the time this build was executed. - string builder_version = 13; -} - -// Source describes the location of the source used for the build. -message Source { - // If provided, the input binary artifacts for the build came from this - // location. - string artifact_storage_source_uri = 1; - - // Hash(es) of the build source, which can be used to verify that the original - // source integrity was maintained in the build. - // - // The keys to this map are file paths used as build source and the values - // contain the hash values for those files. - // - // If the build source came in a single package such as a gzipped tarfile - // (.tar.gz), the FileHash will be for the single path to that file. - map file_hashes = 2; - - // If provided, the source code used for the build came from this location. - SourceContext context = 3; - - // If provided, some of the source code used for the build may be found in - // these locations, in the case where the source repository had multiple - // remotes or submodules. This list will not include the context specified in - // the context field. - repeated SourceContext additional_contexts = 4; -} - -// Container message for hashes of byte content of files, used in source -// messages to verify integrity of source input to the build. -message FileHashes { - // Required. Collection of file hashes. - repeated Hash file_hash = 1; -} - -// Container message for hash values. -message Hash { - // Required. The type of hash that was performed, e.g. "SHA-256". - string type = 1; - // Required. The hash value. - bytes value = 2; -} - -// Command describes a step performed as part of the build pipeline. -message Command { - // Required. Name of the command, as presented on the command line, or if the - // command is packaged as a Docker container, as presented to `docker pull`. - string name = 1; - - // Environment variables set before running this command. - repeated string env = 2; - - // Command-line arguments used when executing this command. - repeated string args = 3; - - // Working directory (relative to project source root) used when running this - // command. - string dir = 4; - - // Optional unique identifier for this command, used in wait_for to reference - // this command as a dependency. - string id = 5; - - // The ID(s) of the command(s) that this command depends on. - repeated string wait_for = 6; -} - -// Artifact describes a build product. -message Artifact { - // Hash or checksum value of a binary, or Docker Registry 2.0 digest of a - // container. - string checksum = 1; - - // Artifact ID, if any; for container images, this will be a URL by digest - // like `gcr.io/projectID/imagename@sha256:123456`. - string id = 2; - - // Related artifact names. This may be the path to a binary or jar file, or in - // the case of a container build, the name used to push the container image to - // Google Container Registry, as presented to `docker push`. Note that a - // single Artifact ID can have multiple names, for example if two tags are - // applied to one image. - repeated string names = 3; -} - -// A SourceContext is a reference to a tree of files. A SourceContext together -// with a path point to a unique revision of a single file or directory. -message SourceContext { - // A SourceContext can refer any one of the following types of repositories. - oneof context { - // A SourceContext referring to a revision in a Google Cloud Source Repo. - CloudRepoSourceContext cloud_repo = 1; - - // A SourceContext referring to a Gerrit project. - GerritSourceContext gerrit = 2; - - // A SourceContext referring to any third party Git repo (e.g., GitHub). - GitSourceContext git = 3; - } - - // Labels with user defined metadata. - map labels = 4; -} - -// An alias to a repo revision. -message AliasContext { - // The type of an alias. - enum Kind { - // Unknown. - KIND_UNSPECIFIED = 0; - // Git tag. - FIXED = 1; - // Git branch. - MOVABLE = 2; - // Used to specify non-standard aliases. For example, if a Git repo has a - // ref named "refs/foo/bar". - OTHER = 4; - } - - // The alias kind. - Kind kind = 1; - - // The alias name. - string name = 2; -} - -// A CloudRepoSourceContext denotes a particular revision in a Google Cloud -// Source Repo. -message CloudRepoSourceContext { - // The ID of the repo. - RepoId repo_id = 1; - - // A revision in a Cloud Repo can be identified by either its revision ID or - // its alias. - oneof revision { - // A revision ID. - string revision_id = 2; - - // An alias, which may be a branch or tag. - AliasContext alias_context = 3; - } -} - -// A SourceContext referring to a Gerrit project. -message GerritSourceContext { - // The URI of a running Gerrit instance. - string host_uri = 1; - - // The full project name within the host. Projects may be nested, so - // "project/subproject" is a valid project name. The "repo name" is the - // hostURI/project. - string gerrit_project = 2; - - // A revision in a Gerrit project can be identified by either its revision ID - // or its alias. - oneof revision { - // A revision (commit) ID. - string revision_id = 3; - - // An alias, which may be a branch or tag. - AliasContext alias_context = 4; - } -} - -// A GitSourceContext denotes a particular revision in a third party Git -// repository (e.g., GitHub). -message GitSourceContext { - // Git repository URL. - string url = 1; - - // Git commit hash. - string revision_id = 2; -} - -// A unique identifier for a Cloud Repo. -message RepoId { - // A cloud repo can be identified by either its project ID and repository name - // combination, or its globally unique identifier. - oneof id { - // A combination of a project ID and a repo name. - ProjectRepoId project_repo_id = 1; - - // A server-assigned, globally unique identifier. - string uid = 2; - } -} - -// Selects a repo using a Google Cloud Platform project ID (e.g., -// winged-cargo-31) and a repo name within that project. -message ProjectRepoId { - // The ID of the project. - string project_id = 1; - - // The name of the repo. Leave empty for the default repo. - string repo_name = 2; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto deleted file mode 100644 index cc9cc384535a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Note provider assigned severity/impact ranking. -enum Severity { - // Unknown. - SEVERITY_UNSPECIFIED = 0; - // Minimal severity. - MINIMAL = 1; - // Low severity. - LOW = 2; - // Medium severity. - MEDIUM = 3; - // High severity. - HIGH = 4; - // Critical severity. - CRITICAL = 5; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto deleted file mode 100644 index c038af064e0e..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2021 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; -option java_outer_classname = "SlsaProvenanceProto"; - -message SlsaProvenance { - // Steps taken to build the artifact. - // For a TaskRun, typically each container corresponds to one step in the - // recipe. - message SlsaRecipe { - // URI indicating what type of recipe was performed. It determines the - // meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and - // materials. - string type = 1; - // Index in materials containing the recipe steps that are not implied by - // recipe.type. For example, if the recipe type were "make", then this would - // point to the source containing the Makefile, not the make program itself. - // Set to -1 if the recipe doesn't come from a material, as zero is default - // unset value for int64. - int64 defined_in_material = 2; - // String identifying the entry point into the build. - // This is often a path to a configuration file and/or a target label within - // that file. The syntax and meaning are defined by recipe.type. For - // example, if the recipe type were "make", then this would reference the - // directory in which to run make as well as which target to use. - string entry_point = 3; - // Collection of all external inputs that influenced the build on top of - // recipe.definedInMaterial and recipe.entryPoint. For example, if the - // recipe type were "make", then this might be the flags passed to make - // aside from the target, which is captured in recipe.entryPoint. Depending - // on the recipe Type, the structure may be different. - google.protobuf.Any arguments = 4; - // Any other builder-controlled inputs necessary for correctly evaluating - // the recipe. Usually only needed for reproducing the build but not - // evaluated as part of policy. Depending on the recipe Type, the structure - // may be different. - google.protobuf.Any environment = 5; - } - - // Indicates that the builder claims certain fields in this message to be - // complete. - message SlsaCompleteness { - // If true, the builder claims that recipe.arguments is complete, meaning - // that all external inputs are properly captured in the recipe. - bool arguments = 1; - // If true, the builder claims that recipe.environment is claimed to be - // complete. - bool environment = 2; - // If true, the builder claims that materials are complete, usually through - // some controls to prevent network access. Sometimes called "hermetic". - bool materials = 3; - } - - // Other properties of the build. - message SlsaMetadata { - // Identifies the particular build invocation, which can be useful for - // finding associated logs or other ad-hoc analysis. The value SHOULD be - // globally unique, per in-toto Provenance spec. - string build_invocation_id = 1; - // The timestamp of when the build started. - google.protobuf.Timestamp build_started_on = 2; - // The timestamp of when the build completed. - google.protobuf.Timestamp build_finished_on = 3; - // Indicates that the builder claims certain fields in this message to be - // complete. - SlsaCompleteness completeness = 4; - // If true, the builder claims that running the recipe on materials will - // produce bit-for-bit identical output. - bool reproducible = 5; - } - - message SlsaBuilder { - string id = 1; - } - - message Material { - string uri = 1; - map digest = 2; - } - - SlsaBuilder builder = 1; // required - // Identifies the configuration used for the build. - // When combined with materials, this SHOULD fully describe the build, - // such that re-running this recipe results in bit-for-bit identical output - // (if the build is reproducible). - SlsaRecipe recipe = 2; // required - SlsaMetadata metadata = 3; - // The collection of artifacts that influenced the build including sources, - // dependencies, build tools, base images, and so on. This is considered to be - // incomplete unless metadata.completeness.materials is true. Unset or null is - // equivalent to empty. - repeated Material materials = 4; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto deleted file mode 100644 index 11cdd1c0ba59..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2021 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; -option java_outer_classname = "SlsaProvenanceZeroTwoProto"; - -message SlsaProvenanceZeroTwo { - // See full explanation of fields at slsa.dev/provenance/v0.2. - - // Identifies the entity that executed the recipe, which is trusted to have - // correctly performed the operation and populated this provenance. - message SlsaBuilder { - string id = 1; - } - - // The collection of artifacts that influenced the build including sources, - // dependencies, build tools, base images, and so on. - message SlsaMaterial { - string uri = 1; - map digest = 2; - } - - // Identifies the event that kicked off the build. - message SlsaInvocation { - SlsaConfigSource config_source = 1; - google.protobuf.Struct parameters = 2; - google.protobuf.Struct environment = 3; - } - - // Describes where the config file that kicked off the build came from. - // This is effectively a pointer to the source where buildConfig came from. - message SlsaConfigSource { - string uri = 1; - map digest = 2; - string entry_point = 3; - } - - // Other properties of the build. - message SlsaMetadata { - string build_invocation_id = 1; - google.protobuf.Timestamp build_started_on = 2; - google.protobuf.Timestamp build_finished_on = 3; - SlsaCompleteness completeness = 4; - bool reproducible = 5; - } - - // Indicates that the builder claims certain fields in this message to be - // complete. - message SlsaCompleteness { - bool parameters = 1; - bool environment = 2; - bool materials = 3; - } - - SlsaBuilder builder = 1; - string build_type = 2; - SlsaInvocation invocation = 3; - google.protobuf.Struct build_config = 4; - SlsaMetadata metadata = 5; - repeated SlsaMaterial materials = 6; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto deleted file mode 100644 index 89d389299199..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/timestamp.proto"; -import "grafeas/v1/package.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// An Upgrade Note represents a potential upgrade of a package to a given -// version. For each package version combination (i.e. bash 4.0, bash 4.1, -// bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field -// represents the information related to the update. -message UpgradeNote { - // Required for non-Windows OS. The package this Upgrade is for. - string package = 1; - // Required for non-Windows OS. The version of the package in machine + human - // readable form. - grafeas.v1.Version version = 2; - // Metadata about the upgrade for each specific operating system. - repeated UpgradeDistribution distributions = 3; - // Required for Windows OS. Represents the metadata about the Windows update. - WindowsUpdate windows_update = 4; -} - -// The Upgrade Distribution represents metadata about the Upgrade for each -// operating system (CPE). Some distributions have additional metadata around -// updates, classifying them into various categories and severities. -message UpgradeDistribution { - // Required - The specific operating system this metadata applies to. See - // https://cpe.mitre.org/specification/. - string cpe_uri = 1; - // The operating system classification of this Upgrade, as specified by the - // upstream operating system upgrade feed. For Windows the classification is - // one of the category_ids listed at - // https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) - string classification = 2; - // The severity as specified by the upstream operating system. - string severity = 3; - // The cve tied to this Upgrade. - repeated string cve = 4; -} - -// Windows Update represents the metadata about the update for the Windows -// operating system. The fields in this message come from the Windows Update API -// documented at -// https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate. -message WindowsUpdate { - // The unique identifier of the update. - message Identity { - // The revision independent identifier of the update. - string update_id = 1; - // The revision number of the update. - int32 revision = 2; - } - // Required - The unique identifier for the update. - Identity identity = 1; - // The localized title of the update. - string title = 2; - // The localized description of the update. - string description = 3; - // The category to which the update belongs. - message Category { - // The identifier of the category. - string category_id = 1; - // The localized name of the category. - string name = 2; - } - // The list of categories to which the update belongs. - repeated Category categories = 4; - // The Microsoft Knowledge Base article IDs that are associated with the - // update. - repeated string kb_article_ids = 5; - // The hyperlink to the support information for the update. - string support_url = 6; - // The last published timestamp of the update. - google.protobuf.Timestamp last_published_timestamp = 7; -} - -// An Upgrade Occurrence represents that a specific resource_url could install a -// specific upgrade. This presence is supplied via local sources (i.e. it is -// present in the mirror and the running system has noticed its availability). -// For Windows, both distribution and windows_update contain information for the -// Windows update. -message UpgradeOccurrence { - // Required for non-Windows OS. The package this Upgrade is for. - string package = 1; - // Required for non-Windows OS. The version of the package in a machine + - // human readable form. - grafeas.v1.Version parsed_version = 3; - // Metadata about the upgrade for available for the specific operating system - // for the resource_url. This allows efficient filtering, as well as - // making it easier to use the occurrence. - UpgradeDistribution distribution = 4; - // Required for Windows OS. Represents the metadata about the Windows update. - WindowsUpdate windows_update = 5; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto deleted file mode 100644 index 99abf3be7a23..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; -import "grafeas/v1/common.proto"; -import "grafeas/v1/cvss.proto"; -import "grafeas/v1/package.proto"; -import "grafeas/v1/severity.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// A security vulnerability that can be found in resources. -message VulnerabilityNote { - // The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 - // where 0 indicates low severity and 10 indicates high severity. - float cvss_score = 1; - - // The note provider assigned severity of this vulnerability. - grafeas.v1.Severity severity = 2; - - // Details of all known distros and packages affected by this vulnerability. - repeated Detail details = 3; - - // A detail for a distro and package affected by this vulnerability and its - // associated fix (if one is available). - message Detail { - // The distro assigned severity of this vulnerability. - string severity_name = 1; - - // A vendor-specific description of this vulnerability. - string description = 2; - - // The type of package; whether native or non native (e.g., ruby gems, - // node.js packages, etc.). - string package_type = 3; - - // Required. The [CPE URI](https://cpe.mitre.org/specification/) this - // vulnerability affects. - string affected_cpe_uri = 4; - - // Required. The package this vulnerability affects. - string affected_package = 5; - - // The version number at the start of an interval in which this - // vulnerability exists. A vulnerability can affect a package between - // version numbers that are disjoint sets of intervals (example: - // [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be - // represented in its own Detail. If a specific affected version is provided - // by a vulnerability database, affected_version_start and - // affected_version_end will be the same in that Detail. - grafeas.v1.Version affected_version_start = 6; - - // The version number at the end of an interval in which this vulnerability - // exists. A vulnerability can affect a package between version numbers - // that are disjoint sets of intervals (example: [1.0.0-1.1.0], - // [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its - // own Detail. If a specific affected version is provided by a vulnerability - // database, affected_version_start and affected_version_end will be the - // same in that Detail. - grafeas.v1.Version affected_version_end = 7; - - // The distro recommended [CPE URI](https://cpe.mitre.org/specification/) - // to update to that contains a fix for this vulnerability. It is possible - // for this to be different from the affected_cpe_uri. - string fixed_cpe_uri = 8; - - // The distro recommended package to update to that contains a fix for this - // vulnerability. It is possible for this to be different from the - // affected_package. - string fixed_package = 9; - - // The distro recommended version to update to that contains a - // fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no - // such version is yet available. - grafeas.v1.Version fixed_version = 10; - - // Whether this detail is obsolete. Occurrences are expected not to point to - // obsolete details. - bool is_obsolete = 11; - - // The time this information was last changed at the source. This is an - // upstream timestamp from the underlying information source - e.g. Ubuntu - // security tracker. - google.protobuf.Timestamp source_update_time = 12; - - // The source from which the information in this Detail was obtained. - string source = 13; - - // The name of the vendor of the product. - string vendor = 14; - } - - // The full description of the CVSSv3 for this vulnerability. - CVSSv3 cvss_v3 = 4; - - // Windows details get their own format because the information format and - // model don't match a normal detail. Specifically Windows updates are done as - // patches, thus Windows vulnerabilities really are a missing package, rather - // than a package being at an incorrect version. - repeated WindowsDetail windows_details = 5; - - message WindowsDetail { - // Required. The [CPE URI](https://cpe.mitre.org/specification/) this - // vulnerability affects. - string cpe_uri = 1; - - // Required. The name of this vulnerability. - string name = 2; - - // The description of this vulnerability. - string description = 3; - - // Required. The names of the KBs which have hotfixes to mitigate this - // vulnerability. Note that there may be multiple hotfixes (and thus - // multiple KBs) that mitigate a given vulnerability. Currently any listed - // KBs presence is considered a fix. - repeated KnowledgeBase fixing_kbs = 4; - - message KnowledgeBase { - // The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). - string name = 1; - // A link to the KB in the [Windows update catalog] - // (https://www.catalog.update.microsoft.com/). - string url = 2; - } - } - - // The time this information was last changed at the source. This is an - // upstream timestamp from the underlying information source - e.g. Ubuntu - // security tracker. - google.protobuf.Timestamp source_update_time = 6; - - // CVSS version used to populate cvss_score and severity. - grafeas.v1.CVSSVersion cvss_version = 7; - - // The full description of the v2 CVSS for this vulnerability. - CVSS cvss_v2 = 8; - - // Next free ID is 9. -} - -// An occurrence of a severity vulnerability on a resource. -message VulnerabilityOccurrence { - // The type of package; whether native or non native (e.g., ruby gems, node.js - // packages, etc.). - string type = 1; - - // Output only. The note provider assigned severity of this vulnerability. - grafeas.v1.Severity severity = 2; - - // Output only. The CVSS score of this vulnerability. CVSS score is on a - // scale of 0 - 10 where 0 indicates low severity and 10 indicates high - // severity. - float cvss_score = 3; - - // The cvss v3 score for the vulnerability. - CVSS cvssv3 = 10; - - // Required. The set of affected locations and their fixes (if available) - // within the associated resource. - repeated PackageIssue package_issue = 4; - - // A detail for a distro and package this vulnerability occurrence was found - // in and its associated fix (if one is available). - message PackageIssue { - // Required. The [CPE URI](https://cpe.mitre.org/specification/) this - // vulnerability was found in. - string affected_cpe_uri = 1; - - // Required. The package this vulnerability was found in. - string affected_package = 2; - - // Required. The version of the package that is installed on the resource - // affected by this vulnerability. - grafeas.v1.Version affected_version = 3; - - // The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability - // was fixed in. It is possible for this to be different from the - // affected_cpe_uri. - string fixed_cpe_uri = 4; - - // The package this vulnerability was fixed in. It is possible for this to - // be different from the affected_package. - string fixed_package = 5; - - // Required. The version of the package this vulnerability was fixed in. - // Setting this to VersionKind.MAXIMUM means no fix is yet available. - grafeas.v1.Version fixed_version = 6; - - // Output only. Whether a fix is available for this package. - bool fix_available = 7; - - // The type of package (e.g. OS, MAVEN, GO). - string package_type = 8; - - // The distro or language system assigned severity for this vulnerability - // when that is available and note provider assigned severity when it is not - // available. - grafeas.v1.Severity effective_severity = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The location at which this package was found. - repeated FileLocation file_location = 10; - } - - // Output only. A one sentence description of this vulnerability. - string short_description = 5; - - // Output only. A detailed description of this vulnerability. - string long_description = 6; - - // Output only. URLs related to this vulnerability. - repeated grafeas.v1.RelatedUrl related_urls = 7; - - // The distro assigned severity for this vulnerability when it is available, - // otherwise this is the note provider assigned severity. - // - // When there are multiple PackageIssues for this vulnerability, they can have - // different effective severities because some might be provided by the distro - // while others are provided by the language ecosystem for a language pack. - // For this reason, it is advised to use the effective severity on the - // PackageIssue level. In the case where multiple PackageIssues have differing - // effective severities, this field should be the highest severity for any of - // the PackageIssues. - grafeas.v1.Severity effective_severity = 8; - - // Output only. Whether at least one of the affected packages has a fix - // available. - bool fix_available = 9; - - // Output only. CVSS version used to populate cvss_score and severity. - grafeas.v1.CVSSVersion cvss_version = 11; - - // The cvss v2 score for the vulnerability. - CVSS cvss_v2 = 12; - - // Next free ID is 13. -} diff --git a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java deleted file mode 100644 index e13560330bca..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java +++ /dev/null @@ -1,1350 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.common.collect.Lists; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class GrafeasClientTest { - private static MockGrafeas mockGrafeas; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private GrafeasClient client; - - @BeforeClass - public static void startStaticServer() { - mockGrafeas = new MockGrafeas(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockGrafeas)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - GrafeasSettings settings = - GrafeasSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = GrafeasClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void getOccurrenceTest() throws Exception { - Occurrence expectedResponse = - Occurrence.newBuilder() - .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) - .setResourceUri("resourceUri1234527870") - .setNoteName("noteName1580946845") - .setKind(NoteKind.forNumber(0)) - .setRemediation("remediation779381797") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEnvelope(Envelope.newBuilder().build()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - - Occurrence actualResponse = client.getOccurrence(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetOccurrenceRequest actualRequest = ((GetOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getOccurrenceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - client.getOccurrence(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getOccurrenceTest2() throws Exception { - Occurrence expectedResponse = - Occurrence.newBuilder() - .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) - .setResourceUri("resourceUri1234527870") - .setNoteName("noteName1580946845") - .setKind(NoteKind.forNumber(0)) - .setRemediation("remediation779381797") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEnvelope(Envelope.newBuilder().build()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - - Occurrence actualResponse = client.getOccurrence(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetOccurrenceRequest actualRequest = ((GetOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getOccurrenceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - client.getOccurrence(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listOccurrencesTest() throws Exception { - Occurrence responsesElement = Occurrence.newBuilder().build(); - ListOccurrencesResponse expectedResponse = - ListOccurrencesResponse.newBuilder() - .setNextPageToken("") - .addAllOccurrences(Arrays.asList(responsesElement)) - .build(); - mockGrafeas.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - String filter = "filter-1274492040"; - - ListOccurrencesPagedResponse pagedListResponse = client.listOccurrences(parent, filter); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListOccurrencesRequest actualRequest = ((ListOccurrencesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(filter, actualRequest.getFilter()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listOccurrencesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - String filter = "filter-1274492040"; - client.listOccurrences(parent, filter); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listOccurrencesTest2() throws Exception { - Occurrence responsesElement = Occurrence.newBuilder().build(); - ListOccurrencesResponse expectedResponse = - ListOccurrencesResponse.newBuilder() - .setNextPageToken("") - .addAllOccurrences(Arrays.asList(responsesElement)) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String parent = "parent-995424086"; - String filter = "filter-1274492040"; - - ListOccurrencesPagedResponse pagedListResponse = client.listOccurrences(parent, filter); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListOccurrencesRequest actualRequest = ((ListOccurrencesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(filter, actualRequest.getFilter()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listOccurrencesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String parent = "parent-995424086"; - String filter = "filter-1274492040"; - client.listOccurrences(parent, filter); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteOccurrenceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockGrafeas.addResponse(expectedResponse); - - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - - client.deleteOccurrence(name); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteOccurrenceRequest actualRequest = ((DeleteOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteOccurrenceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - client.deleteOccurrence(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteOccurrenceTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteOccurrence(name); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteOccurrenceRequest actualRequest = ((DeleteOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteOccurrenceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - client.deleteOccurrence(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createOccurrenceTest() throws Exception { - Occurrence expectedResponse = - Occurrence.newBuilder() - .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) - .setResourceUri("resourceUri1234527870") - .setNoteName("noteName1580946845") - .setKind(NoteKind.forNumber(0)) - .setRemediation("remediation779381797") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEnvelope(Envelope.newBuilder().build()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - Occurrence occurrence = Occurrence.newBuilder().build(); - - Occurrence actualResponse = client.createOccurrence(parent, occurrence); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateOccurrenceRequest actualRequest = ((CreateOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(occurrence, actualRequest.getOccurrence()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createOccurrenceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - Occurrence occurrence = Occurrence.newBuilder().build(); - client.createOccurrence(parent, occurrence); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createOccurrenceTest2() throws Exception { - Occurrence expectedResponse = - Occurrence.newBuilder() - .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) - .setResourceUri("resourceUri1234527870") - .setNoteName("noteName1580946845") - .setKind(NoteKind.forNumber(0)) - .setRemediation("remediation779381797") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEnvelope(Envelope.newBuilder().build()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String parent = "parent-995424086"; - Occurrence occurrence = Occurrence.newBuilder().build(); - - Occurrence actualResponse = client.createOccurrence(parent, occurrence); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateOccurrenceRequest actualRequest = ((CreateOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(occurrence, actualRequest.getOccurrence()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createOccurrenceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String parent = "parent-995424086"; - Occurrence occurrence = Occurrence.newBuilder().build(); - client.createOccurrence(parent, occurrence); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchCreateOccurrencesTest() throws Exception { - BatchCreateOccurrencesResponse expectedResponse = - BatchCreateOccurrencesResponse.newBuilder() - .addAllOccurrences(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - List occurrences = new ArrayList<>(); - - BatchCreateOccurrencesResponse actualResponse = - client.batchCreateOccurrences(parent, occurrences); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchCreateOccurrencesRequest actualRequest = - ((BatchCreateOccurrencesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(occurrences, actualRequest.getOccurrencesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchCreateOccurrencesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - List occurrences = new ArrayList<>(); - client.batchCreateOccurrences(parent, occurrences); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchCreateOccurrencesTest2() throws Exception { - BatchCreateOccurrencesResponse expectedResponse = - BatchCreateOccurrencesResponse.newBuilder() - .addAllOccurrences(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String parent = "parent-995424086"; - List occurrences = new ArrayList<>(); - - BatchCreateOccurrencesResponse actualResponse = - client.batchCreateOccurrences(parent, occurrences); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchCreateOccurrencesRequest actualRequest = - ((BatchCreateOccurrencesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(occurrences, actualRequest.getOccurrencesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchCreateOccurrencesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String parent = "parent-995424086"; - List occurrences = new ArrayList<>(); - client.batchCreateOccurrences(parent, occurrences); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateOccurrenceTest() throws Exception { - Occurrence expectedResponse = - Occurrence.newBuilder() - .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) - .setResourceUri("resourceUri1234527870") - .setNoteName("noteName1580946845") - .setKind(NoteKind.forNumber(0)) - .setRemediation("remediation779381797") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEnvelope(Envelope.newBuilder().build()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - Occurrence occurrence = Occurrence.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Occurrence actualResponse = client.updateOccurrence(name, occurrence, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateOccurrenceRequest actualRequest = ((UpdateOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(occurrence, actualRequest.getOccurrence()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateOccurrenceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - Occurrence occurrence = Occurrence.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateOccurrence(name, occurrence, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateOccurrenceTest2() throws Exception { - Occurrence expectedResponse = - Occurrence.newBuilder() - .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) - .setResourceUri("resourceUri1234527870") - .setNoteName("noteName1580946845") - .setKind(NoteKind.forNumber(0)) - .setRemediation("remediation779381797") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEnvelope(Envelope.newBuilder().build()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - Occurrence occurrence = Occurrence.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Occurrence actualResponse = client.updateOccurrence(name, occurrence, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateOccurrenceRequest actualRequest = ((UpdateOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(occurrence, actualRequest.getOccurrence()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateOccurrenceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - Occurrence occurrence = Occurrence.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateOccurrence(name, occurrence, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getOccurrenceNoteTest() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - - Note actualResponse = client.getOccurrenceNote(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetOccurrenceNoteRequest actualRequest = ((GetOccurrenceNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getOccurrenceNoteExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - client.getOccurrenceNote(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getOccurrenceNoteTest2() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - - Note actualResponse = client.getOccurrenceNote(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetOccurrenceNoteRequest actualRequest = ((GetOccurrenceNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getOccurrenceNoteExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - client.getOccurrenceNote(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getNoteTest() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - - Note actualResponse = client.getNote(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetNoteRequest actualRequest = ((GetNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getNoteExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - client.getNote(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getNoteTest2() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - - Note actualResponse = client.getNote(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetNoteRequest actualRequest = ((GetNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getNoteExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - client.getNote(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNotesTest() throws Exception { - Note responsesElement = Note.newBuilder().build(); - ListNotesResponse expectedResponse = - ListNotesResponse.newBuilder() - .setNextPageToken("") - .addAllNotes(Arrays.asList(responsesElement)) - .build(); - mockGrafeas.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - String filter = "filter-1274492040"; - - ListNotesPagedResponse pagedListResponse = client.listNotes(parent, filter); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getNotesList().get(0), resources.get(0)); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListNotesRequest actualRequest = ((ListNotesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(filter, actualRequest.getFilter()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listNotesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - String filter = "filter-1274492040"; - client.listNotes(parent, filter); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNotesTest2() throws Exception { - Note responsesElement = Note.newBuilder().build(); - ListNotesResponse expectedResponse = - ListNotesResponse.newBuilder() - .setNextPageToken("") - .addAllNotes(Arrays.asList(responsesElement)) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String parent = "parent-995424086"; - String filter = "filter-1274492040"; - - ListNotesPagedResponse pagedListResponse = client.listNotes(parent, filter); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getNotesList().get(0), resources.get(0)); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListNotesRequest actualRequest = ((ListNotesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(filter, actualRequest.getFilter()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listNotesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String parent = "parent-995424086"; - String filter = "filter-1274492040"; - client.listNotes(parent, filter); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteNoteTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockGrafeas.addResponse(expectedResponse); - - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - - client.deleteNote(name); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteNoteRequest actualRequest = ((DeleteNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteNoteExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - client.deleteNote(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteNoteTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteNote(name); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteNoteRequest actualRequest = ((DeleteNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteNoteExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - client.deleteNote(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNoteTest() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - String noteId = "noteId-1039694675"; - Note note = Note.newBuilder().build(); - - Note actualResponse = client.createNote(parent, noteId, note); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateNoteRequest actualRequest = ((CreateNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(noteId, actualRequest.getNoteId()); - Assert.assertEquals(note, actualRequest.getNote()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createNoteExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - String noteId = "noteId-1039694675"; - Note note = Note.newBuilder().build(); - client.createNote(parent, noteId, note); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNoteTest2() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String parent = "parent-995424086"; - String noteId = "noteId-1039694675"; - Note note = Note.newBuilder().build(); - - Note actualResponse = client.createNote(parent, noteId, note); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateNoteRequest actualRequest = ((CreateNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(noteId, actualRequest.getNoteId()); - Assert.assertEquals(note, actualRequest.getNote()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createNoteExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String parent = "parent-995424086"; - String noteId = "noteId-1039694675"; - Note note = Note.newBuilder().build(); - client.createNote(parent, noteId, note); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchCreateNotesTest() throws Exception { - BatchCreateNotesResponse expectedResponse = - BatchCreateNotesResponse.newBuilder().addAllNotes(new ArrayList()).build(); - mockGrafeas.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - Map notes = new HashMap<>(); - - BatchCreateNotesResponse actualResponse = client.batchCreateNotes(parent, notes); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchCreateNotesRequest actualRequest = ((BatchCreateNotesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(notes, actualRequest.getNotesMap()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchCreateNotesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - Map notes = new HashMap<>(); - client.batchCreateNotes(parent, notes); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchCreateNotesTest2() throws Exception { - BatchCreateNotesResponse expectedResponse = - BatchCreateNotesResponse.newBuilder().addAllNotes(new ArrayList()).build(); - mockGrafeas.addResponse(expectedResponse); - - String parent = "parent-995424086"; - Map notes = new HashMap<>(); - - BatchCreateNotesResponse actualResponse = client.batchCreateNotes(parent, notes); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchCreateNotesRequest actualRequest = ((BatchCreateNotesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(notes, actualRequest.getNotesMap()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchCreateNotesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String parent = "parent-995424086"; - Map notes = new HashMap<>(); - client.batchCreateNotes(parent, notes); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateNoteTest() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - Note note = Note.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Note actualResponse = client.updateNote(name, note, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateNoteRequest actualRequest = ((UpdateNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(note, actualRequest.getNote()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateNoteExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - Note note = Note.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateNote(name, note, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateNoteTest2() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - Note note = Note.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Note actualResponse = client.updateNote(name, note, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateNoteRequest actualRequest = ((UpdateNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(note, actualRequest.getNote()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateNoteExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - Note note = Note.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateNote(name, note, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNoteOccurrencesTest() throws Exception { - Occurrence responsesElement = Occurrence.newBuilder().build(); - ListNoteOccurrencesResponse expectedResponse = - ListNoteOccurrencesResponse.newBuilder() - .setNextPageToken("") - .addAllOccurrences(Arrays.asList(responsesElement)) - .build(); - mockGrafeas.addResponse(expectedResponse); - - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - String filter = "filter-1274492040"; - - ListNoteOccurrencesPagedResponse pagedListResponse = client.listNoteOccurrences(name, filter); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListNoteOccurrencesRequest actualRequest = ((ListNoteOccurrencesRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(filter, actualRequest.getFilter()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listNoteOccurrencesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - String filter = "filter-1274492040"; - client.listNoteOccurrences(name, filter); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNoteOccurrencesTest2() throws Exception { - Occurrence responsesElement = Occurrence.newBuilder().build(); - ListNoteOccurrencesResponse expectedResponse = - ListNoteOccurrencesResponse.newBuilder() - .setNextPageToken("") - .addAllOccurrences(Arrays.asList(responsesElement)) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - String filter = "filter-1274492040"; - - ListNoteOccurrencesPagedResponse pagedListResponse = client.listNoteOccurrences(name, filter); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListNoteOccurrencesRequest actualRequest = ((ListNoteOccurrencesRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(filter, actualRequest.getFilter()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listNoteOccurrencesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - String filter = "filter-1274492040"; - client.listNoteOccurrences(name, filter); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java deleted file mode 100644 index bf0f38182e4c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockGrafeas implements MockGrpcService { - private final MockGrafeasImpl serviceImpl; - - public MockGrafeas() { - serviceImpl = new MockGrafeasImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java deleted file mode 100644 index 66cfa3460def..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java +++ /dev/null @@ -1,353 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import com.google.api.core.BetaApi; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -import io.grafeas.v1.GrafeasGrpc.GrafeasImplBase; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockGrafeasImpl extends GrafeasImplBase { - private List requests; - private Queue responses; - - public MockGrafeasImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void getOccurrence( - GetOccurrenceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Occurrence) { - requests.add(request); - responseObserver.onNext(((Occurrence) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetOccurrence, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Occurrence.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listOccurrences( - ListOccurrencesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListOccurrencesResponse) { - requests.add(request); - responseObserver.onNext(((ListOccurrencesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListOccurrences, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListOccurrencesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteOccurrence( - DeleteOccurrenceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteOccurrence, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createOccurrence( - CreateOccurrenceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Occurrence) { - requests.add(request); - responseObserver.onNext(((Occurrence) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateOccurrence, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Occurrence.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void batchCreateOccurrences( - BatchCreateOccurrencesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchCreateOccurrencesResponse) { - requests.add(request); - responseObserver.onNext(((BatchCreateOccurrencesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchCreateOccurrences, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchCreateOccurrencesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateOccurrence( - UpdateOccurrenceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Occurrence) { - requests.add(request); - responseObserver.onNext(((Occurrence) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateOccurrence, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Occurrence.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getOccurrenceNote( - GetOccurrenceNoteRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Note) { - requests.add(request); - responseObserver.onNext(((Note) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetOccurrenceNote, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Note.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getNote(GetNoteRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Note) { - requests.add(request); - responseObserver.onNext(((Note) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetNote, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Note.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listNotes( - ListNotesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListNotesResponse) { - requests.add(request); - responseObserver.onNext(((ListNotesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListNotes, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListNotesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteNote(DeleteNoteRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteNote, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createNote(CreateNoteRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Note) { - requests.add(request); - responseObserver.onNext(((Note) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateNote, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Note.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void batchCreateNotes( - BatchCreateNotesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchCreateNotesResponse) { - requests.add(request); - responseObserver.onNext(((BatchCreateNotesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchCreateNotes, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchCreateNotesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateNote(UpdateNoteRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Note) { - requests.add(request); - responseObserver.onNext(((Note) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateNote, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Note.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listNoteOccurrences( - ListNoteOccurrencesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListNoteOccurrencesResponse) { - requests.add(request); - responseObserver.onNext(((ListNoteOccurrencesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListNoteOccurrences, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListNoteOccurrencesResponse.class.getName(), - Exception.class.getName()))); - } - } -} From 511d0d4655b6ecee328e27e0bb9cc82ee598318f Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 11 Mar 2023 00:21:08 +0000 Subject: [PATCH 3/4] feat: Add VULNERABILITY_ASSESSMENT Note type to grafeas v1 API, adds Vex_Assessment derived from the Note to resources' occurrences, VEX notes now be written to add CVE assessments PiperOrigin-RevId: 515727862 Source-Link: https://github.com/googleapis/googleapis/commit/a4e62056b0a8b2464e5b0b8f593b798d99c7817e Source-Link: https://github.com/googleapis/googleapis-gen/commit/3bc42dca2900815c165cf7d3419ff70df05dfb90 Copy-Tag: eyJwIjoiamF2YS1ncmFmZWFzLy5Pd2xCb3QueWFtbCIsImgiOiIzYmM0MmRjYTI5MDA4MTVjMTY1Y2Y3ZDM0MTlmZjcwZGYwNWRmYjkwIn0= --- .../main/java/io/grafeas/v1/AliasContext.java | 866 ++ .../io/grafeas/v1/AliasContextOrBuilder.java | 48 + .../main/java/io/grafeas/v1/Architecture.java | 150 + .../src/main/java/io/grafeas/v1/Artifact.java | 1047 ++ .../java/io/grafeas/v1/ArtifactOrBuilder.java | 110 + .../main/java/io/grafeas/v1/Attestation.java | 91 + .../java/io/grafeas/v1/AttestationNote.java | 1279 +++ .../grafeas/v1/AttestationNoteOrBuilder.java | 36 + .../io/grafeas/v1/AttestationOccurrence.java | 1658 +++ .../v1/AttestationOccurrenceOrBuilder.java | 163 + .../grafeas/v1/BatchCreateNotesRequest.java | 910 ++ .../v1/BatchCreateNotesRequestOrBuilder.java | 85 + .../grafeas/v1/BatchCreateNotesResponse.java | 862 ++ .../v1/BatchCreateNotesResponseOrBuilder.java | 53 + .../v1/BatchCreateOccurrencesRequest.java | 1033 ++ ...atchCreateOccurrencesRequestOrBuilder.java | 75 + .../v1/BatchCreateOccurrencesResponse.java | 862 ++ ...tchCreateOccurrencesResponseOrBuilder.java | 53 + .../v1/src/main/java/io/grafeas/v1/Build.java | 74 + .../main/java/io/grafeas/v1/BuildNote.java | 582 ++ .../io/grafeas/v1/BuildNoteOrBuilder.java | 29 + .../java/io/grafeas/v1/BuildOccurrence.java | 1378 +++ .../grafeas/v1/BuildOccurrenceOrBuilder.java | 140 + .../java/io/grafeas/v1/BuildProvenance.java | 3554 +++++++ .../grafeas/v1/BuildProvenanceOrBuilder.java | 388 + .../java/io/grafeas/v1/BuilderConfig.java | 544 + .../io/grafeas/v1/BuilderConfigOrBuilder.java | 21 + .../v1/src/main/java/io/grafeas/v1/CVSS.java | 2394 +++++ .../java/io/grafeas/v1/CVSSOrBuilder.java | 142 + .../main/java/io/grafeas/v1/CVSSProto.java | 128 + .../main/java/io/grafeas/v1/CVSSVersion.java | 126 + .../src/main/java/io/grafeas/v1/CVSSv3.java | 2170 ++++ .../java/io/grafeas/v1/CVSSv3OrBuilder.java | 131 + .../io/grafeas/v1/CloudRepoSourceContext.java | 1186 +++ .../v1/CloudRepoSourceContextOrBuilder.java | 94 + .../src/main/java/io/grafeas/v1/Command.java | 1632 +++ .../java/io/grafeas/v1/CommandOrBuilder.java | 198 + .../src/main/java/io/grafeas/v1/Common.java | 130 + .../main/java/io/grafeas/v1/Completeness.java | 679 ++ .../io/grafeas/v1/CompletenessOrBuilder.java | 42 + .../main/java/io/grafeas/v1/Compliance.java | 111 + .../java/io/grafeas/v1/ComplianceNote.java | 2467 +++++ .../grafeas/v1/ComplianceNoteOrBuilder.java | 160 + .../io/grafeas/v1/ComplianceOccurrence.java | 908 ++ .../v1/ComplianceOccurrenceOrBuilder.java | 45 + .../java/io/grafeas/v1/ComplianceVersion.java | 931 ++ .../v1/ComplianceVersionOrBuilder.java | 75 + .../java/io/grafeas/v1/CreateNoteRequest.java | 980 ++ .../v1/CreateNoteRequestOrBuilder.java | 78 + .../grafeas/v1/CreateOccurrenceRequest.java | 816 ++ .../v1/CreateOccurrenceRequestOrBuilder.java | 58 + .../io/grafeas/v1/DSSEAttestationNote.java | 1257 +++ .../v1/DSSEAttestationNoteOrBuilder.java | 36 + .../grafeas/v1/DSSEAttestationOccurrence.java | 941 ++ .../DSSEAttestationOccurrenceOrBuilder.java | 56 + .../java/io/grafeas/v1/DeleteNoteRequest.java | 587 ++ .../v1/DeleteNoteRequestOrBuilder.java | 31 + .../grafeas/v1/DeleteOccurrenceRequest.java | 587 ++ .../v1/DeleteOccurrenceRequestOrBuilder.java | 31 + .../main/java/io/grafeas/v1/Deployment.java | 72 + .../java/io/grafeas/v1/DeploymentNote.java | 653 ++ .../grafeas/v1/DeploymentNoteOrBuilder.java | 50 + .../io/grafeas/v1/DeploymentOccurrence.java | 1900 ++++ .../v1/DeploymentOccurrenceOrBuilder.java | 187 + .../src/main/java/io/grafeas/v1/Digest.java | 663 ++ .../java/io/grafeas/v1/DigestOrBuilder.java | 39 + .../main/java/io/grafeas/v1/Discovery.java | 107 + .../java/io/grafeas/v1/DiscoveryNote.java | 549 + .../io/grafeas/v1/DiscoveryNoteOrBuilder.java | 30 + .../io/grafeas/v1/DiscoveryOccurrence.java | 3178 ++++++ .../v1/DiscoveryOccurrenceOrBuilder.java | 218 + .../main/java/io/grafeas/v1/Distribution.java | 1439 +++ .../io/grafeas/v1/DistributionOrBuilder.java | 139 + .../java/io/grafeas/v1/DsseAttestation.java | 83 + .../src/main/java/io/grafeas/v1/Envelope.java | 977 ++ .../java/io/grafeas/v1/EnvelopeOrBuilder.java | 51 + .../java/io/grafeas/v1/EnvelopeSignature.java | 611 ++ .../v1/EnvelopeSignatureOrBuilder.java | 27 + .../main/java/io/grafeas/v1/FileHashes.java | 864 ++ .../io/grafeas/v1/FileHashesOrBuilder.java | 53 + .../main/java/io/grafeas/v1/FileLocation.java | 587 ++ .../io/grafeas/v1/FileLocationOrBuilder.java | 31 + .../main/java/io/grafeas/v1/Fingerprint.java | 1009 ++ .../io/grafeas/v1/FingerprintOrBuilder.java | 98 + .../io/grafeas/v1/GerritSourceContext.java | 1297 +++ .../v1/GerritSourceContextOrBuilder.java | 111 + .../java/io/grafeas/v1/GetNoteRequest.java | 587 ++ .../grafeas/v1/GetNoteRequestOrBuilder.java | 31 + .../grafeas/v1/GetOccurrenceNoteRequest.java | 587 ++ .../v1/GetOccurrenceNoteRequestOrBuilder.java | 31 + .../io/grafeas/v1/GetOccurrenceRequest.java | 587 ++ .../v1/GetOccurrenceRequestOrBuilder.java | 31 + .../java/io/grafeas/v1/GitSourceContext.java | 746 ++ .../grafeas/v1/GitSourceContextOrBuilder.java | 49 + .../java/io/grafeas/v1/GrafeasClient.java | 2264 +++++ .../main/java/io/grafeas/v1/GrafeasGrpc.java | 1491 +++ .../java/io/grafeas/v1/GrafeasOuterClass.java | 492 + .../java/io/grafeas/v1/GrafeasSettings.java | 340 + .../v1/src/main/java/io/grafeas/v1/Hash.java | 663 ++ .../java/io/grafeas/v1/HashOrBuilder.java | 39 + .../v1/src/main/java/io/grafeas/v1/Image.java | 90 + .../main/java/io/grafeas/v1/ImageNote.java | 824 ++ .../io/grafeas/v1/ImageNoteOrBuilder.java | 58 + .../java/io/grafeas/v1/ImageOccurrence.java | 1398 +++ .../grafeas/v1/ImageOccurrenceOrBuilder.java | 123 + .../java/io/grafeas/v1/InTotoProvenance.java | 1359 +++ .../grafeas/v1/InTotoProvenanceOrBuilder.java | 140 + .../io/grafeas/v1/InTotoProvenanceProto.java | 115 + .../java/io/grafeas/v1/InTotoStatement.java | 1802 ++++ .../grafeas/v1/InTotoStatementOrBuilder.java | 120 + .../io/grafeas/v1/InTotoStatementProto.java | 91 + .../v1/src/main/java/io/grafeas/v1/Jwt.java | 586 ++ .../main/java/io/grafeas/v1/JwtOrBuilder.java | 33 + .../v1/src/main/java/io/grafeas/v1/Layer.java | 751 ++ .../java/io/grafeas/v1/LayerOrBuilder.java | 51 + .../src/main/java/io/grafeas/v1/License.java | 772 ++ .../java/io/grafeas/v1/LicenseOrBuilder.java | 57 + .../v1/ListNoteOccurrencesRequest.java | 997 ++ .../ListNoteOccurrencesRequestOrBuilder.java | 81 + .../v1/ListNoteOccurrencesResponse.java | 1026 ++ .../ListNoteOccurrencesResponseOrBuilder.java | 73 + .../java/io/grafeas/v1/ListNotesRequest.java | 1001 ++ .../grafeas/v1/ListNotesRequestOrBuilder.java | 82 + .../java/io/grafeas/v1/ListNotesResponse.java | 1040 ++ .../v1/ListNotesResponseOrBuilder.java | 77 + .../io/grafeas/v1/ListOccurrencesRequest.java | 1001 ++ .../v1/ListOccurrencesRequestOrBuilder.java | 82 + .../grafeas/v1/ListOccurrencesResponse.java | 1040 ++ .../v1/ListOccurrencesResponseOrBuilder.java | 77 + .../src/main/java/io/grafeas/v1/Location.java | 994 ++ .../java/io/grafeas/v1/LocationOrBuilder.java | 81 + .../src/main/java/io/grafeas/v1/Metadata.java | 1380 +++ .../java/io/grafeas/v1/MetadataOrBuilder.java | 128 + .../java/io/grafeas/v1/NonCompliantFile.java | 908 ++ .../grafeas/v1/NonCompliantFileOrBuilder.java | 69 + .../v1/src/main/java/io/grafeas/v1/Note.java | 5324 ++++++++++ .../src/main/java/io/grafeas/v1/NoteKind.java | 303 + .../src/main/java/io/grafeas/v1/NoteName.java | 191 + .../java/io/grafeas/v1/NoteOrBuilder.java | 563 ++ .../main/java/io/grafeas/v1/Occurrence.java | 4569 +++++++++ .../java/io/grafeas/v1/OccurrenceName.java | 192 + .../io/grafeas/v1/OccurrenceOrBuilder.java | 476 + .../src/main/java/io/grafeas/v1/Package.java | 132 + .../main/java/io/grafeas/v1/PackageNote.java | 2942 ++++++ .../io/grafeas/v1/PackageNoteOrBuilder.java | 308 + .../java/io/grafeas/v1/PackageOccurrence.java | 1985 ++++ .../v1/PackageOccurrenceOrBuilder.java | 199 + .../main/java/io/grafeas/v1/ProjectName.java | 168 + .../java/io/grafeas/v1/ProjectRepoId.java | 746 ++ .../io/grafeas/v1/ProjectRepoIdOrBuilder.java | 49 + .../main/java/io/grafeas/v1/Provenance.java | 266 + .../src/main/java/io/grafeas/v1/Recipe.java | 1954 ++++ .../java/io/grafeas/v1/RecipeOrBuilder.java | 201 + .../main/java/io/grafeas/v1/RelatedUrl.java | 744 ++ .../io/grafeas/v1/RelatedUrlOrBuilder.java | 49 + .../src/main/java/io/grafeas/v1/RepoId.java | 955 ++ .../java/io/grafeas/v1/RepoIdOrBuilder.java | 67 + .../src/main/java/io/grafeas/v1/Severity.java | 201 + .../io/grafeas/v1/SeverityOuterClass.java | 40 + .../main/java/io/grafeas/v1/Signature.java | 812 ++ .../io/grafeas/v1/SignatureOrBuilder.java | 70 + .../java/io/grafeas/v1/SlsaProvenance.java | 6801 +++++++++++++ .../grafeas/v1/SlsaProvenanceOrBuilder.java | 146 + .../io/grafeas/v1/SlsaProvenanceProto.java | 143 + .../io/grafeas/v1/SlsaProvenanceZeroTwo.java | 6962 +++++++++++++ .../v1/SlsaProvenanceZeroTwoOrBuilder.java | 105 + .../v1/SlsaProvenanceZeroTwoProto.java | 174 + .../src/main/java/io/grafeas/v1/Source.java | 1709 ++++ .../java/io/grafeas/v1/SourceContext.java | 1583 +++ .../io/grafeas/v1/SourceContextOrBuilder.java | 146 + .../java/io/grafeas/v1/SourceOrBuilder.java | 196 + .../src/main/java/io/grafeas/v1/Subject.java | 900 ++ .../java/io/grafeas/v1/SubjectOrBuilder.java | 90 + .../java/io/grafeas/v1/UpdateNoteRequest.java | 1045 ++ .../v1/UpdateNoteRequestOrBuilder.java | 85 + .../grafeas/v1/UpdateOccurrenceRequest.java | 1045 ++ .../v1/UpdateOccurrenceRequestOrBuilder.java | 85 + .../src/main/java/io/grafeas/v1/Upgrade.java | 130 + .../io/grafeas/v1/UpgradeDistribution.java | 1177 +++ .../v1/UpgradeDistributionOrBuilder.java | 118 + .../main/java/io/grafeas/v1/UpgradeNote.java | 1502 +++ .../io/grafeas/v1/UpgradeNoteOrBuilder.java | 130 + .../java/io/grafeas/v1/UpgradeOccurrence.java | 1311 +++ .../v1/UpgradeOccurrenceOrBuilder.java | 119 + .../src/main/java/io/grafeas/v1/Version.java | 1398 +++ .../java/io/grafeas/v1/VersionOrBuilder.java | 119 + .../v1/src/main/java/io/grafeas/v1/Vex.java | 149 + .../java/io/grafeas/v1/Vulnerability.java | 195 + .../v1/VulnerabilityAssessmentNote.java | 8998 +++++++++++++++++ .../VulnerabilityAssessmentNoteOrBuilder.java | 172 + .../java/io/grafeas/v1/VulnerabilityNote.java | 8231 +++++++++++++++ .../v1/VulnerabilityNoteOrBuilder.java | 248 + .../grafeas/v1/VulnerabilityOccurrence.java | 8260 +++++++++++++++ .../v1/VulnerabilityOccurrenceOrBuilder.java | 329 + .../java/io/grafeas/v1/WindowsUpdate.java | 3538 +++++++ .../io/grafeas/v1/WindowsUpdateOrBuilder.java | 212 + .../java/io/grafeas/v1/gapic_metadata.json | 60 + .../main/java/io/grafeas/v1/package-info.java | 54 + .../java/io/grafeas/v1/stub/GrafeasStub.java | 133 + .../grafeas/v1/stub/GrafeasStubSettings.java | 819 ++ .../v1/stub/GrpcGrafeasCallableFactory.java | 113 + .../io/grafeas/v1/stub/GrpcGrafeasStub.java | 607 ++ .../main/proto/grafeas/v1/attestation.proto | 90 + .../v1/src/main/proto/grafeas/v1/build.proto | 62 + .../v1/src/main/proto/grafeas/v1/common.proto | 152 + .../main/proto/grafeas/v1/compliance.proto | 82 + .../v1/src/main/proto/grafeas/v1/cvss.proto | 166 + .../main/proto/grafeas/v1/deployment.proto | 66 + .../src/main/proto/grafeas/v1/discovery.proto | 104 + .../proto/grafeas/v1/dsse_attestation.proto | 52 + .../src/main/proto/grafeas/v1/grafeas.proto | 547 + .../v1/src/main/proto/grafeas/v1/image.proto | 83 + .../proto/grafeas/v1/intoto_provenance.proto | 113 + .../proto/grafeas/v1/intoto_statement.proto | 52 + .../src/main/proto/grafeas/v1/package.proto | 192 + .../main/proto/grafeas/v1/provenance.proto | 265 + .../src/main/proto/grafeas/v1/severity.proto | 38 + .../proto/grafeas/v1/slsa_provenance.proto | 115 + .../grafeas/v1/slsa_provenance_zero_two.proto | 82 + .../src/main/proto/grafeas/v1/upgrade.proto | 114 + .../v1/src/main/proto/grafeas/v1/vex.proto | 203 + .../main/proto/grafeas/v1/vulnerability.proto | 297 + .../java/io/grafeas/v1/GrafeasClientTest.java | 1350 +++ .../test/java/io/grafeas/v1/MockGrafeas.java | 59 + .../java/io/grafeas/v1/MockGrafeasImpl.java | 353 + 225 files changed, 164246 insertions(+) create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vex.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vex.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto create mode 100644 owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java create mode 100644 owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java new file mode 100644 index 000000000000..12e573038b9c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java @@ -0,0 +1,866 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * An alias to a repo revision.
+ * 
+ * + * Protobuf type {@code grafeas.v1.AliasContext} + */ +public final class AliasContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.AliasContext) + AliasContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use AliasContext.newBuilder() to construct. + private AliasContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AliasContext() { + kind_ = 0; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AliasContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AliasContext.class, io.grafeas.v1.AliasContext.Builder.class); + } + + /** + *
+   * The type of an alias.
+   * 
+ * + * Protobuf enum {@code grafeas.v1.AliasContext.Kind} + */ + public enum Kind + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown.
+     * 
+ * + * KIND_UNSPECIFIED = 0; + */ + KIND_UNSPECIFIED(0), + /** + *
+     * Git tag.
+     * 
+ * + * FIXED = 1; + */ + FIXED(1), + /** + *
+     * Git branch.
+     * 
+ * + * MOVABLE = 2; + */ + MOVABLE(2), + /** + *
+     * Used to specify non-standard aliases. For example, if a Git repo has a
+     * ref named "refs/foo/bar".
+     * 
+ * + * OTHER = 4; + */ + OTHER(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unknown.
+     * 
+ * + * KIND_UNSPECIFIED = 0; + */ + public static final int KIND_UNSPECIFIED_VALUE = 0; + /** + *
+     * Git tag.
+     * 
+ * + * FIXED = 1; + */ + public static final int FIXED_VALUE = 1; + /** + *
+     * Git branch.
+     * 
+ * + * MOVABLE = 2; + */ + public static final int MOVABLE_VALUE = 2; + /** + *
+     * Used to specify non-standard aliases. For example, if a Git repo has a
+     * ref named "refs/foo/bar".
+     * 
+ * + * OTHER = 4; + */ + public static final int OTHER_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Kind valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Kind forNumber(int value) { + switch (value) { + case 0: return KIND_UNSPECIFIED; + case 1: return FIXED; + case 2: return MOVABLE; + case 4: return OTHER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Kind> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Kind findValueByNumber(int number) { + return Kind.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.AliasContext.getDescriptor().getEnumTypes().get(0); + } + + private static final Kind[] VALUES = values(); + + public static Kind valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Kind(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.AliasContext.Kind) + } + + public static final int KIND_FIELD_NUMBER = 1; + private int kind_ = 0; + /** + *
+   * The alias kind.
+   * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+   * The alias kind.
+   * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @return The kind. + */ + @java.lang.Override public io.grafeas.v1.AliasContext.Kind getKind() { + io.grafeas.v1.AliasContext.Kind result = io.grafeas.v1.AliasContext.Kind.forNumber(kind_); + return result == null ? io.grafeas.v1.AliasContext.Kind.UNRECOGNIZED : result; + } + + public static final int NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The alias name.
+   * 
+ * + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The alias name.
+   * 
+ * + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (kind_ != io.grafeas.v1.AliasContext.Kind.KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(1, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kind_ != io.grafeas.v1.AliasContext.Kind.KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.AliasContext)) { + return super.equals(obj); + } + io.grafeas.v1.AliasContext other = (io.grafeas.v1.AliasContext) obj; + + if (kind_ != other.kind_) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + kind_; + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.AliasContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AliasContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AliasContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AliasContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AliasContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AliasContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AliasContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AliasContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AliasContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.AliasContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AliasContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AliasContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.AliasContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An alias to a repo revision.
+   * 
+ * + * Protobuf type {@code grafeas.v1.AliasContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.AliasContext) + io.grafeas.v1.AliasContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AliasContext.class, io.grafeas.v1.AliasContext.Builder.class); + } + + // Construct using io.grafeas.v1.AliasContext.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kind_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.AliasContext getDefaultInstanceForType() { + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.AliasContext build() { + io.grafeas.v1.AliasContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.AliasContext buildPartial() { + io.grafeas.v1.AliasContext result = new io.grafeas.v1.AliasContext(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.AliasContext result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.AliasContext) { + return mergeFrom((io.grafeas.v1.AliasContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.AliasContext other) { + if (other == io.grafeas.v1.AliasContext.getDefaultInstance()) return this; + if (other.kind_ != 0) { + setKindValue(other.getKindValue()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + kind_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int kind_ = 0; + /** + *
+     * The alias kind.
+     * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+     * The alias kind.
+     * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @param value The enum numeric value on the wire for kind to set. + * @return This builder for chaining. + */ + public Builder setKindValue(int value) { + kind_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The alias kind.
+     * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @return The kind. + */ + @java.lang.Override + public io.grafeas.v1.AliasContext.Kind getKind() { + io.grafeas.v1.AliasContext.Kind result = io.grafeas.v1.AliasContext.Kind.forNumber(kind_); + return result == null ? io.grafeas.v1.AliasContext.Kind.UNRECOGNIZED : result; + } + /** + *
+     * The alias kind.
+     * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(io.grafeas.v1.AliasContext.Kind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The alias kind.
+     * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @return This builder for chaining. + */ + public Builder clearKind() { + bitField0_ = (bitField0_ & ~0x00000001); + kind_ = 0; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * The alias name.
+     * 
+ * + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The alias name.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The alias name.
+     * 
+ * + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The alias name.
+     * 
+ * + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The alias name.
+     * 
+ * + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.AliasContext) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.AliasContext) + private static final io.grafeas.v1.AliasContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.AliasContext(); + } + + public static io.grafeas.v1.AliasContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AliasContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.AliasContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java new file mode 100644 index 000000000000..18b16f1a420a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface AliasContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.AliasContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The alias kind.
+   * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @return The enum numeric value on the wire for kind. + */ + int getKindValue(); + /** + *
+   * The alias kind.
+   * 
+ * + * .grafeas.v1.AliasContext.Kind kind = 1; + * @return The kind. + */ + io.grafeas.v1.AliasContext.Kind getKind(); + + /** + *
+   * The alias name.
+   * 
+ * + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The alias name.
+   * 
+ * + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java new file mode 100644 index 000000000000..740aa9f3ebd0 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java @@ -0,0 +1,150 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +/** + *
+ * Instruction set architectures supported by various package managers.
+ * 
+ * + * Protobuf enum {@code grafeas.v1.Architecture} + */ +public enum Architecture + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unknown architecture.
+   * 
+ * + * ARCHITECTURE_UNSPECIFIED = 0; + */ + ARCHITECTURE_UNSPECIFIED(0), + /** + *
+   * X86 architecture.
+   * 
+ * + * X86 = 1; + */ + X86(1), + /** + *
+   * X64 architecture.
+   * 
+ * + * X64 = 2; + */ + X64(2), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unknown architecture.
+   * 
+ * + * ARCHITECTURE_UNSPECIFIED = 0; + */ + public static final int ARCHITECTURE_UNSPECIFIED_VALUE = 0; + /** + *
+   * X86 architecture.
+   * 
+ * + * X86 = 1; + */ + public static final int X86_VALUE = 1; + /** + *
+   * X64 architecture.
+   * 
+ * + * X64 = 2; + */ + public static final int X64_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Architecture valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Architecture forNumber(int value) { + switch (value) { + case 0: return ARCHITECTURE_UNSPECIFIED; + case 1: return X86; + case 2: return X64; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Architecture> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Architecture findValueByNumber(int number) { + return Architecture.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.Package.getDescriptor().getEnumTypes().get(0); + } + + private static final Architecture[] VALUES = values(); + + public static Architecture valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Architecture(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.Architecture) +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java new file mode 100644 index 000000000000..f1fec349b1e6 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java @@ -0,0 +1,1047 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Artifact describes a build product.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Artifact} + */ +public final class Artifact extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Artifact) + ArtifactOrBuilder { +private static final long serialVersionUID = 0L; + // Use Artifact.newBuilder() to construct. + private Artifact(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Artifact() { + checksum_ = ""; + id_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Artifact(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Artifact.class, io.grafeas.v1.Artifact.Builder.class); + } + + public static final int CHECKSUM_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object checksum_ = ""; + /** + *
+   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+   * container.
+   * 
+ * + * string checksum = 1; + * @return The checksum. + */ + @java.lang.Override + public java.lang.String getChecksum() { + java.lang.Object ref = checksum_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + checksum_ = s; + return s; + } + } + /** + *
+   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+   * container.
+   * 
+ * + * string checksum = 1; + * @return The bytes for checksum. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChecksumBytes() { + java.lang.Object ref = checksum_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + checksum_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * Artifact ID, if any; for container images, this will be a URL by digest
+   * like `gcr.io/projectID/imagename@sha256:123456`.
+   * 
+ * + * string id = 2; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * Artifact ID, if any; for container images, this will be a URL by digest
+   * like `gcr.io/projectID/imagename@sha256:123456`.
+   * 
+ * + * string id = 2; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAMES_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList names_; + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList + getNamesList() { + return names_; + } + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(checksum_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, checksum_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + for (int i = 0; i < names_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, names_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(checksum_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, checksum_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += computeStringSizeNoTag(names_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Artifact)) { + return super.equals(obj); + } + io.grafeas.v1.Artifact other = (io.grafeas.v1.Artifact) obj; + + if (!getChecksum() + .equals(other.getChecksum())) return false; + if (!getId() + .equals(other.getId())) return false; + if (!getNamesList() + .equals(other.getNamesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHECKSUM_FIELD_NUMBER; + hash = (53 * hash) + getChecksum().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Artifact parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Artifact parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Artifact parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Artifact parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Artifact parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Artifact parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Artifact parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Artifact parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Artifact parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Artifact parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Artifact parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Artifact parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Artifact prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Artifact describes a build product.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Artifact} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Artifact) + io.grafeas.v1.ArtifactOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Artifact.class, io.grafeas.v1.Artifact.Builder.class); + } + + // Construct using io.grafeas.v1.Artifact.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + checksum_ = ""; + id_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Artifact getDefaultInstanceForType() { + return io.grafeas.v1.Artifact.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Artifact build() { + io.grafeas.v1.Artifact result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Artifact buildPartial() { + io.grafeas.v1.Artifact result = new io.grafeas.v1.Artifact(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.Artifact result) { + if (((bitField0_ & 0x00000004) != 0)) { + names_ = names_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.names_ = names_; + } + + private void buildPartial0(io.grafeas.v1.Artifact result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.checksum_ = checksum_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Artifact) { + return mergeFrom((io.grafeas.v1.Artifact)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Artifact other) { + if (other == io.grafeas.v1.Artifact.getDefaultInstance()) return this; + if (!other.getChecksum().isEmpty()) { + checksum_ = other.checksum_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + checksum_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureNamesIsMutable(); + names_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object checksum_ = ""; + /** + *
+     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+     * container.
+     * 
+ * + * string checksum = 1; + * @return The checksum. + */ + public java.lang.String getChecksum() { + java.lang.Object ref = checksum_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + checksum_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+     * container.
+     * 
+ * + * string checksum = 1; + * @return The bytes for checksum. + */ + public com.google.protobuf.ByteString + getChecksumBytes() { + java.lang.Object ref = checksum_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + checksum_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+     * container.
+     * 
+ * + * string checksum = 1; + * @param value The checksum to set. + * @return This builder for chaining. + */ + public Builder setChecksum( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + checksum_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+     * container.
+     * 
+ * + * string checksum = 1; + * @return This builder for chaining. + */ + public Builder clearChecksum() { + checksum_ = getDefaultInstance().getChecksum(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+     * container.
+     * 
+ * + * string checksum = 1; + * @param value The bytes for checksum to set. + * @return This builder for chaining. + */ + public Builder setChecksumBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + checksum_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + *
+     * Artifact ID, if any; for container images, this will be a URL by digest
+     * like `gcr.io/projectID/imagename@sha256:123456`.
+     * 
+ * + * string id = 2; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Artifact ID, if any; for container images, this will be a URL by digest
+     * like `gcr.io/projectID/imagename@sha256:123456`.
+     * 
+ * + * string id = 2; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Artifact ID, if any; for container images, this will be a URL by digest
+     * like `gcr.io/projectID/imagename@sha256:123456`.
+     * 
+ * + * string id = 2; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Artifact ID, if any; for container images, this will be a URL by digest
+     * like `gcr.io/projectID/imagename@sha256:123456`.
+     * 
+ * + * string id = 2; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Artifact ID, if any; for container images, this will be a URL by digest
+     * like `gcr.io/projectID/imagename@sha256:123456`.
+     * 
+ * + * string id = 2; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureNamesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList + getNamesList() { + return names_.getUnmodifiableView(); + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @param index The index to set the value at. + * @param value The names to set. + * @return This builder for chaining. + */ + public Builder setNames( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureNamesIsMutable(); + names_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @param value The names to add. + * @return This builder for chaining. + */ + public Builder addNames( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @param values The names to add. + * @return This builder for chaining. + */ + public Builder addAllNames( + java.lang.Iterable values) { + ensureNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, names_); + onChanged(); + return this; + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @return This builder for chaining. + */ + public Builder clearNames() { + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Related artifact names. This may be the path to a binary or jar file, or in
+     * the case of a container build, the name used to push the container image to
+     * Google Container Registry, as presented to `docker push`. Note that a
+     * single Artifact ID can have multiple names, for example if two tags are
+     * applied to one image.
+     * 
+ * + * repeated string names = 3; + * @param value The bytes of the names to add. + * @return This builder for chaining. + */ + public Builder addNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Artifact) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Artifact) + private static final io.grafeas.v1.Artifact DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Artifact(); + } + + public static io.grafeas.v1.Artifact getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Artifact parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Artifact getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java new file mode 100644 index 000000000000..c60add69d210 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface ArtifactOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Artifact) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+   * container.
+   * 
+ * + * string checksum = 1; + * @return The checksum. + */ + java.lang.String getChecksum(); + /** + *
+   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+   * container.
+   * 
+ * + * string checksum = 1; + * @return The bytes for checksum. + */ + com.google.protobuf.ByteString + getChecksumBytes(); + + /** + *
+   * Artifact ID, if any; for container images, this will be a URL by digest
+   * like `gcr.io/projectID/imagename@sha256:123456`.
+   * 
+ * + * string id = 2; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * Artifact ID, if any; for container images, this will be a URL by digest
+   * like `gcr.io/projectID/imagename@sha256:123456`.
+   * 
+ * + * string id = 2; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @return A list containing the names. + */ + java.util.List + getNamesList(); + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @return The count of names. + */ + int getNamesCount(); + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @param index The index of the element to return. + * @return The names at the given index. + */ + java.lang.String getNames(int index); + /** + *
+   * Related artifact names. This may be the path to a binary or jar file, or in
+   * the case of a container build, the name used to push the container image to
+   * Google Container Registry, as presented to `docker push`. Note that a
+   * single Artifact ID can have multiple names, for example if two tags are
+   * applied to one image.
+   * 
+ * + * repeated string names = 3; + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + com.google.protobuf.ByteString + getNamesBytes(int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java new file mode 100644 index 000000000000..ba5a83c6bff3 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/attestation.proto + +package io.grafeas.v1; + +public final class Attestation { + private Attestation() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_AttestationNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_AttestationNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_AttestationNote_Hint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Jwt_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Jwt_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_AttestationOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034grafeas/v1/attestation.proto\022\ngrafeas." + + "v1\032\027grafeas/v1/common.proto\"f\n\017Attestati" + + "onNote\022.\n\004hint\030\001 \001(\0132 .grafeas.v1.Attest" + + "ationNote.Hint\032#\n\004Hint\022\033\n\023human_readable" + + "_name\030\001 \001(\t\"\032\n\003Jwt\022\023\n\013compact_jwt\030\001 \001(\t\"" + + "}\n\025AttestationOccurrence\022\032\n\022serialized_p" + + "ayload\030\001 \001(\014\022)\n\nsignatures\030\002 \003(\0132\025.grafe" + + "as.v1.Signature\022\035\n\004jwts\030\003 \003(\0132\017.grafeas." + + "v1.JwtBQ\n\rio.grafeas.v1P\001Z8google.golang" + + ".org/genproto/googleapis/grafeas/v1;graf" + + "eas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grafeas.v1.Common.getDescriptor(), + }); + internal_static_grafeas_v1_AttestationNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_AttestationNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_AttestationNote_descriptor, + new java.lang.String[] { "Hint", }); + internal_static_grafeas_v1_AttestationNote_Hint_descriptor = + internal_static_grafeas_v1_AttestationNote_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_AttestationNote_Hint_descriptor, + new java.lang.String[] { "HumanReadableName", }); + internal_static_grafeas_v1_Jwt_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Jwt_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Jwt_descriptor, + new java.lang.String[] { "CompactJwt", }); + internal_static_grafeas_v1_AttestationOccurrence_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_AttestationOccurrence_descriptor, + new java.lang.String[] { "SerializedPayload", "Signatures", "Jwts", }); + io.grafeas.v1.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java new file mode 100644 index 000000000000..05af36fada4c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java @@ -0,0 +1,1279 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/attestation.proto + +package io.grafeas.v1; + +/** + *
+ * Note kind that represents a logical attestation "role" or "authority". For
+ * example, an organization might have one `Authority` for "QA" and one for
+ * "build". This note is intended to act strictly as a grouping mechanism for
+ * the attached occurrences (Attestations). This grouping mechanism also
+ * provides a security boundary, since IAM ACLs gate the ability for a principle
+ * to attach an occurrence to a given note. It also provides a single point of
+ * lookup to find all attached attestation occurrences, even if they don't all
+ * live in the same project.
+ * 
+ * + * Protobuf type {@code grafeas.v1.AttestationNote} + */ +public final class AttestationNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.AttestationNote) + AttestationNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use AttestationNote.newBuilder() to construct. + private AttestationNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttestationNote() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttestationNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AttestationNote.class, io.grafeas.v1.AttestationNote.Builder.class); + } + + public interface HintOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.AttestationNote.Hint) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "qa".
+     * 
+ * + * string human_readable_name = 1; + * @return The humanReadableName. + */ + java.lang.String getHumanReadableName(); + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "qa".
+     * 
+ * + * string human_readable_name = 1; + * @return The bytes for humanReadableName. + */ + com.google.protobuf.ByteString + getHumanReadableNameBytes(); + } + /** + *
+   * This submessage provides human-readable hints about the purpose of the
+   * authority. Because the name of a note acts as its resource reference, it is
+   * important to disambiguate the canonical name of the Note (which might be a
+   * UUID for security purposes) from "readable" names more suitable for debug
+   * output. Note that these hints should not be used to look up authorities in
+   * security sensitive contexts, such as when looking up attestations to
+   * verify.
+   * 
+ * + * Protobuf type {@code grafeas.v1.AttestationNote.Hint} + */ + public static final class Hint extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.AttestationNote.Hint) + HintOrBuilder { + private static final long serialVersionUID = 0L; + // Use Hint.newBuilder() to construct. + private Hint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Hint() { + humanReadableName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Hint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AttestationNote.Hint.class, io.grafeas.v1.AttestationNote.Hint.Builder.class); + } + + public static final int HUMAN_READABLE_NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object humanReadableName_ = ""; + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "qa".
+     * 
+ * + * string human_readable_name = 1; + * @return The humanReadableName. + */ + @java.lang.Override + public java.lang.String getHumanReadableName() { + java.lang.Object ref = humanReadableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + humanReadableName_ = s; + return s; + } + } + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "qa".
+     * 
+ * + * string human_readable_name = 1; + * @return The bytes for humanReadableName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHumanReadableNameBytes() { + java.lang.Object ref = humanReadableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + humanReadableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, humanReadableName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, humanReadableName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.AttestationNote.Hint)) { + return super.equals(obj); + } + io.grafeas.v1.AttestationNote.Hint other = (io.grafeas.v1.AttestationNote.Hint) obj; + + if (!getHumanReadableName() + .equals(other.getHumanReadableName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HUMAN_READABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getHumanReadableName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote.Hint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationNote.Hint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationNote.Hint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.AttestationNote.Hint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * This submessage provides human-readable hints about the purpose of the
+     * authority. Because the name of a note acts as its resource reference, it is
+     * important to disambiguate the canonical name of the Note (which might be a
+     * UUID for security purposes) from "readable" names more suitable for debug
+     * output. Note that these hints should not be used to look up authorities in
+     * security sensitive contexts, such as when looking up attestations to
+     * verify.
+     * 
+ * + * Protobuf type {@code grafeas.v1.AttestationNote.Hint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.AttestationNote.Hint) + io.grafeas.v1.AttestationNote.HintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AttestationNote.Hint.class, io.grafeas.v1.AttestationNote.Hint.Builder.class); + } + + // Construct using io.grafeas.v1.AttestationNote.Hint.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + humanReadableName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote.Hint getDefaultInstanceForType() { + return io.grafeas.v1.AttestationNote.Hint.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote.Hint build() { + io.grafeas.v1.AttestationNote.Hint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote.Hint buildPartial() { + io.grafeas.v1.AttestationNote.Hint result = new io.grafeas.v1.AttestationNote.Hint(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.AttestationNote.Hint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.humanReadableName_ = humanReadableName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.AttestationNote.Hint) { + return mergeFrom((io.grafeas.v1.AttestationNote.Hint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.AttestationNote.Hint other) { + if (other == io.grafeas.v1.AttestationNote.Hint.getDefaultInstance()) return this; + if (!other.getHumanReadableName().isEmpty()) { + humanReadableName_ = other.humanReadableName_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + humanReadableName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object humanReadableName_ = ""; + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "qa".
+       * 
+ * + * string human_readable_name = 1; + * @return The humanReadableName. + */ + public java.lang.String getHumanReadableName() { + java.lang.Object ref = humanReadableName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + humanReadableName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "qa".
+       * 
+ * + * string human_readable_name = 1; + * @return The bytes for humanReadableName. + */ + public com.google.protobuf.ByteString + getHumanReadableNameBytes() { + java.lang.Object ref = humanReadableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + humanReadableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "qa".
+       * 
+ * + * string human_readable_name = 1; + * @param value The humanReadableName to set. + * @return This builder for chaining. + */ + public Builder setHumanReadableName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + humanReadableName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "qa".
+       * 
+ * + * string human_readable_name = 1; + * @return This builder for chaining. + */ + public Builder clearHumanReadableName() { + humanReadableName_ = getDefaultInstance().getHumanReadableName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "qa".
+       * 
+ * + * string human_readable_name = 1; + * @param value The bytes for humanReadableName to set. + * @return This builder for chaining. + */ + public Builder setHumanReadableNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + humanReadableName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.AttestationNote.Hint) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.AttestationNote.Hint) + private static final io.grafeas.v1.AttestationNote.Hint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.AttestationNote.Hint(); + } + + public static io.grafeas.v1.AttestationNote.Hint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Hint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote.Hint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int HINT_FIELD_NUMBER = 1; + private io.grafeas.v1.AttestationNote.Hint hint_; + /** + *
+   * Hint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + * @return Whether the hint field is set. + */ + @java.lang.Override + public boolean hasHint() { + return hint_ != null; + } + /** + *
+   * Hint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + * @return The hint. + */ + @java.lang.Override + public io.grafeas.v1.AttestationNote.Hint getHint() { + return hint_ == null ? io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; + } + /** + *
+   * Hint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + @java.lang.Override + public io.grafeas.v1.AttestationNote.HintOrBuilder getHintOrBuilder() { + return hint_ == null ? io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (hint_ != null) { + output.writeMessage(1, getHint()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (hint_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getHint()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.AttestationNote)) { + return super.equals(obj); + } + io.grafeas.v1.AttestationNote other = (io.grafeas.v1.AttestationNote) obj; + + if (hasHint() != other.hasHint()) return false; + if (hasHint()) { + if (!getHint() + .equals(other.getHint())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHint()) { + hash = (37 * hash) + HINT_FIELD_NUMBER; + hash = (53 * hash) + getHint().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.AttestationNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AttestationNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.AttestationNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Note kind that represents a logical attestation "role" or "authority". For
+   * example, an organization might have one `Authority` for "QA" and one for
+   * "build". This note is intended to act strictly as a grouping mechanism for
+   * the attached occurrences (Attestations). This grouping mechanism also
+   * provides a security boundary, since IAM ACLs gate the ability for a principle
+   * to attach an occurrence to a given note. It also provides a single point of
+   * lookup to find all attached attestation occurrences, even if they don't all
+   * live in the same project.
+   * 
+ * + * Protobuf type {@code grafeas.v1.AttestationNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.AttestationNote) + io.grafeas.v1.AttestationNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AttestationNote.class, io.grafeas.v1.AttestationNote.Builder.class); + } + + // Construct using io.grafeas.v1.AttestationNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + hint_ = null; + if (hintBuilder_ != null) { + hintBuilder_.dispose(); + hintBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote getDefaultInstanceForType() { + return io.grafeas.v1.AttestationNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote build() { + io.grafeas.v1.AttestationNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote buildPartial() { + io.grafeas.v1.AttestationNote result = new io.grafeas.v1.AttestationNote(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.AttestationNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.hint_ = hintBuilder_ == null + ? hint_ + : hintBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.AttestationNote) { + return mergeFrom((io.grafeas.v1.AttestationNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.AttestationNote other) { + if (other == io.grafeas.v1.AttestationNote.getDefaultInstance()) return this; + if (other.hasHint()) { + mergeHint(other.getHint()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getHintFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.AttestationNote.Hint hint_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationNote.Hint, io.grafeas.v1.AttestationNote.Hint.Builder, io.grafeas.v1.AttestationNote.HintOrBuilder> hintBuilder_; + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + * @return Whether the hint field is set. + */ + public boolean hasHint() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + * @return The hint. + */ + public io.grafeas.v1.AttestationNote.Hint getHint() { + if (hintBuilder_ == null) { + return hint_ == null ? io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; + } else { + return hintBuilder_.getMessage(); + } + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + public Builder setHint(io.grafeas.v1.AttestationNote.Hint value) { + if (hintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hint_ = value; + } else { + hintBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + public Builder setHint( + io.grafeas.v1.AttestationNote.Hint.Builder builderForValue) { + if (hintBuilder_ == null) { + hint_ = builderForValue.build(); + } else { + hintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + public Builder mergeHint(io.grafeas.v1.AttestationNote.Hint value) { + if (hintBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + hint_ != null && + hint_ != io.grafeas.v1.AttestationNote.Hint.getDefaultInstance()) { + getHintBuilder().mergeFrom(value); + } else { + hint_ = value; + } + } else { + hintBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + public Builder clearHint() { + bitField0_ = (bitField0_ & ~0x00000001); + hint_ = null; + if (hintBuilder_ != null) { + hintBuilder_.dispose(); + hintBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + public io.grafeas.v1.AttestationNote.Hint.Builder getHintBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHintFieldBuilder().getBuilder(); + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + public io.grafeas.v1.AttestationNote.HintOrBuilder getHintOrBuilder() { + if (hintBuilder_ != null) { + return hintBuilder_.getMessageOrBuilder(); + } else { + return hint_ == null ? + io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; + } + } + /** + *
+     * Hint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationNote.Hint, io.grafeas.v1.AttestationNote.Hint.Builder, io.grafeas.v1.AttestationNote.HintOrBuilder> + getHintFieldBuilder() { + if (hintBuilder_ == null) { + hintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationNote.Hint, io.grafeas.v1.AttestationNote.Hint.Builder, io.grafeas.v1.AttestationNote.HintOrBuilder>( + getHint(), + getParentForChildren(), + isClean()); + hint_ = null; + } + return hintBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.AttestationNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.AttestationNote) + private static final io.grafeas.v1.AttestationNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.AttestationNote(); + } + + public static io.grafeas.v1.AttestationNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttestationNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.AttestationNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java new file mode 100644 index 000000000000..202623bd6817 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/attestation.proto + +package io.grafeas.v1; + +public interface AttestationNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.AttestationNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Hint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + * @return Whether the hint field is set. + */ + boolean hasHint(); + /** + *
+   * Hint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + * @return The hint. + */ + io.grafeas.v1.AttestationNote.Hint getHint(); + /** + *
+   * Hint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.AttestationNote.Hint hint = 1; + */ + io.grafeas.v1.AttestationNote.HintOrBuilder getHintOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java new file mode 100644 index 000000000000..20b2893ff31b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java @@ -0,0 +1,1658 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/attestation.proto + +package io.grafeas.v1; + +/** + *
+ * Occurrence that represents a single "attestation". The authenticity of an
+ * attestation can be verified using the attached signature. If the verifier
+ * trusts the public key of the signer, then verifying the signature is
+ * sufficient to establish trust. In this circumstance, the authority to which
+ * this attestation is attached is primarily useful for lookup (how to find
+ * this attestation if you already know the authority and artifact to be
+ * verified) and intent (for which authority this attestation was intended to
+ * sign.
+ * 
+ * + * Protobuf type {@code grafeas.v1.AttestationOccurrence} + */ +public final class AttestationOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.AttestationOccurrence) + AttestationOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use AttestationOccurrence.newBuilder() to construct. + private AttestationOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttestationOccurrence() { + serializedPayload_ = com.google.protobuf.ByteString.EMPTY; + signatures_ = java.util.Collections.emptyList(); + jwts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttestationOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AttestationOccurrence.class, io.grafeas.v1.AttestationOccurrence.Builder.class); + } + + public static final int SERIALIZED_PAYLOAD_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString serializedPayload_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+   * Required. The serialized payload that is verified by one or more
+   * `signatures`.
+   * 
+ * + * bytes serialized_payload = 1; + * @return The serializedPayload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSerializedPayload() { + return serializedPayload_; + } + + public static final int SIGNATURES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List signatures_; + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + @java.lang.Override + public java.util.List getSignaturesList() { + return signatures_; + } + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + @java.lang.Override + public java.util.List + getSignaturesOrBuilderList() { + return signatures_; + } + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + @java.lang.Override + public int getSignaturesCount() { + return signatures_.size(); + } + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + @java.lang.Override + public io.grafeas.v1.Signature getSignatures(int index) { + return signatures_.get(index); + } + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + @java.lang.Override + public io.grafeas.v1.SignatureOrBuilder getSignaturesOrBuilder( + int index) { + return signatures_.get(index); + } + + public static final int JWTS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List jwts_; + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + @java.lang.Override + public java.util.List getJwtsList() { + return jwts_; + } + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + @java.lang.Override + public java.util.List + getJwtsOrBuilderList() { + return jwts_; + } + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + @java.lang.Override + public int getJwtsCount() { + return jwts_.size(); + } + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + @java.lang.Override + public io.grafeas.v1.Jwt getJwts(int index) { + return jwts_.get(index); + } + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + @java.lang.Override + public io.grafeas.v1.JwtOrBuilder getJwtsOrBuilder( + int index) { + return jwts_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!serializedPayload_.isEmpty()) { + output.writeBytes(1, serializedPayload_); + } + for (int i = 0; i < signatures_.size(); i++) { + output.writeMessage(2, signatures_.get(i)); + } + for (int i = 0; i < jwts_.size(); i++) { + output.writeMessage(3, jwts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!serializedPayload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, serializedPayload_); + } + for (int i = 0; i < signatures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, signatures_.get(i)); + } + for (int i = 0; i < jwts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, jwts_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.AttestationOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.AttestationOccurrence other = (io.grafeas.v1.AttestationOccurrence) obj; + + if (!getSerializedPayload() + .equals(other.getSerializedPayload())) return false; + if (!getSignaturesList() + .equals(other.getSignaturesList())) return false; + if (!getJwtsList() + .equals(other.getJwtsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERIALIZED_PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getSerializedPayload().hashCode(); + if (getSignaturesCount() > 0) { + hash = (37 * hash) + SIGNATURES_FIELD_NUMBER; + hash = (53 * hash) + getSignaturesList().hashCode(); + } + if (getJwtsCount() > 0) { + hash = (37 * hash) + JWTS_FIELD_NUMBER; + hash = (53 * hash) + getJwtsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.AttestationOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AttestationOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.AttestationOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.AttestationOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Occurrence that represents a single "attestation". The authenticity of an
+   * attestation can be verified using the attached signature. If the verifier
+   * trusts the public key of the signer, then verifying the signature is
+   * sufficient to establish trust. In this circumstance, the authority to which
+   * this attestation is attached is primarily useful for lookup (how to find
+   * this attestation if you already know the authority and artifact to be
+   * verified) and intent (for which authority this attestation was intended to
+   * sign.
+   * 
+ * + * Protobuf type {@code grafeas.v1.AttestationOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.AttestationOccurrence) + io.grafeas.v1.AttestationOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.AttestationOccurrence.class, io.grafeas.v1.AttestationOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.AttestationOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + serializedPayload_ = com.google.protobuf.ByteString.EMPTY; + if (signaturesBuilder_ == null) { + signatures_ = java.util.Collections.emptyList(); + } else { + signatures_ = null; + signaturesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (jwtsBuilder_ == null) { + jwts_ = java.util.Collections.emptyList(); + } else { + jwts_ = null; + jwtsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.AttestationOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.AttestationOccurrence build() { + io.grafeas.v1.AttestationOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.AttestationOccurrence buildPartial() { + io.grafeas.v1.AttestationOccurrence result = new io.grafeas.v1.AttestationOccurrence(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.AttestationOccurrence result) { + if (signaturesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + signatures_ = java.util.Collections.unmodifiableList(signatures_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.signatures_ = signatures_; + } else { + result.signatures_ = signaturesBuilder_.build(); + } + if (jwtsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + jwts_ = java.util.Collections.unmodifiableList(jwts_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.jwts_ = jwts_; + } else { + result.jwts_ = jwtsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.AttestationOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serializedPayload_ = serializedPayload_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.AttestationOccurrence) { + return mergeFrom((io.grafeas.v1.AttestationOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.AttestationOccurrence other) { + if (other == io.grafeas.v1.AttestationOccurrence.getDefaultInstance()) return this; + if (other.getSerializedPayload() != com.google.protobuf.ByteString.EMPTY) { + setSerializedPayload(other.getSerializedPayload()); + } + if (signaturesBuilder_ == null) { + if (!other.signatures_.isEmpty()) { + if (signatures_.isEmpty()) { + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSignaturesIsMutable(); + signatures_.addAll(other.signatures_); + } + onChanged(); + } + } else { + if (!other.signatures_.isEmpty()) { + if (signaturesBuilder_.isEmpty()) { + signaturesBuilder_.dispose(); + signaturesBuilder_ = null; + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000002); + signaturesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSignaturesFieldBuilder() : null; + } else { + signaturesBuilder_.addAllMessages(other.signatures_); + } + } + } + if (jwtsBuilder_ == null) { + if (!other.jwts_.isEmpty()) { + if (jwts_.isEmpty()) { + jwts_ = other.jwts_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureJwtsIsMutable(); + jwts_.addAll(other.jwts_); + } + onChanged(); + } + } else { + if (!other.jwts_.isEmpty()) { + if (jwtsBuilder_.isEmpty()) { + jwtsBuilder_.dispose(); + jwtsBuilder_ = null; + jwts_ = other.jwts_; + bitField0_ = (bitField0_ & ~0x00000004); + jwtsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getJwtsFieldBuilder() : null; + } else { + jwtsBuilder_.addAllMessages(other.jwts_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + serializedPayload_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + io.grafeas.v1.Signature m = + input.readMessage( + io.grafeas.v1.Signature.parser(), + extensionRegistry); + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(m); + } else { + signaturesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + io.grafeas.v1.Jwt m = + input.readMessage( + io.grafeas.v1.Jwt.parser(), + extensionRegistry); + if (jwtsBuilder_ == null) { + ensureJwtsIsMutable(); + jwts_.add(m); + } else { + jwtsBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString serializedPayload_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Required. The serialized payload that is verified by one or more
+     * `signatures`.
+     * 
+ * + * bytes serialized_payload = 1; + * @return The serializedPayload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSerializedPayload() { + return serializedPayload_; + } + /** + *
+     * Required. The serialized payload that is verified by one or more
+     * `signatures`.
+     * 
+ * + * bytes serialized_payload = 1; + * @param value The serializedPayload to set. + * @return This builder for chaining. + */ + public Builder setSerializedPayload(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + serializedPayload_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The serialized payload that is verified by one or more
+     * `signatures`.
+     * 
+ * + * bytes serialized_payload = 1; + * @return This builder for chaining. + */ + public Builder clearSerializedPayload() { + bitField0_ = (bitField0_ & ~0x00000001); + serializedPayload_ = getDefaultInstance().getSerializedPayload(); + onChanged(); + return this; + } + + private java.util.List signatures_ = + java.util.Collections.emptyList(); + private void ensureSignaturesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + signatures_ = new java.util.ArrayList(signatures_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Signature, io.grafeas.v1.Signature.Builder, io.grafeas.v1.SignatureOrBuilder> signaturesBuilder_; + + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public java.util.List getSignaturesList() { + if (signaturesBuilder_ == null) { + return java.util.Collections.unmodifiableList(signatures_); + } else { + return signaturesBuilder_.getMessageList(); + } + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public int getSignaturesCount() { + if (signaturesBuilder_ == null) { + return signatures_.size(); + } else { + return signaturesBuilder_.getCount(); + } + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public io.grafeas.v1.Signature getSignatures(int index) { + if (signaturesBuilder_ == null) { + return signatures_.get(index); + } else { + return signaturesBuilder_.getMessage(index); + } + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder setSignatures( + int index, io.grafeas.v1.Signature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.set(index, value); + onChanged(); + } else { + signaturesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder setSignatures( + int index, io.grafeas.v1.Signature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.set(index, builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder addSignatures(io.grafeas.v1.Signature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(value); + onChanged(); + } else { + signaturesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder addSignatures( + int index, io.grafeas.v1.Signature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(index, value); + onChanged(); + } else { + signaturesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder addSignatures( + io.grafeas.v1.Signature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder addSignatures( + int index, io.grafeas.v1.Signature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(index, builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder addAllSignatures( + java.lang.Iterable values) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, signatures_); + onChanged(); + } else { + signaturesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder clearSignatures() { + if (signaturesBuilder_ == null) { + signatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + signaturesBuilder_.clear(); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public Builder removeSignatures(int index) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.remove(index); + onChanged(); + } else { + signaturesBuilder_.remove(index); + } + return this; + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public io.grafeas.v1.Signature.Builder getSignaturesBuilder( + int index) { + return getSignaturesFieldBuilder().getBuilder(index); + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public io.grafeas.v1.SignatureOrBuilder getSignaturesOrBuilder( + int index) { + if (signaturesBuilder_ == null) { + return signatures_.get(index); } else { + return signaturesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public java.util.List + getSignaturesOrBuilderList() { + if (signaturesBuilder_ != null) { + return signaturesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(signatures_); + } + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public io.grafeas.v1.Signature.Builder addSignaturesBuilder() { + return getSignaturesFieldBuilder().addBuilder( + io.grafeas.v1.Signature.getDefaultInstance()); + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public io.grafeas.v1.Signature.Builder addSignaturesBuilder( + int index) { + return getSignaturesFieldBuilder().addBuilder( + index, io.grafeas.v1.Signature.getDefaultInstance()); + } + /** + *
+     * One or more signatures over `serialized_payload`.  Verifier implementations
+     * should consider this attestation message verified if at least one
+     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+     * for more details on signature structure and verification.
+     * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + public java.util.List + getSignaturesBuilderList() { + return getSignaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Signature, io.grafeas.v1.Signature.Builder, io.grafeas.v1.SignatureOrBuilder> + getSignaturesFieldBuilder() { + if (signaturesBuilder_ == null) { + signaturesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Signature, io.grafeas.v1.Signature.Builder, io.grafeas.v1.SignatureOrBuilder>( + signatures_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + signatures_ = null; + } + return signaturesBuilder_; + } + + private java.util.List jwts_ = + java.util.Collections.emptyList(); + private void ensureJwtsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + jwts_ = new java.util.ArrayList(jwts_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Jwt, io.grafeas.v1.Jwt.Builder, io.grafeas.v1.JwtOrBuilder> jwtsBuilder_; + + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public java.util.List getJwtsList() { + if (jwtsBuilder_ == null) { + return java.util.Collections.unmodifiableList(jwts_); + } else { + return jwtsBuilder_.getMessageList(); + } + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public int getJwtsCount() { + if (jwtsBuilder_ == null) { + return jwts_.size(); + } else { + return jwtsBuilder_.getCount(); + } + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public io.grafeas.v1.Jwt getJwts(int index) { + if (jwtsBuilder_ == null) { + return jwts_.get(index); + } else { + return jwtsBuilder_.getMessage(index); + } + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder setJwts( + int index, io.grafeas.v1.Jwt value) { + if (jwtsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJwtsIsMutable(); + jwts_.set(index, value); + onChanged(); + } else { + jwtsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder setJwts( + int index, io.grafeas.v1.Jwt.Builder builderForValue) { + if (jwtsBuilder_ == null) { + ensureJwtsIsMutable(); + jwts_.set(index, builderForValue.build()); + onChanged(); + } else { + jwtsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder addJwts(io.grafeas.v1.Jwt value) { + if (jwtsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJwtsIsMutable(); + jwts_.add(value); + onChanged(); + } else { + jwtsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder addJwts( + int index, io.grafeas.v1.Jwt value) { + if (jwtsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJwtsIsMutable(); + jwts_.add(index, value); + onChanged(); + } else { + jwtsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder addJwts( + io.grafeas.v1.Jwt.Builder builderForValue) { + if (jwtsBuilder_ == null) { + ensureJwtsIsMutable(); + jwts_.add(builderForValue.build()); + onChanged(); + } else { + jwtsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder addJwts( + int index, io.grafeas.v1.Jwt.Builder builderForValue) { + if (jwtsBuilder_ == null) { + ensureJwtsIsMutable(); + jwts_.add(index, builderForValue.build()); + onChanged(); + } else { + jwtsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder addAllJwts( + java.lang.Iterable values) { + if (jwtsBuilder_ == null) { + ensureJwtsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, jwts_); + onChanged(); + } else { + jwtsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder clearJwts() { + if (jwtsBuilder_ == null) { + jwts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + jwtsBuilder_.clear(); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public Builder removeJwts(int index) { + if (jwtsBuilder_ == null) { + ensureJwtsIsMutable(); + jwts_.remove(index); + onChanged(); + } else { + jwtsBuilder_.remove(index); + } + return this; + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public io.grafeas.v1.Jwt.Builder getJwtsBuilder( + int index) { + return getJwtsFieldBuilder().getBuilder(index); + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public io.grafeas.v1.JwtOrBuilder getJwtsOrBuilder( + int index) { + if (jwtsBuilder_ == null) { + return jwts_.get(index); } else { + return jwtsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public java.util.List + getJwtsOrBuilderList() { + if (jwtsBuilder_ != null) { + return jwtsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(jwts_); + } + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public io.grafeas.v1.Jwt.Builder addJwtsBuilder() { + return getJwtsFieldBuilder().addBuilder( + io.grafeas.v1.Jwt.getDefaultInstance()); + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public io.grafeas.v1.Jwt.Builder addJwtsBuilder( + int index) { + return getJwtsFieldBuilder().addBuilder( + index, io.grafeas.v1.Jwt.getDefaultInstance()); + } + /** + *
+     * One or more JWTs encoding a self-contained attestation.
+     * Each JWT encodes the payload that it verifies within the JWT itself.
+     * Verifier implementation SHOULD ignore the `serialized_payload` field
+     * when verifying these JWTs.
+     * If only JWTs are present on this AttestationOccurrence, then the
+     * `serialized_payload` SHOULD be left empty.
+     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+     * Occurrence, but this is not validated by Grafeas metadata API
+     * implementations.  The JWT itself is opaque to Grafeas.
+     * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + public java.util.List + getJwtsBuilderList() { + return getJwtsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Jwt, io.grafeas.v1.Jwt.Builder, io.grafeas.v1.JwtOrBuilder> + getJwtsFieldBuilder() { + if (jwtsBuilder_ == null) { + jwtsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Jwt, io.grafeas.v1.Jwt.Builder, io.grafeas.v1.JwtOrBuilder>( + jwts_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + jwts_ = null; + } + return jwtsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.AttestationOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.AttestationOccurrence) + private static final io.grafeas.v1.AttestationOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.AttestationOccurrence(); + } + + public static io.grafeas.v1.AttestationOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttestationOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.AttestationOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java new file mode 100644 index 000000000000..771f03145fc8 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java @@ -0,0 +1,163 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/attestation.proto + +package io.grafeas.v1; + +public interface AttestationOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.AttestationOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The serialized payload that is verified by one or more
+   * `signatures`.
+   * 
+ * + * bytes serialized_payload = 1; + * @return The serializedPayload. + */ + com.google.protobuf.ByteString getSerializedPayload(); + + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + java.util.List + getSignaturesList(); + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + io.grafeas.v1.Signature getSignatures(int index); + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + int getSignaturesCount(); + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + java.util.List + getSignaturesOrBuilderList(); + /** + *
+   * One or more signatures over `serialized_payload`.  Verifier implementations
+   * should consider this attestation message verified if at least one
+   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
+   * for more details on signature structure and verification.
+   * 
+ * + * repeated .grafeas.v1.Signature signatures = 2; + */ + io.grafeas.v1.SignatureOrBuilder getSignaturesOrBuilder( + int index); + + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + java.util.List + getJwtsList(); + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + io.grafeas.v1.Jwt getJwts(int index); + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + int getJwtsCount(); + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + java.util.List + getJwtsOrBuilderList(); + /** + *
+   * One or more JWTs encoding a self-contained attestation.
+   * Each JWT encodes the payload that it verifies within the JWT itself.
+   * Verifier implementation SHOULD ignore the `serialized_payload` field
+   * when verifying these JWTs.
+   * If only JWTs are present on this AttestationOccurrence, then the
+   * `serialized_payload` SHOULD be left empty.
+   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+   * Occurrence, but this is not validated by Grafeas metadata API
+   * implementations.  The JWT itself is opaque to Grafeas.
+   * 
+ * + * repeated .grafeas.v1.Jwt jwts = 3; + */ + io.grafeas.v1.JwtOrBuilder getJwtsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java new file mode 100644 index 000000000000..0024b9c1f607 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java @@ -0,0 +1,910 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to create notes in batch.
+ * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateNotesRequest} + */ +public final class BatchCreateNotesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateNotesRequest) + BatchCreateNotesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchCreateNotesRequest.newBuilder() to construct. + private BatchCreateNotesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchCreateNotesRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchCreateNotesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetNotes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateNotesRequest.class, io.grafeas.v1.BatchCreateNotesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the notes are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the notes are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTES_FIELD_NUMBER = 2; + private static final class NotesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, io.grafeas.v1.Note> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + io.grafeas.v1.Note.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, io.grafeas.v1.Note> notes_; + private com.google.protobuf.MapField + internalGetNotes() { + if (notes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + NotesDefaultEntryHolder.defaultEntry); + } + return notes_; + } + public int getNotesCount() { + return internalGetNotes().getMap().size(); + } + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public boolean containsNotes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetNotes().getMap().containsKey(key); + } + /** + * Use {@link #getNotesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getNotes() { + return getNotesMap(); + } + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.Map getNotesMap() { + return internalGetNotes().getMap(); + } + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public /* nullable */ +io.grafeas.v1.Note getNotesOrDefault( + java.lang.String key, + /* nullable */ +io.grafeas.v1.Note defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNotes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.Note getNotesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNotes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetNotes(), + NotesDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + for (java.util.Map.Entry entry + : internalGetNotes().getMap().entrySet()) { + com.google.protobuf.MapEntry + notes__ = NotesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, notes__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BatchCreateNotesRequest)) { + return super.equals(obj); + } + io.grafeas.v1.BatchCreateNotesRequest other = (io.grafeas.v1.BatchCreateNotesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!internalGetNotes().equals( + other.internalGetNotes())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (!internalGetNotes().getMap().isEmpty()) { + hash = (37 * hash) + NOTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetNotes().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BatchCreateNotesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to create notes in batch.
+   * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateNotesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateNotesRequest) + io.grafeas.v1.BatchCreateNotesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetNotes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableNotes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateNotesRequest.class, io.grafeas.v1.BatchCreateNotesRequest.Builder.class); + } + + // Construct using io.grafeas.v1.BatchCreateNotesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + internalGetMutableNotes().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesRequest getDefaultInstanceForType() { + return io.grafeas.v1.BatchCreateNotesRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesRequest build() { + io.grafeas.v1.BatchCreateNotesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesRequest buildPartial() { + io.grafeas.v1.BatchCreateNotesRequest result = new io.grafeas.v1.BatchCreateNotesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.BatchCreateNotesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.notes_ = internalGetNotes(); + result.notes_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BatchCreateNotesRequest) { + return mergeFrom((io.grafeas.v1.BatchCreateNotesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BatchCreateNotesRequest other) { + if (other == io.grafeas.v1.BatchCreateNotesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableNotes().mergeFrom( + other.internalGetNotes()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + notes__ = input.readMessage( + NotesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableNotes().getMutableMap().put( + notes__.getKey(), notes__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the notes are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the notes are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the notes are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the notes are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the notes are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, io.grafeas.v1.Note> notes_; + private com.google.protobuf.MapField + internalGetNotes() { + if (notes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + NotesDefaultEntryHolder.defaultEntry); + } + return notes_; + } + private com.google.protobuf.MapField + internalGetMutableNotes() { + if (notes_ == null) { + notes_ = com.google.protobuf.MapField.newMapField( + NotesDefaultEntryHolder.defaultEntry); + } + if (!notes_.isMutable()) { + notes_ = notes_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return notes_; + } + public int getNotesCount() { + return internalGetNotes().getMap().size(); + } + /** + *
+     * The notes to create. Max allowed length is 1000.
+     * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public boolean containsNotes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetNotes().getMap().containsKey(key); + } + /** + * Use {@link #getNotesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getNotes() { + return getNotesMap(); + } + /** + *
+     * The notes to create. Max allowed length is 1000.
+     * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.Map getNotesMap() { + return internalGetNotes().getMap(); + } + /** + *
+     * The notes to create. Max allowed length is 1000.
+     * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public /* nullable */ +io.grafeas.v1.Note getNotesOrDefault( + java.lang.String key, + /* nullable */ +io.grafeas.v1.Note defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNotes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The notes to create. Max allowed length is 1000.
+     * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.Note getNotesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNotes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearNotes() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableNotes().getMutableMap() + .clear(); + return this; + } + /** + *
+     * The notes to create. Max allowed length is 1000.
+     * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeNotes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableNotes().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableNotes() { + bitField0_ |= 0x00000002; + return internalGetMutableNotes().getMutableMap(); + } + /** + *
+     * The notes to create. Max allowed length is 1000.
+     * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder putNotes( + java.lang.String key, + io.grafeas.v1.Note value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableNotes().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * The notes to create. Max allowed length is 1000.
+     * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder putAllNotes( + java.util.Map values) { + internalGetMutableNotes().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateNotesRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateNotesRequest) + private static final io.grafeas.v1.BatchCreateNotesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateNotesRequest(); + } + + public static io.grafeas.v1.BatchCreateNotesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateNotesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java new file mode 100644 index 000000000000..912f5e4cb609 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface BatchCreateNotesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateNotesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the notes are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the notes are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + int getNotesCount(); + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + boolean containsNotes( + java.lang.String key); + /** + * Use {@link #getNotesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getNotes(); + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.Map + getNotesMap(); + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + /* nullable */ +io.grafeas.v1.Note getNotesOrDefault( + java.lang.String key, + /* nullable */ +io.grafeas.v1.Note defaultValue); + /** + *
+   * The notes to create. Max allowed length is 1000.
+   * 
+ * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + io.grafeas.v1.Note getNotesOrThrow( + java.lang.String key); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java new file mode 100644 index 000000000000..6066cf15b94f --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java @@ -0,0 +1,862 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Response for creating notes in batch.
+ * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateNotesResponse} + */ +public final class BatchCreateNotesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateNotesResponse) + BatchCreateNotesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchCreateNotesResponse.newBuilder() to construct. + private BatchCreateNotesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchCreateNotesResponse() { + notes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchCreateNotesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateNotesResponse.class, io.grafeas.v1.BatchCreateNotesResponse.Builder.class); + } + + public static final int NOTES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List notes_; + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public java.util.List getNotesList() { + return notes_; + } + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public java.util.List + getNotesOrBuilderList() { + return notes_; + } + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public int getNotesCount() { + return notes_.size(); + } + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public io.grafeas.v1.Note getNotes(int index) { + return notes_.get(index); + } + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( + int index) { + return notes_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < notes_.size(); i++) { + output.writeMessage(1, notes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < notes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, notes_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BatchCreateNotesResponse)) { + return super.equals(obj); + } + io.grafeas.v1.BatchCreateNotesResponse other = (io.grafeas.v1.BatchCreateNotesResponse) obj; + + if (!getNotesList() + .equals(other.getNotesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNotesCount() > 0) { + hash = (37 * hash) + NOTES_FIELD_NUMBER; + hash = (53 * hash) + getNotesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BatchCreateNotesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for creating notes in batch.
+   * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateNotesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateNotesResponse) + io.grafeas.v1.BatchCreateNotesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateNotesResponse.class, io.grafeas.v1.BatchCreateNotesResponse.Builder.class); + } + + // Construct using io.grafeas.v1.BatchCreateNotesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (notesBuilder_ == null) { + notes_ = java.util.Collections.emptyList(); + } else { + notes_ = null; + notesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesResponse getDefaultInstanceForType() { + return io.grafeas.v1.BatchCreateNotesResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesResponse build() { + io.grafeas.v1.BatchCreateNotesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesResponse buildPartial() { + io.grafeas.v1.BatchCreateNotesResponse result = new io.grafeas.v1.BatchCreateNotesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.BatchCreateNotesResponse result) { + if (notesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + notes_ = java.util.Collections.unmodifiableList(notes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.notes_ = notes_; + } else { + result.notes_ = notesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.BatchCreateNotesResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BatchCreateNotesResponse) { + return mergeFrom((io.grafeas.v1.BatchCreateNotesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BatchCreateNotesResponse other) { + if (other == io.grafeas.v1.BatchCreateNotesResponse.getDefaultInstance()) return this; + if (notesBuilder_ == null) { + if (!other.notes_.isEmpty()) { + if (notes_.isEmpty()) { + notes_ = other.notes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNotesIsMutable(); + notes_.addAll(other.notes_); + } + onChanged(); + } + } else { + if (!other.notes_.isEmpty()) { + if (notesBuilder_.isEmpty()) { + notesBuilder_.dispose(); + notesBuilder_ = null; + notes_ = other.notes_; + bitField0_ = (bitField0_ & ~0x00000001); + notesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNotesFieldBuilder() : null; + } else { + notesBuilder_.addAllMessages(other.notes_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.grafeas.v1.Note m = + input.readMessage( + io.grafeas.v1.Note.parser(), + extensionRegistry); + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.add(m); + } else { + notesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List notes_ = + java.util.Collections.emptyList(); + private void ensureNotesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + notes_ = new java.util.ArrayList(notes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> notesBuilder_; + + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public java.util.List getNotesList() { + if (notesBuilder_ == null) { + return java.util.Collections.unmodifiableList(notes_); + } else { + return notesBuilder_.getMessageList(); + } + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public int getNotesCount() { + if (notesBuilder_ == null) { + return notes_.size(); + } else { + return notesBuilder_.getCount(); + } + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note getNotes(int index) { + if (notesBuilder_ == null) { + return notes_.get(index); + } else { + return notesBuilder_.getMessage(index); + } + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder setNotes( + int index, io.grafeas.v1.Note value) { + if (notesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotesIsMutable(); + notes_.set(index, value); + onChanged(); + } else { + notesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder setNotes( + int index, io.grafeas.v1.Note.Builder builderForValue) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.set(index, builderForValue.build()); + onChanged(); + } else { + notesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes(io.grafeas.v1.Note value) { + if (notesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotesIsMutable(); + notes_.add(value); + onChanged(); + } else { + notesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes( + int index, io.grafeas.v1.Note value) { + if (notesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotesIsMutable(); + notes_.add(index, value); + onChanged(); + } else { + notesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes( + io.grafeas.v1.Note.Builder builderForValue) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.add(builderForValue.build()); + onChanged(); + } else { + notesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes( + int index, io.grafeas.v1.Note.Builder builderForValue) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.add(index, builderForValue.build()); + onChanged(); + } else { + notesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addAllNotes( + java.lang.Iterable values) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, notes_); + onChanged(); + } else { + notesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder clearNotes() { + if (notesBuilder_ == null) { + notes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + notesBuilder_.clear(); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder removeNotes(int index) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.remove(index); + onChanged(); + } else { + notesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note.Builder getNotesBuilder( + int index) { + return getNotesFieldBuilder().getBuilder(index); + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( + int index) { + if (notesBuilder_ == null) { + return notes_.get(index); } else { + return notesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public java.util.List + getNotesOrBuilderList() { + if (notesBuilder_ != null) { + return notesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(notes_); + } + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note.Builder addNotesBuilder() { + return getNotesFieldBuilder().addBuilder( + io.grafeas.v1.Note.getDefaultInstance()); + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note.Builder addNotesBuilder( + int index) { + return getNotesFieldBuilder().addBuilder( + index, io.grafeas.v1.Note.getDefaultInstance()); + } + /** + *
+     * The notes that were created.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public java.util.List + getNotesBuilderList() { + return getNotesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> + getNotesFieldBuilder() { + if (notesBuilder_ == null) { + notesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( + notes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + notes_ = null; + } + return notesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateNotesResponse) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateNotesResponse) + private static final io.grafeas.v1.BatchCreateNotesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateNotesResponse(); + } + + public static io.grafeas.v1.BatchCreateNotesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateNotesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateNotesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java new file mode 100644 index 000000000000..d59c13740d4a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface BatchCreateNotesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateNotesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + java.util.List + getNotesList(); + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + io.grafeas.v1.Note getNotes(int index); + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + int getNotesCount(); + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + java.util.List + getNotesOrBuilderList(); + /** + *
+   * The notes that were created.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java new file mode 100644 index 000000000000..26827deffd40 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java @@ -0,0 +1,1033 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to create occurrences in batch.
+ * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesRequest} + */ +public final class BatchCreateOccurrencesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateOccurrencesRequest) + BatchCreateOccurrencesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchCreateOccurrencesRequest.newBuilder() to construct. + private BatchCreateOccurrencesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchCreateOccurrencesRequest() { + parent_ = ""; + occurrences_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchCreateOccurrencesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateOccurrencesRequest.class, io.grafeas.v1.BatchCreateOccurrencesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrences are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrences are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OCCURRENCES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List occurrences_; + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getOccurrencesList() { + return occurrences_; + } + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getOccurrencesOrBuilderList() { + return occurrences_; + } + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getOccurrencesCount() { + return occurrences_.size(); + } + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.Occurrence getOccurrences(int index) { + return occurrences_.get(index); + } + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + return occurrences_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < occurrences_.size(); i++) { + output.writeMessage(2, occurrences_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + for (int i = 0; i < occurrences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, occurrences_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BatchCreateOccurrencesRequest)) { + return super.equals(obj); + } + io.grafeas.v1.BatchCreateOccurrencesRequest other = (io.grafeas.v1.BatchCreateOccurrencesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getOccurrencesList() + .equals(other.getOccurrencesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getOccurrencesCount() > 0) { + hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; + hash = (53 * hash) + getOccurrencesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BatchCreateOccurrencesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to create occurrences in batch.
+   * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateOccurrencesRequest) + io.grafeas.v1.BatchCreateOccurrencesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateOccurrencesRequest.class, io.grafeas.v1.BatchCreateOccurrencesRequest.Builder.class); + } + + // Construct using io.grafeas.v1.BatchCreateOccurrencesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + } else { + occurrences_ = null; + occurrencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesRequest getDefaultInstanceForType() { + return io.grafeas.v1.BatchCreateOccurrencesRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesRequest build() { + io.grafeas.v1.BatchCreateOccurrencesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesRequest buildPartial() { + io.grafeas.v1.BatchCreateOccurrencesRequest result = new io.grafeas.v1.BatchCreateOccurrencesRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.BatchCreateOccurrencesRequest result) { + if (occurrencesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + occurrences_ = java.util.Collections.unmodifiableList(occurrences_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.occurrences_ = occurrences_; + } else { + result.occurrences_ = occurrencesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.BatchCreateOccurrencesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BatchCreateOccurrencesRequest) { + return mergeFrom((io.grafeas.v1.BatchCreateOccurrencesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BatchCreateOccurrencesRequest other) { + if (other == io.grafeas.v1.BatchCreateOccurrencesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (occurrencesBuilder_ == null) { + if (!other.occurrences_.isEmpty()) { + if (occurrences_.isEmpty()) { + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOccurrencesIsMutable(); + occurrences_.addAll(other.occurrences_); + } + onChanged(); + } + } else { + if (!other.occurrences_.isEmpty()) { + if (occurrencesBuilder_.isEmpty()) { + occurrencesBuilder_.dispose(); + occurrencesBuilder_ = null; + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000002); + occurrencesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOccurrencesFieldBuilder() : null; + } else { + occurrencesBuilder_.addAllMessages(other.occurrences_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + io.grafeas.v1.Occurrence m = + input.readMessage( + io.grafeas.v1.Occurrence.parser(), + extensionRegistry); + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(m); + } else { + occurrencesBuilder_.addMessage(m); + } + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrences are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrences are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrences are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrences are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrences are to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List occurrences_ = + java.util.Collections.emptyList(); + private void ensureOccurrencesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + occurrences_ = new java.util.ArrayList(occurrences_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; + + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getOccurrencesList() { + if (occurrencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(occurrences_); + } else { + return occurrencesBuilder_.getMessageList(); + } + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getOccurrencesCount() { + if (occurrencesBuilder_ == null) { + return occurrences_.size(); + } else { + return occurrencesBuilder_.getCount(); + } + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Occurrence getOccurrences(int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); + } else { + return occurrencesBuilder_.getMessage(index); + } + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.set(index, value); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.set(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addOccurrences(io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(index, value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addOccurrences( + io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllOccurrences( + java.lang.Iterable values) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, occurrences_); + onChanged(); + } else { + occurrencesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearOccurrences() { + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + occurrencesBuilder_.clear(); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeOccurrences(int index) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.remove(index); + onChanged(); + } else { + occurrencesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().getBuilder(index); + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); } else { + return occurrencesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getOccurrencesOrBuilderList() { + if (occurrencesBuilder_ != null) { + return occurrencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(occurrences_); + } + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { + return getOccurrencesFieldBuilder().addBuilder( + io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().addBuilder( + index, io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences to create. Max allowed length is 1000.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getOccurrencesBuilderList() { + return getOccurrencesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> + getOccurrencesFieldBuilder() { + if (occurrencesBuilder_ == null) { + occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( + occurrences_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + occurrences_ = null; + } + return occurrencesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateOccurrencesRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateOccurrencesRequest) + private static final io.grafeas.v1.BatchCreateOccurrencesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateOccurrencesRequest(); + } + + public static io.grafeas.v1.BatchCreateOccurrencesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateOccurrencesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java new file mode 100644 index 000000000000..34f9b79bdd4e --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface BatchCreateOccurrencesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateOccurrencesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrences are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrences are to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getOccurrencesList(); + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + io.grafeas.v1.Occurrence getOccurrences(int index); + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + int getOccurrencesCount(); + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getOccurrencesOrBuilderList(); + /** + *
+   * The occurrences to create. Max allowed length is 1000.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java new file mode 100644 index 000000000000..db2c5a911e7b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java @@ -0,0 +1,862 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Response for creating occurrences in batch.
+ * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesResponse} + */ +public final class BatchCreateOccurrencesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateOccurrencesResponse) + BatchCreateOccurrencesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchCreateOccurrencesResponse.newBuilder() to construct. + private BatchCreateOccurrencesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchCreateOccurrencesResponse() { + occurrences_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchCreateOccurrencesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateOccurrencesResponse.class, io.grafeas.v1.BatchCreateOccurrencesResponse.Builder.class); + } + + public static final int OCCURRENCES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List occurrences_; + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public java.util.List getOccurrencesList() { + return occurrences_; + } + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public java.util.List + getOccurrencesOrBuilderList() { + return occurrences_; + } + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public int getOccurrencesCount() { + return occurrences_.size(); + } + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public io.grafeas.v1.Occurrence getOccurrences(int index) { + return occurrences_.get(index); + } + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + return occurrences_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < occurrences_.size(); i++) { + output.writeMessage(1, occurrences_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < occurrences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, occurrences_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BatchCreateOccurrencesResponse)) { + return super.equals(obj); + } + io.grafeas.v1.BatchCreateOccurrencesResponse other = (io.grafeas.v1.BatchCreateOccurrencesResponse) obj; + + if (!getOccurrencesList() + .equals(other.getOccurrencesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOccurrencesCount() > 0) { + hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; + hash = (53 * hash) + getOccurrencesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BatchCreateOccurrencesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for creating occurrences in batch.
+   * 
+ * + * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateOccurrencesResponse) + io.grafeas.v1.BatchCreateOccurrencesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BatchCreateOccurrencesResponse.class, io.grafeas.v1.BatchCreateOccurrencesResponse.Builder.class); + } + + // Construct using io.grafeas.v1.BatchCreateOccurrencesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + } else { + occurrences_ = null; + occurrencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesResponse getDefaultInstanceForType() { + return io.grafeas.v1.BatchCreateOccurrencesResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesResponse build() { + io.grafeas.v1.BatchCreateOccurrencesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesResponse buildPartial() { + io.grafeas.v1.BatchCreateOccurrencesResponse result = new io.grafeas.v1.BatchCreateOccurrencesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.BatchCreateOccurrencesResponse result) { + if (occurrencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + occurrences_ = java.util.Collections.unmodifiableList(occurrences_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.occurrences_ = occurrences_; + } else { + result.occurrences_ = occurrencesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.BatchCreateOccurrencesResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BatchCreateOccurrencesResponse) { + return mergeFrom((io.grafeas.v1.BatchCreateOccurrencesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BatchCreateOccurrencesResponse other) { + if (other == io.grafeas.v1.BatchCreateOccurrencesResponse.getDefaultInstance()) return this; + if (occurrencesBuilder_ == null) { + if (!other.occurrences_.isEmpty()) { + if (occurrences_.isEmpty()) { + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOccurrencesIsMutable(); + occurrences_.addAll(other.occurrences_); + } + onChanged(); + } + } else { + if (!other.occurrences_.isEmpty()) { + if (occurrencesBuilder_.isEmpty()) { + occurrencesBuilder_.dispose(); + occurrencesBuilder_ = null; + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000001); + occurrencesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOccurrencesFieldBuilder() : null; + } else { + occurrencesBuilder_.addAllMessages(other.occurrences_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.grafeas.v1.Occurrence m = + input.readMessage( + io.grafeas.v1.Occurrence.parser(), + extensionRegistry); + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(m); + } else { + occurrencesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List occurrences_ = + java.util.Collections.emptyList(); + private void ensureOccurrencesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + occurrences_ = new java.util.ArrayList(occurrences_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; + + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List getOccurrencesList() { + if (occurrencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(occurrences_); + } else { + return occurrencesBuilder_.getMessageList(); + } + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public int getOccurrencesCount() { + if (occurrencesBuilder_ == null) { + return occurrences_.size(); + } else { + return occurrencesBuilder_.getCount(); + } + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence getOccurrences(int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); + } else { + return occurrencesBuilder_.getMessage(index); + } + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.set(index, value); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.set(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences(io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(index, value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addAllOccurrences( + java.lang.Iterable values) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, occurrences_); + onChanged(); + } else { + occurrencesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder clearOccurrences() { + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + occurrencesBuilder_.clear(); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder removeOccurrences(int index) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.remove(index); + onChanged(); + } else { + occurrencesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().getBuilder(index); + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); } else { + return occurrencesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List + getOccurrencesOrBuilderList() { + if (occurrencesBuilder_ != null) { + return occurrencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(occurrences_); + } + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { + return getOccurrencesFieldBuilder().addBuilder( + io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().addBuilder( + index, io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences that were created.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List + getOccurrencesBuilderList() { + return getOccurrencesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> + getOccurrencesFieldBuilder() { + if (occurrencesBuilder_ == null) { + occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( + occurrences_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + occurrences_ = null; + } + return occurrencesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateOccurrencesResponse) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateOccurrencesResponse) + private static final io.grafeas.v1.BatchCreateOccurrencesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateOccurrencesResponse(); + } + + public static io.grafeas.v1.BatchCreateOccurrencesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateOccurrencesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BatchCreateOccurrencesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java new file mode 100644 index 000000000000..90337438be46 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface BatchCreateOccurrencesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateOccurrencesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + java.util.List + getOccurrencesList(); + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + io.grafeas.v1.Occurrence getOccurrences(int index); + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + int getOccurrencesCount(); + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + java.util.List + getOccurrencesOrBuilderList(); + /** + *
+   * The occurrences that were created.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java new file mode 100644 index 000000000000..090e954f45ef --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java @@ -0,0 +1,74 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/build.proto + +package io.grafeas.v1; + +public final class Build { + private Build() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BuildNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BuildNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BuildOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026grafeas/v1/build.proto\022\ngrafeas.v1\032\"gr" + + "afeas/v1/intoto_provenance.proto\032!grafea" + + "s/v1/intoto_statement.proto\032\033grafeas/v1/" + + "provenance.proto\"$\n\tBuildNote\022\027\n\017builder" + + "_version\030\001 \001(\t\"\314\001\n\017BuildOccurrence\022/\n\npr" + + "ovenance\030\001 \001(\0132\033.grafeas.v1.BuildProvena" + + "nce\022\030\n\020provenance_bytes\030\002 \001(\t\0227\n\021intoto_" + + "provenance\030\003 \001(\0132\034.grafeas.v1.InTotoProv" + + "enance\0225\n\020intoto_statement\030\004 \001(\0132\033.grafe" + + "as.v1.InTotoStatementBQ\n\rio.grafeas.v1P\001" + + "Z8google.golang.org/genproto/googleapis/" + + "grafeas/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grafeas.v1.InTotoProvenanceProto.getDescriptor(), + io.grafeas.v1.InTotoStatementProto.getDescriptor(), + io.grafeas.v1.Provenance.getDescriptor(), + }); + internal_static_grafeas_v1_BuildNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_BuildNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BuildNote_descriptor, + new java.lang.String[] { "BuilderVersion", }); + internal_static_grafeas_v1_BuildOccurrence_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BuildOccurrence_descriptor, + new java.lang.String[] { "Provenance", "ProvenanceBytes", "IntotoProvenance", "IntotoStatement", }); + io.grafeas.v1.InTotoProvenanceProto.getDescriptor(); + io.grafeas.v1.InTotoStatementProto.getDescriptor(); + io.grafeas.v1.Provenance.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java new file mode 100644 index 000000000000..cefe7d8ac0e8 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java @@ -0,0 +1,582 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/build.proto + +package io.grafeas.v1; + +/** + *
+ * Note holding the version of the provider's builder and the signature of the
+ * provenance message in the build details occurrence.
+ * 
+ * + * Protobuf type {@code grafeas.v1.BuildNote} + */ +public final class BuildNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BuildNote) + BuildNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use BuildNote.newBuilder() to construct. + private BuildNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BuildNote() { + builderVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BuildNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuildNote.class, io.grafeas.v1.BuildNote.Builder.class); + } + + public static final int BUILDER_VERSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object builderVersion_ = ""; + /** + *
+   * Required. Immutable. Version of the builder which produced this build.
+   * 
+ * + * string builder_version = 1; + * @return The builderVersion. + */ + @java.lang.Override + public java.lang.String getBuilderVersion() { + java.lang.Object ref = builderVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + builderVersion_ = s; + return s; + } + } + /** + *
+   * Required. Immutable. Version of the builder which produced this build.
+   * 
+ * + * string builder_version = 1; + * @return The bytes for builderVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBuilderVersionBytes() { + java.lang.Object ref = builderVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + builderVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, builderVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, builderVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BuildNote)) { + return super.equals(obj); + } + io.grafeas.v1.BuildNote other = (io.grafeas.v1.BuildNote) obj; + + if (!getBuilderVersion() + .equals(other.getBuilderVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BUILDER_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getBuilderVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BuildNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuildNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuildNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BuildNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Note holding the version of the provider's builder and the signature of the
+   * provenance message in the build details occurrence.
+   * 
+ * + * Protobuf type {@code grafeas.v1.BuildNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BuildNote) + io.grafeas.v1.BuildNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuildNote.class, io.grafeas.v1.BuildNote.Builder.class); + } + + // Construct using io.grafeas.v1.BuildNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + builderVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BuildNote getDefaultInstanceForType() { + return io.grafeas.v1.BuildNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BuildNote build() { + io.grafeas.v1.BuildNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BuildNote buildPartial() { + io.grafeas.v1.BuildNote result = new io.grafeas.v1.BuildNote(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.BuildNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.builderVersion_ = builderVersion_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BuildNote) { + return mergeFrom((io.grafeas.v1.BuildNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BuildNote other) { + if (other == io.grafeas.v1.BuildNote.getDefaultInstance()) return this; + if (!other.getBuilderVersion().isEmpty()) { + builderVersion_ = other.builderVersion_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + builderVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object builderVersion_ = ""; + /** + *
+     * Required. Immutable. Version of the builder which produced this build.
+     * 
+ * + * string builder_version = 1; + * @return The builderVersion. + */ + public java.lang.String getBuilderVersion() { + java.lang.Object ref = builderVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + builderVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Immutable. Version of the builder which produced this build.
+     * 
+ * + * string builder_version = 1; + * @return The bytes for builderVersion. + */ + public com.google.protobuf.ByteString + getBuilderVersionBytes() { + java.lang.Object ref = builderVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + builderVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Immutable. Version of the builder which produced this build.
+     * 
+ * + * string builder_version = 1; + * @param value The builderVersion to set. + * @return This builder for chaining. + */ + public Builder setBuilderVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + builderVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. Version of the builder which produced this build.
+     * 
+ * + * string builder_version = 1; + * @return This builder for chaining. + */ + public Builder clearBuilderVersion() { + builderVersion_ = getDefaultInstance().getBuilderVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. Version of the builder which produced this build.
+     * 
+ * + * string builder_version = 1; + * @param value The bytes for builderVersion to set. + * @return This builder for chaining. + */ + public Builder setBuilderVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + builderVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BuildNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BuildNote) + private static final io.grafeas.v1.BuildNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BuildNote(); + } + + public static io.grafeas.v1.BuildNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BuildNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BuildNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java new file mode 100644 index 000000000000..bdd0c0e77f13 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/build.proto + +package io.grafeas.v1; + +public interface BuildNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BuildNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Immutable. Version of the builder which produced this build.
+   * 
+ * + * string builder_version = 1; + * @return The builderVersion. + */ + java.lang.String getBuilderVersion(); + /** + *
+   * Required. Immutable. Version of the builder which produced this build.
+   * 
+ * + * string builder_version = 1; + * @return The bytes for builderVersion. + */ + com.google.protobuf.ByteString + getBuilderVersionBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java new file mode 100644 index 000000000000..b026a2175e92 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java @@ -0,0 +1,1378 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/build.proto + +package io.grafeas.v1; + +/** + *
+ * Details of a build occurrence.
+ * 
+ * + * Protobuf type {@code grafeas.v1.BuildOccurrence} + */ +public final class BuildOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BuildOccurrence) + BuildOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use BuildOccurrence.newBuilder() to construct. + private BuildOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BuildOccurrence() { + provenanceBytes_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BuildOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuildOccurrence.class, io.grafeas.v1.BuildOccurrence.Builder.class); + } + + public static final int PROVENANCE_FIELD_NUMBER = 1; + private io.grafeas.v1.BuildProvenance provenance_; + /** + *
+   * The actual provenance for the build.
+   * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + * @return Whether the provenance field is set. + */ + @java.lang.Override + public boolean hasProvenance() { + return provenance_ != null; + } + /** + *
+   * The actual provenance for the build.
+   * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + * @return The provenance. + */ + @java.lang.Override + public io.grafeas.v1.BuildProvenance getProvenance() { + return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; + } + /** + *
+   * The actual provenance for the build.
+   * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + @java.lang.Override + public io.grafeas.v1.BuildProvenanceOrBuilder getProvenanceOrBuilder() { + return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; + } + + public static final int PROVENANCE_BYTES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object provenanceBytes_ = ""; + /** + *
+   * Serialized JSON representation of the provenance, used in generating the
+   * build signature in the corresponding build note. After verifying the
+   * signature, `provenance_bytes` can be unmarshalled and compared to the
+   * provenance to confirm that it is unchanged. A base64-encoded string
+   * representation of the provenance bytes is used for the signature in order
+   * to interoperate with openssl which expects this format for signature
+   * verification.
+   * The serialized form is captured both to avoid ambiguity in how the
+   * provenance is marshalled to json as well to prevent incompatibilities with
+   * future changes.
+   * 
+ * + * string provenance_bytes = 2; + * @return The provenanceBytes. + */ + @java.lang.Override + public java.lang.String getProvenanceBytes() { + java.lang.Object ref = provenanceBytes_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provenanceBytes_ = s; + return s; + } + } + /** + *
+   * Serialized JSON representation of the provenance, used in generating the
+   * build signature in the corresponding build note. After verifying the
+   * signature, `provenance_bytes` can be unmarshalled and compared to the
+   * provenance to confirm that it is unchanged. A base64-encoded string
+   * representation of the provenance bytes is used for the signature in order
+   * to interoperate with openssl which expects this format for signature
+   * verification.
+   * The serialized form is captured both to avoid ambiguity in how the
+   * provenance is marshalled to json as well to prevent incompatibilities with
+   * future changes.
+   * 
+ * + * string provenance_bytes = 2; + * @return The bytes for provenanceBytes. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProvenanceBytesBytes() { + java.lang.Object ref = provenanceBytes_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + provenanceBytes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTOTO_PROVENANCE_FIELD_NUMBER = 3; + private io.grafeas.v1.InTotoProvenance intotoProvenance_; + /** + *
+   * Deprecated. See InTotoStatement for the replacement.
+   * In-toto Provenance representation as defined in spec.
+   * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + * @return Whether the intotoProvenance field is set. + */ + @java.lang.Override + public boolean hasIntotoProvenance() { + return intotoProvenance_ != null; + } + /** + *
+   * Deprecated. See InTotoStatement for the replacement.
+   * In-toto Provenance representation as defined in spec.
+   * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + * @return The intotoProvenance. + */ + @java.lang.Override + public io.grafeas.v1.InTotoProvenance getIntotoProvenance() { + return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; + } + /** + *
+   * Deprecated. See InTotoStatement for the replacement.
+   * In-toto Provenance representation as defined in spec.
+   * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + @java.lang.Override + public io.grafeas.v1.InTotoProvenanceOrBuilder getIntotoProvenanceOrBuilder() { + return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; + } + + public static final int INTOTO_STATEMENT_FIELD_NUMBER = 4; + private io.grafeas.v1.InTotoStatement intotoStatement_; + /** + *
+   * In-toto Statement representation as defined in spec.
+   * The intoto_statement can contain any type of provenance. The serialized
+   * payload of the statement can be stored and signed in the Occurrence's
+   * envelope.
+   * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + * @return Whether the intotoStatement field is set. + */ + @java.lang.Override + public boolean hasIntotoStatement() { + return intotoStatement_ != null; + } + /** + *
+   * In-toto Statement representation as defined in spec.
+   * The intoto_statement can contain any type of provenance. The serialized
+   * payload of the statement can be stored and signed in the Occurrence's
+   * envelope.
+   * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + * @return The intotoStatement. + */ + @java.lang.Override + public io.grafeas.v1.InTotoStatement getIntotoStatement() { + return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; + } + /** + *
+   * In-toto Statement representation as defined in spec.
+   * The intoto_statement can contain any type of provenance. The serialized
+   * payload of the statement can be stored and signed in the Occurrence's
+   * envelope.
+   * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + @java.lang.Override + public io.grafeas.v1.InTotoStatementOrBuilder getIntotoStatementOrBuilder() { + return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (provenance_ != null) { + output.writeMessage(1, getProvenance()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provenanceBytes_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, provenanceBytes_); + } + if (intotoProvenance_ != null) { + output.writeMessage(3, getIntotoProvenance()); + } + if (intotoStatement_ != null) { + output.writeMessage(4, getIntotoStatement()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (provenance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProvenance()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provenanceBytes_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, provenanceBytes_); + } + if (intotoProvenance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getIntotoProvenance()); + } + if (intotoStatement_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getIntotoStatement()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BuildOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.BuildOccurrence other = (io.grafeas.v1.BuildOccurrence) obj; + + if (hasProvenance() != other.hasProvenance()) return false; + if (hasProvenance()) { + if (!getProvenance() + .equals(other.getProvenance())) return false; + } + if (!getProvenanceBytes() + .equals(other.getProvenanceBytes())) return false; + if (hasIntotoProvenance() != other.hasIntotoProvenance()) return false; + if (hasIntotoProvenance()) { + if (!getIntotoProvenance() + .equals(other.getIntotoProvenance())) return false; + } + if (hasIntotoStatement() != other.hasIntotoStatement()) return false; + if (hasIntotoStatement()) { + if (!getIntotoStatement() + .equals(other.getIntotoStatement())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProvenance()) { + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenance().hashCode(); + } + hash = (37 * hash) + PROVENANCE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getProvenanceBytes().hashCode(); + if (hasIntotoProvenance()) { + hash = (37 * hash) + INTOTO_PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getIntotoProvenance().hashCode(); + } + if (hasIntotoStatement()) { + hash = (37 * hash) + INTOTO_STATEMENT_FIELD_NUMBER; + hash = (53 * hash) + getIntotoStatement().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BuildOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuildOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuildOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BuildOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Details of a build occurrence.
+   * 
+ * + * Protobuf type {@code grafeas.v1.BuildOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BuildOccurrence) + io.grafeas.v1.BuildOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuildOccurrence.class, io.grafeas.v1.BuildOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.BuildOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + provenanceBytes_ = ""; + intotoProvenance_ = null; + if (intotoProvenanceBuilder_ != null) { + intotoProvenanceBuilder_.dispose(); + intotoProvenanceBuilder_ = null; + } + intotoStatement_ = null; + if (intotoStatementBuilder_ != null) { + intotoStatementBuilder_.dispose(); + intotoStatementBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BuildOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BuildOccurrence build() { + io.grafeas.v1.BuildOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BuildOccurrence buildPartial() { + io.grafeas.v1.BuildOccurrence result = new io.grafeas.v1.BuildOccurrence(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.BuildOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.provenance_ = provenanceBuilder_ == null + ? provenance_ + : provenanceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.provenanceBytes_ = provenanceBytes_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.intotoProvenance_ = intotoProvenanceBuilder_ == null + ? intotoProvenance_ + : intotoProvenanceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.intotoStatement_ = intotoStatementBuilder_ == null + ? intotoStatement_ + : intotoStatementBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BuildOccurrence) { + return mergeFrom((io.grafeas.v1.BuildOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BuildOccurrence other) { + if (other == io.grafeas.v1.BuildOccurrence.getDefaultInstance()) return this; + if (other.hasProvenance()) { + mergeProvenance(other.getProvenance()); + } + if (!other.getProvenanceBytes().isEmpty()) { + provenanceBytes_ = other.provenanceBytes_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasIntotoProvenance()) { + mergeIntotoProvenance(other.getIntotoProvenance()); + } + if (other.hasIntotoStatement()) { + mergeIntotoStatement(other.getIntotoStatement()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getProvenanceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + provenanceBytes_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getIntotoProvenanceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getIntotoStatementFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.BuildProvenance provenance_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildProvenance, io.grafeas.v1.BuildProvenance.Builder, io.grafeas.v1.BuildProvenanceOrBuilder> provenanceBuilder_; + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + * @return Whether the provenance field is set. + */ + public boolean hasProvenance() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + * @return The provenance. + */ + public io.grafeas.v1.BuildProvenance getProvenance() { + if (provenanceBuilder_ == null) { + return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; + } else { + return provenanceBuilder_.getMessage(); + } + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + public Builder setProvenance(io.grafeas.v1.BuildProvenance value) { + if (provenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + provenance_ = value; + } else { + provenanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + public Builder setProvenance( + io.grafeas.v1.BuildProvenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + provenance_ = builderForValue.build(); + } else { + provenanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + public Builder mergeProvenance(io.grafeas.v1.BuildProvenance value) { + if (provenanceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + provenance_ != null && + provenance_ != io.grafeas.v1.BuildProvenance.getDefaultInstance()) { + getProvenanceBuilder().mergeFrom(value); + } else { + provenance_ = value; + } + } else { + provenanceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + public Builder clearProvenance() { + bitField0_ = (bitField0_ & ~0x00000001); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + public io.grafeas.v1.BuildProvenance.Builder getProvenanceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getProvenanceFieldBuilder().getBuilder(); + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + public io.grafeas.v1.BuildProvenanceOrBuilder getProvenanceOrBuilder() { + if (provenanceBuilder_ != null) { + return provenanceBuilder_.getMessageOrBuilder(); + } else { + return provenance_ == null ? + io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; + } + } + /** + *
+     * The actual provenance for the build.
+     * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildProvenance, io.grafeas.v1.BuildProvenance.Builder, io.grafeas.v1.BuildProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + provenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildProvenance, io.grafeas.v1.BuildProvenance.Builder, io.grafeas.v1.BuildProvenanceOrBuilder>( + getProvenance(), + getParentForChildren(), + isClean()); + provenance_ = null; + } + return provenanceBuilder_; + } + + private java.lang.Object provenanceBytes_ = ""; + /** + *
+     * Serialized JSON representation of the provenance, used in generating the
+     * build signature in the corresponding build note. After verifying the
+     * signature, `provenance_bytes` can be unmarshalled and compared to the
+     * provenance to confirm that it is unchanged. A base64-encoded string
+     * representation of the provenance bytes is used for the signature in order
+     * to interoperate with openssl which expects this format for signature
+     * verification.
+     * The serialized form is captured both to avoid ambiguity in how the
+     * provenance is marshalled to json as well to prevent incompatibilities with
+     * future changes.
+     * 
+ * + * string provenance_bytes = 2; + * @return The provenanceBytes. + */ + public java.lang.String getProvenanceBytes() { + java.lang.Object ref = provenanceBytes_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provenanceBytes_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Serialized JSON representation of the provenance, used in generating the
+     * build signature in the corresponding build note. After verifying the
+     * signature, `provenance_bytes` can be unmarshalled and compared to the
+     * provenance to confirm that it is unchanged. A base64-encoded string
+     * representation of the provenance bytes is used for the signature in order
+     * to interoperate with openssl which expects this format for signature
+     * verification.
+     * The serialized form is captured both to avoid ambiguity in how the
+     * provenance is marshalled to json as well to prevent incompatibilities with
+     * future changes.
+     * 
+ * + * string provenance_bytes = 2; + * @return The bytes for provenanceBytes. + */ + public com.google.protobuf.ByteString + getProvenanceBytesBytes() { + java.lang.Object ref = provenanceBytes_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + provenanceBytes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Serialized JSON representation of the provenance, used in generating the
+     * build signature in the corresponding build note. After verifying the
+     * signature, `provenance_bytes` can be unmarshalled and compared to the
+     * provenance to confirm that it is unchanged. A base64-encoded string
+     * representation of the provenance bytes is used for the signature in order
+     * to interoperate with openssl which expects this format for signature
+     * verification.
+     * The serialized form is captured both to avoid ambiguity in how the
+     * provenance is marshalled to json as well to prevent incompatibilities with
+     * future changes.
+     * 
+ * + * string provenance_bytes = 2; + * @param value The provenanceBytes to set. + * @return This builder for chaining. + */ + public Builder setProvenanceBytes( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + provenanceBytes_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Serialized JSON representation of the provenance, used in generating the
+     * build signature in the corresponding build note. After verifying the
+     * signature, `provenance_bytes` can be unmarshalled and compared to the
+     * provenance to confirm that it is unchanged. A base64-encoded string
+     * representation of the provenance bytes is used for the signature in order
+     * to interoperate with openssl which expects this format for signature
+     * verification.
+     * The serialized form is captured both to avoid ambiguity in how the
+     * provenance is marshalled to json as well to prevent incompatibilities with
+     * future changes.
+     * 
+ * + * string provenance_bytes = 2; + * @return This builder for chaining. + */ + public Builder clearProvenanceBytes() { + provenanceBytes_ = getDefaultInstance().getProvenanceBytes(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Serialized JSON representation of the provenance, used in generating the
+     * build signature in the corresponding build note. After verifying the
+     * signature, `provenance_bytes` can be unmarshalled and compared to the
+     * provenance to confirm that it is unchanged. A base64-encoded string
+     * representation of the provenance bytes is used for the signature in order
+     * to interoperate with openssl which expects this format for signature
+     * verification.
+     * The serialized form is captured both to avoid ambiguity in how the
+     * provenance is marshalled to json as well to prevent incompatibilities with
+     * future changes.
+     * 
+ * + * string provenance_bytes = 2; + * @param value The bytes for provenanceBytes to set. + * @return This builder for chaining. + */ + public Builder setProvenanceBytesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + provenanceBytes_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.grafeas.v1.InTotoProvenance intotoProvenance_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> intotoProvenanceBuilder_; + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + * @return Whether the intotoProvenance field is set. + */ + public boolean hasIntotoProvenance() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + * @return The intotoProvenance. + */ + public io.grafeas.v1.InTotoProvenance getIntotoProvenance() { + if (intotoProvenanceBuilder_ == null) { + return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; + } else { + return intotoProvenanceBuilder_.getMessage(); + } + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + public Builder setIntotoProvenance(io.grafeas.v1.InTotoProvenance value) { + if (intotoProvenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + intotoProvenance_ = value; + } else { + intotoProvenanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + public Builder setIntotoProvenance( + io.grafeas.v1.InTotoProvenance.Builder builderForValue) { + if (intotoProvenanceBuilder_ == null) { + intotoProvenance_ = builderForValue.build(); + } else { + intotoProvenanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + public Builder mergeIntotoProvenance(io.grafeas.v1.InTotoProvenance value) { + if (intotoProvenanceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + intotoProvenance_ != null && + intotoProvenance_ != io.grafeas.v1.InTotoProvenance.getDefaultInstance()) { + getIntotoProvenanceBuilder().mergeFrom(value); + } else { + intotoProvenance_ = value; + } + } else { + intotoProvenanceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + public Builder clearIntotoProvenance() { + bitField0_ = (bitField0_ & ~0x00000004); + intotoProvenance_ = null; + if (intotoProvenanceBuilder_ != null) { + intotoProvenanceBuilder_.dispose(); + intotoProvenanceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + public io.grafeas.v1.InTotoProvenance.Builder getIntotoProvenanceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getIntotoProvenanceFieldBuilder().getBuilder(); + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + public io.grafeas.v1.InTotoProvenanceOrBuilder getIntotoProvenanceOrBuilder() { + if (intotoProvenanceBuilder_ != null) { + return intotoProvenanceBuilder_.getMessageOrBuilder(); + } else { + return intotoProvenance_ == null ? + io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; + } + } + /** + *
+     * Deprecated. See InTotoStatement for the replacement.
+     * In-toto Provenance representation as defined in spec.
+     * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> + getIntotoProvenanceFieldBuilder() { + if (intotoProvenanceBuilder_ == null) { + intotoProvenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder>( + getIntotoProvenance(), + getParentForChildren(), + isClean()); + intotoProvenance_ = null; + } + return intotoProvenanceBuilder_; + } + + private io.grafeas.v1.InTotoStatement intotoStatement_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> intotoStatementBuilder_; + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + * @return Whether the intotoStatement field is set. + */ + public boolean hasIntotoStatement() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + * @return The intotoStatement. + */ + public io.grafeas.v1.InTotoStatement getIntotoStatement() { + if (intotoStatementBuilder_ == null) { + return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; + } else { + return intotoStatementBuilder_.getMessage(); + } + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + public Builder setIntotoStatement(io.grafeas.v1.InTotoStatement value) { + if (intotoStatementBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + intotoStatement_ = value; + } else { + intotoStatementBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + public Builder setIntotoStatement( + io.grafeas.v1.InTotoStatement.Builder builderForValue) { + if (intotoStatementBuilder_ == null) { + intotoStatement_ = builderForValue.build(); + } else { + intotoStatementBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + public Builder mergeIntotoStatement(io.grafeas.v1.InTotoStatement value) { + if (intotoStatementBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + intotoStatement_ != null && + intotoStatement_ != io.grafeas.v1.InTotoStatement.getDefaultInstance()) { + getIntotoStatementBuilder().mergeFrom(value); + } else { + intotoStatement_ = value; + } + } else { + intotoStatementBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + public Builder clearIntotoStatement() { + bitField0_ = (bitField0_ & ~0x00000008); + intotoStatement_ = null; + if (intotoStatementBuilder_ != null) { + intotoStatementBuilder_.dispose(); + intotoStatementBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + public io.grafeas.v1.InTotoStatement.Builder getIntotoStatementBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getIntotoStatementFieldBuilder().getBuilder(); + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + public io.grafeas.v1.InTotoStatementOrBuilder getIntotoStatementOrBuilder() { + if (intotoStatementBuilder_ != null) { + return intotoStatementBuilder_.getMessageOrBuilder(); + } else { + return intotoStatement_ == null ? + io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; + } + } + /** + *
+     * In-toto Statement representation as defined in spec.
+     * The intoto_statement can contain any type of provenance. The serialized
+     * payload of the statement can be stored and signed in the Occurrence's
+     * envelope.
+     * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> + getIntotoStatementFieldBuilder() { + if (intotoStatementBuilder_ == null) { + intotoStatementBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder>( + getIntotoStatement(), + getParentForChildren(), + isClean()); + intotoStatement_ = null; + } + return intotoStatementBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BuildOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BuildOccurrence) + private static final io.grafeas.v1.BuildOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BuildOccurrence(); + } + + public static io.grafeas.v1.BuildOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BuildOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BuildOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java new file mode 100644 index 000000000000..ee7da49a9992 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java @@ -0,0 +1,140 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/build.proto + +package io.grafeas.v1; + +public interface BuildOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BuildOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The actual provenance for the build.
+   * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + * @return Whether the provenance field is set. + */ + boolean hasProvenance(); + /** + *
+   * The actual provenance for the build.
+   * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + * @return The provenance. + */ + io.grafeas.v1.BuildProvenance getProvenance(); + /** + *
+   * The actual provenance for the build.
+   * 
+ * + * .grafeas.v1.BuildProvenance provenance = 1; + */ + io.grafeas.v1.BuildProvenanceOrBuilder getProvenanceOrBuilder(); + + /** + *
+   * Serialized JSON representation of the provenance, used in generating the
+   * build signature in the corresponding build note. After verifying the
+   * signature, `provenance_bytes` can be unmarshalled and compared to the
+   * provenance to confirm that it is unchanged. A base64-encoded string
+   * representation of the provenance bytes is used for the signature in order
+   * to interoperate with openssl which expects this format for signature
+   * verification.
+   * The serialized form is captured both to avoid ambiguity in how the
+   * provenance is marshalled to json as well to prevent incompatibilities with
+   * future changes.
+   * 
+ * + * string provenance_bytes = 2; + * @return The provenanceBytes. + */ + java.lang.String getProvenanceBytes(); + /** + *
+   * Serialized JSON representation of the provenance, used in generating the
+   * build signature in the corresponding build note. After verifying the
+   * signature, `provenance_bytes` can be unmarshalled and compared to the
+   * provenance to confirm that it is unchanged. A base64-encoded string
+   * representation of the provenance bytes is used for the signature in order
+   * to interoperate with openssl which expects this format for signature
+   * verification.
+   * The serialized form is captured both to avoid ambiguity in how the
+   * provenance is marshalled to json as well to prevent incompatibilities with
+   * future changes.
+   * 
+ * + * string provenance_bytes = 2; + * @return The bytes for provenanceBytes. + */ + com.google.protobuf.ByteString + getProvenanceBytesBytes(); + + /** + *
+   * Deprecated. See InTotoStatement for the replacement.
+   * In-toto Provenance representation as defined in spec.
+   * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + * @return Whether the intotoProvenance field is set. + */ + boolean hasIntotoProvenance(); + /** + *
+   * Deprecated. See InTotoStatement for the replacement.
+   * In-toto Provenance representation as defined in spec.
+   * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + * @return The intotoProvenance. + */ + io.grafeas.v1.InTotoProvenance getIntotoProvenance(); + /** + *
+   * Deprecated. See InTotoStatement for the replacement.
+   * In-toto Provenance representation as defined in spec.
+   * 
+ * + * .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + io.grafeas.v1.InTotoProvenanceOrBuilder getIntotoProvenanceOrBuilder(); + + /** + *
+   * In-toto Statement representation as defined in spec.
+   * The intoto_statement can contain any type of provenance. The serialized
+   * payload of the statement can be stored and signed in the Occurrence's
+   * envelope.
+   * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + * @return Whether the intotoStatement field is set. + */ + boolean hasIntotoStatement(); + /** + *
+   * In-toto Statement representation as defined in spec.
+   * The intoto_statement can contain any type of provenance. The serialized
+   * payload of the statement can be stored and signed in the Occurrence's
+   * envelope.
+   * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + * @return The intotoStatement. + */ + io.grafeas.v1.InTotoStatement getIntotoStatement(); + /** + *
+   * In-toto Statement representation as defined in spec.
+   * The intoto_statement can contain any type of provenance. The serialized
+   * payload of the statement can be stored and signed in the Occurrence's
+   * envelope.
+   * 
+ * + * .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + io.grafeas.v1.InTotoStatementOrBuilder getIntotoStatementOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java new file mode 100644 index 000000000000..1359a5f8fcfb --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java @@ -0,0 +1,3554 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Provenance of a build. Contains all information needed to verify the full
+ * details about the build from source to completion.
+ * 
+ * + * Protobuf type {@code grafeas.v1.BuildProvenance} + */ +public final class BuildProvenance extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BuildProvenance) + BuildProvenanceOrBuilder { +private static final long serialVersionUID = 0L; + // Use BuildProvenance.newBuilder() to construct. + private BuildProvenance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BuildProvenance() { + id_ = ""; + projectId_ = ""; + commands_ = java.util.Collections.emptyList(); + builtArtifacts_ = java.util.Collections.emptyList(); + creator_ = ""; + logsUri_ = ""; + triggerId_ = ""; + builderVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BuildProvenance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 12: + return internalGetBuildOptions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuildProvenance.class, io.grafeas.v1.BuildProvenance.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * Required. Unique identifier of the build.
+   * 
+ * + * string id = 1; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * Required. Unique identifier of the build.
+   * 
+ * + * string id = 1; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + *
+   * ID of the project.
+   * 
+ * + * string project_id = 2; + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + *
+   * ID of the project.
+   * 
+ * + * string project_id = 2; + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMANDS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List commands_; + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + @java.lang.Override + public java.util.List getCommandsList() { + return commands_; + } + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + @java.lang.Override + public java.util.List + getCommandsOrBuilderList() { + return commands_; + } + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + @java.lang.Override + public int getCommandsCount() { + return commands_.size(); + } + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + @java.lang.Override + public io.grafeas.v1.Command getCommands(int index) { + return commands_.get(index); + } + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + @java.lang.Override + public io.grafeas.v1.CommandOrBuilder getCommandsOrBuilder( + int index) { + return commands_.get(index); + } + + public static final int BUILT_ARTIFACTS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List builtArtifacts_; + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + @java.lang.Override + public java.util.List getBuiltArtifactsList() { + return builtArtifacts_; + } + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + @java.lang.Override + public java.util.List + getBuiltArtifactsOrBuilderList() { + return builtArtifacts_; + } + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + @java.lang.Override + public int getBuiltArtifactsCount() { + return builtArtifacts_.size(); + } + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + @java.lang.Override + public io.grafeas.v1.Artifact getBuiltArtifacts(int index) { + return builtArtifacts_.get(index); + } + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + @java.lang.Override + public io.grafeas.v1.ArtifactOrBuilder getBuiltArtifactsOrBuilder( + int index) { + return builtArtifacts_.get(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Time at which the build was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Time at which the build was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Time at which the build was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int START_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp startTime_; + /** + *
+   * Time at which execution of the build was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6; + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + *
+   * Time at which execution of the build was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6; + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + *
+   * Time at which execution of the build was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Time at which execution of the build was finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Time at which execution of the build was finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Time at which execution of the build was finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int CREATOR_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object creator_ = ""; + /** + *
+   * E-mail address of the user who initiated this build. Note that this was the
+   * user's e-mail address at the time the build was initiated; this address may
+   * not represent the same end-user for all time.
+   * 
+ * + * string creator = 8; + * @return The creator. + */ + @java.lang.Override + public java.lang.String getCreator() { + java.lang.Object ref = creator_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + creator_ = s; + return s; + } + } + /** + *
+   * E-mail address of the user who initiated this build. Note that this was the
+   * user's e-mail address at the time the build was initiated; this address may
+   * not represent the same end-user for all time.
+   * 
+ * + * string creator = 8; + * @return The bytes for creator. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCreatorBytes() { + java.lang.Object ref = creator_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + creator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOGS_URI_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private volatile java.lang.Object logsUri_ = ""; + /** + *
+   * URI where any logs for this provenance were written.
+   * 
+ * + * string logs_uri = 9; + * @return The logsUri. + */ + @java.lang.Override + public java.lang.String getLogsUri() { + java.lang.Object ref = logsUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logsUri_ = s; + return s; + } + } + /** + *
+   * URI where any logs for this provenance were written.
+   * 
+ * + * string logs_uri = 9; + * @return The bytes for logsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLogsUriBytes() { + java.lang.Object ref = logsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_PROVENANCE_FIELD_NUMBER = 10; + private io.grafeas.v1.Source sourceProvenance_; + /** + *
+   * Details of the Source input to the build.
+   * 
+ * + * .grafeas.v1.Source source_provenance = 10; + * @return Whether the sourceProvenance field is set. + */ + @java.lang.Override + public boolean hasSourceProvenance() { + return sourceProvenance_ != null; + } + /** + *
+   * Details of the Source input to the build.
+   * 
+ * + * .grafeas.v1.Source source_provenance = 10; + * @return The sourceProvenance. + */ + @java.lang.Override + public io.grafeas.v1.Source getSourceProvenance() { + return sourceProvenance_ == null ? io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; + } + /** + *
+   * Details of the Source input to the build.
+   * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + @java.lang.Override + public io.grafeas.v1.SourceOrBuilder getSourceProvenanceOrBuilder() { + return sourceProvenance_ == null ? io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; + } + + public static final int TRIGGER_ID_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object triggerId_ = ""; + /** + *
+   * Trigger identifier if the build was triggered automatically; empty if not.
+   * 
+ * + * string trigger_id = 11; + * @return The triggerId. + */ + @java.lang.Override + public java.lang.String getTriggerId() { + java.lang.Object ref = triggerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + triggerId_ = s; + return s; + } + } + /** + *
+   * Trigger identifier if the build was triggered automatically; empty if not.
+   * 
+ * + * string trigger_id = 11; + * @return The bytes for triggerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTriggerIdBytes() { + java.lang.Object ref = triggerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + triggerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUILD_OPTIONS_FIELD_NUMBER = 12; + private static final class BuildOptionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> buildOptions_; + private com.google.protobuf.MapField + internalGetBuildOptions() { + if (buildOptions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BuildOptionsDefaultEntryHolder.defaultEntry); + } + return buildOptions_; + } + public int getBuildOptionsCount() { + return internalGetBuildOptions().getMap().size(); + } + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public boolean containsBuildOptions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetBuildOptions().getMap().containsKey(key); + } + /** + * Use {@link #getBuildOptionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBuildOptions() { + return getBuildOptionsMap(); + } + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public java.util.Map getBuildOptionsMap() { + return internalGetBuildOptions().getMap(); + } + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getBuildOptionsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetBuildOptions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public java.lang.String getBuildOptionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetBuildOptions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int BUILDER_VERSION_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private volatile java.lang.Object builderVersion_ = ""; + /** + *
+   * Version string of the builder at the time this build was executed.
+   * 
+ * + * string builder_version = 13; + * @return The builderVersion. + */ + @java.lang.Override + public java.lang.String getBuilderVersion() { + java.lang.Object ref = builderVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + builderVersion_ = s; + return s; + } + } + /** + *
+   * Version string of the builder at the time this build was executed.
+   * 
+ * + * string builder_version = 13; + * @return The bytes for builderVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBuilderVersionBytes() { + java.lang.Object ref = builderVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + builderVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + for (int i = 0; i < commands_.size(); i++) { + output.writeMessage(3, commands_.get(i)); + } + for (int i = 0; i < builtArtifacts_.size(); i++) { + output.writeMessage(4, builtArtifacts_.get(i)); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (startTime_ != null) { + output.writeMessage(6, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(7, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, creator_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, logsUri_); + } + if (sourceProvenance_ != null) { + output.writeMessage(10, getSourceProvenance()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, triggerId_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetBuildOptions(), + BuildOptionsDefaultEntryHolder.defaultEntry, + 12); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, builderVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + for (int i = 0; i < commands_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, commands_.get(i)); + } + for (int i = 0; i < builtArtifacts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, builtArtifacts_.get(i)); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getCreateTime()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, creator_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, logsUri_); + } + if (sourceProvenance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getSourceProvenance()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, triggerId_); + } + for (java.util.Map.Entry entry + : internalGetBuildOptions().getMap().entrySet()) { + com.google.protobuf.MapEntry + buildOptions__ = BuildOptionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, buildOptions__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, builderVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BuildProvenance)) { + return super.equals(obj); + } + io.grafeas.v1.BuildProvenance other = (io.grafeas.v1.BuildProvenance) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getProjectId() + .equals(other.getProjectId())) return false; + if (!getCommandsList() + .equals(other.getCommandsList())) return false; + if (!getBuiltArtifactsList() + .equals(other.getBuiltArtifactsList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime() + .equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (!getCreator() + .equals(other.getCreator())) return false; + if (!getLogsUri() + .equals(other.getLogsUri())) return false; + if (hasSourceProvenance() != other.hasSourceProvenance()) return false; + if (hasSourceProvenance()) { + if (!getSourceProvenance() + .equals(other.getSourceProvenance())) return false; + } + if (!getTriggerId() + .equals(other.getTriggerId())) return false; + if (!internalGetBuildOptions().equals( + other.internalGetBuildOptions())) return false; + if (!getBuilderVersion() + .equals(other.getBuilderVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + if (getCommandsCount() > 0) { + hash = (37 * hash) + COMMANDS_FIELD_NUMBER; + hash = (53 * hash) + getCommandsList().hashCode(); + } + if (getBuiltArtifactsCount() > 0) { + hash = (37 * hash) + BUILT_ARTIFACTS_FIELD_NUMBER; + hash = (53 * hash) + getBuiltArtifactsList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + CREATOR_FIELD_NUMBER; + hash = (53 * hash) + getCreator().hashCode(); + hash = (37 * hash) + LOGS_URI_FIELD_NUMBER; + hash = (53 * hash) + getLogsUri().hashCode(); + if (hasSourceProvenance()) { + hash = (37 * hash) + SOURCE_PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getSourceProvenance().hashCode(); + } + hash = (37 * hash) + TRIGGER_ID_FIELD_NUMBER; + hash = (53 * hash) + getTriggerId().hashCode(); + if (!internalGetBuildOptions().getMap().isEmpty()) { + hash = (37 * hash) + BUILD_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetBuildOptions().hashCode(); + } + hash = (37 * hash) + BUILDER_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getBuilderVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BuildProvenance parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildProvenance parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildProvenance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildProvenance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildProvenance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuildProvenance parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuildProvenance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildProvenance parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuildProvenance parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildProvenance parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuildProvenance parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuildProvenance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BuildProvenance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Provenance of a build. Contains all information needed to verify the full
+   * details about the build from source to completion.
+   * 
+ * + * Protobuf type {@code grafeas.v1.BuildProvenance} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BuildProvenance) + io.grafeas.v1.BuildProvenanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 12: + return internalGetBuildOptions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 12: + return internalGetMutableBuildOptions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuildProvenance.class, io.grafeas.v1.BuildProvenance.Builder.class); + } + + // Construct using io.grafeas.v1.BuildProvenance.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + projectId_ = ""; + if (commandsBuilder_ == null) { + commands_ = java.util.Collections.emptyList(); + } else { + commands_ = null; + commandsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (builtArtifactsBuilder_ == null) { + builtArtifacts_ = java.util.Collections.emptyList(); + } else { + builtArtifacts_ = null; + builtArtifactsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + creator_ = ""; + logsUri_ = ""; + sourceProvenance_ = null; + if (sourceProvenanceBuilder_ != null) { + sourceProvenanceBuilder_.dispose(); + sourceProvenanceBuilder_ = null; + } + triggerId_ = ""; + internalGetMutableBuildOptions().clear(); + builderVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BuildProvenance getDefaultInstanceForType() { + return io.grafeas.v1.BuildProvenance.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BuildProvenance build() { + io.grafeas.v1.BuildProvenance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BuildProvenance buildPartial() { + io.grafeas.v1.BuildProvenance result = new io.grafeas.v1.BuildProvenance(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.BuildProvenance result) { + if (commandsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + commands_ = java.util.Collections.unmodifiableList(commands_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.commands_ = commands_; + } else { + result.commands_ = commandsBuilder_.build(); + } + if (builtArtifactsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + builtArtifacts_ = java.util.Collections.unmodifiableList(builtArtifacts_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.builtArtifacts_ = builtArtifacts_; + } else { + result.builtArtifacts_ = builtArtifactsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.BuildProvenance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.startTime_ = startTimeBuilder_ == null + ? startTime_ + : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.creator_ = creator_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.logsUri_ = logsUri_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.sourceProvenance_ = sourceProvenanceBuilder_ == null + ? sourceProvenance_ + : sourceProvenanceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.triggerId_ = triggerId_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.buildOptions_ = internalGetBuildOptions(); + result.buildOptions_.makeImmutable(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.builderVersion_ = builderVersion_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BuildProvenance) { + return mergeFrom((io.grafeas.v1.BuildProvenance)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BuildProvenance other) { + if (other == io.grafeas.v1.BuildProvenance.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (commandsBuilder_ == null) { + if (!other.commands_.isEmpty()) { + if (commands_.isEmpty()) { + commands_ = other.commands_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureCommandsIsMutable(); + commands_.addAll(other.commands_); + } + onChanged(); + } + } else { + if (!other.commands_.isEmpty()) { + if (commandsBuilder_.isEmpty()) { + commandsBuilder_.dispose(); + commandsBuilder_ = null; + commands_ = other.commands_; + bitField0_ = (bitField0_ & ~0x00000004); + commandsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCommandsFieldBuilder() : null; + } else { + commandsBuilder_.addAllMessages(other.commands_); + } + } + } + if (builtArtifactsBuilder_ == null) { + if (!other.builtArtifacts_.isEmpty()) { + if (builtArtifacts_.isEmpty()) { + builtArtifacts_ = other.builtArtifacts_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.addAll(other.builtArtifacts_); + } + onChanged(); + } + } else { + if (!other.builtArtifacts_.isEmpty()) { + if (builtArtifactsBuilder_.isEmpty()) { + builtArtifactsBuilder_.dispose(); + builtArtifactsBuilder_ = null; + builtArtifacts_ = other.builtArtifacts_; + bitField0_ = (bitField0_ & ~0x00000008); + builtArtifactsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBuiltArtifactsFieldBuilder() : null; + } else { + builtArtifactsBuilder_.addAllMessages(other.builtArtifacts_); + } + } + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getCreator().isEmpty()) { + creator_ = other.creator_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getLogsUri().isEmpty()) { + logsUri_ = other.logsUri_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasSourceProvenance()) { + mergeSourceProvenance(other.getSourceProvenance()); + } + if (!other.getTriggerId().isEmpty()) { + triggerId_ = other.triggerId_; + bitField0_ |= 0x00000400; + onChanged(); + } + internalGetMutableBuildOptions().mergeFrom( + other.internalGetBuildOptions()); + bitField0_ |= 0x00000800; + if (!other.getBuilderVersion().isEmpty()) { + builderVersion_ = other.builderVersion_; + bitField0_ |= 0x00001000; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + io.grafeas.v1.Command m = + input.readMessage( + io.grafeas.v1.Command.parser(), + extensionRegistry); + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + commands_.add(m); + } else { + commandsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: { + io.grafeas.v1.Artifact m = + input.readMessage( + io.grafeas.v1.Artifact.parser(), + extensionRegistry); + if (builtArtifactsBuilder_ == null) { + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.add(m); + } else { + builtArtifactsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getStartTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + creator_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + logsUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: { + input.readMessage( + getSourceProvenanceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: { + triggerId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: { + com.google.protobuf.MapEntry + buildOptions__ = input.readMessage( + BuildOptionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableBuildOptions().getMutableMap().put( + buildOptions__.getKey(), buildOptions__.getValue()); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: { + builderVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * Required. Unique identifier of the build.
+     * 
+ * + * string id = 1; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Unique identifier of the build.
+     * 
+ * + * string id = 1; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Unique identifier of the build.
+     * 
+ * + * string id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. Unique identifier of the build.
+     * 
+ * + * string id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. Unique identifier of the build.
+     * 
+ * + * string id = 1; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + *
+     * ID of the project.
+     * 
+ * + * string project_id = 2; + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * ID of the project.
+     * 
+ * + * string project_id = 2; + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * ID of the project.
+     * 
+ * + * string project_id = 2; + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * ID of the project.
+     * 
+ * + * string project_id = 2; + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * ID of the project.
+     * 
+ * + * string project_id = 2; + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List commands_ = + java.util.Collections.emptyList(); + private void ensureCommandsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + commands_ = new java.util.ArrayList(commands_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Command, io.grafeas.v1.Command.Builder, io.grafeas.v1.CommandOrBuilder> commandsBuilder_; + + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public java.util.List getCommandsList() { + if (commandsBuilder_ == null) { + return java.util.Collections.unmodifiableList(commands_); + } else { + return commandsBuilder_.getMessageList(); + } + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public int getCommandsCount() { + if (commandsBuilder_ == null) { + return commands_.size(); + } else { + return commandsBuilder_.getCount(); + } + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public io.grafeas.v1.Command getCommands(int index) { + if (commandsBuilder_ == null) { + return commands_.get(index); + } else { + return commandsBuilder_.getMessage(index); + } + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder setCommands( + int index, io.grafeas.v1.Command value) { + if (commandsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandsIsMutable(); + commands_.set(index, value); + onChanged(); + } else { + commandsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder setCommands( + int index, io.grafeas.v1.Command.Builder builderForValue) { + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + commands_.set(index, builderForValue.build()); + onChanged(); + } else { + commandsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder addCommands(io.grafeas.v1.Command value) { + if (commandsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandsIsMutable(); + commands_.add(value); + onChanged(); + } else { + commandsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder addCommands( + int index, io.grafeas.v1.Command value) { + if (commandsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandsIsMutable(); + commands_.add(index, value); + onChanged(); + } else { + commandsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder addCommands( + io.grafeas.v1.Command.Builder builderForValue) { + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + commands_.add(builderForValue.build()); + onChanged(); + } else { + commandsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder addCommands( + int index, io.grafeas.v1.Command.Builder builderForValue) { + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + commands_.add(index, builderForValue.build()); + onChanged(); + } else { + commandsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder addAllCommands( + java.lang.Iterable values) { + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, commands_); + onChanged(); + } else { + commandsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder clearCommands() { + if (commandsBuilder_ == null) { + commands_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + commandsBuilder_.clear(); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public Builder removeCommands(int index) { + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + commands_.remove(index); + onChanged(); + } else { + commandsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public io.grafeas.v1.Command.Builder getCommandsBuilder( + int index) { + return getCommandsFieldBuilder().getBuilder(index); + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public io.grafeas.v1.CommandOrBuilder getCommandsOrBuilder( + int index) { + if (commandsBuilder_ == null) { + return commands_.get(index); } else { + return commandsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public java.util.List + getCommandsOrBuilderList() { + if (commandsBuilder_ != null) { + return commandsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(commands_); + } + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public io.grafeas.v1.Command.Builder addCommandsBuilder() { + return getCommandsFieldBuilder().addBuilder( + io.grafeas.v1.Command.getDefaultInstance()); + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public io.grafeas.v1.Command.Builder addCommandsBuilder( + int index) { + return getCommandsFieldBuilder().addBuilder( + index, io.grafeas.v1.Command.getDefaultInstance()); + } + /** + *
+     * Commands requested by the build.
+     * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + public java.util.List + getCommandsBuilderList() { + return getCommandsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Command, io.grafeas.v1.Command.Builder, io.grafeas.v1.CommandOrBuilder> + getCommandsFieldBuilder() { + if (commandsBuilder_ == null) { + commandsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Command, io.grafeas.v1.Command.Builder, io.grafeas.v1.CommandOrBuilder>( + commands_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + commands_ = null; + } + return commandsBuilder_; + } + + private java.util.List builtArtifacts_ = + java.util.Collections.emptyList(); + private void ensureBuiltArtifactsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + builtArtifacts_ = new java.util.ArrayList(builtArtifacts_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Artifact, io.grafeas.v1.Artifact.Builder, io.grafeas.v1.ArtifactOrBuilder> builtArtifactsBuilder_; + + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public java.util.List getBuiltArtifactsList() { + if (builtArtifactsBuilder_ == null) { + return java.util.Collections.unmodifiableList(builtArtifacts_); + } else { + return builtArtifactsBuilder_.getMessageList(); + } + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public int getBuiltArtifactsCount() { + if (builtArtifactsBuilder_ == null) { + return builtArtifacts_.size(); + } else { + return builtArtifactsBuilder_.getCount(); + } + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public io.grafeas.v1.Artifact getBuiltArtifacts(int index) { + if (builtArtifactsBuilder_ == null) { + return builtArtifacts_.get(index); + } else { + return builtArtifactsBuilder_.getMessage(index); + } + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder setBuiltArtifacts( + int index, io.grafeas.v1.Artifact value) { + if (builtArtifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.set(index, value); + onChanged(); + } else { + builtArtifactsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder setBuiltArtifacts( + int index, io.grafeas.v1.Artifact.Builder builderForValue) { + if (builtArtifactsBuilder_ == null) { + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.set(index, builderForValue.build()); + onChanged(); + } else { + builtArtifactsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder addBuiltArtifacts(io.grafeas.v1.Artifact value) { + if (builtArtifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.add(value); + onChanged(); + } else { + builtArtifactsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder addBuiltArtifacts( + int index, io.grafeas.v1.Artifact value) { + if (builtArtifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.add(index, value); + onChanged(); + } else { + builtArtifactsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder addBuiltArtifacts( + io.grafeas.v1.Artifact.Builder builderForValue) { + if (builtArtifactsBuilder_ == null) { + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.add(builderForValue.build()); + onChanged(); + } else { + builtArtifactsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder addBuiltArtifacts( + int index, io.grafeas.v1.Artifact.Builder builderForValue) { + if (builtArtifactsBuilder_ == null) { + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.add(index, builderForValue.build()); + onChanged(); + } else { + builtArtifactsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder addAllBuiltArtifacts( + java.lang.Iterable values) { + if (builtArtifactsBuilder_ == null) { + ensureBuiltArtifactsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, builtArtifacts_); + onChanged(); + } else { + builtArtifactsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder clearBuiltArtifacts() { + if (builtArtifactsBuilder_ == null) { + builtArtifacts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + builtArtifactsBuilder_.clear(); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public Builder removeBuiltArtifacts(int index) { + if (builtArtifactsBuilder_ == null) { + ensureBuiltArtifactsIsMutable(); + builtArtifacts_.remove(index); + onChanged(); + } else { + builtArtifactsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public io.grafeas.v1.Artifact.Builder getBuiltArtifactsBuilder( + int index) { + return getBuiltArtifactsFieldBuilder().getBuilder(index); + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public io.grafeas.v1.ArtifactOrBuilder getBuiltArtifactsOrBuilder( + int index) { + if (builtArtifactsBuilder_ == null) { + return builtArtifacts_.get(index); } else { + return builtArtifactsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public java.util.List + getBuiltArtifactsOrBuilderList() { + if (builtArtifactsBuilder_ != null) { + return builtArtifactsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(builtArtifacts_); + } + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public io.grafeas.v1.Artifact.Builder addBuiltArtifactsBuilder() { + return getBuiltArtifactsFieldBuilder().addBuilder( + io.grafeas.v1.Artifact.getDefaultInstance()); + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public io.grafeas.v1.Artifact.Builder addBuiltArtifactsBuilder( + int index) { + return getBuiltArtifactsFieldBuilder().addBuilder( + index, io.grafeas.v1.Artifact.getDefaultInstance()); + } + /** + *
+     * Output of the build.
+     * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + public java.util.List + getBuiltArtifactsBuilderList() { + return getBuiltArtifactsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Artifact, io.grafeas.v1.Artifact.Builder, io.grafeas.v1.ArtifactOrBuilder> + getBuiltArtifactsFieldBuilder() { + if (builtArtifactsBuilder_ == null) { + builtArtifactsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Artifact, io.grafeas.v1.Artifact.Builder, io.grafeas.v1.ArtifactOrBuilder>( + builtArtifacts_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + builtArtifacts_ = null; + } + return builtArtifactsBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Time at which the build was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + public Builder setStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + startTime_ != null && + startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000020); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + *
+     * Time at which execution of the build was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getStartTime(), + getParentForChildren(), + isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000040); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Time at which execution of the build was finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object creator_ = ""; + /** + *
+     * E-mail address of the user who initiated this build. Note that this was the
+     * user's e-mail address at the time the build was initiated; this address may
+     * not represent the same end-user for all time.
+     * 
+ * + * string creator = 8; + * @return The creator. + */ + public java.lang.String getCreator() { + java.lang.Object ref = creator_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + creator_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * E-mail address of the user who initiated this build. Note that this was the
+     * user's e-mail address at the time the build was initiated; this address may
+     * not represent the same end-user for all time.
+     * 
+ * + * string creator = 8; + * @return The bytes for creator. + */ + public com.google.protobuf.ByteString + getCreatorBytes() { + java.lang.Object ref = creator_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + creator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * E-mail address of the user who initiated this build. Note that this was the
+     * user's e-mail address at the time the build was initiated; this address may
+     * not represent the same end-user for all time.
+     * 
+ * + * string creator = 8; + * @param value The creator to set. + * @return This builder for chaining. + */ + public Builder setCreator( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + creator_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * E-mail address of the user who initiated this build. Note that this was the
+     * user's e-mail address at the time the build was initiated; this address may
+     * not represent the same end-user for all time.
+     * 
+ * + * string creator = 8; + * @return This builder for chaining. + */ + public Builder clearCreator() { + creator_ = getDefaultInstance().getCreator(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + *
+     * E-mail address of the user who initiated this build. Note that this was the
+     * user's e-mail address at the time the build was initiated; this address may
+     * not represent the same end-user for all time.
+     * 
+ * + * string creator = 8; + * @param value The bytes for creator to set. + * @return This builder for chaining. + */ + public Builder setCreatorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + creator_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object logsUri_ = ""; + /** + *
+     * URI where any logs for this provenance were written.
+     * 
+ * + * string logs_uri = 9; + * @return The logsUri. + */ + public java.lang.String getLogsUri() { + java.lang.Object ref = logsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * URI where any logs for this provenance were written.
+     * 
+ * + * string logs_uri = 9; + * @return The bytes for logsUri. + */ + public com.google.protobuf.ByteString + getLogsUriBytes() { + java.lang.Object ref = logsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * URI where any logs for this provenance were written.
+     * 
+ * + * string logs_uri = 9; + * @param value The logsUri to set. + * @return This builder for chaining. + */ + public Builder setLogsUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + logsUri_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * URI where any logs for this provenance were written.
+     * 
+ * + * string logs_uri = 9; + * @return This builder for chaining. + */ + public Builder clearLogsUri() { + logsUri_ = getDefaultInstance().getLogsUri(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * URI where any logs for this provenance were written.
+     * 
+ * + * string logs_uri = 9; + * @param value The bytes for logsUri to set. + * @return This builder for chaining. + */ + public Builder setLogsUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + logsUri_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private io.grafeas.v1.Source sourceProvenance_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Source, io.grafeas.v1.Source.Builder, io.grafeas.v1.SourceOrBuilder> sourceProvenanceBuilder_; + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + * @return Whether the sourceProvenance field is set. + */ + public boolean hasSourceProvenance() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + * @return The sourceProvenance. + */ + public io.grafeas.v1.Source getSourceProvenance() { + if (sourceProvenanceBuilder_ == null) { + return sourceProvenance_ == null ? io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; + } else { + return sourceProvenanceBuilder_.getMessage(); + } + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + public Builder setSourceProvenance(io.grafeas.v1.Source value) { + if (sourceProvenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceProvenance_ = value; + } else { + sourceProvenanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + public Builder setSourceProvenance( + io.grafeas.v1.Source.Builder builderForValue) { + if (sourceProvenanceBuilder_ == null) { + sourceProvenance_ = builderForValue.build(); + } else { + sourceProvenanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + public Builder mergeSourceProvenance(io.grafeas.v1.Source value) { + if (sourceProvenanceBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) && + sourceProvenance_ != null && + sourceProvenance_ != io.grafeas.v1.Source.getDefaultInstance()) { + getSourceProvenanceBuilder().mergeFrom(value); + } else { + sourceProvenance_ = value; + } + } else { + sourceProvenanceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + public Builder clearSourceProvenance() { + bitField0_ = (bitField0_ & ~0x00000200); + sourceProvenance_ = null; + if (sourceProvenanceBuilder_ != null) { + sourceProvenanceBuilder_.dispose(); + sourceProvenanceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + public io.grafeas.v1.Source.Builder getSourceProvenanceBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getSourceProvenanceFieldBuilder().getBuilder(); + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + public io.grafeas.v1.SourceOrBuilder getSourceProvenanceOrBuilder() { + if (sourceProvenanceBuilder_ != null) { + return sourceProvenanceBuilder_.getMessageOrBuilder(); + } else { + return sourceProvenance_ == null ? + io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; + } + } + /** + *
+     * Details of the Source input to the build.
+     * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Source, io.grafeas.v1.Source.Builder, io.grafeas.v1.SourceOrBuilder> + getSourceProvenanceFieldBuilder() { + if (sourceProvenanceBuilder_ == null) { + sourceProvenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Source, io.grafeas.v1.Source.Builder, io.grafeas.v1.SourceOrBuilder>( + getSourceProvenance(), + getParentForChildren(), + isClean()); + sourceProvenance_ = null; + } + return sourceProvenanceBuilder_; + } + + private java.lang.Object triggerId_ = ""; + /** + *
+     * Trigger identifier if the build was triggered automatically; empty if not.
+     * 
+ * + * string trigger_id = 11; + * @return The triggerId. + */ + public java.lang.String getTriggerId() { + java.lang.Object ref = triggerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + triggerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Trigger identifier if the build was triggered automatically; empty if not.
+     * 
+ * + * string trigger_id = 11; + * @return The bytes for triggerId. + */ + public com.google.protobuf.ByteString + getTriggerIdBytes() { + java.lang.Object ref = triggerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + triggerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Trigger identifier if the build was triggered automatically; empty if not.
+     * 
+ * + * string trigger_id = 11; + * @param value The triggerId to set. + * @return This builder for chaining. + */ + public Builder setTriggerId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + triggerId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * Trigger identifier if the build was triggered automatically; empty if not.
+     * 
+ * + * string trigger_id = 11; + * @return This builder for chaining. + */ + public Builder clearTriggerId() { + triggerId_ = getDefaultInstance().getTriggerId(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + *
+     * Trigger identifier if the build was triggered automatically; empty if not.
+     * 
+ * + * string trigger_id = 11; + * @param value The bytes for triggerId to set. + * @return This builder for chaining. + */ + public Builder setTriggerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + triggerId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> buildOptions_; + private com.google.protobuf.MapField + internalGetBuildOptions() { + if (buildOptions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BuildOptionsDefaultEntryHolder.defaultEntry); + } + return buildOptions_; + } + private com.google.protobuf.MapField + internalGetMutableBuildOptions() { + if (buildOptions_ == null) { + buildOptions_ = com.google.protobuf.MapField.newMapField( + BuildOptionsDefaultEntryHolder.defaultEntry); + } + if (!buildOptions_.isMutable()) { + buildOptions_ = buildOptions_.copy(); + } + bitField0_ |= 0x00000800; + onChanged(); + return buildOptions_; + } + public int getBuildOptionsCount() { + return internalGetBuildOptions().getMap().size(); + } + /** + *
+     * Special options applied to this build. This is a catch-all field where
+     * build providers can enter any desired additional details.
+     * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public boolean containsBuildOptions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetBuildOptions().getMap().containsKey(key); + } + /** + * Use {@link #getBuildOptionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBuildOptions() { + return getBuildOptionsMap(); + } + /** + *
+     * Special options applied to this build. This is a catch-all field where
+     * build providers can enter any desired additional details.
+     * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public java.util.Map getBuildOptionsMap() { + return internalGetBuildOptions().getMap(); + } + /** + *
+     * Special options applied to this build. This is a catch-all field where
+     * build providers can enter any desired additional details.
+     * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getBuildOptionsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetBuildOptions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Special options applied to this build. This is a catch-all field where
+     * build providers can enter any desired additional details.
+     * 
+ * + * map<string, string> build_options = 12; + */ + @java.lang.Override + public java.lang.String getBuildOptionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetBuildOptions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearBuildOptions() { + bitField0_ = (bitField0_ & ~0x00000800); + internalGetMutableBuildOptions().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Special options applied to this build. This is a catch-all field where
+     * build providers can enter any desired additional details.
+     * 
+ * + * map<string, string> build_options = 12; + */ + public Builder removeBuildOptions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableBuildOptions().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableBuildOptions() { + bitField0_ |= 0x00000800; + return internalGetMutableBuildOptions().getMutableMap(); + } + /** + *
+     * Special options applied to this build. This is a catch-all field where
+     * build providers can enter any desired additional details.
+     * 
+ * + * map<string, string> build_options = 12; + */ + public Builder putBuildOptions( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableBuildOptions().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000800; + return this; + } + /** + *
+     * Special options applied to this build. This is a catch-all field where
+     * build providers can enter any desired additional details.
+     * 
+ * + * map<string, string> build_options = 12; + */ + public Builder putAllBuildOptions( + java.util.Map values) { + internalGetMutableBuildOptions().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000800; + return this; + } + + private java.lang.Object builderVersion_ = ""; + /** + *
+     * Version string of the builder at the time this build was executed.
+     * 
+ * + * string builder_version = 13; + * @return The builderVersion. + */ + public java.lang.String getBuilderVersion() { + java.lang.Object ref = builderVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + builderVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Version string of the builder at the time this build was executed.
+     * 
+ * + * string builder_version = 13; + * @return The bytes for builderVersion. + */ + public com.google.protobuf.ByteString + getBuilderVersionBytes() { + java.lang.Object ref = builderVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + builderVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Version string of the builder at the time this build was executed.
+     * 
+ * + * string builder_version = 13; + * @param value The builderVersion to set. + * @return This builder for chaining. + */ + public Builder setBuilderVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + builderVersion_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * Version string of the builder at the time this build was executed.
+     * 
+ * + * string builder_version = 13; + * @return This builder for chaining. + */ + public Builder clearBuilderVersion() { + builderVersion_ = getDefaultInstance().getBuilderVersion(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + *
+     * Version string of the builder at the time this build was executed.
+     * 
+ * + * string builder_version = 13; + * @param value The bytes for builderVersion to set. + * @return This builder for chaining. + */ + public Builder setBuilderVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + builderVersion_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BuildProvenance) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BuildProvenance) + private static final io.grafeas.v1.BuildProvenance DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BuildProvenance(); + } + + public static io.grafeas.v1.BuildProvenance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BuildProvenance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BuildProvenance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java new file mode 100644 index 000000000000..9ee96a48e05b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java @@ -0,0 +1,388 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface BuildProvenanceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BuildProvenance) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Unique identifier of the build.
+   * 
+ * + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * Required. Unique identifier of the build.
+   * 
+ * + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * ID of the project.
+   * 
+ * + * string project_id = 2; + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + *
+   * ID of the project.
+   * 
+ * + * string project_id = 2; + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString + getProjectIdBytes(); + + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + java.util.List + getCommandsList(); + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + io.grafeas.v1.Command getCommands(int index); + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + int getCommandsCount(); + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + java.util.List + getCommandsOrBuilderList(); + /** + *
+   * Commands requested by the build.
+   * 
+ * + * repeated .grafeas.v1.Command commands = 3; + */ + io.grafeas.v1.CommandOrBuilder getCommandsOrBuilder( + int index); + + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + java.util.List + getBuiltArtifactsList(); + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + io.grafeas.v1.Artifact getBuiltArtifacts(int index); + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + int getBuiltArtifactsCount(); + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + java.util.List + getBuiltArtifactsOrBuilderList(); + /** + *
+   * Output of the build.
+   * 
+ * + * repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + io.grafeas.v1.ArtifactOrBuilder getBuiltArtifactsOrBuilder( + int index); + + /** + *
+   * Time at which the build was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Time at which the build was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Time at which the build was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Time at which execution of the build was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6; + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + *
+   * Time at which execution of the build was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6; + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + *
+   * Time at which execution of the build was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + *
+   * Time at which execution of the build was finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Time at which execution of the build was finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Time at which execution of the build was finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * E-mail address of the user who initiated this build. Note that this was the
+   * user's e-mail address at the time the build was initiated; this address may
+   * not represent the same end-user for all time.
+   * 
+ * + * string creator = 8; + * @return The creator. + */ + java.lang.String getCreator(); + /** + *
+   * E-mail address of the user who initiated this build. Note that this was the
+   * user's e-mail address at the time the build was initiated; this address may
+   * not represent the same end-user for all time.
+   * 
+ * + * string creator = 8; + * @return The bytes for creator. + */ + com.google.protobuf.ByteString + getCreatorBytes(); + + /** + *
+   * URI where any logs for this provenance were written.
+   * 
+ * + * string logs_uri = 9; + * @return The logsUri. + */ + java.lang.String getLogsUri(); + /** + *
+   * URI where any logs for this provenance were written.
+   * 
+ * + * string logs_uri = 9; + * @return The bytes for logsUri. + */ + com.google.protobuf.ByteString + getLogsUriBytes(); + + /** + *
+   * Details of the Source input to the build.
+   * 
+ * + * .grafeas.v1.Source source_provenance = 10; + * @return Whether the sourceProvenance field is set. + */ + boolean hasSourceProvenance(); + /** + *
+   * Details of the Source input to the build.
+   * 
+ * + * .grafeas.v1.Source source_provenance = 10; + * @return The sourceProvenance. + */ + io.grafeas.v1.Source getSourceProvenance(); + /** + *
+   * Details of the Source input to the build.
+   * 
+ * + * .grafeas.v1.Source source_provenance = 10; + */ + io.grafeas.v1.SourceOrBuilder getSourceProvenanceOrBuilder(); + + /** + *
+   * Trigger identifier if the build was triggered automatically; empty if not.
+   * 
+ * + * string trigger_id = 11; + * @return The triggerId. + */ + java.lang.String getTriggerId(); + /** + *
+   * Trigger identifier if the build was triggered automatically; empty if not.
+   * 
+ * + * string trigger_id = 11; + * @return The bytes for triggerId. + */ + com.google.protobuf.ByteString + getTriggerIdBytes(); + + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + int getBuildOptionsCount(); + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + boolean containsBuildOptions( + java.lang.String key); + /** + * Use {@link #getBuildOptionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getBuildOptions(); + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + java.util.Map + getBuildOptionsMap(); + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + /* nullable */ +java.lang.String getBuildOptionsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Special options applied to this build. This is a catch-all field where
+   * build providers can enter any desired additional details.
+   * 
+ * + * map<string, string> build_options = 12; + */ + java.lang.String getBuildOptionsOrThrow( + java.lang.String key); + + /** + *
+   * Version string of the builder at the time this build was executed.
+   * 
+ * + * string builder_version = 13; + * @return The builderVersion. + */ + java.lang.String getBuilderVersion(); + /** + *
+   * Version string of the builder at the time this build was executed.
+   * 
+ * + * string builder_version = 13; + * @return The bytes for builderVersion. + */ + com.google.protobuf.ByteString + getBuilderVersionBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java new file mode 100644 index 000000000000..0d9adb96567b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java @@ -0,0 +1,544 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.BuilderConfig} + */ +public final class BuilderConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.BuilderConfig) + BuilderConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use BuilderConfig.newBuilder() to construct. + private BuilderConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BuilderConfig() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BuilderConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuilderConfig.class, io.grafeas.v1.BuilderConfig.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.BuilderConfig)) { + return super.equals(obj); + } + io.grafeas.v1.BuilderConfig other = (io.grafeas.v1.BuilderConfig) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.BuilderConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuilderConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuilderConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuilderConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuilderConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.BuilderConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.BuilderConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuilderConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuilderConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuilderConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.BuilderConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.BuilderConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.BuilderConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.BuilderConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.BuilderConfig) + io.grafeas.v1.BuilderConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.BuilderConfig.class, io.grafeas.v1.BuilderConfig.Builder.class); + } + + // Construct using io.grafeas.v1.BuilderConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.BuilderConfig getDefaultInstanceForType() { + return io.grafeas.v1.BuilderConfig.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.BuilderConfig build() { + io.grafeas.v1.BuilderConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.BuilderConfig buildPartial() { + io.grafeas.v1.BuilderConfig result = new io.grafeas.v1.BuilderConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.BuilderConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.BuilderConfig) { + return mergeFrom((io.grafeas.v1.BuilderConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.BuilderConfig other) { + if (other == io.grafeas.v1.BuilderConfig.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.BuilderConfig) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.BuilderConfig) + private static final io.grafeas.v1.BuilderConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.BuilderConfig(); + } + + public static io.grafeas.v1.BuilderConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BuilderConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.BuilderConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java new file mode 100644 index 000000000000..99554d4313c0 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +public interface BuilderConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.BuilderConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java new file mode 100644 index 000000000000..e426740de2e1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java @@ -0,0 +1,2394 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/cvss.proto + +package io.grafeas.v1; + +/** + *
+ * Common Vulnerability Scoring System.
+ * For details, see https://www.first.org/cvss/specification-document
+ * This is a message we will try to use for storing various versions of CVSS
+ * rather than making a separate proto for storing a specific version.
+ * 
+ * + * Protobuf type {@code grafeas.v1.CVSS} + */ +public final class CVSS extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.CVSS) + CVSSOrBuilder { +private static final long serialVersionUID = 0L; + // Use CVSS.newBuilder() to construct. + private CVSS(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CVSS() { + attackVector_ = 0; + attackComplexity_ = 0; + authentication_ = 0; + privilegesRequired_ = 0; + userInteraction_ = 0; + scope_ = 0; + confidentialityImpact_ = 0; + integrityImpact_ = 0; + availabilityImpact_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CVSS(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CVSS.class, io.grafeas.v1.CVSS.Builder.class); + } + + /** + * Protobuf enum {@code grafeas.v1.CVSS.AttackVector} + */ + public enum AttackVector + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ATTACK_VECTOR_UNSPECIFIED = 0; + */ + ATTACK_VECTOR_UNSPECIFIED(0), + /** + * ATTACK_VECTOR_NETWORK = 1; + */ + ATTACK_VECTOR_NETWORK(1), + /** + * ATTACK_VECTOR_ADJACENT = 2; + */ + ATTACK_VECTOR_ADJACENT(2), + /** + * ATTACK_VECTOR_LOCAL = 3; + */ + ATTACK_VECTOR_LOCAL(3), + /** + * ATTACK_VECTOR_PHYSICAL = 4; + */ + ATTACK_VECTOR_PHYSICAL(4), + UNRECOGNIZED(-1), + ; + + /** + * ATTACK_VECTOR_UNSPECIFIED = 0; + */ + public static final int ATTACK_VECTOR_UNSPECIFIED_VALUE = 0; + /** + * ATTACK_VECTOR_NETWORK = 1; + */ + public static final int ATTACK_VECTOR_NETWORK_VALUE = 1; + /** + * ATTACK_VECTOR_ADJACENT = 2; + */ + public static final int ATTACK_VECTOR_ADJACENT_VALUE = 2; + /** + * ATTACK_VECTOR_LOCAL = 3; + */ + public static final int ATTACK_VECTOR_LOCAL_VALUE = 3; + /** + * ATTACK_VECTOR_PHYSICAL = 4; + */ + public static final int ATTACK_VECTOR_PHYSICAL_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AttackVector valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AttackVector forNumber(int value) { + switch (value) { + case 0: return ATTACK_VECTOR_UNSPECIFIED; + case 1: return ATTACK_VECTOR_NETWORK; + case 2: return ATTACK_VECTOR_ADJACENT; + case 3: return ATTACK_VECTOR_LOCAL; + case 4: return ATTACK_VECTOR_PHYSICAL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AttackVector> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AttackVector findValueByNumber(int number) { + return AttackVector.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(0); + } + + private static final AttackVector[] VALUES = values(); + + public static AttackVector valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AttackVector(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.AttackVector) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSS.AttackComplexity} + */ + public enum AttackComplexity + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + ATTACK_COMPLEXITY_UNSPECIFIED(0), + /** + * ATTACK_COMPLEXITY_LOW = 1; + */ + ATTACK_COMPLEXITY_LOW(1), + /** + * ATTACK_COMPLEXITY_HIGH = 2; + */ + ATTACK_COMPLEXITY_HIGH(2), + UNRECOGNIZED(-1), + ; + + /** + * ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + public static final int ATTACK_COMPLEXITY_UNSPECIFIED_VALUE = 0; + /** + * ATTACK_COMPLEXITY_LOW = 1; + */ + public static final int ATTACK_COMPLEXITY_LOW_VALUE = 1; + /** + * ATTACK_COMPLEXITY_HIGH = 2; + */ + public static final int ATTACK_COMPLEXITY_HIGH_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AttackComplexity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AttackComplexity forNumber(int value) { + switch (value) { + case 0: return ATTACK_COMPLEXITY_UNSPECIFIED; + case 1: return ATTACK_COMPLEXITY_LOW; + case 2: return ATTACK_COMPLEXITY_HIGH; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AttackComplexity> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AttackComplexity findValueByNumber(int number) { + return AttackComplexity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(1); + } + + private static final AttackComplexity[] VALUES = values(); + + public static AttackComplexity valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AttackComplexity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.AttackComplexity) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSS.Authentication} + */ + public enum Authentication + implements com.google.protobuf.ProtocolMessageEnum { + /** + * AUTHENTICATION_UNSPECIFIED = 0; + */ + AUTHENTICATION_UNSPECIFIED(0), + /** + * AUTHENTICATION_MULTIPLE = 1; + */ + AUTHENTICATION_MULTIPLE(1), + /** + * AUTHENTICATION_SINGLE = 2; + */ + AUTHENTICATION_SINGLE(2), + /** + * AUTHENTICATION_NONE = 3; + */ + AUTHENTICATION_NONE(3), + UNRECOGNIZED(-1), + ; + + /** + * AUTHENTICATION_UNSPECIFIED = 0; + */ + public static final int AUTHENTICATION_UNSPECIFIED_VALUE = 0; + /** + * AUTHENTICATION_MULTIPLE = 1; + */ + public static final int AUTHENTICATION_MULTIPLE_VALUE = 1; + /** + * AUTHENTICATION_SINGLE = 2; + */ + public static final int AUTHENTICATION_SINGLE_VALUE = 2; + /** + * AUTHENTICATION_NONE = 3; + */ + public static final int AUTHENTICATION_NONE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Authentication valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Authentication forNumber(int value) { + switch (value) { + case 0: return AUTHENTICATION_UNSPECIFIED; + case 1: return AUTHENTICATION_MULTIPLE; + case 2: return AUTHENTICATION_SINGLE; + case 3: return AUTHENTICATION_NONE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Authentication> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Authentication findValueByNumber(int number) { + return Authentication.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(2); + } + + private static final Authentication[] VALUES = values(); + + public static Authentication valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Authentication(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.Authentication) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSS.PrivilegesRequired} + */ + public enum PrivilegesRequired + implements com.google.protobuf.ProtocolMessageEnum { + /** + * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + PRIVILEGES_REQUIRED_UNSPECIFIED(0), + /** + * PRIVILEGES_REQUIRED_NONE = 1; + */ + PRIVILEGES_REQUIRED_NONE(1), + /** + * PRIVILEGES_REQUIRED_LOW = 2; + */ + PRIVILEGES_REQUIRED_LOW(2), + /** + * PRIVILEGES_REQUIRED_HIGH = 3; + */ + PRIVILEGES_REQUIRED_HIGH(3), + UNRECOGNIZED(-1), + ; + + /** + * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + public static final int PRIVILEGES_REQUIRED_UNSPECIFIED_VALUE = 0; + /** + * PRIVILEGES_REQUIRED_NONE = 1; + */ + public static final int PRIVILEGES_REQUIRED_NONE_VALUE = 1; + /** + * PRIVILEGES_REQUIRED_LOW = 2; + */ + public static final int PRIVILEGES_REQUIRED_LOW_VALUE = 2; + /** + * PRIVILEGES_REQUIRED_HIGH = 3; + */ + public static final int PRIVILEGES_REQUIRED_HIGH_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PrivilegesRequired valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PrivilegesRequired forNumber(int value) { + switch (value) { + case 0: return PRIVILEGES_REQUIRED_UNSPECIFIED; + case 1: return PRIVILEGES_REQUIRED_NONE; + case 2: return PRIVILEGES_REQUIRED_LOW; + case 3: return PRIVILEGES_REQUIRED_HIGH; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PrivilegesRequired> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PrivilegesRequired findValueByNumber(int number) { + return PrivilegesRequired.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(3); + } + + private static final PrivilegesRequired[] VALUES = values(); + + public static PrivilegesRequired valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PrivilegesRequired(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.PrivilegesRequired) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSS.UserInteraction} + */ + public enum UserInteraction + implements com.google.protobuf.ProtocolMessageEnum { + /** + * USER_INTERACTION_UNSPECIFIED = 0; + */ + USER_INTERACTION_UNSPECIFIED(0), + /** + * USER_INTERACTION_NONE = 1; + */ + USER_INTERACTION_NONE(1), + /** + * USER_INTERACTION_REQUIRED = 2; + */ + USER_INTERACTION_REQUIRED(2), + UNRECOGNIZED(-1), + ; + + /** + * USER_INTERACTION_UNSPECIFIED = 0; + */ + public static final int USER_INTERACTION_UNSPECIFIED_VALUE = 0; + /** + * USER_INTERACTION_NONE = 1; + */ + public static final int USER_INTERACTION_NONE_VALUE = 1; + /** + * USER_INTERACTION_REQUIRED = 2; + */ + public static final int USER_INTERACTION_REQUIRED_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UserInteraction valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static UserInteraction forNumber(int value) { + switch (value) { + case 0: return USER_INTERACTION_UNSPECIFIED; + case 1: return USER_INTERACTION_NONE; + case 2: return USER_INTERACTION_REQUIRED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + UserInteraction> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public UserInteraction findValueByNumber(int number) { + return UserInteraction.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(4); + } + + private static final UserInteraction[] VALUES = values(); + + public static UserInteraction valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private UserInteraction(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.UserInteraction) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSS.Scope} + */ + public enum Scope + implements com.google.protobuf.ProtocolMessageEnum { + /** + * SCOPE_UNSPECIFIED = 0; + */ + SCOPE_UNSPECIFIED(0), + /** + * SCOPE_UNCHANGED = 1; + */ + SCOPE_UNCHANGED(1), + /** + * SCOPE_CHANGED = 2; + */ + SCOPE_CHANGED(2), + UNRECOGNIZED(-1), + ; + + /** + * SCOPE_UNSPECIFIED = 0; + */ + public static final int SCOPE_UNSPECIFIED_VALUE = 0; + /** + * SCOPE_UNCHANGED = 1; + */ + public static final int SCOPE_UNCHANGED_VALUE = 1; + /** + * SCOPE_CHANGED = 2; + */ + public static final int SCOPE_CHANGED_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Scope valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Scope forNumber(int value) { + switch (value) { + case 0: return SCOPE_UNSPECIFIED; + case 1: return SCOPE_UNCHANGED; + case 2: return SCOPE_CHANGED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Scope> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Scope findValueByNumber(int number) { + return Scope.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(5); + } + + private static final Scope[] VALUES = values(); + + public static Scope valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Scope(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.Scope) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSS.Impact} + */ + public enum Impact + implements com.google.protobuf.ProtocolMessageEnum { + /** + * IMPACT_UNSPECIFIED = 0; + */ + IMPACT_UNSPECIFIED(0), + /** + * IMPACT_HIGH = 1; + */ + IMPACT_HIGH(1), + /** + * IMPACT_LOW = 2; + */ + IMPACT_LOW(2), + /** + * IMPACT_NONE = 3; + */ + IMPACT_NONE(3), + UNRECOGNIZED(-1), + ; + + /** + * IMPACT_UNSPECIFIED = 0; + */ + public static final int IMPACT_UNSPECIFIED_VALUE = 0; + /** + * IMPACT_HIGH = 1; + */ + public static final int IMPACT_HIGH_VALUE = 1; + /** + * IMPACT_LOW = 2; + */ + public static final int IMPACT_LOW_VALUE = 2; + /** + * IMPACT_NONE = 3; + */ + public static final int IMPACT_NONE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Impact valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Impact forNumber(int value) { + switch (value) { + case 0: return IMPACT_UNSPECIFIED; + case 1: return IMPACT_HIGH; + case 2: return IMPACT_LOW; + case 3: return IMPACT_NONE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Impact> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Impact findValueByNumber(int number) { + return Impact.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(6); + } + + private static final Impact[] VALUES = values(); + + public static Impact valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Impact(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.Impact) + } + + public static final int BASE_SCORE_FIELD_NUMBER = 1; + private float baseScore_ = 0F; + /** + *
+   * The base score is a function of the base metric scores.
+   * 
+ * + * float base_score = 1; + * @return The baseScore. + */ + @java.lang.Override + public float getBaseScore() { + return baseScore_; + } + + public static final int EXPLOITABILITY_SCORE_FIELD_NUMBER = 2; + private float exploitabilityScore_ = 0F; + /** + * float exploitability_score = 2; + * @return The exploitabilityScore. + */ + @java.lang.Override + public float getExploitabilityScore() { + return exploitabilityScore_; + } + + public static final int IMPACT_SCORE_FIELD_NUMBER = 3; + private float impactScore_ = 0F; + /** + * float impact_score = 3; + * @return The impactScore. + */ + @java.lang.Override + public float getImpactScore() { + return impactScore_; + } + + public static final int ATTACK_VECTOR_FIELD_NUMBER = 4; + private int attackVector_ = 0; + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @return The enum numeric value on the wire for attackVector. + */ + @java.lang.Override public int getAttackVectorValue() { + return attackVector_; + } + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @return The attackVector. + */ + @java.lang.Override public io.grafeas.v1.CVSS.AttackVector getAttackVector() { + io.grafeas.v1.CVSS.AttackVector result = io.grafeas.v1.CVSS.AttackVector.forNumber(attackVector_); + return result == null ? io.grafeas.v1.CVSS.AttackVector.UNRECOGNIZED : result; + } + + public static final int ATTACK_COMPLEXITY_FIELD_NUMBER = 5; + private int attackComplexity_ = 0; + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @return The enum numeric value on the wire for attackComplexity. + */ + @java.lang.Override public int getAttackComplexityValue() { + return attackComplexity_; + } + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @return The attackComplexity. + */ + @java.lang.Override public io.grafeas.v1.CVSS.AttackComplexity getAttackComplexity() { + io.grafeas.v1.CVSS.AttackComplexity result = io.grafeas.v1.CVSS.AttackComplexity.forNumber(attackComplexity_); + return result == null ? io.grafeas.v1.CVSS.AttackComplexity.UNRECOGNIZED : result; + } + + public static final int AUTHENTICATION_FIELD_NUMBER = 6; + private int authentication_ = 0; + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @return The enum numeric value on the wire for authentication. + */ + @java.lang.Override public int getAuthenticationValue() { + return authentication_; + } + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @return The authentication. + */ + @java.lang.Override public io.grafeas.v1.CVSS.Authentication getAuthentication() { + io.grafeas.v1.CVSS.Authentication result = io.grafeas.v1.CVSS.Authentication.forNumber(authentication_); + return result == null ? io.grafeas.v1.CVSS.Authentication.UNRECOGNIZED : result; + } + + public static final int PRIVILEGES_REQUIRED_FIELD_NUMBER = 7; + private int privilegesRequired_ = 0; + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @return The enum numeric value on the wire for privilegesRequired. + */ + @java.lang.Override public int getPrivilegesRequiredValue() { + return privilegesRequired_; + } + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @return The privilegesRequired. + */ + @java.lang.Override public io.grafeas.v1.CVSS.PrivilegesRequired getPrivilegesRequired() { + io.grafeas.v1.CVSS.PrivilegesRequired result = io.grafeas.v1.CVSS.PrivilegesRequired.forNumber(privilegesRequired_); + return result == null ? io.grafeas.v1.CVSS.PrivilegesRequired.UNRECOGNIZED : result; + } + + public static final int USER_INTERACTION_FIELD_NUMBER = 8; + private int userInteraction_ = 0; + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @return The enum numeric value on the wire for userInteraction. + */ + @java.lang.Override public int getUserInteractionValue() { + return userInteraction_; + } + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @return The userInteraction. + */ + @java.lang.Override public io.grafeas.v1.CVSS.UserInteraction getUserInteraction() { + io.grafeas.v1.CVSS.UserInteraction result = io.grafeas.v1.CVSS.UserInteraction.forNumber(userInteraction_); + return result == null ? io.grafeas.v1.CVSS.UserInteraction.UNRECOGNIZED : result; + } + + public static final int SCOPE_FIELD_NUMBER = 9; + private int scope_ = 0; + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override public int getScopeValue() { + return scope_; + } + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @return The scope. + */ + @java.lang.Override public io.grafeas.v1.CVSS.Scope getScope() { + io.grafeas.v1.CVSS.Scope result = io.grafeas.v1.CVSS.Scope.forNumber(scope_); + return result == null ? io.grafeas.v1.CVSS.Scope.UNRECOGNIZED : result; + } + + public static final int CONFIDENTIALITY_IMPACT_FIELD_NUMBER = 10; + private int confidentialityImpact_ = 0; + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @return The enum numeric value on the wire for confidentialityImpact. + */ + @java.lang.Override public int getConfidentialityImpactValue() { + return confidentialityImpact_; + } + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @return The confidentialityImpact. + */ + @java.lang.Override public io.grafeas.v1.CVSS.Impact getConfidentialityImpact() { + io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(confidentialityImpact_); + return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; + } + + public static final int INTEGRITY_IMPACT_FIELD_NUMBER = 11; + private int integrityImpact_ = 0; + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @return The enum numeric value on the wire for integrityImpact. + */ + @java.lang.Override public int getIntegrityImpactValue() { + return integrityImpact_; + } + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @return The integrityImpact. + */ + @java.lang.Override public io.grafeas.v1.CVSS.Impact getIntegrityImpact() { + io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(integrityImpact_); + return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; + } + + public static final int AVAILABILITY_IMPACT_FIELD_NUMBER = 12; + private int availabilityImpact_ = 0; + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @return The enum numeric value on the wire for availabilityImpact. + */ + @java.lang.Override public int getAvailabilityImpactValue() { + return availabilityImpact_; + } + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @return The availabilityImpact. + */ + @java.lang.Override public io.grafeas.v1.CVSS.Impact getAvailabilityImpact() { + io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(availabilityImpact_); + return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { + output.writeFloat(1, baseScore_); + } + if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { + output.writeFloat(2, exploitabilityScore_); + } + if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { + output.writeFloat(3, impactScore_); + } + if (attackVector_ != io.grafeas.v1.CVSS.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { + output.writeEnum(4, attackVector_); + } + if (attackComplexity_ != io.grafeas.v1.CVSS.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { + output.writeEnum(5, attackComplexity_); + } + if (authentication_ != io.grafeas.v1.CVSS.Authentication.AUTHENTICATION_UNSPECIFIED.getNumber()) { + output.writeEnum(6, authentication_); + } + if (privilegesRequired_ != io.grafeas.v1.CVSS.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { + output.writeEnum(7, privilegesRequired_); + } + if (userInteraction_ != io.grafeas.v1.CVSS.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { + output.writeEnum(8, userInteraction_); + } + if (scope_ != io.grafeas.v1.CVSS.Scope.SCOPE_UNSPECIFIED.getNumber()) { + output.writeEnum(9, scope_); + } + if (confidentialityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(10, confidentialityImpact_); + } + if (integrityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(11, integrityImpact_); + } + if (availabilityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(12, availabilityImpact_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, baseScore_); + } + if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, exploitabilityScore_); + } + if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, impactScore_); + } + if (attackVector_ != io.grafeas.v1.CVSS.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, attackVector_); + } + if (attackComplexity_ != io.grafeas.v1.CVSS.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, attackComplexity_); + } + if (authentication_ != io.grafeas.v1.CVSS.Authentication.AUTHENTICATION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(6, authentication_); + } + if (privilegesRequired_ != io.grafeas.v1.CVSS.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, privilegesRequired_); + } + if (userInteraction_ != io.grafeas.v1.CVSS.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, userInteraction_); + } + if (scope_ != io.grafeas.v1.CVSS.Scope.SCOPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, scope_); + } + if (confidentialityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, confidentialityImpact_); + } + if (integrityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, integrityImpact_); + } + if (availabilityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(12, availabilityImpact_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.CVSS)) { + return super.equals(obj); + } + io.grafeas.v1.CVSS other = (io.grafeas.v1.CVSS) obj; + + if (java.lang.Float.floatToIntBits(getBaseScore()) + != java.lang.Float.floatToIntBits( + other.getBaseScore())) return false; + if (java.lang.Float.floatToIntBits(getExploitabilityScore()) + != java.lang.Float.floatToIntBits( + other.getExploitabilityScore())) return false; + if (java.lang.Float.floatToIntBits(getImpactScore()) + != java.lang.Float.floatToIntBits( + other.getImpactScore())) return false; + if (attackVector_ != other.attackVector_) return false; + if (attackComplexity_ != other.attackComplexity_) return false; + if (authentication_ != other.authentication_) return false; + if (privilegesRequired_ != other.privilegesRequired_) return false; + if (userInteraction_ != other.userInteraction_) return false; + if (scope_ != other.scope_) return false; + if (confidentialityImpact_ != other.confidentialityImpact_) return false; + if (integrityImpact_ != other.integrityImpact_) return false; + if (availabilityImpact_ != other.availabilityImpact_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BASE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getBaseScore()); + hash = (37 * hash) + EXPLOITABILITY_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getExploitabilityScore()); + hash = (37 * hash) + IMPACT_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getImpactScore()); + hash = (37 * hash) + ATTACK_VECTOR_FIELD_NUMBER; + hash = (53 * hash) + attackVector_; + hash = (37 * hash) + ATTACK_COMPLEXITY_FIELD_NUMBER; + hash = (53 * hash) + attackComplexity_; + hash = (37 * hash) + AUTHENTICATION_FIELD_NUMBER; + hash = (53 * hash) + authentication_; + hash = (37 * hash) + PRIVILEGES_REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + privilegesRequired_; + hash = (37 * hash) + USER_INTERACTION_FIELD_NUMBER; + hash = (53 * hash) + userInteraction_; + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + scope_; + hash = (37 * hash) + CONFIDENTIALITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + confidentialityImpact_; + hash = (37 * hash) + INTEGRITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + integrityImpact_; + hash = (37 * hash) + AVAILABILITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + availabilityImpact_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.CVSS parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CVSS parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CVSS parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CVSS parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CVSS parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CVSS parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CVSS parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CVSS parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CVSS parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.CVSS parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CVSS parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CVSS parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.CVSS prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Common Vulnerability Scoring System.
+   * For details, see https://www.first.org/cvss/specification-document
+   * This is a message we will try to use for storing various versions of CVSS
+   * rather than making a separate proto for storing a specific version.
+   * 
+ * + * Protobuf type {@code grafeas.v1.CVSS} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.CVSS) + io.grafeas.v1.CVSSOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CVSS.class, io.grafeas.v1.CVSS.Builder.class); + } + + // Construct using io.grafeas.v1.CVSS.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + baseScore_ = 0F; + exploitabilityScore_ = 0F; + impactScore_ = 0F; + attackVector_ = 0; + attackComplexity_ = 0; + authentication_ = 0; + privilegesRequired_ = 0; + userInteraction_ = 0; + scope_ = 0; + confidentialityImpact_ = 0; + integrityImpact_ = 0; + availabilityImpact_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.CVSS getDefaultInstanceForType() { + return io.grafeas.v1.CVSS.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.CVSS build() { + io.grafeas.v1.CVSS result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.CVSS buildPartial() { + io.grafeas.v1.CVSS result = new io.grafeas.v1.CVSS(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.CVSS result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.baseScore_ = baseScore_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.exploitabilityScore_ = exploitabilityScore_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.impactScore_ = impactScore_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.attackVector_ = attackVector_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.attackComplexity_ = attackComplexity_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.authentication_ = authentication_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.privilegesRequired_ = privilegesRequired_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.userInteraction_ = userInteraction_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.scope_ = scope_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.confidentialityImpact_ = confidentialityImpact_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.integrityImpact_ = integrityImpact_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.availabilityImpact_ = availabilityImpact_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.CVSS) { + return mergeFrom((io.grafeas.v1.CVSS)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.CVSS other) { + if (other == io.grafeas.v1.CVSS.getDefaultInstance()) return this; + if (other.getBaseScore() != 0F) { + setBaseScore(other.getBaseScore()); + } + if (other.getExploitabilityScore() != 0F) { + setExploitabilityScore(other.getExploitabilityScore()); + } + if (other.getImpactScore() != 0F) { + setImpactScore(other.getImpactScore()); + } + if (other.attackVector_ != 0) { + setAttackVectorValue(other.getAttackVectorValue()); + } + if (other.attackComplexity_ != 0) { + setAttackComplexityValue(other.getAttackComplexityValue()); + } + if (other.authentication_ != 0) { + setAuthenticationValue(other.getAuthenticationValue()); + } + if (other.privilegesRequired_ != 0) { + setPrivilegesRequiredValue(other.getPrivilegesRequiredValue()); + } + if (other.userInteraction_ != 0) { + setUserInteractionValue(other.getUserInteractionValue()); + } + if (other.scope_ != 0) { + setScopeValue(other.getScopeValue()); + } + if (other.confidentialityImpact_ != 0) { + setConfidentialityImpactValue(other.getConfidentialityImpactValue()); + } + if (other.integrityImpact_ != 0) { + setIntegrityImpactValue(other.getIntegrityImpactValue()); + } + if (other.availabilityImpact_ != 0) { + setAvailabilityImpactValue(other.getAvailabilityImpactValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + baseScore_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: { + exploitabilityScore_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: { + impactScore_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 32: { + attackVector_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + attackComplexity_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + authentication_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + privilegesRequired_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + userInteraction_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + scope_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + confidentialityImpact_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: { + integrityImpact_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: { + availabilityImpact_ = input.readEnum(); + bitField0_ |= 0x00000800; + break; + } // case 96 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private float baseScore_ ; + /** + *
+     * The base score is a function of the base metric scores.
+     * 
+ * + * float base_score = 1; + * @return The baseScore. + */ + @java.lang.Override + public float getBaseScore() { + return baseScore_; + } + /** + *
+     * The base score is a function of the base metric scores.
+     * 
+ * + * float base_score = 1; + * @param value The baseScore to set. + * @return This builder for chaining. + */ + public Builder setBaseScore(float value) { + + baseScore_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The base score is a function of the base metric scores.
+     * 
+ * + * float base_score = 1; + * @return This builder for chaining. + */ + public Builder clearBaseScore() { + bitField0_ = (bitField0_ & ~0x00000001); + baseScore_ = 0F; + onChanged(); + return this; + } + + private float exploitabilityScore_ ; + /** + * float exploitability_score = 2; + * @return The exploitabilityScore. + */ + @java.lang.Override + public float getExploitabilityScore() { + return exploitabilityScore_; + } + /** + * float exploitability_score = 2; + * @param value The exploitabilityScore to set. + * @return This builder for chaining. + */ + public Builder setExploitabilityScore(float value) { + + exploitabilityScore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * float exploitability_score = 2; + * @return This builder for chaining. + */ + public Builder clearExploitabilityScore() { + bitField0_ = (bitField0_ & ~0x00000002); + exploitabilityScore_ = 0F; + onChanged(); + return this; + } + + private float impactScore_ ; + /** + * float impact_score = 3; + * @return The impactScore. + */ + @java.lang.Override + public float getImpactScore() { + return impactScore_; + } + /** + * float impact_score = 3; + * @param value The impactScore to set. + * @return This builder for chaining. + */ + public Builder setImpactScore(float value) { + + impactScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * float impact_score = 3; + * @return This builder for chaining. + */ + public Builder clearImpactScore() { + bitField0_ = (bitField0_ & ~0x00000004); + impactScore_ = 0F; + onChanged(); + return this; + } + + private int attackVector_ = 0; + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @return The enum numeric value on the wire for attackVector. + */ + @java.lang.Override public int getAttackVectorValue() { + return attackVector_; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @param value The enum numeric value on the wire for attackVector to set. + * @return This builder for chaining. + */ + public Builder setAttackVectorValue(int value) { + attackVector_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @return The attackVector. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.AttackVector getAttackVector() { + io.grafeas.v1.CVSS.AttackVector result = io.grafeas.v1.CVSS.AttackVector.forNumber(attackVector_); + return result == null ? io.grafeas.v1.CVSS.AttackVector.UNRECOGNIZED : result; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @param value The attackVector to set. + * @return This builder for chaining. + */ + public Builder setAttackVector(io.grafeas.v1.CVSS.AttackVector value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + attackVector_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @return This builder for chaining. + */ + public Builder clearAttackVector() { + bitField0_ = (bitField0_ & ~0x00000008); + attackVector_ = 0; + onChanged(); + return this; + } + + private int attackComplexity_ = 0; + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @return The enum numeric value on the wire for attackComplexity. + */ + @java.lang.Override public int getAttackComplexityValue() { + return attackComplexity_; + } + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @param value The enum numeric value on the wire for attackComplexity to set. + * @return This builder for chaining. + */ + public Builder setAttackComplexityValue(int value) { + attackComplexity_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @return The attackComplexity. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.AttackComplexity getAttackComplexity() { + io.grafeas.v1.CVSS.AttackComplexity result = io.grafeas.v1.CVSS.AttackComplexity.forNumber(attackComplexity_); + return result == null ? io.grafeas.v1.CVSS.AttackComplexity.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @param value The attackComplexity to set. + * @return This builder for chaining. + */ + public Builder setAttackComplexity(io.grafeas.v1.CVSS.AttackComplexity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + attackComplexity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @return This builder for chaining. + */ + public Builder clearAttackComplexity() { + bitField0_ = (bitField0_ & ~0x00000010); + attackComplexity_ = 0; + onChanged(); + return this; + } + + private int authentication_ = 0; + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @return The enum numeric value on the wire for authentication. + */ + @java.lang.Override public int getAuthenticationValue() { + return authentication_; + } + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @param value The enum numeric value on the wire for authentication to set. + * @return This builder for chaining. + */ + public Builder setAuthenticationValue(int value) { + authentication_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @return The authentication. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.Authentication getAuthentication() { + io.grafeas.v1.CVSS.Authentication result = io.grafeas.v1.CVSS.Authentication.forNumber(authentication_); + return result == null ? io.grafeas.v1.CVSS.Authentication.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @param value The authentication to set. + * @return This builder for chaining. + */ + public Builder setAuthentication(io.grafeas.v1.CVSS.Authentication value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + authentication_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @return This builder for chaining. + */ + public Builder clearAuthentication() { + bitField0_ = (bitField0_ & ~0x00000020); + authentication_ = 0; + onChanged(); + return this; + } + + private int privilegesRequired_ = 0; + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @return The enum numeric value on the wire for privilegesRequired. + */ + @java.lang.Override public int getPrivilegesRequiredValue() { + return privilegesRequired_; + } + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @param value The enum numeric value on the wire for privilegesRequired to set. + * @return This builder for chaining. + */ + public Builder setPrivilegesRequiredValue(int value) { + privilegesRequired_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @return The privilegesRequired. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.PrivilegesRequired getPrivilegesRequired() { + io.grafeas.v1.CVSS.PrivilegesRequired result = io.grafeas.v1.CVSS.PrivilegesRequired.forNumber(privilegesRequired_); + return result == null ? io.grafeas.v1.CVSS.PrivilegesRequired.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @param value The privilegesRequired to set. + * @return This builder for chaining. + */ + public Builder setPrivilegesRequired(io.grafeas.v1.CVSS.PrivilegesRequired value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + privilegesRequired_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @return This builder for chaining. + */ + public Builder clearPrivilegesRequired() { + bitField0_ = (bitField0_ & ~0x00000040); + privilegesRequired_ = 0; + onChanged(); + return this; + } + + private int userInteraction_ = 0; + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @return The enum numeric value on the wire for userInteraction. + */ + @java.lang.Override public int getUserInteractionValue() { + return userInteraction_; + } + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @param value The enum numeric value on the wire for userInteraction to set. + * @return This builder for chaining. + */ + public Builder setUserInteractionValue(int value) { + userInteraction_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @return The userInteraction. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.UserInteraction getUserInteraction() { + io.grafeas.v1.CVSS.UserInteraction result = io.grafeas.v1.CVSS.UserInteraction.forNumber(userInteraction_); + return result == null ? io.grafeas.v1.CVSS.UserInteraction.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @param value The userInteraction to set. + * @return This builder for chaining. + */ + public Builder setUserInteraction(io.grafeas.v1.CVSS.UserInteraction value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + userInteraction_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @return This builder for chaining. + */ + public Builder clearUserInteraction() { + bitField0_ = (bitField0_ & ~0x00000080); + userInteraction_ = 0; + onChanged(); + return this; + } + + private int scope_ = 0; + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override public int getScopeValue() { + return scope_; + } + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @param value The enum numeric value on the wire for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeValue(int value) { + scope_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @return The scope. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.Scope getScope() { + io.grafeas.v1.CVSS.Scope result = io.grafeas.v1.CVSS.Scope.forNumber(scope_); + return result == null ? io.grafeas.v1.CVSS.Scope.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(io.grafeas.v1.CVSS.Scope value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + scope_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @return This builder for chaining. + */ + public Builder clearScope() { + bitField0_ = (bitField0_ & ~0x00000100); + scope_ = 0; + onChanged(); + return this; + } + + private int confidentialityImpact_ = 0; + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @return The enum numeric value on the wire for confidentialityImpact. + */ + @java.lang.Override public int getConfidentialityImpactValue() { + return confidentialityImpact_; + } + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @param value The enum numeric value on the wire for confidentialityImpact to set. + * @return This builder for chaining. + */ + public Builder setConfidentialityImpactValue(int value) { + confidentialityImpact_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @return The confidentialityImpact. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.Impact getConfidentialityImpact() { + io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(confidentialityImpact_); + return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @param value The confidentialityImpact to set. + * @return This builder for chaining. + */ + public Builder setConfidentialityImpact(io.grafeas.v1.CVSS.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + confidentialityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @return This builder for chaining. + */ + public Builder clearConfidentialityImpact() { + bitField0_ = (bitField0_ & ~0x00000200); + confidentialityImpact_ = 0; + onChanged(); + return this; + } + + private int integrityImpact_ = 0; + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @return The enum numeric value on the wire for integrityImpact. + */ + @java.lang.Override public int getIntegrityImpactValue() { + return integrityImpact_; + } + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @param value The enum numeric value on the wire for integrityImpact to set. + * @return This builder for chaining. + */ + public Builder setIntegrityImpactValue(int value) { + integrityImpact_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @return The integrityImpact. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.Impact getIntegrityImpact() { + io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(integrityImpact_); + return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @param value The integrityImpact to set. + * @return This builder for chaining. + */ + public Builder setIntegrityImpact(io.grafeas.v1.CVSS.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + integrityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @return This builder for chaining. + */ + public Builder clearIntegrityImpact() { + bitField0_ = (bitField0_ & ~0x00000400); + integrityImpact_ = 0; + onChanged(); + return this; + } + + private int availabilityImpact_ = 0; + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @return The enum numeric value on the wire for availabilityImpact. + */ + @java.lang.Override public int getAvailabilityImpactValue() { + return availabilityImpact_; + } + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @param value The enum numeric value on the wire for availabilityImpact to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityImpactValue(int value) { + availabilityImpact_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @return The availabilityImpact. + */ + @java.lang.Override + public io.grafeas.v1.CVSS.Impact getAvailabilityImpact() { + io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(availabilityImpact_); + return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @param value The availabilityImpact to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityImpact(io.grafeas.v1.CVSS.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + availabilityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @return This builder for chaining. + */ + public Builder clearAvailabilityImpact() { + bitField0_ = (bitField0_ & ~0x00000800); + availabilityImpact_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.CVSS) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.CVSS) + private static final io.grafeas.v1.CVSS DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.CVSS(); + } + + public static io.grafeas.v1.CVSS getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CVSS parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.CVSS getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java new file mode 100644 index 000000000000..2e8db76424dc --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java @@ -0,0 +1,142 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/cvss.proto + +package io.grafeas.v1; + +public interface CVSSOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.CVSS) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The base score is a function of the base metric scores.
+   * 
+ * + * float base_score = 1; + * @return The baseScore. + */ + float getBaseScore(); + + /** + * float exploitability_score = 2; + * @return The exploitabilityScore. + */ + float getExploitabilityScore(); + + /** + * float impact_score = 3; + * @return The impactScore. + */ + float getImpactScore(); + + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @return The enum numeric value on the wire for attackVector. + */ + int getAttackVectorValue(); + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @return The attackVector. + */ + io.grafeas.v1.CVSS.AttackVector getAttackVector(); + + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @return The enum numeric value on the wire for attackComplexity. + */ + int getAttackComplexityValue(); + /** + * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @return The attackComplexity. + */ + io.grafeas.v1.CVSS.AttackComplexity getAttackComplexity(); + + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @return The enum numeric value on the wire for authentication. + */ + int getAuthenticationValue(); + /** + * .grafeas.v1.CVSS.Authentication authentication = 6; + * @return The authentication. + */ + io.grafeas.v1.CVSS.Authentication getAuthentication(); + + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @return The enum numeric value on the wire for privilegesRequired. + */ + int getPrivilegesRequiredValue(); + /** + * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @return The privilegesRequired. + */ + io.grafeas.v1.CVSS.PrivilegesRequired getPrivilegesRequired(); + + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @return The enum numeric value on the wire for userInteraction. + */ + int getUserInteractionValue(); + /** + * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @return The userInteraction. + */ + io.grafeas.v1.CVSS.UserInteraction getUserInteraction(); + + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @return The enum numeric value on the wire for scope. + */ + int getScopeValue(); + /** + * .grafeas.v1.CVSS.Scope scope = 9; + * @return The scope. + */ + io.grafeas.v1.CVSS.Scope getScope(); + + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @return The enum numeric value on the wire for confidentialityImpact. + */ + int getConfidentialityImpactValue(); + /** + * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @return The confidentialityImpact. + */ + io.grafeas.v1.CVSS.Impact getConfidentialityImpact(); + + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @return The enum numeric value on the wire for integrityImpact. + */ + int getIntegrityImpactValue(); + /** + * .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @return The integrityImpact. + */ + io.grafeas.v1.CVSS.Impact getIntegrityImpact(); + + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @return The enum numeric value on the wire for availabilityImpact. + */ + int getAvailabilityImpactValue(); + /** + * .grafeas.v1.CVSS.Impact availability_impact = 12; + * @return The availabilityImpact. + */ + io.grafeas.v1.CVSS.Impact getAvailabilityImpact(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java new file mode 100644 index 000000000000..45bcae84cede --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java @@ -0,0 +1,128 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/cvss.proto + +package io.grafeas.v1; + +public final class CVSSProto { + private CVSSProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_CVSSv3_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_CVSSv3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_CVSS_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_CVSS_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\025grafeas/v1/cvss.proto\022\ngrafeas.v1\"\305\t\n\006" + + "CVSSv3\022\022\n\nbase_score\030\001 \001(\002\022\034\n\024exploitabi" + + "lity_score\030\002 \001(\002\022\024\n\014impact_score\030\003 \001(\002\0226" + + "\n\rattack_vector\030\005 \001(\0162\037.grafeas.v1.CVSSv" + + "3.AttackVector\022>\n\021attack_complexity\030\006 \001(" + + "\0162#.grafeas.v1.CVSSv3.AttackComplexity\022B" + + "\n\023privileges_required\030\007 \001(\0162%.grafeas.v1" + + ".CVSSv3.PrivilegesRequired\022<\n\020user_inter" + + "action\030\010 \001(\0162\".grafeas.v1.CVSSv3.UserInt" + + "eraction\022\'\n\005scope\030\t \001(\0162\030.grafeas.v1.CVS" + + "Sv3.Scope\0229\n\026confidentiality_impact\030\n \001(" + + "\0162\031.grafeas.v1.CVSSv3.Impact\0223\n\020integrit" + + "y_impact\030\013 \001(\0162\031.grafeas.v1.CVSSv3.Impac" + + "t\0226\n\023availability_impact\030\014 \001(\0162\031.grafeas" + + ".v1.CVSSv3.Impact\"\231\001\n\014AttackVector\022\035\n\031AT" + + "TACK_VECTOR_UNSPECIFIED\020\000\022\031\n\025ATTACK_VECT" + + "OR_NETWORK\020\001\022\032\n\026ATTACK_VECTOR_ADJACENT\020\002" + + "\022\027\n\023ATTACK_VECTOR_LOCAL\020\003\022\032\n\026ATTACK_VECT" + + "OR_PHYSICAL\020\004\"l\n\020AttackComplexity\022!\n\035ATT" + + "ACK_COMPLEXITY_UNSPECIFIED\020\000\022\031\n\025ATTACK_C" + + "OMPLEXITY_LOW\020\001\022\032\n\026ATTACK_COMPLEXITY_HIG" + + "H\020\002\"\222\001\n\022PrivilegesRequired\022#\n\037PRIVILEGES" + + "_REQUIRED_UNSPECIFIED\020\000\022\034\n\030PRIVILEGES_RE" + + "QUIRED_NONE\020\001\022\033\n\027PRIVILEGES_REQUIRED_LOW" + + "\020\002\022\034\n\030PRIVILEGES_REQUIRED_HIGH\020\003\"m\n\017User" + + "Interaction\022 \n\034USER_INTERACTION_UNSPECIF" + + "IED\020\000\022\031\n\025USER_INTERACTION_NONE\020\001\022\035\n\031USER" + + "_INTERACTION_REQUIRED\020\002\"F\n\005Scope\022\025\n\021SCOP" + + "E_UNSPECIFIED\020\000\022\023\n\017SCOPE_UNCHANGED\020\001\022\021\n\r" + + "SCOPE_CHANGED\020\002\"R\n\006Impact\022\026\n\022IMPACT_UNSP" + + "ECIFIED\020\000\022\017\n\013IMPACT_HIGH\020\001\022\016\n\nIMPACT_LOW" + + "\020\002\022\017\n\013IMPACT_NONE\020\003\"\360\n\n\004CVSS\022\022\n\nbase_sco" + + "re\030\001 \001(\002\022\034\n\024exploitability_score\030\002 \001(\002\022\024" + + "\n\014impact_score\030\003 \001(\002\0224\n\rattack_vector\030\004 " + + "\001(\0162\035.grafeas.v1.CVSS.AttackVector\022<\n\021at" + + "tack_complexity\030\005 \001(\0162!.grafeas.v1.CVSS." + + "AttackComplexity\0227\n\016authentication\030\006 \001(\016" + + "2\037.grafeas.v1.CVSS.Authentication\022@\n\023pri" + + "vileges_required\030\007 \001(\0162#.grafeas.v1.CVSS" + + ".PrivilegesRequired\022:\n\020user_interaction\030" + + "\010 \001(\0162 .grafeas.v1.CVSS.UserInteraction\022" + + "%\n\005scope\030\t \001(\0162\026.grafeas.v1.CVSS.Scope\0227" + + "\n\026confidentiality_impact\030\n \001(\0162\027.grafeas" + + ".v1.CVSS.Impact\0221\n\020integrity_impact\030\013 \001(" + + "\0162\027.grafeas.v1.CVSS.Impact\0224\n\023availabili" + + "ty_impact\030\014 \001(\0162\027.grafeas.v1.CVSS.Impact" + + "\"\231\001\n\014AttackVector\022\035\n\031ATTACK_VECTOR_UNSPE" + + "CIFIED\020\000\022\031\n\025ATTACK_VECTOR_NETWORK\020\001\022\032\n\026A" + + "TTACK_VECTOR_ADJACENT\020\002\022\027\n\023ATTACK_VECTOR" + + "_LOCAL\020\003\022\032\n\026ATTACK_VECTOR_PHYSICAL\020\004\"l\n\020" + + "AttackComplexity\022!\n\035ATTACK_COMPLEXITY_UN" + + "SPECIFIED\020\000\022\031\n\025ATTACK_COMPLEXITY_LOW\020\001\022\032" + + "\n\026ATTACK_COMPLEXITY_HIGH\020\002\"\201\001\n\016Authentic" + + "ation\022\036\n\032AUTHENTICATION_UNSPECIFIED\020\000\022\033\n" + + "\027AUTHENTICATION_MULTIPLE\020\001\022\031\n\025AUTHENTICA" + + "TION_SINGLE\020\002\022\027\n\023AUTHENTICATION_NONE\020\003\"\222" + + "\001\n\022PrivilegesRequired\022#\n\037PRIVILEGES_REQU" + + "IRED_UNSPECIFIED\020\000\022\034\n\030PRIVILEGES_REQUIRE" + + "D_NONE\020\001\022\033\n\027PRIVILEGES_REQUIRED_LOW\020\002\022\034\n" + + "\030PRIVILEGES_REQUIRED_HIGH\020\003\"m\n\017UserInter" + + "action\022 \n\034USER_INTERACTION_UNSPECIFIED\020\000" + + "\022\031\n\025USER_INTERACTION_NONE\020\001\022\035\n\031USER_INTE" + + "RACTION_REQUIRED\020\002\"F\n\005Scope\022\025\n\021SCOPE_UNS" + + "PECIFIED\020\000\022\023\n\017SCOPE_UNCHANGED\020\001\022\021\n\rSCOPE" + + "_CHANGED\020\002\"R\n\006Impact\022\026\n\022IMPACT_UNSPECIFI" + + "ED\020\000\022\017\n\013IMPACT_HIGH\020\001\022\016\n\nIMPACT_LOW\020\002\022\017\n" + + "\013IMPACT_NONE\020\003*S\n\013CVSSVersion\022\034\n\030CVSS_VE" + + "RSION_UNSPECIFIED\020\000\022\022\n\016CVSS_VERSION_2\020\001\022" + + "\022\n\016CVSS_VERSION_3\020\002B\\\n\rio.grafeas.v1B\tCV" + + "SSProtoP\001Z8google.golang.org/genproto/go" + + "ogleapis/grafeas/v1;grafeas\242\002\003GRAb\006proto" + + "3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_grafeas_v1_CVSSv3_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_CVSSv3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_CVSSv3_descriptor, + new java.lang.String[] { "BaseScore", "ExploitabilityScore", "ImpactScore", "AttackVector", "AttackComplexity", "PrivilegesRequired", "UserInteraction", "Scope", "ConfidentialityImpact", "IntegrityImpact", "AvailabilityImpact", }); + internal_static_grafeas_v1_CVSS_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_CVSS_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_CVSS_descriptor, + new java.lang.String[] { "BaseScore", "ExploitabilityScore", "ImpactScore", "AttackVector", "AttackComplexity", "Authentication", "PrivilegesRequired", "UserInteraction", "Scope", "ConfidentialityImpact", "IntegrityImpact", "AvailabilityImpact", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java new file mode 100644 index 000000000000..ce2a2a054bb1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java @@ -0,0 +1,126 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/cvss.proto + +package io.grafeas.v1; + +/** + *
+ * CVSS Version.
+ * 
+ * + * Protobuf enum {@code grafeas.v1.CVSSVersion} + */ +public enum CVSSVersion + implements com.google.protobuf.ProtocolMessageEnum { + /** + * CVSS_VERSION_UNSPECIFIED = 0; + */ + CVSS_VERSION_UNSPECIFIED(0), + /** + * CVSS_VERSION_2 = 1; + */ + CVSS_VERSION_2(1), + /** + * CVSS_VERSION_3 = 2; + */ + CVSS_VERSION_3(2), + UNRECOGNIZED(-1), + ; + + /** + * CVSS_VERSION_UNSPECIFIED = 0; + */ + public static final int CVSS_VERSION_UNSPECIFIED_VALUE = 0; + /** + * CVSS_VERSION_2 = 1; + */ + public static final int CVSS_VERSION_2_VALUE = 1; + /** + * CVSS_VERSION_3 = 2; + */ + public static final int CVSS_VERSION_3_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CVSSVersion valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CVSSVersion forNumber(int value) { + switch (value) { + case 0: return CVSS_VERSION_UNSPECIFIED; + case 1: return CVSS_VERSION_2; + case 2: return CVSS_VERSION_3; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + CVSSVersion> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CVSSVersion findValueByNumber(int number) { + return CVSSVersion.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSSProto.getDescriptor().getEnumTypes().get(0); + } + + private static final CVSSVersion[] VALUES = values(); + + public static CVSSVersion valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CVSSVersion(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSVersion) +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java new file mode 100644 index 000000000000..d23be5609fd1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java @@ -0,0 +1,2170 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/cvss.proto + +package io.grafeas.v1; + +/** + *
+ * Common Vulnerability Scoring System version 3.
+ * For details, see https://www.first.org/cvss/specification-document
+ * 
+ * + * Protobuf type {@code grafeas.v1.CVSSv3} + */ +public final class CVSSv3 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.CVSSv3) + CVSSv3OrBuilder { +private static final long serialVersionUID = 0L; + // Use CVSSv3.newBuilder() to construct. + private CVSSv3(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CVSSv3() { + attackVector_ = 0; + attackComplexity_ = 0; + privilegesRequired_ = 0; + userInteraction_ = 0; + scope_ = 0; + confidentialityImpact_ = 0; + integrityImpact_ = 0; + availabilityImpact_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CVSSv3(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CVSSv3.class, io.grafeas.v1.CVSSv3.Builder.class); + } + + /** + * Protobuf enum {@code grafeas.v1.CVSSv3.AttackVector} + */ + public enum AttackVector + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ATTACK_VECTOR_UNSPECIFIED = 0; + */ + ATTACK_VECTOR_UNSPECIFIED(0), + /** + * ATTACK_VECTOR_NETWORK = 1; + */ + ATTACK_VECTOR_NETWORK(1), + /** + * ATTACK_VECTOR_ADJACENT = 2; + */ + ATTACK_VECTOR_ADJACENT(2), + /** + * ATTACK_VECTOR_LOCAL = 3; + */ + ATTACK_VECTOR_LOCAL(3), + /** + * ATTACK_VECTOR_PHYSICAL = 4; + */ + ATTACK_VECTOR_PHYSICAL(4), + UNRECOGNIZED(-1), + ; + + /** + * ATTACK_VECTOR_UNSPECIFIED = 0; + */ + public static final int ATTACK_VECTOR_UNSPECIFIED_VALUE = 0; + /** + * ATTACK_VECTOR_NETWORK = 1; + */ + public static final int ATTACK_VECTOR_NETWORK_VALUE = 1; + /** + * ATTACK_VECTOR_ADJACENT = 2; + */ + public static final int ATTACK_VECTOR_ADJACENT_VALUE = 2; + /** + * ATTACK_VECTOR_LOCAL = 3; + */ + public static final int ATTACK_VECTOR_LOCAL_VALUE = 3; + /** + * ATTACK_VECTOR_PHYSICAL = 4; + */ + public static final int ATTACK_VECTOR_PHYSICAL_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AttackVector valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AttackVector forNumber(int value) { + switch (value) { + case 0: return ATTACK_VECTOR_UNSPECIFIED; + case 1: return ATTACK_VECTOR_NETWORK; + case 2: return ATTACK_VECTOR_ADJACENT; + case 3: return ATTACK_VECTOR_LOCAL; + case 4: return ATTACK_VECTOR_PHYSICAL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AttackVector> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AttackVector findValueByNumber(int number) { + return AttackVector.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(0); + } + + private static final AttackVector[] VALUES = values(); + + public static AttackVector valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AttackVector(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.AttackVector) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSSv3.AttackComplexity} + */ + public enum AttackComplexity + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + ATTACK_COMPLEXITY_UNSPECIFIED(0), + /** + * ATTACK_COMPLEXITY_LOW = 1; + */ + ATTACK_COMPLEXITY_LOW(1), + /** + * ATTACK_COMPLEXITY_HIGH = 2; + */ + ATTACK_COMPLEXITY_HIGH(2), + UNRECOGNIZED(-1), + ; + + /** + * ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + public static final int ATTACK_COMPLEXITY_UNSPECIFIED_VALUE = 0; + /** + * ATTACK_COMPLEXITY_LOW = 1; + */ + public static final int ATTACK_COMPLEXITY_LOW_VALUE = 1; + /** + * ATTACK_COMPLEXITY_HIGH = 2; + */ + public static final int ATTACK_COMPLEXITY_HIGH_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AttackComplexity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AttackComplexity forNumber(int value) { + switch (value) { + case 0: return ATTACK_COMPLEXITY_UNSPECIFIED; + case 1: return ATTACK_COMPLEXITY_LOW; + case 2: return ATTACK_COMPLEXITY_HIGH; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AttackComplexity> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AttackComplexity findValueByNumber(int number) { + return AttackComplexity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(1); + } + + private static final AttackComplexity[] VALUES = values(); + + public static AttackComplexity valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AttackComplexity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.AttackComplexity) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSSv3.PrivilegesRequired} + */ + public enum PrivilegesRequired + implements com.google.protobuf.ProtocolMessageEnum { + /** + * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + PRIVILEGES_REQUIRED_UNSPECIFIED(0), + /** + * PRIVILEGES_REQUIRED_NONE = 1; + */ + PRIVILEGES_REQUIRED_NONE(1), + /** + * PRIVILEGES_REQUIRED_LOW = 2; + */ + PRIVILEGES_REQUIRED_LOW(2), + /** + * PRIVILEGES_REQUIRED_HIGH = 3; + */ + PRIVILEGES_REQUIRED_HIGH(3), + UNRECOGNIZED(-1), + ; + + /** + * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + public static final int PRIVILEGES_REQUIRED_UNSPECIFIED_VALUE = 0; + /** + * PRIVILEGES_REQUIRED_NONE = 1; + */ + public static final int PRIVILEGES_REQUIRED_NONE_VALUE = 1; + /** + * PRIVILEGES_REQUIRED_LOW = 2; + */ + public static final int PRIVILEGES_REQUIRED_LOW_VALUE = 2; + /** + * PRIVILEGES_REQUIRED_HIGH = 3; + */ + public static final int PRIVILEGES_REQUIRED_HIGH_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PrivilegesRequired valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PrivilegesRequired forNumber(int value) { + switch (value) { + case 0: return PRIVILEGES_REQUIRED_UNSPECIFIED; + case 1: return PRIVILEGES_REQUIRED_NONE; + case 2: return PRIVILEGES_REQUIRED_LOW; + case 3: return PRIVILEGES_REQUIRED_HIGH; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PrivilegesRequired> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PrivilegesRequired findValueByNumber(int number) { + return PrivilegesRequired.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(2); + } + + private static final PrivilegesRequired[] VALUES = values(); + + public static PrivilegesRequired valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PrivilegesRequired(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.PrivilegesRequired) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSSv3.UserInteraction} + */ + public enum UserInteraction + implements com.google.protobuf.ProtocolMessageEnum { + /** + * USER_INTERACTION_UNSPECIFIED = 0; + */ + USER_INTERACTION_UNSPECIFIED(0), + /** + * USER_INTERACTION_NONE = 1; + */ + USER_INTERACTION_NONE(1), + /** + * USER_INTERACTION_REQUIRED = 2; + */ + USER_INTERACTION_REQUIRED(2), + UNRECOGNIZED(-1), + ; + + /** + * USER_INTERACTION_UNSPECIFIED = 0; + */ + public static final int USER_INTERACTION_UNSPECIFIED_VALUE = 0; + /** + * USER_INTERACTION_NONE = 1; + */ + public static final int USER_INTERACTION_NONE_VALUE = 1; + /** + * USER_INTERACTION_REQUIRED = 2; + */ + public static final int USER_INTERACTION_REQUIRED_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UserInteraction valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static UserInteraction forNumber(int value) { + switch (value) { + case 0: return USER_INTERACTION_UNSPECIFIED; + case 1: return USER_INTERACTION_NONE; + case 2: return USER_INTERACTION_REQUIRED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + UserInteraction> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public UserInteraction findValueByNumber(int number) { + return UserInteraction.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(3); + } + + private static final UserInteraction[] VALUES = values(); + + public static UserInteraction valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private UserInteraction(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.UserInteraction) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSSv3.Scope} + */ + public enum Scope + implements com.google.protobuf.ProtocolMessageEnum { + /** + * SCOPE_UNSPECIFIED = 0; + */ + SCOPE_UNSPECIFIED(0), + /** + * SCOPE_UNCHANGED = 1; + */ + SCOPE_UNCHANGED(1), + /** + * SCOPE_CHANGED = 2; + */ + SCOPE_CHANGED(2), + UNRECOGNIZED(-1), + ; + + /** + * SCOPE_UNSPECIFIED = 0; + */ + public static final int SCOPE_UNSPECIFIED_VALUE = 0; + /** + * SCOPE_UNCHANGED = 1; + */ + public static final int SCOPE_UNCHANGED_VALUE = 1; + /** + * SCOPE_CHANGED = 2; + */ + public static final int SCOPE_CHANGED_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Scope valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Scope forNumber(int value) { + switch (value) { + case 0: return SCOPE_UNSPECIFIED; + case 1: return SCOPE_UNCHANGED; + case 2: return SCOPE_CHANGED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Scope> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Scope findValueByNumber(int number) { + return Scope.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(4); + } + + private static final Scope[] VALUES = values(); + + public static Scope valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Scope(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.Scope) + } + + /** + * Protobuf enum {@code grafeas.v1.CVSSv3.Impact} + */ + public enum Impact + implements com.google.protobuf.ProtocolMessageEnum { + /** + * IMPACT_UNSPECIFIED = 0; + */ + IMPACT_UNSPECIFIED(0), + /** + * IMPACT_HIGH = 1; + */ + IMPACT_HIGH(1), + /** + * IMPACT_LOW = 2; + */ + IMPACT_LOW(2), + /** + * IMPACT_NONE = 3; + */ + IMPACT_NONE(3), + UNRECOGNIZED(-1), + ; + + /** + * IMPACT_UNSPECIFIED = 0; + */ + public static final int IMPACT_UNSPECIFIED_VALUE = 0; + /** + * IMPACT_HIGH = 1; + */ + public static final int IMPACT_HIGH_VALUE = 1; + /** + * IMPACT_LOW = 2; + */ + public static final int IMPACT_LOW_VALUE = 2; + /** + * IMPACT_NONE = 3; + */ + public static final int IMPACT_NONE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Impact valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Impact forNumber(int value) { + switch (value) { + case 0: return IMPACT_UNSPECIFIED; + case 1: return IMPACT_HIGH; + case 2: return IMPACT_LOW; + case 3: return IMPACT_NONE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Impact> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Impact findValueByNumber(int number) { + return Impact.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(5); + } + + private static final Impact[] VALUES = values(); + + public static Impact valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Impact(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.Impact) + } + + public static final int BASE_SCORE_FIELD_NUMBER = 1; + private float baseScore_ = 0F; + /** + *
+   * The base score is a function of the base metric scores.
+   * 
+ * + * float base_score = 1; + * @return The baseScore. + */ + @java.lang.Override + public float getBaseScore() { + return baseScore_; + } + + public static final int EXPLOITABILITY_SCORE_FIELD_NUMBER = 2; + private float exploitabilityScore_ = 0F; + /** + * float exploitability_score = 2; + * @return The exploitabilityScore. + */ + @java.lang.Override + public float getExploitabilityScore() { + return exploitabilityScore_; + } + + public static final int IMPACT_SCORE_FIELD_NUMBER = 3; + private float impactScore_ = 0F; + /** + * float impact_score = 3; + * @return The impactScore. + */ + @java.lang.Override + public float getImpactScore() { + return impactScore_; + } + + public static final int ATTACK_VECTOR_FIELD_NUMBER = 5; + private int attackVector_ = 0; + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @return The enum numeric value on the wire for attackVector. + */ + @java.lang.Override public int getAttackVectorValue() { + return attackVector_; + } + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @return The attackVector. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.AttackVector getAttackVector() { + io.grafeas.v1.CVSSv3.AttackVector result = io.grafeas.v1.CVSSv3.AttackVector.forNumber(attackVector_); + return result == null ? io.grafeas.v1.CVSSv3.AttackVector.UNRECOGNIZED : result; + } + + public static final int ATTACK_COMPLEXITY_FIELD_NUMBER = 6; + private int attackComplexity_ = 0; + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return The enum numeric value on the wire for attackComplexity. + */ + @java.lang.Override public int getAttackComplexityValue() { + return attackComplexity_; + } + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return The attackComplexity. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.AttackComplexity getAttackComplexity() { + io.grafeas.v1.CVSSv3.AttackComplexity result = io.grafeas.v1.CVSSv3.AttackComplexity.forNumber(attackComplexity_); + return result == null ? io.grafeas.v1.CVSSv3.AttackComplexity.UNRECOGNIZED : result; + } + + public static final int PRIVILEGES_REQUIRED_FIELD_NUMBER = 7; + private int privilegesRequired_ = 0; + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return The enum numeric value on the wire for privilegesRequired. + */ + @java.lang.Override public int getPrivilegesRequiredValue() { + return privilegesRequired_; + } + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return The privilegesRequired. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.PrivilegesRequired getPrivilegesRequired() { + io.grafeas.v1.CVSSv3.PrivilegesRequired result = io.grafeas.v1.CVSSv3.PrivilegesRequired.forNumber(privilegesRequired_); + return result == null ? io.grafeas.v1.CVSSv3.PrivilegesRequired.UNRECOGNIZED : result; + } + + public static final int USER_INTERACTION_FIELD_NUMBER = 8; + private int userInteraction_ = 0; + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return The enum numeric value on the wire for userInteraction. + */ + @java.lang.Override public int getUserInteractionValue() { + return userInteraction_; + } + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return The userInteraction. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.UserInteraction getUserInteraction() { + io.grafeas.v1.CVSSv3.UserInteraction result = io.grafeas.v1.CVSSv3.UserInteraction.forNumber(userInteraction_); + return result == null ? io.grafeas.v1.CVSSv3.UserInteraction.UNRECOGNIZED : result; + } + + public static final int SCOPE_FIELD_NUMBER = 9; + private int scope_ = 0; + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override public int getScopeValue() { + return scope_; + } + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @return The scope. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.Scope getScope() { + io.grafeas.v1.CVSSv3.Scope result = io.grafeas.v1.CVSSv3.Scope.forNumber(scope_); + return result == null ? io.grafeas.v1.CVSSv3.Scope.UNRECOGNIZED : result; + } + + public static final int CONFIDENTIALITY_IMPACT_FIELD_NUMBER = 10; + private int confidentialityImpact_ = 0; + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return The enum numeric value on the wire for confidentialityImpact. + */ + @java.lang.Override public int getConfidentialityImpactValue() { + return confidentialityImpact_; + } + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return The confidentialityImpact. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.Impact getConfidentialityImpact() { + io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(confidentialityImpact_); + return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; + } + + public static final int INTEGRITY_IMPACT_FIELD_NUMBER = 11; + private int integrityImpact_ = 0; + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @return The enum numeric value on the wire for integrityImpact. + */ + @java.lang.Override public int getIntegrityImpactValue() { + return integrityImpact_; + } + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @return The integrityImpact. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.Impact getIntegrityImpact() { + io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(integrityImpact_); + return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; + } + + public static final int AVAILABILITY_IMPACT_FIELD_NUMBER = 12; + private int availabilityImpact_ = 0; + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @return The enum numeric value on the wire for availabilityImpact. + */ + @java.lang.Override public int getAvailabilityImpactValue() { + return availabilityImpact_; + } + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @return The availabilityImpact. + */ + @java.lang.Override public io.grafeas.v1.CVSSv3.Impact getAvailabilityImpact() { + io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(availabilityImpact_); + return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { + output.writeFloat(1, baseScore_); + } + if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { + output.writeFloat(2, exploitabilityScore_); + } + if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { + output.writeFloat(3, impactScore_); + } + if (attackVector_ != io.grafeas.v1.CVSSv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { + output.writeEnum(5, attackVector_); + } + if (attackComplexity_ != io.grafeas.v1.CVSSv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { + output.writeEnum(6, attackComplexity_); + } + if (privilegesRequired_ != io.grafeas.v1.CVSSv3.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { + output.writeEnum(7, privilegesRequired_); + } + if (userInteraction_ != io.grafeas.v1.CVSSv3.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { + output.writeEnum(8, userInteraction_); + } + if (scope_ != io.grafeas.v1.CVSSv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { + output.writeEnum(9, scope_); + } + if (confidentialityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(10, confidentialityImpact_); + } + if (integrityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(11, integrityImpact_); + } + if (availabilityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(12, availabilityImpact_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, baseScore_); + } + if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, exploitabilityScore_); + } + if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, impactScore_); + } + if (attackVector_ != io.grafeas.v1.CVSSv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, attackVector_); + } + if (attackComplexity_ != io.grafeas.v1.CVSSv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(6, attackComplexity_); + } + if (privilegesRequired_ != io.grafeas.v1.CVSSv3.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, privilegesRequired_); + } + if (userInteraction_ != io.grafeas.v1.CVSSv3.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, userInteraction_); + } + if (scope_ != io.grafeas.v1.CVSSv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, scope_); + } + if (confidentialityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, confidentialityImpact_); + } + if (integrityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, integrityImpact_); + } + if (availabilityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(12, availabilityImpact_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.CVSSv3)) { + return super.equals(obj); + } + io.grafeas.v1.CVSSv3 other = (io.grafeas.v1.CVSSv3) obj; + + if (java.lang.Float.floatToIntBits(getBaseScore()) + != java.lang.Float.floatToIntBits( + other.getBaseScore())) return false; + if (java.lang.Float.floatToIntBits(getExploitabilityScore()) + != java.lang.Float.floatToIntBits( + other.getExploitabilityScore())) return false; + if (java.lang.Float.floatToIntBits(getImpactScore()) + != java.lang.Float.floatToIntBits( + other.getImpactScore())) return false; + if (attackVector_ != other.attackVector_) return false; + if (attackComplexity_ != other.attackComplexity_) return false; + if (privilegesRequired_ != other.privilegesRequired_) return false; + if (userInteraction_ != other.userInteraction_) return false; + if (scope_ != other.scope_) return false; + if (confidentialityImpact_ != other.confidentialityImpact_) return false; + if (integrityImpact_ != other.integrityImpact_) return false; + if (availabilityImpact_ != other.availabilityImpact_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BASE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getBaseScore()); + hash = (37 * hash) + EXPLOITABILITY_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getExploitabilityScore()); + hash = (37 * hash) + IMPACT_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getImpactScore()); + hash = (37 * hash) + ATTACK_VECTOR_FIELD_NUMBER; + hash = (53 * hash) + attackVector_; + hash = (37 * hash) + ATTACK_COMPLEXITY_FIELD_NUMBER; + hash = (53 * hash) + attackComplexity_; + hash = (37 * hash) + PRIVILEGES_REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + privilegesRequired_; + hash = (37 * hash) + USER_INTERACTION_FIELD_NUMBER; + hash = (53 * hash) + userInteraction_; + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + scope_; + hash = (37 * hash) + CONFIDENTIALITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + confidentialityImpact_; + hash = (37 * hash) + INTEGRITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + integrityImpact_; + hash = (37 * hash) + AVAILABILITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + availabilityImpact_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.CVSSv3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CVSSv3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CVSSv3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CVSSv3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CVSSv3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CVSSv3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CVSSv3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CVSSv3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CVSSv3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.CVSSv3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CVSSv3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CVSSv3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.CVSSv3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Common Vulnerability Scoring System version 3.
+   * For details, see https://www.first.org/cvss/specification-document
+   * 
+ * + * Protobuf type {@code grafeas.v1.CVSSv3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.CVSSv3) + io.grafeas.v1.CVSSv3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CVSSv3.class, io.grafeas.v1.CVSSv3.Builder.class); + } + + // Construct using io.grafeas.v1.CVSSv3.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + baseScore_ = 0F; + exploitabilityScore_ = 0F; + impactScore_ = 0F; + attackVector_ = 0; + attackComplexity_ = 0; + privilegesRequired_ = 0; + userInteraction_ = 0; + scope_ = 0; + confidentialityImpact_ = 0; + integrityImpact_ = 0; + availabilityImpact_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.CVSSv3 getDefaultInstanceForType() { + return io.grafeas.v1.CVSSv3.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.CVSSv3 build() { + io.grafeas.v1.CVSSv3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.CVSSv3 buildPartial() { + io.grafeas.v1.CVSSv3 result = new io.grafeas.v1.CVSSv3(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.CVSSv3 result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.baseScore_ = baseScore_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.exploitabilityScore_ = exploitabilityScore_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.impactScore_ = impactScore_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.attackVector_ = attackVector_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.attackComplexity_ = attackComplexity_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.privilegesRequired_ = privilegesRequired_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.userInteraction_ = userInteraction_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.scope_ = scope_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.confidentialityImpact_ = confidentialityImpact_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.integrityImpact_ = integrityImpact_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.availabilityImpact_ = availabilityImpact_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.CVSSv3) { + return mergeFrom((io.grafeas.v1.CVSSv3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.CVSSv3 other) { + if (other == io.grafeas.v1.CVSSv3.getDefaultInstance()) return this; + if (other.getBaseScore() != 0F) { + setBaseScore(other.getBaseScore()); + } + if (other.getExploitabilityScore() != 0F) { + setExploitabilityScore(other.getExploitabilityScore()); + } + if (other.getImpactScore() != 0F) { + setImpactScore(other.getImpactScore()); + } + if (other.attackVector_ != 0) { + setAttackVectorValue(other.getAttackVectorValue()); + } + if (other.attackComplexity_ != 0) { + setAttackComplexityValue(other.getAttackComplexityValue()); + } + if (other.privilegesRequired_ != 0) { + setPrivilegesRequiredValue(other.getPrivilegesRequiredValue()); + } + if (other.userInteraction_ != 0) { + setUserInteractionValue(other.getUserInteractionValue()); + } + if (other.scope_ != 0) { + setScopeValue(other.getScopeValue()); + } + if (other.confidentialityImpact_ != 0) { + setConfidentialityImpactValue(other.getConfidentialityImpactValue()); + } + if (other.integrityImpact_ != 0) { + setIntegrityImpactValue(other.getIntegrityImpactValue()); + } + if (other.availabilityImpact_ != 0) { + setAvailabilityImpactValue(other.getAvailabilityImpactValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + baseScore_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: { + exploitabilityScore_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: { + impactScore_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 40: { + attackVector_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 40 + case 48: { + attackComplexity_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 48 + case 56: { + privilegesRequired_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 56 + case 64: { + userInteraction_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 64 + case 72: { + scope_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 72 + case 80: { + confidentialityImpact_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 80 + case 88: { + integrityImpact_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 88 + case 96: { + availabilityImpact_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 96 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private float baseScore_ ; + /** + *
+     * The base score is a function of the base metric scores.
+     * 
+ * + * float base_score = 1; + * @return The baseScore. + */ + @java.lang.Override + public float getBaseScore() { + return baseScore_; + } + /** + *
+     * The base score is a function of the base metric scores.
+     * 
+ * + * float base_score = 1; + * @param value The baseScore to set. + * @return This builder for chaining. + */ + public Builder setBaseScore(float value) { + + baseScore_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The base score is a function of the base metric scores.
+     * 
+ * + * float base_score = 1; + * @return This builder for chaining. + */ + public Builder clearBaseScore() { + bitField0_ = (bitField0_ & ~0x00000001); + baseScore_ = 0F; + onChanged(); + return this; + } + + private float exploitabilityScore_ ; + /** + * float exploitability_score = 2; + * @return The exploitabilityScore. + */ + @java.lang.Override + public float getExploitabilityScore() { + return exploitabilityScore_; + } + /** + * float exploitability_score = 2; + * @param value The exploitabilityScore to set. + * @return This builder for chaining. + */ + public Builder setExploitabilityScore(float value) { + + exploitabilityScore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * float exploitability_score = 2; + * @return This builder for chaining. + */ + public Builder clearExploitabilityScore() { + bitField0_ = (bitField0_ & ~0x00000002); + exploitabilityScore_ = 0F; + onChanged(); + return this; + } + + private float impactScore_ ; + /** + * float impact_score = 3; + * @return The impactScore. + */ + @java.lang.Override + public float getImpactScore() { + return impactScore_; + } + /** + * float impact_score = 3; + * @param value The impactScore to set. + * @return This builder for chaining. + */ + public Builder setImpactScore(float value) { + + impactScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * float impact_score = 3; + * @return This builder for chaining. + */ + public Builder clearImpactScore() { + bitField0_ = (bitField0_ & ~0x00000004); + impactScore_ = 0F; + onChanged(); + return this; + } + + private int attackVector_ = 0; + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @return The enum numeric value on the wire for attackVector. + */ + @java.lang.Override public int getAttackVectorValue() { + return attackVector_; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @param value The enum numeric value on the wire for attackVector to set. + * @return This builder for chaining. + */ + public Builder setAttackVectorValue(int value) { + attackVector_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @return The attackVector. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.AttackVector getAttackVector() { + io.grafeas.v1.CVSSv3.AttackVector result = io.grafeas.v1.CVSSv3.AttackVector.forNumber(attackVector_); + return result == null ? io.grafeas.v1.CVSSv3.AttackVector.UNRECOGNIZED : result; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @param value The attackVector to set. + * @return This builder for chaining. + */ + public Builder setAttackVector(io.grafeas.v1.CVSSv3.AttackVector value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + attackVector_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @return This builder for chaining. + */ + public Builder clearAttackVector() { + bitField0_ = (bitField0_ & ~0x00000008); + attackVector_ = 0; + onChanged(); + return this; + } + + private int attackComplexity_ = 0; + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return The enum numeric value on the wire for attackComplexity. + */ + @java.lang.Override public int getAttackComplexityValue() { + return attackComplexity_; + } + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @param value The enum numeric value on the wire for attackComplexity to set. + * @return This builder for chaining. + */ + public Builder setAttackComplexityValue(int value) { + attackComplexity_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return The attackComplexity. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.AttackComplexity getAttackComplexity() { + io.grafeas.v1.CVSSv3.AttackComplexity result = io.grafeas.v1.CVSSv3.AttackComplexity.forNumber(attackComplexity_); + return result == null ? io.grafeas.v1.CVSSv3.AttackComplexity.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @param value The attackComplexity to set. + * @return This builder for chaining. + */ + public Builder setAttackComplexity(io.grafeas.v1.CVSSv3.AttackComplexity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + attackComplexity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return This builder for chaining. + */ + public Builder clearAttackComplexity() { + bitField0_ = (bitField0_ & ~0x00000010); + attackComplexity_ = 0; + onChanged(); + return this; + } + + private int privilegesRequired_ = 0; + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return The enum numeric value on the wire for privilegesRequired. + */ + @java.lang.Override public int getPrivilegesRequiredValue() { + return privilegesRequired_; + } + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @param value The enum numeric value on the wire for privilegesRequired to set. + * @return This builder for chaining. + */ + public Builder setPrivilegesRequiredValue(int value) { + privilegesRequired_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return The privilegesRequired. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.PrivilegesRequired getPrivilegesRequired() { + io.grafeas.v1.CVSSv3.PrivilegesRequired result = io.grafeas.v1.CVSSv3.PrivilegesRequired.forNumber(privilegesRequired_); + return result == null ? io.grafeas.v1.CVSSv3.PrivilegesRequired.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @param value The privilegesRequired to set. + * @return This builder for chaining. + */ + public Builder setPrivilegesRequired(io.grafeas.v1.CVSSv3.PrivilegesRequired value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + privilegesRequired_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return This builder for chaining. + */ + public Builder clearPrivilegesRequired() { + bitField0_ = (bitField0_ & ~0x00000020); + privilegesRequired_ = 0; + onChanged(); + return this; + } + + private int userInteraction_ = 0; + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return The enum numeric value on the wire for userInteraction. + */ + @java.lang.Override public int getUserInteractionValue() { + return userInteraction_; + } + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @param value The enum numeric value on the wire for userInteraction to set. + * @return This builder for chaining. + */ + public Builder setUserInteractionValue(int value) { + userInteraction_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return The userInteraction. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.UserInteraction getUserInteraction() { + io.grafeas.v1.CVSSv3.UserInteraction result = io.grafeas.v1.CVSSv3.UserInteraction.forNumber(userInteraction_); + return result == null ? io.grafeas.v1.CVSSv3.UserInteraction.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @param value The userInteraction to set. + * @return This builder for chaining. + */ + public Builder setUserInteraction(io.grafeas.v1.CVSSv3.UserInteraction value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + userInteraction_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return This builder for chaining. + */ + public Builder clearUserInteraction() { + bitField0_ = (bitField0_ & ~0x00000040); + userInteraction_ = 0; + onChanged(); + return this; + } + + private int scope_ = 0; + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override public int getScopeValue() { + return scope_; + } + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @param value The enum numeric value on the wire for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeValue(int value) { + scope_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @return The scope. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.Scope getScope() { + io.grafeas.v1.CVSSv3.Scope result = io.grafeas.v1.CVSSv3.Scope.forNumber(scope_); + return result == null ? io.grafeas.v1.CVSSv3.Scope.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(io.grafeas.v1.CVSSv3.Scope value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + scope_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @return This builder for chaining. + */ + public Builder clearScope() { + bitField0_ = (bitField0_ & ~0x00000080); + scope_ = 0; + onChanged(); + return this; + } + + private int confidentialityImpact_ = 0; + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return The enum numeric value on the wire for confidentialityImpact. + */ + @java.lang.Override public int getConfidentialityImpactValue() { + return confidentialityImpact_; + } + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @param value The enum numeric value on the wire for confidentialityImpact to set. + * @return This builder for chaining. + */ + public Builder setConfidentialityImpactValue(int value) { + confidentialityImpact_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return The confidentialityImpact. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.Impact getConfidentialityImpact() { + io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(confidentialityImpact_); + return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @param value The confidentialityImpact to set. + * @return This builder for chaining. + */ + public Builder setConfidentialityImpact(io.grafeas.v1.CVSSv3.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + confidentialityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return This builder for chaining. + */ + public Builder clearConfidentialityImpact() { + bitField0_ = (bitField0_ & ~0x00000100); + confidentialityImpact_ = 0; + onChanged(); + return this; + } + + private int integrityImpact_ = 0; + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @return The enum numeric value on the wire for integrityImpact. + */ + @java.lang.Override public int getIntegrityImpactValue() { + return integrityImpact_; + } + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @param value The enum numeric value on the wire for integrityImpact to set. + * @return This builder for chaining. + */ + public Builder setIntegrityImpactValue(int value) { + integrityImpact_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @return The integrityImpact. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.Impact getIntegrityImpact() { + io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(integrityImpact_); + return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @param value The integrityImpact to set. + * @return This builder for chaining. + */ + public Builder setIntegrityImpact(io.grafeas.v1.CVSSv3.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + integrityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @return This builder for chaining. + */ + public Builder clearIntegrityImpact() { + bitField0_ = (bitField0_ & ~0x00000200); + integrityImpact_ = 0; + onChanged(); + return this; + } + + private int availabilityImpact_ = 0; + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @return The enum numeric value on the wire for availabilityImpact. + */ + @java.lang.Override public int getAvailabilityImpactValue() { + return availabilityImpact_; + } + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @param value The enum numeric value on the wire for availabilityImpact to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityImpactValue(int value) { + availabilityImpact_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @return The availabilityImpact. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3.Impact getAvailabilityImpact() { + io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(availabilityImpact_); + return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @param value The availabilityImpact to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityImpact(io.grafeas.v1.CVSSv3.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + availabilityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @return This builder for chaining. + */ + public Builder clearAvailabilityImpact() { + bitField0_ = (bitField0_ & ~0x00000400); + availabilityImpact_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.CVSSv3) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.CVSSv3) + private static final io.grafeas.v1.CVSSv3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.CVSSv3(); + } + + public static io.grafeas.v1.CVSSv3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CVSSv3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.CVSSv3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java new file mode 100644 index 000000000000..f171b18e246c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/cvss.proto + +package io.grafeas.v1; + +public interface CVSSv3OrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.CVSSv3) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The base score is a function of the base metric scores.
+   * 
+ * + * float base_score = 1; + * @return The baseScore. + */ + float getBaseScore(); + + /** + * float exploitability_score = 2; + * @return The exploitabilityScore. + */ + float getExploitabilityScore(); + + /** + * float impact_score = 3; + * @return The impactScore. + */ + float getImpactScore(); + + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @return The enum numeric value on the wire for attackVector. + */ + int getAttackVectorValue(); + /** + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * 
+ * + * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @return The attackVector. + */ + io.grafeas.v1.CVSSv3.AttackVector getAttackVector(); + + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return The enum numeric value on the wire for attackComplexity. + */ + int getAttackComplexityValue(); + /** + * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return The attackComplexity. + */ + io.grafeas.v1.CVSSv3.AttackComplexity getAttackComplexity(); + + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return The enum numeric value on the wire for privilegesRequired. + */ + int getPrivilegesRequiredValue(); + /** + * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return The privilegesRequired. + */ + io.grafeas.v1.CVSSv3.PrivilegesRequired getPrivilegesRequired(); + + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return The enum numeric value on the wire for userInteraction. + */ + int getUserInteractionValue(); + /** + * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return The userInteraction. + */ + io.grafeas.v1.CVSSv3.UserInteraction getUserInteraction(); + + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @return The enum numeric value on the wire for scope. + */ + int getScopeValue(); + /** + * .grafeas.v1.CVSSv3.Scope scope = 9; + * @return The scope. + */ + io.grafeas.v1.CVSSv3.Scope getScope(); + + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return The enum numeric value on the wire for confidentialityImpact. + */ + int getConfidentialityImpactValue(); + /** + * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return The confidentialityImpact. + */ + io.grafeas.v1.CVSSv3.Impact getConfidentialityImpact(); + + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @return The enum numeric value on the wire for integrityImpact. + */ + int getIntegrityImpactValue(); + /** + * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @return The integrityImpact. + */ + io.grafeas.v1.CVSSv3.Impact getIntegrityImpact(); + + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @return The enum numeric value on the wire for availabilityImpact. + */ + int getAvailabilityImpactValue(); + /** + * .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @return The availabilityImpact. + */ + io.grafeas.v1.CVSSv3.Impact getAvailabilityImpact(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java new file mode 100644 index 000000000000..8839140816d8 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java @@ -0,0 +1,1186 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * A CloudRepoSourceContext denotes a particular revision in a Google Cloud
+ * Source Repo.
+ * 
+ * + * Protobuf type {@code grafeas.v1.CloudRepoSourceContext} + */ +public final class CloudRepoSourceContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.CloudRepoSourceContext) + CloudRepoSourceContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use CloudRepoSourceContext.newBuilder() to construct. + private CloudRepoSourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CloudRepoSourceContext() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CloudRepoSourceContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CloudRepoSourceContext.class, io.grafeas.v1.CloudRepoSourceContext.Builder.class); + } + + private int revisionCase_ = 0; + private java.lang.Object revision_; + public enum RevisionCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REVISION_ID(2), + ALIAS_CONTEXT(3), + REVISION_NOT_SET(0); + private final int value; + private RevisionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RevisionCase valueOf(int value) { + return forNumber(value); + } + + public static RevisionCase forNumber(int value) { + switch (value) { + case 2: return REVISION_ID; + case 3: return ALIAS_CONTEXT; + case 0: return REVISION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public RevisionCase + getRevisionCase() { + return RevisionCase.forNumber( + revisionCase_); + } + + public static final int REPO_ID_FIELD_NUMBER = 1; + private io.grafeas.v1.RepoId repoId_; + /** + *
+   * The ID of the repo.
+   * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + * @return Whether the repoId field is set. + */ + @java.lang.Override + public boolean hasRepoId() { + return repoId_ != null; + } + /** + *
+   * The ID of the repo.
+   * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + * @return The repoId. + */ + @java.lang.Override + public io.grafeas.v1.RepoId getRepoId() { + return repoId_ == null ? io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; + } + /** + *
+   * The ID of the repo.
+   * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + @java.lang.Override + public io.grafeas.v1.RepoIdOrBuilder getRepoIdOrBuilder() { + return repoId_ == null ? io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; + } + + public static final int REVISION_ID_FIELD_NUMBER = 2; + /** + *
+   * A revision ID.
+   * 
+ * + * string revision_id = 2; + * @return Whether the revisionId field is set. + */ + public boolean hasRevisionId() { + return revisionCase_ == 2; + } + /** + *
+   * A revision ID.
+   * 
+ * + * string revision_id = 2; + * @return The revisionId. + */ + public java.lang.String getRevisionId() { + java.lang.Object ref = ""; + if (revisionCase_ == 2) { + ref = revision_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (revisionCase_ == 2) { + revision_ = s; + } + return s; + } + } + /** + *
+   * A revision ID.
+   * 
+ * + * string revision_id = 2; + * @return The bytes for revisionId. + */ + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = ""; + if (revisionCase_ == 2) { + ref = revision_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (revisionCase_ == 2) { + revision_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALIAS_CONTEXT_FIELD_NUMBER = 3; + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + * @return Whether the aliasContext field is set. + */ + @java.lang.Override + public boolean hasAliasContext() { + return revisionCase_ == 3; + } + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + * @return The aliasContext. + */ + @java.lang.Override + public io.grafeas.v1.AliasContext getAliasContext() { + if (revisionCase_ == 3) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + @java.lang.Override + public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { + if (revisionCase_ == 3) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (repoId_ != null) { + output.writeMessage(1, getRepoId()); + } + if (revisionCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, revision_); + } + if (revisionCase_ == 3) { + output.writeMessage(3, (io.grafeas.v1.AliasContext) revision_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (repoId_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRepoId()); + } + if (revisionCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, revision_); + } + if (revisionCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (io.grafeas.v1.AliasContext) revision_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.CloudRepoSourceContext)) { + return super.equals(obj); + } + io.grafeas.v1.CloudRepoSourceContext other = (io.grafeas.v1.CloudRepoSourceContext) obj; + + if (hasRepoId() != other.hasRepoId()) return false; + if (hasRepoId()) { + if (!getRepoId() + .equals(other.getRepoId())) return false; + } + if (!getRevisionCase().equals(other.getRevisionCase())) return false; + switch (revisionCase_) { + case 2: + if (!getRevisionId() + .equals(other.getRevisionId())) return false; + break; + case 3: + if (!getAliasContext() + .equals(other.getAliasContext())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRepoId()) { + hash = (37 * hash) + REPO_ID_FIELD_NUMBER; + hash = (53 * hash) + getRepoId().hashCode(); + } + switch (revisionCase_) { + case 2: + hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRevisionId().hashCode(); + break; + case 3: + hash = (37 * hash) + ALIAS_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getAliasContext().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CloudRepoSourceContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.CloudRepoSourceContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CloudRepoSourceContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.CloudRepoSourceContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A CloudRepoSourceContext denotes a particular revision in a Google Cloud
+   * Source Repo.
+   * 
+ * + * Protobuf type {@code grafeas.v1.CloudRepoSourceContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.CloudRepoSourceContext) + io.grafeas.v1.CloudRepoSourceContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CloudRepoSourceContext.class, io.grafeas.v1.CloudRepoSourceContext.Builder.class); + } + + // Construct using io.grafeas.v1.CloudRepoSourceContext.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + repoId_ = null; + if (repoIdBuilder_ != null) { + repoIdBuilder_.dispose(); + repoIdBuilder_ = null; + } + if (aliasContextBuilder_ != null) { + aliasContextBuilder_.clear(); + } + revisionCase_ = 0; + revision_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContext getDefaultInstanceForType() { + return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContext build() { + io.grafeas.v1.CloudRepoSourceContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContext buildPartial() { + io.grafeas.v1.CloudRepoSourceContext result = new io.grafeas.v1.CloudRepoSourceContext(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.CloudRepoSourceContext result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.repoId_ = repoIdBuilder_ == null + ? repoId_ + : repoIdBuilder_.build(); + } + } + + private void buildPartialOneofs(io.grafeas.v1.CloudRepoSourceContext result) { + result.revisionCase_ = revisionCase_; + result.revision_ = this.revision_; + if (revisionCase_ == 3 && + aliasContextBuilder_ != null) { + result.revision_ = aliasContextBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.CloudRepoSourceContext) { + return mergeFrom((io.grafeas.v1.CloudRepoSourceContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.CloudRepoSourceContext other) { + if (other == io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance()) return this; + if (other.hasRepoId()) { + mergeRepoId(other.getRepoId()); + } + switch (other.getRevisionCase()) { + case REVISION_ID: { + revisionCase_ = 2; + revision_ = other.revision_; + onChanged(); + break; + } + case ALIAS_CONTEXT: { + mergeAliasContext(other.getAliasContext()); + break; + } + case REVISION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getRepoIdFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + revisionCase_ = 2; + revision_ = s; + break; + } // case 18 + case 26: { + input.readMessage( + getAliasContextFieldBuilder().getBuilder(), + extensionRegistry); + revisionCase_ = 3; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int revisionCase_ = 0; + private java.lang.Object revision_; + public RevisionCase + getRevisionCase() { + return RevisionCase.forNumber( + revisionCase_); + } + + public Builder clearRevision() { + revisionCase_ = 0; + revision_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private io.grafeas.v1.RepoId repoId_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.RepoId, io.grafeas.v1.RepoId.Builder, io.grafeas.v1.RepoIdOrBuilder> repoIdBuilder_; + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + * @return Whether the repoId field is set. + */ + public boolean hasRepoId() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + * @return The repoId. + */ + public io.grafeas.v1.RepoId getRepoId() { + if (repoIdBuilder_ == null) { + return repoId_ == null ? io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; + } else { + return repoIdBuilder_.getMessage(); + } + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + public Builder setRepoId(io.grafeas.v1.RepoId value) { + if (repoIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + repoId_ = value; + } else { + repoIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + public Builder setRepoId( + io.grafeas.v1.RepoId.Builder builderForValue) { + if (repoIdBuilder_ == null) { + repoId_ = builderForValue.build(); + } else { + repoIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + public Builder mergeRepoId(io.grafeas.v1.RepoId value) { + if (repoIdBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + repoId_ != null && + repoId_ != io.grafeas.v1.RepoId.getDefaultInstance()) { + getRepoIdBuilder().mergeFrom(value); + } else { + repoId_ = value; + } + } else { + repoIdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + public Builder clearRepoId() { + bitField0_ = (bitField0_ & ~0x00000001); + repoId_ = null; + if (repoIdBuilder_ != null) { + repoIdBuilder_.dispose(); + repoIdBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + public io.grafeas.v1.RepoId.Builder getRepoIdBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRepoIdFieldBuilder().getBuilder(); + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + public io.grafeas.v1.RepoIdOrBuilder getRepoIdOrBuilder() { + if (repoIdBuilder_ != null) { + return repoIdBuilder_.getMessageOrBuilder(); + } else { + return repoId_ == null ? + io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; + } + } + /** + *
+     * The ID of the repo.
+     * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.RepoId, io.grafeas.v1.RepoId.Builder, io.grafeas.v1.RepoIdOrBuilder> + getRepoIdFieldBuilder() { + if (repoIdBuilder_ == null) { + repoIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.RepoId, io.grafeas.v1.RepoId.Builder, io.grafeas.v1.RepoIdOrBuilder>( + getRepoId(), + getParentForChildren(), + isClean()); + repoId_ = null; + } + return repoIdBuilder_; + } + + /** + *
+     * A revision ID.
+     * 
+ * + * string revision_id = 2; + * @return Whether the revisionId field is set. + */ + @java.lang.Override + public boolean hasRevisionId() { + return revisionCase_ == 2; + } + /** + *
+     * A revision ID.
+     * 
+ * + * string revision_id = 2; + * @return The revisionId. + */ + @java.lang.Override + public java.lang.String getRevisionId() { + java.lang.Object ref = ""; + if (revisionCase_ == 2) { + ref = revision_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (revisionCase_ == 2) { + revision_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A revision ID.
+     * 
+ * + * string revision_id = 2; + * @return The bytes for revisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = ""; + if (revisionCase_ == 2) { + ref = revision_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (revisionCase_ == 2) { + revision_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A revision ID.
+     * 
+ * + * string revision_id = 2; + * @param value The revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + revisionCase_ = 2; + revision_ = value; + onChanged(); + return this; + } + /** + *
+     * A revision ID.
+     * 
+ * + * string revision_id = 2; + * @return This builder for chaining. + */ + public Builder clearRevisionId() { + if (revisionCase_ == 2) { + revisionCase_ = 0; + revision_ = null; + onChanged(); + } + return this; + } + /** + *
+     * A revision ID.
+     * 
+ * + * string revision_id = 2; + * @param value The bytes for revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + revisionCase_ = 2; + revision_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> aliasContextBuilder_; + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + * @return Whether the aliasContext field is set. + */ + @java.lang.Override + public boolean hasAliasContext() { + return revisionCase_ == 3; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + * @return The aliasContext. + */ + @java.lang.Override + public io.grafeas.v1.AliasContext getAliasContext() { + if (aliasContextBuilder_ == null) { + if (revisionCase_ == 3) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } else { + if (revisionCase_ == 3) { + return aliasContextBuilder_.getMessage(); + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + public Builder setAliasContext(io.grafeas.v1.AliasContext value) { + if (aliasContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + revision_ = value; + onChanged(); + } else { + aliasContextBuilder_.setMessage(value); + } + revisionCase_ = 3; + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + public Builder setAliasContext( + io.grafeas.v1.AliasContext.Builder builderForValue) { + if (aliasContextBuilder_ == null) { + revision_ = builderForValue.build(); + onChanged(); + } else { + aliasContextBuilder_.setMessage(builderForValue.build()); + } + revisionCase_ = 3; + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + public Builder mergeAliasContext(io.grafeas.v1.AliasContext value) { + if (aliasContextBuilder_ == null) { + if (revisionCase_ == 3 && + revision_ != io.grafeas.v1.AliasContext.getDefaultInstance()) { + revision_ = io.grafeas.v1.AliasContext.newBuilder((io.grafeas.v1.AliasContext) revision_) + .mergeFrom(value).buildPartial(); + } else { + revision_ = value; + } + onChanged(); + } else { + if (revisionCase_ == 3) { + aliasContextBuilder_.mergeFrom(value); + } else { + aliasContextBuilder_.setMessage(value); + } + } + revisionCase_ = 3; + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + public Builder clearAliasContext() { + if (aliasContextBuilder_ == null) { + if (revisionCase_ == 3) { + revisionCase_ = 0; + revision_ = null; + onChanged(); + } + } else { + if (revisionCase_ == 3) { + revisionCase_ = 0; + revision_ = null; + } + aliasContextBuilder_.clear(); + } + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + public io.grafeas.v1.AliasContext.Builder getAliasContextBuilder() { + return getAliasContextFieldBuilder().getBuilder(); + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + @java.lang.Override + public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { + if ((revisionCase_ == 3) && (aliasContextBuilder_ != null)) { + return aliasContextBuilder_.getMessageOrBuilder(); + } else { + if (revisionCase_ == 3) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> + getAliasContextFieldBuilder() { + if (aliasContextBuilder_ == null) { + if (!(revisionCase_ == 3)) { + revision_ = io.grafeas.v1.AliasContext.getDefaultInstance(); + } + aliasContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder>( + (io.grafeas.v1.AliasContext) revision_, + getParentForChildren(), + isClean()); + revision_ = null; + } + revisionCase_ = 3; + onChanged(); + return aliasContextBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.CloudRepoSourceContext) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.CloudRepoSourceContext) + private static final io.grafeas.v1.CloudRepoSourceContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.CloudRepoSourceContext(); + } + + public static io.grafeas.v1.CloudRepoSourceContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudRepoSourceContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java new file mode 100644 index 000000000000..adebca3e3ee9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java @@ -0,0 +1,94 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface CloudRepoSourceContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.CloudRepoSourceContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the repo.
+   * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + * @return Whether the repoId field is set. + */ + boolean hasRepoId(); + /** + *
+   * The ID of the repo.
+   * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + * @return The repoId. + */ + io.grafeas.v1.RepoId getRepoId(); + /** + *
+   * The ID of the repo.
+   * 
+ * + * .grafeas.v1.RepoId repo_id = 1; + */ + io.grafeas.v1.RepoIdOrBuilder getRepoIdOrBuilder(); + + /** + *
+   * A revision ID.
+   * 
+ * + * string revision_id = 2; + * @return Whether the revisionId field is set. + */ + boolean hasRevisionId(); + /** + *
+   * A revision ID.
+   * 
+ * + * string revision_id = 2; + * @return The revisionId. + */ + java.lang.String getRevisionId(); + /** + *
+   * A revision ID.
+   * 
+ * + * string revision_id = 2; + * @return The bytes for revisionId. + */ + com.google.protobuf.ByteString + getRevisionIdBytes(); + + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + * @return Whether the aliasContext field is set. + */ + boolean hasAliasContext(); + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + * @return The aliasContext. + */ + io.grafeas.v1.AliasContext getAliasContext(); + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 3; + */ + io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder(); + + public io.grafeas.v1.CloudRepoSourceContext.RevisionCase getRevisionCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java new file mode 100644 index 000000000000..b1027d8a00bd --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java @@ -0,0 +1,1632 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Command describes a step performed as part of the build pipeline.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Command} + */ +public final class Command extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Command) + CommandOrBuilder { +private static final long serialVersionUID = 0L; + // Use Command.newBuilder() to construct. + private Command(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Command() { + name_ = ""; + env_ = com.google.protobuf.LazyStringArrayList.EMPTY; + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + dir_ = ""; + id_ = ""; + waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Command(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Command.class, io.grafeas.v1.Command.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. Name of the command, as presented on the command line, or if the
+   * command is packaged as a Docker container, as presented to `docker pull`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Name of the command, as presented on the command line, or if the
+   * command is packaged as a Docker container, as presented to `docker pull`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENV_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList env_; + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @return A list containing the env. + */ + public com.google.protobuf.ProtocolStringList + getEnvList() { + return env_; + } + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @return The count of env. + */ + public int getEnvCount() { + return env_.size(); + } + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @param index The index of the element to return. + * @return The env at the given index. + */ + public java.lang.String getEnv(int index) { + return env_.get(index); + } + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @param index The index of the value to return. + * @return The bytes of the env at the given index. + */ + public com.google.protobuf.ByteString + getEnvBytes(int index) { + return env_.getByteString(index); + } + + public static final int ARGS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList args_; + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList + getArgsList() { + return args_; + } + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString + getArgsBytes(int index) { + return args_.getByteString(index); + } + + public static final int DIR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object dir_ = ""; + /** + *
+   * Working directory (relative to project source root) used when running this
+   * command.
+   * 
+ * + * string dir = 4; + * @return The dir. + */ + @java.lang.Override + public java.lang.String getDir() { + java.lang.Object ref = dir_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dir_ = s; + return s; + } + } + /** + *
+   * Working directory (relative to project source root) used when running this
+   * command.
+   * 
+ * + * string dir = 4; + * @return The bytes for dir. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDirBytes() { + java.lang.Object ref = dir_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * Optional unique identifier for this command, used in wait_for to reference
+   * this command as a dependency.
+   * 
+ * + * string id = 5; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * Optional unique identifier for this command, used in wait_for to reference
+   * this command as a dependency.
+   * 
+ * + * string id = 5; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WAIT_FOR_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList waitFor_; + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @return A list containing the waitFor. + */ + public com.google.protobuf.ProtocolStringList + getWaitForList() { + return waitFor_; + } + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @return The count of waitFor. + */ + public int getWaitForCount() { + return waitFor_.size(); + } + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @param index The index of the element to return. + * @return The waitFor at the given index. + */ + public java.lang.String getWaitFor(int index) { + return waitFor_.get(index); + } + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @param index The index of the value to return. + * @return The bytes of the waitFor at the given index. + */ + public com.google.protobuf.ByteString + getWaitForBytes(int index) { + return waitFor_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < env_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, env_.getRaw(i)); + } + for (int i = 0; i < args_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, args_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dir_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dir_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, id_); + } + for (int i = 0; i < waitFor_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, waitFor_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < env_.size(); i++) { + dataSize += computeStringSizeNoTag(env_.getRaw(i)); + } + size += dataSize; + size += 1 * getEnvList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < args_.size(); i++) { + dataSize += computeStringSizeNoTag(args_.getRaw(i)); + } + size += dataSize; + size += 1 * getArgsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dir_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dir_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, id_); + } + { + int dataSize = 0; + for (int i = 0; i < waitFor_.size(); i++) { + dataSize += computeStringSizeNoTag(waitFor_.getRaw(i)); + } + size += dataSize; + size += 1 * getWaitForList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Command)) { + return super.equals(obj); + } + io.grafeas.v1.Command other = (io.grafeas.v1.Command) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getEnvList() + .equals(other.getEnvList())) return false; + if (!getArgsList() + .equals(other.getArgsList())) return false; + if (!getDir() + .equals(other.getDir())) return false; + if (!getId() + .equals(other.getId())) return false; + if (!getWaitForList() + .equals(other.getWaitForList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getEnvCount() > 0) { + hash = (37 * hash) + ENV_FIELD_NUMBER; + hash = (53 * hash) + getEnvList().hashCode(); + } + if (getArgsCount() > 0) { + hash = (37 * hash) + ARGS_FIELD_NUMBER; + hash = (53 * hash) + getArgsList().hashCode(); + } + hash = (37 * hash) + DIR_FIELD_NUMBER; + hash = (53 * hash) + getDir().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getWaitForCount() > 0) { + hash = (37 * hash) + WAIT_FOR_FIELD_NUMBER; + hash = (53 * hash) + getWaitForList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Command parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Command parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Command parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Command parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Command parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Command parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Command parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Command parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Command parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Command parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Command parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Command parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Command prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Command describes a step performed as part of the build pipeline.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Command} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Command) + io.grafeas.v1.CommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Command.class, io.grafeas.v1.Command.Builder.class); + } + + // Construct using io.grafeas.v1.Command.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + env_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + dir_ = ""; + id_ = ""; + waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Command getDefaultInstanceForType() { + return io.grafeas.v1.Command.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Command build() { + io.grafeas.v1.Command result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Command buildPartial() { + io.grafeas.v1.Command result = new io.grafeas.v1.Command(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.Command result) { + if (((bitField0_ & 0x00000002) != 0)) { + env_ = env_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.env_ = env_; + if (((bitField0_ & 0x00000004) != 0)) { + args_ = args_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.args_ = args_; + if (((bitField0_ & 0x00000020) != 0)) { + waitFor_ = waitFor_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.waitFor_ = waitFor_; + } + + private void buildPartial0(io.grafeas.v1.Command result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.dir_ = dir_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Command) { + return mergeFrom((io.grafeas.v1.Command)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Command other) { + if (other == io.grafeas.v1.Command.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.env_.isEmpty()) { + if (env_.isEmpty()) { + env_ = other.env_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEnvIsMutable(); + env_.addAll(other.env_); + } + onChanged(); + } + if (!other.args_.isEmpty()) { + if (args_.isEmpty()) { + args_ = other.args_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureArgsIsMutable(); + args_.addAll(other.args_); + } + onChanged(); + } + if (!other.getDir().isEmpty()) { + dir_ = other.dir_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.waitFor_.isEmpty()) { + if (waitFor_.isEmpty()) { + waitFor_ = other.waitFor_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureWaitForIsMutable(); + waitFor_.addAll(other.waitFor_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureEnvIsMutable(); + env_.add(s); + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureArgsIsMutable(); + args_.add(s); + break; + } // case 26 + case 34: { + dir_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + ensureWaitForIsMutable(); + waitFor_.add(s); + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Name of the command, as presented on the command line, or if the
+     * command is packaged as a Docker container, as presented to `docker pull`.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Name of the command, as presented on the command line, or if the
+     * command is packaged as a Docker container, as presented to `docker pull`.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Name of the command, as presented on the command line, or if the
+     * command is packaged as a Docker container, as presented to `docker pull`.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. Name of the command, as presented on the command line, or if the
+     * command is packaged as a Docker container, as presented to `docker pull`.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. Name of the command, as presented on the command line, or if the
+     * command is packaged as a Docker container, as presented to `docker pull`.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList env_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureEnvIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + env_ = new com.google.protobuf.LazyStringArrayList(env_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @return A list containing the env. + */ + public com.google.protobuf.ProtocolStringList + getEnvList() { + return env_.getUnmodifiableView(); + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @return The count of env. + */ + public int getEnvCount() { + return env_.size(); + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @param index The index of the element to return. + * @return The env at the given index. + */ + public java.lang.String getEnv(int index) { + return env_.get(index); + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @param index The index of the value to return. + * @return The bytes of the env at the given index. + */ + public com.google.protobuf.ByteString + getEnvBytes(int index) { + return env_.getByteString(index); + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @param index The index to set the value at. + * @param value The env to set. + * @return This builder for chaining. + */ + public Builder setEnv( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureEnvIsMutable(); + env_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @param value The env to add. + * @return This builder for chaining. + */ + public Builder addEnv( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureEnvIsMutable(); + env_.add(value); + onChanged(); + return this; + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @param values The env to add. + * @return This builder for chaining. + */ + public Builder addAllEnv( + java.lang.Iterable values) { + ensureEnvIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, env_); + onChanged(); + return this; + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @return This builder for chaining. + */ + public Builder clearEnv() { + env_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Environment variables set before running this command.
+     * 
+ * + * repeated string env = 2; + * @param value The bytes of the env to add. + * @return This builder for chaining. + */ + public Builder addEnvBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureEnvIsMutable(); + env_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureArgsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(args_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList + getArgsList() { + return args_.getUnmodifiableView(); + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString + getArgsBytes(int index) { + return args_.getByteString(index); + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @param index The index to set the value at. + * @param value The args to set. + * @return This builder for chaining. + */ + public Builder setArgs( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureArgsIsMutable(); + args_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @param value The args to add. + * @return This builder for chaining. + */ + public Builder addArgs( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @param values The args to add. + * @return This builder for chaining. + */ + public Builder addAllArgs( + java.lang.Iterable values) { + ensureArgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, args_); + onChanged(); + return this; + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @return This builder for chaining. + */ + public Builder clearArgs() { + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Command-line arguments used when executing this command.
+     * 
+ * + * repeated string args = 3; + * @param value The bytes of the args to add. + * @return This builder for chaining. + */ + public Builder addArgsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + + private java.lang.Object dir_ = ""; + /** + *
+     * Working directory (relative to project source root) used when running this
+     * command.
+     * 
+ * + * string dir = 4; + * @return The dir. + */ + public java.lang.String getDir() { + java.lang.Object ref = dir_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dir_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Working directory (relative to project source root) used when running this
+     * command.
+     * 
+ * + * string dir = 4; + * @return The bytes for dir. + */ + public com.google.protobuf.ByteString + getDirBytes() { + java.lang.Object ref = dir_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Working directory (relative to project source root) used when running this
+     * command.
+     * 
+ * + * string dir = 4; + * @param value The dir to set. + * @return This builder for chaining. + */ + public Builder setDir( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + dir_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Working directory (relative to project source root) used when running this
+     * command.
+     * 
+ * + * string dir = 4; + * @return This builder for chaining. + */ + public Builder clearDir() { + dir_ = getDefaultInstance().getDir(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Working directory (relative to project source root) used when running this
+     * command.
+     * 
+ * + * string dir = 4; + * @param value The bytes for dir to set. + * @return This builder for chaining. + */ + public Builder setDirBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + dir_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + *
+     * Optional unique identifier for this command, used in wait_for to reference
+     * this command as a dependency.
+     * 
+ * + * string id = 5; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional unique identifier for this command, used in wait_for to reference
+     * this command as a dependency.
+     * 
+ * + * string id = 5; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional unique identifier for this command, used in wait_for to reference
+     * this command as a dependency.
+     * 
+ * + * string id = 5; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional unique identifier for this command, used in wait_for to reference
+     * this command as a dependency.
+     * 
+ * + * string id = 5; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Optional unique identifier for this command, used in wait_for to reference
+     * this command as a dependency.
+     * 
+ * + * string id = 5; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureWaitForIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + waitFor_ = new com.google.protobuf.LazyStringArrayList(waitFor_); + bitField0_ |= 0x00000020; + } + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @return A list containing the waitFor. + */ + public com.google.protobuf.ProtocolStringList + getWaitForList() { + return waitFor_.getUnmodifiableView(); + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @return The count of waitFor. + */ + public int getWaitForCount() { + return waitFor_.size(); + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @param index The index of the element to return. + * @return The waitFor at the given index. + */ + public java.lang.String getWaitFor(int index) { + return waitFor_.get(index); + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @param index The index of the value to return. + * @return The bytes of the waitFor at the given index. + */ + public com.google.protobuf.ByteString + getWaitForBytes(int index) { + return waitFor_.getByteString(index); + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @param index The index to set the value at. + * @param value The waitFor to set. + * @return This builder for chaining. + */ + public Builder setWaitFor( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureWaitForIsMutable(); + waitFor_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @param value The waitFor to add. + * @return This builder for chaining. + */ + public Builder addWaitFor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureWaitForIsMutable(); + waitFor_.add(value); + onChanged(); + return this; + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @param values The waitFor to add. + * @return This builder for chaining. + */ + public Builder addAllWaitFor( + java.lang.Iterable values) { + ensureWaitForIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, waitFor_); + onChanged(); + return this; + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @return This builder for chaining. + */ + public Builder clearWaitFor() { + waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The ID(s) of the command(s) that this command depends on.
+     * 
+ * + * repeated string wait_for = 6; + * @param value The bytes of the waitFor to add. + * @return This builder for chaining. + */ + public Builder addWaitForBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureWaitForIsMutable(); + waitFor_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Command) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Command) + private static final io.grafeas.v1.Command DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Command(); + } + + public static io.grafeas.v1.Command getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Command parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Command getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java new file mode 100644 index 000000000000..0eb0023c4121 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java @@ -0,0 +1,198 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface CommandOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Command) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Name of the command, as presented on the command line, or if the
+   * command is packaged as a Docker container, as presented to `docker pull`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Name of the command, as presented on the command line, or if the
+   * command is packaged as a Docker container, as presented to `docker pull`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @return A list containing the env. + */ + java.util.List + getEnvList(); + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @return The count of env. + */ + int getEnvCount(); + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @param index The index of the element to return. + * @return The env at the given index. + */ + java.lang.String getEnv(int index); + /** + *
+   * Environment variables set before running this command.
+   * 
+ * + * repeated string env = 2; + * @param index The index of the value to return. + * @return The bytes of the env at the given index. + */ + com.google.protobuf.ByteString + getEnvBytes(int index); + + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @return A list containing the args. + */ + java.util.List + getArgsList(); + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @return The count of args. + */ + int getArgsCount(); + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @param index The index of the element to return. + * @return The args at the given index. + */ + java.lang.String getArgs(int index); + /** + *
+   * Command-line arguments used when executing this command.
+   * 
+ * + * repeated string args = 3; + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + com.google.protobuf.ByteString + getArgsBytes(int index); + + /** + *
+   * Working directory (relative to project source root) used when running this
+   * command.
+   * 
+ * + * string dir = 4; + * @return The dir. + */ + java.lang.String getDir(); + /** + *
+   * Working directory (relative to project source root) used when running this
+   * command.
+   * 
+ * + * string dir = 4; + * @return The bytes for dir. + */ + com.google.protobuf.ByteString + getDirBytes(); + + /** + *
+   * Optional unique identifier for this command, used in wait_for to reference
+   * this command as a dependency.
+   * 
+ * + * string id = 5; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * Optional unique identifier for this command, used in wait_for to reference
+   * this command as a dependency.
+   * 
+ * + * string id = 5; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @return A list containing the waitFor. + */ + java.util.List + getWaitForList(); + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @return The count of waitFor. + */ + int getWaitForCount(); + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @param index The index of the element to return. + * @return The waitFor at the given index. + */ + java.lang.String getWaitFor(int index); + /** + *
+   * The ID(s) of the command(s) that this command depends on.
+   * 
+ * + * repeated string wait_for = 6; + * @param index The index of the value to return. + * @return The bytes of the waitFor at the given index. + */ + com.google.protobuf.ByteString + getWaitForBytes(int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java new file mode 100644 index 000000000000..0bb812582051 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java @@ -0,0 +1,130 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public final class Common { + private Common() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_RelatedUrl_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Signature_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Signature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Envelope_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Envelope_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_EnvelopeSignature_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_FileLocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_FileLocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_License_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_License_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Digest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Digest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\027grafeas/v1/common.proto\022\ngrafeas.v1\"(\n" + + "\nRelatedUrl\022\013\n\003url\030\001 \001(\t\022\r\n\005label\030\002 \001(\t\"" + + "5\n\tSignature\022\021\n\tsignature\030\001 \001(\014\022\025\n\rpubli" + + "c_key_id\030\002 \001(\t\"d\n\010Envelope\022\017\n\007payload\030\001 " + + "\001(\014\022\024\n\014payload_type\030\002 \001(\t\0221\n\nsignatures\030" + + "\003 \003(\0132\035.grafeas.v1.EnvelopeSignature\"/\n\021" + + "EnvelopeSignature\022\013\n\003sig\030\001 \001(\014\022\r\n\005keyid\030" + + "\002 \001(\t\"!\n\014FileLocation\022\021\n\tfile_path\030\001 \001(\t" + + "\"/\n\007License\022\022\n\nexpression\030\001 \001(\t\022\020\n\010comme" + + "nts\030\002 \001(\t\",\n\006Digest\022\014\n\004algo\030\001 \001(\t\022\024\n\014dig" + + "est_bytes\030\002 \001(\014*\334\001\n\010NoteKind\022\031\n\025NOTE_KIN" + + "D_UNSPECIFIED\020\000\022\021\n\rVULNERABILITY\020\001\022\t\n\005BU" + + "ILD\020\002\022\t\n\005IMAGE\020\003\022\013\n\007PACKAGE\020\004\022\016\n\nDEPLOYM" + + "ENT\020\005\022\r\n\tDISCOVERY\020\006\022\017\n\013ATTESTATION\020\007\022\013\n" + + "\007UPGRADE\020\010\022\016\n\nCOMPLIANCE\020\t\022\024\n\020DSSE_ATTES" + + "TATION\020\n\022\034\n\030VULNERABILITY_ASSESSMENT\020\013BQ" + + "\n\rio.grafeas.v1P\001Z8google.golang.org/gen" + + "proto/googleapis/grafeas/v1;grafeas\242\002\003GR" + + "Ab\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_grafeas_v1_RelatedUrl_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_RelatedUrl_descriptor, + new java.lang.String[] { "Url", "Label", }); + internal_static_grafeas_v1_Signature_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Signature_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Signature_descriptor, + new java.lang.String[] { "Signature", "PublicKeyId", }); + internal_static_grafeas_v1_Envelope_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_Envelope_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Envelope_descriptor, + new java.lang.String[] { "Payload", "PayloadType", "Signatures", }); + internal_static_grafeas_v1_EnvelopeSignature_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_EnvelopeSignature_descriptor, + new java.lang.String[] { "Sig", "Keyid", }); + internal_static_grafeas_v1_FileLocation_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grafeas_v1_FileLocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_FileLocation_descriptor, + new java.lang.String[] { "FilePath", }); + internal_static_grafeas_v1_License_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_grafeas_v1_License_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_License_descriptor, + new java.lang.String[] { "Expression", "Comments", }); + internal_static_grafeas_v1_Digest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_grafeas_v1_Digest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Digest_descriptor, + new java.lang.String[] { "Algo", "DigestBytes", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java new file mode 100644 index 000000000000..89490dc99bcb --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java @@ -0,0 +1,679 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Indicates that the builder claims certain fields in this message to be
+ * complete.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Completeness} + */ +public final class Completeness extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Completeness) + CompletenessOrBuilder { +private static final long serialVersionUID = 0L; + // Use Completeness.newBuilder() to construct. + private Completeness(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Completeness() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Completeness(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Completeness.class, io.grafeas.v1.Completeness.Builder.class); + } + + public static final int ARGUMENTS_FIELD_NUMBER = 1; + private boolean arguments_ = false; + /** + *
+   * If true, the builder claims that recipe.arguments is complete, meaning that
+   * all external inputs are properly captured in the recipe.
+   * 
+ * + * bool arguments = 1; + * @return The arguments. + */ + @java.lang.Override + public boolean getArguments() { + return arguments_; + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 2; + private boolean environment_ = false; + /** + *
+   * If true, the builder claims that recipe.environment is claimed to be
+   * complete.
+   * 
+ * + * bool environment = 2; + * @return The environment. + */ + @java.lang.Override + public boolean getEnvironment() { + return environment_; + } + + public static final int MATERIALS_FIELD_NUMBER = 3; + private boolean materials_ = false; + /** + *
+   * If true, the builder claims that materials are complete, usually through
+   * some controls to prevent network access. Sometimes called "hermetic".
+   * 
+ * + * bool materials = 3; + * @return The materials. + */ + @java.lang.Override + public boolean getMaterials() { + return materials_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (arguments_ != false) { + output.writeBool(1, arguments_); + } + if (environment_ != false) { + output.writeBool(2, environment_); + } + if (materials_ != false) { + output.writeBool(3, materials_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (arguments_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, arguments_); + } + if (environment_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, environment_); + } + if (materials_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, materials_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Completeness)) { + return super.equals(obj); + } + io.grafeas.v1.Completeness other = (io.grafeas.v1.Completeness) obj; + + if (getArguments() + != other.getArguments()) return false; + if (getEnvironment() + != other.getEnvironment()) return false; + if (getMaterials() + != other.getMaterials()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getArguments()); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnvironment()); + hash = (37 * hash) + MATERIALS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMaterials()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Completeness parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Completeness parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Completeness parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Completeness parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Completeness parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Completeness parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Completeness parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Completeness parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Completeness parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Completeness parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Completeness parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Completeness parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Completeness prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Completeness} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Completeness) + io.grafeas.v1.CompletenessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Completeness.class, io.grafeas.v1.Completeness.Builder.class); + } + + // Construct using io.grafeas.v1.Completeness.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + arguments_ = false; + environment_ = false; + materials_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Completeness getDefaultInstanceForType() { + return io.grafeas.v1.Completeness.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Completeness build() { + io.grafeas.v1.Completeness result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Completeness buildPartial() { + io.grafeas.v1.Completeness result = new io.grafeas.v1.Completeness(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Completeness result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.arguments_ = arguments_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.environment_ = environment_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.materials_ = materials_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Completeness) { + return mergeFrom((io.grafeas.v1.Completeness)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Completeness other) { + if (other == io.grafeas.v1.Completeness.getDefaultInstance()) return this; + if (other.getArguments() != false) { + setArguments(other.getArguments()); + } + if (other.getEnvironment() != false) { + setEnvironment(other.getEnvironment()); + } + if (other.getMaterials() != false) { + setMaterials(other.getMaterials()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + arguments_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + environment_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + materials_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean arguments_ ; + /** + *
+     * If true, the builder claims that recipe.arguments is complete, meaning that
+     * all external inputs are properly captured in the recipe.
+     * 
+ * + * bool arguments = 1; + * @return The arguments. + */ + @java.lang.Override + public boolean getArguments() { + return arguments_; + } + /** + *
+     * If true, the builder claims that recipe.arguments is complete, meaning that
+     * all external inputs are properly captured in the recipe.
+     * 
+ * + * bool arguments = 1; + * @param value The arguments to set. + * @return This builder for chaining. + */ + public Builder setArguments(boolean value) { + + arguments_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * If true, the builder claims that recipe.arguments is complete, meaning that
+     * all external inputs are properly captured in the recipe.
+     * 
+ * + * bool arguments = 1; + * @return This builder for chaining. + */ + public Builder clearArguments() { + bitField0_ = (bitField0_ & ~0x00000001); + arguments_ = false; + onChanged(); + return this; + } + + private boolean environment_ ; + /** + *
+     * If true, the builder claims that recipe.environment is claimed to be
+     * complete.
+     * 
+ * + * bool environment = 2; + * @return The environment. + */ + @java.lang.Override + public boolean getEnvironment() { + return environment_; + } + /** + *
+     * If true, the builder claims that recipe.environment is claimed to be
+     * complete.
+     * 
+ * + * bool environment = 2; + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(boolean value) { + + environment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * If true, the builder claims that recipe.environment is claimed to be
+     * complete.
+     * 
+ * + * bool environment = 2; + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + bitField0_ = (bitField0_ & ~0x00000002); + environment_ = false; + onChanged(); + return this; + } + + private boolean materials_ ; + /** + *
+     * If true, the builder claims that materials are complete, usually through
+     * some controls to prevent network access. Sometimes called "hermetic".
+     * 
+ * + * bool materials = 3; + * @return The materials. + */ + @java.lang.Override + public boolean getMaterials() { + return materials_; + } + /** + *
+     * If true, the builder claims that materials are complete, usually through
+     * some controls to prevent network access. Sometimes called "hermetic".
+     * 
+ * + * bool materials = 3; + * @param value The materials to set. + * @return This builder for chaining. + */ + public Builder setMaterials(boolean value) { + + materials_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * If true, the builder claims that materials are complete, usually through
+     * some controls to prevent network access. Sometimes called "hermetic".
+     * 
+ * + * bool materials = 3; + * @return This builder for chaining. + */ + public Builder clearMaterials() { + bitField0_ = (bitField0_ & ~0x00000004); + materials_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Completeness) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Completeness) + private static final io.grafeas.v1.Completeness DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Completeness(); + } + + public static io.grafeas.v1.Completeness getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Completeness parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Completeness getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java new file mode 100644 index 000000000000..4c8b606b7d03 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java @@ -0,0 +1,42 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +public interface CompletenessOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Completeness) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If true, the builder claims that recipe.arguments is complete, meaning that
+   * all external inputs are properly captured in the recipe.
+   * 
+ * + * bool arguments = 1; + * @return The arguments. + */ + boolean getArguments(); + + /** + *
+   * If true, the builder claims that recipe.environment is claimed to be
+   * complete.
+   * 
+ * + * bool environment = 2; + * @return The environment. + */ + boolean getEnvironment(); + + /** + *
+   * If true, the builder claims that materials are complete, usually through
+   * some controls to prevent network access. Sometimes called "hermetic".
+   * 
+ * + * bool materials = 3; + * @return The materials. + */ + boolean getMaterials(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java new file mode 100644 index 000000000000..7d4fd429aa29 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java @@ -0,0 +1,111 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +public final class Compliance { + private Compliance() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ComplianceNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ComplianceVersion_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ComplianceOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_NonCompliantFile_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033grafeas/v1/compliance.proto\022\ngrafeas.v" + + "1\032\031grafeas/v1/severity.proto\"\313\002\n\016Complia" + + "nceNote\022\r\n\005title\030\001 \001(\t\022\023\n\013description\030\002 " + + "\001(\t\022.\n\007version\030\003 \003(\0132\035.grafeas.v1.Compli" + + "anceVersion\022\021\n\trationale\030\004 \001(\t\022\023\n\013remedi" + + "ation\030\005 \001(\t\022@\n\rcis_benchmark\030\006 \001(\0132\'.gra" + + "feas.v1.ComplianceNote.CisBenchmarkH\000\022\031\n" + + "\021scan_instructions\030\007 \001(\014\032M\n\014CisBenchmark" + + "\022\025\n\rprofile_level\030\001 \001(\005\022&\n\010severity\030\002 \001(" + + "\0162\024.grafeas.v1.SeverityB\021\n\017compliance_ty" + + "pe\"Q\n\021ComplianceVersion\022\017\n\007cpe_uri\030\001 \001(\t" + + "\022\032\n\022benchmark_document\030\003 \001(\t\022\017\n\007version\030" + + "\002 \001(\t\"p\n\024ComplianceOccurrence\0229\n\023non_com" + + "pliant_files\030\002 \003(\0132\034.grafeas.v1.NonCompl" + + "iantFile\022\035\n\025non_compliance_reason\030\003 \001(\t\"" + + "I\n\020NonCompliantFile\022\014\n\004path\030\001 \001(\t\022\027\n\017dis" + + "play_command\030\002 \001(\t\022\016\n\006reason\030\003 \001(\tBQ\n\rio" + + ".grafeas.v1P\001Z8google.golang.org/genprot" + + "o/googleapis/grafeas/v1;grafeas\242\002\003GRAb\006p" + + "roto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grafeas.v1.SeverityOuterClass.getDescriptor(), + }); + internal_static_grafeas_v1_ComplianceNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ComplianceNote_descriptor, + new java.lang.String[] { "Title", "Description", "Version", "Rationale", "Remediation", "CisBenchmark", "ScanInstructions", "ComplianceType", }); + internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor = + internal_static_grafeas_v1_ComplianceNote_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor, + new java.lang.String[] { "ProfileLevel", "Severity", }); + internal_static_grafeas_v1_ComplianceVersion_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ComplianceVersion_descriptor, + new java.lang.String[] { "CpeUri", "BenchmarkDocument", "Version", }); + internal_static_grafeas_v1_ComplianceOccurrence_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ComplianceOccurrence_descriptor, + new java.lang.String[] { "NonCompliantFiles", "NonComplianceReason", }); + internal_static_grafeas_v1_NonCompliantFile_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_NonCompliantFile_descriptor, + new java.lang.String[] { "Path", "DisplayCommand", "Reason", }); + io.grafeas.v1.SeverityOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java new file mode 100644 index 000000000000..d58e1ea6bb90 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java @@ -0,0 +1,2467 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.ComplianceNote} + */ +public final class ComplianceNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceNote) + ComplianceNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use ComplianceNote.newBuilder() to construct. + private ComplianceNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ComplianceNote() { + title_ = ""; + description_ = ""; + version_ = java.util.Collections.emptyList(); + rationale_ = ""; + remediation_ = ""; + scanInstructions_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ComplianceNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceNote.class, io.grafeas.v1.ComplianceNote.Builder.class); + } + + public interface CisBenchmarkOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceNote.CisBenchmark) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 profile_level = 1; + * @return The profileLevel. + */ + int getProfileLevel(); + + /** + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + int getSeverityValue(); + /** + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + io.grafeas.v1.Severity getSeverity(); + } + /** + *
+   * A compliance check that is a CIS benchmark.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ComplianceNote.CisBenchmark} + */ + public static final class CisBenchmark extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceNote.CisBenchmark) + CisBenchmarkOrBuilder { + private static final long serialVersionUID = 0L; + // Use CisBenchmark.newBuilder() to construct. + private CisBenchmark(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CisBenchmark() { + severity_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CisBenchmark(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceNote.CisBenchmark.class, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder.class); + } + + public static final int PROFILE_LEVEL_FIELD_NUMBER = 1; + private int profileLevel_ = 0; + /** + * int32 profile_level = 1; + * @return The profileLevel. + */ + @java.lang.Override + public int getProfileLevel() { + return profileLevel_; + } + + public static final int SEVERITY_FIELD_NUMBER = 2; + private int severity_ = 0; + /** + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override public int getSeverityValue() { + return severity_; + } + /** + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + @java.lang.Override public io.grafeas.v1.Severity getSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (profileLevel_ != 0) { + output.writeInt32(1, profileLevel_); + } + if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + output.writeEnum(2, severity_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (profileLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, profileLevel_); + } + if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, severity_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ComplianceNote.CisBenchmark)) { + return super.equals(obj); + } + io.grafeas.v1.ComplianceNote.CisBenchmark other = (io.grafeas.v1.ComplianceNote.CisBenchmark) obj; + + if (getProfileLevel() + != other.getProfileLevel()) return false; + if (severity_ != other.severity_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROFILE_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getProfileLevel(); + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + severity_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ComplianceNote.CisBenchmark prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A compliance check that is a CIS benchmark.
+     * 
+ * + * Protobuf type {@code grafeas.v1.ComplianceNote.CisBenchmark} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceNote.CisBenchmark) + io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceNote.CisBenchmark.class, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder.class); + } + + // Construct using io.grafeas.v1.ComplianceNote.CisBenchmark.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + profileLevel_ = 0; + severity_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmark getDefaultInstanceForType() { + return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmark build() { + io.grafeas.v1.ComplianceNote.CisBenchmark result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmark buildPartial() { + io.grafeas.v1.ComplianceNote.CisBenchmark result = new io.grafeas.v1.ComplianceNote.CisBenchmark(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.ComplianceNote.CisBenchmark result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.profileLevel_ = profileLevel_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.severity_ = severity_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ComplianceNote.CisBenchmark) { + return mergeFrom((io.grafeas.v1.ComplianceNote.CisBenchmark)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ComplianceNote.CisBenchmark other) { + if (other == io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance()) return this; + if (other.getProfileLevel() != 0) { + setProfileLevel(other.getProfileLevel()); + } + if (other.severity_ != 0) { + setSeverityValue(other.getSeverityValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + profileLevel_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + severity_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int profileLevel_ ; + /** + * int32 profile_level = 1; + * @return The profileLevel. + */ + @java.lang.Override + public int getProfileLevel() { + return profileLevel_; + } + /** + * int32 profile_level = 1; + * @param value The profileLevel to set. + * @return This builder for chaining. + */ + public Builder setProfileLevel(int value) { + + profileLevel_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int32 profile_level = 1; + * @return This builder for chaining. + */ + public Builder clearProfileLevel() { + bitField0_ = (bitField0_ & ~0x00000001); + profileLevel_ = 0; + onChanged(); + return this; + } + + private int severity_ = 0; + /** + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override public int getSeverityValue() { + return severity_; + } + /** + * .grafeas.v1.Severity severity = 2; + * @param value The enum numeric value on the wire for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityValue(int value) { + severity_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + @java.lang.Override + public io.grafeas.v1.Severity getSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + /** + * .grafeas.v1.Severity severity = 2; + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity(io.grafeas.v1.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + severity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .grafeas.v1.Severity severity = 2; + * @return This builder for chaining. + */ + public Builder clearSeverity() { + bitField0_ = (bitField0_ & ~0x00000002); + severity_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceNote.CisBenchmark) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceNote.CisBenchmark) + private static final io.grafeas.v1.ComplianceNote.CisBenchmark DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceNote.CisBenchmark(); + } + + public static io.grafeas.v1.ComplianceNote.CisBenchmark getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CisBenchmark parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmark getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int complianceTypeCase_ = 0; + private java.lang.Object complianceType_; + public enum ComplianceTypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CIS_BENCHMARK(6), + COMPLIANCETYPE_NOT_SET(0); + private final int value; + private ComplianceTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ComplianceTypeCase valueOf(int value) { + return forNumber(value); + } + + public static ComplianceTypeCase forNumber(int value) { + switch (value) { + case 6: return CIS_BENCHMARK; + case 0: return COMPLIANCETYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ComplianceTypeCase + getComplianceTypeCase() { + return ComplianceTypeCase.forNumber( + complianceTypeCase_); + } + + public static final int TITLE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + *
+   * The title that identifies this compliance check.
+   * 
+ * + * string title = 1; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + *
+   * The title that identifies this compliance check.
+   * 
+ * + * string title = 1; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A description about this compliance check.
+   * 
+ * + * string description = 2; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A description about this compliance check.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List version_; + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + @java.lang.Override + public java.util.List getVersionList() { + return version_; + } + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + @java.lang.Override + public java.util.List + getVersionOrBuilderList() { + return version_; + } + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + @java.lang.Override + public int getVersionCount() { + return version_.size(); + } + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceVersion getVersion(int index) { + return version_.get(index); + } + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceVersionOrBuilder getVersionOrBuilder( + int index) { + return version_.get(index); + } + + public static final int RATIONALE_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object rationale_ = ""; + /** + *
+   * A rationale for the existence of this compliance check.
+   * 
+ * + * string rationale = 4; + * @return The rationale. + */ + @java.lang.Override + public java.lang.String getRationale() { + java.lang.Object ref = rationale_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rationale_ = s; + return s; + } + } + /** + *
+   * A rationale for the existence of this compliance check.
+   * 
+ * + * string rationale = 4; + * @return The bytes for rationale. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRationaleBytes() { + java.lang.Object ref = rationale_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rationale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REMEDIATION_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object remediation_ = ""; + /** + *
+   * A description of remediation steps if the compliance check fails.
+   * 
+ * + * string remediation = 5; + * @return The remediation. + */ + @java.lang.Override + public java.lang.String getRemediation() { + java.lang.Object ref = remediation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remediation_ = s; + return s; + } + } + /** + *
+   * A description of remediation steps if the compliance check fails.
+   * 
+ * + * string remediation = 5; + * @return The bytes for remediation. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRemediationBytes() { + java.lang.Object ref = remediation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remediation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CIS_BENCHMARK_FIELD_NUMBER = 6; + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + * @return Whether the cisBenchmark field is set. + */ + @java.lang.Override + public boolean hasCisBenchmark() { + return complianceTypeCase_ == 6; + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + * @return The cisBenchmark. + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmark getCisBenchmark() { + if (complianceTypeCase_ == 6) { + return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; + } + return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder getCisBenchmarkOrBuilder() { + if (complianceTypeCase_ == 6) { + return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; + } + return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); + } + + public static final int SCAN_INSTRUCTIONS_FIELD_NUMBER = 7; + private com.google.protobuf.ByteString scanInstructions_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+   * Serialized scan instructions with a predefined format.
+   * 
+ * + * bytes scan_instructions = 7; + * @return The scanInstructions. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScanInstructions() { + return scanInstructions_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + for (int i = 0; i < version_.size(); i++) { + output.writeMessage(3, version_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rationale_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, rationale_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remediation_); + } + if (complianceTypeCase_ == 6) { + output.writeMessage(6, (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_); + } + if (!scanInstructions_.isEmpty()) { + output.writeBytes(7, scanInstructions_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + for (int i = 0; i < version_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, version_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rationale_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, rationale_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remediation_); + } + if (complianceTypeCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_); + } + if (!scanInstructions_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(7, scanInstructions_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ComplianceNote)) { + return super.equals(obj); + } + io.grafeas.v1.ComplianceNote other = (io.grafeas.v1.ComplianceNote) obj; + + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getVersionList() + .equals(other.getVersionList())) return false; + if (!getRationale() + .equals(other.getRationale())) return false; + if (!getRemediation() + .equals(other.getRemediation())) return false; + if (!getScanInstructions() + .equals(other.getScanInstructions())) return false; + if (!getComplianceTypeCase().equals(other.getComplianceTypeCase())) return false; + switch (complianceTypeCase_) { + case 6: + if (!getCisBenchmark() + .equals(other.getCisBenchmark())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getVersionCount() > 0) { + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersionList().hashCode(); + } + hash = (37 * hash) + RATIONALE_FIELD_NUMBER; + hash = (53 * hash) + getRationale().hashCode(); + hash = (37 * hash) + REMEDIATION_FIELD_NUMBER; + hash = (53 * hash) + getRemediation().hashCode(); + hash = (37 * hash) + SCAN_INSTRUCTIONS_FIELD_NUMBER; + hash = (53 * hash) + getScanInstructions().hashCode(); + switch (complianceTypeCase_) { + case 6: + hash = (37 * hash) + CIS_BENCHMARK_FIELD_NUMBER; + hash = (53 * hash) + getCisBenchmark().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ComplianceNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ComplianceNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.ComplianceNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceNote) + io.grafeas.v1.ComplianceNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceNote.class, io.grafeas.v1.ComplianceNote.Builder.class); + } + + // Construct using io.grafeas.v1.ComplianceNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + title_ = ""; + description_ = ""; + if (versionBuilder_ == null) { + version_ = java.util.Collections.emptyList(); + } else { + version_ = null; + versionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + rationale_ = ""; + remediation_ = ""; + if (cisBenchmarkBuilder_ != null) { + cisBenchmarkBuilder_.clear(); + } + scanInstructions_ = com.google.protobuf.ByteString.EMPTY; + complianceTypeCase_ = 0; + complianceType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote getDefaultInstanceForType() { + return io.grafeas.v1.ComplianceNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote build() { + io.grafeas.v1.ComplianceNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote buildPartial() { + io.grafeas.v1.ComplianceNote result = new io.grafeas.v1.ComplianceNote(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.ComplianceNote result) { + if (versionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + version_ = java.util.Collections.unmodifiableList(version_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.version_ = version_; + } else { + result.version_ = versionBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.ComplianceNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.rationale_ = rationale_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.remediation_ = remediation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.scanInstructions_ = scanInstructions_; + } + } + + private void buildPartialOneofs(io.grafeas.v1.ComplianceNote result) { + result.complianceTypeCase_ = complianceTypeCase_; + result.complianceType_ = this.complianceType_; + if (complianceTypeCase_ == 6 && + cisBenchmarkBuilder_ != null) { + result.complianceType_ = cisBenchmarkBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ComplianceNote) { + return mergeFrom((io.grafeas.v1.ComplianceNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ComplianceNote other) { + if (other == io.grafeas.v1.ComplianceNote.getDefaultInstance()) return this; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (versionBuilder_ == null) { + if (!other.version_.isEmpty()) { + if (version_.isEmpty()) { + version_ = other.version_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureVersionIsMutable(); + version_.addAll(other.version_); + } + onChanged(); + } + } else { + if (!other.version_.isEmpty()) { + if (versionBuilder_.isEmpty()) { + versionBuilder_.dispose(); + versionBuilder_ = null; + version_ = other.version_; + bitField0_ = (bitField0_ & ~0x00000004); + versionBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVersionFieldBuilder() : null; + } else { + versionBuilder_.addAllMessages(other.version_); + } + } + } + if (!other.getRationale().isEmpty()) { + rationale_ = other.rationale_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getRemediation().isEmpty()) { + remediation_ = other.remediation_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getScanInstructions() != com.google.protobuf.ByteString.EMPTY) { + setScanInstructions(other.getScanInstructions()); + } + switch (other.getComplianceTypeCase()) { + case CIS_BENCHMARK: { + mergeCisBenchmark(other.getCisBenchmark()); + break; + } + case COMPLIANCETYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + io.grafeas.v1.ComplianceVersion m = + input.readMessage( + io.grafeas.v1.ComplianceVersion.parser(), + extensionRegistry); + if (versionBuilder_ == null) { + ensureVersionIsMutable(); + version_.add(m); + } else { + versionBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: { + rationale_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + remediation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getCisBenchmarkFieldBuilder().getBuilder(), + extensionRegistry); + complianceTypeCase_ = 6; + break; + } // case 50 + case 58: { + scanInstructions_ = input.readBytes(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int complianceTypeCase_ = 0; + private java.lang.Object complianceType_; + public ComplianceTypeCase + getComplianceTypeCase() { + return ComplianceTypeCase.forNumber( + complianceTypeCase_); + } + + public Builder clearComplianceType() { + complianceTypeCase_ = 0; + complianceType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object title_ = ""; + /** + *
+     * The title that identifies this compliance check.
+     * 
+ * + * string title = 1; + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The title that identifies this compliance check.
+     * 
+ * + * string title = 1; + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The title that identifies this compliance check.
+     * 
+ * + * string title = 1; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The title that identifies this compliance check.
+     * 
+ * + * string title = 1; + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The title that identifies this compliance check.
+     * 
+ * + * string title = 1; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A description about this compliance check.
+     * 
+ * + * string description = 2; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A description about this compliance check.
+     * 
+ * + * string description = 2; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A description about this compliance check.
+     * 
+ * + * string description = 2; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A description about this compliance check.
+     * 
+ * + * string description = 2; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A description about this compliance check.
+     * 
+ * + * string description = 2; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List version_ = + java.util.Collections.emptyList(); + private void ensureVersionIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + version_ = new java.util.ArrayList(version_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.ComplianceVersion, io.grafeas.v1.ComplianceVersion.Builder, io.grafeas.v1.ComplianceVersionOrBuilder> versionBuilder_; + + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public java.util.List getVersionList() { + if (versionBuilder_ == null) { + return java.util.Collections.unmodifiableList(version_); + } else { + return versionBuilder_.getMessageList(); + } + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public int getVersionCount() { + if (versionBuilder_ == null) { + return version_.size(); + } else { + return versionBuilder_.getCount(); + } + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public io.grafeas.v1.ComplianceVersion getVersion(int index) { + if (versionBuilder_ == null) { + return version_.get(index); + } else { + return versionBuilder_.getMessage(index); + } + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder setVersion( + int index, io.grafeas.v1.ComplianceVersion value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionIsMutable(); + version_.set(index, value); + onChanged(); + } else { + versionBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder setVersion( + int index, io.grafeas.v1.ComplianceVersion.Builder builderForValue) { + if (versionBuilder_ == null) { + ensureVersionIsMutable(); + version_.set(index, builderForValue.build()); + onChanged(); + } else { + versionBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder addVersion(io.grafeas.v1.ComplianceVersion value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionIsMutable(); + version_.add(value); + onChanged(); + } else { + versionBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder addVersion( + int index, io.grafeas.v1.ComplianceVersion value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionIsMutable(); + version_.add(index, value); + onChanged(); + } else { + versionBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder addVersion( + io.grafeas.v1.ComplianceVersion.Builder builderForValue) { + if (versionBuilder_ == null) { + ensureVersionIsMutable(); + version_.add(builderForValue.build()); + onChanged(); + } else { + versionBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder addVersion( + int index, io.grafeas.v1.ComplianceVersion.Builder builderForValue) { + if (versionBuilder_ == null) { + ensureVersionIsMutable(); + version_.add(index, builderForValue.build()); + onChanged(); + } else { + versionBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder addAllVersion( + java.lang.Iterable values) { + if (versionBuilder_ == null) { + ensureVersionIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, version_); + onChanged(); + } else { + versionBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder clearVersion() { + if (versionBuilder_ == null) { + version_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + versionBuilder_.clear(); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public Builder removeVersion(int index) { + if (versionBuilder_ == null) { + ensureVersionIsMutable(); + version_.remove(index); + onChanged(); + } else { + versionBuilder_.remove(index); + } + return this; + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public io.grafeas.v1.ComplianceVersion.Builder getVersionBuilder( + int index) { + return getVersionFieldBuilder().getBuilder(index); + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public io.grafeas.v1.ComplianceVersionOrBuilder getVersionOrBuilder( + int index) { + if (versionBuilder_ == null) { + return version_.get(index); } else { + return versionBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public java.util.List + getVersionOrBuilderList() { + if (versionBuilder_ != null) { + return versionBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(version_); + } + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public io.grafeas.v1.ComplianceVersion.Builder addVersionBuilder() { + return getVersionFieldBuilder().addBuilder( + io.grafeas.v1.ComplianceVersion.getDefaultInstance()); + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public io.grafeas.v1.ComplianceVersion.Builder addVersionBuilder( + int index) { + return getVersionFieldBuilder().addBuilder( + index, io.grafeas.v1.ComplianceVersion.getDefaultInstance()); + } + /** + *
+     * The OS and config versions the benchmark applies to.
+     * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + public java.util.List + getVersionBuilderList() { + return getVersionFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.ComplianceVersion, io.grafeas.v1.ComplianceVersion.Builder, io.grafeas.v1.ComplianceVersionOrBuilder> + getVersionFieldBuilder() { + if (versionBuilder_ == null) { + versionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.ComplianceVersion, io.grafeas.v1.ComplianceVersion.Builder, io.grafeas.v1.ComplianceVersionOrBuilder>( + version_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + version_ = null; + } + return versionBuilder_; + } + + private java.lang.Object rationale_ = ""; + /** + *
+     * A rationale for the existence of this compliance check.
+     * 
+ * + * string rationale = 4; + * @return The rationale. + */ + public java.lang.String getRationale() { + java.lang.Object ref = rationale_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rationale_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A rationale for the existence of this compliance check.
+     * 
+ * + * string rationale = 4; + * @return The bytes for rationale. + */ + public com.google.protobuf.ByteString + getRationaleBytes() { + java.lang.Object ref = rationale_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rationale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A rationale for the existence of this compliance check.
+     * 
+ * + * string rationale = 4; + * @param value The rationale to set. + * @return This builder for chaining. + */ + public Builder setRationale( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + rationale_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * A rationale for the existence of this compliance check.
+     * 
+ * + * string rationale = 4; + * @return This builder for chaining. + */ + public Builder clearRationale() { + rationale_ = getDefaultInstance().getRationale(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * A rationale for the existence of this compliance check.
+     * 
+ * + * string rationale = 4; + * @param value The bytes for rationale to set. + * @return This builder for chaining. + */ + public Builder setRationaleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + rationale_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object remediation_ = ""; + /** + *
+     * A description of remediation steps if the compliance check fails.
+     * 
+ * + * string remediation = 5; + * @return The remediation. + */ + public java.lang.String getRemediation() { + java.lang.Object ref = remediation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remediation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A description of remediation steps if the compliance check fails.
+     * 
+ * + * string remediation = 5; + * @return The bytes for remediation. + */ + public com.google.protobuf.ByteString + getRemediationBytes() { + java.lang.Object ref = remediation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remediation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A description of remediation steps if the compliance check fails.
+     * 
+ * + * string remediation = 5; + * @param value The remediation to set. + * @return This builder for chaining. + */ + public Builder setRemediation( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + remediation_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * A description of remediation steps if the compliance check fails.
+     * 
+ * + * string remediation = 5; + * @return This builder for chaining. + */ + public Builder clearRemediation() { + remediation_ = getDefaultInstance().getRemediation(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * A description of remediation steps if the compliance check fails.
+     * 
+ * + * string remediation = 5; + * @param value The bytes for remediation to set. + * @return This builder for chaining. + */ + public Builder setRemediationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + remediation_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceNote.CisBenchmark, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder, io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder> cisBenchmarkBuilder_; + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + * @return Whether the cisBenchmark field is set. + */ + @java.lang.Override + public boolean hasCisBenchmark() { + return complianceTypeCase_ == 6; + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + * @return The cisBenchmark. + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmark getCisBenchmark() { + if (cisBenchmarkBuilder_ == null) { + if (complianceTypeCase_ == 6) { + return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; + } + return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); + } else { + if (complianceTypeCase_ == 6) { + return cisBenchmarkBuilder_.getMessage(); + } + return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); + } + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + public Builder setCisBenchmark(io.grafeas.v1.ComplianceNote.CisBenchmark value) { + if (cisBenchmarkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + complianceType_ = value; + onChanged(); + } else { + cisBenchmarkBuilder_.setMessage(value); + } + complianceTypeCase_ = 6; + return this; + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + public Builder setCisBenchmark( + io.grafeas.v1.ComplianceNote.CisBenchmark.Builder builderForValue) { + if (cisBenchmarkBuilder_ == null) { + complianceType_ = builderForValue.build(); + onChanged(); + } else { + cisBenchmarkBuilder_.setMessage(builderForValue.build()); + } + complianceTypeCase_ = 6; + return this; + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + public Builder mergeCisBenchmark(io.grafeas.v1.ComplianceNote.CisBenchmark value) { + if (cisBenchmarkBuilder_ == null) { + if (complianceTypeCase_ == 6 && + complianceType_ != io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance()) { + complianceType_ = io.grafeas.v1.ComplianceNote.CisBenchmark.newBuilder((io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_) + .mergeFrom(value).buildPartial(); + } else { + complianceType_ = value; + } + onChanged(); + } else { + if (complianceTypeCase_ == 6) { + cisBenchmarkBuilder_.mergeFrom(value); + } else { + cisBenchmarkBuilder_.setMessage(value); + } + } + complianceTypeCase_ = 6; + return this; + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + public Builder clearCisBenchmark() { + if (cisBenchmarkBuilder_ == null) { + if (complianceTypeCase_ == 6) { + complianceTypeCase_ = 0; + complianceType_ = null; + onChanged(); + } + } else { + if (complianceTypeCase_ == 6) { + complianceTypeCase_ = 0; + complianceType_ = null; + } + cisBenchmarkBuilder_.clear(); + } + return this; + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + public io.grafeas.v1.ComplianceNote.CisBenchmark.Builder getCisBenchmarkBuilder() { + return getCisBenchmarkFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder getCisBenchmarkOrBuilder() { + if ((complianceTypeCase_ == 6) && (cisBenchmarkBuilder_ != null)) { + return cisBenchmarkBuilder_.getMessageOrBuilder(); + } else { + if (complianceTypeCase_ == 6) { + return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; + } + return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); + } + } + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceNote.CisBenchmark, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder, io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder> + getCisBenchmarkFieldBuilder() { + if (cisBenchmarkBuilder_ == null) { + if (!(complianceTypeCase_ == 6)) { + complianceType_ = io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); + } + cisBenchmarkBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceNote.CisBenchmark, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder, io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder>( + (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_, + getParentForChildren(), + isClean()); + complianceType_ = null; + } + complianceTypeCase_ = 6; + onChanged(); + return cisBenchmarkBuilder_; + } + + private com.google.protobuf.ByteString scanInstructions_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Serialized scan instructions with a predefined format.
+     * 
+ * + * bytes scan_instructions = 7; + * @return The scanInstructions. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScanInstructions() { + return scanInstructions_; + } + /** + *
+     * Serialized scan instructions with a predefined format.
+     * 
+ * + * bytes scan_instructions = 7; + * @param value The scanInstructions to set. + * @return This builder for chaining. + */ + public Builder setScanInstructions(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + scanInstructions_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Serialized scan instructions with a predefined format.
+     * 
+ * + * bytes scan_instructions = 7; + * @return This builder for chaining. + */ + public Builder clearScanInstructions() { + bitField0_ = (bitField0_ & ~0x00000040); + scanInstructions_ = getDefaultInstance().getScanInstructions(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceNote) + private static final io.grafeas.v1.ComplianceNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceNote(); + } + + public static io.grafeas.v1.ComplianceNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComplianceNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java new file mode 100644 index 000000000000..8015d00f3627 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java @@ -0,0 +1,160 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +public interface ComplianceNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The title that identifies this compliance check.
+   * 
+ * + * string title = 1; + * @return The title. + */ + java.lang.String getTitle(); + /** + *
+   * The title that identifies this compliance check.
+   * 
+ * + * string title = 1; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + *
+   * A description about this compliance check.
+   * 
+ * + * string description = 2; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A description about this compliance check.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + java.util.List + getVersionList(); + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + io.grafeas.v1.ComplianceVersion getVersion(int index); + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + int getVersionCount(); + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + java.util.List + getVersionOrBuilderList(); + /** + *
+   * The OS and config versions the benchmark applies to.
+   * 
+ * + * repeated .grafeas.v1.ComplianceVersion version = 3; + */ + io.grafeas.v1.ComplianceVersionOrBuilder getVersionOrBuilder( + int index); + + /** + *
+   * A rationale for the existence of this compliance check.
+   * 
+ * + * string rationale = 4; + * @return The rationale. + */ + java.lang.String getRationale(); + /** + *
+   * A rationale for the existence of this compliance check.
+   * 
+ * + * string rationale = 4; + * @return The bytes for rationale. + */ + com.google.protobuf.ByteString + getRationaleBytes(); + + /** + *
+   * A description of remediation steps if the compliance check fails.
+   * 
+ * + * string remediation = 5; + * @return The remediation. + */ + java.lang.String getRemediation(); + /** + *
+   * A description of remediation steps if the compliance check fails.
+   * 
+ * + * string remediation = 5; + * @return The bytes for remediation. + */ + com.google.protobuf.ByteString + getRemediationBytes(); + + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + * @return Whether the cisBenchmark field is set. + */ + boolean hasCisBenchmark(); + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + * @return The cisBenchmark. + */ + io.grafeas.v1.ComplianceNote.CisBenchmark getCisBenchmark(); + /** + * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + */ + io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder getCisBenchmarkOrBuilder(); + + /** + *
+   * Serialized scan instructions with a predefined format.
+   * 
+ * + * bytes scan_instructions = 7; + * @return The scanInstructions. + */ + com.google.protobuf.ByteString getScanInstructions(); + + public io.grafeas.v1.ComplianceNote.ComplianceTypeCase getComplianceTypeCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java new file mode 100644 index 000000000000..1c25dcc2f406 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java @@ -0,0 +1,908 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +/** + *
+ * An indication that the compliance checks in the associated ComplianceNote
+ * were not satisfied for particular resources or a specified reason.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ComplianceOccurrence} + */ +public final class ComplianceOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceOccurrence) + ComplianceOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use ComplianceOccurrence.newBuilder() to construct. + private ComplianceOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ComplianceOccurrence() { + nonCompliantFiles_ = java.util.Collections.emptyList(); + nonComplianceReason_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ComplianceOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceOccurrence.class, io.grafeas.v1.ComplianceOccurrence.Builder.class); + } + + public static final int NON_COMPLIANT_FILES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List nonCompliantFiles_; + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + @java.lang.Override + public java.util.List getNonCompliantFilesList() { + return nonCompliantFiles_; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + @java.lang.Override + public java.util.List + getNonCompliantFilesOrBuilderList() { + return nonCompliantFiles_; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + @java.lang.Override + public int getNonCompliantFilesCount() { + return nonCompliantFiles_.size(); + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + @java.lang.Override + public io.grafeas.v1.NonCompliantFile getNonCompliantFiles(int index) { + return nonCompliantFiles_.get(index); + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + @java.lang.Override + public io.grafeas.v1.NonCompliantFileOrBuilder getNonCompliantFilesOrBuilder( + int index) { + return nonCompliantFiles_.get(index); + } + + public static final int NON_COMPLIANCE_REASON_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object nonComplianceReason_ = ""; + /** + * string non_compliance_reason = 3; + * @return The nonComplianceReason. + */ + @java.lang.Override + public java.lang.String getNonComplianceReason() { + java.lang.Object ref = nonComplianceReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nonComplianceReason_ = s; + return s; + } + } + /** + * string non_compliance_reason = 3; + * @return The bytes for nonComplianceReason. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNonComplianceReasonBytes() { + java.lang.Object ref = nonComplianceReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nonComplianceReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < nonCompliantFiles_.size(); i++) { + output.writeMessage(2, nonCompliantFiles_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nonComplianceReason_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nonComplianceReason_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < nonCompliantFiles_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, nonCompliantFiles_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nonComplianceReason_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nonComplianceReason_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ComplianceOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.ComplianceOccurrence other = (io.grafeas.v1.ComplianceOccurrence) obj; + + if (!getNonCompliantFilesList() + .equals(other.getNonCompliantFilesList())) return false; + if (!getNonComplianceReason() + .equals(other.getNonComplianceReason())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNonCompliantFilesCount() > 0) { + hash = (37 * hash) + NON_COMPLIANT_FILES_FIELD_NUMBER; + hash = (53 * hash) + getNonCompliantFilesList().hashCode(); + } + hash = (37 * hash) + NON_COMPLIANCE_REASON_FIELD_NUMBER; + hash = (53 * hash) + getNonComplianceReason().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ComplianceOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An indication that the compliance checks in the associated ComplianceNote
+   * were not satisfied for particular resources or a specified reason.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ComplianceOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceOccurrence) + io.grafeas.v1.ComplianceOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceOccurrence.class, io.grafeas.v1.ComplianceOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.ComplianceOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (nonCompliantFilesBuilder_ == null) { + nonCompliantFiles_ = java.util.Collections.emptyList(); + } else { + nonCompliantFiles_ = null; + nonCompliantFilesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nonComplianceReason_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrence build() { + io.grafeas.v1.ComplianceOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrence buildPartial() { + io.grafeas.v1.ComplianceOccurrence result = new io.grafeas.v1.ComplianceOccurrence(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.ComplianceOccurrence result) { + if (nonCompliantFilesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + nonCompliantFiles_ = java.util.Collections.unmodifiableList(nonCompliantFiles_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nonCompliantFiles_ = nonCompliantFiles_; + } else { + result.nonCompliantFiles_ = nonCompliantFilesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.ComplianceOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nonComplianceReason_ = nonComplianceReason_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ComplianceOccurrence) { + return mergeFrom((io.grafeas.v1.ComplianceOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ComplianceOccurrence other) { + if (other == io.grafeas.v1.ComplianceOccurrence.getDefaultInstance()) return this; + if (nonCompliantFilesBuilder_ == null) { + if (!other.nonCompliantFiles_.isEmpty()) { + if (nonCompliantFiles_.isEmpty()) { + nonCompliantFiles_ = other.nonCompliantFiles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.addAll(other.nonCompliantFiles_); + } + onChanged(); + } + } else { + if (!other.nonCompliantFiles_.isEmpty()) { + if (nonCompliantFilesBuilder_.isEmpty()) { + nonCompliantFilesBuilder_.dispose(); + nonCompliantFilesBuilder_ = null; + nonCompliantFiles_ = other.nonCompliantFiles_; + bitField0_ = (bitField0_ & ~0x00000001); + nonCompliantFilesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNonCompliantFilesFieldBuilder() : null; + } else { + nonCompliantFilesBuilder_.addAllMessages(other.nonCompliantFiles_); + } + } + } + if (!other.getNonComplianceReason().isEmpty()) { + nonComplianceReason_ = other.nonComplianceReason_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + io.grafeas.v1.NonCompliantFile m = + input.readMessage( + io.grafeas.v1.NonCompliantFile.parser(), + extensionRegistry); + if (nonCompliantFilesBuilder_ == null) { + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.add(m); + } else { + nonCompliantFilesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + nonComplianceReason_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List nonCompliantFiles_ = + java.util.Collections.emptyList(); + private void ensureNonCompliantFilesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + nonCompliantFiles_ = new java.util.ArrayList(nonCompliantFiles_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.NonCompliantFile, io.grafeas.v1.NonCompliantFile.Builder, io.grafeas.v1.NonCompliantFileOrBuilder> nonCompliantFilesBuilder_; + + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public java.util.List getNonCompliantFilesList() { + if (nonCompliantFilesBuilder_ == null) { + return java.util.Collections.unmodifiableList(nonCompliantFiles_); + } else { + return nonCompliantFilesBuilder_.getMessageList(); + } + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public int getNonCompliantFilesCount() { + if (nonCompliantFilesBuilder_ == null) { + return nonCompliantFiles_.size(); + } else { + return nonCompliantFilesBuilder_.getCount(); + } + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public io.grafeas.v1.NonCompliantFile getNonCompliantFiles(int index) { + if (nonCompliantFilesBuilder_ == null) { + return nonCompliantFiles_.get(index); + } else { + return nonCompliantFilesBuilder_.getMessage(index); + } + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder setNonCompliantFiles( + int index, io.grafeas.v1.NonCompliantFile value) { + if (nonCompliantFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.set(index, value); + onChanged(); + } else { + nonCompliantFilesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder setNonCompliantFiles( + int index, io.grafeas.v1.NonCompliantFile.Builder builderForValue) { + if (nonCompliantFilesBuilder_ == null) { + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.set(index, builderForValue.build()); + onChanged(); + } else { + nonCompliantFilesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder addNonCompliantFiles(io.grafeas.v1.NonCompliantFile value) { + if (nonCompliantFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.add(value); + onChanged(); + } else { + nonCompliantFilesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder addNonCompliantFiles( + int index, io.grafeas.v1.NonCompliantFile value) { + if (nonCompliantFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.add(index, value); + onChanged(); + } else { + nonCompliantFilesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder addNonCompliantFiles( + io.grafeas.v1.NonCompliantFile.Builder builderForValue) { + if (nonCompliantFilesBuilder_ == null) { + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.add(builderForValue.build()); + onChanged(); + } else { + nonCompliantFilesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder addNonCompliantFiles( + int index, io.grafeas.v1.NonCompliantFile.Builder builderForValue) { + if (nonCompliantFilesBuilder_ == null) { + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.add(index, builderForValue.build()); + onChanged(); + } else { + nonCompliantFilesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder addAllNonCompliantFiles( + java.lang.Iterable values) { + if (nonCompliantFilesBuilder_ == null) { + ensureNonCompliantFilesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nonCompliantFiles_); + onChanged(); + } else { + nonCompliantFilesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder clearNonCompliantFiles() { + if (nonCompliantFilesBuilder_ == null) { + nonCompliantFiles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nonCompliantFilesBuilder_.clear(); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public Builder removeNonCompliantFiles(int index) { + if (nonCompliantFilesBuilder_ == null) { + ensureNonCompliantFilesIsMutable(); + nonCompliantFiles_.remove(index); + onChanged(); + } else { + nonCompliantFilesBuilder_.remove(index); + } + return this; + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public io.grafeas.v1.NonCompliantFile.Builder getNonCompliantFilesBuilder( + int index) { + return getNonCompliantFilesFieldBuilder().getBuilder(index); + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public io.grafeas.v1.NonCompliantFileOrBuilder getNonCompliantFilesOrBuilder( + int index) { + if (nonCompliantFilesBuilder_ == null) { + return nonCompliantFiles_.get(index); } else { + return nonCompliantFilesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public java.util.List + getNonCompliantFilesOrBuilderList() { + if (nonCompliantFilesBuilder_ != null) { + return nonCompliantFilesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nonCompliantFiles_); + } + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public io.grafeas.v1.NonCompliantFile.Builder addNonCompliantFilesBuilder() { + return getNonCompliantFilesFieldBuilder().addBuilder( + io.grafeas.v1.NonCompliantFile.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public io.grafeas.v1.NonCompliantFile.Builder addNonCompliantFilesBuilder( + int index) { + return getNonCompliantFilesFieldBuilder().addBuilder( + index, io.grafeas.v1.NonCompliantFile.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + public java.util.List + getNonCompliantFilesBuilderList() { + return getNonCompliantFilesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.NonCompliantFile, io.grafeas.v1.NonCompliantFile.Builder, io.grafeas.v1.NonCompliantFileOrBuilder> + getNonCompliantFilesFieldBuilder() { + if (nonCompliantFilesBuilder_ == null) { + nonCompliantFilesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.NonCompliantFile, io.grafeas.v1.NonCompliantFile.Builder, io.grafeas.v1.NonCompliantFileOrBuilder>( + nonCompliantFiles_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + nonCompliantFiles_ = null; + } + return nonCompliantFilesBuilder_; + } + + private java.lang.Object nonComplianceReason_ = ""; + /** + * string non_compliance_reason = 3; + * @return The nonComplianceReason. + */ + public java.lang.String getNonComplianceReason() { + java.lang.Object ref = nonComplianceReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nonComplianceReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string non_compliance_reason = 3; + * @return The bytes for nonComplianceReason. + */ + public com.google.protobuf.ByteString + getNonComplianceReasonBytes() { + java.lang.Object ref = nonComplianceReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nonComplianceReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string non_compliance_reason = 3; + * @param value The nonComplianceReason to set. + * @return This builder for chaining. + */ + public Builder setNonComplianceReason( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nonComplianceReason_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string non_compliance_reason = 3; + * @return This builder for chaining. + */ + public Builder clearNonComplianceReason() { + nonComplianceReason_ = getDefaultInstance().getNonComplianceReason(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string non_compliance_reason = 3; + * @param value The bytes for nonComplianceReason to set. + * @return This builder for chaining. + */ + public Builder setNonComplianceReasonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nonComplianceReason_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceOccurrence) + private static final io.grafeas.v1.ComplianceOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceOccurrence(); + } + + public static io.grafeas.v1.ComplianceOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComplianceOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java new file mode 100644 index 000000000000..695ccc5a7661 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java @@ -0,0 +1,45 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +public interface ComplianceOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + java.util.List + getNonCompliantFilesList(); + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + io.grafeas.v1.NonCompliantFile getNonCompliantFiles(int index); + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + int getNonCompliantFilesCount(); + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + java.util.List + getNonCompliantFilesOrBuilderList(); + /** + * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + io.grafeas.v1.NonCompliantFileOrBuilder getNonCompliantFilesOrBuilder( + int index); + + /** + * string non_compliance_reason = 3; + * @return The nonComplianceReason. + */ + java.lang.String getNonComplianceReason(); + /** + * string non_compliance_reason = 3; + * @return The bytes for nonComplianceReason. + */ + com.google.protobuf.ByteString + getNonComplianceReasonBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java new file mode 100644 index 000000000000..05e789e67a8f --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java @@ -0,0 +1,931 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +/** + *
+ * Describes the CIS benchmark version that is applicable to a given OS and
+ * os version.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ComplianceVersion} + */ +public final class ComplianceVersion extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceVersion) + ComplianceVersionOrBuilder { +private static final long serialVersionUID = 0L; + // Use ComplianceVersion.newBuilder() to construct. + private ComplianceVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ComplianceVersion() { + cpeUri_ = ""; + benchmarkDocument_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ComplianceVersion(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceVersion.class, io.grafeas.v1.ComplianceVersion.Builder.class); + } + + public static final int CPE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cpeUri_ = ""; + /** + *
+   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+   * applicable to.
+   * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + @java.lang.Override + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } + } + /** + *
+   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+   * applicable to.
+   * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BENCHMARK_DOCUMENT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object benchmarkDocument_ = ""; + /** + *
+   * The name of the document that defines this benchmark, e.g. "CIS
+   * Container-Optimized OS".
+   * 
+ * + * string benchmark_document = 3; + * @return The benchmarkDocument. + */ + @java.lang.Override + public java.lang.String getBenchmarkDocument() { + java.lang.Object ref = benchmarkDocument_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + benchmarkDocument_ = s; + return s; + } + } + /** + *
+   * The name of the document that defines this benchmark, e.g. "CIS
+   * Container-Optimized OS".
+   * 
+ * + * string benchmark_document = 3; + * @return The bytes for benchmarkDocument. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBenchmarkDocumentBytes() { + java.lang.Object ref = benchmarkDocument_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + benchmarkDocument_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * The version of the benchmark. This is set to the version of the OS-specific
+   * CIS document the benchmark is defined in.
+   * 
+ * + * string version = 2; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * The version of the benchmark. This is set to the version of the OS-specific
+   * CIS document the benchmark is defined in.
+   * 
+ * + * string version = 2; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(benchmarkDocument_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, benchmarkDocument_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(benchmarkDocument_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, benchmarkDocument_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ComplianceVersion)) { + return super.equals(obj); + } + io.grafeas.v1.ComplianceVersion other = (io.grafeas.v1.ComplianceVersion) obj; + + if (!getCpeUri() + .equals(other.getCpeUri())) return false; + if (!getBenchmarkDocument() + .equals(other.getBenchmarkDocument())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCpeUri().hashCode(); + hash = (37 * hash) + BENCHMARK_DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getBenchmarkDocument().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ComplianceVersion parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceVersion parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceVersion parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceVersion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ComplianceVersion parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ComplianceVersion parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceVersion parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceVersion parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceVersion parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ComplianceVersion parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ComplianceVersion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ComplianceVersion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Describes the CIS benchmark version that is applicable to a given OS and
+   * os version.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ComplianceVersion} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceVersion) + io.grafeas.v1.ComplianceVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ComplianceVersion.class, io.grafeas.v1.ComplianceVersion.Builder.class); + } + + // Construct using io.grafeas.v1.ComplianceVersion.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cpeUri_ = ""; + benchmarkDocument_ = ""; + version_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceVersion getDefaultInstanceForType() { + return io.grafeas.v1.ComplianceVersion.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ComplianceVersion build() { + io.grafeas.v1.ComplianceVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceVersion buildPartial() { + io.grafeas.v1.ComplianceVersion result = new io.grafeas.v1.ComplianceVersion(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.ComplianceVersion result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cpeUri_ = cpeUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.benchmarkDocument_ = benchmarkDocument_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.version_ = version_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ComplianceVersion) { + return mergeFrom((io.grafeas.v1.ComplianceVersion)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ComplianceVersion other) { + if (other == io.grafeas.v1.ComplianceVersion.getDefaultInstance()) return this; + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBenchmarkDocument().isEmpty()) { + benchmarkDocument_ = other.benchmarkDocument_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: { + benchmarkDocument_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cpeUri_ = ""; + /** + *
+     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+     * applicable to.
+     * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+     * applicable to.
+     * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+     * applicable to.
+     * 
+ * + * string cpe_uri = 1; + * @param value The cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+     * applicable to.
+     * 
+ * + * string cpe_uri = 1; + * @return This builder for chaining. + */ + public Builder clearCpeUri() { + cpeUri_ = getDefaultInstance().getCpeUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+     * applicable to.
+     * 
+ * + * string cpe_uri = 1; + * @param value The bytes for cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object benchmarkDocument_ = ""; + /** + *
+     * The name of the document that defines this benchmark, e.g. "CIS
+     * Container-Optimized OS".
+     * 
+ * + * string benchmark_document = 3; + * @return The benchmarkDocument. + */ + public java.lang.String getBenchmarkDocument() { + java.lang.Object ref = benchmarkDocument_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + benchmarkDocument_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the document that defines this benchmark, e.g. "CIS
+     * Container-Optimized OS".
+     * 
+ * + * string benchmark_document = 3; + * @return The bytes for benchmarkDocument. + */ + public com.google.protobuf.ByteString + getBenchmarkDocumentBytes() { + java.lang.Object ref = benchmarkDocument_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + benchmarkDocument_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the document that defines this benchmark, e.g. "CIS
+     * Container-Optimized OS".
+     * 
+ * + * string benchmark_document = 3; + * @param value The benchmarkDocument to set. + * @return This builder for chaining. + */ + public Builder setBenchmarkDocument( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + benchmarkDocument_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The name of the document that defines this benchmark, e.g. "CIS
+     * Container-Optimized OS".
+     * 
+ * + * string benchmark_document = 3; + * @return This builder for chaining. + */ + public Builder clearBenchmarkDocument() { + benchmarkDocument_ = getDefaultInstance().getBenchmarkDocument(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The name of the document that defines this benchmark, e.g. "CIS
+     * Container-Optimized OS".
+     * 
+ * + * string benchmark_document = 3; + * @param value The bytes for benchmarkDocument to set. + * @return This builder for chaining. + */ + public Builder setBenchmarkDocumentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + benchmarkDocument_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * The version of the benchmark. This is set to the version of the OS-specific
+     * CIS document the benchmark is defined in.
+     * 
+ * + * string version = 2; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The version of the benchmark. This is set to the version of the OS-specific
+     * CIS document the benchmark is defined in.
+     * 
+ * + * string version = 2; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The version of the benchmark. This is set to the version of the OS-specific
+     * CIS document the benchmark is defined in.
+     * 
+ * + * string version = 2; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The version of the benchmark. This is set to the version of the OS-specific
+     * CIS document the benchmark is defined in.
+     * 
+ * + * string version = 2; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The version of the benchmark. This is set to the version of the OS-specific
+     * CIS document the benchmark is defined in.
+     * 
+ * + * string version = 2; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceVersion) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceVersion) + private static final io.grafeas.v1.ComplianceVersion DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceVersion(); + } + + public static io.grafeas.v1.ComplianceVersion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComplianceVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ComplianceVersion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java new file mode 100644 index 000000000000..3cdbaf8994ed --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +public interface ComplianceVersionOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceVersion) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+   * applicable to.
+   * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + java.lang.String getCpeUri(); + /** + *
+   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
+   * applicable to.
+   * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + com.google.protobuf.ByteString + getCpeUriBytes(); + + /** + *
+   * The name of the document that defines this benchmark, e.g. "CIS
+   * Container-Optimized OS".
+   * 
+ * + * string benchmark_document = 3; + * @return The benchmarkDocument. + */ + java.lang.String getBenchmarkDocument(); + /** + *
+   * The name of the document that defines this benchmark, e.g. "CIS
+   * Container-Optimized OS".
+   * 
+ * + * string benchmark_document = 3; + * @return The bytes for benchmarkDocument. + */ + com.google.protobuf.ByteString + getBenchmarkDocumentBytes(); + + /** + *
+   * The version of the benchmark. This is set to the version of the OS-specific
+   * CIS document the benchmark is defined in.
+   * 
+ * + * string version = 2; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * The version of the benchmark. This is set to the version of the OS-specific
+   * CIS document the benchmark is defined in.
+   * 
+ * + * string version = 2; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java new file mode 100644 index 000000000000..aa37c98eeb01 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java @@ -0,0 +1,980 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to create a new note.
+ * 
+ * + * Protobuf type {@code grafeas.v1.CreateNoteRequest} + */ +public final class CreateNoteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.CreateNoteRequest) + CreateNoteRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateNoteRequest.newBuilder() to construct. + private CreateNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateNoteRequest() { + parent_ = ""; + noteId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateNoteRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CreateNoteRequest.class, io.grafeas.v1.CreateNoteRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the note is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the note is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTE_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object noteId_ = ""; + /** + *
+   * The ID to use for this note.
+   * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The noteId. + */ + @java.lang.Override + public java.lang.String getNoteId() { + java.lang.Object ref = noteId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteId_ = s; + return s; + } + } + /** + *
+   * The ID to use for this note.
+   * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for noteId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNoteIdBytes() { + java.lang.Object ref = noteId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + noteId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTE_FIELD_NUMBER = 3; + private io.grafeas.v1.Note note_; + /** + *
+   * The note to create.
+   * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the note field is set. + */ + @java.lang.Override + public boolean hasNote() { + return note_ != null; + } + /** + *
+   * The note to create.
+   * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The note. + */ + @java.lang.Override + public io.grafeas.v1.Note getNote() { + return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; + } + /** + *
+   * The note to create.
+   * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { + return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, noteId_); + } + if (note_ != null) { + output.writeMessage(3, getNote()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, noteId_); + } + if (note_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getNote()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.CreateNoteRequest)) { + return super.equals(obj); + } + io.grafeas.v1.CreateNoteRequest other = (io.grafeas.v1.CreateNoteRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getNoteId() + .equals(other.getNoteId())) return false; + if (hasNote() != other.hasNote()) return false; + if (hasNote()) { + if (!getNote() + .equals(other.getNote())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + NOTE_ID_FIELD_NUMBER; + hash = (53 * hash) + getNoteId().hashCode(); + if (hasNote()) { + hash = (37 * hash) + NOTE_FIELD_NUMBER; + hash = (53 * hash) + getNote().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.CreateNoteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CreateNoteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.CreateNoteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CreateNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.CreateNoteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to create a new note.
+   * 
+ * + * Protobuf type {@code grafeas.v1.CreateNoteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.CreateNoteRequest) + io.grafeas.v1.CreateNoteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CreateNoteRequest.class, io.grafeas.v1.CreateNoteRequest.Builder.class); + } + + // Construct using io.grafeas.v1.CreateNoteRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + noteId_ = ""; + note_ = null; + if (noteBuilder_ != null) { + noteBuilder_.dispose(); + noteBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.CreateNoteRequest getDefaultInstanceForType() { + return io.grafeas.v1.CreateNoteRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.CreateNoteRequest build() { + io.grafeas.v1.CreateNoteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.CreateNoteRequest buildPartial() { + io.grafeas.v1.CreateNoteRequest result = new io.grafeas.v1.CreateNoteRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.CreateNoteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.noteId_ = noteId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.note_ = noteBuilder_ == null + ? note_ + : noteBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.CreateNoteRequest) { + return mergeFrom((io.grafeas.v1.CreateNoteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.CreateNoteRequest other) { + if (other == io.grafeas.v1.CreateNoteRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getNoteId().isEmpty()) { + noteId_ = other.noteId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasNote()) { + mergeNote(other.getNote()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + noteId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getNoteFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the note is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the note is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the note is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the note is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the note is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object noteId_ = ""; + /** + *
+     * The ID to use for this note.
+     * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The noteId. + */ + public java.lang.String getNoteId() { + java.lang.Object ref = noteId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID to use for this note.
+     * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for noteId. + */ + public com.google.protobuf.ByteString + getNoteIdBytes() { + java.lang.Object ref = noteId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + noteId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID to use for this note.
+     * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The noteId to set. + * @return This builder for chaining. + */ + public Builder setNoteId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + noteId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The ID to use for this note.
+     * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearNoteId() { + noteId_ = getDefaultInstance().getNoteId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The ID to use for this note.
+     * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for noteId to set. + * @return This builder for chaining. + */ + public Builder setNoteIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + noteId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.grafeas.v1.Note note_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> noteBuilder_; + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the note field is set. + */ + public boolean hasNote() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The note. + */ + public io.grafeas.v1.Note getNote() { + if (noteBuilder_ == null) { + return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; + } else { + return noteBuilder_.getMessage(); + } + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNote(io.grafeas.v1.Note value) { + if (noteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + note_ = value; + } else { + noteBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNote( + io.grafeas.v1.Note.Builder builderForValue) { + if (noteBuilder_ == null) { + note_ = builderForValue.build(); + } else { + noteBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeNote(io.grafeas.v1.Note value) { + if (noteBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + note_ != null && + note_ != io.grafeas.v1.Note.getDefaultInstance()) { + getNoteBuilder().mergeFrom(value); + } else { + note_ = value; + } + } else { + noteBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearNote() { + bitField0_ = (bitField0_ & ~0x00000004); + note_ = null; + if (noteBuilder_ != null) { + noteBuilder_.dispose(); + noteBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Note.Builder getNoteBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNoteFieldBuilder().getBuilder(); + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { + if (noteBuilder_ != null) { + return noteBuilder_.getMessageOrBuilder(); + } else { + return note_ == null ? + io.grafeas.v1.Note.getDefaultInstance() : note_; + } + } + /** + *
+     * The note to create.
+     * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> + getNoteFieldBuilder() { + if (noteBuilder_ == null) { + noteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( + getNote(), + getParentForChildren(), + isClean()); + note_ = null; + } + return noteBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.CreateNoteRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.CreateNoteRequest) + private static final io.grafeas.v1.CreateNoteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.CreateNoteRequest(); + } + + public static io.grafeas.v1.CreateNoteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNoteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.CreateNoteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java new file mode 100644 index 000000000000..e5c14a7948a8 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface CreateNoteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.CreateNoteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the note is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the note is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The ID to use for this note.
+   * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The noteId. + */ + java.lang.String getNoteId(); + /** + *
+   * The ID to use for this note.
+   * 
+ * + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for noteId. + */ + com.google.protobuf.ByteString + getNoteIdBytes(); + + /** + *
+   * The note to create.
+   * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the note field is set. + */ + boolean hasNote(); + /** + *
+   * The note to create.
+   * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The note. + */ + io.grafeas.v1.Note getNote(); + /** + *
+   * The note to create.
+   * 
+ * + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + io.grafeas.v1.NoteOrBuilder getNoteOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java new file mode 100644 index 000000000000..0748ea7f5513 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java @@ -0,0 +1,816 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to create a new occurrence.
+ * 
+ * + * Protobuf type {@code grafeas.v1.CreateOccurrenceRequest} + */ +public final class CreateOccurrenceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.CreateOccurrenceRequest) + CreateOccurrenceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateOccurrenceRequest.newBuilder() to construct. + private CreateOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateOccurrenceRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateOccurrenceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CreateOccurrenceRequest.class, io.grafeas.v1.CreateOccurrenceRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrence is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrence is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OCCURRENCE_FIELD_NUMBER = 2; + private io.grafeas.v1.Occurrence occurrence_; + /** + *
+   * The occurrence to create.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the occurrence field is set. + */ + @java.lang.Override + public boolean hasOccurrence() { + return occurrence_ != null; + } + /** + *
+   * The occurrence to create.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The occurrence. + */ + @java.lang.Override + public io.grafeas.v1.Occurrence getOccurrence() { + return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } + /** + *
+   * The occurrence to create.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { + return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (occurrence_ != null) { + output.writeMessage(2, getOccurrence()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (occurrence_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOccurrence()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.CreateOccurrenceRequest)) { + return super.equals(obj); + } + io.grafeas.v1.CreateOccurrenceRequest other = (io.grafeas.v1.CreateOccurrenceRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasOccurrence() != other.hasOccurrence()) return false; + if (hasOccurrence()) { + if (!getOccurrence() + .equals(other.getOccurrence())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasOccurrence()) { + hash = (37 * hash) + OCCURRENCE_FIELD_NUMBER; + hash = (53 * hash) + getOccurrence().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.CreateOccurrenceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to create a new occurrence.
+   * 
+ * + * Protobuf type {@code grafeas.v1.CreateOccurrenceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.CreateOccurrenceRequest) + io.grafeas.v1.CreateOccurrenceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.CreateOccurrenceRequest.class, io.grafeas.v1.CreateOccurrenceRequest.Builder.class); + } + + // Construct using io.grafeas.v1.CreateOccurrenceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + occurrence_ = null; + if (occurrenceBuilder_ != null) { + occurrenceBuilder_.dispose(); + occurrenceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.CreateOccurrenceRequest getDefaultInstanceForType() { + return io.grafeas.v1.CreateOccurrenceRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.CreateOccurrenceRequest build() { + io.grafeas.v1.CreateOccurrenceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.CreateOccurrenceRequest buildPartial() { + io.grafeas.v1.CreateOccurrenceRequest result = new io.grafeas.v1.CreateOccurrenceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.CreateOccurrenceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.occurrence_ = occurrenceBuilder_ == null + ? occurrence_ + : occurrenceBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.CreateOccurrenceRequest) { + return mergeFrom((io.grafeas.v1.CreateOccurrenceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.CreateOccurrenceRequest other) { + if (other == io.grafeas.v1.CreateOccurrenceRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasOccurrence()) { + mergeOccurrence(other.getOccurrence()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getOccurrenceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrence is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrence is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrence is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrence is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+     * the occurrence is to be created.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.grafeas.v1.Occurrence occurrence_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrenceBuilder_; + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the occurrence field is set. + */ + public boolean hasOccurrence() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The occurrence. + */ + public io.grafeas.v1.Occurrence getOccurrence() { + if (occurrenceBuilder_ == null) { + return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } else { + return occurrenceBuilder_.getMessage(); + } + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOccurrence(io.grafeas.v1.Occurrence value) { + if (occurrenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + occurrence_ = value; + } else { + occurrenceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOccurrence( + io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrenceBuilder_ == null) { + occurrence_ = builderForValue.build(); + } else { + occurrenceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeOccurrence(io.grafeas.v1.Occurrence value) { + if (occurrenceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + occurrence_ != null && + occurrence_ != io.grafeas.v1.Occurrence.getDefaultInstance()) { + getOccurrenceBuilder().mergeFrom(value); + } else { + occurrence_ = value; + } + } else { + occurrenceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearOccurrence() { + bitField0_ = (bitField0_ & ~0x00000002); + occurrence_ = null; + if (occurrenceBuilder_ != null) { + occurrenceBuilder_.dispose(); + occurrenceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Occurrence.Builder getOccurrenceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOccurrenceFieldBuilder().getBuilder(); + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { + if (occurrenceBuilder_ != null) { + return occurrenceBuilder_.getMessageOrBuilder(); + } else { + return occurrence_ == null ? + io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } + } + /** + *
+     * The occurrence to create.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> + getOccurrenceFieldBuilder() { + if (occurrenceBuilder_ == null) { + occurrenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( + getOccurrence(), + getParentForChildren(), + isClean()); + occurrence_ = null; + } + return occurrenceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.CreateOccurrenceRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.CreateOccurrenceRequest) + private static final io.grafeas.v1.CreateOccurrenceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.CreateOccurrenceRequest(); + } + + public static io.grafeas.v1.CreateOccurrenceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateOccurrenceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.CreateOccurrenceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java new file mode 100644 index 000000000000..6e3a891dbb49 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface CreateOccurrenceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.CreateOccurrenceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrence is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
+   * the occurrence is to be created.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The occurrence to create.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the occurrence field is set. + */ + boolean hasOccurrence(); + /** + *
+   * The occurrence to create.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The occurrence. + */ + io.grafeas.v1.Occurrence getOccurrence(); + /** + *
+   * The occurrence to create.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java new file mode 100644 index 000000000000..f8cbe4710cbd --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java @@ -0,0 +1,1257 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/dsse_attestation.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.DSSEAttestationNote} + */ +public final class DSSEAttestationNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DSSEAttestationNote) + DSSEAttestationNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use DSSEAttestationNote.newBuilder() to construct. + private DSSEAttestationNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DSSEAttestationNote() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DSSEAttestationNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DSSEAttestationNote.class, io.grafeas.v1.DSSEAttestationNote.Builder.class); + } + + public interface DSSEHintOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DSSEAttestationNote.DSSEHint) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "cloudbuild-prod".
+     * 
+ * + * string human_readable_name = 1; + * @return The humanReadableName. + */ + java.lang.String getHumanReadableName(); + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "cloudbuild-prod".
+     * 
+ * + * string human_readable_name = 1; + * @return The bytes for humanReadableName. + */ + com.google.protobuf.ByteString + getHumanReadableNameBytes(); + } + /** + *
+   * This submessage provides human-readable hints about the purpose of the
+   * authority. Because the name of a note acts as its resource reference, it is
+   * important to disambiguate the canonical name of the Note (which might be a
+   * UUID for security purposes) from "readable" names more suitable for debug
+   * output. Note that these hints should not be used to look up authorities in
+   * security sensitive contexts, such as when looking up attestations to
+   * verify.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DSSEAttestationNote.DSSEHint} + */ + public static final class DSSEHint extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DSSEAttestationNote.DSSEHint) + DSSEHintOrBuilder { + private static final long serialVersionUID = 0L; + // Use DSSEHint.newBuilder() to construct. + private DSSEHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DSSEHint() { + humanReadableName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DSSEHint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DSSEAttestationNote.DSSEHint.class, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder.class); + } + + public static final int HUMAN_READABLE_NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object humanReadableName_ = ""; + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "cloudbuild-prod".
+     * 
+ * + * string human_readable_name = 1; + * @return The humanReadableName. + */ + @java.lang.Override + public java.lang.String getHumanReadableName() { + java.lang.Object ref = humanReadableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + humanReadableName_ = s; + return s; + } + } + /** + *
+     * Required. The human readable name of this attestation authority, for
+     * example "cloudbuild-prod".
+     * 
+ * + * string human_readable_name = 1; + * @return The bytes for humanReadableName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHumanReadableNameBytes() { + java.lang.Object ref = humanReadableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + humanReadableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, humanReadableName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, humanReadableName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DSSEAttestationNote.DSSEHint)) { + return super.equals(obj); + } + io.grafeas.v1.DSSEAttestationNote.DSSEHint other = (io.grafeas.v1.DSSEAttestationNote.DSSEHint) obj; + + if (!getHumanReadableName() + .equals(other.getHumanReadableName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HUMAN_READABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getHumanReadableName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DSSEAttestationNote.DSSEHint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * This submessage provides human-readable hints about the purpose of the
+     * authority. Because the name of a note acts as its resource reference, it is
+     * important to disambiguate the canonical name of the Note (which might be a
+     * UUID for security purposes) from "readable" names more suitable for debug
+     * output. Note that these hints should not be used to look up authorities in
+     * security sensitive contexts, such as when looking up attestations to
+     * verify.
+     * 
+ * + * Protobuf type {@code grafeas.v1.DSSEAttestationNote.DSSEHint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DSSEAttestationNote.DSSEHint) + io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DSSEAttestationNote.DSSEHint.class, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder.class); + } + + // Construct using io.grafeas.v1.DSSEAttestationNote.DSSEHint.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + humanReadableName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote.DSSEHint getDefaultInstanceForType() { + return io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote.DSSEHint build() { + io.grafeas.v1.DSSEAttestationNote.DSSEHint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote.DSSEHint buildPartial() { + io.grafeas.v1.DSSEAttestationNote.DSSEHint result = new io.grafeas.v1.DSSEAttestationNote.DSSEHint(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.DSSEAttestationNote.DSSEHint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.humanReadableName_ = humanReadableName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DSSEAttestationNote.DSSEHint) { + return mergeFrom((io.grafeas.v1.DSSEAttestationNote.DSSEHint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DSSEAttestationNote.DSSEHint other) { + if (other == io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance()) return this; + if (!other.getHumanReadableName().isEmpty()) { + humanReadableName_ = other.humanReadableName_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + humanReadableName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object humanReadableName_ = ""; + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "cloudbuild-prod".
+       * 
+ * + * string human_readable_name = 1; + * @return The humanReadableName. + */ + public java.lang.String getHumanReadableName() { + java.lang.Object ref = humanReadableName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + humanReadableName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "cloudbuild-prod".
+       * 
+ * + * string human_readable_name = 1; + * @return The bytes for humanReadableName. + */ + public com.google.protobuf.ByteString + getHumanReadableNameBytes() { + java.lang.Object ref = humanReadableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + humanReadableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "cloudbuild-prod".
+       * 
+ * + * string human_readable_name = 1; + * @param value The humanReadableName to set. + * @return This builder for chaining. + */ + public Builder setHumanReadableName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + humanReadableName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "cloudbuild-prod".
+       * 
+ * + * string human_readable_name = 1; + * @return This builder for chaining. + */ + public Builder clearHumanReadableName() { + humanReadableName_ = getDefaultInstance().getHumanReadableName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Required. The human readable name of this attestation authority, for
+       * example "cloudbuild-prod".
+       * 
+ * + * string human_readable_name = 1; + * @param value The bytes for humanReadableName to set. + * @return This builder for chaining. + */ + public Builder setHumanReadableNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + humanReadableName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DSSEAttestationNote.DSSEHint) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DSSEAttestationNote.DSSEHint) + private static final io.grafeas.v1.DSSEAttestationNote.DSSEHint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DSSEAttestationNote.DSSEHint(); + } + + public static io.grafeas.v1.DSSEAttestationNote.DSSEHint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DSSEHint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote.DSSEHint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int HINT_FIELD_NUMBER = 1; + private io.grafeas.v1.DSSEAttestationNote.DSSEHint hint_; + /** + *
+   * DSSEHint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + * @return Whether the hint field is set. + */ + @java.lang.Override + public boolean hasHint() { + return hint_ != null; + } + /** + *
+   * DSSEHint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + * @return The hint. + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote.DSSEHint getHint() { + return hint_ == null ? io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; + } + /** + *
+   * DSSEHint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder getHintOrBuilder() { + return hint_ == null ? io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (hint_ != null) { + output.writeMessage(1, getHint()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (hint_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getHint()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DSSEAttestationNote)) { + return super.equals(obj); + } + io.grafeas.v1.DSSEAttestationNote other = (io.grafeas.v1.DSSEAttestationNote) obj; + + if (hasHint() != other.hasHint()) return false; + if (hasHint()) { + if (!getHint() + .equals(other.getHint())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHint()) { + hash = (37 * hash) + HINT_FIELD_NUMBER; + hash = (53 * hash) + getHint().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DSSEAttestationNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.DSSEAttestationNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DSSEAttestationNote) + io.grafeas.v1.DSSEAttestationNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DSSEAttestationNote.class, io.grafeas.v1.DSSEAttestationNote.Builder.class); + } + + // Construct using io.grafeas.v1.DSSEAttestationNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + hint_ = null; + if (hintBuilder_ != null) { + hintBuilder_.dispose(); + hintBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote getDefaultInstanceForType() { + return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote build() { + io.grafeas.v1.DSSEAttestationNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote buildPartial() { + io.grafeas.v1.DSSEAttestationNote result = new io.grafeas.v1.DSSEAttestationNote(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.DSSEAttestationNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.hint_ = hintBuilder_ == null + ? hint_ + : hintBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DSSEAttestationNote) { + return mergeFrom((io.grafeas.v1.DSSEAttestationNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DSSEAttestationNote other) { + if (other == io.grafeas.v1.DSSEAttestationNote.getDefaultInstance()) return this; + if (other.hasHint()) { + mergeHint(other.getHint()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getHintFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.DSSEAttestationNote.DSSEHint hint_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationNote.DSSEHint, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder, io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder> hintBuilder_; + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + * @return Whether the hint field is set. + */ + public boolean hasHint() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + * @return The hint. + */ + public io.grafeas.v1.DSSEAttestationNote.DSSEHint getHint() { + if (hintBuilder_ == null) { + return hint_ == null ? io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; + } else { + return hintBuilder_.getMessage(); + } + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + public Builder setHint(io.grafeas.v1.DSSEAttestationNote.DSSEHint value) { + if (hintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hint_ = value; + } else { + hintBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + public Builder setHint( + io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder builderForValue) { + if (hintBuilder_ == null) { + hint_ = builderForValue.build(); + } else { + hintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + public Builder mergeHint(io.grafeas.v1.DSSEAttestationNote.DSSEHint value) { + if (hintBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + hint_ != null && + hint_ != io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance()) { + getHintBuilder().mergeFrom(value); + } else { + hint_ = value; + } + } else { + hintBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + public Builder clearHint() { + bitField0_ = (bitField0_ & ~0x00000001); + hint_ = null; + if (hintBuilder_ != null) { + hintBuilder_.dispose(); + hintBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + public io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder getHintBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHintFieldBuilder().getBuilder(); + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + public io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder getHintOrBuilder() { + if (hintBuilder_ != null) { + return hintBuilder_.getMessageOrBuilder(); + } else { + return hint_ == null ? + io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; + } + } + /** + *
+     * DSSEHint hints at the purpose of the attestation authority.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationNote.DSSEHint, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder, io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder> + getHintFieldBuilder() { + if (hintBuilder_ == null) { + hintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationNote.DSSEHint, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder, io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder>( + getHint(), + getParentForChildren(), + isClean()); + hint_ = null; + } + return hintBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DSSEAttestationNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DSSEAttestationNote) + private static final io.grafeas.v1.DSSEAttestationNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DSSEAttestationNote(); + } + + public static io.grafeas.v1.DSSEAttestationNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DSSEAttestationNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java new file mode 100644 index 000000000000..a117798b32fc --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/dsse_attestation.proto + +package io.grafeas.v1; + +public interface DSSEAttestationNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DSSEAttestationNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * DSSEHint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + * @return Whether the hint field is set. + */ + boolean hasHint(); + /** + *
+   * DSSEHint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + * @return The hint. + */ + io.grafeas.v1.DSSEAttestationNote.DSSEHint getHint(); + /** + *
+   * DSSEHint hints at the purpose of the attestation authority.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder getHintOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java new file mode 100644 index 000000000000..4228d6b0b59c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java @@ -0,0 +1,941 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/dsse_attestation.proto + +package io.grafeas.v1; + +/** + *
+ * Deprecated. Prefer to use a regular Occurrence, and populate the
+ * Envelope at the top level of the Occurrence.
+ * 
+ * + * Protobuf type {@code grafeas.v1.DSSEAttestationOccurrence} + */ +public final class DSSEAttestationOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DSSEAttestationOccurrence) + DSSEAttestationOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use DSSEAttestationOccurrence.newBuilder() to construct. + private DSSEAttestationOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DSSEAttestationOccurrence() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DSSEAttestationOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DSSEAttestationOccurrence.class, io.grafeas.v1.DSSEAttestationOccurrence.Builder.class); + } + + private int decodedPayloadCase_ = 0; + private java.lang.Object decodedPayload_; + public enum DecodedPayloadCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STATEMENT(2), + DECODEDPAYLOAD_NOT_SET(0); + private final int value; + private DecodedPayloadCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DecodedPayloadCase valueOf(int value) { + return forNumber(value); + } + + public static DecodedPayloadCase forNumber(int value) { + switch (value) { + case 2: return STATEMENT; + case 0: return DECODEDPAYLOAD_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DecodedPayloadCase + getDecodedPayloadCase() { + return DecodedPayloadCase.forNumber( + decodedPayloadCase_); + } + + public static final int ENVELOPE_FIELD_NUMBER = 1; + private io.grafeas.v1.Envelope envelope_; + /** + *
+   * If doing something security critical, make sure to verify the signatures in
+   * this metadata.
+   * 
+ * + * .grafeas.v1.Envelope envelope = 1; + * @return Whether the envelope field is set. + */ + @java.lang.Override + public boolean hasEnvelope() { + return envelope_ != null; + } + /** + *
+   * If doing something security critical, make sure to verify the signatures in
+   * this metadata.
+   * 
+ * + * .grafeas.v1.Envelope envelope = 1; + * @return The envelope. + */ + @java.lang.Override + public io.grafeas.v1.Envelope getEnvelope() { + return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } + /** + *
+   * If doing something security critical, make sure to verify the signatures in
+   * this metadata.
+   * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + @java.lang.Override + public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { + return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } + + public static final int STATEMENT_FIELD_NUMBER = 2; + /** + * .grafeas.v1.InTotoStatement statement = 2; + * @return Whether the statement field is set. + */ + @java.lang.Override + public boolean hasStatement() { + return decodedPayloadCase_ == 2; + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + * @return The statement. + */ + @java.lang.Override + public io.grafeas.v1.InTotoStatement getStatement() { + if (decodedPayloadCase_ == 2) { + return (io.grafeas.v1.InTotoStatement) decodedPayload_; + } + return io.grafeas.v1.InTotoStatement.getDefaultInstance(); + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + @java.lang.Override + public io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder() { + if (decodedPayloadCase_ == 2) { + return (io.grafeas.v1.InTotoStatement) decodedPayload_; + } + return io.grafeas.v1.InTotoStatement.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (envelope_ != null) { + output.writeMessage(1, getEnvelope()); + } + if (decodedPayloadCase_ == 2) { + output.writeMessage(2, (io.grafeas.v1.InTotoStatement) decodedPayload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (envelope_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getEnvelope()); + } + if (decodedPayloadCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (io.grafeas.v1.InTotoStatement) decodedPayload_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DSSEAttestationOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.DSSEAttestationOccurrence other = (io.grafeas.v1.DSSEAttestationOccurrence) obj; + + if (hasEnvelope() != other.hasEnvelope()) return false; + if (hasEnvelope()) { + if (!getEnvelope() + .equals(other.getEnvelope())) return false; + } + if (!getDecodedPayloadCase().equals(other.getDecodedPayloadCase())) return false; + switch (decodedPayloadCase_) { + case 2: + if (!getStatement() + .equals(other.getStatement())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEnvelope()) { + hash = (37 * hash) + ENVELOPE_FIELD_NUMBER; + hash = (53 * hash) + getEnvelope().hashCode(); + } + switch (decodedPayloadCase_) { + case 2: + hash = (37 * hash) + STATEMENT_FIELD_NUMBER; + hash = (53 * hash) + getStatement().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DSSEAttestationOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Deprecated. Prefer to use a regular Occurrence, and populate the
+   * Envelope at the top level of the Occurrence.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DSSEAttestationOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DSSEAttestationOccurrence) + io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DSSEAttestationOccurrence.class, io.grafeas.v1.DSSEAttestationOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.DSSEAttestationOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + envelope_ = null; + if (envelopeBuilder_ != null) { + envelopeBuilder_.dispose(); + envelopeBuilder_ = null; + } + if (statementBuilder_ != null) { + statementBuilder_.clear(); + } + decodedPayloadCase_ = 0; + decodedPayload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrence build() { + io.grafeas.v1.DSSEAttestationOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrence buildPartial() { + io.grafeas.v1.DSSEAttestationOccurrence result = new io.grafeas.v1.DSSEAttestationOccurrence(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.DSSEAttestationOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.envelope_ = envelopeBuilder_ == null + ? envelope_ + : envelopeBuilder_.build(); + } + } + + private void buildPartialOneofs(io.grafeas.v1.DSSEAttestationOccurrence result) { + result.decodedPayloadCase_ = decodedPayloadCase_; + result.decodedPayload_ = this.decodedPayload_; + if (decodedPayloadCase_ == 2 && + statementBuilder_ != null) { + result.decodedPayload_ = statementBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DSSEAttestationOccurrence) { + return mergeFrom((io.grafeas.v1.DSSEAttestationOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DSSEAttestationOccurrence other) { + if (other == io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance()) return this; + if (other.hasEnvelope()) { + mergeEnvelope(other.getEnvelope()); + } + switch (other.getDecodedPayloadCase()) { + case STATEMENT: { + mergeStatement(other.getStatement()); + break; + } + case DECODEDPAYLOAD_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getEnvelopeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getStatementFieldBuilder().getBuilder(), + extensionRegistry); + decodedPayloadCase_ = 2; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int decodedPayloadCase_ = 0; + private java.lang.Object decodedPayload_; + public DecodedPayloadCase + getDecodedPayloadCase() { + return DecodedPayloadCase.forNumber( + decodedPayloadCase_); + } + + public Builder clearDecodedPayload() { + decodedPayloadCase_ = 0; + decodedPayload_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private io.grafeas.v1.Envelope envelope_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> envelopeBuilder_; + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + * @return Whether the envelope field is set. + */ + public boolean hasEnvelope() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + * @return The envelope. + */ + public io.grafeas.v1.Envelope getEnvelope() { + if (envelopeBuilder_ == null) { + return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } else { + return envelopeBuilder_.getMessage(); + } + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + public Builder setEnvelope(io.grafeas.v1.Envelope value) { + if (envelopeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + envelope_ = value; + } else { + envelopeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + public Builder setEnvelope( + io.grafeas.v1.Envelope.Builder builderForValue) { + if (envelopeBuilder_ == null) { + envelope_ = builderForValue.build(); + } else { + envelopeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + public Builder mergeEnvelope(io.grafeas.v1.Envelope value) { + if (envelopeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + envelope_ != null && + envelope_ != io.grafeas.v1.Envelope.getDefaultInstance()) { + getEnvelopeBuilder().mergeFrom(value); + } else { + envelope_ = value; + } + } else { + envelopeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + public Builder clearEnvelope() { + bitField0_ = (bitField0_ & ~0x00000001); + envelope_ = null; + if (envelopeBuilder_ != null) { + envelopeBuilder_.dispose(); + envelopeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + public io.grafeas.v1.Envelope.Builder getEnvelopeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getEnvelopeFieldBuilder().getBuilder(); + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { + if (envelopeBuilder_ != null) { + return envelopeBuilder_.getMessageOrBuilder(); + } else { + return envelope_ == null ? + io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } + } + /** + *
+     * If doing something security critical, make sure to verify the signatures in
+     * this metadata.
+     * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> + getEnvelopeFieldBuilder() { + if (envelopeBuilder_ == null) { + envelopeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder>( + getEnvelope(), + getParentForChildren(), + isClean()); + envelope_ = null; + } + return envelopeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> statementBuilder_; + /** + * .grafeas.v1.InTotoStatement statement = 2; + * @return Whether the statement field is set. + */ + @java.lang.Override + public boolean hasStatement() { + return decodedPayloadCase_ == 2; + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + * @return The statement. + */ + @java.lang.Override + public io.grafeas.v1.InTotoStatement getStatement() { + if (statementBuilder_ == null) { + if (decodedPayloadCase_ == 2) { + return (io.grafeas.v1.InTotoStatement) decodedPayload_; + } + return io.grafeas.v1.InTotoStatement.getDefaultInstance(); + } else { + if (decodedPayloadCase_ == 2) { + return statementBuilder_.getMessage(); + } + return io.grafeas.v1.InTotoStatement.getDefaultInstance(); + } + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + public Builder setStatement(io.grafeas.v1.InTotoStatement value) { + if (statementBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + decodedPayload_ = value; + onChanged(); + } else { + statementBuilder_.setMessage(value); + } + decodedPayloadCase_ = 2; + return this; + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + public Builder setStatement( + io.grafeas.v1.InTotoStatement.Builder builderForValue) { + if (statementBuilder_ == null) { + decodedPayload_ = builderForValue.build(); + onChanged(); + } else { + statementBuilder_.setMessage(builderForValue.build()); + } + decodedPayloadCase_ = 2; + return this; + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + public Builder mergeStatement(io.grafeas.v1.InTotoStatement value) { + if (statementBuilder_ == null) { + if (decodedPayloadCase_ == 2 && + decodedPayload_ != io.grafeas.v1.InTotoStatement.getDefaultInstance()) { + decodedPayload_ = io.grafeas.v1.InTotoStatement.newBuilder((io.grafeas.v1.InTotoStatement) decodedPayload_) + .mergeFrom(value).buildPartial(); + } else { + decodedPayload_ = value; + } + onChanged(); + } else { + if (decodedPayloadCase_ == 2) { + statementBuilder_.mergeFrom(value); + } else { + statementBuilder_.setMessage(value); + } + } + decodedPayloadCase_ = 2; + return this; + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + public Builder clearStatement() { + if (statementBuilder_ == null) { + if (decodedPayloadCase_ == 2) { + decodedPayloadCase_ = 0; + decodedPayload_ = null; + onChanged(); + } + } else { + if (decodedPayloadCase_ == 2) { + decodedPayloadCase_ = 0; + decodedPayload_ = null; + } + statementBuilder_.clear(); + } + return this; + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + public io.grafeas.v1.InTotoStatement.Builder getStatementBuilder() { + return getStatementFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + @java.lang.Override + public io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder() { + if ((decodedPayloadCase_ == 2) && (statementBuilder_ != null)) { + return statementBuilder_.getMessageOrBuilder(); + } else { + if (decodedPayloadCase_ == 2) { + return (io.grafeas.v1.InTotoStatement) decodedPayload_; + } + return io.grafeas.v1.InTotoStatement.getDefaultInstance(); + } + } + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> + getStatementFieldBuilder() { + if (statementBuilder_ == null) { + if (!(decodedPayloadCase_ == 2)) { + decodedPayload_ = io.grafeas.v1.InTotoStatement.getDefaultInstance(); + } + statementBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder>( + (io.grafeas.v1.InTotoStatement) decodedPayload_, + getParentForChildren(), + isClean()); + decodedPayload_ = null; + } + decodedPayloadCase_ = 2; + onChanged(); + return statementBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DSSEAttestationOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DSSEAttestationOccurrence) + private static final io.grafeas.v1.DSSEAttestationOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DSSEAttestationOccurrence(); + } + + public static io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DSSEAttestationOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java new file mode 100644 index 000000000000..0ef0cb2ac550 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/dsse_attestation.proto + +package io.grafeas.v1; + +public interface DSSEAttestationOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DSSEAttestationOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If doing something security critical, make sure to verify the signatures in
+   * this metadata.
+   * 
+ * + * .grafeas.v1.Envelope envelope = 1; + * @return Whether the envelope field is set. + */ + boolean hasEnvelope(); + /** + *
+   * If doing something security critical, make sure to verify the signatures in
+   * this metadata.
+   * 
+ * + * .grafeas.v1.Envelope envelope = 1; + * @return The envelope. + */ + io.grafeas.v1.Envelope getEnvelope(); + /** + *
+   * If doing something security critical, make sure to verify the signatures in
+   * this metadata.
+   * 
+ * + * .grafeas.v1.Envelope envelope = 1; + */ + io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder(); + + /** + * .grafeas.v1.InTotoStatement statement = 2; + * @return Whether the statement field is set. + */ + boolean hasStatement(); + /** + * .grafeas.v1.InTotoStatement statement = 2; + * @return The statement. + */ + io.grafeas.v1.InTotoStatement getStatement(); + /** + * .grafeas.v1.InTotoStatement statement = 2; + */ + io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder(); + + public io.grafeas.v1.DSSEAttestationOccurrence.DecodedPayloadCase getDecodedPayloadCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java new file mode 100644 index 000000000000..0436291b80b9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java @@ -0,0 +1,587 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to delete a note.
+ * 
+ * + * Protobuf type {@code grafeas.v1.DeleteNoteRequest} + */ +public final class DeleteNoteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DeleteNoteRequest) + DeleteNoteRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteNoteRequest.newBuilder() to construct. + private DeleteNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteNoteRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteNoteRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeleteNoteRequest.class, io.grafeas.v1.DeleteNoteRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DeleteNoteRequest)) { + return super.equals(obj); + } + io.grafeas.v1.DeleteNoteRequest other = (io.grafeas.v1.DeleteNoteRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeleteNoteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeleteNoteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeleteNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DeleteNoteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to delete a note.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DeleteNoteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DeleteNoteRequest) + io.grafeas.v1.DeleteNoteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeleteNoteRequest.class, io.grafeas.v1.DeleteNoteRequest.Builder.class); + } + + // Construct using io.grafeas.v1.DeleteNoteRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DeleteNoteRequest getDefaultInstanceForType() { + return io.grafeas.v1.DeleteNoteRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DeleteNoteRequest build() { + io.grafeas.v1.DeleteNoteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DeleteNoteRequest buildPartial() { + io.grafeas.v1.DeleteNoteRequest result = new io.grafeas.v1.DeleteNoteRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.DeleteNoteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DeleteNoteRequest) { + return mergeFrom((io.grafeas.v1.DeleteNoteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DeleteNoteRequest other) { + if (other == io.grafeas.v1.DeleteNoteRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DeleteNoteRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DeleteNoteRequest) + private static final io.grafeas.v1.DeleteNoteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DeleteNoteRequest(); + } + + public static io.grafeas.v1.DeleteNoteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteNoteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DeleteNoteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java new file mode 100644 index 000000000000..f7cdc3fd761a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface DeleteNoteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DeleteNoteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java new file mode 100644 index 000000000000..cf4d61bfad6e --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java @@ -0,0 +1,587 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to delete an occurrence.
+ * 
+ * + * Protobuf type {@code grafeas.v1.DeleteOccurrenceRequest} + */ +public final class DeleteOccurrenceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DeleteOccurrenceRequest) + DeleteOccurrenceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteOccurrenceRequest.newBuilder() to construct. + private DeleteOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteOccurrenceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteOccurrenceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeleteOccurrenceRequest.class, io.grafeas.v1.DeleteOccurrenceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DeleteOccurrenceRequest)) { + return super.equals(obj); + } + io.grafeas.v1.DeleteOccurrenceRequest other = (io.grafeas.v1.DeleteOccurrenceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DeleteOccurrenceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to delete an occurrence.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DeleteOccurrenceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DeleteOccurrenceRequest) + io.grafeas.v1.DeleteOccurrenceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeleteOccurrenceRequest.class, io.grafeas.v1.DeleteOccurrenceRequest.Builder.class); + } + + // Construct using io.grafeas.v1.DeleteOccurrenceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DeleteOccurrenceRequest getDefaultInstanceForType() { + return io.grafeas.v1.DeleteOccurrenceRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DeleteOccurrenceRequest build() { + io.grafeas.v1.DeleteOccurrenceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DeleteOccurrenceRequest buildPartial() { + io.grafeas.v1.DeleteOccurrenceRequest result = new io.grafeas.v1.DeleteOccurrenceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.DeleteOccurrenceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DeleteOccurrenceRequest) { + return mergeFrom((io.grafeas.v1.DeleteOccurrenceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DeleteOccurrenceRequest other) { + if (other == io.grafeas.v1.DeleteOccurrenceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DeleteOccurrenceRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DeleteOccurrenceRequest) + private static final io.grafeas.v1.DeleteOccurrenceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DeleteOccurrenceRequest(); + } + + public static io.grafeas.v1.DeleteOccurrenceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteOccurrenceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DeleteOccurrenceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java new file mode 100644 index 000000000000..755eafdee791 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface DeleteOccurrenceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DeleteOccurrenceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java new file mode 100644 index 000000000000..a74f9380efe2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/deployment.proto + +package io.grafeas.v1; + +public final class Deployment { + private Deployment() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DeploymentNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DeploymentOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033grafeas/v1/deployment.proto\022\ngrafeas.v" + + "1\032\037google/protobuf/timestamp.proto\"&\n\016De" + + "ploymentNote\022\024\n\014resource_uri\030\001 \003(\t\"\307\002\n\024D" + + "eploymentOccurrence\022\022\n\nuser_email\030\001 \001(\t\022" + + "/\n\013deploy_time\030\002 \001(\0132\032.google.protobuf.T" + + "imestamp\0221\n\rundeploy_time\030\003 \001(\0132\032.google" + + ".protobuf.Timestamp\022\016\n\006config\030\004 \001(\t\022\017\n\007a" + + "ddress\030\005 \001(\t\022\024\n\014resource_uri\030\006 \003(\t\022;\n\010pl" + + "atform\030\007 \001(\0162).grafeas.v1.DeploymentOccu" + + "rrence.Platform\"C\n\010Platform\022\030\n\024PLATFORM_" + + "UNSPECIFIED\020\000\022\007\n\003GKE\020\001\022\010\n\004FLEX\020\002\022\n\n\006CUST" + + "OM\020\003BQ\n\rio.grafeas.v1P\001Z8google.golang.o" + + "rg/genproto/googleapis/grafeas/v1;grafea" + + "s\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_grafeas_v1_DeploymentNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DeploymentNote_descriptor, + new java.lang.String[] { "ResourceUri", }); + internal_static_grafeas_v1_DeploymentOccurrence_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DeploymentOccurrence_descriptor, + new java.lang.String[] { "UserEmail", "DeployTime", "UndeployTime", "Config", "Address", "ResourceUri", "Platform", }); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java new file mode 100644 index 000000000000..ad814299c958 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java @@ -0,0 +1,653 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/deployment.proto + +package io.grafeas.v1; + +/** + *
+ * An artifact that can be deployed in some runtime.
+ * 
+ * + * Protobuf type {@code grafeas.v1.DeploymentNote} + */ +public final class DeploymentNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DeploymentNote) + DeploymentNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeploymentNote.newBuilder() to construct. + private DeploymentNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeploymentNote() { + resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeploymentNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeploymentNote.class, io.grafeas.v1.DeploymentNote.Builder.class); + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList resourceUri_; + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @return A list containing the resourceUri. + */ + public com.google.protobuf.ProtocolStringList + getResourceUriList() { + return resourceUri_; + } + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @return The count of resourceUri. + */ + public int getResourceUriCount() { + return resourceUri_.size(); + } + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @param index The index of the element to return. + * @return The resourceUri at the given index. + */ + public java.lang.String getResourceUri(int index) { + return resourceUri_.get(index); + } + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @param index The index of the value to return. + * @return The bytes of the resourceUri at the given index. + */ + public com.google.protobuf.ByteString + getResourceUriBytes(int index) { + return resourceUri_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < resourceUri_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceUri_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < resourceUri_.size(); i++) { + dataSize += computeStringSizeNoTag(resourceUri_.getRaw(i)); + } + size += dataSize; + size += 1 * getResourceUriList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DeploymentNote)) { + return super.equals(obj); + } + io.grafeas.v1.DeploymentNote other = (io.grafeas.v1.DeploymentNote) obj; + + if (!getResourceUriList() + .equals(other.getResourceUriList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResourceUriCount() > 0) { + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUriList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DeploymentNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeploymentNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeploymentNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeploymentNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeploymentNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeploymentNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeploymentNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeploymentNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeploymentNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeploymentNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeploymentNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeploymentNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DeploymentNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An artifact that can be deployed in some runtime.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DeploymentNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DeploymentNote) + io.grafeas.v1.DeploymentNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeploymentNote.class, io.grafeas.v1.DeploymentNote.Builder.class); + } + + // Construct using io.grafeas.v1.DeploymentNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DeploymentNote getDefaultInstanceForType() { + return io.grafeas.v1.DeploymentNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DeploymentNote build() { + io.grafeas.v1.DeploymentNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DeploymentNote buildPartial() { + io.grafeas.v1.DeploymentNote result = new io.grafeas.v1.DeploymentNote(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.DeploymentNote result) { + if (((bitField0_ & 0x00000001) != 0)) { + resourceUri_ = resourceUri_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resourceUri_ = resourceUri_; + } + + private void buildPartial0(io.grafeas.v1.DeploymentNote result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DeploymentNote) { + return mergeFrom((io.grafeas.v1.DeploymentNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DeploymentNote other) { + if (other == io.grafeas.v1.DeploymentNote.getDefaultInstance()) return this; + if (!other.resourceUri_.isEmpty()) { + if (resourceUri_.isEmpty()) { + resourceUri_ = other.resourceUri_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourceUriIsMutable(); + resourceUri_.addAll(other.resourceUri_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourceUriIsMutable(); + resourceUri_.add(s); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureResourceUriIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resourceUri_ = new com.google.protobuf.LazyStringArrayList(resourceUri_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @return A list containing the resourceUri. + */ + public com.google.protobuf.ProtocolStringList + getResourceUriList() { + return resourceUri_.getUnmodifiableView(); + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @return The count of resourceUri. + */ + public int getResourceUriCount() { + return resourceUri_.size(); + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @param index The index of the element to return. + * @return The resourceUri at the given index. + */ + public java.lang.String getResourceUri(int index) { + return resourceUri_.get(index); + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @param index The index of the value to return. + * @return The bytes of the resourceUri at the given index. + */ + public com.google.protobuf.ByteString + getResourceUriBytes(int index) { + return resourceUri_.getByteString(index); + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @param index The index to set the value at. + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureResourceUriIsMutable(); + resourceUri_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @param value The resourceUri to add. + * @return This builder for chaining. + */ + public Builder addResourceUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureResourceUriIsMutable(); + resourceUri_.add(value); + onChanged(); + return this; + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @param values The resourceUri to add. + * @return This builder for chaining. + */ + public Builder addAllResourceUri( + java.lang.Iterable values) { + ensureResourceUriIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, resourceUri_); + onChanged(); + return this; + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. Resource URI for the artifact being deployed.
+     * 
+ * + * repeated string resource_uri = 1; + * @param value The bytes of the resourceUri to add. + * @return This builder for chaining. + */ + public Builder addResourceUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureResourceUriIsMutable(); + resourceUri_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DeploymentNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DeploymentNote) + private static final io.grafeas.v1.DeploymentNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DeploymentNote(); + } + + public static io.grafeas.v1.DeploymentNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeploymentNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DeploymentNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java new file mode 100644 index 000000000000..3e512a6a1a33 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java @@ -0,0 +1,50 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/deployment.proto + +package io.grafeas.v1; + +public interface DeploymentNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DeploymentNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @return A list containing the resourceUri. + */ + java.util.List + getResourceUriList(); + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @return The count of resourceUri. + */ + int getResourceUriCount(); + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @param index The index of the element to return. + * @return The resourceUri at the given index. + */ + java.lang.String getResourceUri(int index); + /** + *
+   * Required. Resource URI for the artifact being deployed.
+   * 
+ * + * repeated string resource_uri = 1; + * @param index The index of the value to return. + * @return The bytes of the resourceUri at the given index. + */ + com.google.protobuf.ByteString + getResourceUriBytes(int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java new file mode 100644 index 000000000000..e0a761932ed7 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java @@ -0,0 +1,1900 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/deployment.proto + +package io.grafeas.v1; + +/** + *
+ * The period during which some deployable was active in a runtime.
+ * 
+ * + * Protobuf type {@code grafeas.v1.DeploymentOccurrence} + */ +public final class DeploymentOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DeploymentOccurrence) + DeploymentOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeploymentOccurrence.newBuilder() to construct. + private DeploymentOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeploymentOccurrence() { + userEmail_ = ""; + config_ = ""; + address_ = ""; + resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + platform_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeploymentOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeploymentOccurrence.class, io.grafeas.v1.DeploymentOccurrence.Builder.class); + } + + /** + *
+   * Types of platforms.
+   * 
+ * + * Protobuf enum {@code grafeas.v1.DeploymentOccurrence.Platform} + */ + public enum Platform + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown.
+     * 
+ * + * PLATFORM_UNSPECIFIED = 0; + */ + PLATFORM_UNSPECIFIED(0), + /** + *
+     * Google Container Engine.
+     * 
+ * + * GKE = 1; + */ + GKE(1), + /** + *
+     * Google App Engine: Flexible Environment.
+     * 
+ * + * FLEX = 2; + */ + FLEX(2), + /** + *
+     * Custom user-defined platform.
+     * 
+ * + * CUSTOM = 3; + */ + CUSTOM(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unknown.
+     * 
+ * + * PLATFORM_UNSPECIFIED = 0; + */ + public static final int PLATFORM_UNSPECIFIED_VALUE = 0; + /** + *
+     * Google Container Engine.
+     * 
+ * + * GKE = 1; + */ + public static final int GKE_VALUE = 1; + /** + *
+     * Google App Engine: Flexible Environment.
+     * 
+ * + * FLEX = 2; + */ + public static final int FLEX_VALUE = 2; + /** + *
+     * Custom user-defined platform.
+     * 
+ * + * CUSTOM = 3; + */ + public static final int CUSTOM_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Platform valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Platform forNumber(int value) { + switch (value) { + case 0: return PLATFORM_UNSPECIFIED; + case 1: return GKE; + case 2: return FLEX; + case 3: return CUSTOM; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Platform> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Platform findValueByNumber(int number) { + return Platform.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.DeploymentOccurrence.getDescriptor().getEnumTypes().get(0); + } + + private static final Platform[] VALUES = values(); + + public static Platform valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Platform(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.DeploymentOccurrence.Platform) + } + + public static final int USER_EMAIL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object userEmail_ = ""; + /** + *
+   * Identity of the user that triggered this deployment.
+   * 
+ * + * string user_email = 1; + * @return The userEmail. + */ + @java.lang.Override + public java.lang.String getUserEmail() { + java.lang.Object ref = userEmail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userEmail_ = s; + return s; + } + } + /** + *
+   * Identity of the user that triggered this deployment.
+   * 
+ * + * string user_email = 1; + * @return The bytes for userEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserEmailBytes() { + java.lang.Object ref = userEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPLOY_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp deployTime_; + /** + *
+   * Required. Beginning of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + * @return Whether the deployTime field is set. + */ + @java.lang.Override + public boolean hasDeployTime() { + return deployTime_ != null; + } + /** + *
+   * Required. Beginning of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + * @return The deployTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeployTime() { + return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; + } + /** + *
+   * Required. Beginning of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder() { + return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; + } + + public static final int UNDEPLOY_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp undeployTime_; + /** + *
+   * End of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + * @return Whether the undeployTime field is set. + */ + @java.lang.Override + public boolean hasUndeployTime() { + return undeployTime_ != null; + } + /** + *
+   * End of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + * @return The undeployTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUndeployTime() { + return undeployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; + } + /** + *
+   * End of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUndeployTimeOrBuilder() { + return undeployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; + } + + public static final int CONFIG_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object config_ = ""; + /** + *
+   * Configuration used to create this deployment.
+   * 
+ * + * string config = 4; + * @return The config. + */ + @java.lang.Override + public java.lang.String getConfig() { + java.lang.Object ref = config_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + config_ = s; + return s; + } + } + /** + *
+   * Configuration used to create this deployment.
+   * 
+ * + * string config = 4; + * @return The bytes for config. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getConfigBytes() { + java.lang.Object ref = config_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + config_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDRESS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object address_ = ""; + /** + *
+   * Address of the runtime element hosting this deployment.
+   * 
+ * + * string address = 5; + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + *
+   * Address of the runtime element hosting this deployment.
+   * 
+ * + * string address = 5; + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList resourceUri_; + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @return A list containing the resourceUri. + */ + public com.google.protobuf.ProtocolStringList + getResourceUriList() { + return resourceUri_; + } + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @return The count of resourceUri. + */ + public int getResourceUriCount() { + return resourceUri_.size(); + } + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @param index The index of the element to return. + * @return The resourceUri at the given index. + */ + public java.lang.String getResourceUri(int index) { + return resourceUri_.get(index); + } + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @param index The index of the value to return. + * @return The bytes of the resourceUri at the given index. + */ + public com.google.protobuf.ByteString + getResourceUriBytes(int index) { + return resourceUri_.getByteString(index); + } + + public static final int PLATFORM_FIELD_NUMBER = 7; + private int platform_ = 0; + /** + *
+   * Platform hosting this deployment.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @return The enum numeric value on the wire for platform. + */ + @java.lang.Override public int getPlatformValue() { + return platform_; + } + /** + *
+   * Platform hosting this deployment.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @return The platform. + */ + @java.lang.Override public io.grafeas.v1.DeploymentOccurrence.Platform getPlatform() { + io.grafeas.v1.DeploymentOccurrence.Platform result = io.grafeas.v1.DeploymentOccurrence.Platform.forNumber(platform_); + return result == null ? io.grafeas.v1.DeploymentOccurrence.Platform.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userEmail_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userEmail_); + } + if (deployTime_ != null) { + output.writeMessage(2, getDeployTime()); + } + if (undeployTime_ != null) { + output.writeMessage(3, getUndeployTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, config_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, address_); + } + for (int i = 0; i < resourceUri_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, resourceUri_.getRaw(i)); + } + if (platform_ != io.grafeas.v1.DeploymentOccurrence.Platform.PLATFORM_UNSPECIFIED.getNumber()) { + output.writeEnum(7, platform_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userEmail_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userEmail_); + } + if (deployTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDeployTime()); + } + if (undeployTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUndeployTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, config_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, address_); + } + { + int dataSize = 0; + for (int i = 0; i < resourceUri_.size(); i++) { + dataSize += computeStringSizeNoTag(resourceUri_.getRaw(i)); + } + size += dataSize; + size += 1 * getResourceUriList().size(); + } + if (platform_ != io.grafeas.v1.DeploymentOccurrence.Platform.PLATFORM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, platform_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DeploymentOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.DeploymentOccurrence other = (io.grafeas.v1.DeploymentOccurrence) obj; + + if (!getUserEmail() + .equals(other.getUserEmail())) return false; + if (hasDeployTime() != other.hasDeployTime()) return false; + if (hasDeployTime()) { + if (!getDeployTime() + .equals(other.getDeployTime())) return false; + } + if (hasUndeployTime() != other.hasUndeployTime()) return false; + if (hasUndeployTime()) { + if (!getUndeployTime() + .equals(other.getUndeployTime())) return false; + } + if (!getConfig() + .equals(other.getConfig())) return false; + if (!getAddress() + .equals(other.getAddress())) return false; + if (!getResourceUriList() + .equals(other.getResourceUriList())) return false; + if (platform_ != other.platform_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getUserEmail().hashCode(); + if (hasDeployTime()) { + hash = (37 * hash) + DEPLOY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeployTime().hashCode(); + } + if (hasUndeployTime()) { + hash = (37 * hash) + UNDEPLOY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUndeployTime().hashCode(); + } + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + if (getResourceUriCount() > 0) { + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUriList().hashCode(); + } + hash = (37 * hash) + PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + platform_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeploymentOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeploymentOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DeploymentOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DeploymentOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The period during which some deployable was active in a runtime.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DeploymentOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DeploymentOccurrence) + io.grafeas.v1.DeploymentOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DeploymentOccurrence.class, io.grafeas.v1.DeploymentOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.DeploymentOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userEmail_ = ""; + deployTime_ = null; + if (deployTimeBuilder_ != null) { + deployTimeBuilder_.dispose(); + deployTimeBuilder_ = null; + } + undeployTime_ = null; + if (undeployTimeBuilder_ != null) { + undeployTimeBuilder_.dispose(); + undeployTimeBuilder_ = null; + } + config_ = ""; + address_ = ""; + resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + platform_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrence build() { + io.grafeas.v1.DeploymentOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrence buildPartial() { + io.grafeas.v1.DeploymentOccurrence result = new io.grafeas.v1.DeploymentOccurrence(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.DeploymentOccurrence result) { + if (((bitField0_ & 0x00000020) != 0)) { + resourceUri_ = resourceUri_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.resourceUri_ = resourceUri_; + } + + private void buildPartial0(io.grafeas.v1.DeploymentOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userEmail_ = userEmail_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deployTime_ = deployTimeBuilder_ == null + ? deployTime_ + : deployTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.undeployTime_ = undeployTimeBuilder_ == null + ? undeployTime_ + : undeployTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.config_ = config_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.address_ = address_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.platform_ = platform_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DeploymentOccurrence) { + return mergeFrom((io.grafeas.v1.DeploymentOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DeploymentOccurrence other) { + if (other == io.grafeas.v1.DeploymentOccurrence.getDefaultInstance()) return this; + if (!other.getUserEmail().isEmpty()) { + userEmail_ = other.userEmail_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDeployTime()) { + mergeDeployTime(other.getDeployTime()); + } + if (other.hasUndeployTime()) { + mergeUndeployTime(other.getUndeployTime()); + } + if (!other.getConfig().isEmpty()) { + config_ = other.config_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.resourceUri_.isEmpty()) { + if (resourceUri_.isEmpty()) { + resourceUri_ = other.resourceUri_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureResourceUriIsMutable(); + resourceUri_.addAll(other.resourceUri_); + } + onChanged(); + } + if (other.platform_ != 0) { + setPlatformValue(other.getPlatformValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + userEmail_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getDeployTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getUndeployTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + config_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + address_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourceUriIsMutable(); + resourceUri_.add(s); + break; + } // case 50 + case 56: { + platform_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object userEmail_ = ""; + /** + *
+     * Identity of the user that triggered this deployment.
+     * 
+ * + * string user_email = 1; + * @return The userEmail. + */ + public java.lang.String getUserEmail() { + java.lang.Object ref = userEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Identity of the user that triggered this deployment.
+     * 
+ * + * string user_email = 1; + * @return The bytes for userEmail. + */ + public com.google.protobuf.ByteString + getUserEmailBytes() { + java.lang.Object ref = userEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Identity of the user that triggered this deployment.
+     * 
+ * + * string user_email = 1; + * @param value The userEmail to set. + * @return This builder for chaining. + */ + public Builder setUserEmail( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userEmail_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Identity of the user that triggered this deployment.
+     * 
+ * + * string user_email = 1; + * @return This builder for chaining. + */ + public Builder clearUserEmail() { + userEmail_ = getDefaultInstance().getUserEmail(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Identity of the user that triggered this deployment.
+     * 
+ * + * string user_email = 1; + * @param value The bytes for userEmail to set. + * @return This builder for chaining. + */ + public Builder setUserEmailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userEmail_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp deployTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> deployTimeBuilder_; + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + * @return Whether the deployTime field is set. + */ + public boolean hasDeployTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + * @return The deployTime. + */ + public com.google.protobuf.Timestamp getDeployTime() { + if (deployTimeBuilder_ == null) { + return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; + } else { + return deployTimeBuilder_.getMessage(); + } + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + public Builder setDeployTime(com.google.protobuf.Timestamp value) { + if (deployTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deployTime_ = value; + } else { + deployTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + public Builder setDeployTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (deployTimeBuilder_ == null) { + deployTime_ = builderForValue.build(); + } else { + deployTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + public Builder mergeDeployTime(com.google.protobuf.Timestamp value) { + if (deployTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + deployTime_ != null && + deployTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDeployTimeBuilder().mergeFrom(value); + } else { + deployTime_ = value; + } + } else { + deployTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + public Builder clearDeployTime() { + bitField0_ = (bitField0_ & ~0x00000002); + deployTime_ = null; + if (deployTimeBuilder_ != null) { + deployTimeBuilder_.dispose(); + deployTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getDeployTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDeployTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder() { + if (deployTimeBuilder_ != null) { + return deployTimeBuilder_.getMessageOrBuilder(); + } else { + return deployTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; + } + } + /** + *
+     * Required. Beginning of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getDeployTimeFieldBuilder() { + if (deployTimeBuilder_ == null) { + deployTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getDeployTime(), + getParentForChildren(), + isClean()); + deployTime_ = null; + } + return deployTimeBuilder_; + } + + private com.google.protobuf.Timestamp undeployTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> undeployTimeBuilder_; + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + * @return Whether the undeployTime field is set. + */ + public boolean hasUndeployTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + * @return The undeployTime. + */ + public com.google.protobuf.Timestamp getUndeployTime() { + if (undeployTimeBuilder_ == null) { + return undeployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; + } else { + return undeployTimeBuilder_.getMessage(); + } + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + public Builder setUndeployTime(com.google.protobuf.Timestamp value) { + if (undeployTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + undeployTime_ = value; + } else { + undeployTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + public Builder setUndeployTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (undeployTimeBuilder_ == null) { + undeployTime_ = builderForValue.build(); + } else { + undeployTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + public Builder mergeUndeployTime(com.google.protobuf.Timestamp value) { + if (undeployTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + undeployTime_ != null && + undeployTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUndeployTimeBuilder().mergeFrom(value); + } else { + undeployTime_ = value; + } + } else { + undeployTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + public Builder clearUndeployTime() { + bitField0_ = (bitField0_ & ~0x00000004); + undeployTime_ = null; + if (undeployTimeBuilder_ != null) { + undeployTimeBuilder_.dispose(); + undeployTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getUndeployTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUndeployTimeFieldBuilder().getBuilder(); + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getUndeployTimeOrBuilder() { + if (undeployTimeBuilder_ != null) { + return undeployTimeBuilder_.getMessageOrBuilder(); + } else { + return undeployTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; + } + } + /** + *
+     * End of the lifetime of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUndeployTimeFieldBuilder() { + if (undeployTimeBuilder_ == null) { + undeployTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUndeployTime(), + getParentForChildren(), + isClean()); + undeployTime_ = null; + } + return undeployTimeBuilder_; + } + + private java.lang.Object config_ = ""; + /** + *
+     * Configuration used to create this deployment.
+     * 
+ * + * string config = 4; + * @return The config. + */ + public java.lang.String getConfig() { + java.lang.Object ref = config_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + config_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Configuration used to create this deployment.
+     * 
+ * + * string config = 4; + * @return The bytes for config. + */ + public com.google.protobuf.ByteString + getConfigBytes() { + java.lang.Object ref = config_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + config_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Configuration used to create this deployment.
+     * 
+ * + * string config = 4; + * @param value The config to set. + * @return This builder for chaining. + */ + public Builder setConfig( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + config_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Configuration used to create this deployment.
+     * 
+ * + * string config = 4; + * @return This builder for chaining. + */ + public Builder clearConfig() { + config_ = getDefaultInstance().getConfig(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Configuration used to create this deployment.
+     * 
+ * + * string config = 4; + * @param value The bytes for config to set. + * @return This builder for chaining. + */ + public Builder setConfigBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + config_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object address_ = ""; + /** + *
+     * Address of the runtime element hosting this deployment.
+     * 
+ * + * string address = 5; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Address of the runtime element hosting this deployment.
+     * 
+ * + * string address = 5; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Address of the runtime element hosting this deployment.
+     * 
+ * + * string address = 5; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + address_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Address of the runtime element hosting this deployment.
+     * 
+ * + * string address = 5; + * @return This builder for chaining. + */ + public Builder clearAddress() { + address_ = getDefaultInstance().getAddress(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Address of the runtime element hosting this deployment.
+     * 
+ * + * string address = 5; + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + address_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureResourceUriIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + resourceUri_ = new com.google.protobuf.LazyStringArrayList(resourceUri_); + bitField0_ |= 0x00000020; + } + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @return A list containing the resourceUri. + */ + public com.google.protobuf.ProtocolStringList + getResourceUriList() { + return resourceUri_.getUnmodifiableView(); + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @return The count of resourceUri. + */ + public int getResourceUriCount() { + return resourceUri_.size(); + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @param index The index of the element to return. + * @return The resourceUri at the given index. + */ + public java.lang.String getResourceUri(int index) { + return resourceUri_.get(index); + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @param index The index of the value to return. + * @return The bytes of the resourceUri at the given index. + */ + public com.google.protobuf.ByteString + getResourceUriBytes(int index) { + return resourceUri_.getByteString(index); + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @param index The index to set the value at. + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureResourceUriIsMutable(); + resourceUri_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @param value The resourceUri to add. + * @return This builder for chaining. + */ + public Builder addResourceUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureResourceUriIsMutable(); + resourceUri_.add(value); + onChanged(); + return this; + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @param values The resourceUri to add. + * @return This builder for chaining. + */ + public Builder addAllResourceUri( + java.lang.Iterable values) { + ensureResourceUriIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, resourceUri_); + onChanged(); + return this; + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Output only. Resource URI for the artifact being deployed taken from
+     * the deployable field with the same name.
+     * 
+ * + * repeated string resource_uri = 6; + * @param value The bytes of the resourceUri to add. + * @return This builder for chaining. + */ + public Builder addResourceUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureResourceUriIsMutable(); + resourceUri_.add(value); + onChanged(); + return this; + } + + private int platform_ = 0; + /** + *
+     * Platform hosting this deployment.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @return The enum numeric value on the wire for platform. + */ + @java.lang.Override public int getPlatformValue() { + return platform_; + } + /** + *
+     * Platform hosting this deployment.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @param value The enum numeric value on the wire for platform to set. + * @return This builder for chaining. + */ + public Builder setPlatformValue(int value) { + platform_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Platform hosting this deployment.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @return The platform. + */ + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrence.Platform getPlatform() { + io.grafeas.v1.DeploymentOccurrence.Platform result = io.grafeas.v1.DeploymentOccurrence.Platform.forNumber(platform_); + return result == null ? io.grafeas.v1.DeploymentOccurrence.Platform.UNRECOGNIZED : result; + } + /** + *
+     * Platform hosting this deployment.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @param value The platform to set. + * @return This builder for chaining. + */ + public Builder setPlatform(io.grafeas.v1.DeploymentOccurrence.Platform value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + platform_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Platform hosting this deployment.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @return This builder for chaining. + */ + public Builder clearPlatform() { + bitField0_ = (bitField0_ & ~0x00000040); + platform_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DeploymentOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DeploymentOccurrence) + private static final io.grafeas.v1.DeploymentOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DeploymentOccurrence(); + } + + public static io.grafeas.v1.DeploymentOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeploymentOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java new file mode 100644 index 000000000000..4a9234225f40 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java @@ -0,0 +1,187 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/deployment.proto + +package io.grafeas.v1; + +public interface DeploymentOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DeploymentOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Identity of the user that triggered this deployment.
+   * 
+ * + * string user_email = 1; + * @return The userEmail. + */ + java.lang.String getUserEmail(); + /** + *
+   * Identity of the user that triggered this deployment.
+   * 
+ * + * string user_email = 1; + * @return The bytes for userEmail. + */ + com.google.protobuf.ByteString + getUserEmailBytes(); + + /** + *
+   * Required. Beginning of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + * @return Whether the deployTime field is set. + */ + boolean hasDeployTime(); + /** + *
+   * Required. Beginning of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + * @return The deployTime. + */ + com.google.protobuf.Timestamp getDeployTime(); + /** + *
+   * Required. Beginning of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp deploy_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder(); + + /** + *
+   * End of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + * @return Whether the undeployTime field is set. + */ + boolean hasUndeployTime(); + /** + *
+   * End of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + * @return The undeployTime. + */ + com.google.protobuf.Timestamp getUndeployTime(); + /** + *
+   * End of the lifetime of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp undeploy_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getUndeployTimeOrBuilder(); + + /** + *
+   * Configuration used to create this deployment.
+   * 
+ * + * string config = 4; + * @return The config. + */ + java.lang.String getConfig(); + /** + *
+   * Configuration used to create this deployment.
+   * 
+ * + * string config = 4; + * @return The bytes for config. + */ + com.google.protobuf.ByteString + getConfigBytes(); + + /** + *
+   * Address of the runtime element hosting this deployment.
+   * 
+ * + * string address = 5; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+   * Address of the runtime element hosting this deployment.
+   * 
+ * + * string address = 5; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @return A list containing the resourceUri. + */ + java.util.List + getResourceUriList(); + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @return The count of resourceUri. + */ + int getResourceUriCount(); + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @param index The index of the element to return. + * @return The resourceUri at the given index. + */ + java.lang.String getResourceUri(int index); + /** + *
+   * Output only. Resource URI for the artifact being deployed taken from
+   * the deployable field with the same name.
+   * 
+ * + * repeated string resource_uri = 6; + * @param index The index of the value to return. + * @return The bytes of the resourceUri at the given index. + */ + com.google.protobuf.ByteString + getResourceUriBytes(int index); + + /** + *
+   * Platform hosting this deployment.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @return The enum numeric value on the wire for platform. + */ + int getPlatformValue(); + /** + *
+   * Platform hosting this deployment.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @return The platform. + */ + io.grafeas.v1.DeploymentOccurrence.Platform getPlatform(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java new file mode 100644 index 000000000000..a3d76aee3b80 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java @@ -0,0 +1,663 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + *
+ * Digest information.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Digest} + */ +public final class Digest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Digest) + DigestOrBuilder { +private static final long serialVersionUID = 0L; + // Use Digest.newBuilder() to construct. + private Digest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Digest() { + algo_ = ""; + digestBytes_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Digest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Digest.class, io.grafeas.v1.Digest.Builder.class); + } + + public static final int ALGO_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object algo_ = ""; + /** + *
+   * `SHA1`, `SHA512` etc.
+   * 
+ * + * string algo = 1; + * @return The algo. + */ + @java.lang.Override + public java.lang.String getAlgo() { + java.lang.Object ref = algo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + algo_ = s; + return s; + } + } + /** + *
+   * `SHA1`, `SHA512` etc.
+   * 
+ * + * string algo = 1; + * @return The bytes for algo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAlgoBytes() { + java.lang.Object ref = algo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + algo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIGEST_BYTES_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString digestBytes_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+   * Value of the digest.
+   * 
+ * + * bytes digest_bytes = 2; + * @return The digestBytes. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDigestBytes() { + return digestBytes_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algo_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, algo_); + } + if (!digestBytes_.isEmpty()) { + output.writeBytes(2, digestBytes_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algo_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, algo_); + } + if (!digestBytes_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, digestBytes_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Digest)) { + return super.equals(obj); + } + io.grafeas.v1.Digest other = (io.grafeas.v1.Digest) obj; + + if (!getAlgo() + .equals(other.getAlgo())) return false; + if (!getDigestBytes() + .equals(other.getDigestBytes())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ALGO_FIELD_NUMBER; + hash = (53 * hash) + getAlgo().hashCode(); + hash = (37 * hash) + DIGEST_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getDigestBytes().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Digest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Digest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Digest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Digest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Digest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Digest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Digest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Digest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Digest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Digest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Digest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Digest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Digest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Digest information.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Digest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Digest) + io.grafeas.v1.DigestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Digest.class, io.grafeas.v1.Digest.Builder.class); + } + + // Construct using io.grafeas.v1.Digest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + algo_ = ""; + digestBytes_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Digest getDefaultInstanceForType() { + return io.grafeas.v1.Digest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Digest build() { + io.grafeas.v1.Digest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Digest buildPartial() { + io.grafeas.v1.Digest result = new io.grafeas.v1.Digest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Digest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.algo_ = algo_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.digestBytes_ = digestBytes_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Digest) { + return mergeFrom((io.grafeas.v1.Digest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Digest other) { + if (other == io.grafeas.v1.Digest.getDefaultInstance()) return this; + if (!other.getAlgo().isEmpty()) { + algo_ = other.algo_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getDigestBytes() != com.google.protobuf.ByteString.EMPTY) { + setDigestBytes(other.getDigestBytes()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + algo_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + digestBytes_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object algo_ = ""; + /** + *
+     * `SHA1`, `SHA512` etc.
+     * 
+ * + * string algo = 1; + * @return The algo. + */ + public java.lang.String getAlgo() { + java.lang.Object ref = algo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + algo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `SHA1`, `SHA512` etc.
+     * 
+ * + * string algo = 1; + * @return The bytes for algo. + */ + public com.google.protobuf.ByteString + getAlgoBytes() { + java.lang.Object ref = algo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + algo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `SHA1`, `SHA512` etc.
+     * 
+ * + * string algo = 1; + * @param value The algo to set. + * @return This builder for chaining. + */ + public Builder setAlgo( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + algo_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * `SHA1`, `SHA512` etc.
+     * 
+ * + * string algo = 1; + * @return This builder for chaining. + */ + public Builder clearAlgo() { + algo_ = getDefaultInstance().getAlgo(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * `SHA1`, `SHA512` etc.
+     * 
+ * + * string algo = 1; + * @param value The bytes for algo to set. + * @return This builder for chaining. + */ + public Builder setAlgoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + algo_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString digestBytes_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Value of the digest.
+     * 
+ * + * bytes digest_bytes = 2; + * @return The digestBytes. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDigestBytes() { + return digestBytes_; + } + /** + *
+     * Value of the digest.
+     * 
+ * + * bytes digest_bytes = 2; + * @param value The digestBytes to set. + * @return This builder for chaining. + */ + public Builder setDigestBytes(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + digestBytes_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Value of the digest.
+     * 
+ * + * bytes digest_bytes = 2; + * @return This builder for chaining. + */ + public Builder clearDigestBytes() { + bitField0_ = (bitField0_ & ~0x00000002); + digestBytes_ = getDefaultInstance().getDigestBytes(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Digest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Digest) + private static final io.grafeas.v1.Digest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Digest(); + } + + public static io.grafeas.v1.Digest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Digest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Digest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java new file mode 100644 index 000000000000..b1151e73ce84 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public interface DigestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Digest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * `SHA1`, `SHA512` etc.
+   * 
+ * + * string algo = 1; + * @return The algo. + */ + java.lang.String getAlgo(); + /** + *
+   * `SHA1`, `SHA512` etc.
+   * 
+ * + * string algo = 1; + * @return The bytes for algo. + */ + com.google.protobuf.ByteString + getAlgoBytes(); + + /** + *
+   * Value of the digest.
+   * 
+ * + * bytes digest_bytes = 2; + * @return The digestBytes. + */ + com.google.protobuf.ByteString getDigestBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java new file mode 100644 index 000000000000..405d615d4b2c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java @@ -0,0 +1,107 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/discovery.proto + +package io.grafeas.v1; + +public final class Discovery { + private Discovery() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DiscoveryNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032grafeas/v1/discovery.proto\022\ngrafeas.v1" + + "\032\037google/api/field_behavior.proto\032\037googl" + + "e/protobuf/timestamp.proto\032\027google/rpc/s" + + "tatus.proto\032\027grafeas/v1/common.proto\"<\n\r" + + "DiscoveryNote\022+\n\ranalysis_kind\030\001 \001(\0162\024.g" + + "rafeas.v1.NoteKind\"\374\005\n\023DiscoveryOccurren" + + "ce\022O\n\023continuous_analysis\030\001 \001(\01622.grafea" + + "s.v1.DiscoveryOccurrence.ContinuousAnaly" + + "sis\022G\n\017analysis_status\030\002 \001(\0162..grafeas.v" + + "1.DiscoveryOccurrence.AnalysisStatus\022M\n\022" + + "analysis_completed\030\007 \001(\01321.grafeas.v1.Di" + + "scoveryOccurrence.AnalysisCompleted\022*\n\016a" + + "nalysis_error\030\010 \003(\0132\022.google.rpc.Status\022" + + "1\n\025analysis_status_error\030\003 \001(\0132\022.google." + + "rpc.Status\022\013\n\003cpe\030\004 \001(\t\0222\n\016last_scan_tim" + + "e\030\005 \001(\0132\032.google.protobuf.Timestamp\0225\n\014a" + + "rchive_time\030\006 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\032*\n\021AnalysisCompleted\022\025\n\ranaly" + + "sis_type\030\001 \003(\t\"S\n\022ContinuousAnalysis\022#\n\037" + + "CONTINUOUS_ANALYSIS_UNSPECIFIED\020\000\022\n\n\006ACT" + + "IVE\020\001\022\014\n\010INACTIVE\020\002\"\243\001\n\016AnalysisStatus\022\037" + + "\n\033ANALYSIS_STATUS_UNSPECIFIED\020\000\022\013\n\007PENDI" + + "NG\020\001\022\014\n\010SCANNING\020\002\022\024\n\020FINISHED_SUCCESS\020\003" + + "\022\014\n\010COMPLETE\020\003\022\023\n\017FINISHED_FAILED\020\004\022\030\n\024F" + + "INISHED_UNSUPPORTED\020\005\032\002\020\001BQ\n\rio.grafeas." + + "v1P\001Z8google.golang.org/genproto/googlea" + + "pis/grafeas/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + io.grafeas.v1.Common.getDescriptor(), + }); + internal_static_grafeas_v1_DiscoveryNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DiscoveryNote_descriptor, + new java.lang.String[] { "AnalysisKind", }); + internal_static_grafeas_v1_DiscoveryOccurrence_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DiscoveryOccurrence_descriptor, + new java.lang.String[] { "ContinuousAnalysis", "AnalysisStatus", "AnalysisCompleted", "AnalysisError", "AnalysisStatusError", "Cpe", "LastScanTime", "ArchiveTime", }); + internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor = + internal_static_grafeas_v1_DiscoveryOccurrence_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor, + new java.lang.String[] { "AnalysisType", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + io.grafeas.v1.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java new file mode 100644 index 000000000000..8a134c302da5 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java @@ -0,0 +1,549 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/discovery.proto + +package io.grafeas.v1; + +/** + *
+ * A note that indicates a type of analysis a provider would perform. This note
+ * exists in a provider's project. A `Discovery` occurrence is created in a
+ * consumer's project at the start of analysis.
+ * 
+ * + * Protobuf type {@code grafeas.v1.DiscoveryNote} + */ +public final class DiscoveryNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DiscoveryNote) + DiscoveryNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use DiscoveryNote.newBuilder() to construct. + private DiscoveryNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DiscoveryNote() { + analysisKind_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DiscoveryNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DiscoveryNote.class, io.grafeas.v1.DiscoveryNote.Builder.class); + } + + public static final int ANALYSIS_KIND_FIELD_NUMBER = 1; + private int analysisKind_ = 0; + /** + *
+   * Required. Immutable. The kind of analysis that is handled by this
+   * discovery.
+   * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @return The enum numeric value on the wire for analysisKind. + */ + @java.lang.Override public int getAnalysisKindValue() { + return analysisKind_; + } + /** + *
+   * Required. Immutable. The kind of analysis that is handled by this
+   * discovery.
+   * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @return The analysisKind. + */ + @java.lang.Override public io.grafeas.v1.NoteKind getAnalysisKind() { + io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(analysisKind_); + return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (analysisKind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(1, analysisKind_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (analysisKind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, analysisKind_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DiscoveryNote)) { + return super.equals(obj); + } + io.grafeas.v1.DiscoveryNote other = (io.grafeas.v1.DiscoveryNote) obj; + + if (analysisKind_ != other.analysisKind_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ANALYSIS_KIND_FIELD_NUMBER; + hash = (53 * hash) + analysisKind_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DiscoveryNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DiscoveryNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A note that indicates a type of analysis a provider would perform. This note
+   * exists in a provider's project. A `Discovery` occurrence is created in a
+   * consumer's project at the start of analysis.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DiscoveryNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DiscoveryNote) + io.grafeas.v1.DiscoveryNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DiscoveryNote.class, io.grafeas.v1.DiscoveryNote.Builder.class); + } + + // Construct using io.grafeas.v1.DiscoveryNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + analysisKind_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryNote getDefaultInstanceForType() { + return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryNote build() { + io.grafeas.v1.DiscoveryNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryNote buildPartial() { + io.grafeas.v1.DiscoveryNote result = new io.grafeas.v1.DiscoveryNote(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.DiscoveryNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.analysisKind_ = analysisKind_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DiscoveryNote) { + return mergeFrom((io.grafeas.v1.DiscoveryNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DiscoveryNote other) { + if (other == io.grafeas.v1.DiscoveryNote.getDefaultInstance()) return this; + if (other.analysisKind_ != 0) { + setAnalysisKindValue(other.getAnalysisKindValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + analysisKind_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int analysisKind_ = 0; + /** + *
+     * Required. Immutable. The kind of analysis that is handled by this
+     * discovery.
+     * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @return The enum numeric value on the wire for analysisKind. + */ + @java.lang.Override public int getAnalysisKindValue() { + return analysisKind_; + } + /** + *
+     * Required. Immutable. The kind of analysis that is handled by this
+     * discovery.
+     * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @param value The enum numeric value on the wire for analysisKind to set. + * @return This builder for chaining. + */ + public Builder setAnalysisKindValue(int value) { + analysisKind_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The kind of analysis that is handled by this
+     * discovery.
+     * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @return The analysisKind. + */ + @java.lang.Override + public io.grafeas.v1.NoteKind getAnalysisKind() { + io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(analysisKind_); + return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; + } + /** + *
+     * Required. Immutable. The kind of analysis that is handled by this
+     * discovery.
+     * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @param value The analysisKind to set. + * @return This builder for chaining. + */ + public Builder setAnalysisKind(io.grafeas.v1.NoteKind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + analysisKind_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The kind of analysis that is handled by this
+     * discovery.
+     * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @return This builder for chaining. + */ + public Builder clearAnalysisKind() { + bitField0_ = (bitField0_ & ~0x00000001); + analysisKind_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DiscoveryNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DiscoveryNote) + private static final io.grafeas.v1.DiscoveryNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DiscoveryNote(); + } + + public static io.grafeas.v1.DiscoveryNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiscoveryNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java new file mode 100644 index 000000000000..ad1484f0679d --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java @@ -0,0 +1,30 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/discovery.proto + +package io.grafeas.v1; + +public interface DiscoveryNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DiscoveryNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Immutable. The kind of analysis that is handled by this
+   * discovery.
+   * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @return The enum numeric value on the wire for analysisKind. + */ + int getAnalysisKindValue(); + /** + *
+   * Required. Immutable. The kind of analysis that is handled by this
+   * discovery.
+   * 
+ * + * .grafeas.v1.NoteKind analysis_kind = 1; + * @return The analysisKind. + */ + io.grafeas.v1.NoteKind getAnalysisKind(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java new file mode 100644 index 000000000000..1c6321c5cc12 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java @@ -0,0 +1,3178 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/discovery.proto + +package io.grafeas.v1; + +/** + *
+ * Provides information about the analysis status of a discovered resource.
+ * 
+ * + * Protobuf type {@code grafeas.v1.DiscoveryOccurrence} + */ +public final class DiscoveryOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DiscoveryOccurrence) + DiscoveryOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use DiscoveryOccurrence.newBuilder() to construct. + private DiscoveryOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DiscoveryOccurrence() { + continuousAnalysis_ = 0; + analysisStatus_ = 0; + analysisError_ = java.util.Collections.emptyList(); + cpe_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DiscoveryOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DiscoveryOccurrence.class, io.grafeas.v1.DiscoveryOccurrence.Builder.class); + } + + /** + *
+   * Whether the resource is continuously analyzed.
+   * 
+ * + * Protobuf enum {@code grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis} + */ + public enum ContinuousAnalysis + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown.
+     * 
+ * + * CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; + */ + CONTINUOUS_ANALYSIS_UNSPECIFIED(0), + /** + *
+     * The resource is continuously analyzed.
+     * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + *
+     * The resource is ignored for continuous analysis.
+     * 
+ * + * INACTIVE = 2; + */ + INACTIVE(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unknown.
+     * 
+ * + * CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; + */ + public static final int CONTINUOUS_ANALYSIS_UNSPECIFIED_VALUE = 0; + /** + *
+     * The resource is continuously analyzed.
+     * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + /** + *
+     * The resource is ignored for continuous analysis.
+     * 
+ * + * INACTIVE = 2; + */ + public static final int INACTIVE_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContinuousAnalysis valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ContinuousAnalysis forNumber(int value) { + switch (value) { + case 0: return CONTINUOUS_ANALYSIS_UNSPECIFIED; + case 1: return ACTIVE; + case 2: return INACTIVE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ContinuousAnalysis> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ContinuousAnalysis findValueByNumber(int number) { + return ContinuousAnalysis.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.DiscoveryOccurrence.getDescriptor().getEnumTypes().get(0); + } + + private static final ContinuousAnalysis[] VALUES = values(); + + public static ContinuousAnalysis valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ContinuousAnalysis(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis) + } + + /** + *
+   * Analysis status for a resource. Currently for initial analysis only (not
+   * updated in continuous analysis).
+   * 
+ * + * Protobuf enum {@code grafeas.v1.DiscoveryOccurrence.AnalysisStatus} + */ + public enum AnalysisStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown.
+     * 
+ * + * ANALYSIS_STATUS_UNSPECIFIED = 0; + */ + ANALYSIS_STATUS_UNSPECIFIED(0, 0), + /** + *
+     * Resource is known but no action has been taken yet.
+     * 
+ * + * PENDING = 1; + */ + PENDING(1, 1), + /** + *
+     * Resource is being analyzed.
+     * 
+ * + * SCANNING = 2; + */ + SCANNING(2, 2), + /** + *
+     * Analysis has finished successfully.
+     * 
+ * + * FINISHED_SUCCESS = 3; + */ + FINISHED_SUCCESS(3, 3), + /** + *
+     * Analysis has finished unsuccessfully, the analysis itself is in a bad
+     * state.
+     * 
+ * + * FINISHED_FAILED = 4; + */ + FINISHED_FAILED(5, 4), + /** + *
+     * The resource is known not to be supported.
+     * 
+ * + * FINISHED_UNSUPPORTED = 5; + */ + FINISHED_UNSUPPORTED(6, 5), + UNRECOGNIZED(-1, -1), + ; + + /** + *
+     * Analysis has completed.
+     * 
+ * + * COMPLETE = 3; + */ + public static final AnalysisStatus COMPLETE = FINISHED_SUCCESS; + /** + *
+     * Unknown.
+     * 
+ * + * ANALYSIS_STATUS_UNSPECIFIED = 0; + */ + public static final int ANALYSIS_STATUS_UNSPECIFIED_VALUE = 0; + /** + *
+     * Resource is known but no action has been taken yet.
+     * 
+ * + * PENDING = 1; + */ + public static final int PENDING_VALUE = 1; + /** + *
+     * Resource is being analyzed.
+     * 
+ * + * SCANNING = 2; + */ + public static final int SCANNING_VALUE = 2; + /** + *
+     * Analysis has finished successfully.
+     * 
+ * + * FINISHED_SUCCESS = 3; + */ + public static final int FINISHED_SUCCESS_VALUE = 3; + /** + *
+     * Analysis has completed.
+     * 
+ * + * COMPLETE = 3; + */ + public static final int COMPLETE_VALUE = 3; + /** + *
+     * Analysis has finished unsuccessfully, the analysis itself is in a bad
+     * state.
+     * 
+ * + * FINISHED_FAILED = 4; + */ + public static final int FINISHED_FAILED_VALUE = 4; + /** + *
+     * The resource is known not to be supported.
+     * 
+ * + * FINISHED_UNSUPPORTED = 5; + */ + public static final int FINISHED_UNSUPPORTED_VALUE = 5; + + + public final int getNumber() { + if (index == -1) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AnalysisStatus valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AnalysisStatus forNumber(int value) { + switch (value) { + case 0: return ANALYSIS_STATUS_UNSPECIFIED; + case 1: return PENDING; + case 2: return SCANNING; + case 3: return FINISHED_SUCCESS; + case 4: return FINISHED_FAILED; + case 5: return FINISHED_UNSUPPORTED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AnalysisStatus> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AnalysisStatus findValueByNumber(int number) { + return AnalysisStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (index == -1) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.DiscoveryOccurrence.getDescriptor().getEnumTypes().get(1); + } + + private static final AnalysisStatus[] VALUES = getStaticValuesArray(); + private static AnalysisStatus[] getStaticValuesArray() { + return new AnalysisStatus[] { + ANALYSIS_STATUS_UNSPECIFIED, PENDING, SCANNING, FINISHED_SUCCESS, COMPLETE, FINISHED_FAILED, FINISHED_UNSUPPORTED, + }; + } + public static AnalysisStatus valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private AnalysisStatus(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.DiscoveryOccurrence.AnalysisStatus) + } + + public interface AnalysisCompletedOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string analysis_type = 1; + * @return A list containing the analysisType. + */ + java.util.List + getAnalysisTypeList(); + /** + * repeated string analysis_type = 1; + * @return The count of analysisType. + */ + int getAnalysisTypeCount(); + /** + * repeated string analysis_type = 1; + * @param index The index of the element to return. + * @return The analysisType at the given index. + */ + java.lang.String getAnalysisType(int index); + /** + * repeated string analysis_type = 1; + * @param index The index of the value to return. + * @return The bytes of the analysisType at the given index. + */ + com.google.protobuf.ByteString + getAnalysisTypeBytes(int index); + } + /** + *
+   * Indicates which analysis completed successfully. Multiple types of
+   * analysis can be performed on a single resource.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DiscoveryOccurrence.AnalysisCompleted} + */ + public static final class AnalysisCompleted extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) + AnalysisCompletedOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalysisCompleted.newBuilder() to construct. + private AnalysisCompleted(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnalysisCompleted() { + analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnalysisCompleted(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.class, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder.class); + } + + public static final int ANALYSIS_TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList analysisType_; + /** + * repeated string analysis_type = 1; + * @return A list containing the analysisType. + */ + public com.google.protobuf.ProtocolStringList + getAnalysisTypeList() { + return analysisType_; + } + /** + * repeated string analysis_type = 1; + * @return The count of analysisType. + */ + public int getAnalysisTypeCount() { + return analysisType_.size(); + } + /** + * repeated string analysis_type = 1; + * @param index The index of the element to return. + * @return The analysisType at the given index. + */ + public java.lang.String getAnalysisType(int index) { + return analysisType_.get(index); + } + /** + * repeated string analysis_type = 1; + * @param index The index of the value to return. + * @return The bytes of the analysisType at the given index. + */ + public com.google.protobuf.ByteString + getAnalysisTypeBytes(int index) { + return analysisType_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < analysisType_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, analysisType_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < analysisType_.size(); i++) { + dataSize += computeStringSizeNoTag(analysisType_.getRaw(i)); + } + size += dataSize; + size += 1 * getAnalysisTypeList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted)) { + return super.equals(obj); + } + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted other = (io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) obj; + + if (!getAnalysisTypeList() + .equals(other.getAnalysisTypeList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnalysisTypeCount() > 0) { + hash = (37 * hash) + ANALYSIS_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisTypeList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Indicates which analysis completed successfully. Multiple types of
+     * analysis can be performed on a single resource.
+     * 
+ * + * Protobuf type {@code grafeas.v1.DiscoveryOccurrence.AnalysisCompleted} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.class, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder.class); + } + + // Construct using io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getDefaultInstanceForType() { + return io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted build() { + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted buildPartial() { + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result = new io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result) { + if (((bitField0_ & 0x00000001) != 0)) { + analysisType_ = analysisType_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.analysisType_ = analysisType_; + } + + private void buildPartial0(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) { + return mergeFrom((io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted other) { + if (other == io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance()) return this; + if (!other.analysisType_.isEmpty()) { + if (analysisType_.isEmpty()) { + analysisType_ = other.analysisType_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnalysisTypeIsMutable(); + analysisType_.addAll(other.analysisType_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureAnalysisTypeIsMutable(); + analysisType_.add(s); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAnalysisTypeIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + analysisType_ = new com.google.protobuf.LazyStringArrayList(analysisType_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string analysis_type = 1; + * @return A list containing the analysisType. + */ + public com.google.protobuf.ProtocolStringList + getAnalysisTypeList() { + return analysisType_.getUnmodifiableView(); + } + /** + * repeated string analysis_type = 1; + * @return The count of analysisType. + */ + public int getAnalysisTypeCount() { + return analysisType_.size(); + } + /** + * repeated string analysis_type = 1; + * @param index The index of the element to return. + * @return The analysisType at the given index. + */ + public java.lang.String getAnalysisType(int index) { + return analysisType_.get(index); + } + /** + * repeated string analysis_type = 1; + * @param index The index of the value to return. + * @return The bytes of the analysisType at the given index. + */ + public com.google.protobuf.ByteString + getAnalysisTypeBytes(int index) { + return analysisType_.getByteString(index); + } + /** + * repeated string analysis_type = 1; + * @param index The index to set the value at. + * @param value The analysisType to set. + * @return This builder for chaining. + */ + public Builder setAnalysisType( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAnalysisTypeIsMutable(); + analysisType_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string analysis_type = 1; + * @param value The analysisType to add. + * @return This builder for chaining. + */ + public Builder addAnalysisType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAnalysisTypeIsMutable(); + analysisType_.add(value); + onChanged(); + return this; + } + /** + * repeated string analysis_type = 1; + * @param values The analysisType to add. + * @return This builder for chaining. + */ + public Builder addAllAnalysisType( + java.lang.Iterable values) { + ensureAnalysisTypeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, analysisType_); + onChanged(); + return this; + } + /** + * repeated string analysis_type = 1; + * @return This builder for chaining. + */ + public Builder clearAnalysisType() { + analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string analysis_type = 1; + * @param value The bytes of the analysisType to add. + * @return This builder for chaining. + */ + public Builder addAnalysisTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureAnalysisTypeIsMutable(); + analysisType_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) + private static final io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted(); + } + + public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalysisCompleted parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int CONTINUOUS_ANALYSIS_FIELD_NUMBER = 1; + private int continuousAnalysis_ = 0; + /** + *
+   * Whether the resource is continuously analyzed.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @return The enum numeric value on the wire for continuousAnalysis. + */ + @java.lang.Override public int getContinuousAnalysisValue() { + return continuousAnalysis_; + } + /** + *
+   * Whether the resource is continuously analyzed.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @return The continuousAnalysis. + */ + @java.lang.Override public io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis getContinuousAnalysis() { + io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis result = io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.forNumber(continuousAnalysis_); + return result == null ? io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.UNRECOGNIZED : result; + } + + public static final int ANALYSIS_STATUS_FIELD_NUMBER = 2; + private int analysisStatus_ = 0; + /** + *
+   * The status of discovery for the resource.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @return The enum numeric value on the wire for analysisStatus. + */ + @java.lang.Override public int getAnalysisStatusValue() { + return analysisStatus_; + } + /** + *
+   * The status of discovery for the resource.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @return The analysisStatus. + */ + @java.lang.Override public io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus getAnalysisStatus() { + io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus result = io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.forNumber(analysisStatus_); + return result == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.UNRECOGNIZED : result; + } + + public static final int ANALYSIS_COMPLETED_FIELD_NUMBER = 7; + private io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysisCompleted_; + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + * @return Whether the analysisCompleted field is set. + */ + @java.lang.Override + public boolean hasAnalysisCompleted() { + return analysisCompleted_ != null; + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + * @return The analysisCompleted. + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getAnalysisCompleted() { + return analysisCompleted_ == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder getAnalysisCompletedOrBuilder() { + return analysisCompleted_ == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; + } + + public static final int ANALYSIS_ERROR_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private java.util.List analysisError_; + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + @java.lang.Override + public java.util.List getAnalysisErrorList() { + return analysisError_; + } + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + @java.lang.Override + public java.util.List + getAnalysisErrorOrBuilderList() { + return analysisError_; + } + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + @java.lang.Override + public int getAnalysisErrorCount() { + return analysisError_.size(); + } + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + @java.lang.Override + public com.google.rpc.Status getAnalysisError(int index) { + return analysisError_.get(index); + } + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getAnalysisErrorOrBuilder( + int index) { + return analysisError_.get(index); + } + + public static final int ANALYSIS_STATUS_ERROR_FIELD_NUMBER = 3; + private com.google.rpc.Status analysisStatusError_; + /** + *
+   * When an error is encountered this will contain a LocalizedMessage under
+   * details to show to the user. The LocalizedMessage is output only and
+   * populated by the API.
+   * 
+ * + * .google.rpc.Status analysis_status_error = 3; + * @return Whether the analysisStatusError field is set. + */ + @java.lang.Override + public boolean hasAnalysisStatusError() { + return analysisStatusError_ != null; + } + /** + *
+   * When an error is encountered this will contain a LocalizedMessage under
+   * details to show to the user. The LocalizedMessage is output only and
+   * populated by the API.
+   * 
+ * + * .google.rpc.Status analysis_status_error = 3; + * @return The analysisStatusError. + */ + @java.lang.Override + public com.google.rpc.Status getAnalysisStatusError() { + return analysisStatusError_ == null ? com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; + } + /** + *
+   * When an error is encountered this will contain a LocalizedMessage under
+   * details to show to the user. The LocalizedMessage is output only and
+   * populated by the API.
+   * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getAnalysisStatusErrorOrBuilder() { + return analysisStatusError_ == null ? com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; + } + + public static final int CPE_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object cpe_ = ""; + /** + *
+   * The CPE of the resource being scanned.
+   * 
+ * + * string cpe = 4; + * @return The cpe. + */ + @java.lang.Override + public java.lang.String getCpe() { + java.lang.Object ref = cpe_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpe_ = s; + return s; + } + } + /** + *
+   * The CPE of the resource being scanned.
+   * 
+ * + * string cpe = 4; + * @return The bytes for cpe. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeBytes() { + java.lang.Object ref = cpe_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_SCAN_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp lastScanTime_; + /** + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * @return Whether the lastScanTime field is set. + */ + @java.lang.Override + public boolean hasLastScanTime() { + return lastScanTime_ != null; + } + /** + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * @return The lastScanTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastScanTime() { + return lastScanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; + } + /** + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastScanTimeOrBuilder() { + return lastScanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; + } + + public static final int ARCHIVE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp archiveTime_; + /** + *
+   * The time occurrences related to this discovery occurrence were archived.
+   * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the archiveTime field is set. + */ + @java.lang.Override + public boolean hasArchiveTime() { + return archiveTime_ != null; + } + /** + *
+   * The time occurrences related to this discovery occurrence were archived.
+   * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The archiveTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getArchiveTime() { + return archiveTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; + } + /** + *
+   * The time occurrences related to this discovery occurrence were archived.
+   * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getArchiveTimeOrBuilder() { + return archiveTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (continuousAnalysis_ != io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.CONTINUOUS_ANALYSIS_UNSPECIFIED.getNumber()) { + output.writeEnum(1, continuousAnalysis_); + } + if (analysisStatus_ != io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.ANALYSIS_STATUS_UNSPECIFIED.getNumber()) { + output.writeEnum(2, analysisStatus_); + } + if (analysisStatusError_ != null) { + output.writeMessage(3, getAnalysisStatusError()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpe_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cpe_); + } + if (lastScanTime_ != null) { + output.writeMessage(5, getLastScanTime()); + } + if (archiveTime_ != null) { + output.writeMessage(6, getArchiveTime()); + } + if (analysisCompleted_ != null) { + output.writeMessage(7, getAnalysisCompleted()); + } + for (int i = 0; i < analysisError_.size(); i++) { + output.writeMessage(8, analysisError_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (continuousAnalysis_ != io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.CONTINUOUS_ANALYSIS_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, continuousAnalysis_); + } + if (analysisStatus_ != io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.ANALYSIS_STATUS_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, analysisStatus_); + } + if (analysisStatusError_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getAnalysisStatusError()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpe_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cpe_); + } + if (lastScanTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getLastScanTime()); + } + if (archiveTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getArchiveTime()); + } + if (analysisCompleted_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getAnalysisCompleted()); + } + for (int i = 0; i < analysisError_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, analysisError_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.DiscoveryOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.DiscoveryOccurrence other = (io.grafeas.v1.DiscoveryOccurrence) obj; + + if (continuousAnalysis_ != other.continuousAnalysis_) return false; + if (analysisStatus_ != other.analysisStatus_) return false; + if (hasAnalysisCompleted() != other.hasAnalysisCompleted()) return false; + if (hasAnalysisCompleted()) { + if (!getAnalysisCompleted() + .equals(other.getAnalysisCompleted())) return false; + } + if (!getAnalysisErrorList() + .equals(other.getAnalysisErrorList())) return false; + if (hasAnalysisStatusError() != other.hasAnalysisStatusError()) return false; + if (hasAnalysisStatusError()) { + if (!getAnalysisStatusError() + .equals(other.getAnalysisStatusError())) return false; + } + if (!getCpe() + .equals(other.getCpe())) return false; + if (hasLastScanTime() != other.hasLastScanTime()) return false; + if (hasLastScanTime()) { + if (!getLastScanTime() + .equals(other.getLastScanTime())) return false; + } + if (hasArchiveTime() != other.hasArchiveTime()) return false; + if (hasArchiveTime()) { + if (!getArchiveTime() + .equals(other.getArchiveTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTINUOUS_ANALYSIS_FIELD_NUMBER; + hash = (53 * hash) + continuousAnalysis_; + hash = (37 * hash) + ANALYSIS_STATUS_FIELD_NUMBER; + hash = (53 * hash) + analysisStatus_; + if (hasAnalysisCompleted()) { + hash = (37 * hash) + ANALYSIS_COMPLETED_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisCompleted().hashCode(); + } + if (getAnalysisErrorCount() > 0) { + hash = (37 * hash) + ANALYSIS_ERROR_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisErrorList().hashCode(); + } + if (hasAnalysisStatusError()) { + hash = (37 * hash) + ANALYSIS_STATUS_ERROR_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisStatusError().hashCode(); + } + hash = (37 * hash) + CPE_FIELD_NUMBER; + hash = (53 * hash) + getCpe().hashCode(); + if (hasLastScanTime()) { + hash = (37 * hash) + LAST_SCAN_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastScanTime().hashCode(); + } + if (hasArchiveTime()) { + hash = (37 * hash) + ARCHIVE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getArchiveTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.DiscoveryOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.DiscoveryOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Provides information about the analysis status of a discovered resource.
+   * 
+ * + * Protobuf type {@code grafeas.v1.DiscoveryOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.DiscoveryOccurrence) + io.grafeas.v1.DiscoveryOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.DiscoveryOccurrence.class, io.grafeas.v1.DiscoveryOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.DiscoveryOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + continuousAnalysis_ = 0; + analysisStatus_ = 0; + analysisCompleted_ = null; + if (analysisCompletedBuilder_ != null) { + analysisCompletedBuilder_.dispose(); + analysisCompletedBuilder_ = null; + } + if (analysisErrorBuilder_ == null) { + analysisError_ = java.util.Collections.emptyList(); + } else { + analysisError_ = null; + analysisErrorBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + analysisStatusError_ = null; + if (analysisStatusErrorBuilder_ != null) { + analysisStatusErrorBuilder_.dispose(); + analysisStatusErrorBuilder_ = null; + } + cpe_ = ""; + lastScanTime_ = null; + if (lastScanTimeBuilder_ != null) { + lastScanTimeBuilder_.dispose(); + lastScanTimeBuilder_ = null; + } + archiveTime_ = null; + if (archiveTimeBuilder_ != null) { + archiveTimeBuilder_.dispose(); + archiveTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence build() { + io.grafeas.v1.DiscoveryOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence buildPartial() { + io.grafeas.v1.DiscoveryOccurrence result = new io.grafeas.v1.DiscoveryOccurrence(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.DiscoveryOccurrence result) { + if (analysisErrorBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + analysisError_ = java.util.Collections.unmodifiableList(analysisError_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.analysisError_ = analysisError_; + } else { + result.analysisError_ = analysisErrorBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.DiscoveryOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.continuousAnalysis_ = continuousAnalysis_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.analysisStatus_ = analysisStatus_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.analysisCompleted_ = analysisCompletedBuilder_ == null + ? analysisCompleted_ + : analysisCompletedBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.analysisStatusError_ = analysisStatusErrorBuilder_ == null + ? analysisStatusError_ + : analysisStatusErrorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.cpe_ = cpe_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.lastScanTime_ = lastScanTimeBuilder_ == null + ? lastScanTime_ + : lastScanTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.archiveTime_ = archiveTimeBuilder_ == null + ? archiveTime_ + : archiveTimeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.DiscoveryOccurrence) { + return mergeFrom((io.grafeas.v1.DiscoveryOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.DiscoveryOccurrence other) { + if (other == io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance()) return this; + if (other.continuousAnalysis_ != 0) { + setContinuousAnalysisValue(other.getContinuousAnalysisValue()); + } + if (other.analysisStatus_ != 0) { + setAnalysisStatusValue(other.getAnalysisStatusValue()); + } + if (other.hasAnalysisCompleted()) { + mergeAnalysisCompleted(other.getAnalysisCompleted()); + } + if (analysisErrorBuilder_ == null) { + if (!other.analysisError_.isEmpty()) { + if (analysisError_.isEmpty()) { + analysisError_ = other.analysisError_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureAnalysisErrorIsMutable(); + analysisError_.addAll(other.analysisError_); + } + onChanged(); + } + } else { + if (!other.analysisError_.isEmpty()) { + if (analysisErrorBuilder_.isEmpty()) { + analysisErrorBuilder_.dispose(); + analysisErrorBuilder_ = null; + analysisError_ = other.analysisError_; + bitField0_ = (bitField0_ & ~0x00000008); + analysisErrorBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAnalysisErrorFieldBuilder() : null; + } else { + analysisErrorBuilder_.addAllMessages(other.analysisError_); + } + } + } + if (other.hasAnalysisStatusError()) { + mergeAnalysisStatusError(other.getAnalysisStatusError()); + } + if (!other.getCpe().isEmpty()) { + cpe_ = other.cpe_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasLastScanTime()) { + mergeLastScanTime(other.getLastScanTime()); + } + if (other.hasArchiveTime()) { + mergeArchiveTime(other.getArchiveTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + continuousAnalysis_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + analysisStatus_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + input.readMessage( + getAnalysisStatusErrorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: { + cpe_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 34 + case 42: { + input.readMessage( + getLastScanTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 42 + case 50: { + input.readMessage( + getArchiveTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 50 + case 58: { + input.readMessage( + getAnalysisCompletedFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 58 + case 66: { + com.google.rpc.Status m = + input.readMessage( + com.google.rpc.Status.parser(), + extensionRegistry); + if (analysisErrorBuilder_ == null) { + ensureAnalysisErrorIsMutable(); + analysisError_.add(m); + } else { + analysisErrorBuilder_.addMessage(m); + } + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int continuousAnalysis_ = 0; + /** + *
+     * Whether the resource is continuously analyzed.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @return The enum numeric value on the wire for continuousAnalysis. + */ + @java.lang.Override public int getContinuousAnalysisValue() { + return continuousAnalysis_; + } + /** + *
+     * Whether the resource is continuously analyzed.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @param value The enum numeric value on the wire for continuousAnalysis to set. + * @return This builder for chaining. + */ + public Builder setContinuousAnalysisValue(int value) { + continuousAnalysis_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Whether the resource is continuously analyzed.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @return The continuousAnalysis. + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis getContinuousAnalysis() { + io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis result = io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.forNumber(continuousAnalysis_); + return result == null ? io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.UNRECOGNIZED : result; + } + /** + *
+     * Whether the resource is continuously analyzed.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @param value The continuousAnalysis to set. + * @return This builder for chaining. + */ + public Builder setContinuousAnalysis(io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + continuousAnalysis_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Whether the resource is continuously analyzed.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @return This builder for chaining. + */ + public Builder clearContinuousAnalysis() { + bitField0_ = (bitField0_ & ~0x00000001); + continuousAnalysis_ = 0; + onChanged(); + return this; + } + + private int analysisStatus_ = 0; + /** + *
+     * The status of discovery for the resource.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @return The enum numeric value on the wire for analysisStatus. + */ + @java.lang.Override public int getAnalysisStatusValue() { + return analysisStatus_; + } + /** + *
+     * The status of discovery for the resource.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @param value The enum numeric value on the wire for analysisStatus to set. + * @return This builder for chaining. + */ + public Builder setAnalysisStatusValue(int value) { + analysisStatus_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The status of discovery for the resource.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @return The analysisStatus. + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus getAnalysisStatus() { + io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus result = io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.forNumber(analysisStatus_); + return result == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.UNRECOGNIZED : result; + } + /** + *
+     * The status of discovery for the resource.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @param value The analysisStatus to set. + * @return This builder for chaining. + */ + public Builder setAnalysisStatus(io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + analysisStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The status of discovery for the resource.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @return This builder for chaining. + */ + public Builder clearAnalysisStatus() { + bitField0_ = (bitField0_ & ~0x00000002); + analysisStatus_ = 0; + onChanged(); + return this; + } + + private io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysisCompleted_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder> analysisCompletedBuilder_; + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + * @return Whether the analysisCompleted field is set. + */ + public boolean hasAnalysisCompleted() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + * @return The analysisCompleted. + */ + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getAnalysisCompleted() { + if (analysisCompletedBuilder_ == null) { + return analysisCompleted_ == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; + } else { + return analysisCompletedBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + public Builder setAnalysisCompleted(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted value) { + if (analysisCompletedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisCompleted_ = value; + } else { + analysisCompletedBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + public Builder setAnalysisCompleted( + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder builderForValue) { + if (analysisCompletedBuilder_ == null) { + analysisCompleted_ = builderForValue.build(); + } else { + analysisCompletedBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + public Builder mergeAnalysisCompleted(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted value) { + if (analysisCompletedBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + analysisCompleted_ != null && + analysisCompleted_ != io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance()) { + getAnalysisCompletedBuilder().mergeFrom(value); + } else { + analysisCompleted_ = value; + } + } else { + analysisCompletedBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + public Builder clearAnalysisCompleted() { + bitField0_ = (bitField0_ & ~0x00000004); + analysisCompleted_ = null; + if (analysisCompletedBuilder_ != null) { + analysisCompletedBuilder_.dispose(); + analysisCompletedBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder getAnalysisCompletedBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAnalysisCompletedFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder getAnalysisCompletedOrBuilder() { + if (analysisCompletedBuilder_ != null) { + return analysisCompletedBuilder_.getMessageOrBuilder(); + } else { + return analysisCompleted_ == null ? + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; + } + } + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder> + getAnalysisCompletedFieldBuilder() { + if (analysisCompletedBuilder_ == null) { + analysisCompletedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder>( + getAnalysisCompleted(), + getParentForChildren(), + isClean()); + analysisCompleted_ = null; + } + return analysisCompletedBuilder_; + } + + private java.util.List analysisError_ = + java.util.Collections.emptyList(); + private void ensureAnalysisErrorIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + analysisError_ = new java.util.ArrayList(analysisError_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> analysisErrorBuilder_; + + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public java.util.List getAnalysisErrorList() { + if (analysisErrorBuilder_ == null) { + return java.util.Collections.unmodifiableList(analysisError_); + } else { + return analysisErrorBuilder_.getMessageList(); + } + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public int getAnalysisErrorCount() { + if (analysisErrorBuilder_ == null) { + return analysisError_.size(); + } else { + return analysisErrorBuilder_.getCount(); + } + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public com.google.rpc.Status getAnalysisError(int index) { + if (analysisErrorBuilder_ == null) { + return analysisError_.get(index); + } else { + return analysisErrorBuilder_.getMessage(index); + } + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder setAnalysisError( + int index, com.google.rpc.Status value) { + if (analysisErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysisErrorIsMutable(); + analysisError_.set(index, value); + onChanged(); + } else { + analysisErrorBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder setAnalysisError( + int index, com.google.rpc.Status.Builder builderForValue) { + if (analysisErrorBuilder_ == null) { + ensureAnalysisErrorIsMutable(); + analysisError_.set(index, builderForValue.build()); + onChanged(); + } else { + analysisErrorBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder addAnalysisError(com.google.rpc.Status value) { + if (analysisErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysisErrorIsMutable(); + analysisError_.add(value); + onChanged(); + } else { + analysisErrorBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder addAnalysisError( + int index, com.google.rpc.Status value) { + if (analysisErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysisErrorIsMutable(); + analysisError_.add(index, value); + onChanged(); + } else { + analysisErrorBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder addAnalysisError( + com.google.rpc.Status.Builder builderForValue) { + if (analysisErrorBuilder_ == null) { + ensureAnalysisErrorIsMutable(); + analysisError_.add(builderForValue.build()); + onChanged(); + } else { + analysisErrorBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder addAnalysisError( + int index, com.google.rpc.Status.Builder builderForValue) { + if (analysisErrorBuilder_ == null) { + ensureAnalysisErrorIsMutable(); + analysisError_.add(index, builderForValue.build()); + onChanged(); + } else { + analysisErrorBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder addAllAnalysisError( + java.lang.Iterable values) { + if (analysisErrorBuilder_ == null) { + ensureAnalysisErrorIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, analysisError_); + onChanged(); + } else { + analysisErrorBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder clearAnalysisError() { + if (analysisErrorBuilder_ == null) { + analysisError_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + analysisErrorBuilder_.clear(); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public Builder removeAnalysisError(int index) { + if (analysisErrorBuilder_ == null) { + ensureAnalysisErrorIsMutable(); + analysisError_.remove(index); + onChanged(); + } else { + analysisErrorBuilder_.remove(index); + } + return this; + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public com.google.rpc.Status.Builder getAnalysisErrorBuilder( + int index) { + return getAnalysisErrorFieldBuilder().getBuilder(index); + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public com.google.rpc.StatusOrBuilder getAnalysisErrorOrBuilder( + int index) { + if (analysisErrorBuilder_ == null) { + return analysisError_.get(index); } else { + return analysisErrorBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public java.util.List + getAnalysisErrorOrBuilderList() { + if (analysisErrorBuilder_ != null) { + return analysisErrorBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(analysisError_); + } + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public com.google.rpc.Status.Builder addAnalysisErrorBuilder() { + return getAnalysisErrorFieldBuilder().addBuilder( + com.google.rpc.Status.getDefaultInstance()); + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public com.google.rpc.Status.Builder addAnalysisErrorBuilder( + int index) { + return getAnalysisErrorFieldBuilder().addBuilder( + index, com.google.rpc.Status.getDefaultInstance()); + } + /** + *
+     * Indicates any errors encountered during analysis of a resource. There
+     * could be 0 or more of these errors.
+     * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + public java.util.List + getAnalysisErrorBuilderList() { + return getAnalysisErrorFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getAnalysisErrorFieldBuilder() { + if (analysisErrorBuilder_ == null) { + analysisErrorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + analysisError_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + analysisError_ = null; + } + return analysisErrorBuilder_; + } + + private com.google.rpc.Status analysisStatusError_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> analysisStatusErrorBuilder_; + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + * @return Whether the analysisStatusError field is set. + */ + public boolean hasAnalysisStatusError() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + * @return The analysisStatusError. + */ + public com.google.rpc.Status getAnalysisStatusError() { + if (analysisStatusErrorBuilder_ == null) { + return analysisStatusError_ == null ? com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; + } else { + return analysisStatusErrorBuilder_.getMessage(); + } + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + public Builder setAnalysisStatusError(com.google.rpc.Status value) { + if (analysisStatusErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisStatusError_ = value; + } else { + analysisStatusErrorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + public Builder setAnalysisStatusError( + com.google.rpc.Status.Builder builderForValue) { + if (analysisStatusErrorBuilder_ == null) { + analysisStatusError_ = builderForValue.build(); + } else { + analysisStatusErrorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + public Builder mergeAnalysisStatusError(com.google.rpc.Status value) { + if (analysisStatusErrorBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + analysisStatusError_ != null && + analysisStatusError_ != com.google.rpc.Status.getDefaultInstance()) { + getAnalysisStatusErrorBuilder().mergeFrom(value); + } else { + analysisStatusError_ = value; + } + } else { + analysisStatusErrorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + public Builder clearAnalysisStatusError() { + bitField0_ = (bitField0_ & ~0x00000010); + analysisStatusError_ = null; + if (analysisStatusErrorBuilder_ != null) { + analysisStatusErrorBuilder_.dispose(); + analysisStatusErrorBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + public com.google.rpc.Status.Builder getAnalysisStatusErrorBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getAnalysisStatusErrorFieldBuilder().getBuilder(); + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + public com.google.rpc.StatusOrBuilder getAnalysisStatusErrorOrBuilder() { + if (analysisStatusErrorBuilder_ != null) { + return analysisStatusErrorBuilder_.getMessageOrBuilder(); + } else { + return analysisStatusError_ == null ? + com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; + } + } + /** + *
+     * When an error is encountered this will contain a LocalizedMessage under
+     * details to show to the user. The LocalizedMessage is output only and
+     * populated by the API.
+     * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getAnalysisStatusErrorFieldBuilder() { + if (analysisStatusErrorBuilder_ == null) { + analysisStatusErrorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getAnalysisStatusError(), + getParentForChildren(), + isClean()); + analysisStatusError_ = null; + } + return analysisStatusErrorBuilder_; + } + + private java.lang.Object cpe_ = ""; + /** + *
+     * The CPE of the resource being scanned.
+     * 
+ * + * string cpe = 4; + * @return The cpe. + */ + public java.lang.String getCpe() { + java.lang.Object ref = cpe_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpe_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The CPE of the resource being scanned.
+     * 
+ * + * string cpe = 4; + * @return The bytes for cpe. + */ + public com.google.protobuf.ByteString + getCpeBytes() { + java.lang.Object ref = cpe_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The CPE of the resource being scanned.
+     * 
+ * + * string cpe = 4; + * @param value The cpe to set. + * @return This builder for chaining. + */ + public Builder setCpe( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpe_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The CPE of the resource being scanned.
+     * 
+ * + * string cpe = 4; + * @return This builder for chaining. + */ + public Builder clearCpe() { + cpe_ = getDefaultInstance().getCpe(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The CPE of the resource being scanned.
+     * 
+ * + * string cpe = 4; + * @param value The bytes for cpe to set. + * @return This builder for chaining. + */ + public Builder setCpeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpe_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastScanTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastScanTimeBuilder_; + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * @return Whether the lastScanTime field is set. + */ + public boolean hasLastScanTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * @return The lastScanTime. + */ + public com.google.protobuf.Timestamp getLastScanTime() { + if (lastScanTimeBuilder_ == null) { + return lastScanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; + } else { + return lastScanTimeBuilder_.getMessage(); + } + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public Builder setLastScanTime(com.google.protobuf.Timestamp value) { + if (lastScanTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastScanTime_ = value; + } else { + lastScanTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public Builder setLastScanTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastScanTimeBuilder_ == null) { + lastScanTime_ = builderForValue.build(); + } else { + lastScanTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public Builder mergeLastScanTime(com.google.protobuf.Timestamp value) { + if (lastScanTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + lastScanTime_ != null && + lastScanTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLastScanTimeBuilder().mergeFrom(value); + } else { + lastScanTime_ = value; + } + } else { + lastScanTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public Builder clearLastScanTime() { + bitField0_ = (bitField0_ & ~0x00000040); + lastScanTime_ = null; + if (lastScanTimeBuilder_ != null) { + lastScanTimeBuilder_.dispose(); + lastScanTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getLastScanTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getLastScanTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getLastScanTimeOrBuilder() { + if (lastScanTimeBuilder_ != null) { + return lastScanTimeBuilder_.getMessageOrBuilder(); + } else { + return lastScanTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; + } + } + /** + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getLastScanTimeFieldBuilder() { + if (lastScanTimeBuilder_ == null) { + lastScanTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getLastScanTime(), + getParentForChildren(), + isClean()); + lastScanTime_ = null; + } + return lastScanTimeBuilder_; + } + + private com.google.protobuf.Timestamp archiveTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> archiveTimeBuilder_; + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the archiveTime field is set. + */ + public boolean hasArchiveTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The archiveTime. + */ + public com.google.protobuf.Timestamp getArchiveTime() { + if (archiveTimeBuilder_ == null) { + return archiveTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; + } else { + return archiveTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setArchiveTime(com.google.protobuf.Timestamp value) { + if (archiveTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + archiveTime_ = value; + } else { + archiveTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setArchiveTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (archiveTimeBuilder_ == null) { + archiveTime_ = builderForValue.build(); + } else { + archiveTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeArchiveTime(com.google.protobuf.Timestamp value) { + if (archiveTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + archiveTime_ != null && + archiveTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getArchiveTimeBuilder().mergeFrom(value); + } else { + archiveTime_ = value; + } + } else { + archiveTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearArchiveTime() { + bitField0_ = (bitField0_ & ~0x00000080); + archiveTime_ = null; + if (archiveTimeBuilder_ != null) { + archiveTimeBuilder_.dispose(); + archiveTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getArchiveTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getArchiveTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getArchiveTimeOrBuilder() { + if (archiveTimeBuilder_ != null) { + return archiveTimeBuilder_.getMessageOrBuilder(); + } else { + return archiveTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; + } + } + /** + *
+     * The time occurrences related to this discovery occurrence were archived.
+     * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getArchiveTimeFieldBuilder() { + if (archiveTimeBuilder_ == null) { + archiveTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getArchiveTime(), + getParentForChildren(), + isClean()); + archiveTime_ = null; + } + return archiveTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.DiscoveryOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.DiscoveryOccurrence) + private static final io.grafeas.v1.DiscoveryOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.DiscoveryOccurrence(); + } + + public static io.grafeas.v1.DiscoveryOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiscoveryOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java new file mode 100644 index 000000000000..6d5434fd5737 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java @@ -0,0 +1,218 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/discovery.proto + +package io.grafeas.v1; + +public interface DiscoveryOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.DiscoveryOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Whether the resource is continuously analyzed.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @return The enum numeric value on the wire for continuousAnalysis. + */ + int getContinuousAnalysisValue(); + /** + *
+   * Whether the resource is continuously analyzed.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @return The continuousAnalysis. + */ + io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis getContinuousAnalysis(); + + /** + *
+   * The status of discovery for the resource.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @return The enum numeric value on the wire for analysisStatus. + */ + int getAnalysisStatusValue(); + /** + *
+   * The status of discovery for the resource.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @return The analysisStatus. + */ + io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus getAnalysisStatus(); + + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + * @return Whether the analysisCompleted field is set. + */ + boolean hasAnalysisCompleted(); + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + * @return The analysisCompleted. + */ + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getAnalysisCompleted(); + /** + * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder getAnalysisCompletedOrBuilder(); + + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + java.util.List + getAnalysisErrorList(); + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + com.google.rpc.Status getAnalysisError(int index); + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + int getAnalysisErrorCount(); + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + java.util.List + getAnalysisErrorOrBuilderList(); + /** + *
+   * Indicates any errors encountered during analysis of a resource. There
+   * could be 0 or more of these errors.
+   * 
+ * + * repeated .google.rpc.Status analysis_error = 8; + */ + com.google.rpc.StatusOrBuilder getAnalysisErrorOrBuilder( + int index); + + /** + *
+   * When an error is encountered this will contain a LocalizedMessage under
+   * details to show to the user. The LocalizedMessage is output only and
+   * populated by the API.
+   * 
+ * + * .google.rpc.Status analysis_status_error = 3; + * @return Whether the analysisStatusError field is set. + */ + boolean hasAnalysisStatusError(); + /** + *
+   * When an error is encountered this will contain a LocalizedMessage under
+   * details to show to the user. The LocalizedMessage is output only and
+   * populated by the API.
+   * 
+ * + * .google.rpc.Status analysis_status_error = 3; + * @return The analysisStatusError. + */ + com.google.rpc.Status getAnalysisStatusError(); + /** + *
+   * When an error is encountered this will contain a LocalizedMessage under
+   * details to show to the user. The LocalizedMessage is output only and
+   * populated by the API.
+   * 
+ * + * .google.rpc.Status analysis_status_error = 3; + */ + com.google.rpc.StatusOrBuilder getAnalysisStatusErrorOrBuilder(); + + /** + *
+   * The CPE of the resource being scanned.
+   * 
+ * + * string cpe = 4; + * @return The cpe. + */ + java.lang.String getCpe(); + /** + *
+   * The CPE of the resource being scanned.
+   * 
+ * + * string cpe = 4; + * @return The bytes for cpe. + */ + com.google.protobuf.ByteString + getCpeBytes(); + + /** + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * @return Whether the lastScanTime field is set. + */ + boolean hasLastScanTime(); + /** + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * @return The lastScanTime. + */ + com.google.protobuf.Timestamp getLastScanTime(); + /** + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getLastScanTimeOrBuilder(); + + /** + *
+   * The time occurrences related to this discovery occurrence were archived.
+   * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the archiveTime field is set. + */ + boolean hasArchiveTime(); + /** + *
+   * The time occurrences related to this discovery occurrence were archived.
+   * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The archiveTime. + */ + com.google.protobuf.Timestamp getArchiveTime(); + /** + *
+   * The time occurrences related to this discovery occurrence were archived.
+   * 
+ * + * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getArchiveTimeOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java new file mode 100644 index 000000000000..fe74a108d6d7 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java @@ -0,0 +1,1439 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +/** + *
+ * This represents a particular channel of distribution for a given package.
+ * E.g., Debian's jessie-backports dpkg mirror.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Distribution} + */ +public final class Distribution extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Distribution) + DistributionOrBuilder { +private static final long serialVersionUID = 0L; + // Use Distribution.newBuilder() to construct. + private Distribution(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Distribution() { + cpeUri_ = ""; + architecture_ = 0; + maintainer_ = ""; + url_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Distribution(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Distribution.class, io.grafeas.v1.Distribution.Builder.class); + } + + public static final int CPE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cpeUri_ = ""; + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The cpeUri. + */ + @java.lang.Override + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } + } + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for cpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 2; + private int architecture_ = 0; + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override public int getArchitectureValue() { + return architecture_; + } + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @return The architecture. + */ + @java.lang.Override public io.grafeas.v1.Architecture getArchitecture() { + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); + return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; + } + + public static final int LATEST_VERSION_FIELD_NUMBER = 3; + private io.grafeas.v1.Version latestVersion_; + /** + *
+   * The latest available version of this package in this distribution channel.
+   * 
+ * + * .grafeas.v1.Version latest_version = 3; + * @return Whether the latestVersion field is set. + */ + @java.lang.Override + public boolean hasLatestVersion() { + return latestVersion_ != null; + } + /** + *
+   * The latest available version of this package in this distribution channel.
+   * 
+ * + * .grafeas.v1.Version latest_version = 3; + * @return The latestVersion. + */ + @java.lang.Override + public io.grafeas.v1.Version getLatestVersion() { + return latestVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; + } + /** + *
+   * The latest available version of this package in this distribution channel.
+   * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getLatestVersionOrBuilder() { + return latestVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; + } + + public static final int MAINTAINER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object maintainer_ = ""; + /** + *
+   * A freeform string denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 4; + * @return The maintainer. + */ + @java.lang.Override + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + maintainer_ = s; + return s; + } + } + /** + *
+   * A freeform string denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 4; + * @return The bytes for maintainer. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+   * The distribution channel-specific homepage for this package.
+   * 
+ * + * string url = 5; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+   * The distribution channel-specific homepage for this package.
+   * 
+ * + * string url = 5; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * The distribution channel-specific description of this package.
+   * 
+ * + * string description = 6; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The distribution channel-specific description of this package.
+   * 
+ * + * string description = 6; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); + } + if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, architecture_); + } + if (latestVersion_ != null) { + output.writeMessage(3, getLatestVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, maintainer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); + } + if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, architecture_); + } + if (latestVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLatestVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, maintainer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Distribution)) { + return super.equals(obj); + } + io.grafeas.v1.Distribution other = (io.grafeas.v1.Distribution) obj; + + if (!getCpeUri() + .equals(other.getCpeUri())) return false; + if (architecture_ != other.architecture_) return false; + if (hasLatestVersion() != other.hasLatestVersion()) return false; + if (hasLatestVersion()) { + if (!getLatestVersion() + .equals(other.getLatestVersion())) return false; + } + if (!getMaintainer() + .equals(other.getMaintainer())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCpeUri().hashCode(); + hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + architecture_; + if (hasLatestVersion()) { + hash = (37 * hash) + LATEST_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getLatestVersion().hashCode(); + } + hash = (37 * hash) + MAINTAINER_FIELD_NUMBER; + hash = (53 * hash) + getMaintainer().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Distribution parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Distribution parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Distribution parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Distribution parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Distribution parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Distribution parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Distribution parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Distribution parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Distribution parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Distribution parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Distribution parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Distribution parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Distribution prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * This represents a particular channel of distribution for a given package.
+   * E.g., Debian's jessie-backports dpkg mirror.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Distribution} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Distribution) + io.grafeas.v1.DistributionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Distribution.class, io.grafeas.v1.Distribution.Builder.class); + } + + // Construct using io.grafeas.v1.Distribution.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cpeUri_ = ""; + architecture_ = 0; + latestVersion_ = null; + if (latestVersionBuilder_ != null) { + latestVersionBuilder_.dispose(); + latestVersionBuilder_ = null; + } + maintainer_ = ""; + url_ = ""; + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Distribution getDefaultInstanceForType() { + return io.grafeas.v1.Distribution.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Distribution build() { + io.grafeas.v1.Distribution result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Distribution buildPartial() { + io.grafeas.v1.Distribution result = new io.grafeas.v1.Distribution(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Distribution result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cpeUri_ = cpeUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.architecture_ = architecture_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.latestVersion_ = latestVersionBuilder_ == null + ? latestVersion_ + : latestVersionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.maintainer_ = maintainer_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Distribution) { + return mergeFrom((io.grafeas.v1.Distribution)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Distribution other) { + if (other == io.grafeas.v1.Distribution.getDefaultInstance()) return this; + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.architecture_ != 0) { + setArchitectureValue(other.getArchitectureValue()); + } + if (other.hasLatestVersion()) { + mergeLatestVersion(other.getLatestVersion()); + } + if (!other.getMaintainer().isEmpty()) { + maintainer_ = other.maintainer_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + architecture_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + input.readMessage( + getLatestVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + maintainer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cpeUri_ = ""; + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearCpeUri() { + cpeUri_ = getDefaultInstance().getCpeUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int architecture_ = 0; + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override public int getArchitectureValue() { + return architecture_; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @param value The enum numeric value on the wire for architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitectureValue(int value) { + architecture_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @return The architecture. + */ + @java.lang.Override + public io.grafeas.v1.Architecture getArchitecture() { + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); + return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @param value The architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitecture(io.grafeas.v1.Architecture value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + architecture_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @return This builder for chaining. + */ + public Builder clearArchitecture() { + bitField0_ = (bitField0_ & ~0x00000002); + architecture_ = 0; + onChanged(); + return this; + } + + private io.grafeas.v1.Version latestVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> latestVersionBuilder_; + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + * @return Whether the latestVersion field is set. + */ + public boolean hasLatestVersion() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + * @return The latestVersion. + */ + public io.grafeas.v1.Version getLatestVersion() { + if (latestVersionBuilder_ == null) { + return latestVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; + } else { + return latestVersionBuilder_.getMessage(); + } + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + public Builder setLatestVersion(io.grafeas.v1.Version value) { + if (latestVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latestVersion_ = value; + } else { + latestVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + public Builder setLatestVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (latestVersionBuilder_ == null) { + latestVersion_ = builderForValue.build(); + } else { + latestVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + public Builder mergeLatestVersion(io.grafeas.v1.Version value) { + if (latestVersionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + latestVersion_ != null && + latestVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { + getLatestVersionBuilder().mergeFrom(value); + } else { + latestVersion_ = value; + } + } else { + latestVersionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + public Builder clearLatestVersion() { + bitField0_ = (bitField0_ & ~0x00000004); + latestVersion_ = null; + if (latestVersionBuilder_ != null) { + latestVersionBuilder_.dispose(); + latestVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + public io.grafeas.v1.Version.Builder getLatestVersionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getLatestVersionFieldBuilder().getBuilder(); + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + public io.grafeas.v1.VersionOrBuilder getLatestVersionOrBuilder() { + if (latestVersionBuilder_ != null) { + return latestVersionBuilder_.getMessageOrBuilder(); + } else { + return latestVersion_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; + } + } + /** + *
+     * The latest available version of this package in this distribution channel.
+     * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getLatestVersionFieldBuilder() { + if (latestVersionBuilder_ == null) { + latestVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getLatestVersion(), + getParentForChildren(), + isClean()); + latestVersion_ = null; + } + return latestVersionBuilder_; + } + + private java.lang.Object maintainer_ = ""; + /** + *
+     * A freeform string denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 4; + * @return The maintainer. + */ + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + maintainer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A freeform string denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 4; + * @return The bytes for maintainer. + */ + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A freeform string denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 4; + * @param value The maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainer( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + maintainer_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * A freeform string denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 4; + * @return This builder for chaining. + */ + public Builder clearMaintainer() { + maintainer_ = getDefaultInstance().getMaintainer(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * A freeform string denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 4; + * @param value The bytes for maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + maintainer_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+     * The distribution channel-specific homepage for this package.
+     * 
+ * + * string url = 5; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The distribution channel-specific homepage for this package.
+     * 
+ * + * string url = 5; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The distribution channel-specific homepage for this package.
+     * 
+ * + * string url = 5; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The distribution channel-specific homepage for this package.
+     * 
+ * + * string url = 5; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * The distribution channel-specific homepage for this package.
+     * 
+ * + * string url = 5; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The distribution channel-specific description of this package.
+     * 
+ * + * string description = 6; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The distribution channel-specific description of this package.
+     * 
+ * + * string description = 6; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The distribution channel-specific description of this package.
+     * 
+ * + * string description = 6; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The distribution channel-specific description of this package.
+     * 
+ * + * string description = 6; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The distribution channel-specific description of this package.
+     * 
+ * + * string description = 6; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Distribution) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Distribution) + private static final io.grafeas.v1.Distribution DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Distribution(); + } + + public static io.grafeas.v1.Distribution getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Distribution parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Distribution getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java new file mode 100644 index 000000000000..68a9704ee42d --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java @@ -0,0 +1,139 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +public interface DistributionOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Distribution) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The cpeUri. + */ + java.lang.String getCpeUri(); + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * 
+ * + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for cpeUri. + */ + com.google.protobuf.ByteString + getCpeUriBytes(); + + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @return The enum numeric value on the wire for architecture. + */ + int getArchitectureValue(); + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 2; + * @return The architecture. + */ + io.grafeas.v1.Architecture getArchitecture(); + + /** + *
+   * The latest available version of this package in this distribution channel.
+   * 
+ * + * .grafeas.v1.Version latest_version = 3; + * @return Whether the latestVersion field is set. + */ + boolean hasLatestVersion(); + /** + *
+   * The latest available version of this package in this distribution channel.
+   * 
+ * + * .grafeas.v1.Version latest_version = 3; + * @return The latestVersion. + */ + io.grafeas.v1.Version getLatestVersion(); + /** + *
+   * The latest available version of this package in this distribution channel.
+   * 
+ * + * .grafeas.v1.Version latest_version = 3; + */ + io.grafeas.v1.VersionOrBuilder getLatestVersionOrBuilder(); + + /** + *
+   * A freeform string denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 4; + * @return The maintainer. + */ + java.lang.String getMaintainer(); + /** + *
+   * A freeform string denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 4; + * @return The bytes for maintainer. + */ + com.google.protobuf.ByteString + getMaintainerBytes(); + + /** + *
+   * The distribution channel-specific homepage for this package.
+   * 
+ * + * string url = 5; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+   * The distribution channel-specific homepage for this package.
+   * 
+ * + * string url = 5; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+   * The distribution channel-specific description of this package.
+   * 
+ * + * string description = 6; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The distribution channel-specific description of this package.
+   * 
+ * + * string description = 6; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java new file mode 100644 index 000000000000..00a87936ba93 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/dsse_attestation.proto + +package io.grafeas.v1; + +public final class DsseAttestation { + private DsseAttestation() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DSSEAttestationNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n!grafeas/v1/dsse_attestation.proto\022\ngra" + + "feas.v1\032\027grafeas/v1/common.proto\032!grafea" + + "s/v1/intoto_statement.proto\"v\n\023DSSEAttes" + + "tationNote\0226\n\004hint\030\001 \001(\0132(.grafeas.v1.DS" + + "SEAttestationNote.DSSEHint\032\'\n\010DSSEHint\022\033" + + "\n\023human_readable_name\030\001 \001(\t\"\210\001\n\031DSSEAtte" + + "stationOccurrence\022&\n\010envelope\030\001 \001(\0132\024.gr" + + "afeas.v1.Envelope\0220\n\tstatement\030\002 \001(\0132\033.g" + + "rafeas.v1.InTotoStatementH\000B\021\n\017decoded_p" + + "ayloadBQ\n\rio.grafeas.v1P\001Z8google.golang" + + ".org/genproto/googleapis/grafeas/v1;graf" + + "eas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grafeas.v1.Common.getDescriptor(), + io.grafeas.v1.InTotoStatementProto.getDescriptor(), + }); + internal_static_grafeas_v1_DSSEAttestationNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DSSEAttestationNote_descriptor, + new java.lang.String[] { "Hint", }); + internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor = + internal_static_grafeas_v1_DSSEAttestationNote_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor, + new java.lang.String[] { "HumanReadableName", }); + internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor, + new java.lang.String[] { "Envelope", "Statement", "DecodedPayload", }); + io.grafeas.v1.Common.getDescriptor(); + io.grafeas.v1.InTotoStatementProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java new file mode 100644 index 000000000000..62f692aff974 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java @@ -0,0 +1,977 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + *
+ * MUST match
+ * https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An
+ * authenticated message of arbitrary type.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Envelope} + */ +public final class Envelope extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Envelope) + EnvelopeOrBuilder { +private static final long serialVersionUID = 0L; + // Use Envelope.newBuilder() to construct. + private Envelope(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Envelope() { + payload_ = com.google.protobuf.ByteString.EMPTY; + payloadType_ = ""; + signatures_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Envelope(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Envelope.class, io.grafeas.v1.Envelope.Builder.class); + } + + public static final int PAYLOAD_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes payload = 1; + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + public static final int PAYLOAD_TYPE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object payloadType_ = ""; + /** + * string payload_type = 2; + * @return The payloadType. + */ + @java.lang.Override + public java.lang.String getPayloadType() { + java.lang.Object ref = payloadType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payloadType_ = s; + return s; + } + } + /** + * string payload_type = 2; + * @return The bytes for payloadType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPayloadTypeBytes() { + java.lang.Object ref = payloadType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payloadType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIGNATURES_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List signatures_; + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + @java.lang.Override + public java.util.List getSignaturesList() { + return signatures_; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + @java.lang.Override + public java.util.List + getSignaturesOrBuilderList() { + return signatures_; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + @java.lang.Override + public int getSignaturesCount() { + return signatures_.size(); + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + @java.lang.Override + public io.grafeas.v1.EnvelopeSignature getSignatures(int index) { + return signatures_.get(index); + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + @java.lang.Override + public io.grafeas.v1.EnvelopeSignatureOrBuilder getSignaturesOrBuilder( + int index) { + return signatures_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!payload_.isEmpty()) { + output.writeBytes(1, payload_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, payloadType_); + } + for (int i = 0; i < signatures_.size(); i++) { + output.writeMessage(3, signatures_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, payload_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, payloadType_); + } + for (int i = 0; i < signatures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, signatures_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Envelope)) { + return super.equals(obj); + } + io.grafeas.v1.Envelope other = (io.grafeas.v1.Envelope) obj; + + if (!getPayload() + .equals(other.getPayload())) return false; + if (!getPayloadType() + .equals(other.getPayloadType())) return false; + if (!getSignaturesList() + .equals(other.getSignaturesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPayloadType().hashCode(); + if (getSignaturesCount() > 0) { + hash = (37 * hash) + SIGNATURES_FIELD_NUMBER; + hash = (53 * hash) + getSignaturesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Envelope parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Envelope parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Envelope parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Envelope parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Envelope parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Envelope parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Envelope parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Envelope parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Envelope parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Envelope parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Envelope parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Envelope parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Envelope prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * MUST match
+   * https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An
+   * authenticated message of arbitrary type.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Envelope} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Envelope) + io.grafeas.v1.EnvelopeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Envelope.class, io.grafeas.v1.Envelope.Builder.class); + } + + // Construct using io.grafeas.v1.Envelope.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + payload_ = com.google.protobuf.ByteString.EMPTY; + payloadType_ = ""; + if (signaturesBuilder_ == null) { + signatures_ = java.util.Collections.emptyList(); + } else { + signatures_ = null; + signaturesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Envelope getDefaultInstanceForType() { + return io.grafeas.v1.Envelope.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Envelope build() { + io.grafeas.v1.Envelope result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Envelope buildPartial() { + io.grafeas.v1.Envelope result = new io.grafeas.v1.Envelope(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.Envelope result) { + if (signaturesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + signatures_ = java.util.Collections.unmodifiableList(signatures_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.signatures_ = signatures_; + } else { + result.signatures_ = signaturesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.Envelope result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.payload_ = payload_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.payloadType_ = payloadType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Envelope) { + return mergeFrom((io.grafeas.v1.Envelope)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Envelope other) { + if (other == io.grafeas.v1.Envelope.getDefaultInstance()) return this; + if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { + setPayload(other.getPayload()); + } + if (!other.getPayloadType().isEmpty()) { + payloadType_ = other.payloadType_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (signaturesBuilder_ == null) { + if (!other.signatures_.isEmpty()) { + if (signatures_.isEmpty()) { + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSignaturesIsMutable(); + signatures_.addAll(other.signatures_); + } + onChanged(); + } + } else { + if (!other.signatures_.isEmpty()) { + if (signaturesBuilder_.isEmpty()) { + signaturesBuilder_.dispose(); + signaturesBuilder_ = null; + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000004); + signaturesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSignaturesFieldBuilder() : null; + } else { + signaturesBuilder_.addAllMessages(other.signatures_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + payload_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + payloadType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + io.grafeas.v1.EnvelopeSignature m = + input.readMessage( + io.grafeas.v1.EnvelopeSignature.parser(), + extensionRegistry); + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(m); + } else { + signaturesBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes payload = 1; + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + /** + * bytes payload = 1; + * @param value The payload to set. + * @return This builder for chaining. + */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + payload_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bytes payload = 1; + * @return This builder for chaining. + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000001); + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + + private java.lang.Object payloadType_ = ""; + /** + * string payload_type = 2; + * @return The payloadType. + */ + public java.lang.String getPayloadType() { + java.lang.Object ref = payloadType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payloadType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string payload_type = 2; + * @return The bytes for payloadType. + */ + public com.google.protobuf.ByteString + getPayloadTypeBytes() { + java.lang.Object ref = payloadType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payloadType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string payload_type = 2; + * @param value The payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + payloadType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string payload_type = 2; + * @return This builder for chaining. + */ + public Builder clearPayloadType() { + payloadType_ = getDefaultInstance().getPayloadType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string payload_type = 2; + * @param value The bytes for payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + payloadType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List signatures_ = + java.util.Collections.emptyList(); + private void ensureSignaturesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + signatures_ = new java.util.ArrayList(signatures_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.EnvelopeSignature, io.grafeas.v1.EnvelopeSignature.Builder, io.grafeas.v1.EnvelopeSignatureOrBuilder> signaturesBuilder_; + + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public java.util.List getSignaturesList() { + if (signaturesBuilder_ == null) { + return java.util.Collections.unmodifiableList(signatures_); + } else { + return signaturesBuilder_.getMessageList(); + } + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public int getSignaturesCount() { + if (signaturesBuilder_ == null) { + return signatures_.size(); + } else { + return signaturesBuilder_.getCount(); + } + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public io.grafeas.v1.EnvelopeSignature getSignatures(int index) { + if (signaturesBuilder_ == null) { + return signatures_.get(index); + } else { + return signaturesBuilder_.getMessage(index); + } + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder setSignatures( + int index, io.grafeas.v1.EnvelopeSignature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.set(index, value); + onChanged(); + } else { + signaturesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder setSignatures( + int index, io.grafeas.v1.EnvelopeSignature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.set(index, builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder addSignatures(io.grafeas.v1.EnvelopeSignature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(value); + onChanged(); + } else { + signaturesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder addSignatures( + int index, io.grafeas.v1.EnvelopeSignature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(index, value); + onChanged(); + } else { + signaturesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder addSignatures( + io.grafeas.v1.EnvelopeSignature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder addSignatures( + int index, io.grafeas.v1.EnvelopeSignature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(index, builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder addAllSignatures( + java.lang.Iterable values) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, signatures_); + onChanged(); + } else { + signaturesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder clearSignatures() { + if (signaturesBuilder_ == null) { + signatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + signaturesBuilder_.clear(); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public Builder removeSignatures(int index) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.remove(index); + onChanged(); + } else { + signaturesBuilder_.remove(index); + } + return this; + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public io.grafeas.v1.EnvelopeSignature.Builder getSignaturesBuilder( + int index) { + return getSignaturesFieldBuilder().getBuilder(index); + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public io.grafeas.v1.EnvelopeSignatureOrBuilder getSignaturesOrBuilder( + int index) { + if (signaturesBuilder_ == null) { + return signatures_.get(index); } else { + return signaturesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public java.util.List + getSignaturesOrBuilderList() { + if (signaturesBuilder_ != null) { + return signaturesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(signatures_); + } + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public io.grafeas.v1.EnvelopeSignature.Builder addSignaturesBuilder() { + return getSignaturesFieldBuilder().addBuilder( + io.grafeas.v1.EnvelopeSignature.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public io.grafeas.v1.EnvelopeSignature.Builder addSignaturesBuilder( + int index) { + return getSignaturesFieldBuilder().addBuilder( + index, io.grafeas.v1.EnvelopeSignature.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + public java.util.List + getSignaturesBuilderList() { + return getSignaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.EnvelopeSignature, io.grafeas.v1.EnvelopeSignature.Builder, io.grafeas.v1.EnvelopeSignatureOrBuilder> + getSignaturesFieldBuilder() { + if (signaturesBuilder_ == null) { + signaturesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.EnvelopeSignature, io.grafeas.v1.EnvelopeSignature.Builder, io.grafeas.v1.EnvelopeSignatureOrBuilder>( + signatures_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + signatures_ = null; + } + return signaturesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Envelope) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Envelope) + private static final io.grafeas.v1.Envelope DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Envelope(); + } + + public static io.grafeas.v1.Envelope getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Envelope parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Envelope getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java new file mode 100644 index 000000000000..836bb5b989d0 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public interface EnvelopeOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Envelope) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes payload = 1; + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); + + /** + * string payload_type = 2; + * @return The payloadType. + */ + java.lang.String getPayloadType(); + /** + * string payload_type = 2; + * @return The bytes for payloadType. + */ + com.google.protobuf.ByteString + getPayloadTypeBytes(); + + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + java.util.List + getSignaturesList(); + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + io.grafeas.v1.EnvelopeSignature getSignatures(int index); + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + int getSignaturesCount(); + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + java.util.List + getSignaturesOrBuilderList(); + /** + * repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + io.grafeas.v1.EnvelopeSignatureOrBuilder getSignaturesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java new file mode 100644 index 000000000000..d3bec7230117 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java @@ -0,0 +1,611 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.EnvelopeSignature} + */ +public final class EnvelopeSignature extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.EnvelopeSignature) + EnvelopeSignatureOrBuilder { +private static final long serialVersionUID = 0L; + // Use EnvelopeSignature.newBuilder() to construct. + private EnvelopeSignature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EnvelopeSignature() { + sig_ = com.google.protobuf.ByteString.EMPTY; + keyid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EnvelopeSignature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.EnvelopeSignature.class, io.grafeas.v1.EnvelopeSignature.Builder.class); + } + + public static final int SIG_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString sig_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes sig = 1; + * @return The sig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSig() { + return sig_; + } + + public static final int KEYID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object keyid_ = ""; + /** + * string keyid = 2; + * @return The keyid. + */ + @java.lang.Override + public java.lang.String getKeyid() { + java.lang.Object ref = keyid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyid_ = s; + return s; + } + } + /** + * string keyid = 2; + * @return The bytes for keyid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyidBytes() { + java.lang.Object ref = keyid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keyid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!sig_.isEmpty()) { + output.writeBytes(1, sig_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keyid_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!sig_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, sig_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, keyid_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.EnvelopeSignature)) { + return super.equals(obj); + } + io.grafeas.v1.EnvelopeSignature other = (io.grafeas.v1.EnvelopeSignature) obj; + + if (!getSig() + .equals(other.getSig())) return false; + if (!getKeyid() + .equals(other.getKeyid())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SIG_FIELD_NUMBER; + hash = (53 * hash) + getSig().hashCode(); + hash = (37 * hash) + KEYID_FIELD_NUMBER; + hash = (53 * hash) + getKeyid().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.EnvelopeSignature parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.EnvelopeSignature parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.EnvelopeSignature parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.EnvelopeSignature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.EnvelopeSignature prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.EnvelopeSignature} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.EnvelopeSignature) + io.grafeas.v1.EnvelopeSignatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.EnvelopeSignature.class, io.grafeas.v1.EnvelopeSignature.Builder.class); + } + + // Construct using io.grafeas.v1.EnvelopeSignature.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sig_ = com.google.protobuf.ByteString.EMPTY; + keyid_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.EnvelopeSignature getDefaultInstanceForType() { + return io.grafeas.v1.EnvelopeSignature.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.EnvelopeSignature build() { + io.grafeas.v1.EnvelopeSignature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.EnvelopeSignature buildPartial() { + io.grafeas.v1.EnvelopeSignature result = new io.grafeas.v1.EnvelopeSignature(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.EnvelopeSignature result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sig_ = sig_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.keyid_ = keyid_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.EnvelopeSignature) { + return mergeFrom((io.grafeas.v1.EnvelopeSignature)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.EnvelopeSignature other) { + if (other == io.grafeas.v1.EnvelopeSignature.getDefaultInstance()) return this; + if (other.getSig() != com.google.protobuf.ByteString.EMPTY) { + setSig(other.getSig()); + } + if (!other.getKeyid().isEmpty()) { + keyid_ = other.keyid_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + sig_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + keyid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString sig_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes sig = 1; + * @return The sig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSig() { + return sig_; + } + /** + * bytes sig = 1; + * @param value The sig to set. + * @return This builder for chaining. + */ + public Builder setSig(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + sig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bytes sig = 1; + * @return This builder for chaining. + */ + public Builder clearSig() { + bitField0_ = (bitField0_ & ~0x00000001); + sig_ = getDefaultInstance().getSig(); + onChanged(); + return this; + } + + private java.lang.Object keyid_ = ""; + /** + * string keyid = 2; + * @return The keyid. + */ + public java.lang.String getKeyid() { + java.lang.Object ref = keyid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string keyid = 2; + * @return The bytes for keyid. + */ + public com.google.protobuf.ByteString + getKeyidBytes() { + java.lang.Object ref = keyid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keyid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string keyid = 2; + * @param value The keyid to set. + * @return This builder for chaining. + */ + public Builder setKeyid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + keyid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string keyid = 2; + * @return This builder for chaining. + */ + public Builder clearKeyid() { + keyid_ = getDefaultInstance().getKeyid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string keyid = 2; + * @param value The bytes for keyid to set. + * @return This builder for chaining. + */ + public Builder setKeyidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + keyid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.EnvelopeSignature) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.EnvelopeSignature) + private static final io.grafeas.v1.EnvelopeSignature DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.EnvelopeSignature(); + } + + public static io.grafeas.v1.EnvelopeSignature getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnvelopeSignature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.EnvelopeSignature getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java new file mode 100644 index 000000000000..13a73d048cf2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public interface EnvelopeSignatureOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.EnvelopeSignature) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes sig = 1; + * @return The sig. + */ + com.google.protobuf.ByteString getSig(); + + /** + * string keyid = 2; + * @return The keyid. + */ + java.lang.String getKeyid(); + /** + * string keyid = 2; + * @return The bytes for keyid. + */ + com.google.protobuf.ByteString + getKeyidBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java new file mode 100644 index 000000000000..95a37b40792a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java @@ -0,0 +1,864 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Container message for hashes of byte content of files, used in source
+ * messages to verify integrity of source input to the build.
+ * 
+ * + * Protobuf type {@code grafeas.v1.FileHashes} + */ +public final class FileHashes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.FileHashes) + FileHashesOrBuilder { +private static final long serialVersionUID = 0L; + // Use FileHashes.newBuilder() to construct. + private FileHashes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FileHashes() { + fileHash_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FileHashes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.FileHashes.class, io.grafeas.v1.FileHashes.Builder.class); + } + + public static final int FILE_HASH_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List fileHash_; + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + @java.lang.Override + public java.util.List getFileHashList() { + return fileHash_; + } + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + @java.lang.Override + public java.util.List + getFileHashOrBuilderList() { + return fileHash_; + } + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + @java.lang.Override + public int getFileHashCount() { + return fileHash_.size(); + } + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + @java.lang.Override + public io.grafeas.v1.Hash getFileHash(int index) { + return fileHash_.get(index); + } + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + @java.lang.Override + public io.grafeas.v1.HashOrBuilder getFileHashOrBuilder( + int index) { + return fileHash_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < fileHash_.size(); i++) { + output.writeMessage(1, fileHash_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fileHash_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, fileHash_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.FileHashes)) { + return super.equals(obj); + } + io.grafeas.v1.FileHashes other = (io.grafeas.v1.FileHashes) obj; + + if (!getFileHashList() + .equals(other.getFileHashList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFileHashCount() > 0) { + hash = (37 * hash) + FILE_HASH_FIELD_NUMBER; + hash = (53 * hash) + getFileHashList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.FileHashes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.FileHashes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.FileHashes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.FileHashes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.FileHashes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.FileHashes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.FileHashes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.FileHashes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.FileHashes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.FileHashes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.FileHashes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.FileHashes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.FileHashes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Container message for hashes of byte content of files, used in source
+   * messages to verify integrity of source input to the build.
+   * 
+ * + * Protobuf type {@code grafeas.v1.FileHashes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.FileHashes) + io.grafeas.v1.FileHashesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.FileHashes.class, io.grafeas.v1.FileHashes.Builder.class); + } + + // Construct using io.grafeas.v1.FileHashes.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (fileHashBuilder_ == null) { + fileHash_ = java.util.Collections.emptyList(); + } else { + fileHash_ = null; + fileHashBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.FileHashes getDefaultInstanceForType() { + return io.grafeas.v1.FileHashes.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.FileHashes build() { + io.grafeas.v1.FileHashes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.FileHashes buildPartial() { + io.grafeas.v1.FileHashes result = new io.grafeas.v1.FileHashes(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.FileHashes result) { + if (fileHashBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fileHash_ = java.util.Collections.unmodifiableList(fileHash_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fileHash_ = fileHash_; + } else { + result.fileHash_ = fileHashBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.FileHashes result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.FileHashes) { + return mergeFrom((io.grafeas.v1.FileHashes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.FileHashes other) { + if (other == io.grafeas.v1.FileHashes.getDefaultInstance()) return this; + if (fileHashBuilder_ == null) { + if (!other.fileHash_.isEmpty()) { + if (fileHash_.isEmpty()) { + fileHash_ = other.fileHash_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFileHashIsMutable(); + fileHash_.addAll(other.fileHash_); + } + onChanged(); + } + } else { + if (!other.fileHash_.isEmpty()) { + if (fileHashBuilder_.isEmpty()) { + fileHashBuilder_.dispose(); + fileHashBuilder_ = null; + fileHash_ = other.fileHash_; + bitField0_ = (bitField0_ & ~0x00000001); + fileHashBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFileHashFieldBuilder() : null; + } else { + fileHashBuilder_.addAllMessages(other.fileHash_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.grafeas.v1.Hash m = + input.readMessage( + io.grafeas.v1.Hash.parser(), + extensionRegistry); + if (fileHashBuilder_ == null) { + ensureFileHashIsMutable(); + fileHash_.add(m); + } else { + fileHashBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List fileHash_ = + java.util.Collections.emptyList(); + private void ensureFileHashIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fileHash_ = new java.util.ArrayList(fileHash_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Hash, io.grafeas.v1.Hash.Builder, io.grafeas.v1.HashOrBuilder> fileHashBuilder_; + + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public java.util.List getFileHashList() { + if (fileHashBuilder_ == null) { + return java.util.Collections.unmodifiableList(fileHash_); + } else { + return fileHashBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public int getFileHashCount() { + if (fileHashBuilder_ == null) { + return fileHash_.size(); + } else { + return fileHashBuilder_.getCount(); + } + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public io.grafeas.v1.Hash getFileHash(int index) { + if (fileHashBuilder_ == null) { + return fileHash_.get(index); + } else { + return fileHashBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder setFileHash( + int index, io.grafeas.v1.Hash value) { + if (fileHashBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileHashIsMutable(); + fileHash_.set(index, value); + onChanged(); + } else { + fileHashBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder setFileHash( + int index, io.grafeas.v1.Hash.Builder builderForValue) { + if (fileHashBuilder_ == null) { + ensureFileHashIsMutable(); + fileHash_.set(index, builderForValue.build()); + onChanged(); + } else { + fileHashBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder addFileHash(io.grafeas.v1.Hash value) { + if (fileHashBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileHashIsMutable(); + fileHash_.add(value); + onChanged(); + } else { + fileHashBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder addFileHash( + int index, io.grafeas.v1.Hash value) { + if (fileHashBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileHashIsMutable(); + fileHash_.add(index, value); + onChanged(); + } else { + fileHashBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder addFileHash( + io.grafeas.v1.Hash.Builder builderForValue) { + if (fileHashBuilder_ == null) { + ensureFileHashIsMutable(); + fileHash_.add(builderForValue.build()); + onChanged(); + } else { + fileHashBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder addFileHash( + int index, io.grafeas.v1.Hash.Builder builderForValue) { + if (fileHashBuilder_ == null) { + ensureFileHashIsMutable(); + fileHash_.add(index, builderForValue.build()); + onChanged(); + } else { + fileHashBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder addAllFileHash( + java.lang.Iterable values) { + if (fileHashBuilder_ == null) { + ensureFileHashIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fileHash_); + onChanged(); + } else { + fileHashBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder clearFileHash() { + if (fileHashBuilder_ == null) { + fileHash_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fileHashBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public Builder removeFileHash(int index) { + if (fileHashBuilder_ == null) { + ensureFileHashIsMutable(); + fileHash_.remove(index); + onChanged(); + } else { + fileHashBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public io.grafeas.v1.Hash.Builder getFileHashBuilder( + int index) { + return getFileHashFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public io.grafeas.v1.HashOrBuilder getFileHashOrBuilder( + int index) { + if (fileHashBuilder_ == null) { + return fileHash_.get(index); } else { + return fileHashBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public java.util.List + getFileHashOrBuilderList() { + if (fileHashBuilder_ != null) { + return fileHashBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fileHash_); + } + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public io.grafeas.v1.Hash.Builder addFileHashBuilder() { + return getFileHashFieldBuilder().addBuilder( + io.grafeas.v1.Hash.getDefaultInstance()); + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public io.grafeas.v1.Hash.Builder addFileHashBuilder( + int index) { + return getFileHashFieldBuilder().addBuilder( + index, io.grafeas.v1.Hash.getDefaultInstance()); + } + /** + *
+     * Required. Collection of file hashes.
+     * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + public java.util.List + getFileHashBuilderList() { + return getFileHashFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Hash, io.grafeas.v1.Hash.Builder, io.grafeas.v1.HashOrBuilder> + getFileHashFieldBuilder() { + if (fileHashBuilder_ == null) { + fileHashBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Hash, io.grafeas.v1.Hash.Builder, io.grafeas.v1.HashOrBuilder>( + fileHash_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fileHash_ = null; + } + return fileHashBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.FileHashes) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.FileHashes) + private static final io.grafeas.v1.FileHashes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.FileHashes(); + } + + public static io.grafeas.v1.FileHashes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FileHashes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.FileHashes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java new file mode 100644 index 000000000000..fd271d4029ff --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface FileHashesOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.FileHashes) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + java.util.List + getFileHashList(); + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + io.grafeas.v1.Hash getFileHash(int index); + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + int getFileHashCount(); + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + java.util.List + getFileHashOrBuilderList(); + /** + *
+   * Required. Collection of file hashes.
+   * 
+ * + * repeated .grafeas.v1.Hash file_hash = 1; + */ + io.grafeas.v1.HashOrBuilder getFileHashOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java new file mode 100644 index 000000000000..6d2ecff765e6 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java @@ -0,0 +1,587 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + *
+ * Indicates the location at which a package was found.
+ * 
+ * + * Protobuf type {@code grafeas.v1.FileLocation} + */ +public final class FileLocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.FileLocation) + FileLocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use FileLocation.newBuilder() to construct. + private FileLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FileLocation() { + filePath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FileLocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.FileLocation.class, io.grafeas.v1.FileLocation.Builder.class); + } + + public static final int FILE_PATH_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object filePath_ = ""; + /** + *
+   * For jars that are contained inside .war files, this filepath
+   * can indicate the path to war file combined with the path to jar file.
+   * 
+ * + * string file_path = 1; + * @return The filePath. + */ + @java.lang.Override + public java.lang.String getFilePath() { + java.lang.Object ref = filePath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filePath_ = s; + return s; + } + } + /** + *
+   * For jars that are contained inside .war files, this filepath
+   * can indicate the path to war file combined with the path to jar file.
+   * 
+ * + * string file_path = 1; + * @return The bytes for filePath. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilePathBytes() { + java.lang.Object ref = filePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filePath_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filePath_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.FileLocation)) { + return super.equals(obj); + } + io.grafeas.v1.FileLocation other = (io.grafeas.v1.FileLocation) obj; + + if (!getFilePath() + .equals(other.getFilePath())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FILE_PATH_FIELD_NUMBER; + hash = (53 * hash) + getFilePath().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.FileLocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.FileLocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.FileLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.FileLocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.FileLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.FileLocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.FileLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.FileLocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.FileLocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.FileLocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.FileLocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.FileLocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.FileLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Indicates the location at which a package was found.
+   * 
+ * + * Protobuf type {@code grafeas.v1.FileLocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.FileLocation) + io.grafeas.v1.FileLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.FileLocation.class, io.grafeas.v1.FileLocation.Builder.class); + } + + // Construct using io.grafeas.v1.FileLocation.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + filePath_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.FileLocation getDefaultInstanceForType() { + return io.grafeas.v1.FileLocation.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.FileLocation build() { + io.grafeas.v1.FileLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.FileLocation buildPartial() { + io.grafeas.v1.FileLocation result = new io.grafeas.v1.FileLocation(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.FileLocation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.filePath_ = filePath_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.FileLocation) { + return mergeFrom((io.grafeas.v1.FileLocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.FileLocation other) { + if (other == io.grafeas.v1.FileLocation.getDefaultInstance()) return this; + if (!other.getFilePath().isEmpty()) { + filePath_ = other.filePath_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + filePath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object filePath_ = ""; + /** + *
+     * For jars that are contained inside .war files, this filepath
+     * can indicate the path to war file combined with the path to jar file.
+     * 
+ * + * string file_path = 1; + * @return The filePath. + */ + public java.lang.String getFilePath() { + java.lang.Object ref = filePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * For jars that are contained inside .war files, this filepath
+     * can indicate the path to war file combined with the path to jar file.
+     * 
+ * + * string file_path = 1; + * @return The bytes for filePath. + */ + public com.google.protobuf.ByteString + getFilePathBytes() { + java.lang.Object ref = filePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * For jars that are contained inside .war files, this filepath
+     * can indicate the path to war file combined with the path to jar file.
+     * 
+ * + * string file_path = 1; + * @param value The filePath to set. + * @return This builder for chaining. + */ + public Builder setFilePath( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filePath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * For jars that are contained inside .war files, this filepath
+     * can indicate the path to war file combined with the path to jar file.
+     * 
+ * + * string file_path = 1; + * @return This builder for chaining. + */ + public Builder clearFilePath() { + filePath_ = getDefaultInstance().getFilePath(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * For jars that are contained inside .war files, this filepath
+     * can indicate the path to war file combined with the path to jar file.
+     * 
+ * + * string file_path = 1; + * @param value The bytes for filePath to set. + * @return This builder for chaining. + */ + public Builder setFilePathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filePath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.FileLocation) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.FileLocation) + private static final io.grafeas.v1.FileLocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.FileLocation(); + } + + public static io.grafeas.v1.FileLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FileLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.FileLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java new file mode 100644 index 000000000000..7869d5e04677 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public interface FileLocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.FileLocation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * For jars that are contained inside .war files, this filepath
+   * can indicate the path to war file combined with the path to jar file.
+   * 
+ * + * string file_path = 1; + * @return The filePath. + */ + java.lang.String getFilePath(); + /** + *
+   * For jars that are contained inside .war files, this filepath
+   * can indicate the path to war file combined with the path to jar file.
+   * 
+ * + * string file_path = 1; + * @return The bytes for filePath. + */ + com.google.protobuf.ByteString + getFilePathBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java new file mode 100644 index 000000000000..ce9a56433288 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java @@ -0,0 +1,1009 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +/** + *
+ * A set of properties that uniquely identify a given Docker image.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Fingerprint} + */ +public final class Fingerprint extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Fingerprint) + FingerprintOrBuilder { +private static final long serialVersionUID = 0L; + // Use Fingerprint.newBuilder() to construct. + private Fingerprint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Fingerprint() { + v1Name_ = ""; + v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; + v2Name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Fingerprint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Fingerprint.class, io.grafeas.v1.Fingerprint.Builder.class); + } + + public static final int V1_NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object v1Name_ = ""; + /** + *
+   * Required. The layer ID of the final layer in the Docker image's v1
+   * representation.
+   * 
+ * + * string v1_name = 1; + * @return The v1Name. + */ + @java.lang.Override + public java.lang.String getV1Name() { + java.lang.Object ref = v1Name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + v1Name_ = s; + return s; + } + } + /** + *
+   * Required. The layer ID of the final layer in the Docker image's v1
+   * representation.
+   * 
+ * + * string v1_name = 1; + * @return The bytes for v1Name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getV1NameBytes() { + java.lang.Object ref = v1Name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + v1Name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int V2_BLOB_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList v2Blob_; + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @return A list containing the v2Blob. + */ + public com.google.protobuf.ProtocolStringList + getV2BlobList() { + return v2Blob_; + } + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @return The count of v2Blob. + */ + public int getV2BlobCount() { + return v2Blob_.size(); + } + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @param index The index of the element to return. + * @return The v2Blob at the given index. + */ + public java.lang.String getV2Blob(int index) { + return v2Blob_.get(index); + } + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @param index The index of the value to return. + * @return The bytes of the v2Blob at the given index. + */ + public com.google.protobuf.ByteString + getV2BlobBytes(int index) { + return v2Blob_.getByteString(index); + } + + public static final int V2_NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object v2Name_ = ""; + /** + *
+   * Output only. The name of the image's v2 blobs computed via:
+   *   [bottom] := v2_blob[bottom]
+   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+   * Only the name of the final blob is kept.
+   * 
+ * + * string v2_name = 3; + * @return The v2Name. + */ + @java.lang.Override + public java.lang.String getV2Name() { + java.lang.Object ref = v2Name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + v2Name_ = s; + return s; + } + } + /** + *
+   * Output only. The name of the image's v2 blobs computed via:
+   *   [bottom] := v2_blob[bottom]
+   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+   * Only the name of the final blob is kept.
+   * 
+ * + * string v2_name = 3; + * @return The bytes for v2Name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getV2NameBytes() { + java.lang.Object ref = v2Name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + v2Name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v1Name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, v1Name_); + } + for (int i = 0; i < v2Blob_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, v2Blob_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v2Name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, v2Name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v1Name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, v1Name_); + } + { + int dataSize = 0; + for (int i = 0; i < v2Blob_.size(); i++) { + dataSize += computeStringSizeNoTag(v2Blob_.getRaw(i)); + } + size += dataSize; + size += 1 * getV2BlobList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v2Name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, v2Name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Fingerprint)) { + return super.equals(obj); + } + io.grafeas.v1.Fingerprint other = (io.grafeas.v1.Fingerprint) obj; + + if (!getV1Name() + .equals(other.getV1Name())) return false; + if (!getV2BlobList() + .equals(other.getV2BlobList())) return false; + if (!getV2Name() + .equals(other.getV2Name())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + V1_NAME_FIELD_NUMBER; + hash = (53 * hash) + getV1Name().hashCode(); + if (getV2BlobCount() > 0) { + hash = (37 * hash) + V2_BLOB_FIELD_NUMBER; + hash = (53 * hash) + getV2BlobList().hashCode(); + } + hash = (37 * hash) + V2_NAME_FIELD_NUMBER; + hash = (53 * hash) + getV2Name().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Fingerprint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Fingerprint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Fingerprint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Fingerprint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Fingerprint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Fingerprint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Fingerprint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Fingerprint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Fingerprint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Fingerprint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Fingerprint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Fingerprint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Fingerprint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A set of properties that uniquely identify a given Docker image.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Fingerprint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Fingerprint) + io.grafeas.v1.FingerprintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Fingerprint.class, io.grafeas.v1.Fingerprint.Builder.class); + } + + // Construct using io.grafeas.v1.Fingerprint.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + v1Name_ = ""; + v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + v2Name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Fingerprint getDefaultInstanceForType() { + return io.grafeas.v1.Fingerprint.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Fingerprint build() { + io.grafeas.v1.Fingerprint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Fingerprint buildPartial() { + io.grafeas.v1.Fingerprint result = new io.grafeas.v1.Fingerprint(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.Fingerprint result) { + if (((bitField0_ & 0x00000002) != 0)) { + v2Blob_ = v2Blob_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.v2Blob_ = v2Blob_; + } + + private void buildPartial0(io.grafeas.v1.Fingerprint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.v1Name_ = v1Name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.v2Name_ = v2Name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Fingerprint) { + return mergeFrom((io.grafeas.v1.Fingerprint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Fingerprint other) { + if (other == io.grafeas.v1.Fingerprint.getDefaultInstance()) return this; + if (!other.getV1Name().isEmpty()) { + v1Name_ = other.v1Name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.v2Blob_.isEmpty()) { + if (v2Blob_.isEmpty()) { + v2Blob_ = other.v2Blob_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureV2BlobIsMutable(); + v2Blob_.addAll(other.v2Blob_); + } + onChanged(); + } + if (!other.getV2Name().isEmpty()) { + v2Name_ = other.v2Name_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + v1Name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureV2BlobIsMutable(); + v2Blob_.add(s); + break; + } // case 18 + case 26: { + v2Name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object v1Name_ = ""; + /** + *
+     * Required. The layer ID of the final layer in the Docker image's v1
+     * representation.
+     * 
+ * + * string v1_name = 1; + * @return The v1Name. + */ + public java.lang.String getV1Name() { + java.lang.Object ref = v1Name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + v1Name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The layer ID of the final layer in the Docker image's v1
+     * representation.
+     * 
+ * + * string v1_name = 1; + * @return The bytes for v1Name. + */ + public com.google.protobuf.ByteString + getV1NameBytes() { + java.lang.Object ref = v1Name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + v1Name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The layer ID of the final layer in the Docker image's v1
+     * representation.
+     * 
+ * + * string v1_name = 1; + * @param value The v1Name to set. + * @return This builder for chaining. + */ + public Builder setV1Name( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + v1Name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The layer ID of the final layer in the Docker image's v1
+     * representation.
+     * 
+ * + * string v1_name = 1; + * @return This builder for chaining. + */ + public Builder clearV1Name() { + v1Name_ = getDefaultInstance().getV1Name(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The layer ID of the final layer in the Docker image's v1
+     * representation.
+     * 
+ * + * string v1_name = 1; + * @param value The bytes for v1Name to set. + * @return This builder for chaining. + */ + public Builder setV1NameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + v1Name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureV2BlobIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + v2Blob_ = new com.google.protobuf.LazyStringArrayList(v2Blob_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @return A list containing the v2Blob. + */ + public com.google.protobuf.ProtocolStringList + getV2BlobList() { + return v2Blob_.getUnmodifiableView(); + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @return The count of v2Blob. + */ + public int getV2BlobCount() { + return v2Blob_.size(); + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @param index The index of the element to return. + * @return The v2Blob at the given index. + */ + public java.lang.String getV2Blob(int index) { + return v2Blob_.get(index); + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @param index The index of the value to return. + * @return The bytes of the v2Blob at the given index. + */ + public com.google.protobuf.ByteString + getV2BlobBytes(int index) { + return v2Blob_.getByteString(index); + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @param index The index to set the value at. + * @param value The v2Blob to set. + * @return This builder for chaining. + */ + public Builder setV2Blob( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureV2BlobIsMutable(); + v2Blob_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @param value The v2Blob to add. + * @return This builder for chaining. + */ + public Builder addV2Blob( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureV2BlobIsMutable(); + v2Blob_.add(value); + onChanged(); + return this; + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @param values The v2Blob to add. + * @return This builder for chaining. + */ + public Builder addAllV2Blob( + java.lang.Iterable values) { + ensureV2BlobIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, v2Blob_); + onChanged(); + return this; + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @return This builder for chaining. + */ + public Builder clearV2Blob() { + v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Required. The ordered list of v2 blobs that represent a given image.
+     * 
+ * + * repeated string v2_blob = 2; + * @param value The bytes of the v2Blob to add. + * @return This builder for chaining. + */ + public Builder addV2BlobBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureV2BlobIsMutable(); + v2Blob_.add(value); + onChanged(); + return this; + } + + private java.lang.Object v2Name_ = ""; + /** + *
+     * Output only. The name of the image's v2 blobs computed via:
+     *   [bottom] := v2_blob[bottom]
+     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+     * Only the name of the final blob is kept.
+     * 
+ * + * string v2_name = 3; + * @return The v2Name. + */ + public java.lang.String getV2Name() { + java.lang.Object ref = v2Name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + v2Name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The name of the image's v2 blobs computed via:
+     *   [bottom] := v2_blob[bottom]
+     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+     * Only the name of the final blob is kept.
+     * 
+ * + * string v2_name = 3; + * @return The bytes for v2Name. + */ + public com.google.protobuf.ByteString + getV2NameBytes() { + java.lang.Object ref = v2Name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + v2Name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The name of the image's v2 blobs computed via:
+     *   [bottom] := v2_blob[bottom]
+     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+     * Only the name of the final blob is kept.
+     * 
+ * + * string v2_name = 3; + * @param value The v2Name to set. + * @return This builder for chaining. + */ + public Builder setV2Name( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + v2Name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The name of the image's v2 blobs computed via:
+     *   [bottom] := v2_blob[bottom]
+     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+     * Only the name of the final blob is kept.
+     * 
+ * + * string v2_name = 3; + * @return This builder for chaining. + */ + public Builder clearV2Name() { + v2Name_ = getDefaultInstance().getV2Name(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Output only. The name of the image's v2 blobs computed via:
+     *   [bottom] := v2_blob[bottom]
+     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+     * Only the name of the final blob is kept.
+     * 
+ * + * string v2_name = 3; + * @param value The bytes for v2Name to set. + * @return This builder for chaining. + */ + public Builder setV2NameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + v2Name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Fingerprint) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Fingerprint) + private static final io.grafeas.v1.Fingerprint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Fingerprint(); + } + + public static io.grafeas.v1.Fingerprint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Fingerprint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Fingerprint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java new file mode 100644 index 000000000000..ca06107712b3 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java @@ -0,0 +1,98 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +public interface FingerprintOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Fingerprint) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The layer ID of the final layer in the Docker image's v1
+   * representation.
+   * 
+ * + * string v1_name = 1; + * @return The v1Name. + */ + java.lang.String getV1Name(); + /** + *
+   * Required. The layer ID of the final layer in the Docker image's v1
+   * representation.
+   * 
+ * + * string v1_name = 1; + * @return The bytes for v1Name. + */ + com.google.protobuf.ByteString + getV1NameBytes(); + + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @return A list containing the v2Blob. + */ + java.util.List + getV2BlobList(); + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @return The count of v2Blob. + */ + int getV2BlobCount(); + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @param index The index of the element to return. + * @return The v2Blob at the given index. + */ + java.lang.String getV2Blob(int index); + /** + *
+   * Required. The ordered list of v2 blobs that represent a given image.
+   * 
+ * + * repeated string v2_blob = 2; + * @param index The index of the value to return. + * @return The bytes of the v2Blob at the given index. + */ + com.google.protobuf.ByteString + getV2BlobBytes(int index); + + /** + *
+   * Output only. The name of the image's v2 blobs computed via:
+   *   [bottom] := v2_blob[bottom]
+   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+   * Only the name of the final blob is kept.
+   * 
+ * + * string v2_name = 3; + * @return The v2Name. + */ + java.lang.String getV2Name(); + /** + *
+   * Output only. The name of the image's v2 blobs computed via:
+   *   [bottom] := v2_blob[bottom]
+   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+   * Only the name of the final blob is kept.
+   * 
+ * + * string v2_name = 3; + * @return The bytes for v2Name. + */ + com.google.protobuf.ByteString + getV2NameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java new file mode 100644 index 000000000000..5e61686f515f --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java @@ -0,0 +1,1297 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * A SourceContext referring to a Gerrit project.
+ * 
+ * + * Protobuf type {@code grafeas.v1.GerritSourceContext} + */ +public final class GerritSourceContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.GerritSourceContext) + GerritSourceContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use GerritSourceContext.newBuilder() to construct. + private GerritSourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GerritSourceContext() { + hostUri_ = ""; + gerritProject_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GerritSourceContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GerritSourceContext.class, io.grafeas.v1.GerritSourceContext.Builder.class); + } + + private int revisionCase_ = 0; + private java.lang.Object revision_; + public enum RevisionCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REVISION_ID(3), + ALIAS_CONTEXT(4), + REVISION_NOT_SET(0); + private final int value; + private RevisionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RevisionCase valueOf(int value) { + return forNumber(value); + } + + public static RevisionCase forNumber(int value) { + switch (value) { + case 3: return REVISION_ID; + case 4: return ALIAS_CONTEXT; + case 0: return REVISION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public RevisionCase + getRevisionCase() { + return RevisionCase.forNumber( + revisionCase_); + } + + public static final int HOST_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object hostUri_ = ""; + /** + *
+   * The URI of a running Gerrit instance.
+   * 
+ * + * string host_uri = 1; + * @return The hostUri. + */ + @java.lang.Override + public java.lang.String getHostUri() { + java.lang.Object ref = hostUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hostUri_ = s; + return s; + } + } + /** + *
+   * The URI of a running Gerrit instance.
+   * 
+ * + * string host_uri = 1; + * @return The bytes for hostUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHostUriBytes() { + java.lang.Object ref = hostUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hostUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GERRIT_PROJECT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object gerritProject_ = ""; + /** + *
+   * The full project name within the host. Projects may be nested, so
+   * "project/subproject" is a valid project name. The "repo name" is the
+   * hostURI/project.
+   * 
+ * + * string gerrit_project = 2; + * @return The gerritProject. + */ + @java.lang.Override + public java.lang.String getGerritProject() { + java.lang.Object ref = gerritProject_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gerritProject_ = s; + return s; + } + } + /** + *
+   * The full project name within the host. Projects may be nested, so
+   * "project/subproject" is a valid project name. The "repo name" is the
+   * hostURI/project.
+   * 
+ * + * string gerrit_project = 2; + * @return The bytes for gerritProject. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGerritProjectBytes() { + java.lang.Object ref = gerritProject_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gerritProject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_ID_FIELD_NUMBER = 3; + /** + *
+   * A revision (commit) ID.
+   * 
+ * + * string revision_id = 3; + * @return Whether the revisionId field is set. + */ + public boolean hasRevisionId() { + return revisionCase_ == 3; + } + /** + *
+   * A revision (commit) ID.
+   * 
+ * + * string revision_id = 3; + * @return The revisionId. + */ + public java.lang.String getRevisionId() { + java.lang.Object ref = ""; + if (revisionCase_ == 3) { + ref = revision_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (revisionCase_ == 3) { + revision_ = s; + } + return s; + } + } + /** + *
+   * A revision (commit) ID.
+   * 
+ * + * string revision_id = 3; + * @return The bytes for revisionId. + */ + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = ""; + if (revisionCase_ == 3) { + ref = revision_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (revisionCase_ == 3) { + revision_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALIAS_CONTEXT_FIELD_NUMBER = 4; + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + * @return Whether the aliasContext field is set. + */ + @java.lang.Override + public boolean hasAliasContext() { + return revisionCase_ == 4; + } + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + * @return The aliasContext. + */ + @java.lang.Override + public io.grafeas.v1.AliasContext getAliasContext() { + if (revisionCase_ == 4) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + @java.lang.Override + public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { + if (revisionCase_ == 4) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hostUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gerritProject_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gerritProject_); + } + if (revisionCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, revision_); + } + if (revisionCase_ == 4) { + output.writeMessage(4, (io.grafeas.v1.AliasContext) revision_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hostUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gerritProject_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gerritProject_); + } + if (revisionCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, revision_); + } + if (revisionCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (io.grafeas.v1.AliasContext) revision_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.GerritSourceContext)) { + return super.equals(obj); + } + io.grafeas.v1.GerritSourceContext other = (io.grafeas.v1.GerritSourceContext) obj; + + if (!getHostUri() + .equals(other.getHostUri())) return false; + if (!getGerritProject() + .equals(other.getGerritProject())) return false; + if (!getRevisionCase().equals(other.getRevisionCase())) return false; + switch (revisionCase_) { + case 3: + if (!getRevisionId() + .equals(other.getRevisionId())) return false; + break; + case 4: + if (!getAliasContext() + .equals(other.getAliasContext())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HOST_URI_FIELD_NUMBER; + hash = (53 * hash) + getHostUri().hashCode(); + hash = (37 * hash) + GERRIT_PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getGerritProject().hashCode(); + switch (revisionCase_) { + case 3: + hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRevisionId().hashCode(); + break; + case 4: + hash = (37 * hash) + ALIAS_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getAliasContext().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.GerritSourceContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GerritSourceContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GerritSourceContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GerritSourceContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GerritSourceContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GerritSourceContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GerritSourceContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GerritSourceContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GerritSourceContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.GerritSourceContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GerritSourceContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GerritSourceContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.GerritSourceContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A SourceContext referring to a Gerrit project.
+   * 
+ * + * Protobuf type {@code grafeas.v1.GerritSourceContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.GerritSourceContext) + io.grafeas.v1.GerritSourceContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GerritSourceContext.class, io.grafeas.v1.GerritSourceContext.Builder.class); + } + + // Construct using io.grafeas.v1.GerritSourceContext.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + hostUri_ = ""; + gerritProject_ = ""; + if (aliasContextBuilder_ != null) { + aliasContextBuilder_.clear(); + } + revisionCase_ = 0; + revision_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.GerritSourceContext getDefaultInstanceForType() { + return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.GerritSourceContext build() { + io.grafeas.v1.GerritSourceContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.GerritSourceContext buildPartial() { + io.grafeas.v1.GerritSourceContext result = new io.grafeas.v1.GerritSourceContext(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.GerritSourceContext result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.hostUri_ = hostUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.gerritProject_ = gerritProject_; + } + } + + private void buildPartialOneofs(io.grafeas.v1.GerritSourceContext result) { + result.revisionCase_ = revisionCase_; + result.revision_ = this.revision_; + if (revisionCase_ == 4 && + aliasContextBuilder_ != null) { + result.revision_ = aliasContextBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.GerritSourceContext) { + return mergeFrom((io.grafeas.v1.GerritSourceContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.GerritSourceContext other) { + if (other == io.grafeas.v1.GerritSourceContext.getDefaultInstance()) return this; + if (!other.getHostUri().isEmpty()) { + hostUri_ = other.hostUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getGerritProject().isEmpty()) { + gerritProject_ = other.gerritProject_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getRevisionCase()) { + case REVISION_ID: { + revisionCase_ = 3; + revision_ = other.revision_; + onChanged(); + break; + } + case ALIAS_CONTEXT: { + mergeAliasContext(other.getAliasContext()); + break; + } + case REVISION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + hostUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + gerritProject_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + revisionCase_ = 3; + revision_ = s; + break; + } // case 26 + case 34: { + input.readMessage( + getAliasContextFieldBuilder().getBuilder(), + extensionRegistry); + revisionCase_ = 4; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int revisionCase_ = 0; + private java.lang.Object revision_; + public RevisionCase + getRevisionCase() { + return RevisionCase.forNumber( + revisionCase_); + } + + public Builder clearRevision() { + revisionCase_ = 0; + revision_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object hostUri_ = ""; + /** + *
+     * The URI of a running Gerrit instance.
+     * 
+ * + * string host_uri = 1; + * @return The hostUri. + */ + public java.lang.String getHostUri() { + java.lang.Object ref = hostUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hostUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URI of a running Gerrit instance.
+     * 
+ * + * string host_uri = 1; + * @return The bytes for hostUri. + */ + public com.google.protobuf.ByteString + getHostUriBytes() { + java.lang.Object ref = hostUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hostUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URI of a running Gerrit instance.
+     * 
+ * + * string host_uri = 1; + * @param value The hostUri to set. + * @return This builder for chaining. + */ + public Builder setHostUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + hostUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The URI of a running Gerrit instance.
+     * 
+ * + * string host_uri = 1; + * @return This builder for chaining. + */ + public Builder clearHostUri() { + hostUri_ = getDefaultInstance().getHostUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The URI of a running Gerrit instance.
+     * 
+ * + * string host_uri = 1; + * @param value The bytes for hostUri to set. + * @return This builder for chaining. + */ + public Builder setHostUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + hostUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object gerritProject_ = ""; + /** + *
+     * The full project name within the host. Projects may be nested, so
+     * "project/subproject" is a valid project name. The "repo name" is the
+     * hostURI/project.
+     * 
+ * + * string gerrit_project = 2; + * @return The gerritProject. + */ + public java.lang.String getGerritProject() { + java.lang.Object ref = gerritProject_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gerritProject_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full project name within the host. Projects may be nested, so
+     * "project/subproject" is a valid project name. The "repo name" is the
+     * hostURI/project.
+     * 
+ * + * string gerrit_project = 2; + * @return The bytes for gerritProject. + */ + public com.google.protobuf.ByteString + getGerritProjectBytes() { + java.lang.Object ref = gerritProject_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gerritProject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full project name within the host. Projects may be nested, so
+     * "project/subproject" is a valid project name. The "repo name" is the
+     * hostURI/project.
+     * 
+ * + * string gerrit_project = 2; + * @param value The gerritProject to set. + * @return This builder for chaining. + */ + public Builder setGerritProject( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + gerritProject_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The full project name within the host. Projects may be nested, so
+     * "project/subproject" is a valid project name. The "repo name" is the
+     * hostURI/project.
+     * 
+ * + * string gerrit_project = 2; + * @return This builder for chaining. + */ + public Builder clearGerritProject() { + gerritProject_ = getDefaultInstance().getGerritProject(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The full project name within the host. Projects may be nested, so
+     * "project/subproject" is a valid project name. The "repo name" is the
+     * hostURI/project.
+     * 
+ * + * string gerrit_project = 2; + * @param value The bytes for gerritProject to set. + * @return This builder for chaining. + */ + public Builder setGerritProjectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + gerritProject_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + *
+     * A revision (commit) ID.
+     * 
+ * + * string revision_id = 3; + * @return Whether the revisionId field is set. + */ + @java.lang.Override + public boolean hasRevisionId() { + return revisionCase_ == 3; + } + /** + *
+     * A revision (commit) ID.
+     * 
+ * + * string revision_id = 3; + * @return The revisionId. + */ + @java.lang.Override + public java.lang.String getRevisionId() { + java.lang.Object ref = ""; + if (revisionCase_ == 3) { + ref = revision_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (revisionCase_ == 3) { + revision_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A revision (commit) ID.
+     * 
+ * + * string revision_id = 3; + * @return The bytes for revisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = ""; + if (revisionCase_ == 3) { + ref = revision_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (revisionCase_ == 3) { + revision_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A revision (commit) ID.
+     * 
+ * + * string revision_id = 3; + * @param value The revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + revisionCase_ = 3; + revision_ = value; + onChanged(); + return this; + } + /** + *
+     * A revision (commit) ID.
+     * 
+ * + * string revision_id = 3; + * @return This builder for chaining. + */ + public Builder clearRevisionId() { + if (revisionCase_ == 3) { + revisionCase_ = 0; + revision_ = null; + onChanged(); + } + return this; + } + /** + *
+     * A revision (commit) ID.
+     * 
+ * + * string revision_id = 3; + * @param value The bytes for revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + revisionCase_ = 3; + revision_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> aliasContextBuilder_; + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + * @return Whether the aliasContext field is set. + */ + @java.lang.Override + public boolean hasAliasContext() { + return revisionCase_ == 4; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + * @return The aliasContext. + */ + @java.lang.Override + public io.grafeas.v1.AliasContext getAliasContext() { + if (aliasContextBuilder_ == null) { + if (revisionCase_ == 4) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } else { + if (revisionCase_ == 4) { + return aliasContextBuilder_.getMessage(); + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + public Builder setAliasContext(io.grafeas.v1.AliasContext value) { + if (aliasContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + revision_ = value; + onChanged(); + } else { + aliasContextBuilder_.setMessage(value); + } + revisionCase_ = 4; + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + public Builder setAliasContext( + io.grafeas.v1.AliasContext.Builder builderForValue) { + if (aliasContextBuilder_ == null) { + revision_ = builderForValue.build(); + onChanged(); + } else { + aliasContextBuilder_.setMessage(builderForValue.build()); + } + revisionCase_ = 4; + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + public Builder mergeAliasContext(io.grafeas.v1.AliasContext value) { + if (aliasContextBuilder_ == null) { + if (revisionCase_ == 4 && + revision_ != io.grafeas.v1.AliasContext.getDefaultInstance()) { + revision_ = io.grafeas.v1.AliasContext.newBuilder((io.grafeas.v1.AliasContext) revision_) + .mergeFrom(value).buildPartial(); + } else { + revision_ = value; + } + onChanged(); + } else { + if (revisionCase_ == 4) { + aliasContextBuilder_.mergeFrom(value); + } else { + aliasContextBuilder_.setMessage(value); + } + } + revisionCase_ = 4; + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + public Builder clearAliasContext() { + if (aliasContextBuilder_ == null) { + if (revisionCase_ == 4) { + revisionCase_ = 0; + revision_ = null; + onChanged(); + } + } else { + if (revisionCase_ == 4) { + revisionCase_ = 0; + revision_ = null; + } + aliasContextBuilder_.clear(); + } + return this; + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + public io.grafeas.v1.AliasContext.Builder getAliasContextBuilder() { + return getAliasContextFieldBuilder().getBuilder(); + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + @java.lang.Override + public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { + if ((revisionCase_ == 4) && (aliasContextBuilder_ != null)) { + return aliasContextBuilder_.getMessageOrBuilder(); + } else { + if (revisionCase_ == 4) { + return (io.grafeas.v1.AliasContext) revision_; + } + return io.grafeas.v1.AliasContext.getDefaultInstance(); + } + } + /** + *
+     * An alias, which may be a branch or tag.
+     * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> + getAliasContextFieldBuilder() { + if (aliasContextBuilder_ == null) { + if (!(revisionCase_ == 4)) { + revision_ = io.grafeas.v1.AliasContext.getDefaultInstance(); + } + aliasContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder>( + (io.grafeas.v1.AliasContext) revision_, + getParentForChildren(), + isClean()); + revision_ = null; + } + revisionCase_ = 4; + onChanged(); + return aliasContextBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.GerritSourceContext) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.GerritSourceContext) + private static final io.grafeas.v1.GerritSourceContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.GerritSourceContext(); + } + + public static io.grafeas.v1.GerritSourceContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GerritSourceContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.GerritSourceContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java new file mode 100644 index 000000000000..c0221c8a2abd --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java @@ -0,0 +1,111 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface GerritSourceContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.GerritSourceContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The URI of a running Gerrit instance.
+   * 
+ * + * string host_uri = 1; + * @return The hostUri. + */ + java.lang.String getHostUri(); + /** + *
+   * The URI of a running Gerrit instance.
+   * 
+ * + * string host_uri = 1; + * @return The bytes for hostUri. + */ + com.google.protobuf.ByteString + getHostUriBytes(); + + /** + *
+   * The full project name within the host. Projects may be nested, so
+   * "project/subproject" is a valid project name. The "repo name" is the
+   * hostURI/project.
+   * 
+ * + * string gerrit_project = 2; + * @return The gerritProject. + */ + java.lang.String getGerritProject(); + /** + *
+   * The full project name within the host. Projects may be nested, so
+   * "project/subproject" is a valid project name. The "repo name" is the
+   * hostURI/project.
+   * 
+ * + * string gerrit_project = 2; + * @return The bytes for gerritProject. + */ + com.google.protobuf.ByteString + getGerritProjectBytes(); + + /** + *
+   * A revision (commit) ID.
+   * 
+ * + * string revision_id = 3; + * @return Whether the revisionId field is set. + */ + boolean hasRevisionId(); + /** + *
+   * A revision (commit) ID.
+   * 
+ * + * string revision_id = 3; + * @return The revisionId. + */ + java.lang.String getRevisionId(); + /** + *
+   * A revision (commit) ID.
+   * 
+ * + * string revision_id = 3; + * @return The bytes for revisionId. + */ + com.google.protobuf.ByteString + getRevisionIdBytes(); + + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + * @return Whether the aliasContext field is set. + */ + boolean hasAliasContext(); + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + * @return The aliasContext. + */ + io.grafeas.v1.AliasContext getAliasContext(); + /** + *
+   * An alias, which may be a branch or tag.
+   * 
+ * + * .grafeas.v1.AliasContext alias_context = 4; + */ + io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder(); + + public io.grafeas.v1.GerritSourceContext.RevisionCase getRevisionCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java new file mode 100644 index 000000000000..0d89ff20cad2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java @@ -0,0 +1,587 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to get a note.
+ * 
+ * + * Protobuf type {@code grafeas.v1.GetNoteRequest} + */ +public final class GetNoteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.GetNoteRequest) + GetNoteRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetNoteRequest.newBuilder() to construct. + private GetNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetNoteRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetNoteRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GetNoteRequest.class, io.grafeas.v1.GetNoteRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.GetNoteRequest)) { + return super.equals(obj); + } + io.grafeas.v1.GetNoteRequest other = (io.grafeas.v1.GetNoteRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.GetNoteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetNoteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetNoteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetNoteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetNoteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetNoteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetNoteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetNoteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GetNoteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetNoteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GetNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.GetNoteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to get a note.
+   * 
+ * + * Protobuf type {@code grafeas.v1.GetNoteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.GetNoteRequest) + io.grafeas.v1.GetNoteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GetNoteRequest.class, io.grafeas.v1.GetNoteRequest.Builder.class); + } + + // Construct using io.grafeas.v1.GetNoteRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.GetNoteRequest getDefaultInstanceForType() { + return io.grafeas.v1.GetNoteRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.GetNoteRequest build() { + io.grafeas.v1.GetNoteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.GetNoteRequest buildPartial() { + io.grafeas.v1.GetNoteRequest result = new io.grafeas.v1.GetNoteRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.GetNoteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.GetNoteRequest) { + return mergeFrom((io.grafeas.v1.GetNoteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.GetNoteRequest other) { + if (other == io.grafeas.v1.GetNoteRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.GetNoteRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.GetNoteRequest) + private static final io.grafeas.v1.GetNoteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.GetNoteRequest(); + } + + public static io.grafeas.v1.GetNoteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNoteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.GetNoteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java new file mode 100644 index 000000000000..8b35e38c0447 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface GetNoteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.GetNoteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java new file mode 100644 index 000000000000..485d009b3969 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java @@ -0,0 +1,587 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to get the note to which the specified occurrence is attached.
+ * 
+ * + * Protobuf type {@code grafeas.v1.GetOccurrenceNoteRequest} + */ +public final class GetOccurrenceNoteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.GetOccurrenceNoteRequest) + GetOccurrenceNoteRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetOccurrenceNoteRequest.newBuilder() to construct. + private GetOccurrenceNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetOccurrenceNoteRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetOccurrenceNoteRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GetOccurrenceNoteRequest.class, io.grafeas.v1.GetOccurrenceNoteRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.GetOccurrenceNoteRequest)) { + return super.equals(obj); + } + io.grafeas.v1.GetOccurrenceNoteRequest other = (io.grafeas.v1.GetOccurrenceNoteRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.GetOccurrenceNoteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to get the note to which the specified occurrence is attached.
+   * 
+ * + * Protobuf type {@code grafeas.v1.GetOccurrenceNoteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.GetOccurrenceNoteRequest) + io.grafeas.v1.GetOccurrenceNoteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GetOccurrenceNoteRequest.class, io.grafeas.v1.GetOccurrenceNoteRequest.Builder.class); + } + + // Construct using io.grafeas.v1.GetOccurrenceNoteRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceNoteRequest getDefaultInstanceForType() { + return io.grafeas.v1.GetOccurrenceNoteRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceNoteRequest build() { + io.grafeas.v1.GetOccurrenceNoteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceNoteRequest buildPartial() { + io.grafeas.v1.GetOccurrenceNoteRequest result = new io.grafeas.v1.GetOccurrenceNoteRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.GetOccurrenceNoteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.GetOccurrenceNoteRequest) { + return mergeFrom((io.grafeas.v1.GetOccurrenceNoteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.GetOccurrenceNoteRequest other) { + if (other == io.grafeas.v1.GetOccurrenceNoteRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.GetOccurrenceNoteRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.GetOccurrenceNoteRequest) + private static final io.grafeas.v1.GetOccurrenceNoteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.GetOccurrenceNoteRequest(); + } + + public static io.grafeas.v1.GetOccurrenceNoteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetOccurrenceNoteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceNoteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java new file mode 100644 index 000000000000..26185bddff7d --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface GetOccurrenceNoteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.GetOccurrenceNoteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java new file mode 100644 index 000000000000..16e1cf97f986 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java @@ -0,0 +1,587 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to get an occurrence.
+ * 
+ * + * Protobuf type {@code grafeas.v1.GetOccurrenceRequest} + */ +public final class GetOccurrenceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.GetOccurrenceRequest) + GetOccurrenceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetOccurrenceRequest.newBuilder() to construct. + private GetOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetOccurrenceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetOccurrenceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GetOccurrenceRequest.class, io.grafeas.v1.GetOccurrenceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.GetOccurrenceRequest)) { + return super.equals(obj); + } + io.grafeas.v1.GetOccurrenceRequest other = (io.grafeas.v1.GetOccurrenceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetOccurrenceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GetOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.GetOccurrenceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to get an occurrence.
+   * 
+ * + * Protobuf type {@code grafeas.v1.GetOccurrenceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.GetOccurrenceRequest) + io.grafeas.v1.GetOccurrenceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GetOccurrenceRequest.class, io.grafeas.v1.GetOccurrenceRequest.Builder.class); + } + + // Construct using io.grafeas.v1.GetOccurrenceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceRequest getDefaultInstanceForType() { + return io.grafeas.v1.GetOccurrenceRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceRequest build() { + io.grafeas.v1.GetOccurrenceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceRequest buildPartial() { + io.grafeas.v1.GetOccurrenceRequest result = new io.grafeas.v1.GetOccurrenceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.GetOccurrenceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.GetOccurrenceRequest) { + return mergeFrom((io.grafeas.v1.GetOccurrenceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.GetOccurrenceRequest other) { + if (other == io.grafeas.v1.GetOccurrenceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.GetOccurrenceRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.GetOccurrenceRequest) + private static final io.grafeas.v1.GetOccurrenceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.GetOccurrenceRequest(); + } + + public static io.grafeas.v1.GetOccurrenceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetOccurrenceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.GetOccurrenceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java new file mode 100644 index 000000000000..67210e529112 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface GetOccurrenceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.GetOccurrenceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java new file mode 100644 index 000000000000..6ba7ba88015e --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java @@ -0,0 +1,746 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * A GitSourceContext denotes a particular revision in a third party Git
+ * repository (e.g., GitHub).
+ * 
+ * + * Protobuf type {@code grafeas.v1.GitSourceContext} + */ +public final class GitSourceContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.GitSourceContext) + GitSourceContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use GitSourceContext.newBuilder() to construct. + private GitSourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GitSourceContext() { + url_ = ""; + revisionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GitSourceContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GitSourceContext.class, io.grafeas.v1.GitSourceContext.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+   * Git repository URL.
+   * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+   * Git repository URL.
+   * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object revisionId_ = ""; + /** + *
+   * Git commit hash.
+   * 
+ * + * string revision_id = 2; + * @return The revisionId. + */ + @java.lang.Override + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revisionId_ = s; + return s; + } + } + /** + *
+   * Git commit hash.
+   * 
+ * + * string revision_id = 2; + * @return The bytes for revisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, revisionId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, revisionId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.GitSourceContext)) { + return super.equals(obj); + } + io.grafeas.v1.GitSourceContext other = (io.grafeas.v1.GitSourceContext) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getRevisionId() + .equals(other.getRevisionId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRevisionId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.GitSourceContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GitSourceContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GitSourceContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GitSourceContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GitSourceContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.GitSourceContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.GitSourceContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GitSourceContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GitSourceContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.GitSourceContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.GitSourceContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.GitSourceContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.GitSourceContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A GitSourceContext denotes a particular revision in a third party Git
+   * repository (e.g., GitHub).
+   * 
+ * + * Protobuf type {@code grafeas.v1.GitSourceContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.GitSourceContext) + io.grafeas.v1.GitSourceContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.GitSourceContext.class, io.grafeas.v1.GitSourceContext.Builder.class); + } + + // Construct using io.grafeas.v1.GitSourceContext.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + url_ = ""; + revisionId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.GitSourceContext getDefaultInstanceForType() { + return io.grafeas.v1.GitSourceContext.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.GitSourceContext build() { + io.grafeas.v1.GitSourceContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.GitSourceContext buildPartial() { + io.grafeas.v1.GitSourceContext result = new io.grafeas.v1.GitSourceContext(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.GitSourceContext result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.revisionId_ = revisionId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.GitSourceContext) { + return mergeFrom((io.grafeas.v1.GitSourceContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.GitSourceContext other) { + if (other == io.grafeas.v1.GitSourceContext.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRevisionId().isEmpty()) { + revisionId_ = other.revisionId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + revisionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object url_ = ""; + /** + *
+     * Git repository URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Git repository URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Git repository URL.
+     * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Git repository URL.
+     * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Git repository URL.
+     * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object revisionId_ = ""; + /** + *
+     * Git commit hash.
+     * 
+ * + * string revision_id = 2; + * @return The revisionId. + */ + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revisionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Git commit hash.
+     * 
+ * + * string revision_id = 2; + * @return The bytes for revisionId. + */ + public com.google.protobuf.ByteString + getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Git commit hash.
+     * 
+ * + * string revision_id = 2; + * @param value The revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + revisionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Git commit hash.
+     * 
+ * + * string revision_id = 2; + * @return This builder for chaining. + */ + public Builder clearRevisionId() { + revisionId_ = getDefaultInstance().getRevisionId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Git commit hash.
+     * 
+ * + * string revision_id = 2; + * @param value The bytes for revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + revisionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.GitSourceContext) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.GitSourceContext) + private static final io.grafeas.v1.GitSourceContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.GitSourceContext(); + } + + public static io.grafeas.v1.GitSourceContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GitSourceContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.GitSourceContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java new file mode 100644 index 000000000000..22f81fc4db36 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface GitSourceContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.GitSourceContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Git repository URL.
+   * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+   * Git repository URL.
+   * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+   * Git commit hash.
+   * 
+ * + * string revision_id = 2; + * @return The revisionId. + */ + java.lang.String getRevisionId(); + /** + *
+   * Git commit hash.
+   * 
+ * + * string revision_id = 2; + * @return The bytes for revisionId. + */ + com.google.protobuf.ByteString + getRevisionIdBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java new file mode 100644 index 000000000000..332ac72426e8 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java @@ -0,0 +1,2264 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import io.grafeas.v1.stub.GrafeasStub; +import io.grafeas.v1.stub.GrafeasStubSettings; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: [Grafeas](https://grafeas.io) API. + * + *

Retrieves analysis results of Cloud components such as Docker container images. + * + *

Analysis results are stored as a series of occurrences. An `Occurrence` contains information + * about a specific analysis instance on a resource. An occurrence refers to a `Note`. A note + * contains details describing the analysis and is generally stored in a separate project, called a + * `Provider`. Multiple occurrences can refer to the same note. + * + *

For example, an SSL vulnerability could affect multiple images. In this case, there would be + * one note for the vulnerability and an occurrence for each image with the vulnerability referring + * to that note. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+ *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
+ *   Occurrence response = grafeasClient.getOccurrence(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the GrafeasClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of GrafeasSettings to create(). + * For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * GrafeasSettings grafeasSettings =
+ *     GrafeasSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * GrafeasClient grafeasClient = GrafeasClient.create(grafeasSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * GrafeasSettings grafeasSettings = GrafeasSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * GrafeasClient grafeasClient = GrafeasClient.create(grafeasSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class GrafeasClient implements BackgroundResource { + private final GrafeasSettings settings; + private final GrafeasStub stub; + + /** Constructs an instance of GrafeasClient with default settings. */ + public static final GrafeasClient create() throws IOException { + return create(GrafeasSettings.newBuilder().build()); + } + + /** + * Constructs an instance of GrafeasClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final GrafeasClient create(GrafeasSettings settings) throws IOException { + return new GrafeasClient(settings); + } + + /** + * Constructs an instance of GrafeasClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(GrafeasSettings). + */ + public static final GrafeasClient create(GrafeasStub stub) { + return new GrafeasClient(stub); + } + + /** + * Constructs an instance of GrafeasClient, using the given settings. This is protected so that it + * is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrafeasClient(GrafeasSettings settings) throws IOException { + this.settings = settings; + this.stub = ((GrafeasStubSettings) settings.getStubSettings()).createStub(); + } + + protected GrafeasClient(GrafeasStub stub) { + this.settings = null; + this.stub = stub; + } + + public final GrafeasSettings getSettings() { + return settings; + } + + public GrafeasStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
+   *   Occurrence response = grafeasClient.getOccurrence(name);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence getOccurrence(OccurrenceName name) { + GetOccurrenceRequest request = + GetOccurrenceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
+   *   Occurrence response = grafeasClient.getOccurrence(name);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence getOccurrence(String name) { + GetOccurrenceRequest request = GetOccurrenceRequest.newBuilder().setName(name).build(); + return getOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   GetOccurrenceRequest request =
+   *       GetOccurrenceRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .build();
+   *   Occurrence response = grafeasClient.getOccurrence(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence getOccurrence(GetOccurrenceRequest request) { + return getOccurrenceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   GetOccurrenceRequest request =
+   *       GetOccurrenceRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .build();
+   *   ApiFuture future = grafeasClient.getOccurrenceCallable().futureCall(request);
+   *   // Do something.
+   *   Occurrence response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getOccurrenceCallable() { + return stub.getOccurrenceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String filter = "filter-1274492040";
+   *   for (Occurrence element : grafeasClient.listOccurrences(parent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent The name of the project to list occurrences for in the form of + * `projects/[PROJECT_ID]`. + * @param filter The filter expression. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOccurrencesPagedResponse listOccurrences(ProjectName parent, String filter) { + ListOccurrencesRequest request = + ListOccurrencesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFilter(filter) + .build(); + return listOccurrences(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   String filter = "filter-1274492040";
+   *   for (Occurrence element : grafeasClient.listOccurrences(parent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent The name of the project to list occurrences for in the form of + * `projects/[PROJECT_ID]`. + * @param filter The filter expression. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOccurrencesPagedResponse listOccurrences(String parent, String filter) { + ListOccurrencesRequest request = + ListOccurrencesRequest.newBuilder().setParent(parent).setFilter(filter).build(); + return listOccurrences(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListOccurrencesRequest request =
+   *       ListOccurrencesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Occurrence element : grafeasClient.listOccurrences(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOccurrencesPagedResponse listOccurrences(ListOccurrencesRequest request) { + return listOccurrencesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListOccurrencesRequest request =
+   *       ListOccurrencesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       grafeasClient.listOccurrencesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Occurrence element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listOccurrencesPagedCallable() { + return stub.listOccurrencesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListOccurrencesRequest request =
+   *       ListOccurrencesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListOccurrencesResponse response = grafeasClient.listOccurrencesCallable().call(request);
+   *     for (Occurrence element : response.getOccurrencesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listOccurrencesCallable() { + return stub.listOccurrencesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified occurrence. For example, use this method to delete an occurrence when the + * occurrence is no longer applicable for the given resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
+   *   grafeasClient.deleteOccurrence(name);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteOccurrence(OccurrenceName name) { + DeleteOccurrenceRequest request = + DeleteOccurrenceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified occurrence. For example, use this method to delete an occurrence when the + * occurrence is no longer applicable for the given resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
+   *   grafeasClient.deleteOccurrence(name);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteOccurrence(String name) { + DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder().setName(name).build(); + deleteOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified occurrence. For example, use this method to delete an occurrence when the + * occurrence is no longer applicable for the given resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   DeleteOccurrenceRequest request =
+   *       DeleteOccurrenceRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .build();
+   *   grafeasClient.deleteOccurrence(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteOccurrence(DeleteOccurrenceRequest request) { + deleteOccurrenceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified occurrence. For example, use this method to delete an occurrence when the + * occurrence is no longer applicable for the given resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   DeleteOccurrenceRequest request =
+   *       DeleteOccurrenceRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .build();
+   *   ApiFuture future = grafeasClient.deleteOccurrenceCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteOccurrenceCallable() { + return stub.deleteOccurrenceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   Occurrence occurrence = Occurrence.newBuilder().build();
+   *   Occurrence response = grafeasClient.createOccurrence(parent, occurrence);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * occurrence is to be created. + * @param occurrence The occurrence to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence createOccurrence(ProjectName parent, Occurrence occurrence) { + CreateOccurrenceRequest request = + CreateOccurrenceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setOccurrence(occurrence) + .build(); + return createOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   Occurrence occurrence = Occurrence.newBuilder().build();
+   *   Occurrence response = grafeasClient.createOccurrence(parent, occurrence);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * occurrence is to be created. + * @param occurrence The occurrence to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence createOccurrence(String parent, Occurrence occurrence) { + CreateOccurrenceRequest request = + CreateOccurrenceRequest.newBuilder().setParent(parent).setOccurrence(occurrence).build(); + return createOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   CreateOccurrenceRequest request =
+   *       CreateOccurrenceRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setOccurrence(Occurrence.newBuilder().build())
+   *           .build();
+   *   Occurrence response = grafeasClient.createOccurrence(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence createOccurrence(CreateOccurrenceRequest request) { + return createOccurrenceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   CreateOccurrenceRequest request =
+   *       CreateOccurrenceRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setOccurrence(Occurrence.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = grafeasClient.createOccurrenceCallable().futureCall(request);
+   *   // Do something.
+   *   Occurrence response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createOccurrenceCallable() { + return stub.createOccurrenceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new occurrences in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   List occurrences = new ArrayList<>();
+   *   BatchCreateOccurrencesResponse response =
+   *       grafeasClient.batchCreateOccurrences(parent, occurrences);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * occurrences are to be created. + * @param occurrences The occurrences to create. Max allowed length is 1000. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateOccurrencesResponse batchCreateOccurrences( + ProjectName parent, List occurrences) { + BatchCreateOccurrencesRequest request = + BatchCreateOccurrencesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllOccurrences(occurrences) + .build(); + return batchCreateOccurrences(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new occurrences in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   List occurrences = new ArrayList<>();
+   *   BatchCreateOccurrencesResponse response =
+   *       grafeasClient.batchCreateOccurrences(parent, occurrences);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * occurrences are to be created. + * @param occurrences The occurrences to create. Max allowed length is 1000. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateOccurrencesResponse batchCreateOccurrences( + String parent, List occurrences) { + BatchCreateOccurrencesRequest request = + BatchCreateOccurrencesRequest.newBuilder() + .setParent(parent) + .addAllOccurrences(occurrences) + .build(); + return batchCreateOccurrences(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new occurrences in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   BatchCreateOccurrencesRequest request =
+   *       BatchCreateOccurrencesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .addAllOccurrences(new ArrayList())
+   *           .build();
+   *   BatchCreateOccurrencesResponse response = grafeasClient.batchCreateOccurrences(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateOccurrencesResponse batchCreateOccurrences( + BatchCreateOccurrencesRequest request) { + return batchCreateOccurrencesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new occurrences in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   BatchCreateOccurrencesRequest request =
+   *       BatchCreateOccurrencesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .addAllOccurrences(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       grafeasClient.batchCreateOccurrencesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchCreateOccurrencesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchCreateOccurrencesCallable() { + return stub.batchCreateOccurrencesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
+   *   Occurrence occurrence = Occurrence.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Occurrence response = grafeasClient.updateOccurrence(name, occurrence, updateMask);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @param occurrence The updated occurrence. + * @param updateMask The fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence updateOccurrence( + OccurrenceName name, Occurrence occurrence, FieldMask updateMask) { + UpdateOccurrenceRequest request = + UpdateOccurrenceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setOccurrence(occurrence) + .setUpdateMask(updateMask) + .build(); + return updateOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
+   *   Occurrence occurrence = Occurrence.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Occurrence response = grafeasClient.updateOccurrence(name, occurrence, updateMask);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @param occurrence The updated occurrence. + * @param updateMask The fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence updateOccurrence( + String name, Occurrence occurrence, FieldMask updateMask) { + UpdateOccurrenceRequest request = + UpdateOccurrenceRequest.newBuilder() + .setName(name) + .setOccurrence(occurrence) + .setUpdateMask(updateMask) + .build(); + return updateOccurrence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   UpdateOccurrenceRequest request =
+   *       UpdateOccurrenceRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .setOccurrence(Occurrence.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Occurrence response = grafeasClient.updateOccurrence(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Occurrence updateOccurrence(UpdateOccurrenceRequest request) { + return updateOccurrenceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified occurrence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   UpdateOccurrenceRequest request =
+   *       UpdateOccurrenceRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .setOccurrence(Occurrence.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = grafeasClient.updateOccurrenceCallable().futureCall(request);
+   *   // Do something.
+   *   Occurrence response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateOccurrenceCallable() { + return stub.updateOccurrenceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the note attached to the specified occurrence. Consumer projects can use this method to + * get a note that belongs to a provider project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
+   *   Note response = grafeasClient.getOccurrenceNote(name);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note getOccurrenceNote(OccurrenceName name) { + GetOccurrenceNoteRequest request = + GetOccurrenceNoteRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getOccurrenceNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the note attached to the specified occurrence. Consumer projects can use this method to + * get a note that belongs to a provider project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
+   *   Note response = grafeasClient.getOccurrenceNote(name);
+   * }
+   * }
+ * + * @param name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note getOccurrenceNote(String name) { + GetOccurrenceNoteRequest request = GetOccurrenceNoteRequest.newBuilder().setName(name).build(); + return getOccurrenceNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the note attached to the specified occurrence. Consumer projects can use this method to + * get a note that belongs to a provider project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   GetOccurrenceNoteRequest request =
+   *       GetOccurrenceNoteRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .build();
+   *   Note response = grafeasClient.getOccurrenceNote(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note getOccurrenceNote(GetOccurrenceNoteRequest request) { + return getOccurrenceNoteCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the note attached to the specified occurrence. Consumer projects can use this method to + * get a note that belongs to a provider project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   GetOccurrenceNoteRequest request =
+   *       GetOccurrenceNoteRequest.newBuilder()
+   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
+   *           .build();
+   *   ApiFuture future = grafeasClient.getOccurrenceNoteCallable().futureCall(request);
+   *   // Do something.
+   *   Note response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getOccurrenceNoteCallable() { + return stub.getOccurrenceNoteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
+   *   Note response = grafeasClient.getNote(name);
+   * }
+   * }
+ * + * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note getNote(NoteName name) { + GetNoteRequest request = + GetNoteRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
+   *   Note response = grafeasClient.getNote(name);
+   * }
+   * }
+ * + * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note getNote(String name) { + GetNoteRequest request = GetNoteRequest.newBuilder().setName(name).build(); + return getNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   GetNoteRequest request =
+   *       GetNoteRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .build();
+   *   Note response = grafeasClient.getNote(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note getNote(GetNoteRequest request) { + return getNoteCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   GetNoteRequest request =
+   *       GetNoteRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .build();
+   *   ApiFuture future = grafeasClient.getNoteCallable().futureCall(request);
+   *   // Do something.
+   *   Note response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getNoteCallable() { + return stub.getNoteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notes for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String filter = "filter-1274492040";
+   *   for (Note element : grafeasClient.listNotes(parent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent The name of the project to list notes for in the form of `projects/[PROJECT_ID]`. + * @param filter The filter expression. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotesPagedResponse listNotes(ProjectName parent, String filter) { + ListNotesRequest request = + ListNotesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFilter(filter) + .build(); + return listNotes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notes for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   String filter = "filter-1274492040";
+   *   for (Note element : grafeasClient.listNotes(parent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent The name of the project to list notes for in the form of `projects/[PROJECT_ID]`. + * @param filter The filter expression. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotesPagedResponse listNotes(String parent, String filter) { + ListNotesRequest request = + ListNotesRequest.newBuilder().setParent(parent).setFilter(filter).build(); + return listNotes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notes for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListNotesRequest request =
+   *       ListNotesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Note element : grafeasClient.listNotes(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotesPagedResponse listNotes(ListNotesRequest request) { + return listNotesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notes for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListNotesRequest request =
+   *       ListNotesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = grafeasClient.listNotesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Note element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listNotesPagedCallable() { + return stub.listNotesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notes for the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListNotesRequest request =
+   *       ListNotesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListNotesResponse response = grafeasClient.listNotesCallable().call(request);
+   *     for (Note element : response.getNotesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listNotesCallable() { + return stub.listNotesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
+   *   grafeasClient.deleteNote(name);
+   * }
+   * }
+ * + * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteNote(NoteName name) { + DeleteNoteRequest request = + DeleteNoteRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
+   *   grafeasClient.deleteNote(name);
+   * }
+   * }
+ * + * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteNote(String name) { + DeleteNoteRequest request = DeleteNoteRequest.newBuilder().setName(name).build(); + deleteNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   DeleteNoteRequest request =
+   *       DeleteNoteRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .build();
+   *   grafeasClient.deleteNote(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteNote(DeleteNoteRequest request) { + deleteNoteCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   DeleteNoteRequest request =
+   *       DeleteNoteRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .build();
+   *   ApiFuture future = grafeasClient.deleteNoteCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteNoteCallable() { + return stub.deleteNoteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String noteId = "noteId-1039694675";
+   *   Note note = Note.newBuilder().build();
+   *   Note response = grafeasClient.createNote(parent, noteId, note);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * note is to be created. + * @param noteId The ID to use for this note. + * @param note The note to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note createNote(ProjectName parent, String noteId, Note note) { + CreateNoteRequest request = + CreateNoteRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNoteId(noteId) + .setNote(note) + .build(); + return createNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   String noteId = "noteId-1039694675";
+   *   Note note = Note.newBuilder().build();
+   *   Note response = grafeasClient.createNote(parent, noteId, note);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * note is to be created. + * @param noteId The ID to use for this note. + * @param note The note to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note createNote(String parent, String noteId, Note note) { + CreateNoteRequest request = + CreateNoteRequest.newBuilder().setParent(parent).setNoteId(noteId).setNote(note).build(); + return createNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   CreateNoteRequest request =
+   *       CreateNoteRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setNoteId("noteId-1039694675")
+   *           .setNote(Note.newBuilder().build())
+   *           .build();
+   *   Note response = grafeasClient.createNote(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note createNote(CreateNoteRequest request) { + return createNoteCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   CreateNoteRequest request =
+   *       CreateNoteRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setNoteId("noteId-1039694675")
+   *           .setNote(Note.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = grafeasClient.createNoteCallable().futureCall(request);
+   *   // Do something.
+   *   Note response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createNoteCallable() { + return stub.createNoteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new notes in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   Map notes = new HashMap<>();
+   *   BatchCreateNotesResponse response = grafeasClient.batchCreateNotes(parent, notes);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * notes are to be created. + * @param notes The notes to create. Max allowed length is 1000. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateNotesResponse batchCreateNotes( + ProjectName parent, Map notes) { + BatchCreateNotesRequest request = + BatchCreateNotesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .putAllNotes(notes) + .build(); + return batchCreateNotes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new notes in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   Map notes = new HashMap<>();
+   *   BatchCreateNotesResponse response = grafeasClient.batchCreateNotes(parent, notes);
+   * }
+   * }
+ * + * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the + * notes are to be created. + * @param notes The notes to create. Max allowed length is 1000. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateNotesResponse batchCreateNotes(String parent, Map notes) { + BatchCreateNotesRequest request = + BatchCreateNotesRequest.newBuilder().setParent(parent).putAllNotes(notes).build(); + return batchCreateNotes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new notes in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   BatchCreateNotesRequest request =
+   *       BatchCreateNotesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .putAllNotes(new HashMap())
+   *           .build();
+   *   BatchCreateNotesResponse response = grafeasClient.batchCreateNotes(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateNotesResponse batchCreateNotes(BatchCreateNotesRequest request) { + return batchCreateNotesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new notes in batch. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   BatchCreateNotesRequest request =
+   *       BatchCreateNotesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .putAllNotes(new HashMap())
+   *           .build();
+   *   ApiFuture future =
+   *       grafeasClient.batchCreateNotesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchCreateNotesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchCreateNotesCallable() { + return stub.batchCreateNotesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
+   *   Note note = Note.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Note response = grafeasClient.updateNote(name, note, updateMask);
+   * }
+   * }
+ * + * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @param note The updated note. + * @param updateMask The fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note updateNote(NoteName name, Note note, FieldMask updateMask) { + UpdateNoteRequest request = + UpdateNoteRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setNote(note) + .setUpdateMask(updateMask) + .build(); + return updateNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
+   *   Note note = Note.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Note response = grafeasClient.updateNote(name, note, updateMask);
+   * }
+   * }
+ * + * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @param note The updated note. + * @param updateMask The fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note updateNote(String name, Note note, FieldMask updateMask) { + UpdateNoteRequest request = + UpdateNoteRequest.newBuilder() + .setName(name) + .setNote(note) + .setUpdateMask(updateMask) + .build(); + return updateNote(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   UpdateNoteRequest request =
+   *       UpdateNoteRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .setNote(Note.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Note response = grafeasClient.updateNote(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Note updateNote(UpdateNoteRequest request) { + return updateNoteCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   UpdateNoteRequest request =
+   *       UpdateNoteRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .setNote(Note.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = grafeasClient.updateNoteCallable().futureCall(request);
+   *   // Do something.
+   *   Note response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateNoteCallable() { + return stub.updateNoteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences referencing the specified note. Provider projects can use this method to get + * all occurrences across consumer projects referencing the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
+   *   String filter = "filter-1274492040";
+   *   for (Occurrence element : grafeasClient.listNoteOccurrences(name, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name The name of the note to list occurrences for in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @param filter The filter expression. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNoteOccurrencesPagedResponse listNoteOccurrences(NoteName name, String filter) { + ListNoteOccurrencesRequest request = + ListNoteOccurrencesRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setFilter(filter) + .build(); + return listNoteOccurrences(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences referencing the specified note. Provider projects can use this method to get + * all occurrences across consumer projects referencing the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
+   *   String filter = "filter-1274492040";
+   *   for (Occurrence element : grafeasClient.listNoteOccurrences(name, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name The name of the note to list occurrences for in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @param filter The filter expression. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNoteOccurrencesPagedResponse listNoteOccurrences(String name, String filter) { + ListNoteOccurrencesRequest request = + ListNoteOccurrencesRequest.newBuilder().setName(name).setFilter(filter).build(); + return listNoteOccurrences(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences referencing the specified note. Provider projects can use this method to get + * all occurrences across consumer projects referencing the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListNoteOccurrencesRequest request =
+   *       ListNoteOccurrencesRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Occurrence element : grafeasClient.listNoteOccurrences(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNoteOccurrencesPagedResponse listNoteOccurrences( + ListNoteOccurrencesRequest request) { + return listNoteOccurrencesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences referencing the specified note. Provider projects can use this method to get + * all occurrences across consumer projects referencing the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListNoteOccurrencesRequest request =
+   *       ListNoteOccurrencesRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       grafeasClient.listNoteOccurrencesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Occurrence element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNoteOccurrencesPagedCallable() { + return stub.listNoteOccurrencesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists occurrences referencing the specified note. Provider projects can use this method to get + * all occurrences across consumer projects referencing the specified note. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+   *   ListNoteOccurrencesRequest request =
+   *       ListNoteOccurrencesRequest.newBuilder()
+   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListNoteOccurrencesResponse response =
+   *         grafeasClient.listNoteOccurrencesCallable().call(request);
+   *     for (Occurrence element : response.getOccurrencesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNoteOccurrencesCallable() { + return stub.listNoteOccurrencesCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListOccurrencesPagedResponse + extends AbstractPagedListResponse< + ListOccurrencesRequest, + ListOccurrencesResponse, + Occurrence, + ListOccurrencesPage, + ListOccurrencesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListOccurrencesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListOccurrencesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListOccurrencesPagedResponse(ListOccurrencesPage page) { + super(page, ListOccurrencesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListOccurrencesPage + extends AbstractPage< + ListOccurrencesRequest, ListOccurrencesResponse, Occurrence, ListOccurrencesPage> { + + private ListOccurrencesPage( + PageContext context, + ListOccurrencesResponse response) { + super(context, response); + } + + private static ListOccurrencesPage createEmptyPage() { + return new ListOccurrencesPage(null, null); + } + + @Override + protected ListOccurrencesPage createPage( + PageContext context, + ListOccurrencesResponse response) { + return new ListOccurrencesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListOccurrencesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListOccurrencesRequest, + ListOccurrencesResponse, + Occurrence, + ListOccurrencesPage, + ListOccurrencesFixedSizeCollection> { + + private ListOccurrencesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListOccurrencesFixedSizeCollection createEmptyCollection() { + return new ListOccurrencesFixedSizeCollection(null, 0); + } + + @Override + protected ListOccurrencesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListOccurrencesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListNotesPagedResponse + extends AbstractPagedListResponse< + ListNotesRequest, ListNotesResponse, Note, ListNotesPage, ListNotesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNotesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListNotesPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListNotesPagedResponse(ListNotesPage page) { + super(page, ListNotesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNotesPage + extends AbstractPage { + + private ListNotesPage( + PageContext context, + ListNotesResponse response) { + super(context, response); + } + + private static ListNotesPage createEmptyPage() { + return new ListNotesPage(null, null); + } + + @Override + protected ListNotesPage createPage( + PageContext context, + ListNotesResponse response) { + return new ListNotesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNotesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNotesRequest, ListNotesResponse, Note, ListNotesPage, ListNotesFixedSizeCollection> { + + private ListNotesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNotesFixedSizeCollection createEmptyCollection() { + return new ListNotesFixedSizeCollection(null, 0); + } + + @Override + protected ListNotesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNotesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListNoteOccurrencesPagedResponse + extends AbstractPagedListResponse< + ListNoteOccurrencesRequest, + ListNoteOccurrencesResponse, + Occurrence, + ListNoteOccurrencesPage, + ListNoteOccurrencesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNoteOccurrencesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListNoteOccurrencesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListNoteOccurrencesPagedResponse(ListNoteOccurrencesPage page) { + super(page, ListNoteOccurrencesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNoteOccurrencesPage + extends AbstractPage< + ListNoteOccurrencesRequest, + ListNoteOccurrencesResponse, + Occurrence, + ListNoteOccurrencesPage> { + + private ListNoteOccurrencesPage( + PageContext context, + ListNoteOccurrencesResponse response) { + super(context, response); + } + + private static ListNoteOccurrencesPage createEmptyPage() { + return new ListNoteOccurrencesPage(null, null); + } + + @Override + protected ListNoteOccurrencesPage createPage( + PageContext context, + ListNoteOccurrencesResponse response) { + return new ListNoteOccurrencesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNoteOccurrencesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNoteOccurrencesRequest, + ListNoteOccurrencesResponse, + Occurrence, + ListNoteOccurrencesPage, + ListNoteOccurrencesFixedSizeCollection> { + + private ListNoteOccurrencesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNoteOccurrencesFixedSizeCollection createEmptyCollection() { + return new ListNoteOccurrencesFixedSizeCollection(null, 0); + } + + @Override + protected ListNoteOccurrencesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNoteOccurrencesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java new file mode 100644 index 000000000000..46c98bd4370b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java @@ -0,0 +1,1491 @@ +package io.grafeas.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * [Grafeas](https://grafeas.io) API.
+ * Retrieves analysis results of Cloud components such as Docker container
+ * images.
+ * Analysis results are stored as a series of occurrences. An `Occurrence`
+ * contains information about a specific analysis instance on a resource. An
+ * occurrence refers to a `Note`. A note contains details describing the
+ * analysis and is generally stored in a separate project, called a `Provider`.
+ * Multiple occurrences can refer to the same note.
+ * For example, an SSL vulnerability could affect multiple images. In this case,
+ * there would be one note for the vulnerability and an occurrence for each
+ * image with the vulnerability referring to that note.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: grafeas/v1/grafeas.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class GrafeasGrpc { + + private GrafeasGrpc() {} + + public static final String SERVICE_NAME = "grafeas.v1.Grafeas"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getGetOccurrenceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetOccurrence", + requestType = io.grafeas.v1.GetOccurrenceRequest.class, + responseType = io.grafeas.v1.Occurrence.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetOccurrenceMethod() { + io.grpc.MethodDescriptor getGetOccurrenceMethod; + if ((getGetOccurrenceMethod = GrafeasGrpc.getGetOccurrenceMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getGetOccurrenceMethod = GrafeasGrpc.getGetOccurrenceMethod) == null) { + GrafeasGrpc.getGetOccurrenceMethod = getGetOccurrenceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOccurrence")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.GetOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.Occurrence.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("GetOccurrence")) + .build(); + } + } + } + return getGetOccurrenceMethod; + } + + private static volatile io.grpc.MethodDescriptor getListOccurrencesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListOccurrences", + requestType = io.grafeas.v1.ListOccurrencesRequest.class, + responseType = io.grafeas.v1.ListOccurrencesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListOccurrencesMethod() { + io.grpc.MethodDescriptor getListOccurrencesMethod; + if ((getListOccurrencesMethod = GrafeasGrpc.getListOccurrencesMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getListOccurrencesMethod = GrafeasGrpc.getListOccurrencesMethod) == null) { + GrafeasGrpc.getListOccurrencesMethod = getListOccurrencesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListOccurrences")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.ListOccurrencesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.ListOccurrencesResponse.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("ListOccurrences")) + .build(); + } + } + } + return getListOccurrencesMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteOccurrenceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteOccurrence", + requestType = io.grafeas.v1.DeleteOccurrenceRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteOccurrenceMethod() { + io.grpc.MethodDescriptor getDeleteOccurrenceMethod; + if ((getDeleteOccurrenceMethod = GrafeasGrpc.getDeleteOccurrenceMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getDeleteOccurrenceMethod = GrafeasGrpc.getDeleteOccurrenceMethod) == null) { + GrafeasGrpc.getDeleteOccurrenceMethod = getDeleteOccurrenceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteOccurrence")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.DeleteOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("DeleteOccurrence")) + .build(); + } + } + } + return getDeleteOccurrenceMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateOccurrenceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateOccurrence", + requestType = io.grafeas.v1.CreateOccurrenceRequest.class, + responseType = io.grafeas.v1.Occurrence.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateOccurrenceMethod() { + io.grpc.MethodDescriptor getCreateOccurrenceMethod; + if ((getCreateOccurrenceMethod = GrafeasGrpc.getCreateOccurrenceMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getCreateOccurrenceMethod = GrafeasGrpc.getCreateOccurrenceMethod) == null) { + GrafeasGrpc.getCreateOccurrenceMethod = getCreateOccurrenceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateOccurrence")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.CreateOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.Occurrence.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("CreateOccurrence")) + .build(); + } + } + } + return getCreateOccurrenceMethod; + } + + private static volatile io.grpc.MethodDescriptor getBatchCreateOccurrencesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchCreateOccurrences", + requestType = io.grafeas.v1.BatchCreateOccurrencesRequest.class, + responseType = io.grafeas.v1.BatchCreateOccurrencesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBatchCreateOccurrencesMethod() { + io.grpc.MethodDescriptor getBatchCreateOccurrencesMethod; + if ((getBatchCreateOccurrencesMethod = GrafeasGrpc.getBatchCreateOccurrencesMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getBatchCreateOccurrencesMethod = GrafeasGrpc.getBatchCreateOccurrencesMethod) == null) { + GrafeasGrpc.getBatchCreateOccurrencesMethod = getBatchCreateOccurrencesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchCreateOccurrences")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.BatchCreateOccurrencesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.BatchCreateOccurrencesResponse.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("BatchCreateOccurrences")) + .build(); + } + } + } + return getBatchCreateOccurrencesMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateOccurrenceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateOccurrence", + requestType = io.grafeas.v1.UpdateOccurrenceRequest.class, + responseType = io.grafeas.v1.Occurrence.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateOccurrenceMethod() { + io.grpc.MethodDescriptor getUpdateOccurrenceMethod; + if ((getUpdateOccurrenceMethod = GrafeasGrpc.getUpdateOccurrenceMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getUpdateOccurrenceMethod = GrafeasGrpc.getUpdateOccurrenceMethod) == null) { + GrafeasGrpc.getUpdateOccurrenceMethod = getUpdateOccurrenceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateOccurrence")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.UpdateOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.Occurrence.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("UpdateOccurrence")) + .build(); + } + } + } + return getUpdateOccurrenceMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetOccurrenceNoteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetOccurrenceNote", + requestType = io.grafeas.v1.GetOccurrenceNoteRequest.class, + responseType = io.grafeas.v1.Note.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetOccurrenceNoteMethod() { + io.grpc.MethodDescriptor getGetOccurrenceNoteMethod; + if ((getGetOccurrenceNoteMethod = GrafeasGrpc.getGetOccurrenceNoteMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getGetOccurrenceNoteMethod = GrafeasGrpc.getGetOccurrenceNoteMethod) == null) { + GrafeasGrpc.getGetOccurrenceNoteMethod = getGetOccurrenceNoteMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOccurrenceNote")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.GetOccurrenceNoteRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.Note.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("GetOccurrenceNote")) + .build(); + } + } + } + return getGetOccurrenceNoteMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetNoteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNote", + requestType = io.grafeas.v1.GetNoteRequest.class, + responseType = io.grafeas.v1.Note.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetNoteMethod() { + io.grpc.MethodDescriptor getGetNoteMethod; + if ((getGetNoteMethod = GrafeasGrpc.getGetNoteMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getGetNoteMethod = GrafeasGrpc.getGetNoteMethod) == null) { + GrafeasGrpc.getGetNoteMethod = getGetNoteMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNote")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.GetNoteRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.Note.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("GetNote")) + .build(); + } + } + } + return getGetNoteMethod; + } + + private static volatile io.grpc.MethodDescriptor getListNotesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNotes", + requestType = io.grafeas.v1.ListNotesRequest.class, + responseType = io.grafeas.v1.ListNotesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListNotesMethod() { + io.grpc.MethodDescriptor getListNotesMethod; + if ((getListNotesMethod = GrafeasGrpc.getListNotesMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getListNotesMethod = GrafeasGrpc.getListNotesMethod) == null) { + GrafeasGrpc.getListNotesMethod = getListNotesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNotes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.ListNotesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.ListNotesResponse.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("ListNotes")) + .build(); + } + } + } + return getListNotesMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteNoteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteNote", + requestType = io.grafeas.v1.DeleteNoteRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteNoteMethod() { + io.grpc.MethodDescriptor getDeleteNoteMethod; + if ((getDeleteNoteMethod = GrafeasGrpc.getDeleteNoteMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getDeleteNoteMethod = GrafeasGrpc.getDeleteNoteMethod) == null) { + GrafeasGrpc.getDeleteNoteMethod = getDeleteNoteMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNote")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.DeleteNoteRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("DeleteNote")) + .build(); + } + } + } + return getDeleteNoteMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateNoteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateNote", + requestType = io.grafeas.v1.CreateNoteRequest.class, + responseType = io.grafeas.v1.Note.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateNoteMethod() { + io.grpc.MethodDescriptor getCreateNoteMethod; + if ((getCreateNoteMethod = GrafeasGrpc.getCreateNoteMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getCreateNoteMethod = GrafeasGrpc.getCreateNoteMethod) == null) { + GrafeasGrpc.getCreateNoteMethod = getCreateNoteMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNote")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.CreateNoteRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.Note.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("CreateNote")) + .build(); + } + } + } + return getCreateNoteMethod; + } + + private static volatile io.grpc.MethodDescriptor getBatchCreateNotesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchCreateNotes", + requestType = io.grafeas.v1.BatchCreateNotesRequest.class, + responseType = io.grafeas.v1.BatchCreateNotesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBatchCreateNotesMethod() { + io.grpc.MethodDescriptor getBatchCreateNotesMethod; + if ((getBatchCreateNotesMethod = GrafeasGrpc.getBatchCreateNotesMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getBatchCreateNotesMethod = GrafeasGrpc.getBatchCreateNotesMethod) == null) { + GrafeasGrpc.getBatchCreateNotesMethod = getBatchCreateNotesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchCreateNotes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.BatchCreateNotesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.BatchCreateNotesResponse.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("BatchCreateNotes")) + .build(); + } + } + } + return getBatchCreateNotesMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateNoteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateNote", + requestType = io.grafeas.v1.UpdateNoteRequest.class, + responseType = io.grafeas.v1.Note.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateNoteMethod() { + io.grpc.MethodDescriptor getUpdateNoteMethod; + if ((getUpdateNoteMethod = GrafeasGrpc.getUpdateNoteMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getUpdateNoteMethod = GrafeasGrpc.getUpdateNoteMethod) == null) { + GrafeasGrpc.getUpdateNoteMethod = getUpdateNoteMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateNote")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.UpdateNoteRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.Note.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("UpdateNote")) + .build(); + } + } + } + return getUpdateNoteMethod; + } + + private static volatile io.grpc.MethodDescriptor getListNoteOccurrencesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNoteOccurrences", + requestType = io.grafeas.v1.ListNoteOccurrencesRequest.class, + responseType = io.grafeas.v1.ListNoteOccurrencesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListNoteOccurrencesMethod() { + io.grpc.MethodDescriptor getListNoteOccurrencesMethod; + if ((getListNoteOccurrencesMethod = GrafeasGrpc.getListNoteOccurrencesMethod) == null) { + synchronized (GrafeasGrpc.class) { + if ((getListNoteOccurrencesMethod = GrafeasGrpc.getListNoteOccurrencesMethod) == null) { + GrafeasGrpc.getListNoteOccurrencesMethod = getListNoteOccurrencesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNoteOccurrences")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.ListNoteOccurrencesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grafeas.v1.ListNoteOccurrencesResponse.getDefaultInstance())) + .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("ListNoteOccurrences")) + .build(); + } + } + } + return getListNoteOccurrencesMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static GrafeasStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GrafeasStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GrafeasStub(channel, callOptions); + } + }; + return GrafeasStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static GrafeasBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GrafeasBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GrafeasBlockingStub(channel, callOptions); + } + }; + return GrafeasBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static GrafeasFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GrafeasFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GrafeasFutureStub(channel, callOptions); + } + }; + return GrafeasFutureStub.newStub(factory, channel); + } + + /** + *
+   * [Grafeas](https://grafeas.io) API.
+   * Retrieves analysis results of Cloud components such as Docker container
+   * images.
+   * Analysis results are stored as a series of occurrences. An `Occurrence`
+   * contains information about a specific analysis instance on a resource. An
+   * occurrence refers to a `Note`. A note contains details describing the
+   * analysis and is generally stored in a separate project, called a `Provider`.
+   * Multiple occurrences can refer to the same note.
+   * For example, an SSL vulnerability could affect multiple images. In this case,
+   * there would be one note for the vulnerability and an occurrence for each
+   * image with the vulnerability referring to that note.
+   * 
+ */ + public static abstract class GrafeasImplBase implements io.grpc.BindableService { + + /** + *
+     * Gets the specified occurrence.
+     * 
+ */ + public void getOccurrence(io.grafeas.v1.GetOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOccurrenceMethod(), responseObserver); + } + + /** + *
+     * Lists occurrences for the specified project.
+     * 
+ */ + public void listOccurrences(io.grafeas.v1.ListOccurrencesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListOccurrencesMethod(), responseObserver); + } + + /** + *
+     * Deletes the specified occurrence. For example, use this method to delete an
+     * occurrence when the occurrence is no longer applicable for the given
+     * resource.
+     * 
+ */ + public void deleteOccurrence(io.grafeas.v1.DeleteOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteOccurrenceMethod(), responseObserver); + } + + /** + *
+     * Creates a new occurrence.
+     * 
+ */ + public void createOccurrence(io.grafeas.v1.CreateOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateOccurrenceMethod(), responseObserver); + } + + /** + *
+     * Creates new occurrences in batch.
+     * 
+ */ + public void batchCreateOccurrences(io.grafeas.v1.BatchCreateOccurrencesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchCreateOccurrencesMethod(), responseObserver); + } + + /** + *
+     * Updates the specified occurrence.
+     * 
+ */ + public void updateOccurrence(io.grafeas.v1.UpdateOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateOccurrenceMethod(), responseObserver); + } + + /** + *
+     * Gets the note attached to the specified occurrence. Consumer projects can
+     * use this method to get a note that belongs to a provider project.
+     * 
+ */ + public void getOccurrenceNote(io.grafeas.v1.GetOccurrenceNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOccurrenceNoteMethod(), responseObserver); + } + + /** + *
+     * Gets the specified note.
+     * 
+ */ + public void getNote(io.grafeas.v1.GetNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNoteMethod(), responseObserver); + } + + /** + *
+     * Lists notes for the specified project.
+     * 
+ */ + public void listNotes(io.grafeas.v1.ListNotesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNotesMethod(), responseObserver); + } + + /** + *
+     * Deletes the specified note.
+     * 
+ */ + public void deleteNote(io.grafeas.v1.DeleteNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNoteMethod(), responseObserver); + } + + /** + *
+     * Creates a new note.
+     * 
+ */ + public void createNote(io.grafeas.v1.CreateNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNoteMethod(), responseObserver); + } + + /** + *
+     * Creates new notes in batch.
+     * 
+ */ + public void batchCreateNotes(io.grafeas.v1.BatchCreateNotesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchCreateNotesMethod(), responseObserver); + } + + /** + *
+     * Updates the specified note.
+     * 
+ */ + public void updateNote(io.grafeas.v1.UpdateNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateNoteMethod(), responseObserver); + } + + /** + *
+     * Lists occurrences referencing the specified note. Provider projects can use
+     * this method to get all occurrences across consumer projects referencing the
+     * specified note.
+     * 
+ */ + public void listNoteOccurrences(io.grafeas.v1.ListNoteOccurrencesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNoteOccurrencesMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetOccurrenceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.GetOccurrenceRequest, + io.grafeas.v1.Occurrence>( + this, METHODID_GET_OCCURRENCE))) + .addMethod( + getListOccurrencesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.ListOccurrencesRequest, + io.grafeas.v1.ListOccurrencesResponse>( + this, METHODID_LIST_OCCURRENCES))) + .addMethod( + getDeleteOccurrenceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.DeleteOccurrenceRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_OCCURRENCE))) + .addMethod( + getCreateOccurrenceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.CreateOccurrenceRequest, + io.grafeas.v1.Occurrence>( + this, METHODID_CREATE_OCCURRENCE))) + .addMethod( + getBatchCreateOccurrencesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.BatchCreateOccurrencesRequest, + io.grafeas.v1.BatchCreateOccurrencesResponse>( + this, METHODID_BATCH_CREATE_OCCURRENCES))) + .addMethod( + getUpdateOccurrenceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.UpdateOccurrenceRequest, + io.grafeas.v1.Occurrence>( + this, METHODID_UPDATE_OCCURRENCE))) + .addMethod( + getGetOccurrenceNoteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.GetOccurrenceNoteRequest, + io.grafeas.v1.Note>( + this, METHODID_GET_OCCURRENCE_NOTE))) + .addMethod( + getGetNoteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.GetNoteRequest, + io.grafeas.v1.Note>( + this, METHODID_GET_NOTE))) + .addMethod( + getListNotesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.ListNotesRequest, + io.grafeas.v1.ListNotesResponse>( + this, METHODID_LIST_NOTES))) + .addMethod( + getDeleteNoteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.DeleteNoteRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_NOTE))) + .addMethod( + getCreateNoteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.CreateNoteRequest, + io.grafeas.v1.Note>( + this, METHODID_CREATE_NOTE))) + .addMethod( + getBatchCreateNotesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.BatchCreateNotesRequest, + io.grafeas.v1.BatchCreateNotesResponse>( + this, METHODID_BATCH_CREATE_NOTES))) + .addMethod( + getUpdateNoteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.UpdateNoteRequest, + io.grafeas.v1.Note>( + this, METHODID_UPDATE_NOTE))) + .addMethod( + getListNoteOccurrencesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.grafeas.v1.ListNoteOccurrencesRequest, + io.grafeas.v1.ListNoteOccurrencesResponse>( + this, METHODID_LIST_NOTE_OCCURRENCES))) + .build(); + } + } + + /** + *
+   * [Grafeas](https://grafeas.io) API.
+   * Retrieves analysis results of Cloud components such as Docker container
+   * images.
+   * Analysis results are stored as a series of occurrences. An `Occurrence`
+   * contains information about a specific analysis instance on a resource. An
+   * occurrence refers to a `Note`. A note contains details describing the
+   * analysis and is generally stored in a separate project, called a `Provider`.
+   * Multiple occurrences can refer to the same note.
+   * For example, an SSL vulnerability could affect multiple images. In this case,
+   * there would be one note for the vulnerability and an occurrence for each
+   * image with the vulnerability referring to that note.
+   * 
+ */ + public static final class GrafeasStub extends io.grpc.stub.AbstractAsyncStub { + private GrafeasStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GrafeasStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GrafeasStub(channel, callOptions); + } + + /** + *
+     * Gets the specified occurrence.
+     * 
+ */ + public void getOccurrence(io.grafeas.v1.GetOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetOccurrenceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists occurrences for the specified project.
+     * 
+ */ + public void listOccurrences(io.grafeas.v1.ListOccurrencesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListOccurrencesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes the specified occurrence. For example, use this method to delete an
+     * occurrence when the occurrence is no longer applicable for the given
+     * resource.
+     * 
+ */ + public void deleteOccurrence(io.grafeas.v1.DeleteOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteOccurrenceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a new occurrence.
+     * 
+ */ + public void createOccurrence(io.grafeas.v1.CreateOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateOccurrenceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates new occurrences in batch.
+     * 
+ */ + public void batchCreateOccurrences(io.grafeas.v1.BatchCreateOccurrencesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchCreateOccurrencesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates the specified occurrence.
+     * 
+ */ + public void updateOccurrence(io.grafeas.v1.UpdateOccurrenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateOccurrenceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets the note attached to the specified occurrence. Consumer projects can
+     * use this method to get a note that belongs to a provider project.
+     * 
+ */ + public void getOccurrenceNote(io.grafeas.v1.GetOccurrenceNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetOccurrenceNoteMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets the specified note.
+     * 
+ */ + public void getNote(io.grafeas.v1.GetNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNoteMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists notes for the specified project.
+     * 
+ */ + public void listNotes(io.grafeas.v1.ListNotesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNotesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes the specified note.
+     * 
+ */ + public void deleteNote(io.grafeas.v1.DeleteNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteNoteMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a new note.
+     * 
+ */ + public void createNote(io.grafeas.v1.CreateNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateNoteMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates new notes in batch.
+     * 
+ */ + public void batchCreateNotes(io.grafeas.v1.BatchCreateNotesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchCreateNotesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates the specified note.
+     * 
+ */ + public void updateNote(io.grafeas.v1.UpdateNoteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateNoteMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists occurrences referencing the specified note. Provider projects can use
+     * this method to get all occurrences across consumer projects referencing the
+     * specified note.
+     * 
+ */ + public void listNoteOccurrences(io.grafeas.v1.ListNoteOccurrencesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNoteOccurrencesMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * [Grafeas](https://grafeas.io) API.
+   * Retrieves analysis results of Cloud components such as Docker container
+   * images.
+   * Analysis results are stored as a series of occurrences. An `Occurrence`
+   * contains information about a specific analysis instance on a resource. An
+   * occurrence refers to a `Note`. A note contains details describing the
+   * analysis and is generally stored in a separate project, called a `Provider`.
+   * Multiple occurrences can refer to the same note.
+   * For example, an SSL vulnerability could affect multiple images. In this case,
+   * there would be one note for the vulnerability and an occurrence for each
+   * image with the vulnerability referring to that note.
+   * 
+ */ + public static final class GrafeasBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private GrafeasBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GrafeasBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GrafeasBlockingStub(channel, callOptions); + } + + /** + *
+     * Gets the specified occurrence.
+     * 
+ */ + public io.grafeas.v1.Occurrence getOccurrence(io.grafeas.v1.GetOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetOccurrenceMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists occurrences for the specified project.
+     * 
+ */ + public io.grafeas.v1.ListOccurrencesResponse listOccurrences(io.grafeas.v1.ListOccurrencesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListOccurrencesMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes the specified occurrence. For example, use this method to delete an
+     * occurrence when the occurrence is no longer applicable for the given
+     * resource.
+     * 
+ */ + public com.google.protobuf.Empty deleteOccurrence(io.grafeas.v1.DeleteOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteOccurrenceMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a new occurrence.
+     * 
+ */ + public io.grafeas.v1.Occurrence createOccurrence(io.grafeas.v1.CreateOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateOccurrenceMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates new occurrences in batch.
+     * 
+ */ + public io.grafeas.v1.BatchCreateOccurrencesResponse batchCreateOccurrences(io.grafeas.v1.BatchCreateOccurrencesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchCreateOccurrencesMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates the specified occurrence.
+     * 
+ */ + public io.grafeas.v1.Occurrence updateOccurrence(io.grafeas.v1.UpdateOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateOccurrenceMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets the note attached to the specified occurrence. Consumer projects can
+     * use this method to get a note that belongs to a provider project.
+     * 
+ */ + public io.grafeas.v1.Note getOccurrenceNote(io.grafeas.v1.GetOccurrenceNoteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetOccurrenceNoteMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets the specified note.
+     * 
+ */ + public io.grafeas.v1.Note getNote(io.grafeas.v1.GetNoteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNoteMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists notes for the specified project.
+     * 
+ */ + public io.grafeas.v1.ListNotesResponse listNotes(io.grafeas.v1.ListNotesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNotesMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes the specified note.
+     * 
+ */ + public com.google.protobuf.Empty deleteNote(io.grafeas.v1.DeleteNoteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteNoteMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a new note.
+     * 
+ */ + public io.grafeas.v1.Note createNote(io.grafeas.v1.CreateNoteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateNoteMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates new notes in batch.
+     * 
+ */ + public io.grafeas.v1.BatchCreateNotesResponse batchCreateNotes(io.grafeas.v1.BatchCreateNotesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchCreateNotesMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates the specified note.
+     * 
+ */ + public io.grafeas.v1.Note updateNote(io.grafeas.v1.UpdateNoteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateNoteMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists occurrences referencing the specified note. Provider projects can use
+     * this method to get all occurrences across consumer projects referencing the
+     * specified note.
+     * 
+ */ + public io.grafeas.v1.ListNoteOccurrencesResponse listNoteOccurrences(io.grafeas.v1.ListNoteOccurrencesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNoteOccurrencesMethod(), getCallOptions(), request); + } + } + + /** + *
+   * [Grafeas](https://grafeas.io) API.
+   * Retrieves analysis results of Cloud components such as Docker container
+   * images.
+   * Analysis results are stored as a series of occurrences. An `Occurrence`
+   * contains information about a specific analysis instance on a resource. An
+   * occurrence refers to a `Note`. A note contains details describing the
+   * analysis and is generally stored in a separate project, called a `Provider`.
+   * Multiple occurrences can refer to the same note.
+   * For example, an SSL vulnerability could affect multiple images. In this case,
+   * there would be one note for the vulnerability and an occurrence for each
+   * image with the vulnerability referring to that note.
+   * 
+ */ + public static final class GrafeasFutureStub extends io.grpc.stub.AbstractFutureStub { + private GrafeasFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GrafeasFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GrafeasFutureStub(channel, callOptions); + } + + /** + *
+     * Gets the specified occurrence.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getOccurrence( + io.grafeas.v1.GetOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetOccurrenceMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists occurrences for the specified project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listOccurrences( + io.grafeas.v1.ListOccurrencesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListOccurrencesMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes the specified occurrence. For example, use this method to delete an
+     * occurrence when the occurrence is no longer applicable for the given
+     * resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteOccurrence( + io.grafeas.v1.DeleteOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteOccurrenceMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a new occurrence.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createOccurrence( + io.grafeas.v1.CreateOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateOccurrenceMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates new occurrences in batch.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture batchCreateOccurrences( + io.grafeas.v1.BatchCreateOccurrencesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchCreateOccurrencesMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates the specified occurrence.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateOccurrence( + io.grafeas.v1.UpdateOccurrenceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateOccurrenceMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets the note attached to the specified occurrence. Consumer projects can
+     * use this method to get a note that belongs to a provider project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getOccurrenceNote( + io.grafeas.v1.GetOccurrenceNoteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetOccurrenceNoteMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets the specified note.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getNote( + io.grafeas.v1.GetNoteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNoteMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists notes for the specified project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listNotes( + io.grafeas.v1.ListNotesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNotesMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes the specified note.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteNote( + io.grafeas.v1.DeleteNoteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteNoteMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a new note.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createNote( + io.grafeas.v1.CreateNoteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateNoteMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates new notes in batch.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture batchCreateNotes( + io.grafeas.v1.BatchCreateNotesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchCreateNotesMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates the specified note.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateNote( + io.grafeas.v1.UpdateNoteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateNoteMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists occurrences referencing the specified note. Provider projects can use
+     * this method to get all occurrences across consumer projects referencing the
+     * specified note.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listNoteOccurrences( + io.grafeas.v1.ListNoteOccurrencesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNoteOccurrencesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_OCCURRENCE = 0; + private static final int METHODID_LIST_OCCURRENCES = 1; + private static final int METHODID_DELETE_OCCURRENCE = 2; + private static final int METHODID_CREATE_OCCURRENCE = 3; + private static final int METHODID_BATCH_CREATE_OCCURRENCES = 4; + private static final int METHODID_UPDATE_OCCURRENCE = 5; + private static final int METHODID_GET_OCCURRENCE_NOTE = 6; + private static final int METHODID_GET_NOTE = 7; + private static final int METHODID_LIST_NOTES = 8; + private static final int METHODID_DELETE_NOTE = 9; + private static final int METHODID_CREATE_NOTE = 10; + private static final int METHODID_BATCH_CREATE_NOTES = 11; + private static final int METHODID_UPDATE_NOTE = 12; + private static final int METHODID_LIST_NOTE_OCCURRENCES = 13; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final GrafeasImplBase serviceImpl; + private final int methodId; + + MethodHandlers(GrafeasImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_OCCURRENCE: + serviceImpl.getOccurrence((io.grafeas.v1.GetOccurrenceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_OCCURRENCES: + serviceImpl.listOccurrences((io.grafeas.v1.ListOccurrencesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_OCCURRENCE: + serviceImpl.deleteOccurrence((io.grafeas.v1.DeleteOccurrenceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_OCCURRENCE: + serviceImpl.createOccurrence((io.grafeas.v1.CreateOccurrenceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_CREATE_OCCURRENCES: + serviceImpl.batchCreateOccurrences((io.grafeas.v1.BatchCreateOccurrencesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_OCCURRENCE: + serviceImpl.updateOccurrence((io.grafeas.v1.UpdateOccurrenceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_OCCURRENCE_NOTE: + serviceImpl.getOccurrenceNote((io.grafeas.v1.GetOccurrenceNoteRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_NOTE: + serviceImpl.getNote((io.grafeas.v1.GetNoteRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_NOTES: + serviceImpl.listNotes((io.grafeas.v1.ListNotesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_NOTE: + serviceImpl.deleteNote((io.grafeas.v1.DeleteNoteRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_NOTE: + serviceImpl.createNote((io.grafeas.v1.CreateNoteRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_CREATE_NOTES: + serviceImpl.batchCreateNotes((io.grafeas.v1.BatchCreateNotesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_NOTE: + serviceImpl.updateNote((io.grafeas.v1.UpdateNoteRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_NOTE_OCCURRENCES: + serviceImpl.listNoteOccurrences((io.grafeas.v1.ListNoteOccurrencesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class GrafeasBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + GrafeasBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Grafeas"); + } + } + + private static final class GrafeasFileDescriptorSupplier + extends GrafeasBaseDescriptorSupplier { + GrafeasFileDescriptorSupplier() {} + } + + private static final class GrafeasMethodDescriptorSupplier + extends GrafeasBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + GrafeasMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (GrafeasGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new GrafeasFileDescriptorSupplier()) + .addMethod(getGetOccurrenceMethod()) + .addMethod(getListOccurrencesMethod()) + .addMethod(getDeleteOccurrenceMethod()) + .addMethod(getCreateOccurrenceMethod()) + .addMethod(getBatchCreateOccurrencesMethod()) + .addMethod(getUpdateOccurrenceMethod()) + .addMethod(getGetOccurrenceNoteMethod()) + .addMethod(getGetNoteMethod()) + .addMethod(getListNotesMethod()) + .addMethod(getDeleteNoteMethod()) + .addMethod(getCreateNoteMethod()) + .addMethod(getBatchCreateNotesMethod()) + .addMethod(getUpdateNoteMethod()) + .addMethod(getListNoteOccurrencesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java new file mode 100644 index 000000000000..e0f413fa5872 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java @@ -0,0 +1,492 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public final class GrafeasOuterClass { + private GrafeasOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Occurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Occurrence_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Note_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Note_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_GetNoteRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ListNotesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ListNotesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_DeleteNoteRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_CreateNoteRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_UpdateNoteRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\030grafeas/v1/grafeas.proto\022\ngrafeas.v1\032\034" + + "google/api/annotations.proto\032\027google/api" + + "/client.proto\032\037google/api/field_behavior" + + ".proto\032\031google/api/resource.proto\032\033googl" + + "e/protobuf/empty.proto\032 google/protobuf/" + + "field_mask.proto\032\037google/protobuf/timest" + + "amp.proto\032\034grafeas/v1/attestation.proto\032" + + "\026grafeas/v1/build.proto\032\027grafeas/v1/comm" + + "on.proto\032\033grafeas/v1/compliance.proto\032\033g" + + "rafeas/v1/deployment.proto\032\032grafeas/v1/d" + + "iscovery.proto\032!grafeas/v1/dsse_attestat" + + "ion.proto\032\026grafeas/v1/image.proto\032\030grafe" + + "as/v1/package.proto\032\030grafeas/v1/upgrade." + + "proto\032\024grafeas/v1/vex.proto\032\036grafeas/v1/" + + "vulnerability.proto\"\373\006\n\nOccurrence\022\014\n\004na" + + "me\030\001 \001(\t\022\024\n\014resource_uri\030\002 \001(\t\022\021\n\tnote_n" + + "ame\030\003 \001(\t\022\"\n\004kind\030\004 \001(\0162\024.grafeas.v1.Not" + + "eKind\022\023\n\013remediation\030\005 \001(\t\022/\n\013create_tim" + + "e\030\006 \001(\0132\032.google.protobuf.Timestamp\022/\n\013u" + + "pdate_time\030\007 \001(\0132\032.google.protobuf.Times" + + "tamp\022<\n\rvulnerability\030\010 \001(\0132#.grafeas.v1" + + ".VulnerabilityOccurrenceH\000\022,\n\005build\030\t \001(" + + "\0132\033.grafeas.v1.BuildOccurrenceH\000\022,\n\005imag" + + "e\030\n \001(\0132\033.grafeas.v1.ImageOccurrenceH\000\0220" + + "\n\007package\030\013 \001(\0132\035.grafeas.v1.PackageOccu" + + "rrenceH\000\0226\n\ndeployment\030\014 \001(\0132 .grafeas.v" + + "1.DeploymentOccurrenceH\000\0224\n\tdiscovery\030\r " + + "\001(\0132\037.grafeas.v1.DiscoveryOccurrenceH\000\0228" + + "\n\013attestation\030\016 \001(\0132!.grafeas.v1.Attesta" + + "tionOccurrenceH\000\0220\n\007upgrade\030\017 \001(\0132\035.graf" + + "eas.v1.UpgradeOccurrenceH\000\0226\n\ncompliance" + + "\030\020 \001(\0132 .grafeas.v1.ComplianceOccurrence" + + "H\000\022A\n\020dsse_attestation\030\021 \001(\0132%.grafeas.v" + + "1.DSSEAttestationOccurrenceH\000\022&\n\010envelop" + + "e\030\022 \001(\0132\024.grafeas.v1.Envelope:G\352AD\n\025graf" + + "eas.io/Occurrence\022+projects/{project}/oc" + + "currences/{occurrence}B\t\n\007details\"\276\007\n\004No" + + "te\022\014\n\004name\030\001 \001(\t\022\031\n\021short_description\030\002 " + + "\001(\t\022\030\n\020long_description\030\003 \001(\t\022\"\n\004kind\030\004 " + + "\001(\0162\024.grafeas.v1.NoteKind\022+\n\013related_url" + + "\030\005 \003(\0132\026.grafeas.v1.RelatedUrl\0223\n\017expira" + + "tion_time\030\006 \001(\0132\032.google.protobuf.Timest" + + "amp\022/\n\013create_time\030\007 \001(\0132\032.google.protob" + + "uf.Timestamp\022/\n\013update_time\030\010 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022\032\n\022related_note_na" + + "mes\030\t \003(\t\0226\n\rvulnerability\030\n \001(\0132\035.grafe" + + "as.v1.VulnerabilityNoteH\000\022&\n\005build\030\013 \001(\013" + + "2\025.grafeas.v1.BuildNoteH\000\022&\n\005image\030\014 \001(\013" + + "2\025.grafeas.v1.ImageNoteH\000\022*\n\007package\030\r \001" + + "(\0132\027.grafeas.v1.PackageNoteH\000\0220\n\ndeploym" + + "ent\030\016 \001(\0132\032.grafeas.v1.DeploymentNoteH\000\022" + + ".\n\tdiscovery\030\017 \001(\0132\031.grafeas.v1.Discover" + + "yNoteH\000\0222\n\013attestation\030\020 \001(\0132\033.grafeas.v" + + "1.AttestationNoteH\000\022*\n\007upgrade\030\021 \001(\0132\027.g" + + "rafeas.v1.UpgradeNoteH\000\0220\n\ncompliance\030\022 " + + "\001(\0132\032.grafeas.v1.ComplianceNoteH\000\022;\n\020dss" + + "e_attestation\030\023 \001(\0132\037.grafeas.v1.DSSEAtt" + + "estationNoteH\000\022K\n\030vulnerability_assessme" + + "nt\030\024 \001(\0132\'.grafeas.v1.VulnerabilityAsses" + + "smentNoteH\000:5\352A2\n\017grafeas.io/Note\022\037proje" + + "cts/{project}/notes/{note}B\006\n\004type\"C\n\024Ge" + + "tOccurrenceRequest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027" + + "\n\025grafeas.io/Occurrence\"{\n\026ListOccurrenc" + + "esRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafe" + + "as.io/Project\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_si" + + "ze\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"_\n\027ListOccu" + + "rrencesResponse\022+\n\013occurrences\030\001 \003(\0132\026.g" + + "rafeas.v1.Occurrence\022\027\n\017next_page_token\030" + + "\002 \001(\t\"F\n\027DeleteOccurrenceRequest\022+\n\004name" + + "\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io/Occurrence\"v\n" + + "\027CreateOccurrenceRequest\022*\n\006parent\030\001 \001(\t" + + "B\032\340A\002\372A\024\n\022grafeas.io/Project\022/\n\noccurren" + + "ce\030\002 \001(\0132\026.grafeas.v1.OccurrenceB\003\340A\002\"\250\001" + + "\n\027UpdateOccurrenceRequest\022+\n\004name\030\001 \001(\tB" + + "\035\340A\002\372A\027\n\025grafeas.io/Occurrence\022/\n\noccurr" + + "ence\030\002 \001(\0132\026.grafeas.v1.OccurrenceB\003\340A\002\022" + + "/\n\013update_mask\030\003 \001(\0132\032.google.protobuf.F" + + "ieldMask\"7\n\016GetNoteRequest\022%\n\004name\030\001 \001(\t" + + "B\027\340A\002\372A\021\n\017grafeas.io/Note\"G\n\030GetOccurren" + + "ceNoteRequest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025gra" + + "feas.io/Occurrence\"u\n\020ListNotesRequest\022*" + + "\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Proje" + + "ct\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n" + + "\npage_token\030\004 \001(\t\"M\n\021ListNotesResponse\022\037" + + "\n\005notes\030\001 \003(\0132\020.grafeas.v1.Note\022\027\n\017next_" + + "page_token\030\002 \001(\t\":\n\021DeleteNoteRequest\022%\n" + + "\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.io/Note\"z\n\021" + + "CreateNoteRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A" + + "\024\n\022grafeas.io/Project\022\024\n\007note_id\030\002 \001(\tB\003" + + "\340A\002\022#\n\004note\030\003 \001(\0132\020.grafeas.v1.NoteB\003\340A\002" + + "\"\220\001\n\021UpdateNoteRequest\022%\n\004name\030\001 \001(\tB\027\340A" + + "\002\372A\021\n\017grafeas.io/Note\022#\n\004note\030\002 \001(\0132\020.gr" + + "afeas.v1.NoteB\003\340A\002\022/\n\013update_mask\030\003 \001(\0132" + + "\032.google.protobuf.FieldMask\"z\n\032ListNoteO" + + "ccurrencesRequest\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n" + + "\017grafeas.io/Note\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage" + + "_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"c\n\033ListN" + + "oteOccurrencesResponse\022+\n\013occurrences\030\001 " + + "\003(\0132\026.grafeas.v1.Occurrence\022\027\n\017next_page" + + "_token\030\002 \001(\t\"\311\001\n\027BatchCreateNotesRequest" + + "\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Pro" + + "ject\022B\n\005notes\030\002 \003(\0132..grafeas.v1.BatchCr" + + "eateNotesRequest.NotesEntryB\003\340A\002\032>\n\nNote" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\037\n\005value\030\002 \001(\0132\020.gra" + + "feas.v1.Note:\0028\001\";\n\030BatchCreateNotesResp" + + "onse\022\037\n\005notes\030\001 \003(\0132\020.grafeas.v1.Note\"}\n" + + "\035BatchCreateOccurrencesRequest\022*\n\006parent" + + "\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Project\0220\n\013oc" + + "currences\030\002 \003(\0132\026.grafeas.v1.OccurrenceB" + + "\003\340A\002\"M\n\036BatchCreateOccurrencesResponse\022+" + + "\n\013occurrences\030\001 \003(\0132\026.grafeas.v1.Occurre" + + "nce2\222\020\n\007Grafeas\022}\n\rGetOccurrence\022 .grafe" + + "as.v1.GetOccurrenceRequest\032\026.grafeas.v1." + + "Occurrence\"2\202\323\344\223\002%\022#/v1/{name=projects/*" + + "/occurrences/*}\332A\004name\022\227\001\n\017ListOccurrenc" + + "es\022\".grafeas.v1.ListOccurrencesRequest\032#" + + ".grafeas.v1.ListOccurrencesResponse\";\202\323\344" + + "\223\002%\022#/v1/{parent=projects/*}/occurrences" + + "\332A\rparent,filter\022\203\001\n\020DeleteOccurrence\022#." + + "grafeas.v1.DeleteOccurrenceRequest\032\026.goo" + + "gle.protobuf.Empty\"2\202\323\344\223\002%*#/v1/{name=pr" + + "ojects/*/occurrences/*}\332A\004name\022\234\001\n\020Creat" + + "eOccurrence\022#.grafeas.v1.CreateOccurrenc" + + "eRequest\032\026.grafeas.v1.Occurrence\"K\202\323\344\223\0021" + + "\"#/v1/{parent=projects/*}/occurrences:\no" + + "ccurrence\332A\021parent,occurrence\022\300\001\n\026BatchC" + + "reateOccurrences\022).grafeas.v1.BatchCreat" + + "eOccurrencesRequest\032*.grafeas.v1.BatchCr" + + "eateOccurrencesResponse\"O\202\323\344\223\0024\"//v1/{pa" + + "rent=projects/*}/occurrences:batchCreate" + + ":\001*\332A\022parent,occurrences\022\246\001\n\020UpdateOccur" + + "rence\022#.grafeas.v1.UpdateOccurrenceReque" + + "st\032\026.grafeas.v1.Occurrence\"U\202\323\344\223\00212#/v1/" + + "{name=projects/*/occurrences/*}:\noccurre" + + "nce\332A\033name,occurrence,update_mask\022\205\001\n\021Ge" + + "tOccurrenceNote\022$.grafeas.v1.GetOccurren" + + "ceNoteRequest\032\020.grafeas.v1.Note\"8\202\323\344\223\002+\022" + + ")/v1/{name=projects/*/occurrences/*}/not" + + "es\332A\004name\022e\n\007GetNote\022\032.grafeas.v1.GetNot" + + "eRequest\032\020.grafeas.v1.Note\",\202\323\344\223\002\037\022\035/v1/" + + "{name=projects/*/notes/*}\332A\004name\022\177\n\tList" + + "Notes\022\034.grafeas.v1.ListNotesRequest\032\035.gr" + + "afeas.v1.ListNotesResponse\"5\202\323\344\223\002\037\022\035/v1/" + + "{parent=projects/*}/notes\332A\rparent,filte" + + "r\022q\n\nDeleteNote\022\035.grafeas.v1.DeleteNoteR" + + "equest\032\026.google.protobuf.Empty\",\202\323\344\223\002\037*\035" + + "/v1/{name=projects/*/notes/*}\332A\004name\022\200\001\n" + + "\nCreateNote\022\035.grafeas.v1.CreateNoteReque" + + "st\032\020.grafeas.v1.Note\"A\202\323\344\223\002%\"\035/v1/{paren" + + "t=projects/*}/notes:\004note\332A\023parent,note_" + + "id,note\022\242\001\n\020BatchCreateNotes\022#.grafeas.v" + + "1.BatchCreateNotesRequest\032$.grafeas.v1.B" + + "atchCreateNotesResponse\"C\202\323\344\223\002.\")/v1/{pa" + + "rent=projects/*}/notes:batchCreate:\001*\332A\014" + + "parent,notes\022\202\001\n\nUpdateNote\022\035.grafeas.v1" + + ".UpdateNoteRequest\032\020.grafeas.v1.Note\"C\202\323" + + "\344\223\002%2\035/v1/{name=projects/*/notes/*}:\004not" + + "e\332A\025name,note,update_mask\022\247\001\n\023ListNoteOc" + + "currences\022&.grafeas.v1.ListNoteOccurrenc" + + "esRequest\032\'.grafeas.v1.ListNoteOccurrenc" + + "esResponse\"?\202\323\344\223\002+\022)/v1/{name=projects/*" + + "/notes/*}/occurrences\332A\013name,filter\032#\312A " + + "containeranalysis.googleapis.comB|\n\rio.g" + + "rafeas.v1P\001Z8google.golang.org/genproto/" + + "googleapis/grafeas/v1;grafeas\242\002\003GRA\352A(\n\022" + + "grafeas.io/Project\022\022projects/{project}b\006" + + "proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + io.grafeas.v1.Attestation.getDescriptor(), + io.grafeas.v1.Build.getDescriptor(), + io.grafeas.v1.Common.getDescriptor(), + io.grafeas.v1.Compliance.getDescriptor(), + io.grafeas.v1.Deployment.getDescriptor(), + io.grafeas.v1.Discovery.getDescriptor(), + io.grafeas.v1.DsseAttestation.getDescriptor(), + io.grafeas.v1.Image.getDescriptor(), + io.grafeas.v1.Package.getDescriptor(), + io.grafeas.v1.Upgrade.getDescriptor(), + io.grafeas.v1.Vex.getDescriptor(), + io.grafeas.v1.Vulnerability.getDescriptor(), + }); + internal_static_grafeas_v1_Occurrence_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_Occurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Occurrence_descriptor, + new java.lang.String[] { "Name", "ResourceUri", "NoteName", "Kind", "Remediation", "CreateTime", "UpdateTime", "Vulnerability", "Build", "Image", "Package", "Deployment", "Discovery", "Attestation", "Upgrade", "Compliance", "DsseAttestation", "Envelope", "Details", }); + internal_static_grafeas_v1_Note_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Note_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Note_descriptor, + new java.lang.String[] { "Name", "ShortDescription", "LongDescription", "Kind", "RelatedUrl", "ExpirationTime", "CreateTime", "UpdateTime", "RelatedNoteNames", "Vulnerability", "Build", "Image", "Package", "Deployment", "Discovery", "Attestation", "Upgrade", "Compliance", "DsseAttestation", "VulnerabilityAssessment", "Type", }); + internal_static_grafeas_v1_GetOccurrenceRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_GetOccurrenceRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_grafeas_v1_ListOccurrencesRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ListOccurrencesRequest_descriptor, + new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", }); + internal_static_grafeas_v1_ListOccurrencesResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ListOccurrencesResponse_descriptor, + new java.lang.String[] { "Occurrences", "NextPageToken", }); + internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor, + new java.lang.String[] { "Parent", "Occurrence", }); + internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor, + new java.lang.String[] { "Name", "Occurrence", "UpdateMask", }); + internal_static_grafeas_v1_GetNoteRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_GetNoteRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_grafeas_v1_ListNotesRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ListNotesRequest_descriptor, + new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", }); + internal_static_grafeas_v1_ListNotesResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ListNotesResponse_descriptor, + new java.lang.String[] { "Notes", "NextPageToken", }); + internal_static_grafeas_v1_DeleteNoteRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_DeleteNoteRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_grafeas_v1_CreateNoteRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_CreateNoteRequest_descriptor, + new java.lang.String[] { "Parent", "NoteId", "Note", }); + internal_static_grafeas_v1_UpdateNoteRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_UpdateNoteRequest_descriptor, + new java.lang.String[] { "Name", "Note", "UpdateMask", }); + internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor, + new java.lang.String[] { "Name", "Filter", "PageSize", "PageToken", }); + internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor, + new java.lang.String[] { "Occurrences", "NextPageToken", }); + internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor, + new java.lang.String[] { "Parent", "Notes", }); + internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor = + internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor, + new java.lang.String[] { "Notes", }); + internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor, + new java.lang.String[] { "Parent", "Occurrences", }); + internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor, + new java.lang.String[] { "Occurrences", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + io.grafeas.v1.Attestation.getDescriptor(); + io.grafeas.v1.Build.getDescriptor(); + io.grafeas.v1.Common.getDescriptor(); + io.grafeas.v1.Compliance.getDescriptor(); + io.grafeas.v1.Deployment.getDescriptor(); + io.grafeas.v1.Discovery.getDescriptor(); + io.grafeas.v1.DsseAttestation.getDescriptor(); + io.grafeas.v1.Image.getDescriptor(); + io.grafeas.v1.Package.getDescriptor(); + io.grafeas.v1.Upgrade.getDescriptor(); + io.grafeas.v1.Vex.getDescriptor(); + io.grafeas.v1.Vulnerability.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java new file mode 100644 index 000000000000..898f9ad61838 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java @@ -0,0 +1,340 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.protobuf.Empty; +import io.grafeas.v1.stub.GrafeasStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link GrafeasClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (containeranalysis.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getOccurrence to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * GrafeasSettings.Builder grafeasSettingsBuilder = GrafeasSettings.newBuilder();
+ * grafeasSettingsBuilder
+ *     .getOccurrenceSettings()
+ *     .setRetrySettings(
+ *         grafeasSettingsBuilder
+ *             .getOccurrenceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * GrafeasSettings grafeasSettings = grafeasSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class GrafeasSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to getOccurrence. */ + public UnaryCallSettings getOccurrenceSettings() { + return ((GrafeasStubSettings) getStubSettings()).getOccurrenceSettings(); + } + + /** Returns the object with the settings used for calls to listOccurrences. */ + public PagedCallSettings< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> + listOccurrencesSettings() { + return ((GrafeasStubSettings) getStubSettings()).listOccurrencesSettings(); + } + + /** Returns the object with the settings used for calls to deleteOccurrence. */ + public UnaryCallSettings deleteOccurrenceSettings() { + return ((GrafeasStubSettings) getStubSettings()).deleteOccurrenceSettings(); + } + + /** Returns the object with the settings used for calls to createOccurrence. */ + public UnaryCallSettings createOccurrenceSettings() { + return ((GrafeasStubSettings) getStubSettings()).createOccurrenceSettings(); + } + + /** Returns the object with the settings used for calls to batchCreateOccurrences. */ + public UnaryCallSettings + batchCreateOccurrencesSettings() { + return ((GrafeasStubSettings) getStubSettings()).batchCreateOccurrencesSettings(); + } + + /** Returns the object with the settings used for calls to updateOccurrence. */ + public UnaryCallSettings updateOccurrenceSettings() { + return ((GrafeasStubSettings) getStubSettings()).updateOccurrenceSettings(); + } + + /** Returns the object with the settings used for calls to getOccurrenceNote. */ + public UnaryCallSettings getOccurrenceNoteSettings() { + return ((GrafeasStubSettings) getStubSettings()).getOccurrenceNoteSettings(); + } + + /** Returns the object with the settings used for calls to getNote. */ + public UnaryCallSettings getNoteSettings() { + return ((GrafeasStubSettings) getStubSettings()).getNoteSettings(); + } + + /** Returns the object with the settings used for calls to listNotes. */ + public PagedCallSettings + listNotesSettings() { + return ((GrafeasStubSettings) getStubSettings()).listNotesSettings(); + } + + /** Returns the object with the settings used for calls to deleteNote. */ + public UnaryCallSettings deleteNoteSettings() { + return ((GrafeasStubSettings) getStubSettings()).deleteNoteSettings(); + } + + /** Returns the object with the settings used for calls to createNote. */ + public UnaryCallSettings createNoteSettings() { + return ((GrafeasStubSettings) getStubSettings()).createNoteSettings(); + } + + /** Returns the object with the settings used for calls to batchCreateNotes. */ + public UnaryCallSettings + batchCreateNotesSettings() { + return ((GrafeasStubSettings) getStubSettings()).batchCreateNotesSettings(); + } + + /** Returns the object with the settings used for calls to updateNote. */ + public UnaryCallSettings updateNoteSettings() { + return ((GrafeasStubSettings) getStubSettings()).updateNoteSettings(); + } + + /** Returns the object with the settings used for calls to listNoteOccurrences. */ + public PagedCallSettings< + ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> + listNoteOccurrencesSettings() { + return ((GrafeasStubSettings) getStubSettings()).listNoteOccurrencesSettings(); + } + + public static final GrafeasSettings create(GrafeasStubSettings stub) throws IOException { + return new GrafeasSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return GrafeasStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return GrafeasStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return GrafeasStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GrafeasStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return GrafeasStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return GrafeasStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return GrafeasStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected GrafeasSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for GrafeasSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(GrafeasStubSettings.newBuilder(clientContext)); + } + + protected Builder(GrafeasSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(GrafeasStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(GrafeasStubSettings.newBuilder()); + } + + public GrafeasStubSettings.Builder getStubSettingsBuilder() { + return ((GrafeasStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getOccurrence. */ + public UnaryCallSettings.Builder getOccurrenceSettings() { + return getStubSettingsBuilder().getOccurrenceSettings(); + } + + /** Returns the builder for the settings used for calls to listOccurrences. */ + public PagedCallSettings.Builder< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> + listOccurrencesSettings() { + return getStubSettingsBuilder().listOccurrencesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteOccurrence. */ + public UnaryCallSettings.Builder deleteOccurrenceSettings() { + return getStubSettingsBuilder().deleteOccurrenceSettings(); + } + + /** Returns the builder for the settings used for calls to createOccurrence. */ + public UnaryCallSettings.Builder + createOccurrenceSettings() { + return getStubSettingsBuilder().createOccurrenceSettings(); + } + + /** Returns the builder for the settings used for calls to batchCreateOccurrences. */ + public UnaryCallSettings.Builder + batchCreateOccurrencesSettings() { + return getStubSettingsBuilder().batchCreateOccurrencesSettings(); + } + + /** Returns the builder for the settings used for calls to updateOccurrence. */ + public UnaryCallSettings.Builder + updateOccurrenceSettings() { + return getStubSettingsBuilder().updateOccurrenceSettings(); + } + + /** Returns the builder for the settings used for calls to getOccurrenceNote. */ + public UnaryCallSettings.Builder getOccurrenceNoteSettings() { + return getStubSettingsBuilder().getOccurrenceNoteSettings(); + } + + /** Returns the builder for the settings used for calls to getNote. */ + public UnaryCallSettings.Builder getNoteSettings() { + return getStubSettingsBuilder().getNoteSettings(); + } + + /** Returns the builder for the settings used for calls to listNotes. */ + public PagedCallSettings.Builder + listNotesSettings() { + return getStubSettingsBuilder().listNotesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNote. */ + public UnaryCallSettings.Builder deleteNoteSettings() { + return getStubSettingsBuilder().deleteNoteSettings(); + } + + /** Returns the builder for the settings used for calls to createNote. */ + public UnaryCallSettings.Builder createNoteSettings() { + return getStubSettingsBuilder().createNoteSettings(); + } + + /** Returns the builder for the settings used for calls to batchCreateNotes. */ + public UnaryCallSettings.Builder + batchCreateNotesSettings() { + return getStubSettingsBuilder().batchCreateNotesSettings(); + } + + /** Returns the builder for the settings used for calls to updateNote. */ + public UnaryCallSettings.Builder updateNoteSettings() { + return getStubSettingsBuilder().updateNoteSettings(); + } + + /** Returns the builder for the settings used for calls to listNoteOccurrences. */ + public PagedCallSettings.Builder< + ListNoteOccurrencesRequest, + ListNoteOccurrencesResponse, + ListNoteOccurrencesPagedResponse> + listNoteOccurrencesSettings() { + return getStubSettingsBuilder().listNoteOccurrencesSettings(); + } + + @Override + public GrafeasSettings build() throws IOException { + return new GrafeasSettings(this); + } + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java new file mode 100644 index 000000000000..9d44bb822baa --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java @@ -0,0 +1,663 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *

+ * Container message for hash values.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Hash} + */ +public final class Hash extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Hash) + HashOrBuilder { +private static final long serialVersionUID = 0L; + // Use Hash.newBuilder() to construct. + private Hash(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Hash() { + type_ = ""; + value_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Hash(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Hash.class, io.grafeas.v1.Hash.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + *
+   * Required. The type of hash that was performed, e.g. "SHA-256".
+   * 
+ * + * string type = 1; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * Required. The type of hash that was performed, e.g. "SHA-256".
+   * 
+ * + * string type = 1; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+   * Required. The hash value.
+   * 
+ * + * bytes value = 2; + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (!value_.isEmpty()) { + output.writeBytes(2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (!value_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Hash)) { + return super.equals(obj); + } + io.grafeas.v1.Hash other = (io.grafeas.v1.Hash) obj; + + if (!getType() + .equals(other.getType())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Hash parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Hash parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Hash parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Hash parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Hash parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Hash parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Hash parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Hash parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Hash parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Hash parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Hash parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Hash parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Hash prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Container message for hash values.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Hash} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Hash) + io.grafeas.v1.HashOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Hash.class, io.grafeas.v1.Hash.Builder.class); + } + + // Construct using io.grafeas.v1.Hash.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + value_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Hash getDefaultInstanceForType() { + return io.grafeas.v1.Hash.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Hash build() { + io.grafeas.v1.Hash result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Hash buildPartial() { + io.grafeas.v1.Hash result = new io.grafeas.v1.Hash(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Hash result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Hash) { + return mergeFrom((io.grafeas.v1.Hash)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Hash other) { + if (other == io.grafeas.v1.Hash.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + value_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + *
+     * Required. The type of hash that was performed, e.g. "SHA-256".
+     * 
+ * + * string type = 1; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The type of hash that was performed, e.g. "SHA-256".
+     * 
+ * + * string type = 1; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The type of hash that was performed, e.g. "SHA-256".
+     * 
+ * + * string type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The type of hash that was performed, e.g. "SHA-256".
+     * 
+ * + * string type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The type of hash that was performed, e.g. "SHA-256".
+     * 
+ * + * string type = 1; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Required. The hash value.
+     * 
+ * + * bytes value = 2; + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return value_; + } + /** + *
+     * Required. The hash value.
+     * 
+ * + * bytes value = 2; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The hash value.
+     * 
+ * + * bytes value = 2; + * @return This builder for chaining. + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Hash) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Hash) + private static final io.grafeas.v1.Hash DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Hash(); + } + + public static io.grafeas.v1.Hash getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Hash parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Hash getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java new file mode 100644 index 000000000000..3b14e9540a5b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface HashOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Hash) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The type of hash that was performed, e.g. "SHA-256".
+   * 
+ * + * string type = 1; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * Required. The type of hash that was performed, e.g. "SHA-256".
+   * 
+ * + * string type = 1; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+   * Required. The hash value.
+   * 
+ * + * bytes value = 2; + * @return The value. + */ + com.google.protobuf.ByteString getValue(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java new file mode 100644 index 000000000000..4552e28165f9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java @@ -0,0 +1,90 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +public final class Image { + private Image() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Layer_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Layer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Fingerprint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Fingerprint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ImageNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ImageNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ImageOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026grafeas/v1/image.proto\022\ngrafeas.v1\"-\n\005" + + "Layer\022\021\n\tdirective\030\001 \001(\t\022\021\n\targuments\030\002 " + + "\001(\t\"@\n\013Fingerprint\022\017\n\007v1_name\030\001 \001(\t\022\017\n\007v" + + "2_blob\030\002 \003(\t\022\017\n\007v2_name\030\003 \001(\t\"O\n\tImageNo" + + "te\022\024\n\014resource_url\030\001 \001(\t\022,\n\013fingerprint\030" + + "\002 \001(\0132\027.grafeas.v1.Fingerprint\"\223\001\n\017Image" + + "Occurrence\022,\n\013fingerprint\030\001 \001(\0132\027.grafea" + + "s.v1.Fingerprint\022\020\n\010distance\030\002 \001(\005\022%\n\nla" + + "yer_info\030\003 \003(\0132\021.grafeas.v1.Layer\022\031\n\021bas" + + "e_resource_url\030\004 \001(\tBQ\n\rio.grafeas.v1P\001Z" + + "8google.golang.org/genproto/googleapis/g" + + "rafeas/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_grafeas_v1_Layer_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_Layer_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Layer_descriptor, + new java.lang.String[] { "Directive", "Arguments", }); + internal_static_grafeas_v1_Fingerprint_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Fingerprint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Fingerprint_descriptor, + new java.lang.String[] { "V1Name", "V2Blob", "V2Name", }); + internal_static_grafeas_v1_ImageNote_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_ImageNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ImageNote_descriptor, + new java.lang.String[] { "ResourceUrl", "Fingerprint", }); + internal_static_grafeas_v1_ImageOccurrence_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ImageOccurrence_descriptor, + new java.lang.String[] { "Fingerprint", "Distance", "LayerInfo", "BaseResourceUrl", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java new file mode 100644 index 000000000000..69fb40e2db70 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java @@ -0,0 +1,824 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +/** + *
+ * Basis describes the base image portion (Note) of the DockerImage
+ * relationship. Linked occurrences are derived from this or an equivalent image
+ * via:
+ *   FROM <Basis.resource_url>
+ * Or an equivalent reference, e.g., a tag of the resource_url.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ImageNote} + */ +public final class ImageNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ImageNote) + ImageNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageNote.newBuilder() to construct. + private ImageNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageNote() { + resourceUrl_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ImageNote.class, io.grafeas.v1.ImageNote.Builder.class); + } + + public static final int RESOURCE_URL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object resourceUrl_ = ""; + /** + *
+   * Required. Immutable. The resource_url for the resource representing the
+   * basis of associated occurrence images.
+   * 
+ * + * string resource_url = 1; + * @return The resourceUrl. + */ + @java.lang.Override + public java.lang.String getResourceUrl() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUrl_ = s; + return s; + } + } + /** + *
+   * Required. Immutable. The resource_url for the resource representing the
+   * basis of associated occurrence images.
+   * 
+ * + * string resource_url = 1; + * @return The bytes for resourceUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceUrlBytes() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FINGERPRINT_FIELD_NUMBER = 2; + private io.grafeas.v1.Fingerprint fingerprint_; + /** + *
+   * Required. Immutable. The fingerprint of the base image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + * @return Whether the fingerprint field is set. + */ + @java.lang.Override + public boolean hasFingerprint() { + return fingerprint_ != null; + } + /** + *
+   * Required. Immutable. The fingerprint of the base image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + * @return The fingerprint. + */ + @java.lang.Override + public io.grafeas.v1.Fingerprint getFingerprint() { + return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } + /** + *
+   * Required. Immutable. The fingerprint of the base image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + @java.lang.Override + public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { + return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceUrl_); + } + if (fingerprint_ != null) { + output.writeMessage(2, getFingerprint()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceUrl_); + } + if (fingerprint_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFingerprint()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ImageNote)) { + return super.equals(obj); + } + io.grafeas.v1.ImageNote other = (io.grafeas.v1.ImageNote) obj; + + if (!getResourceUrl() + .equals(other.getResourceUrl())) return false; + if (hasFingerprint() != other.hasFingerprint()) return false; + if (hasFingerprint()) { + if (!getFingerprint() + .equals(other.getFingerprint())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_URL_FIELD_NUMBER; + hash = (53 * hash) + getResourceUrl().hashCode(); + if (hasFingerprint()) { + hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER; + hash = (53 * hash) + getFingerprint().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ImageNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ImageNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ImageNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ImageNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ImageNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ImageNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ImageNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ImageNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ImageNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ImageNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ImageNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ImageNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ImageNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Basis describes the base image portion (Note) of the DockerImage
+   * relationship. Linked occurrences are derived from this or an equivalent image
+   * via:
+   *   FROM <Basis.resource_url>
+   * Or an equivalent reference, e.g., a tag of the resource_url.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ImageNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ImageNote) + io.grafeas.v1.ImageNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ImageNote.class, io.grafeas.v1.ImageNote.Builder.class); + } + + // Construct using io.grafeas.v1.ImageNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceUrl_ = ""; + fingerprint_ = null; + if (fingerprintBuilder_ != null) { + fingerprintBuilder_.dispose(); + fingerprintBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ImageNote getDefaultInstanceForType() { + return io.grafeas.v1.ImageNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ImageNote build() { + io.grafeas.v1.ImageNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ImageNote buildPartial() { + io.grafeas.v1.ImageNote result = new io.grafeas.v1.ImageNote(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.ImageNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceUrl_ = resourceUrl_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fingerprint_ = fingerprintBuilder_ == null + ? fingerprint_ + : fingerprintBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ImageNote) { + return mergeFrom((io.grafeas.v1.ImageNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ImageNote other) { + if (other == io.grafeas.v1.ImageNote.getDefaultInstance()) return this; + if (!other.getResourceUrl().isEmpty()) { + resourceUrl_ = other.resourceUrl_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasFingerprint()) { + mergeFingerprint(other.getFingerprint()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + resourceUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getFingerprintFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object resourceUrl_ = ""; + /** + *
+     * Required. Immutable. The resource_url for the resource representing the
+     * basis of associated occurrence images.
+     * 
+ * + * string resource_url = 1; + * @return The resourceUrl. + */ + public java.lang.String getResourceUrl() { + java.lang.Object ref = resourceUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Immutable. The resource_url for the resource representing the
+     * basis of associated occurrence images.
+     * 
+ * + * string resource_url = 1; + * @return The bytes for resourceUrl. + */ + public com.google.protobuf.ByteString + getResourceUrlBytes() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Immutable. The resource_url for the resource representing the
+     * basis of associated occurrence images.
+     * 
+ * + * string resource_url = 1; + * @param value The resourceUrl to set. + * @return This builder for chaining. + */ + public Builder setResourceUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resourceUrl_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The resource_url for the resource representing the
+     * basis of associated occurrence images.
+     * 
+ * + * string resource_url = 1; + * @return This builder for chaining. + */ + public Builder clearResourceUrl() { + resourceUrl_ = getDefaultInstance().getResourceUrl(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The resource_url for the resource representing the
+     * basis of associated occurrence images.
+     * 
+ * + * string resource_url = 1; + * @param value The bytes for resourceUrl to set. + * @return This builder for chaining. + */ + public Builder setResourceUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resourceUrl_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.grafeas.v1.Fingerprint fingerprint_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> fingerprintBuilder_; + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + * @return Whether the fingerprint field is set. + */ + public boolean hasFingerprint() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + * @return The fingerprint. + */ + public io.grafeas.v1.Fingerprint getFingerprint() { + if (fingerprintBuilder_ == null) { + return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } else { + return fingerprintBuilder_.getMessage(); + } + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + public Builder setFingerprint(io.grafeas.v1.Fingerprint value) { + if (fingerprintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fingerprint_ = value; + } else { + fingerprintBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + public Builder setFingerprint( + io.grafeas.v1.Fingerprint.Builder builderForValue) { + if (fingerprintBuilder_ == null) { + fingerprint_ = builderForValue.build(); + } else { + fingerprintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + public Builder mergeFingerprint(io.grafeas.v1.Fingerprint value) { + if (fingerprintBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + fingerprint_ != null && + fingerprint_ != io.grafeas.v1.Fingerprint.getDefaultInstance()) { + getFingerprintBuilder().mergeFrom(value); + } else { + fingerprint_ = value; + } + } else { + fingerprintBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + public Builder clearFingerprint() { + bitField0_ = (bitField0_ & ~0x00000002); + fingerprint_ = null; + if (fingerprintBuilder_ != null) { + fingerprintBuilder_.dispose(); + fingerprintBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + public io.grafeas.v1.Fingerprint.Builder getFingerprintBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFingerprintFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { + if (fingerprintBuilder_ != null) { + return fingerprintBuilder_.getMessageOrBuilder(); + } else { + return fingerprint_ == null ? + io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } + } + /** + *
+     * Required. Immutable. The fingerprint of the base image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> + getFingerprintFieldBuilder() { + if (fingerprintBuilder_ == null) { + fingerprintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder>( + getFingerprint(), + getParentForChildren(), + isClean()); + fingerprint_ = null; + } + return fingerprintBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ImageNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ImageNote) + private static final io.grafeas.v1.ImageNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ImageNote(); + } + + public static io.grafeas.v1.ImageNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ImageNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java new file mode 100644 index 000000000000..d3ff6b229887 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +public interface ImageNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ImageNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Immutable. The resource_url for the resource representing the
+   * basis of associated occurrence images.
+   * 
+ * + * string resource_url = 1; + * @return The resourceUrl. + */ + java.lang.String getResourceUrl(); + /** + *
+   * Required. Immutable. The resource_url for the resource representing the
+   * basis of associated occurrence images.
+   * 
+ * + * string resource_url = 1; + * @return The bytes for resourceUrl. + */ + com.google.protobuf.ByteString + getResourceUrlBytes(); + + /** + *
+   * Required. Immutable. The fingerprint of the base image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + * @return Whether the fingerprint field is set. + */ + boolean hasFingerprint(); + /** + *
+   * Required. Immutable. The fingerprint of the base image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + * @return The fingerprint. + */ + io.grafeas.v1.Fingerprint getFingerprint(); + /** + *
+   * Required. Immutable. The fingerprint of the base image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 2; + */ + io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java new file mode 100644 index 000000000000..42e50c3a99ed --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java @@ -0,0 +1,1398 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +/** + *
+ * Details of the derived image portion of the DockerImage relationship. This
+ * image would be produced from a Dockerfile with FROM <DockerImage.Basis in
+ * attached Note>.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ImageOccurrence} + */ +public final class ImageOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ImageOccurrence) + ImageOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageOccurrence.newBuilder() to construct. + private ImageOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageOccurrence() { + layerInfo_ = java.util.Collections.emptyList(); + baseResourceUrl_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ImageOccurrence.class, io.grafeas.v1.ImageOccurrence.Builder.class); + } + + public static final int FINGERPRINT_FIELD_NUMBER = 1; + private io.grafeas.v1.Fingerprint fingerprint_; + /** + *
+   * Required. The fingerprint of the derived image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + * @return Whether the fingerprint field is set. + */ + @java.lang.Override + public boolean hasFingerprint() { + return fingerprint_ != null; + } + /** + *
+   * Required. The fingerprint of the derived image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + * @return The fingerprint. + */ + @java.lang.Override + public io.grafeas.v1.Fingerprint getFingerprint() { + return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } + /** + *
+   * Required. The fingerprint of the derived image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + @java.lang.Override + public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { + return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } + + public static final int DISTANCE_FIELD_NUMBER = 2; + private int distance_ = 0; + /** + *
+   * Output only. The number of layers by which this image differs from the
+   * associated image basis.
+   * 
+ * + * int32 distance = 2; + * @return The distance. + */ + @java.lang.Override + public int getDistance() { + return distance_; + } + + public static final int LAYER_INFO_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List layerInfo_; + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + @java.lang.Override + public java.util.List getLayerInfoList() { + return layerInfo_; + } + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + @java.lang.Override + public java.util.List + getLayerInfoOrBuilderList() { + return layerInfo_; + } + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + @java.lang.Override + public int getLayerInfoCount() { + return layerInfo_.size(); + } + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + @java.lang.Override + public io.grafeas.v1.Layer getLayerInfo(int index) { + return layerInfo_.get(index); + } + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + @java.lang.Override + public io.grafeas.v1.LayerOrBuilder getLayerInfoOrBuilder( + int index) { + return layerInfo_.get(index); + } + + public static final int BASE_RESOURCE_URL_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object baseResourceUrl_ = ""; + /** + *
+   * Output only. This contains the base image URL for the derived image
+   * occurrence.
+   * 
+ * + * string base_resource_url = 4; + * @return The baseResourceUrl. + */ + @java.lang.Override + public java.lang.String getBaseResourceUrl() { + java.lang.Object ref = baseResourceUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseResourceUrl_ = s; + return s; + } + } + /** + *
+   * Output only. This contains the base image URL for the derived image
+   * occurrence.
+   * 
+ * + * string base_resource_url = 4; + * @return The bytes for baseResourceUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBaseResourceUrlBytes() { + java.lang.Object ref = baseResourceUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + baseResourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (fingerprint_ != null) { + output.writeMessage(1, getFingerprint()); + } + if (distance_ != 0) { + output.writeInt32(2, distance_); + } + for (int i = 0; i < layerInfo_.size(); i++) { + output.writeMessage(3, layerInfo_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseResourceUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, baseResourceUrl_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (fingerprint_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getFingerprint()); + } + if (distance_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, distance_); + } + for (int i = 0; i < layerInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, layerInfo_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseResourceUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, baseResourceUrl_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ImageOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.ImageOccurrence other = (io.grafeas.v1.ImageOccurrence) obj; + + if (hasFingerprint() != other.hasFingerprint()) return false; + if (hasFingerprint()) { + if (!getFingerprint() + .equals(other.getFingerprint())) return false; + } + if (getDistance() + != other.getDistance()) return false; + if (!getLayerInfoList() + .equals(other.getLayerInfoList())) return false; + if (!getBaseResourceUrl() + .equals(other.getBaseResourceUrl())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFingerprint()) { + hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER; + hash = (53 * hash) + getFingerprint().hashCode(); + } + hash = (37 * hash) + DISTANCE_FIELD_NUMBER; + hash = (53 * hash) + getDistance(); + if (getLayerInfoCount() > 0) { + hash = (37 * hash) + LAYER_INFO_FIELD_NUMBER; + hash = (53 * hash) + getLayerInfoList().hashCode(); + } + hash = (37 * hash) + BASE_RESOURCE_URL_FIELD_NUMBER; + hash = (53 * hash) + getBaseResourceUrl().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ImageOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ImageOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ImageOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ImageOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ImageOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ImageOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ImageOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ImageOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ImageOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ImageOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ImageOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ImageOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ImageOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Details of the derived image portion of the DockerImage relationship. This
+   * image would be produced from a Dockerfile with FROM <DockerImage.Basis in
+   * attached Note>.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ImageOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ImageOccurrence) + io.grafeas.v1.ImageOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ImageOccurrence.class, io.grafeas.v1.ImageOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.ImageOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fingerprint_ = null; + if (fingerprintBuilder_ != null) { + fingerprintBuilder_.dispose(); + fingerprintBuilder_ = null; + } + distance_ = 0; + if (layerInfoBuilder_ == null) { + layerInfo_ = java.util.Collections.emptyList(); + } else { + layerInfo_ = null; + layerInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + baseResourceUrl_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ImageOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ImageOccurrence build() { + io.grafeas.v1.ImageOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ImageOccurrence buildPartial() { + io.grafeas.v1.ImageOccurrence result = new io.grafeas.v1.ImageOccurrence(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.ImageOccurrence result) { + if (layerInfoBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + layerInfo_ = java.util.Collections.unmodifiableList(layerInfo_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.layerInfo_ = layerInfo_; + } else { + result.layerInfo_ = layerInfoBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.ImageOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fingerprint_ = fingerprintBuilder_ == null + ? fingerprint_ + : fingerprintBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.distance_ = distance_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.baseResourceUrl_ = baseResourceUrl_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ImageOccurrence) { + return mergeFrom((io.grafeas.v1.ImageOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ImageOccurrence other) { + if (other == io.grafeas.v1.ImageOccurrence.getDefaultInstance()) return this; + if (other.hasFingerprint()) { + mergeFingerprint(other.getFingerprint()); + } + if (other.getDistance() != 0) { + setDistance(other.getDistance()); + } + if (layerInfoBuilder_ == null) { + if (!other.layerInfo_.isEmpty()) { + if (layerInfo_.isEmpty()) { + layerInfo_ = other.layerInfo_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLayerInfoIsMutable(); + layerInfo_.addAll(other.layerInfo_); + } + onChanged(); + } + } else { + if (!other.layerInfo_.isEmpty()) { + if (layerInfoBuilder_.isEmpty()) { + layerInfoBuilder_.dispose(); + layerInfoBuilder_ = null; + layerInfo_ = other.layerInfo_; + bitField0_ = (bitField0_ & ~0x00000004); + layerInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLayerInfoFieldBuilder() : null; + } else { + layerInfoBuilder_.addAllMessages(other.layerInfo_); + } + } + } + if (!other.getBaseResourceUrl().isEmpty()) { + baseResourceUrl_ = other.baseResourceUrl_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getFingerprintFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + distance_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + io.grafeas.v1.Layer m = + input.readMessage( + io.grafeas.v1.Layer.parser(), + extensionRegistry); + if (layerInfoBuilder_ == null) { + ensureLayerInfoIsMutable(); + layerInfo_.add(m); + } else { + layerInfoBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: { + baseResourceUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.Fingerprint fingerprint_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> fingerprintBuilder_; + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + * @return Whether the fingerprint field is set. + */ + public boolean hasFingerprint() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + * @return The fingerprint. + */ + public io.grafeas.v1.Fingerprint getFingerprint() { + if (fingerprintBuilder_ == null) { + return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } else { + return fingerprintBuilder_.getMessage(); + } + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + public Builder setFingerprint(io.grafeas.v1.Fingerprint value) { + if (fingerprintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fingerprint_ = value; + } else { + fingerprintBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + public Builder setFingerprint( + io.grafeas.v1.Fingerprint.Builder builderForValue) { + if (fingerprintBuilder_ == null) { + fingerprint_ = builderForValue.build(); + } else { + fingerprintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + public Builder mergeFingerprint(io.grafeas.v1.Fingerprint value) { + if (fingerprintBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + fingerprint_ != null && + fingerprint_ != io.grafeas.v1.Fingerprint.getDefaultInstance()) { + getFingerprintBuilder().mergeFrom(value); + } else { + fingerprint_ = value; + } + } else { + fingerprintBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + public Builder clearFingerprint() { + bitField0_ = (bitField0_ & ~0x00000001); + fingerprint_ = null; + if (fingerprintBuilder_ != null) { + fingerprintBuilder_.dispose(); + fingerprintBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + public io.grafeas.v1.Fingerprint.Builder getFingerprintBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getFingerprintFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { + if (fingerprintBuilder_ != null) { + return fingerprintBuilder_.getMessageOrBuilder(); + } else { + return fingerprint_ == null ? + io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; + } + } + /** + *
+     * Required. The fingerprint of the derived image.
+     * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> + getFingerprintFieldBuilder() { + if (fingerprintBuilder_ == null) { + fingerprintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder>( + getFingerprint(), + getParentForChildren(), + isClean()); + fingerprint_ = null; + } + return fingerprintBuilder_; + } + + private int distance_ ; + /** + *
+     * Output only. The number of layers by which this image differs from the
+     * associated image basis.
+     * 
+ * + * int32 distance = 2; + * @return The distance. + */ + @java.lang.Override + public int getDistance() { + return distance_; + } + /** + *
+     * Output only. The number of layers by which this image differs from the
+     * associated image basis.
+     * 
+ * + * int32 distance = 2; + * @param value The distance to set. + * @return This builder for chaining. + */ + public Builder setDistance(int value) { + + distance_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The number of layers by which this image differs from the
+     * associated image basis.
+     * 
+ * + * int32 distance = 2; + * @return This builder for chaining. + */ + public Builder clearDistance() { + bitField0_ = (bitField0_ & ~0x00000002); + distance_ = 0; + onChanged(); + return this; + } + + private java.util.List layerInfo_ = + java.util.Collections.emptyList(); + private void ensureLayerInfoIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + layerInfo_ = new java.util.ArrayList(layerInfo_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Layer, io.grafeas.v1.Layer.Builder, io.grafeas.v1.LayerOrBuilder> layerInfoBuilder_; + + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public java.util.List getLayerInfoList() { + if (layerInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(layerInfo_); + } else { + return layerInfoBuilder_.getMessageList(); + } + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public int getLayerInfoCount() { + if (layerInfoBuilder_ == null) { + return layerInfo_.size(); + } else { + return layerInfoBuilder_.getCount(); + } + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public io.grafeas.v1.Layer getLayerInfo(int index) { + if (layerInfoBuilder_ == null) { + return layerInfo_.get(index); + } else { + return layerInfoBuilder_.getMessage(index); + } + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder setLayerInfo( + int index, io.grafeas.v1.Layer value) { + if (layerInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLayerInfoIsMutable(); + layerInfo_.set(index, value); + onChanged(); + } else { + layerInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder setLayerInfo( + int index, io.grafeas.v1.Layer.Builder builderForValue) { + if (layerInfoBuilder_ == null) { + ensureLayerInfoIsMutable(); + layerInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + layerInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder addLayerInfo(io.grafeas.v1.Layer value) { + if (layerInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLayerInfoIsMutable(); + layerInfo_.add(value); + onChanged(); + } else { + layerInfoBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder addLayerInfo( + int index, io.grafeas.v1.Layer value) { + if (layerInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLayerInfoIsMutable(); + layerInfo_.add(index, value); + onChanged(); + } else { + layerInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder addLayerInfo( + io.grafeas.v1.Layer.Builder builderForValue) { + if (layerInfoBuilder_ == null) { + ensureLayerInfoIsMutable(); + layerInfo_.add(builderForValue.build()); + onChanged(); + } else { + layerInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder addLayerInfo( + int index, io.grafeas.v1.Layer.Builder builderForValue) { + if (layerInfoBuilder_ == null) { + ensureLayerInfoIsMutable(); + layerInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + layerInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder addAllLayerInfo( + java.lang.Iterable values) { + if (layerInfoBuilder_ == null) { + ensureLayerInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, layerInfo_); + onChanged(); + } else { + layerInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder clearLayerInfo() { + if (layerInfoBuilder_ == null) { + layerInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + layerInfoBuilder_.clear(); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public Builder removeLayerInfo(int index) { + if (layerInfoBuilder_ == null) { + ensureLayerInfoIsMutable(); + layerInfo_.remove(index); + onChanged(); + } else { + layerInfoBuilder_.remove(index); + } + return this; + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public io.grafeas.v1.Layer.Builder getLayerInfoBuilder( + int index) { + return getLayerInfoFieldBuilder().getBuilder(index); + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public io.grafeas.v1.LayerOrBuilder getLayerInfoOrBuilder( + int index) { + if (layerInfoBuilder_ == null) { + return layerInfo_.get(index); } else { + return layerInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public java.util.List + getLayerInfoOrBuilderList() { + if (layerInfoBuilder_ != null) { + return layerInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(layerInfo_); + } + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public io.grafeas.v1.Layer.Builder addLayerInfoBuilder() { + return getLayerInfoFieldBuilder().addBuilder( + io.grafeas.v1.Layer.getDefaultInstance()); + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public io.grafeas.v1.Layer.Builder addLayerInfoBuilder( + int index) { + return getLayerInfoFieldBuilder().addBuilder( + index, io.grafeas.v1.Layer.getDefaultInstance()); + } + /** + *
+     * This contains layer-specific metadata, if populated it has length
+     * "distance" and is ordered with [distance] being the layer immediately
+     * following the base image and [1] being the final layer.
+     * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + public java.util.List + getLayerInfoBuilderList() { + return getLayerInfoFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Layer, io.grafeas.v1.Layer.Builder, io.grafeas.v1.LayerOrBuilder> + getLayerInfoFieldBuilder() { + if (layerInfoBuilder_ == null) { + layerInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Layer, io.grafeas.v1.Layer.Builder, io.grafeas.v1.LayerOrBuilder>( + layerInfo_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + layerInfo_ = null; + } + return layerInfoBuilder_; + } + + private java.lang.Object baseResourceUrl_ = ""; + /** + *
+     * Output only. This contains the base image URL for the derived image
+     * occurrence.
+     * 
+ * + * string base_resource_url = 4; + * @return The baseResourceUrl. + */ + public java.lang.String getBaseResourceUrl() { + java.lang.Object ref = baseResourceUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseResourceUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. This contains the base image URL for the derived image
+     * occurrence.
+     * 
+ * + * string base_resource_url = 4; + * @return The bytes for baseResourceUrl. + */ + public com.google.protobuf.ByteString + getBaseResourceUrlBytes() { + java.lang.Object ref = baseResourceUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + baseResourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. This contains the base image URL for the derived image
+     * occurrence.
+     * 
+ * + * string base_resource_url = 4; + * @param value The baseResourceUrl to set. + * @return This builder for chaining. + */ + public Builder setBaseResourceUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + baseResourceUrl_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. This contains the base image URL for the derived image
+     * occurrence.
+     * 
+ * + * string base_resource_url = 4; + * @return This builder for chaining. + */ + public Builder clearBaseResourceUrl() { + baseResourceUrl_ = getDefaultInstance().getBaseResourceUrl(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Output only. This contains the base image URL for the derived image
+     * occurrence.
+     * 
+ * + * string base_resource_url = 4; + * @param value The bytes for baseResourceUrl to set. + * @return This builder for chaining. + */ + public Builder setBaseResourceUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + baseResourceUrl_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ImageOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ImageOccurrence) + private static final io.grafeas.v1.ImageOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ImageOccurrence(); + } + + public static io.grafeas.v1.ImageOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ImageOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java new file mode 100644 index 000000000000..1de5a573a328 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java @@ -0,0 +1,123 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +public interface ImageOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ImageOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The fingerprint of the derived image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + * @return Whether the fingerprint field is set. + */ + boolean hasFingerprint(); + /** + *
+   * Required. The fingerprint of the derived image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + * @return The fingerprint. + */ + io.grafeas.v1.Fingerprint getFingerprint(); + /** + *
+   * Required. The fingerprint of the derived image.
+   * 
+ * + * .grafeas.v1.Fingerprint fingerprint = 1; + */ + io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder(); + + /** + *
+   * Output only. The number of layers by which this image differs from the
+   * associated image basis.
+   * 
+ * + * int32 distance = 2; + * @return The distance. + */ + int getDistance(); + + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + java.util.List + getLayerInfoList(); + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + io.grafeas.v1.Layer getLayerInfo(int index); + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + int getLayerInfoCount(); + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + java.util.List + getLayerInfoOrBuilderList(); + /** + *
+   * This contains layer-specific metadata, if populated it has length
+   * "distance" and is ordered with [distance] being the layer immediately
+   * following the base image and [1] being the final layer.
+   * 
+ * + * repeated .grafeas.v1.Layer layer_info = 3; + */ + io.grafeas.v1.LayerOrBuilder getLayerInfoOrBuilder( + int index); + + /** + *
+   * Output only. This contains the base image URL for the derived image
+   * occurrence.
+   * 
+ * + * string base_resource_url = 4; + * @return The baseResourceUrl. + */ + java.lang.String getBaseResourceUrl(); + /** + *
+   * Output only. This contains the base image URL for the derived image
+   * occurrence.
+   * 
+ * + * string base_resource_url = 4; + * @return The bytes for baseResourceUrl. + */ + com.google.protobuf.ByteString + getBaseResourceUrlBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java new file mode 100644 index 000000000000..e5a98d01e8fe --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java @@ -0,0 +1,1359 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.InTotoProvenance} + */ +public final class InTotoProvenance extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.InTotoProvenance) + InTotoProvenanceOrBuilder { +private static final long serialVersionUID = 0L; + // Use InTotoProvenance.newBuilder() to construct. + private InTotoProvenance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InTotoProvenance() { + materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InTotoProvenance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.InTotoProvenance.class, io.grafeas.v1.InTotoProvenance.Builder.class); + } + + public static final int BUILDER_CONFIG_FIELD_NUMBER = 1; + private io.grafeas.v1.BuilderConfig builderConfig_; + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + * @return Whether the builderConfig field is set. + */ + @java.lang.Override + public boolean hasBuilderConfig() { + return builderConfig_ != null; + } + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + * @return The builderConfig. + */ + @java.lang.Override + public io.grafeas.v1.BuilderConfig getBuilderConfig() { + return builderConfig_ == null ? io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; + } + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + @java.lang.Override + public io.grafeas.v1.BuilderConfigOrBuilder getBuilderConfigOrBuilder() { + return builderConfig_ == null ? io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; + } + + public static final int RECIPE_FIELD_NUMBER = 2; + private io.grafeas.v1.Recipe recipe_; + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.Recipe recipe = 2; + * @return Whether the recipe field is set. + */ + @java.lang.Override + public boolean hasRecipe() { + return recipe_ != null; + } + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.Recipe recipe = 2; + * @return The recipe. + */ + @java.lang.Override + public io.grafeas.v1.Recipe getRecipe() { + return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; + } + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + @java.lang.Override + public io.grafeas.v1.RecipeOrBuilder getRecipeOrBuilder() { + return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; + } + + public static final int METADATA_FIELD_NUMBER = 3; + private io.grafeas.v1.Metadata metadata_; + /** + * .grafeas.v1.Metadata metadata = 3; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * .grafeas.v1.Metadata metadata = 3; + * @return The metadata. + */ + @java.lang.Override + public io.grafeas.v1.Metadata getMetadata() { + return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + @java.lang.Override + public io.grafeas.v1.MetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; + } + + public static final int MATERIALS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList materials_; + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @return A list containing the materials. + */ + public com.google.protobuf.ProtocolStringList + getMaterialsList() { + return materials_; + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @return The count of materials. + */ + public int getMaterialsCount() { + return materials_.size(); + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @param index The index of the element to return. + * @return The materials at the given index. + */ + public java.lang.String getMaterials(int index) { + return materials_.get(index); + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @param index The index of the value to return. + * @return The bytes of the materials at the given index. + */ + public com.google.protobuf.ByteString + getMaterialsBytes(int index) { + return materials_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (builderConfig_ != null) { + output.writeMessage(1, getBuilderConfig()); + } + if (recipe_ != null) { + output.writeMessage(2, getRecipe()); + } + if (metadata_ != null) { + output.writeMessage(3, getMetadata()); + } + for (int i = 0; i < materials_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, materials_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (builderConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBuilderConfig()); + } + if (recipe_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRecipe()); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getMetadata()); + } + { + int dataSize = 0; + for (int i = 0; i < materials_.size(); i++) { + dataSize += computeStringSizeNoTag(materials_.getRaw(i)); + } + size += dataSize; + size += 1 * getMaterialsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.InTotoProvenance)) { + return super.equals(obj); + } + io.grafeas.v1.InTotoProvenance other = (io.grafeas.v1.InTotoProvenance) obj; + + if (hasBuilderConfig() != other.hasBuilderConfig()) return false; + if (hasBuilderConfig()) { + if (!getBuilderConfig() + .equals(other.getBuilderConfig())) return false; + } + if (hasRecipe() != other.hasRecipe()) return false; + if (hasRecipe()) { + if (!getRecipe() + .equals(other.getRecipe())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getMaterialsList() + .equals(other.getMaterialsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBuilderConfig()) { + hash = (37 * hash) + BUILDER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBuilderConfig().hashCode(); + } + if (hasRecipe()) { + hash = (37 * hash) + RECIPE_FIELD_NUMBER; + hash = (53 * hash) + getRecipe().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (getMaterialsCount() > 0) { + hash = (37 * hash) + MATERIALS_FIELD_NUMBER; + hash = (53 * hash) + getMaterialsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.InTotoProvenance parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.InTotoProvenance parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.InTotoProvenance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.InTotoProvenance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.InTotoProvenance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.InTotoProvenance parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.InTotoProvenance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.InTotoProvenance parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.InTotoProvenance parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.InTotoProvenance parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.InTotoProvenance parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.InTotoProvenance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.InTotoProvenance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.InTotoProvenance} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.InTotoProvenance) + io.grafeas.v1.InTotoProvenanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.InTotoProvenance.class, io.grafeas.v1.InTotoProvenance.Builder.class); + } + + // Construct using io.grafeas.v1.InTotoProvenance.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + builderConfig_ = null; + if (builderConfigBuilder_ != null) { + builderConfigBuilder_.dispose(); + builderConfigBuilder_ = null; + } + recipe_ = null; + if (recipeBuilder_ != null) { + recipeBuilder_.dispose(); + recipeBuilder_ = null; + } + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.InTotoProvenance getDefaultInstanceForType() { + return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.InTotoProvenance build() { + io.grafeas.v1.InTotoProvenance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.InTotoProvenance buildPartial() { + io.grafeas.v1.InTotoProvenance result = new io.grafeas.v1.InTotoProvenance(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.InTotoProvenance result) { + if (((bitField0_ & 0x00000008) != 0)) { + materials_ = materials_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.materials_ = materials_; + } + + private void buildPartial0(io.grafeas.v1.InTotoProvenance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.builderConfig_ = builderConfigBuilder_ == null + ? builderConfig_ + : builderConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.recipe_ = recipeBuilder_ == null + ? recipe_ + : recipeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.InTotoProvenance) { + return mergeFrom((io.grafeas.v1.InTotoProvenance)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.InTotoProvenance other) { + if (other == io.grafeas.v1.InTotoProvenance.getDefaultInstance()) return this; + if (other.hasBuilderConfig()) { + mergeBuilderConfig(other.getBuilderConfig()); + } + if (other.hasRecipe()) { + mergeRecipe(other.getRecipe()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (!other.materials_.isEmpty()) { + if (materials_.isEmpty()) { + materials_ = other.materials_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureMaterialsIsMutable(); + materials_.addAll(other.materials_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getBuilderConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getRecipeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + ensureMaterialsIsMutable(); + materials_.add(s); + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.BuilderConfig builderConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuilderConfig, io.grafeas.v1.BuilderConfig.Builder, io.grafeas.v1.BuilderConfigOrBuilder> builderConfigBuilder_; + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + * @return Whether the builderConfig field is set. + */ + public boolean hasBuilderConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + * @return The builderConfig. + */ + public io.grafeas.v1.BuilderConfig getBuilderConfig() { + if (builderConfigBuilder_ == null) { + return builderConfig_ == null ? io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; + } else { + return builderConfigBuilder_.getMessage(); + } + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + public Builder setBuilderConfig(io.grafeas.v1.BuilderConfig value) { + if (builderConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + builderConfig_ = value; + } else { + builderConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + public Builder setBuilderConfig( + io.grafeas.v1.BuilderConfig.Builder builderForValue) { + if (builderConfigBuilder_ == null) { + builderConfig_ = builderForValue.build(); + } else { + builderConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + public Builder mergeBuilderConfig(io.grafeas.v1.BuilderConfig value) { + if (builderConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + builderConfig_ != null && + builderConfig_ != io.grafeas.v1.BuilderConfig.getDefaultInstance()) { + getBuilderConfigBuilder().mergeFrom(value); + } else { + builderConfig_ = value; + } + } else { + builderConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + public Builder clearBuilderConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + builderConfig_ = null; + if (builderConfigBuilder_ != null) { + builderConfigBuilder_.dispose(); + builderConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + public io.grafeas.v1.BuilderConfig.Builder getBuilderConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBuilderConfigFieldBuilder().getBuilder(); + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + public io.grafeas.v1.BuilderConfigOrBuilder getBuilderConfigOrBuilder() { + if (builderConfigBuilder_ != null) { + return builderConfigBuilder_.getMessageOrBuilder(); + } else { + return builderConfig_ == null ? + io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; + } + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuilderConfig, io.grafeas.v1.BuilderConfig.Builder, io.grafeas.v1.BuilderConfigOrBuilder> + getBuilderConfigFieldBuilder() { + if (builderConfigBuilder_ == null) { + builderConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuilderConfig, io.grafeas.v1.BuilderConfig.Builder, io.grafeas.v1.BuilderConfigOrBuilder>( + getBuilderConfig(), + getParentForChildren(), + isClean()); + builderConfig_ = null; + } + return builderConfigBuilder_; + } + + private io.grafeas.v1.Recipe recipe_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Recipe, io.grafeas.v1.Recipe.Builder, io.grafeas.v1.RecipeOrBuilder> recipeBuilder_; + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + * @return Whether the recipe field is set. + */ + public boolean hasRecipe() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + * @return The recipe. + */ + public io.grafeas.v1.Recipe getRecipe() { + if (recipeBuilder_ == null) { + return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; + } else { + return recipeBuilder_.getMessage(); + } + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + public Builder setRecipe(io.grafeas.v1.Recipe value) { + if (recipeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + recipe_ = value; + } else { + recipeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + public Builder setRecipe( + io.grafeas.v1.Recipe.Builder builderForValue) { + if (recipeBuilder_ == null) { + recipe_ = builderForValue.build(); + } else { + recipeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + public Builder mergeRecipe(io.grafeas.v1.Recipe value) { + if (recipeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + recipe_ != null && + recipe_ != io.grafeas.v1.Recipe.getDefaultInstance()) { + getRecipeBuilder().mergeFrom(value); + } else { + recipe_ = value; + } + } else { + recipeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + public Builder clearRecipe() { + bitField0_ = (bitField0_ & ~0x00000002); + recipe_ = null; + if (recipeBuilder_ != null) { + recipeBuilder_.dispose(); + recipeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + public io.grafeas.v1.Recipe.Builder getRecipeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRecipeFieldBuilder().getBuilder(); + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + public io.grafeas.v1.RecipeOrBuilder getRecipeOrBuilder() { + if (recipeBuilder_ != null) { + return recipeBuilder_.getMessageOrBuilder(); + } else { + return recipe_ == null ? + io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; + } + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Recipe, io.grafeas.v1.Recipe.Builder, io.grafeas.v1.RecipeOrBuilder> + getRecipeFieldBuilder() { + if (recipeBuilder_ == null) { + recipeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Recipe, io.grafeas.v1.Recipe.Builder, io.grafeas.v1.RecipeOrBuilder>( + getRecipe(), + getParentForChildren(), + isClean()); + recipe_ = null; + } + return recipeBuilder_; + } + + private io.grafeas.v1.Metadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Metadata, io.grafeas.v1.Metadata.Builder, io.grafeas.v1.MetadataOrBuilder> metadataBuilder_; + /** + * .grafeas.v1.Metadata metadata = 3; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .grafeas.v1.Metadata metadata = 3; + * @return The metadata. + */ + public io.grafeas.v1.Metadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + public Builder setMetadata(io.grafeas.v1.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + public Builder setMetadata( + io.grafeas.v1.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + public Builder mergeMetadata(io.grafeas.v1.Metadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + metadata_ != null && + metadata_ != io.grafeas.v1.Metadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + public io.grafeas.v1.Metadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + public io.grafeas.v1.MetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; + } + } + /** + * .grafeas.v1.Metadata metadata = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Metadata, io.grafeas.v1.Metadata.Builder, io.grafeas.v1.MetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Metadata, io.grafeas.v1.Metadata.Builder, io.grafeas.v1.MetadataOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private com.google.protobuf.LazyStringList materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureMaterialsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + materials_ = new com.google.protobuf.LazyStringArrayList(materials_); + bitField0_ |= 0x00000008; + } + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @return A list containing the materials. + */ + public com.google.protobuf.ProtocolStringList + getMaterialsList() { + return materials_.getUnmodifiableView(); + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @return The count of materials. + */ + public int getMaterialsCount() { + return materials_.size(); + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @param index The index of the element to return. + * @return The materials at the given index. + */ + public java.lang.String getMaterials(int index) { + return materials_.get(index); + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @param index The index of the value to return. + * @return The bytes of the materials at the given index. + */ + public com.google.protobuf.ByteString + getMaterialsBytes(int index) { + return materials_.getByteString(index); + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @param index The index to set the value at. + * @param value The materials to set. + * @return This builder for chaining. + */ + public Builder setMaterials( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureMaterialsIsMutable(); + materials_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @param value The materials to add. + * @return This builder for chaining. + */ + public Builder addMaterials( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureMaterialsIsMutable(); + materials_.add(value); + onChanged(); + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @param values The materials to add. + * @return This builder for chaining. + */ + public Builder addAllMaterials( + java.lang.Iterable values) { + ensureMaterialsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, materials_); + onChanged(); + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @return This builder for chaining. + */ + public Builder clearMaterials() { + materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated string materials = 4; + * @param value The bytes of the materials to add. + * @return This builder for chaining. + */ + public Builder addMaterialsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureMaterialsIsMutable(); + materials_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.InTotoProvenance) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.InTotoProvenance) + private static final io.grafeas.v1.InTotoProvenance DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.InTotoProvenance(); + } + + public static io.grafeas.v1.InTotoProvenance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InTotoProvenance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.InTotoProvenance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java new file mode 100644 index 000000000000..b24aa48eb140 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java @@ -0,0 +1,140 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +public interface InTotoProvenanceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.InTotoProvenance) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + * @return Whether the builderConfig field is set. + */ + boolean hasBuilderConfig(); + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + * @return The builderConfig. + */ + io.grafeas.v1.BuilderConfig getBuilderConfig(); + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.BuilderConfig builder_config = 1; + */ + io.grafeas.v1.BuilderConfigOrBuilder getBuilderConfigOrBuilder(); + + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.Recipe recipe = 2; + * @return Whether the recipe field is set. + */ + boolean hasRecipe(); + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.Recipe recipe = 2; + * @return The recipe. + */ + io.grafeas.v1.Recipe getRecipe(); + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.Recipe recipe = 2; + */ + io.grafeas.v1.RecipeOrBuilder getRecipeOrBuilder(); + + /** + * .grafeas.v1.Metadata metadata = 3; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * .grafeas.v1.Metadata metadata = 3; + * @return The metadata. + */ + io.grafeas.v1.Metadata getMetadata(); + /** + * .grafeas.v1.Metadata metadata = 3; + */ + io.grafeas.v1.MetadataOrBuilder getMetadataOrBuilder(); + + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @return A list containing the materials. + */ + java.util.List + getMaterialsList(); + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @return The count of materials. + */ + int getMaterialsCount(); + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @param index The index of the element to return. + * @return The materials at the given index. + */ + java.lang.String getMaterials(int index); + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated string materials = 4; + * @param index The index of the value to return. + * @return The bytes of the materials at the given index. + */ + com.google.protobuf.ByteString + getMaterialsBytes(int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java new file mode 100644 index 000000000000..338b8a798f77 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java @@ -0,0 +1,115 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +public final class InTotoProvenanceProto { + private InTotoProvenanceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Recipe_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Recipe_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Completeness_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Completeness_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Metadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Metadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BuilderConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_InTotoProvenance_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\"grafeas/v1/intoto_provenance.proto\022\ngr" + + "afeas.v1\032\031google/protobuf/any.proto\032\037goo" + + "gle/protobuf/timestamp.proto\"\234\001\n\006Recipe\022" + + "\014\n\004type\030\001 \001(\t\022\033\n\023defined_in_material\030\002 \001" + + "(\003\022\023\n\013entry_point\030\003 \001(\t\022\'\n\targuments\030\004 \003" + + "(\0132\024.google.protobuf.Any\022)\n\013environment\030" + + "\005 \003(\0132\024.google.protobuf.Any\"I\n\014Completen" + + "ess\022\021\n\targuments\030\001 \001(\010\022\023\n\013environment\030\002 " + + "\001(\010\022\021\n\tmaterials\030\003 \001(\010\"\332\001\n\010Metadata\022\033\n\023b" + + "uild_invocation_id\030\001 \001(\t\0224\n\020build_starte" + + "d_on\030\002 \001(\0132\032.google.protobuf.Timestamp\0225" + + "\n\021build_finished_on\030\003 \001(\0132\032.google.proto" + + "buf.Timestamp\022.\n\014completeness\030\004 \001(\0132\030.gr" + + "afeas.v1.Completeness\022\024\n\014reproducible\030\005 " + + "\001(\010\"\033\n\rBuilderConfig\022\n\n\002id\030\001 \001(\t\"\244\001\n\020InT" + + "otoProvenance\0221\n\016builder_config\030\001 \001(\0132\031." + + "grafeas.v1.BuilderConfig\022\"\n\006recipe\030\002 \001(\013" + + "2\022.grafeas.v1.Recipe\022&\n\010metadata\030\003 \001(\0132\024" + + ".grafeas.v1.Metadata\022\021\n\tmaterials\030\004 \003(\tB" + + "h\n\rio.grafeas.v1B\025InTotoProvenanceProtoP" + + "\001Z8google.golang.org/genproto/googleapis" + + "/grafeas/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.AnyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_grafeas_v1_Recipe_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_Recipe_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Recipe_descriptor, + new java.lang.String[] { "Type", "DefinedInMaterial", "EntryPoint", "Arguments", "Environment", }); + internal_static_grafeas_v1_Completeness_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Completeness_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Completeness_descriptor, + new java.lang.String[] { "Arguments", "Environment", "Materials", }); + internal_static_grafeas_v1_Metadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_Metadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Metadata_descriptor, + new java.lang.String[] { "BuildInvocationId", "BuildStartedOn", "BuildFinishedOn", "Completeness", "Reproducible", }); + internal_static_grafeas_v1_BuilderConfig_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BuilderConfig_descriptor, + new java.lang.String[] { "Id", }); + internal_static_grafeas_v1_InTotoProvenance_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_InTotoProvenance_descriptor, + new java.lang.String[] { "BuilderConfig", "Recipe", "Metadata", "Materials", }); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java new file mode 100644 index 000000000000..5f36886717b9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java @@ -0,0 +1,1802 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_statement.proto + +package io.grafeas.v1; + +/** + *
+ * Spec defined at
+ * https://github.com/in-toto/attestation/tree/main/spec#statement The
+ * serialized InTotoStatement will be stored as Envelope.payload.
+ * Envelope.payloadType is always "application/vnd.in-toto+json".
+ * 
+ * + * Protobuf type {@code grafeas.v1.InTotoStatement} + */ +public final class InTotoStatement extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.InTotoStatement) + InTotoStatementOrBuilder { +private static final long serialVersionUID = 0L; + // Use InTotoStatement.newBuilder() to construct. + private InTotoStatement(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InTotoStatement() { + type_ = ""; + subject_ = java.util.Collections.emptyList(); + predicateType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InTotoStatement(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.InTotoStatement.class, io.grafeas.v1.InTotoStatement.Builder.class); + } + + private int predicateCase_ = 0; + private java.lang.Object predicate_; + public enum PredicateCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PROVENANCE(4), + SLSA_PROVENANCE(5), + SLSA_PROVENANCE_ZERO_TWO(6), + PREDICATE_NOT_SET(0); + private final int value; + private PredicateCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PredicateCase valueOf(int value) { + return forNumber(value); + } + + public static PredicateCase forNumber(int value) { + switch (value) { + case 4: return PROVENANCE; + case 5: return SLSA_PROVENANCE; + case 6: return SLSA_PROVENANCE_ZERO_TWO; + case 0: return PREDICATE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public PredicateCase + getPredicateCase() { + return PredicateCase.forNumber( + predicateCase_); + } + + public static final int TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + *
+   * Always `https://in-toto.io/Statement/v0.1`.
+   * 
+ * + * string type = 1 [json_name = "_type"]; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * Always `https://in-toto.io/Statement/v0.1`.
+   * 
+ * + * string type = 1 [json_name = "_type"]; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List subject_; + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + @java.lang.Override + public java.util.List getSubjectList() { + return subject_; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + @java.lang.Override + public java.util.List + getSubjectOrBuilderList() { + return subject_; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + @java.lang.Override + public int getSubjectCount() { + return subject_.size(); + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + @java.lang.Override + public io.grafeas.v1.Subject getSubject(int index) { + return subject_.get(index); + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + @java.lang.Override + public io.grafeas.v1.SubjectOrBuilder getSubjectOrBuilder( + int index) { + return subject_.get(index); + } + + public static final int PREDICATE_TYPE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object predicateType_ = ""; + /** + *
+   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+   * 
+ * + * string predicate_type = 3; + * @return The predicateType. + */ + @java.lang.Override + public java.lang.String getPredicateType() { + java.lang.Object ref = predicateType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + predicateType_ = s; + return s; + } + } + /** + *
+   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+   * 
+ * + * string predicate_type = 3; + * @return The bytes for predicateType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPredicateTypeBytes() { + java.lang.Object ref = predicateType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + predicateType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROVENANCE_FIELD_NUMBER = 4; + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + * @return Whether the provenance field is set. + */ + @java.lang.Override + public boolean hasProvenance() { + return predicateCase_ == 4; + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + * @return The provenance. + */ + @java.lang.Override + public io.grafeas.v1.InTotoProvenance getProvenance() { + if (predicateCase_ == 4) { + return (io.grafeas.v1.InTotoProvenance) predicate_; + } + return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + @java.lang.Override + public io.grafeas.v1.InTotoProvenanceOrBuilder getProvenanceOrBuilder() { + if (predicateCase_ == 4) { + return (io.grafeas.v1.InTotoProvenance) predicate_; + } + return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); + } + + public static final int SLSA_PROVENANCE_FIELD_NUMBER = 5; + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + * @return Whether the slsaProvenance field is set. + */ + @java.lang.Override + public boolean hasSlsaProvenance() { + return predicateCase_ == 5; + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + * @return The slsaProvenance. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance getSlsaProvenance() { + if (predicateCase_ == 5) { + return (io.grafeas.v1.SlsaProvenance) predicate_; + } + return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceOrBuilder getSlsaProvenanceOrBuilder() { + if (predicateCase_ == 5) { + return (io.grafeas.v1.SlsaProvenance) predicate_; + } + return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); + } + + public static final int SLSA_PROVENANCE_ZERO_TWO_FIELD_NUMBER = 6; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + * @return Whether the slsaProvenanceZeroTwo field is set. + */ + @java.lang.Override + public boolean hasSlsaProvenanceZeroTwo() { + return predicateCase_ == 6; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + * @return The slsaProvenanceZeroTwo. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo getSlsaProvenanceZeroTwo() { + if (predicateCase_ == 6) { + return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; + } + return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder getSlsaProvenanceZeroTwoOrBuilder() { + if (predicateCase_ == 6) { + return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; + } + return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + for (int i = 0; i < subject_.size(); i++) { + output.writeMessage(2, subject_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(predicateType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, predicateType_); + } + if (predicateCase_ == 4) { + output.writeMessage(4, (io.grafeas.v1.InTotoProvenance) predicate_); + } + if (predicateCase_ == 5) { + output.writeMessage(5, (io.grafeas.v1.SlsaProvenance) predicate_); + } + if (predicateCase_ == 6) { + output.writeMessage(6, (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + for (int i = 0; i < subject_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, subject_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(predicateType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, predicateType_); + } + if (predicateCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (io.grafeas.v1.InTotoProvenance) predicate_); + } + if (predicateCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (io.grafeas.v1.SlsaProvenance) predicate_); + } + if (predicateCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.InTotoStatement)) { + return super.equals(obj); + } + io.grafeas.v1.InTotoStatement other = (io.grafeas.v1.InTotoStatement) obj; + + if (!getType() + .equals(other.getType())) return false; + if (!getSubjectList() + .equals(other.getSubjectList())) return false; + if (!getPredicateType() + .equals(other.getPredicateType())) return false; + if (!getPredicateCase().equals(other.getPredicateCase())) return false; + switch (predicateCase_) { + case 4: + if (!getProvenance() + .equals(other.getProvenance())) return false; + break; + case 5: + if (!getSlsaProvenance() + .equals(other.getSlsaProvenance())) return false; + break; + case 6: + if (!getSlsaProvenanceZeroTwo() + .equals(other.getSlsaProvenanceZeroTwo())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (getSubjectCount() > 0) { + hash = (37 * hash) + SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getSubjectList().hashCode(); + } + hash = (37 * hash) + PREDICATE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPredicateType().hashCode(); + switch (predicateCase_) { + case 4: + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenance().hashCode(); + break; + case 5: + hash = (37 * hash) + SLSA_PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getSlsaProvenance().hashCode(); + break; + case 6: + hash = (37 * hash) + SLSA_PROVENANCE_ZERO_TWO_FIELD_NUMBER; + hash = (53 * hash) + getSlsaProvenanceZeroTwo().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.InTotoStatement parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.InTotoStatement parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.InTotoStatement parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.InTotoStatement parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.InTotoStatement parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.InTotoStatement parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.InTotoStatement parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.InTotoStatement parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.InTotoStatement parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.InTotoStatement parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.InTotoStatement parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.InTotoStatement parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.InTotoStatement prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Spec defined at
+   * https://github.com/in-toto/attestation/tree/main/spec#statement The
+   * serialized InTotoStatement will be stored as Envelope.payload.
+   * Envelope.payloadType is always "application/vnd.in-toto+json".
+   * 
+ * + * Protobuf type {@code grafeas.v1.InTotoStatement} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.InTotoStatement) + io.grafeas.v1.InTotoStatementOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.InTotoStatement.class, io.grafeas.v1.InTotoStatement.Builder.class); + } + + // Construct using io.grafeas.v1.InTotoStatement.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + if (subjectBuilder_ == null) { + subject_ = java.util.Collections.emptyList(); + } else { + subject_ = null; + subjectBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + predicateType_ = ""; + if (provenanceBuilder_ != null) { + provenanceBuilder_.clear(); + } + if (slsaProvenanceBuilder_ != null) { + slsaProvenanceBuilder_.clear(); + } + if (slsaProvenanceZeroTwoBuilder_ != null) { + slsaProvenanceZeroTwoBuilder_.clear(); + } + predicateCase_ = 0; + predicate_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.InTotoStatement getDefaultInstanceForType() { + return io.grafeas.v1.InTotoStatement.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.InTotoStatement build() { + io.grafeas.v1.InTotoStatement result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.InTotoStatement buildPartial() { + io.grafeas.v1.InTotoStatement result = new io.grafeas.v1.InTotoStatement(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.InTotoStatement result) { + if (subjectBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + subject_ = java.util.Collections.unmodifiableList(subject_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.subject_ = subject_; + } else { + result.subject_ = subjectBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.InTotoStatement result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.predicateType_ = predicateType_; + } + } + + private void buildPartialOneofs(io.grafeas.v1.InTotoStatement result) { + result.predicateCase_ = predicateCase_; + result.predicate_ = this.predicate_; + if (predicateCase_ == 4 && + provenanceBuilder_ != null) { + result.predicate_ = provenanceBuilder_.build(); + } + if (predicateCase_ == 5 && + slsaProvenanceBuilder_ != null) { + result.predicate_ = slsaProvenanceBuilder_.build(); + } + if (predicateCase_ == 6 && + slsaProvenanceZeroTwoBuilder_ != null) { + result.predicate_ = slsaProvenanceZeroTwoBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.InTotoStatement) { + return mergeFrom((io.grafeas.v1.InTotoStatement)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.InTotoStatement other) { + if (other == io.grafeas.v1.InTotoStatement.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (subjectBuilder_ == null) { + if (!other.subject_.isEmpty()) { + if (subject_.isEmpty()) { + subject_ = other.subject_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSubjectIsMutable(); + subject_.addAll(other.subject_); + } + onChanged(); + } + } else { + if (!other.subject_.isEmpty()) { + if (subjectBuilder_.isEmpty()) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + subject_ = other.subject_; + bitField0_ = (bitField0_ & ~0x00000002); + subjectBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubjectFieldBuilder() : null; + } else { + subjectBuilder_.addAllMessages(other.subject_); + } + } + } + if (!other.getPredicateType().isEmpty()) { + predicateType_ = other.predicateType_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getPredicateCase()) { + case PROVENANCE: { + mergeProvenance(other.getProvenance()); + break; + } + case SLSA_PROVENANCE: { + mergeSlsaProvenance(other.getSlsaProvenance()); + break; + } + case SLSA_PROVENANCE_ZERO_TWO: { + mergeSlsaProvenanceZeroTwo(other.getSlsaProvenanceZeroTwo()); + break; + } + case PREDICATE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + io.grafeas.v1.Subject m = + input.readMessage( + io.grafeas.v1.Subject.parser(), + extensionRegistry); + if (subjectBuilder_ == null) { + ensureSubjectIsMutable(); + subject_.add(m); + } else { + subjectBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + predicateType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getProvenanceFieldBuilder().getBuilder(), + extensionRegistry); + predicateCase_ = 4; + break; + } // case 34 + case 42: { + input.readMessage( + getSlsaProvenanceFieldBuilder().getBuilder(), + extensionRegistry); + predicateCase_ = 5; + break; + } // case 42 + case 50: { + input.readMessage( + getSlsaProvenanceZeroTwoFieldBuilder().getBuilder(), + extensionRegistry); + predicateCase_ = 6; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int predicateCase_ = 0; + private java.lang.Object predicate_; + public PredicateCase + getPredicateCase() { + return PredicateCase.forNumber( + predicateCase_); + } + + public Builder clearPredicate() { + predicateCase_ = 0; + predicate_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + *
+     * Always `https://in-toto.io/Statement/v0.1`.
+     * 
+ * + * string type = 1 [json_name = "_type"]; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Always `https://in-toto.io/Statement/v0.1`.
+     * 
+ * + * string type = 1 [json_name = "_type"]; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Always `https://in-toto.io/Statement/v0.1`.
+     * 
+ * + * string type = 1 [json_name = "_type"]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Always `https://in-toto.io/Statement/v0.1`.
+     * 
+ * + * string type = 1 [json_name = "_type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Always `https://in-toto.io/Statement/v0.1`.
+     * 
+ * + * string type = 1 [json_name = "_type"]; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List subject_ = + java.util.Collections.emptyList(); + private void ensureSubjectIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + subject_ = new java.util.ArrayList(subject_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Subject, io.grafeas.v1.Subject.Builder, io.grafeas.v1.SubjectOrBuilder> subjectBuilder_; + + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public java.util.List getSubjectList() { + if (subjectBuilder_ == null) { + return java.util.Collections.unmodifiableList(subject_); + } else { + return subjectBuilder_.getMessageList(); + } + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public int getSubjectCount() { + if (subjectBuilder_ == null) { + return subject_.size(); + } else { + return subjectBuilder_.getCount(); + } + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public io.grafeas.v1.Subject getSubject(int index) { + if (subjectBuilder_ == null) { + return subject_.get(index); + } else { + return subjectBuilder_.getMessage(index); + } + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder setSubject( + int index, io.grafeas.v1.Subject value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectIsMutable(); + subject_.set(index, value); + onChanged(); + } else { + subjectBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder setSubject( + int index, io.grafeas.v1.Subject.Builder builderForValue) { + if (subjectBuilder_ == null) { + ensureSubjectIsMutable(); + subject_.set(index, builderForValue.build()); + onChanged(); + } else { + subjectBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder addSubject(io.grafeas.v1.Subject value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectIsMutable(); + subject_.add(value); + onChanged(); + } else { + subjectBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder addSubject( + int index, io.grafeas.v1.Subject value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectIsMutable(); + subject_.add(index, value); + onChanged(); + } else { + subjectBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder addSubject( + io.grafeas.v1.Subject.Builder builderForValue) { + if (subjectBuilder_ == null) { + ensureSubjectIsMutable(); + subject_.add(builderForValue.build()); + onChanged(); + } else { + subjectBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder addSubject( + int index, io.grafeas.v1.Subject.Builder builderForValue) { + if (subjectBuilder_ == null) { + ensureSubjectIsMutable(); + subject_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder addAllSubject( + java.lang.Iterable values) { + if (subjectBuilder_ == null) { + ensureSubjectIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subject_); + onChanged(); + } else { + subjectBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder clearSubject() { + if (subjectBuilder_ == null) { + subject_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + subjectBuilder_.clear(); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public Builder removeSubject(int index) { + if (subjectBuilder_ == null) { + ensureSubjectIsMutable(); + subject_.remove(index); + onChanged(); + } else { + subjectBuilder_.remove(index); + } + return this; + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public io.grafeas.v1.Subject.Builder getSubjectBuilder( + int index) { + return getSubjectFieldBuilder().getBuilder(index); + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public io.grafeas.v1.SubjectOrBuilder getSubjectOrBuilder( + int index) { + if (subjectBuilder_ == null) { + return subject_.get(index); } else { + return subjectBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public java.util.List + getSubjectOrBuilderList() { + if (subjectBuilder_ != null) { + return subjectBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subject_); + } + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public io.grafeas.v1.Subject.Builder addSubjectBuilder() { + return getSubjectFieldBuilder().addBuilder( + io.grafeas.v1.Subject.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public io.grafeas.v1.Subject.Builder addSubjectBuilder( + int index) { + return getSubjectFieldBuilder().addBuilder( + index, io.grafeas.v1.Subject.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + public java.util.List + getSubjectBuilderList() { + return getSubjectFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Subject, io.grafeas.v1.Subject.Builder, io.grafeas.v1.SubjectOrBuilder> + getSubjectFieldBuilder() { + if (subjectBuilder_ == null) { + subjectBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Subject, io.grafeas.v1.Subject.Builder, io.grafeas.v1.SubjectOrBuilder>( + subject_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + subject_ = null; + } + return subjectBuilder_; + } + + private java.lang.Object predicateType_ = ""; + /** + *
+     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+     * 
+ * + * string predicate_type = 3; + * @return The predicateType. + */ + public java.lang.String getPredicateType() { + java.lang.Object ref = predicateType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + predicateType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+     * 
+ * + * string predicate_type = 3; + * @return The bytes for predicateType. + */ + public com.google.protobuf.ByteString + getPredicateTypeBytes() { + java.lang.Object ref = predicateType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + predicateType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+     * 
+ * + * string predicate_type = 3; + * @param value The predicateType to set. + * @return This builder for chaining. + */ + public Builder setPredicateType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + predicateType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+     * 
+ * + * string predicate_type = 3; + * @return This builder for chaining. + */ + public Builder clearPredicateType() { + predicateType_ = getDefaultInstance().getPredicateType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+     * 
+ * + * string predicate_type = 3; + * @param value The bytes for predicateType to set. + * @return This builder for chaining. + */ + public Builder setPredicateTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + predicateType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> provenanceBuilder_; + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + * @return Whether the provenance field is set. + */ + @java.lang.Override + public boolean hasProvenance() { + return predicateCase_ == 4; + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + * @return The provenance. + */ + @java.lang.Override + public io.grafeas.v1.InTotoProvenance getProvenance() { + if (provenanceBuilder_ == null) { + if (predicateCase_ == 4) { + return (io.grafeas.v1.InTotoProvenance) predicate_; + } + return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); + } else { + if (predicateCase_ == 4) { + return provenanceBuilder_.getMessage(); + } + return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); + } + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + public Builder setProvenance(io.grafeas.v1.InTotoProvenance value) { + if (provenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + predicate_ = value; + onChanged(); + } else { + provenanceBuilder_.setMessage(value); + } + predicateCase_ = 4; + return this; + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + public Builder setProvenance( + io.grafeas.v1.InTotoProvenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + predicate_ = builderForValue.build(); + onChanged(); + } else { + provenanceBuilder_.setMessage(builderForValue.build()); + } + predicateCase_ = 4; + return this; + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + public Builder mergeProvenance(io.grafeas.v1.InTotoProvenance value) { + if (provenanceBuilder_ == null) { + if (predicateCase_ == 4 && + predicate_ != io.grafeas.v1.InTotoProvenance.getDefaultInstance()) { + predicate_ = io.grafeas.v1.InTotoProvenance.newBuilder((io.grafeas.v1.InTotoProvenance) predicate_) + .mergeFrom(value).buildPartial(); + } else { + predicate_ = value; + } + onChanged(); + } else { + if (predicateCase_ == 4) { + provenanceBuilder_.mergeFrom(value); + } else { + provenanceBuilder_.setMessage(value); + } + } + predicateCase_ = 4; + return this; + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + public Builder clearProvenance() { + if (provenanceBuilder_ == null) { + if (predicateCase_ == 4) { + predicateCase_ = 0; + predicate_ = null; + onChanged(); + } + } else { + if (predicateCase_ == 4) { + predicateCase_ = 0; + predicate_ = null; + } + provenanceBuilder_.clear(); + } + return this; + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + public io.grafeas.v1.InTotoProvenance.Builder getProvenanceBuilder() { + return getProvenanceFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + @java.lang.Override + public io.grafeas.v1.InTotoProvenanceOrBuilder getProvenanceOrBuilder() { + if ((predicateCase_ == 4) && (provenanceBuilder_ != null)) { + return provenanceBuilder_.getMessageOrBuilder(); + } else { + if (predicateCase_ == 4) { + return (io.grafeas.v1.InTotoProvenance) predicate_; + } + return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); + } + } + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + if (!(predicateCase_ == 4)) { + predicate_ = io.grafeas.v1.InTotoProvenance.getDefaultInstance(); + } + provenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder>( + (io.grafeas.v1.InTotoProvenance) predicate_, + getParentForChildren(), + isClean()); + predicate_ = null; + } + predicateCase_ = 4; + onChanged(); + return provenanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance, io.grafeas.v1.SlsaProvenance.Builder, io.grafeas.v1.SlsaProvenanceOrBuilder> slsaProvenanceBuilder_; + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + * @return Whether the slsaProvenance field is set. + */ + @java.lang.Override + public boolean hasSlsaProvenance() { + return predicateCase_ == 5; + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + * @return The slsaProvenance. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance getSlsaProvenance() { + if (slsaProvenanceBuilder_ == null) { + if (predicateCase_ == 5) { + return (io.grafeas.v1.SlsaProvenance) predicate_; + } + return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); + } else { + if (predicateCase_ == 5) { + return slsaProvenanceBuilder_.getMessage(); + } + return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); + } + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + public Builder setSlsaProvenance(io.grafeas.v1.SlsaProvenance value) { + if (slsaProvenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + predicate_ = value; + onChanged(); + } else { + slsaProvenanceBuilder_.setMessage(value); + } + predicateCase_ = 5; + return this; + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + public Builder setSlsaProvenance( + io.grafeas.v1.SlsaProvenance.Builder builderForValue) { + if (slsaProvenanceBuilder_ == null) { + predicate_ = builderForValue.build(); + onChanged(); + } else { + slsaProvenanceBuilder_.setMessage(builderForValue.build()); + } + predicateCase_ = 5; + return this; + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + public Builder mergeSlsaProvenance(io.grafeas.v1.SlsaProvenance value) { + if (slsaProvenanceBuilder_ == null) { + if (predicateCase_ == 5 && + predicate_ != io.grafeas.v1.SlsaProvenance.getDefaultInstance()) { + predicate_ = io.grafeas.v1.SlsaProvenance.newBuilder((io.grafeas.v1.SlsaProvenance) predicate_) + .mergeFrom(value).buildPartial(); + } else { + predicate_ = value; + } + onChanged(); + } else { + if (predicateCase_ == 5) { + slsaProvenanceBuilder_.mergeFrom(value); + } else { + slsaProvenanceBuilder_.setMessage(value); + } + } + predicateCase_ = 5; + return this; + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + public Builder clearSlsaProvenance() { + if (slsaProvenanceBuilder_ == null) { + if (predicateCase_ == 5) { + predicateCase_ = 0; + predicate_ = null; + onChanged(); + } + } else { + if (predicateCase_ == 5) { + predicateCase_ = 0; + predicate_ = null; + } + slsaProvenanceBuilder_.clear(); + } + return this; + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + public io.grafeas.v1.SlsaProvenance.Builder getSlsaProvenanceBuilder() { + return getSlsaProvenanceFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceOrBuilder getSlsaProvenanceOrBuilder() { + if ((predicateCase_ == 5) && (slsaProvenanceBuilder_ != null)) { + return slsaProvenanceBuilder_.getMessageOrBuilder(); + } else { + if (predicateCase_ == 5) { + return (io.grafeas.v1.SlsaProvenance) predicate_; + } + return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); + } + } + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance, io.grafeas.v1.SlsaProvenance.Builder, io.grafeas.v1.SlsaProvenanceOrBuilder> + getSlsaProvenanceFieldBuilder() { + if (slsaProvenanceBuilder_ == null) { + if (!(predicateCase_ == 5)) { + predicate_ = io.grafeas.v1.SlsaProvenance.getDefaultInstance(); + } + slsaProvenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance, io.grafeas.v1.SlsaProvenance.Builder, io.grafeas.v1.SlsaProvenanceOrBuilder>( + (io.grafeas.v1.SlsaProvenance) predicate_, + getParentForChildren(), + isClean()); + predicate_ = null; + } + predicateCase_ = 5; + onChanged(); + return slsaProvenanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder, io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder> slsaProvenanceZeroTwoBuilder_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + * @return Whether the slsaProvenanceZeroTwo field is set. + */ + @java.lang.Override + public boolean hasSlsaProvenanceZeroTwo() { + return predicateCase_ == 6; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + * @return The slsaProvenanceZeroTwo. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo getSlsaProvenanceZeroTwo() { + if (slsaProvenanceZeroTwoBuilder_ == null) { + if (predicateCase_ == 6) { + return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; + } + return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); + } else { + if (predicateCase_ == 6) { + return slsaProvenanceZeroTwoBuilder_.getMessage(); + } + return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + public Builder setSlsaProvenanceZeroTwo(io.grafeas.v1.SlsaProvenanceZeroTwo value) { + if (slsaProvenanceZeroTwoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + predicate_ = value; + onChanged(); + } else { + slsaProvenanceZeroTwoBuilder_.setMessage(value); + } + predicateCase_ = 6; + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + public Builder setSlsaProvenanceZeroTwo( + io.grafeas.v1.SlsaProvenanceZeroTwo.Builder builderForValue) { + if (slsaProvenanceZeroTwoBuilder_ == null) { + predicate_ = builderForValue.build(); + onChanged(); + } else { + slsaProvenanceZeroTwoBuilder_.setMessage(builderForValue.build()); + } + predicateCase_ = 6; + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + public Builder mergeSlsaProvenanceZeroTwo(io.grafeas.v1.SlsaProvenanceZeroTwo value) { + if (slsaProvenanceZeroTwoBuilder_ == null) { + if (predicateCase_ == 6 && + predicate_ != io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance()) { + predicate_ = io.grafeas.v1.SlsaProvenanceZeroTwo.newBuilder((io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_) + .mergeFrom(value).buildPartial(); + } else { + predicate_ = value; + } + onChanged(); + } else { + if (predicateCase_ == 6) { + slsaProvenanceZeroTwoBuilder_.mergeFrom(value); + } else { + slsaProvenanceZeroTwoBuilder_.setMessage(value); + } + } + predicateCase_ = 6; + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + public Builder clearSlsaProvenanceZeroTwo() { + if (slsaProvenanceZeroTwoBuilder_ == null) { + if (predicateCase_ == 6) { + predicateCase_ = 0; + predicate_ = null; + onChanged(); + } + } else { + if (predicateCase_ == 6) { + predicateCase_ = 0; + predicate_ = null; + } + slsaProvenanceZeroTwoBuilder_.clear(); + } + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.Builder getSlsaProvenanceZeroTwoBuilder() { + return getSlsaProvenanceZeroTwoFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder getSlsaProvenanceZeroTwoOrBuilder() { + if ((predicateCase_ == 6) && (slsaProvenanceZeroTwoBuilder_ != null)) { + return slsaProvenanceZeroTwoBuilder_.getMessageOrBuilder(); + } else { + if (predicateCase_ == 6) { + return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; + } + return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder, io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder> + getSlsaProvenanceZeroTwoFieldBuilder() { + if (slsaProvenanceZeroTwoBuilder_ == null) { + if (!(predicateCase_ == 6)) { + predicate_ = io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); + } + slsaProvenanceZeroTwoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder, io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder>( + (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_, + getParentForChildren(), + isClean()); + predicate_ = null; + } + predicateCase_ = 6; + onChanged(); + return slsaProvenanceZeroTwoBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.InTotoStatement) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.InTotoStatement) + private static final io.grafeas.v1.InTotoStatement DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.InTotoStatement(); + } + + public static io.grafeas.v1.InTotoStatement getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InTotoStatement parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.InTotoStatement getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java new file mode 100644 index 000000000000..0f28f2f9126d --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java @@ -0,0 +1,120 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_statement.proto + +package io.grafeas.v1; + +public interface InTotoStatementOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.InTotoStatement) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Always `https://in-toto.io/Statement/v0.1`.
+   * 
+ * + * string type = 1 [json_name = "_type"]; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * Always `https://in-toto.io/Statement/v0.1`.
+   * 
+ * + * string type = 1 [json_name = "_type"]; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + java.util.List + getSubjectList(); + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + io.grafeas.v1.Subject getSubject(int index); + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + int getSubjectCount(); + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + java.util.List + getSubjectOrBuilderList(); + /** + * repeated .grafeas.v1.Subject subject = 2; + */ + io.grafeas.v1.SubjectOrBuilder getSubjectOrBuilder( + int index); + + /** + *
+   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+   * 
+ * + * string predicate_type = 3; + * @return The predicateType. + */ + java.lang.String getPredicateType(); + /** + *
+   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
+   * 
+ * + * string predicate_type = 3; + * @return The bytes for predicateType. + */ + com.google.protobuf.ByteString + getPredicateTypeBytes(); + + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + * @return Whether the provenance field is set. + */ + boolean hasProvenance(); + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + * @return The provenance. + */ + io.grafeas.v1.InTotoProvenance getProvenance(); + /** + * .grafeas.v1.InTotoProvenance provenance = 4; + */ + io.grafeas.v1.InTotoProvenanceOrBuilder getProvenanceOrBuilder(); + + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + * @return Whether the slsaProvenance field is set. + */ + boolean hasSlsaProvenance(); + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + * @return The slsaProvenance. + */ + io.grafeas.v1.SlsaProvenance getSlsaProvenance(); + /** + * .grafeas.v1.SlsaProvenance slsa_provenance = 5; + */ + io.grafeas.v1.SlsaProvenanceOrBuilder getSlsaProvenanceOrBuilder(); + + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + * @return Whether the slsaProvenanceZeroTwo field is set. + */ + boolean hasSlsaProvenanceZeroTwo(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + * @return The slsaProvenanceZeroTwo. + */ + io.grafeas.v1.SlsaProvenanceZeroTwo getSlsaProvenanceZeroTwo(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + */ + io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder getSlsaProvenanceZeroTwoOrBuilder(); + + public io.grafeas.v1.InTotoStatement.PredicateCase getPredicateCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java new file mode 100644 index 000000000000..966c8d35ded8 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_statement.proto + +package io.grafeas.v1; + +public final class InTotoStatementProto { + private InTotoStatementProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_InTotoStatement_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Subject_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Subject_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Subject_DigestEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Subject_DigestEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n!grafeas/v1/intoto_statement.proto\022\ngra" + + "feas.v1\032\"grafeas/v1/intoto_provenance.pr" + + "oto\032 grafeas/v1/slsa_provenance.proto\032)g" + + "rafeas/v1/slsa_provenance_zero_two.proto" + + "\"\243\002\n\017InTotoStatement\022\023\n\004type\030\001 \001(\tR\005_typ" + + "e\022$\n\007subject\030\002 \003(\0132\023.grafeas.v1.Subject\022" + + "\026\n\016predicate_type\030\003 \001(\t\0222\n\nprovenance\030\004 " + + "\001(\0132\034.grafeas.v1.InTotoProvenanceH\000\0225\n\017s" + + "lsa_provenance\030\005 \001(\0132\032.grafeas.v1.SlsaPr" + + "ovenanceH\000\022E\n\030slsa_provenance_zero_two\030\006" + + " \001(\0132!.grafeas.v1.SlsaProvenanceZeroTwoH" + + "\000B\013\n\tpredicate\"w\n\007Subject\022\014\n\004name\030\001 \001(\t\022" + + "/\n\006digest\030\002 \003(\0132\037.grafeas.v1.Subject.Dig" + + "estEntry\032-\n\013DigestEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + + "value\030\002 \001(\t:\0028\001Bg\n\rio.grafeas.v1B\024InToto" + + "StatementProtoP\001Z8google.golang.org/genp" + + "roto/googleapis/grafeas/v1;grafeas\242\002\003GRA" + + "b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grafeas.v1.InTotoProvenanceProto.getDescriptor(), + io.grafeas.v1.SlsaProvenanceProto.getDescriptor(), + io.grafeas.v1.SlsaProvenanceZeroTwoProto.getDescriptor(), + }); + internal_static_grafeas_v1_InTotoStatement_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_InTotoStatement_descriptor, + new java.lang.String[] { "Type", "Subject", "PredicateType", "Provenance", "SlsaProvenance", "SlsaProvenanceZeroTwo", "Predicate", }); + internal_static_grafeas_v1_Subject_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Subject_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Subject_descriptor, + new java.lang.String[] { "Name", "Digest", }); + internal_static_grafeas_v1_Subject_DigestEntry_descriptor = + internal_static_grafeas_v1_Subject_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_Subject_DigestEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Subject_DigestEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + io.grafeas.v1.InTotoProvenanceProto.getDescriptor(); + io.grafeas.v1.SlsaProvenanceProto.getDescriptor(); + io.grafeas.v1.SlsaProvenanceZeroTwoProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java new file mode 100644 index 000000000000..f0b0c75c7f9c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java @@ -0,0 +1,586 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/attestation.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.Jwt} + */ +public final class Jwt extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Jwt) + JwtOrBuilder { +private static final long serialVersionUID = 0L; + // Use Jwt.newBuilder() to construct. + private Jwt(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Jwt() { + compactJwt_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Jwt(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Jwt.class, io.grafeas.v1.Jwt.Builder.class); + } + + public static final int COMPACT_JWT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object compactJwt_ = ""; + /** + *
+   * The compact encoding of a JWS, which is always three base64 encoded strings
+   * joined by periods. For details, see:
+   * https://tools.ietf.org/html/rfc7515.html#section-3.1
+   * 
+ * + * string compact_jwt = 1; + * @return The compactJwt. + */ + @java.lang.Override + public java.lang.String getCompactJwt() { + java.lang.Object ref = compactJwt_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + compactJwt_ = s; + return s; + } + } + /** + *
+   * The compact encoding of a JWS, which is always three base64 encoded strings
+   * joined by periods. For details, see:
+   * https://tools.ietf.org/html/rfc7515.html#section-3.1
+   * 
+ * + * string compact_jwt = 1; + * @return The bytes for compactJwt. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCompactJwtBytes() { + java.lang.Object ref = compactJwt_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + compactJwt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compactJwt_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, compactJwt_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compactJwt_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, compactJwt_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Jwt)) { + return super.equals(obj); + } + io.grafeas.v1.Jwt other = (io.grafeas.v1.Jwt) obj; + + if (!getCompactJwt() + .equals(other.getCompactJwt())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COMPACT_JWT_FIELD_NUMBER; + hash = (53 * hash) + getCompactJwt().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Jwt parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Jwt parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Jwt parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Jwt parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Jwt parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Jwt parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Jwt parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Jwt parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Jwt parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Jwt parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Jwt parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Jwt parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Jwt prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.Jwt} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Jwt) + io.grafeas.v1.JwtOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Jwt.class, io.grafeas.v1.Jwt.Builder.class); + } + + // Construct using io.grafeas.v1.Jwt.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + compactJwt_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Jwt getDefaultInstanceForType() { + return io.grafeas.v1.Jwt.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Jwt build() { + io.grafeas.v1.Jwt result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Jwt buildPartial() { + io.grafeas.v1.Jwt result = new io.grafeas.v1.Jwt(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Jwt result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.compactJwt_ = compactJwt_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Jwt) { + return mergeFrom((io.grafeas.v1.Jwt)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Jwt other) { + if (other == io.grafeas.v1.Jwt.getDefaultInstance()) return this; + if (!other.getCompactJwt().isEmpty()) { + compactJwt_ = other.compactJwt_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + compactJwt_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object compactJwt_ = ""; + /** + *
+     * The compact encoding of a JWS, which is always three base64 encoded strings
+     * joined by periods. For details, see:
+     * https://tools.ietf.org/html/rfc7515.html#section-3.1
+     * 
+ * + * string compact_jwt = 1; + * @return The compactJwt. + */ + public java.lang.String getCompactJwt() { + java.lang.Object ref = compactJwt_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + compactJwt_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The compact encoding of a JWS, which is always three base64 encoded strings
+     * joined by periods. For details, see:
+     * https://tools.ietf.org/html/rfc7515.html#section-3.1
+     * 
+ * + * string compact_jwt = 1; + * @return The bytes for compactJwt. + */ + public com.google.protobuf.ByteString + getCompactJwtBytes() { + java.lang.Object ref = compactJwt_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + compactJwt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The compact encoding of a JWS, which is always three base64 encoded strings
+     * joined by periods. For details, see:
+     * https://tools.ietf.org/html/rfc7515.html#section-3.1
+     * 
+ * + * string compact_jwt = 1; + * @param value The compactJwt to set. + * @return This builder for chaining. + */ + public Builder setCompactJwt( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + compactJwt_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The compact encoding of a JWS, which is always three base64 encoded strings
+     * joined by periods. For details, see:
+     * https://tools.ietf.org/html/rfc7515.html#section-3.1
+     * 
+ * + * string compact_jwt = 1; + * @return This builder for chaining. + */ + public Builder clearCompactJwt() { + compactJwt_ = getDefaultInstance().getCompactJwt(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The compact encoding of a JWS, which is always three base64 encoded strings
+     * joined by periods. For details, see:
+     * https://tools.ietf.org/html/rfc7515.html#section-3.1
+     * 
+ * + * string compact_jwt = 1; + * @param value The bytes for compactJwt to set. + * @return This builder for chaining. + */ + public Builder setCompactJwtBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + compactJwt_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Jwt) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Jwt) + private static final io.grafeas.v1.Jwt DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Jwt(); + } + + public static io.grafeas.v1.Jwt getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Jwt parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Jwt getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java new file mode 100644 index 000000000000..b548750df7d9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/attestation.proto + +package io.grafeas.v1; + +public interface JwtOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Jwt) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The compact encoding of a JWS, which is always three base64 encoded strings
+   * joined by periods. For details, see:
+   * https://tools.ietf.org/html/rfc7515.html#section-3.1
+   * 
+ * + * string compact_jwt = 1; + * @return The compactJwt. + */ + java.lang.String getCompactJwt(); + /** + *
+   * The compact encoding of a JWS, which is always three base64 encoded strings
+   * joined by periods. For details, see:
+   * https://tools.ietf.org/html/rfc7515.html#section-3.1
+   * 
+ * + * string compact_jwt = 1; + * @return The bytes for compactJwt. + */ + com.google.protobuf.ByteString + getCompactJwtBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java new file mode 100644 index 000000000000..7c69d4115d68 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java @@ -0,0 +1,751 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +/** + *
+ * Layer holds metadata specific to a layer of a Docker image.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Layer} + */ +public final class Layer extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Layer) + LayerOrBuilder { +private static final long serialVersionUID = 0L; + // Use Layer.newBuilder() to construct. + private Layer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Layer() { + directive_ = ""; + arguments_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Layer(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Layer.class, io.grafeas.v1.Layer.Builder.class); + } + + public static final int DIRECTIVE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object directive_ = ""; + /** + *
+   * Required. The recovered Dockerfile directive used to construct this layer.
+   * See https://docs.docker.com/engine/reference/builder/ for more information.
+   * 
+ * + * string directive = 1; + * @return The directive. + */ + @java.lang.Override + public java.lang.String getDirective() { + java.lang.Object ref = directive_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + directive_ = s; + return s; + } + } + /** + *
+   * Required. The recovered Dockerfile directive used to construct this layer.
+   * See https://docs.docker.com/engine/reference/builder/ for more information.
+   * 
+ * + * string directive = 1; + * @return The bytes for directive. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDirectiveBytes() { + java.lang.Object ref = directive_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + directive_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARGUMENTS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object arguments_ = ""; + /** + *
+   * The recovered arguments to the Dockerfile directive.
+   * 
+ * + * string arguments = 2; + * @return The arguments. + */ + @java.lang.Override + public java.lang.String getArguments() { + java.lang.Object ref = arguments_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + arguments_ = s; + return s; + } + } + /** + *
+   * The recovered arguments to the Dockerfile directive.
+   * 
+ * + * string arguments = 2; + * @return The bytes for arguments. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getArgumentsBytes() { + java.lang.Object ref = arguments_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + arguments_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(directive_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, directive_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(arguments_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, arguments_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(directive_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, directive_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(arguments_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, arguments_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Layer)) { + return super.equals(obj); + } + io.grafeas.v1.Layer other = (io.grafeas.v1.Layer) obj; + + if (!getDirective() + .equals(other.getDirective())) return false; + if (!getArguments() + .equals(other.getArguments())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DIRECTIVE_FIELD_NUMBER; + hash = (53 * hash) + getDirective().hashCode(); + hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getArguments().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Layer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Layer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Layer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Layer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Layer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Layer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Layer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Layer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Layer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Layer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Layer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Layer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Layer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Layer holds metadata specific to a layer of a Docker image.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Layer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Layer) + io.grafeas.v1.LayerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Layer.class, io.grafeas.v1.Layer.Builder.class); + } + + // Construct using io.grafeas.v1.Layer.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + directive_ = ""; + arguments_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Layer getDefaultInstanceForType() { + return io.grafeas.v1.Layer.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Layer build() { + io.grafeas.v1.Layer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Layer buildPartial() { + io.grafeas.v1.Layer result = new io.grafeas.v1.Layer(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Layer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.directive_ = directive_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.arguments_ = arguments_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Layer) { + return mergeFrom((io.grafeas.v1.Layer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Layer other) { + if (other == io.grafeas.v1.Layer.getDefaultInstance()) return this; + if (!other.getDirective().isEmpty()) { + directive_ = other.directive_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getArguments().isEmpty()) { + arguments_ = other.arguments_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + directive_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + arguments_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object directive_ = ""; + /** + *
+     * Required. The recovered Dockerfile directive used to construct this layer.
+     * See https://docs.docker.com/engine/reference/builder/ for more information.
+     * 
+ * + * string directive = 1; + * @return The directive. + */ + public java.lang.String getDirective() { + java.lang.Object ref = directive_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + directive_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The recovered Dockerfile directive used to construct this layer.
+     * See https://docs.docker.com/engine/reference/builder/ for more information.
+     * 
+ * + * string directive = 1; + * @return The bytes for directive. + */ + public com.google.protobuf.ByteString + getDirectiveBytes() { + java.lang.Object ref = directive_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + directive_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The recovered Dockerfile directive used to construct this layer.
+     * See https://docs.docker.com/engine/reference/builder/ for more information.
+     * 
+ * + * string directive = 1; + * @param value The directive to set. + * @return This builder for chaining. + */ + public Builder setDirective( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + directive_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The recovered Dockerfile directive used to construct this layer.
+     * See https://docs.docker.com/engine/reference/builder/ for more information.
+     * 
+ * + * string directive = 1; + * @return This builder for chaining. + */ + public Builder clearDirective() { + directive_ = getDefaultInstance().getDirective(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The recovered Dockerfile directive used to construct this layer.
+     * See https://docs.docker.com/engine/reference/builder/ for more information.
+     * 
+ * + * string directive = 1; + * @param value The bytes for directive to set. + * @return This builder for chaining. + */ + public Builder setDirectiveBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + directive_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object arguments_ = ""; + /** + *
+     * The recovered arguments to the Dockerfile directive.
+     * 
+ * + * string arguments = 2; + * @return The arguments. + */ + public java.lang.String getArguments() { + java.lang.Object ref = arguments_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + arguments_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The recovered arguments to the Dockerfile directive.
+     * 
+ * + * string arguments = 2; + * @return The bytes for arguments. + */ + public com.google.protobuf.ByteString + getArgumentsBytes() { + java.lang.Object ref = arguments_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + arguments_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The recovered arguments to the Dockerfile directive.
+     * 
+ * + * string arguments = 2; + * @param value The arguments to set. + * @return This builder for chaining. + */ + public Builder setArguments( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + arguments_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The recovered arguments to the Dockerfile directive.
+     * 
+ * + * string arguments = 2; + * @return This builder for chaining. + */ + public Builder clearArguments() { + arguments_ = getDefaultInstance().getArguments(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The recovered arguments to the Dockerfile directive.
+     * 
+ * + * string arguments = 2; + * @param value The bytes for arguments to set. + * @return This builder for chaining. + */ + public Builder setArgumentsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + arguments_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Layer) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Layer) + private static final io.grafeas.v1.Layer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Layer(); + } + + public static io.grafeas.v1.Layer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Layer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Layer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java new file mode 100644 index 000000000000..57a86a319e96 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/image.proto + +package io.grafeas.v1; + +public interface LayerOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Layer) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The recovered Dockerfile directive used to construct this layer.
+   * See https://docs.docker.com/engine/reference/builder/ for more information.
+   * 
+ * + * string directive = 1; + * @return The directive. + */ + java.lang.String getDirective(); + /** + *
+   * Required. The recovered Dockerfile directive used to construct this layer.
+   * See https://docs.docker.com/engine/reference/builder/ for more information.
+   * 
+ * + * string directive = 1; + * @return The bytes for directive. + */ + com.google.protobuf.ByteString + getDirectiveBytes(); + + /** + *
+   * The recovered arguments to the Dockerfile directive.
+   * 
+ * + * string arguments = 2; + * @return The arguments. + */ + java.lang.String getArguments(); + /** + *
+   * The recovered arguments to the Dockerfile directive.
+   * 
+ * + * string arguments = 2; + * @return The bytes for arguments. + */ + com.google.protobuf.ByteString + getArgumentsBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java new file mode 100644 index 000000000000..376885d90c5f --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java @@ -0,0 +1,772 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + *
+ * License information.
+ * 
+ * + * Protobuf type {@code grafeas.v1.License} + */ +public final class License extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.License) + LicenseOrBuilder { +private static final long serialVersionUID = 0L; + // Use License.newBuilder() to construct. + private License(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private License() { + expression_ = ""; + comments_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new License(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_License_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_License_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.License.class, io.grafeas.v1.License.Builder.class); + } + + public static final int EXPRESSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object expression_ = ""; + /** + *
+   * Often a single license can be used to represent the licensing terms.
+   * Sometimes it is necessary to include a choice of one or more licenses
+   * or some combination of license identifiers.
+   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+   * "GPL-2.0-or-later WITH Bison-exception-2.2".
+   * 
+ * + * string expression = 1; + * @return The expression. + */ + @java.lang.Override + public java.lang.String getExpression() { + java.lang.Object ref = expression_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + expression_ = s; + return s; + } + } + /** + *
+   * Often a single license can be used to represent the licensing terms.
+   * Sometimes it is necessary to include a choice of one or more licenses
+   * or some combination of license identifiers.
+   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+   * "GPL-2.0-or-later WITH Bison-exception-2.2".
+   * 
+ * + * string expression = 1; + * @return The bytes for expression. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExpressionBytes() { + java.lang.Object ref = expression_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + expression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMENTS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object comments_ = ""; + /** + *
+   * Comments
+   * 
+ * + * string comments = 2; + * @return The comments. + */ + @java.lang.Override + public java.lang.String getComments() { + java.lang.Object ref = comments_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + comments_ = s; + return s; + } + } + /** + *
+   * Comments
+   * 
+ * + * string comments = 2; + * @return The bytes for comments. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCommentsBytes() { + java.lang.Object ref = comments_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + comments_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expression_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, expression_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comments_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, comments_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expression_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, expression_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comments_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, comments_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.License)) { + return super.equals(obj); + } + io.grafeas.v1.License other = (io.grafeas.v1.License) obj; + + if (!getExpression() + .equals(other.getExpression())) return false; + if (!getComments() + .equals(other.getComments())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EXPRESSION_FIELD_NUMBER; + hash = (53 * hash) + getExpression().hashCode(); + hash = (37 * hash) + COMMENTS_FIELD_NUMBER; + hash = (53 * hash) + getComments().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.License parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.License parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.License parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.License parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.License parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.License parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.License parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.License parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.License parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.License parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.License parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.License parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.License prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * License information.
+   * 
+ * + * Protobuf type {@code grafeas.v1.License} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.License) + io.grafeas.v1.LicenseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_License_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_License_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.License.class, io.grafeas.v1.License.Builder.class); + } + + // Construct using io.grafeas.v1.License.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + expression_ = ""; + comments_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_License_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.License getDefaultInstanceForType() { + return io.grafeas.v1.License.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.License build() { + io.grafeas.v1.License result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.License buildPartial() { + io.grafeas.v1.License result = new io.grafeas.v1.License(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.License result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.expression_ = expression_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.comments_ = comments_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.License) { + return mergeFrom((io.grafeas.v1.License)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.License other) { + if (other == io.grafeas.v1.License.getDefaultInstance()) return this; + if (!other.getExpression().isEmpty()) { + expression_ = other.expression_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getComments().isEmpty()) { + comments_ = other.comments_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + expression_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + comments_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object expression_ = ""; + /** + *
+     * Often a single license can be used to represent the licensing terms.
+     * Sometimes it is necessary to include a choice of one or more licenses
+     * or some combination of license identifiers.
+     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+     * "GPL-2.0-or-later WITH Bison-exception-2.2".
+     * 
+ * + * string expression = 1; + * @return The expression. + */ + public java.lang.String getExpression() { + java.lang.Object ref = expression_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + expression_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Often a single license can be used to represent the licensing terms.
+     * Sometimes it is necessary to include a choice of one or more licenses
+     * or some combination of license identifiers.
+     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+     * "GPL-2.0-or-later WITH Bison-exception-2.2".
+     * 
+ * + * string expression = 1; + * @return The bytes for expression. + */ + public com.google.protobuf.ByteString + getExpressionBytes() { + java.lang.Object ref = expression_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + expression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Often a single license can be used to represent the licensing terms.
+     * Sometimes it is necessary to include a choice of one or more licenses
+     * or some combination of license identifiers.
+     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+     * "GPL-2.0-or-later WITH Bison-exception-2.2".
+     * 
+ * + * string expression = 1; + * @param value The expression to set. + * @return This builder for chaining. + */ + public Builder setExpression( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + expression_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Often a single license can be used to represent the licensing terms.
+     * Sometimes it is necessary to include a choice of one or more licenses
+     * or some combination of license identifiers.
+     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+     * "GPL-2.0-or-later WITH Bison-exception-2.2".
+     * 
+ * + * string expression = 1; + * @return This builder for chaining. + */ + public Builder clearExpression() { + expression_ = getDefaultInstance().getExpression(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Often a single license can be used to represent the licensing terms.
+     * Sometimes it is necessary to include a choice of one or more licenses
+     * or some combination of license identifiers.
+     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+     * "GPL-2.0-or-later WITH Bison-exception-2.2".
+     * 
+ * + * string expression = 1; + * @param value The bytes for expression to set. + * @return This builder for chaining. + */ + public Builder setExpressionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + expression_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object comments_ = ""; + /** + *
+     * Comments
+     * 
+ * + * string comments = 2; + * @return The comments. + */ + public java.lang.String getComments() { + java.lang.Object ref = comments_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + comments_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Comments
+     * 
+ * + * string comments = 2; + * @return The bytes for comments. + */ + public com.google.protobuf.ByteString + getCommentsBytes() { + java.lang.Object ref = comments_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + comments_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Comments
+     * 
+ * + * string comments = 2; + * @param value The comments to set. + * @return This builder for chaining. + */ + public Builder setComments( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + comments_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Comments
+     * 
+ * + * string comments = 2; + * @return This builder for chaining. + */ + public Builder clearComments() { + comments_ = getDefaultInstance().getComments(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Comments
+     * 
+ * + * string comments = 2; + * @param value The bytes for comments to set. + * @return This builder for chaining. + */ + public Builder setCommentsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + comments_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.License) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.License) + private static final io.grafeas.v1.License DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.License(); + } + + public static io.grafeas.v1.License getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public License parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.License getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java new file mode 100644 index 000000000000..0fa178dd2864 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public interface LicenseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.License) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Often a single license can be used to represent the licensing terms.
+   * Sometimes it is necessary to include a choice of one or more licenses
+   * or some combination of license identifiers.
+   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+   * "GPL-2.0-or-later WITH Bison-exception-2.2".
+   * 
+ * + * string expression = 1; + * @return The expression. + */ + java.lang.String getExpression(); + /** + *
+   * Often a single license can be used to represent the licensing terms.
+   * Sometimes it is necessary to include a choice of one or more licenses
+   * or some combination of license identifiers.
+   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
+   * "GPL-2.0-or-later WITH Bison-exception-2.2".
+   * 
+ * + * string expression = 1; + * @return The bytes for expression. + */ + com.google.protobuf.ByteString + getExpressionBytes(); + + /** + *
+   * Comments
+   * 
+ * + * string comments = 2; + * @return The comments. + */ + java.lang.String getComments(); + /** + *
+   * Comments
+   * 
+ * + * string comments = 2; + * @return The bytes for comments. + */ + com.google.protobuf.ByteString + getCommentsBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java new file mode 100644 index 000000000000..f10788f12a0a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java @@ -0,0 +1,997 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to list occurrences for a note.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ListNoteOccurrencesRequest} + */ +public final class ListNoteOccurrencesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ListNoteOccurrencesRequest) + ListNoteOccurrencesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListNoteOccurrencesRequest.newBuilder() to construct. + private ListNoteOccurrencesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListNoteOccurrencesRequest() { + name_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListNoteOccurrencesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNoteOccurrencesRequest.class, io.grafeas.v1.ListNoteOccurrencesRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the note to list occurrences for in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the note to list occurrences for in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + *
+   * Number of occurrences to return in the list.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ListNoteOccurrencesRequest)) { + return super.equals(obj); + } + io.grafeas.v1.ListNoteOccurrencesRequest other = (io.grafeas.v1.ListNoteOccurrencesRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ListNoteOccurrencesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to list occurrences for a note.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ListNoteOccurrencesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNoteOccurrencesRequest) + io.grafeas.v1.ListNoteOccurrencesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNoteOccurrencesRequest.class, io.grafeas.v1.ListNoteOccurrencesRequest.Builder.class); + } + + // Construct using io.grafeas.v1.ListNoteOccurrencesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesRequest getDefaultInstanceForType() { + return io.grafeas.v1.ListNoteOccurrencesRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesRequest build() { + io.grafeas.v1.ListNoteOccurrencesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesRequest buildPartial() { + io.grafeas.v1.ListNoteOccurrencesRequest result = new io.grafeas.v1.ListNoteOccurrencesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.ListNoteOccurrencesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ListNoteOccurrencesRequest) { + return mergeFrom((io.grafeas.v1.ListNoteOccurrencesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ListNoteOccurrencesRequest other) { + if (other == io.grafeas.v1.ListNoteOccurrencesRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the note to list occurrences for in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the note to list occurrences for in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the note to list occurrences for in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the note to list occurrences for in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the note to list occurrences for in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Number of occurrences to return in the list.
+     * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Number of occurrences to return in the list.
+     * 
+ * + * int32 page_size = 3; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Number of occurrences to return in the list.
+     * 
+ * + * int32 page_size = 3; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNoteOccurrencesRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ListNoteOccurrencesRequest) + private static final io.grafeas.v1.ListNoteOccurrencesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ListNoteOccurrencesRequest(); + } + + public static io.grafeas.v1.ListNoteOccurrencesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNoteOccurrencesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java new file mode 100644 index 000000000000..170d72ff8fcc --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java @@ -0,0 +1,81 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface ListNoteOccurrencesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNoteOccurrencesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the note to list occurrences for in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the note to list occurrences for in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Number of occurrences to return in the list.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java new file mode 100644 index 000000000000..8b768f9bac8a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java @@ -0,0 +1,1026 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Response for listing occurrences for a note.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ListNoteOccurrencesResponse} + */ +public final class ListNoteOccurrencesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ListNoteOccurrencesResponse) + ListNoteOccurrencesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListNoteOccurrencesResponse.newBuilder() to construct. + private ListNoteOccurrencesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListNoteOccurrencesResponse() { + occurrences_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListNoteOccurrencesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNoteOccurrencesResponse.class, io.grafeas.v1.ListNoteOccurrencesResponse.Builder.class); + } + + public static final int OCCURRENCES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List occurrences_; + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public java.util.List getOccurrencesList() { + return occurrences_; + } + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public java.util.List + getOccurrencesOrBuilderList() { + return occurrences_; + } + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public int getOccurrencesCount() { + return occurrences_.size(); + } + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public io.grafeas.v1.Occurrence getOccurrences(int index) { + return occurrences_.get(index); + } + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + return occurrences_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < occurrences_.size(); i++) { + output.writeMessage(1, occurrences_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < occurrences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, occurrences_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ListNoteOccurrencesResponse)) { + return super.equals(obj); + } + io.grafeas.v1.ListNoteOccurrencesResponse other = (io.grafeas.v1.ListNoteOccurrencesResponse) obj; + + if (!getOccurrencesList() + .equals(other.getOccurrencesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOccurrencesCount() > 0) { + hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; + hash = (53 * hash) + getOccurrencesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ListNoteOccurrencesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for listing occurrences for a note.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ListNoteOccurrencesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNoteOccurrencesResponse) + io.grafeas.v1.ListNoteOccurrencesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNoteOccurrencesResponse.class, io.grafeas.v1.ListNoteOccurrencesResponse.Builder.class); + } + + // Construct using io.grafeas.v1.ListNoteOccurrencesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + } else { + occurrences_ = null; + occurrencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesResponse getDefaultInstanceForType() { + return io.grafeas.v1.ListNoteOccurrencesResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesResponse build() { + io.grafeas.v1.ListNoteOccurrencesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesResponse buildPartial() { + io.grafeas.v1.ListNoteOccurrencesResponse result = new io.grafeas.v1.ListNoteOccurrencesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.ListNoteOccurrencesResponse result) { + if (occurrencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + occurrences_ = java.util.Collections.unmodifiableList(occurrences_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.occurrences_ = occurrences_; + } else { + result.occurrences_ = occurrencesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.ListNoteOccurrencesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ListNoteOccurrencesResponse) { + return mergeFrom((io.grafeas.v1.ListNoteOccurrencesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ListNoteOccurrencesResponse other) { + if (other == io.grafeas.v1.ListNoteOccurrencesResponse.getDefaultInstance()) return this; + if (occurrencesBuilder_ == null) { + if (!other.occurrences_.isEmpty()) { + if (occurrences_.isEmpty()) { + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOccurrencesIsMutable(); + occurrences_.addAll(other.occurrences_); + } + onChanged(); + } + } else { + if (!other.occurrences_.isEmpty()) { + if (occurrencesBuilder_.isEmpty()) { + occurrencesBuilder_.dispose(); + occurrencesBuilder_ = null; + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000001); + occurrencesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOccurrencesFieldBuilder() : null; + } else { + occurrencesBuilder_.addAllMessages(other.occurrences_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.grafeas.v1.Occurrence m = + input.readMessage( + io.grafeas.v1.Occurrence.parser(), + extensionRegistry); + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(m); + } else { + occurrencesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List occurrences_ = + java.util.Collections.emptyList(); + private void ensureOccurrencesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + occurrences_ = new java.util.ArrayList(occurrences_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; + + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List getOccurrencesList() { + if (occurrencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(occurrences_); + } else { + return occurrencesBuilder_.getMessageList(); + } + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public int getOccurrencesCount() { + if (occurrencesBuilder_ == null) { + return occurrences_.size(); + } else { + return occurrencesBuilder_.getCount(); + } + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence getOccurrences(int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); + } else { + return occurrencesBuilder_.getMessage(index); + } + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.set(index, value); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.set(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences(io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(index, value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addAllOccurrences( + java.lang.Iterable values) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, occurrences_); + onChanged(); + } else { + occurrencesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder clearOccurrences() { + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + occurrencesBuilder_.clear(); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder removeOccurrences(int index) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.remove(index); + onChanged(); + } else { + occurrencesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().getBuilder(index); + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); } else { + return occurrencesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List + getOccurrencesOrBuilderList() { + if (occurrencesBuilder_ != null) { + return occurrencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(occurrences_); + } + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { + return getOccurrencesFieldBuilder().addBuilder( + io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().addBuilder( + index, io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences attached to the specified note.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List + getOccurrencesBuilderList() { + return getOccurrencesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> + getOccurrencesFieldBuilder() { + if (occurrencesBuilder_ == null) { + occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( + occurrences_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + occurrences_ = null; + } + return occurrencesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNoteOccurrencesResponse) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ListNoteOccurrencesResponse) + private static final io.grafeas.v1.ListNoteOccurrencesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ListNoteOccurrencesResponse(); + } + + public static io.grafeas.v1.ListNoteOccurrencesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNoteOccurrencesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ListNoteOccurrencesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java new file mode 100644 index 000000000000..f3ad30711d2d --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface ListNoteOccurrencesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNoteOccurrencesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + java.util.List + getOccurrencesList(); + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + io.grafeas.v1.Occurrence getOccurrences(int index); + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + int getOccurrencesCount(); + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + java.util.List + getOccurrencesOrBuilderList(); + /** + *
+   * The occurrences attached to the specified note.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index); + + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java new file mode 100644 index 000000000000..5a5f75cc706b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java @@ -0,0 +1,1001 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to list notes.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ListNotesRequest} + */ +public final class ListNotesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ListNotesRequest) + ListNotesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListNotesRequest.newBuilder() to construct. + private ListNotesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListNotesRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListNotesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNotesRequest.class, io.grafeas.v1.ListNotesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * The name of the project to list notes for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The name of the project to list notes for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + *
+   * Number of notes to return in the list. Must be positive. Max allowed page
+   * size is 1000. If not specified, page size defaults to 20.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ListNotesRequest)) { + return super.equals(obj); + } + io.grafeas.v1.ListNotesRequest other = (io.grafeas.v1.ListNotesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ListNotesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNotesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNotesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNotesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNotesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNotesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNotesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNotesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNotesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNotesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNotesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNotesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ListNotesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to list notes.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ListNotesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNotesRequest) + io.grafeas.v1.ListNotesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNotesRequest.class, io.grafeas.v1.ListNotesRequest.Builder.class); + } + + // Construct using io.grafeas.v1.ListNotesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ListNotesRequest getDefaultInstanceForType() { + return io.grafeas.v1.ListNotesRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ListNotesRequest build() { + io.grafeas.v1.ListNotesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ListNotesRequest buildPartial() { + io.grafeas.v1.ListNotesRequest result = new io.grafeas.v1.ListNotesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.ListNotesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ListNotesRequest) { + return mergeFrom((io.grafeas.v1.ListNotesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ListNotesRequest other) { + if (other == io.grafeas.v1.ListNotesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * The name of the project to list notes for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the project to list notes for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the project to list notes for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the project to list notes for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the project to list notes for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Number of notes to return in the list. Must be positive. Max allowed page
+     * size is 1000. If not specified, page size defaults to 20.
+     * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Number of notes to return in the list. Must be positive. Max allowed page
+     * size is 1000. If not specified, page size defaults to 20.
+     * 
+ * + * int32 page_size = 3; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Number of notes to return in the list. Must be positive. Max allowed page
+     * size is 1000. If not specified, page size defaults to 20.
+     * 
+ * + * int32 page_size = 3; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNotesRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ListNotesRequest) + private static final io.grafeas.v1.ListNotesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ListNotesRequest(); + } + + public static io.grafeas.v1.ListNotesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNotesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ListNotesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java new file mode 100644 index 000000000000..eaebab9dbf1b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface ListNotesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNotesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the project to list notes for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The name of the project to list notes for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Number of notes to return in the list. Must be positive. Max allowed page
+   * size is 1000. If not specified, page size defaults to 20.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java new file mode 100644 index 000000000000..47debbe86abd --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java @@ -0,0 +1,1040 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Response for listing notes.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ListNotesResponse} + */ +public final class ListNotesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ListNotesResponse) + ListNotesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListNotesResponse.newBuilder() to construct. + private ListNotesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListNotesResponse() { + notes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListNotesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNotesResponse.class, io.grafeas.v1.ListNotesResponse.Builder.class); + } + + public static final int NOTES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List notes_; + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public java.util.List getNotesList() { + return notes_; + } + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public java.util.List + getNotesOrBuilderList() { + return notes_; + } + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public int getNotesCount() { + return notes_.size(); + } + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public io.grafeas.v1.Note getNotes(int index) { + return notes_.get(index); + } + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + @java.lang.Override + public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( + int index) { + return notes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < notes_.size(); i++) { + output.writeMessage(1, notes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < notes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, notes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ListNotesResponse)) { + return super.equals(obj); + } + io.grafeas.v1.ListNotesResponse other = (io.grafeas.v1.ListNotesResponse) obj; + + if (!getNotesList() + .equals(other.getNotesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNotesCount() > 0) { + hash = (37 * hash) + NOTES_FIELD_NUMBER; + hash = (53 * hash) + getNotesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ListNotesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNotesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNotesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNotesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNotesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListNotesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListNotesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNotesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNotesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNotesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListNotesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListNotesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ListNotesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for listing notes.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ListNotesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNotesResponse) + io.grafeas.v1.ListNotesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListNotesResponse.class, io.grafeas.v1.ListNotesResponse.Builder.class); + } + + // Construct using io.grafeas.v1.ListNotesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (notesBuilder_ == null) { + notes_ = java.util.Collections.emptyList(); + } else { + notes_ = null; + notesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ListNotesResponse getDefaultInstanceForType() { + return io.grafeas.v1.ListNotesResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ListNotesResponse build() { + io.grafeas.v1.ListNotesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ListNotesResponse buildPartial() { + io.grafeas.v1.ListNotesResponse result = new io.grafeas.v1.ListNotesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.ListNotesResponse result) { + if (notesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + notes_ = java.util.Collections.unmodifiableList(notes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.notes_ = notes_; + } else { + result.notes_ = notesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.ListNotesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ListNotesResponse) { + return mergeFrom((io.grafeas.v1.ListNotesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ListNotesResponse other) { + if (other == io.grafeas.v1.ListNotesResponse.getDefaultInstance()) return this; + if (notesBuilder_ == null) { + if (!other.notes_.isEmpty()) { + if (notes_.isEmpty()) { + notes_ = other.notes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNotesIsMutable(); + notes_.addAll(other.notes_); + } + onChanged(); + } + } else { + if (!other.notes_.isEmpty()) { + if (notesBuilder_.isEmpty()) { + notesBuilder_.dispose(); + notesBuilder_ = null; + notes_ = other.notes_; + bitField0_ = (bitField0_ & ~0x00000001); + notesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNotesFieldBuilder() : null; + } else { + notesBuilder_.addAllMessages(other.notes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.grafeas.v1.Note m = + input.readMessage( + io.grafeas.v1.Note.parser(), + extensionRegistry); + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.add(m); + } else { + notesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List notes_ = + java.util.Collections.emptyList(); + private void ensureNotesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + notes_ = new java.util.ArrayList(notes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> notesBuilder_; + + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public java.util.List getNotesList() { + if (notesBuilder_ == null) { + return java.util.Collections.unmodifiableList(notes_); + } else { + return notesBuilder_.getMessageList(); + } + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public int getNotesCount() { + if (notesBuilder_ == null) { + return notes_.size(); + } else { + return notesBuilder_.getCount(); + } + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note getNotes(int index) { + if (notesBuilder_ == null) { + return notes_.get(index); + } else { + return notesBuilder_.getMessage(index); + } + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder setNotes( + int index, io.grafeas.v1.Note value) { + if (notesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotesIsMutable(); + notes_.set(index, value); + onChanged(); + } else { + notesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder setNotes( + int index, io.grafeas.v1.Note.Builder builderForValue) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.set(index, builderForValue.build()); + onChanged(); + } else { + notesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes(io.grafeas.v1.Note value) { + if (notesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotesIsMutable(); + notes_.add(value); + onChanged(); + } else { + notesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes( + int index, io.grafeas.v1.Note value) { + if (notesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotesIsMutable(); + notes_.add(index, value); + onChanged(); + } else { + notesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes( + io.grafeas.v1.Note.Builder builderForValue) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.add(builderForValue.build()); + onChanged(); + } else { + notesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addNotes( + int index, io.grafeas.v1.Note.Builder builderForValue) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.add(index, builderForValue.build()); + onChanged(); + } else { + notesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder addAllNotes( + java.lang.Iterable values) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, notes_); + onChanged(); + } else { + notesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder clearNotes() { + if (notesBuilder_ == null) { + notes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + notesBuilder_.clear(); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public Builder removeNotes(int index) { + if (notesBuilder_ == null) { + ensureNotesIsMutable(); + notes_.remove(index); + onChanged(); + } else { + notesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note.Builder getNotesBuilder( + int index) { + return getNotesFieldBuilder().getBuilder(index); + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( + int index) { + if (notesBuilder_ == null) { + return notes_.get(index); } else { + return notesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public java.util.List + getNotesOrBuilderList() { + if (notesBuilder_ != null) { + return notesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(notes_); + } + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note.Builder addNotesBuilder() { + return getNotesFieldBuilder().addBuilder( + io.grafeas.v1.Note.getDefaultInstance()); + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public io.grafeas.v1.Note.Builder addNotesBuilder( + int index) { + return getNotesFieldBuilder().addBuilder( + index, io.grafeas.v1.Note.getDefaultInstance()); + } + /** + *
+     * The notes requested.
+     * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + public java.util.List + getNotesBuilderList() { + return getNotesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> + getNotesFieldBuilder() { + if (notesBuilder_ == null) { + notesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( + notes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + notes_ = null; + } + return notesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNotesResponse) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ListNotesResponse) + private static final io.grafeas.v1.ListNotesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ListNotesResponse(); + } + + public static io.grafeas.v1.ListNotesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNotesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ListNotesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java new file mode 100644 index 000000000000..41ae132266e5 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface ListNotesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNotesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + java.util.List + getNotesList(); + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + io.grafeas.v1.Note getNotes(int index); + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + int getNotesCount(); + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + java.util.List + getNotesOrBuilderList(); + /** + *
+   * The notes requested.
+   * 
+ * + * repeated .grafeas.v1.Note notes = 1; + */ + io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( + int index); + + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java new file mode 100644 index 000000000000..ca66bb189c1e --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java @@ -0,0 +1,1001 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to list occurrences.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ListOccurrencesRequest} + */ +public final class ListOccurrencesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ListOccurrencesRequest) + ListOccurrencesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListOccurrencesRequest.newBuilder() to construct. + private ListOccurrencesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListOccurrencesRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListOccurrencesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListOccurrencesRequest.class, io.grafeas.v1.ListOccurrencesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * The name of the project to list occurrences for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The name of the project to list occurrences for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + *
+   * Number of occurrences to return in the list. Must be positive. Max allowed
+   * page size is 1000. If not specified, page size defaults to 20.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ListOccurrencesRequest)) { + return super.equals(obj); + } + io.grafeas.v1.ListOccurrencesRequest other = (io.grafeas.v1.ListOccurrencesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListOccurrencesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListOccurrencesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ListOccurrencesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to list occurrences.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ListOccurrencesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ListOccurrencesRequest) + io.grafeas.v1.ListOccurrencesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListOccurrencesRequest.class, io.grafeas.v1.ListOccurrencesRequest.Builder.class); + } + + // Construct using io.grafeas.v1.ListOccurrencesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesRequest getDefaultInstanceForType() { + return io.grafeas.v1.ListOccurrencesRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesRequest build() { + io.grafeas.v1.ListOccurrencesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesRequest buildPartial() { + io.grafeas.v1.ListOccurrencesRequest result = new io.grafeas.v1.ListOccurrencesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.ListOccurrencesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ListOccurrencesRequest) { + return mergeFrom((io.grafeas.v1.ListOccurrencesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ListOccurrencesRequest other) { + if (other == io.grafeas.v1.ListOccurrencesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * The name of the project to list occurrences for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the project to list occurrences for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the project to list occurrences for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the project to list occurrences for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the project to list occurrences for in the form of
+     * `projects/[PROJECT_ID]`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The filter expression.
+     * 
+ * + * string filter = 2; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Number of occurrences to return in the list. Must be positive. Max allowed
+     * page size is 1000. If not specified, page size defaults to 20.
+     * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Number of occurrences to return in the list. Must be positive. Max allowed
+     * page size is 1000. If not specified, page size defaults to 20.
+     * 
+ * + * int32 page_size = 3; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Number of occurrences to return in the list. Must be positive. Max allowed
+     * page size is 1000. If not specified, page size defaults to 20.
+     * 
+ * + * int32 page_size = 3; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Token to provide to skip to a particular spot in the list.
+     * 
+ * + * string page_token = 4; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ListOccurrencesRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ListOccurrencesRequest) + private static final io.grafeas.v1.ListOccurrencesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ListOccurrencesRequest(); + } + + public static io.grafeas.v1.ListOccurrencesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOccurrencesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java new file mode 100644 index 000000000000..057e3b26a4d7 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface ListOccurrencesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ListOccurrencesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the project to list occurrences for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The name of the project to list occurrences for in the form of
+   * `projects/[PROJECT_ID]`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * The filter expression.
+   * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Number of occurrences to return in the list. Must be positive. Max allowed
+   * page size is 1000. If not specified, page size defaults to 20.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Token to provide to skip to a particular spot in the list.
+   * 
+ * + * string page_token = 4; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java new file mode 100644 index 000000000000..2a69a922f24e --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java @@ -0,0 +1,1040 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Response for listing occurrences.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ListOccurrencesResponse} + */ +public final class ListOccurrencesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ListOccurrencesResponse) + ListOccurrencesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListOccurrencesResponse.newBuilder() to construct. + private ListOccurrencesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListOccurrencesResponse() { + occurrences_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListOccurrencesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListOccurrencesResponse.class, io.grafeas.v1.ListOccurrencesResponse.Builder.class); + } + + public static final int OCCURRENCES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List occurrences_; + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public java.util.List getOccurrencesList() { + return occurrences_; + } + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public java.util.List + getOccurrencesOrBuilderList() { + return occurrences_; + } + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public int getOccurrencesCount() { + return occurrences_.size(); + } + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public io.grafeas.v1.Occurrence getOccurrences(int index) { + return occurrences_.get(index); + } + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + @java.lang.Override + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + return occurrences_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < occurrences_.size(); i++) { + output.writeMessage(1, occurrences_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < occurrences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, occurrences_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ListOccurrencesResponse)) { + return super.equals(obj); + } + io.grafeas.v1.ListOccurrencesResponse other = (io.grafeas.v1.ListOccurrencesResponse) obj; + + if (!getOccurrencesList() + .equals(other.getOccurrencesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOccurrencesCount() > 0) { + hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; + hash = (53 * hash) + getOccurrencesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListOccurrencesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ListOccurrencesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ListOccurrencesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for listing occurrences.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ListOccurrencesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ListOccurrencesResponse) + io.grafeas.v1.ListOccurrencesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ListOccurrencesResponse.class, io.grafeas.v1.ListOccurrencesResponse.Builder.class); + } + + // Construct using io.grafeas.v1.ListOccurrencesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + } else { + occurrences_ = null; + occurrencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesResponse getDefaultInstanceForType() { + return io.grafeas.v1.ListOccurrencesResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesResponse build() { + io.grafeas.v1.ListOccurrencesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesResponse buildPartial() { + io.grafeas.v1.ListOccurrencesResponse result = new io.grafeas.v1.ListOccurrencesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.ListOccurrencesResponse result) { + if (occurrencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + occurrences_ = java.util.Collections.unmodifiableList(occurrences_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.occurrences_ = occurrences_; + } else { + result.occurrences_ = occurrencesBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.ListOccurrencesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ListOccurrencesResponse) { + return mergeFrom((io.grafeas.v1.ListOccurrencesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ListOccurrencesResponse other) { + if (other == io.grafeas.v1.ListOccurrencesResponse.getDefaultInstance()) return this; + if (occurrencesBuilder_ == null) { + if (!other.occurrences_.isEmpty()) { + if (occurrences_.isEmpty()) { + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOccurrencesIsMutable(); + occurrences_.addAll(other.occurrences_); + } + onChanged(); + } + } else { + if (!other.occurrences_.isEmpty()) { + if (occurrencesBuilder_.isEmpty()) { + occurrencesBuilder_.dispose(); + occurrencesBuilder_ = null; + occurrences_ = other.occurrences_; + bitField0_ = (bitField0_ & ~0x00000001); + occurrencesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOccurrencesFieldBuilder() : null; + } else { + occurrencesBuilder_.addAllMessages(other.occurrences_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.grafeas.v1.Occurrence m = + input.readMessage( + io.grafeas.v1.Occurrence.parser(), + extensionRegistry); + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(m); + } else { + occurrencesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List occurrences_ = + java.util.Collections.emptyList(); + private void ensureOccurrencesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + occurrences_ = new java.util.ArrayList(occurrences_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; + + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List getOccurrencesList() { + if (occurrencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(occurrences_); + } else { + return occurrencesBuilder_.getMessageList(); + } + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public int getOccurrencesCount() { + if (occurrencesBuilder_ == null) { + return occurrences_.size(); + } else { + return occurrencesBuilder_.getCount(); + } + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence getOccurrences(int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); + } else { + return occurrencesBuilder_.getMessage(index); + } + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.set(index, value); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder setOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.set(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences(io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence value) { + if (occurrencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOccurrencesIsMutable(); + occurrences_.add(index, value); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addOccurrences( + int index, io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.add(index, builderForValue.build()); + onChanged(); + } else { + occurrencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder addAllOccurrences( + java.lang.Iterable values) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, occurrences_); + onChanged(); + } else { + occurrencesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder clearOccurrences() { + if (occurrencesBuilder_ == null) { + occurrences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + occurrencesBuilder_.clear(); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public Builder removeOccurrences(int index) { + if (occurrencesBuilder_ == null) { + ensureOccurrencesIsMutable(); + occurrences_.remove(index); + onChanged(); + } else { + occurrencesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().getBuilder(index); + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index) { + if (occurrencesBuilder_ == null) { + return occurrences_.get(index); } else { + return occurrencesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List + getOccurrencesOrBuilderList() { + if (occurrencesBuilder_ != null) { + return occurrencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(occurrences_); + } + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { + return getOccurrencesFieldBuilder().addBuilder( + io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( + int index) { + return getOccurrencesFieldBuilder().addBuilder( + index, io.grafeas.v1.Occurrence.getDefaultInstance()); + } + /** + *
+     * The occurrences requested.
+     * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + public java.util.List + getOccurrencesBuilderList() { + return getOccurrencesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> + getOccurrencesFieldBuilder() { + if (occurrencesBuilder_ == null) { + occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( + occurrences_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + occurrences_ = null; + } + return occurrencesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The next pagination token in the list response. It should be used as
+     * `page_token` for the following request. An empty value means no more
+     * results.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ListOccurrencesResponse) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ListOccurrencesResponse) + private static final io.grafeas.v1.ListOccurrencesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ListOccurrencesResponse(); + } + + public static io.grafeas.v1.ListOccurrencesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOccurrencesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ListOccurrencesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java new file mode 100644 index 000000000000..e5e64e4513ca --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface ListOccurrencesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ListOccurrencesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + java.util.List + getOccurrencesList(); + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + io.grafeas.v1.Occurrence getOccurrences(int index); + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + int getOccurrencesCount(); + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + java.util.List + getOccurrencesOrBuilderList(); + /** + *
+   * The occurrences requested.
+   * 
+ * + * repeated .grafeas.v1.Occurrence occurrences = 1; + */ + io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( + int index); + + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * The next pagination token in the list response. It should be used as
+   * `page_token` for the following request. An empty value means no more
+   * results.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java new file mode 100644 index 000000000000..13e84c81b5b1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java @@ -0,0 +1,994 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +/** + *
+ * An occurrence of a particular package installation found within a system's
+ * filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Location} + */ +public final class Location extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Location) + LocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use Location.newBuilder() to construct. + private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Location() { + cpeUri_ = ""; + path_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Location(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Location.class, io.grafeas.v1.Location.Builder.class); + } + + public static final int CPE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cpeUri_ = ""; + /** + *
+   * Deprecated.
+   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+   * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + @java.lang.Override + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } + } + /** + *
+   * Deprecated.
+   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+   * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + private io.grafeas.v1.Version version_; + /** + *
+   * Deprecated.
+   * The version installed at this location.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return Whether the version field is set. + */ + @java.lang.Override + public boolean hasVersion() { + return version_ != null; + } + /** + *
+   * Deprecated.
+   * The version installed at this location.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return The version. + */ + @java.lang.Override + public io.grafeas.v1.Version getVersion() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + /** + *
+   * Deprecated.
+   * The version installed at this location.
+   * 
+ * + * .grafeas.v1.Version version = 2; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + + public static final int PATH_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object path_ = ""; + /** + *
+   * The path from which we gathered that this package/version is installed.
+   * 
+ * + * string path = 3; + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + *
+   * The path from which we gathered that this package/version is installed.
+   * 
+ * + * string path = 3; + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); + } + if (version_ != null) { + output.writeMessage(2, getVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, path_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); + } + if (version_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, path_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Location)) { + return super.equals(obj); + } + io.grafeas.v1.Location other = (io.grafeas.v1.Location) obj; + + if (!getCpeUri() + .equals(other.getCpeUri())) return false; + if (hasVersion() != other.hasVersion()) return false; + if (hasVersion()) { + if (!getVersion() + .equals(other.getVersion())) return false; + } + if (!getPath() + .equals(other.getPath())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCpeUri().hashCode(); + if (hasVersion()) { + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + } + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Location parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Location parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Location parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Location parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Location parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Location parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Location parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Location parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Location parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Location parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Location parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Location parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Location prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An occurrence of a particular package installation found within a system's
+   * filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Location} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Location) + io.grafeas.v1.LocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Location.class, io.grafeas.v1.Location.Builder.class); + } + + // Construct using io.grafeas.v1.Location.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cpeUri_ = ""; + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + path_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Location getDefaultInstanceForType() { + return io.grafeas.v1.Location.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Location build() { + io.grafeas.v1.Location result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Location buildPartial() { + io.grafeas.v1.Location result = new io.grafeas.v1.Location(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Location result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cpeUri_ = cpeUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.version_ = versionBuilder_ == null + ? version_ + : versionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.path_ = path_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Location) { + return mergeFrom((io.grafeas.v1.Location)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Location other) { + if (other == io.grafeas.v1.Location.getDefaultInstance()) return this; + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasVersion()) { + mergeVersion(other.getVersion()); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cpeUri_ = ""; + /** + *
+     * Deprecated.
+     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+     * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated.
+     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+     * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated.
+     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+     * 
+ * + * string cpe_uri = 1; + * @param value The cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Deprecated.
+     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+     * 
+ * + * string cpe_uri = 1; + * @return This builder for chaining. + */ + public Builder clearCpeUri() { + cpeUri_ = getDefaultInstance().getCpeUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Deprecated.
+     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+     * 
+ * + * string cpe_uri = 1; + * @param value The bytes for cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.grafeas.v1.Version version_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + * @return Whether the version field is set. + */ + public boolean hasVersion() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + * @return The version. + */ + public io.grafeas.v1.Version getVersion() { + if (versionBuilder_ == null) { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } else { + return versionBuilder_.getMessage(); + } + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder setVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + } else { + versionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder setVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (versionBuilder_ == null) { + version_ = builderForValue.build(); + } else { + versionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder mergeVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + version_ != null && + version_ != io.grafeas.v1.Version.getDefaultInstance()) { + getVersionBuilder().mergeFrom(value); + } else { + version_ = value; + } + } else { + versionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder clearVersion() { + bitField0_ = (bitField0_ & ~0x00000002); + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public io.grafeas.v1.Version.Builder getVersionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getVersionFieldBuilder().getBuilder(); + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + if (versionBuilder_ != null) { + return versionBuilder_.getMessageOrBuilder(); + } else { + return version_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : version_; + } + } + /** + *
+     * Deprecated.
+     * The version installed at this location.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getVersionFieldBuilder() { + if (versionBuilder_ == null) { + versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getVersion(), + getParentForChildren(), + isClean()); + version_ = null; + } + return versionBuilder_; + } + + private java.lang.Object path_ = ""; + /** + *
+     * The path from which we gathered that this package/version is installed.
+     * 
+ * + * string path = 3; + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The path from which we gathered that this package/version is installed.
+     * 
+ * + * string path = 3; + * @return The bytes for path. + */ + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The path from which we gathered that this package/version is installed.
+     * 
+ * + * string path = 3; + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + path_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The path from which we gathered that this package/version is installed.
+     * 
+ * + * string path = 3; + * @return This builder for chaining. + */ + public Builder clearPath() { + path_ = getDefaultInstance().getPath(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The path from which we gathered that this package/version is installed.
+     * 
+ * + * string path = 3; + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + path_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Location) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Location) + private static final io.grafeas.v1.Location DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Location(); + } + + public static io.grafeas.v1.Location getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Location parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Location getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java new file mode 100644 index 000000000000..9b0f8af80d16 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java @@ -0,0 +1,81 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +public interface LocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Location) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Deprecated.
+   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+   * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + java.lang.String getCpeUri(); + /** + *
+   * Deprecated.
+   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
+   * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + com.google.protobuf.ByteString + getCpeUriBytes(); + + /** + *
+   * Deprecated.
+   * The version installed at this location.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return Whether the version field is set. + */ + boolean hasVersion(); + /** + *
+   * Deprecated.
+   * The version installed at this location.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return The version. + */ + io.grafeas.v1.Version getVersion(); + /** + *
+   * Deprecated.
+   * The version installed at this location.
+   * 
+ * + * .grafeas.v1.Version version = 2; + */ + io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); + + /** + *
+   * The path from which we gathered that this package/version is installed.
+   * 
+ * + * string path = 3; + * @return The path. + */ + java.lang.String getPath(); + /** + *
+   * The path from which we gathered that this package/version is installed.
+   * 
+ * + * string path = 3; + * @return The bytes for path. + */ + com.google.protobuf.ByteString + getPathBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java new file mode 100644 index 000000000000..3aee42f64ca5 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java @@ -0,0 +1,1380 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Other properties of the build.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Metadata} + */ +public final class Metadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Metadata) + MetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use Metadata.newBuilder() to construct. + private Metadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Metadata() { + buildInvocationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Metadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Metadata.class, io.grafeas.v1.Metadata.Builder.class); + } + + public static final int BUILD_INVOCATION_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object buildInvocationId_ = ""; + /** + *
+   * Identifies the particular build invocation, which can be useful for finding
+   * associated logs or other ad-hoc analysis. The value SHOULD be globally
+   * unique, per in-toto Provenance spec.
+   * 
+ * + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + @java.lang.Override + public java.lang.String getBuildInvocationId() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildInvocationId_ = s; + return s; + } + } + /** + *
+   * Identifies the particular build invocation, which can be useful for finding
+   * associated logs or other ad-hoc analysis. The value SHOULD be globally
+   * unique, per in-toto Provenance spec.
+   * 
+ * + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBuildInvocationIdBytes() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildInvocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUILD_STARTED_ON_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp buildStartedOn_; + /** + *
+   * The timestamp of when the build started.
+   * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + @java.lang.Override + public boolean hasBuildStartedOn() { + return buildStartedOn_ != null; + } + /** + *
+   * The timestamp of when the build started.
+   * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getBuildStartedOn() { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + /** + *
+   * The timestamp of when the build started.
+   * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + + public static final int BUILD_FINISHED_ON_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp buildFinishedOn_; + /** + *
+   * The timestamp of when the build completed.
+   * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + @java.lang.Override + public boolean hasBuildFinishedOn() { + return buildFinishedOn_ != null; + } + /** + *
+   * The timestamp of when the build completed.
+   * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getBuildFinishedOn() { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + /** + *
+   * The timestamp of when the build completed.
+   * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + + public static final int COMPLETENESS_FIELD_NUMBER = 4; + private io.grafeas.v1.Completeness completeness_; + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * .grafeas.v1.Completeness completeness = 4; + * @return Whether the completeness field is set. + */ + @java.lang.Override + public boolean hasCompleteness() { + return completeness_ != null; + } + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * .grafeas.v1.Completeness completeness = 4; + * @return The completeness. + */ + @java.lang.Override + public io.grafeas.v1.Completeness getCompleteness() { + return completeness_ == null ? io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; + } + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + @java.lang.Override + public io.grafeas.v1.CompletenessOrBuilder getCompletenessOrBuilder() { + return completeness_ == null ? io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; + } + + public static final int REPRODUCIBLE_FIELD_NUMBER = 5; + private boolean reproducible_ = false; + /** + *
+   * If true, the builder claims that running the recipe on materials will
+   * produce bit-for-bit identical output.
+   * 
+ * + * bool reproducible = 5; + * @return The reproducible. + */ + @java.lang.Override + public boolean getReproducible() { + return reproducible_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, buildInvocationId_); + } + if (buildStartedOn_ != null) { + output.writeMessage(2, getBuildStartedOn()); + } + if (buildFinishedOn_ != null) { + output.writeMessage(3, getBuildFinishedOn()); + } + if (completeness_ != null) { + output.writeMessage(4, getCompleteness()); + } + if (reproducible_ != false) { + output.writeBool(5, reproducible_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, buildInvocationId_); + } + if (buildStartedOn_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBuildStartedOn()); + } + if (buildFinishedOn_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getBuildFinishedOn()); + } + if (completeness_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCompleteness()); + } + if (reproducible_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, reproducible_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Metadata)) { + return super.equals(obj); + } + io.grafeas.v1.Metadata other = (io.grafeas.v1.Metadata) obj; + + if (!getBuildInvocationId() + .equals(other.getBuildInvocationId())) return false; + if (hasBuildStartedOn() != other.hasBuildStartedOn()) return false; + if (hasBuildStartedOn()) { + if (!getBuildStartedOn() + .equals(other.getBuildStartedOn())) return false; + } + if (hasBuildFinishedOn() != other.hasBuildFinishedOn()) return false; + if (hasBuildFinishedOn()) { + if (!getBuildFinishedOn() + .equals(other.getBuildFinishedOn())) return false; + } + if (hasCompleteness() != other.hasCompleteness()) return false; + if (hasCompleteness()) { + if (!getCompleteness() + .equals(other.getCompleteness())) return false; + } + if (getReproducible() + != other.getReproducible()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BUILD_INVOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getBuildInvocationId().hashCode(); + if (hasBuildStartedOn()) { + hash = (37 * hash) + BUILD_STARTED_ON_FIELD_NUMBER; + hash = (53 * hash) + getBuildStartedOn().hashCode(); + } + if (hasBuildFinishedOn()) { + hash = (37 * hash) + BUILD_FINISHED_ON_FIELD_NUMBER; + hash = (53 * hash) + getBuildFinishedOn().hashCode(); + } + if (hasCompleteness()) { + hash = (37 * hash) + COMPLETENESS_FIELD_NUMBER; + hash = (53 * hash) + getCompleteness().hashCode(); + } + hash = (37 * hash) + REPRODUCIBLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReproducible()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Metadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Metadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Metadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Metadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Metadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Metadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Metadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Metadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Metadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Metadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Metadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Metadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Metadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Other properties of the build.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Metadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Metadata) + io.grafeas.v1.MetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Metadata.class, io.grafeas.v1.Metadata.Builder.class); + } + + // Construct using io.grafeas.v1.Metadata.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + buildInvocationId_ = ""; + buildStartedOn_ = null; + if (buildStartedOnBuilder_ != null) { + buildStartedOnBuilder_.dispose(); + buildStartedOnBuilder_ = null; + } + buildFinishedOn_ = null; + if (buildFinishedOnBuilder_ != null) { + buildFinishedOnBuilder_.dispose(); + buildFinishedOnBuilder_ = null; + } + completeness_ = null; + if (completenessBuilder_ != null) { + completenessBuilder_.dispose(); + completenessBuilder_ = null; + } + reproducible_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Metadata getDefaultInstanceForType() { + return io.grafeas.v1.Metadata.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Metadata build() { + io.grafeas.v1.Metadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Metadata buildPartial() { + io.grafeas.v1.Metadata result = new io.grafeas.v1.Metadata(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Metadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.buildInvocationId_ = buildInvocationId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.buildStartedOn_ = buildStartedOnBuilder_ == null + ? buildStartedOn_ + : buildStartedOnBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.buildFinishedOn_ = buildFinishedOnBuilder_ == null + ? buildFinishedOn_ + : buildFinishedOnBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.completeness_ = completenessBuilder_ == null + ? completeness_ + : completenessBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.reproducible_ = reproducible_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Metadata) { + return mergeFrom((io.grafeas.v1.Metadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Metadata other) { + if (other == io.grafeas.v1.Metadata.getDefaultInstance()) return this; + if (!other.getBuildInvocationId().isEmpty()) { + buildInvocationId_ = other.buildInvocationId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasBuildStartedOn()) { + mergeBuildStartedOn(other.getBuildStartedOn()); + } + if (other.hasBuildFinishedOn()) { + mergeBuildFinishedOn(other.getBuildFinishedOn()); + } + if (other.hasCompleteness()) { + mergeCompleteness(other.getCompleteness()); + } + if (other.getReproducible() != false) { + setReproducible(other.getReproducible()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + buildInvocationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getBuildStartedOnFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getBuildFinishedOnFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getCompletenessFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + reproducible_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object buildInvocationId_ = ""; + /** + *
+     * Identifies the particular build invocation, which can be useful for finding
+     * associated logs or other ad-hoc analysis. The value SHOULD be globally
+     * unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + public java.lang.String getBuildInvocationId() { + java.lang.Object ref = buildInvocationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildInvocationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Identifies the particular build invocation, which can be useful for finding
+     * associated logs or other ad-hoc analysis. The value SHOULD be globally
+     * unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + public com.google.protobuf.ByteString + getBuildInvocationIdBytes() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildInvocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Identifies the particular build invocation, which can be useful for finding
+     * associated logs or other ad-hoc analysis. The value SHOULD be globally
+     * unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @param value The buildInvocationId to set. + * @return This builder for chaining. + */ + public Builder setBuildInvocationId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + buildInvocationId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Identifies the particular build invocation, which can be useful for finding
+     * associated logs or other ad-hoc analysis. The value SHOULD be globally
+     * unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @return This builder for chaining. + */ + public Builder clearBuildInvocationId() { + buildInvocationId_ = getDefaultInstance().getBuildInvocationId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Identifies the particular build invocation, which can be useful for finding
+     * associated logs or other ad-hoc analysis. The value SHOULD be globally
+     * unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @param value The bytes for buildInvocationId to set. + * @return This builder for chaining. + */ + public Builder setBuildInvocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + buildInvocationId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp buildStartedOn_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildStartedOnBuilder_; + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + public boolean hasBuildStartedOn() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + public com.google.protobuf.Timestamp getBuildStartedOn() { + if (buildStartedOnBuilder_ == null) { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } else { + return buildStartedOnBuilder_.getMessage(); + } + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder setBuildStartedOn(com.google.protobuf.Timestamp value) { + if (buildStartedOnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + buildStartedOn_ = value; + } else { + buildStartedOnBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder setBuildStartedOn( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (buildStartedOnBuilder_ == null) { + buildStartedOn_ = builderForValue.build(); + } else { + buildStartedOnBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder mergeBuildStartedOn(com.google.protobuf.Timestamp value) { + if (buildStartedOnBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + buildStartedOn_ != null && + buildStartedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getBuildStartedOnBuilder().mergeFrom(value); + } else { + buildStartedOn_ = value; + } + } else { + buildStartedOnBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder clearBuildStartedOn() { + bitField0_ = (bitField0_ & ~0x00000002); + buildStartedOn_ = null; + if (buildStartedOnBuilder_ != null) { + buildStartedOnBuilder_.dispose(); + buildStartedOnBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public com.google.protobuf.Timestamp.Builder getBuildStartedOnBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBuildStartedOnFieldBuilder().getBuilder(); + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { + if (buildStartedOnBuilder_ != null) { + return buildStartedOnBuilder_.getMessageOrBuilder(); + } else { + return buildStartedOn_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getBuildStartedOnFieldBuilder() { + if (buildStartedOnBuilder_ == null) { + buildStartedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getBuildStartedOn(), + getParentForChildren(), + isClean()); + buildStartedOn_ = null; + } + return buildStartedOnBuilder_; + } + + private com.google.protobuf.Timestamp buildFinishedOn_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildFinishedOnBuilder_; + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + public boolean hasBuildFinishedOn() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + public com.google.protobuf.Timestamp getBuildFinishedOn() { + if (buildFinishedOnBuilder_ == null) { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } else { + return buildFinishedOnBuilder_.getMessage(); + } + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder setBuildFinishedOn(com.google.protobuf.Timestamp value) { + if (buildFinishedOnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + buildFinishedOn_ = value; + } else { + buildFinishedOnBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder setBuildFinishedOn( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (buildFinishedOnBuilder_ == null) { + buildFinishedOn_ = builderForValue.build(); + } else { + buildFinishedOnBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder mergeBuildFinishedOn(com.google.protobuf.Timestamp value) { + if (buildFinishedOnBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + buildFinishedOn_ != null && + buildFinishedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getBuildFinishedOnBuilder().mergeFrom(value); + } else { + buildFinishedOn_ = value; + } + } else { + buildFinishedOnBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder clearBuildFinishedOn() { + bitField0_ = (bitField0_ & ~0x00000004); + buildFinishedOn_ = null; + if (buildFinishedOnBuilder_ != null) { + buildFinishedOnBuilder_.dispose(); + buildFinishedOnBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public com.google.protobuf.Timestamp.Builder getBuildFinishedOnBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBuildFinishedOnFieldBuilder().getBuilder(); + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { + if (buildFinishedOnBuilder_ != null) { + return buildFinishedOnBuilder_.getMessageOrBuilder(); + } else { + return buildFinishedOn_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getBuildFinishedOnFieldBuilder() { + if (buildFinishedOnBuilder_ == null) { + buildFinishedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getBuildFinishedOn(), + getParentForChildren(), + isClean()); + buildFinishedOn_ = null; + } + return buildFinishedOnBuilder_; + } + + private io.grafeas.v1.Completeness completeness_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Completeness, io.grafeas.v1.Completeness.Builder, io.grafeas.v1.CompletenessOrBuilder> completenessBuilder_; + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + * @return Whether the completeness field is set. + */ + public boolean hasCompleteness() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + * @return The completeness. + */ + public io.grafeas.v1.Completeness getCompleteness() { + if (completenessBuilder_ == null) { + return completeness_ == null ? io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; + } else { + return completenessBuilder_.getMessage(); + } + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + public Builder setCompleteness(io.grafeas.v1.Completeness value) { + if (completenessBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + completeness_ = value; + } else { + completenessBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + public Builder setCompleteness( + io.grafeas.v1.Completeness.Builder builderForValue) { + if (completenessBuilder_ == null) { + completeness_ = builderForValue.build(); + } else { + completenessBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + public Builder mergeCompleteness(io.grafeas.v1.Completeness value) { + if (completenessBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + completeness_ != null && + completeness_ != io.grafeas.v1.Completeness.getDefaultInstance()) { + getCompletenessBuilder().mergeFrom(value); + } else { + completeness_ = value; + } + } else { + completenessBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + public Builder clearCompleteness() { + bitField0_ = (bitField0_ & ~0x00000008); + completeness_ = null; + if (completenessBuilder_ != null) { + completenessBuilder_.dispose(); + completenessBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + public io.grafeas.v1.Completeness.Builder getCompletenessBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCompletenessFieldBuilder().getBuilder(); + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + public io.grafeas.v1.CompletenessOrBuilder getCompletenessOrBuilder() { + if (completenessBuilder_ != null) { + return completenessBuilder_.getMessageOrBuilder(); + } else { + return completeness_ == null ? + io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; + } + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Completeness, io.grafeas.v1.Completeness.Builder, io.grafeas.v1.CompletenessOrBuilder> + getCompletenessFieldBuilder() { + if (completenessBuilder_ == null) { + completenessBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Completeness, io.grafeas.v1.Completeness.Builder, io.grafeas.v1.CompletenessOrBuilder>( + getCompleteness(), + getParentForChildren(), + isClean()); + completeness_ = null; + } + return completenessBuilder_; + } + + private boolean reproducible_ ; + /** + *
+     * If true, the builder claims that running the recipe on materials will
+     * produce bit-for-bit identical output.
+     * 
+ * + * bool reproducible = 5; + * @return The reproducible. + */ + @java.lang.Override + public boolean getReproducible() { + return reproducible_; + } + /** + *
+     * If true, the builder claims that running the recipe on materials will
+     * produce bit-for-bit identical output.
+     * 
+ * + * bool reproducible = 5; + * @param value The reproducible to set. + * @return This builder for chaining. + */ + public Builder setReproducible(boolean value) { + + reproducible_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * If true, the builder claims that running the recipe on materials will
+     * produce bit-for-bit identical output.
+     * 
+ * + * bool reproducible = 5; + * @return This builder for chaining. + */ + public Builder clearReproducible() { + bitField0_ = (bitField0_ & ~0x00000010); + reproducible_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Metadata) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Metadata) + private static final io.grafeas.v1.Metadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Metadata(); + } + + public static io.grafeas.v1.Metadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Metadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java new file mode 100644 index 000000000000..9999c1a7ef58 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java @@ -0,0 +1,128 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +public interface MetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Metadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Identifies the particular build invocation, which can be useful for finding
+   * associated logs or other ad-hoc analysis. The value SHOULD be globally
+   * unique, per in-toto Provenance spec.
+   * 
+ * + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + java.lang.String getBuildInvocationId(); + /** + *
+   * Identifies the particular build invocation, which can be useful for finding
+   * associated logs or other ad-hoc analysis. The value SHOULD be globally
+   * unique, per in-toto Provenance spec.
+   * 
+ * + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + com.google.protobuf.ByteString + getBuildInvocationIdBytes(); + + /** + *
+   * The timestamp of when the build started.
+   * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + boolean hasBuildStartedOn(); + /** + *
+   * The timestamp of when the build started.
+   * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + com.google.protobuf.Timestamp getBuildStartedOn(); + /** + *
+   * The timestamp of when the build started.
+   * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder(); + + /** + *
+   * The timestamp of when the build completed.
+   * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + boolean hasBuildFinishedOn(); + /** + *
+   * The timestamp of when the build completed.
+   * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + com.google.protobuf.Timestamp getBuildFinishedOn(); + /** + *
+   * The timestamp of when the build completed.
+   * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder(); + + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * .grafeas.v1.Completeness completeness = 4; + * @return Whether the completeness field is set. + */ + boolean hasCompleteness(); + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * .grafeas.v1.Completeness completeness = 4; + * @return The completeness. + */ + io.grafeas.v1.Completeness getCompleteness(); + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * .grafeas.v1.Completeness completeness = 4; + */ + io.grafeas.v1.CompletenessOrBuilder getCompletenessOrBuilder(); + + /** + *
+   * If true, the builder claims that running the recipe on materials will
+   * produce bit-for-bit identical output.
+   * 
+ * + * bool reproducible = 5; + * @return The reproducible. + */ + boolean getReproducible(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java new file mode 100644 index 000000000000..ec17bbcd5c76 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java @@ -0,0 +1,908 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +/** + *
+ * Details about files that caused a compliance check to fail.
+ * 
+ * + * Protobuf type {@code grafeas.v1.NonCompliantFile} + */ +public final class NonCompliantFile extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.NonCompliantFile) + NonCompliantFileOrBuilder { +private static final long serialVersionUID = 0L; + // Use NonCompliantFile.newBuilder() to construct. + private NonCompliantFile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NonCompliantFile() { + path_ = ""; + displayCommand_ = ""; + reason_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NonCompliantFile(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.NonCompliantFile.class, io.grafeas.v1.NonCompliantFile.Builder.class); + } + + public static final int PATH_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object path_ = ""; + /** + *
+   * Empty if `display_command` is set.
+   * 
+ * + * string path = 1; + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + *
+   * Empty if `display_command` is set.
+   * 
+ * + * string path = 1; + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_COMMAND_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object displayCommand_ = ""; + /** + *
+   * Command to display the non-compliant files.
+   * 
+ * + * string display_command = 2; + * @return The displayCommand. + */ + @java.lang.Override + public java.lang.String getDisplayCommand() { + java.lang.Object ref = displayCommand_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayCommand_ = s; + return s; + } + } + /** + *
+   * Command to display the non-compliant files.
+   * 
+ * + * string display_command = 2; + * @return The bytes for displayCommand. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayCommandBytes() { + java.lang.Object ref = displayCommand_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayCommand_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REASON_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object reason_ = ""; + /** + *
+   * Explains why a file is non compliant for a CIS check.
+   * 
+ * + * string reason = 3; + * @return The reason. + */ + @java.lang.Override + public java.lang.String getReason() { + java.lang.Object ref = reason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reason_ = s; + return s; + } + } + /** + *
+   * Explains why a file is non compliant for a CIS check.
+   * 
+ * + * string reason = 3; + * @return The bytes for reason. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReasonBytes() { + java.lang.Object ref = reason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + reason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayCommand_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayCommand_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, reason_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayCommand_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayCommand_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, reason_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.NonCompliantFile)) { + return super.equals(obj); + } + io.grafeas.v1.NonCompliantFile other = (io.grafeas.v1.NonCompliantFile) obj; + + if (!getPath() + .equals(other.getPath())) return false; + if (!getDisplayCommand() + .equals(other.getDisplayCommand())) return false; + if (!getReason() + .equals(other.getReason())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + DISPLAY_COMMAND_FIELD_NUMBER; + hash = (53 * hash) + getDisplayCommand().hashCode(); + hash = (37 * hash) + REASON_FIELD_NUMBER; + hash = (53 * hash) + getReason().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.NonCompliantFile parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.NonCompliantFile parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.NonCompliantFile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.NonCompliantFile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.NonCompliantFile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.NonCompliantFile parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.NonCompliantFile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.NonCompliantFile parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.NonCompliantFile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.NonCompliantFile parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.NonCompliantFile parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.NonCompliantFile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.NonCompliantFile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Details about files that caused a compliance check to fail.
+   * 
+ * + * Protobuf type {@code grafeas.v1.NonCompliantFile} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.NonCompliantFile) + io.grafeas.v1.NonCompliantFileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.NonCompliantFile.class, io.grafeas.v1.NonCompliantFile.Builder.class); + } + + // Construct using io.grafeas.v1.NonCompliantFile.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + path_ = ""; + displayCommand_ = ""; + reason_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.NonCompliantFile getDefaultInstanceForType() { + return io.grafeas.v1.NonCompliantFile.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.NonCompliantFile build() { + io.grafeas.v1.NonCompliantFile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.NonCompliantFile buildPartial() { + io.grafeas.v1.NonCompliantFile result = new io.grafeas.v1.NonCompliantFile(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.NonCompliantFile result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.path_ = path_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayCommand_ = displayCommand_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.reason_ = reason_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.NonCompliantFile) { + return mergeFrom((io.grafeas.v1.NonCompliantFile)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.NonCompliantFile other) { + if (other == io.grafeas.v1.NonCompliantFile.getDefaultInstance()) return this; + if (!other.getPath().isEmpty()) { + path_ = other.path_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayCommand().isEmpty()) { + displayCommand_ = other.displayCommand_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getReason().isEmpty()) { + reason_ = other.reason_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + displayCommand_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + reason_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object path_ = ""; + /** + *
+     * Empty if `display_command` is set.
+     * 
+ * + * string path = 1; + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Empty if `display_command` is set.
+     * 
+ * + * string path = 1; + * @return The bytes for path. + */ + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Empty if `display_command` is set.
+     * 
+ * + * string path = 1; + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + path_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Empty if `display_command` is set.
+     * 
+ * + * string path = 1; + * @return This builder for chaining. + */ + public Builder clearPath() { + path_ = getDefaultInstance().getPath(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Empty if `display_command` is set.
+     * 
+ * + * string path = 1; + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + path_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayCommand_ = ""; + /** + *
+     * Command to display the non-compliant files.
+     * 
+ * + * string display_command = 2; + * @return The displayCommand. + */ + public java.lang.String getDisplayCommand() { + java.lang.Object ref = displayCommand_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayCommand_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Command to display the non-compliant files.
+     * 
+ * + * string display_command = 2; + * @return The bytes for displayCommand. + */ + public com.google.protobuf.ByteString + getDisplayCommandBytes() { + java.lang.Object ref = displayCommand_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayCommand_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Command to display the non-compliant files.
+     * 
+ * + * string display_command = 2; + * @param value The displayCommand to set. + * @return This builder for chaining. + */ + public Builder setDisplayCommand( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayCommand_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Command to display the non-compliant files.
+     * 
+ * + * string display_command = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayCommand() { + displayCommand_ = getDefaultInstance().getDisplayCommand(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Command to display the non-compliant files.
+     * 
+ * + * string display_command = 2; + * @param value The bytes for displayCommand to set. + * @return This builder for chaining. + */ + public Builder setDisplayCommandBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayCommand_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object reason_ = ""; + /** + *
+     * Explains why a file is non compliant for a CIS check.
+     * 
+ * + * string reason = 3; + * @return The reason. + */ + public java.lang.String getReason() { + java.lang.Object ref = reason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Explains why a file is non compliant for a CIS check.
+     * 
+ * + * string reason = 3; + * @return The bytes for reason. + */ + public com.google.protobuf.ByteString + getReasonBytes() { + java.lang.Object ref = reason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + reason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Explains why a file is non compliant for a CIS check.
+     * 
+ * + * string reason = 3; + * @param value The reason to set. + * @return This builder for chaining. + */ + public Builder setReason( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + reason_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Explains why a file is non compliant for a CIS check.
+     * 
+ * + * string reason = 3; + * @return This builder for chaining. + */ + public Builder clearReason() { + reason_ = getDefaultInstance().getReason(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Explains why a file is non compliant for a CIS check.
+     * 
+ * + * string reason = 3; + * @param value The bytes for reason to set. + * @return This builder for chaining. + */ + public Builder setReasonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + reason_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.NonCompliantFile) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.NonCompliantFile) + private static final io.grafeas.v1.NonCompliantFile DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.NonCompliantFile(); + } + + public static io.grafeas.v1.NonCompliantFile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NonCompliantFile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.NonCompliantFile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java new file mode 100644 index 000000000000..fece8f7338c1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/compliance.proto + +package io.grafeas.v1; + +public interface NonCompliantFileOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.NonCompliantFile) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Empty if `display_command` is set.
+   * 
+ * + * string path = 1; + * @return The path. + */ + java.lang.String getPath(); + /** + *
+   * Empty if `display_command` is set.
+   * 
+ * + * string path = 1; + * @return The bytes for path. + */ + com.google.protobuf.ByteString + getPathBytes(); + + /** + *
+   * Command to display the non-compliant files.
+   * 
+ * + * string display_command = 2; + * @return The displayCommand. + */ + java.lang.String getDisplayCommand(); + /** + *
+   * Command to display the non-compliant files.
+   * 
+ * + * string display_command = 2; + * @return The bytes for displayCommand. + */ + com.google.protobuf.ByteString + getDisplayCommandBytes(); + + /** + *
+   * Explains why a file is non compliant for a CIS check.
+   * 
+ * + * string reason = 3; + * @return The reason. + */ + java.lang.String getReason(); + /** + *
+   * Explains why a file is non compliant for a CIS check.
+   * 
+ * + * string reason = 3; + * @return The bytes for reason. + */ + com.google.protobuf.ByteString + getReasonBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java new file mode 100644 index 000000000000..bc9400e0b952 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java @@ -0,0 +1,5324 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * A type of analysis that can be done for a resource.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Note} + */ +public final class Note extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Note) + NoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use Note.newBuilder() to construct. + private Note(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Note() { + name_ = ""; + shortDescription_ = ""; + longDescription_ = ""; + kind_ = 0; + relatedUrl_ = java.util.Collections.emptyList(); + relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Note(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Note.class, io.grafeas.v1.Note.Builder.class); + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VULNERABILITY(10), + BUILD(11), + IMAGE(12), + PACKAGE(13), + DEPLOYMENT(14), + DISCOVERY(15), + ATTESTATION(16), + UPGRADE(17), + COMPLIANCE(18), + DSSE_ATTESTATION(19), + VULNERABILITY_ASSESSMENT(20), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 10: return VULNERABILITY; + case 11: return BUILD; + case 12: return IMAGE; + case 13: return PACKAGE; + case 14: return DEPLOYMENT; + case 15: return DISCOVERY; + case 16: return ATTESTATION; + case 17: return UPGRADE; + case 18: return COMPLIANCE; + case 19: return DSSE_ATTESTATION; + case 20: return VULNERABILITY_ASSESSMENT; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Output only. The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Output only. The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object shortDescription_ = ""; + /** + *
+   * A one sentence description of this note.
+   * 
+ * + * string short_description = 2; + * @return The shortDescription. + */ + @java.lang.Override + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } + } + /** + *
+   * A one sentence description of this note.
+   * 
+ * + * string short_description = 2; + * @return The bytes for shortDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LONG_DESCRIPTION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object longDescription_ = ""; + /** + *
+   * A detailed description of this note.
+   * 
+ * + * string long_description = 3; + * @return The longDescription. + */ + @java.lang.Override + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } + } + /** + *
+   * A detailed description of this note.
+   * 
+ * + * string long_description = 3; + * @return The bytes for longDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KIND_FIELD_NUMBER = 4; + private int kind_ = 0; + /** + *
+   * Output only. The type of analysis. This field can be used as a filter in
+   * list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+   * Output only. The type of analysis. This field can be used as a filter in
+   * list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The kind. + */ + @java.lang.Override public io.grafeas.v1.NoteKind getKind() { + io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); + return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; + } + + public static final int RELATED_URL_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List relatedUrl_; + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + @java.lang.Override + public java.util.List getRelatedUrlList() { + return relatedUrl_; + } + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + @java.lang.Override + public java.util.List + getRelatedUrlOrBuilderList() { + return relatedUrl_; + } + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + @java.lang.Override + public int getRelatedUrlCount() { + return relatedUrl_.size(); + } + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrl getRelatedUrl(int index) { + return relatedUrl_.get(index); + } + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlOrBuilder( + int index) { + return relatedUrl_.get(index); + } + + public static final int EXPIRATION_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp expirationTime_; + /** + *
+   * Time of expiration for this note. Empty if note does not expire.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + * @return Whether the expirationTime field is set. + */ + @java.lang.Override + public boolean hasExpirationTime() { + return expirationTime_ != null; + } + /** + *
+   * Time of expiration for this note. Empty if note does not expire.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + * @return The expirationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpirationTime() { + return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; + } + /** + *
+   * Time of expiration for this note. Empty if note does not expire.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time this note was created. This field can be used as a
+   * filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time this note was created. This field can be used as a
+   * filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time this note was created. This field can be used as a
+   * filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The time this note was last updated. This field can be used as
+   * a filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The time this note was last updated. This field can be used as
+   * a filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The time this note was last updated. This field can be used as
+   * a filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int RELATED_NOTE_NAMES_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList relatedNoteNames_; + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @return A list containing the relatedNoteNames. + */ + public com.google.protobuf.ProtocolStringList + getRelatedNoteNamesList() { + return relatedNoteNames_; + } + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @return The count of relatedNoteNames. + */ + public int getRelatedNoteNamesCount() { + return relatedNoteNames_.size(); + } + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @param index The index of the element to return. + * @return The relatedNoteNames at the given index. + */ + public java.lang.String getRelatedNoteNames(int index) { + return relatedNoteNames_.get(index); + } + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @param index The index of the value to return. + * @return The bytes of the relatedNoteNames at the given index. + */ + public com.google.protobuf.ByteString + getRelatedNoteNamesBytes(int index) { + return relatedNoteNames_.getByteString(index); + } + + public static final int VULNERABILITY_FIELD_NUMBER = 10; + /** + *
+   * A note describing a package vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + * @return Whether the vulnerability field is set. + */ + @java.lang.Override + public boolean hasVulnerability() { + return typeCase_ == 10; + } + /** + *
+   * A note describing a package vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + * @return The vulnerability. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote getVulnerability() { + if (typeCase_ == 10) { + return (io.grafeas.v1.VulnerabilityNote) type_; + } + return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); + } + /** + *
+   * A note describing a package vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNoteOrBuilder getVulnerabilityOrBuilder() { + if (typeCase_ == 10) { + return (io.grafeas.v1.VulnerabilityNote) type_; + } + return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); + } + + public static final int BUILD_FIELD_NUMBER = 11; + /** + *
+   * A note describing build provenance for a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildNote build = 11; + * @return Whether the build field is set. + */ + @java.lang.Override + public boolean hasBuild() { + return typeCase_ == 11; + } + /** + *
+   * A note describing build provenance for a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildNote build = 11; + * @return The build. + */ + @java.lang.Override + public io.grafeas.v1.BuildNote getBuild() { + if (typeCase_ == 11) { + return (io.grafeas.v1.BuildNote) type_; + } + return io.grafeas.v1.BuildNote.getDefaultInstance(); + } + /** + *
+   * A note describing build provenance for a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + @java.lang.Override + public io.grafeas.v1.BuildNoteOrBuilder getBuildOrBuilder() { + if (typeCase_ == 11) { + return (io.grafeas.v1.BuildNote) type_; + } + return io.grafeas.v1.BuildNote.getDefaultInstance(); + } + + public static final int IMAGE_FIELD_NUMBER = 12; + /** + *
+   * A note describing a base image.
+   * 
+ * + * .grafeas.v1.ImageNote image = 12; + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return typeCase_ == 12; + } + /** + *
+   * A note describing a base image.
+   * 
+ * + * .grafeas.v1.ImageNote image = 12; + * @return The image. + */ + @java.lang.Override + public io.grafeas.v1.ImageNote getImage() { + if (typeCase_ == 12) { + return (io.grafeas.v1.ImageNote) type_; + } + return io.grafeas.v1.ImageNote.getDefaultInstance(); + } + /** + *
+   * A note describing a base image.
+   * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + @java.lang.Override + public io.grafeas.v1.ImageNoteOrBuilder getImageOrBuilder() { + if (typeCase_ == 12) { + return (io.grafeas.v1.ImageNote) type_; + } + return io.grafeas.v1.ImageNote.getDefaultInstance(); + } + + public static final int PACKAGE_FIELD_NUMBER = 13; + /** + *
+   * A note describing a package hosted by various package managers.
+   * 
+ * + * .grafeas.v1.PackageNote package = 13; + * @return Whether the package field is set. + */ + @java.lang.Override + public boolean hasPackage() { + return typeCase_ == 13; + } + /** + *
+   * A note describing a package hosted by various package managers.
+   * 
+ * + * .grafeas.v1.PackageNote package = 13; + * @return The package. + */ + @java.lang.Override + public io.grafeas.v1.PackageNote getPackage() { + if (typeCase_ == 13) { + return (io.grafeas.v1.PackageNote) type_; + } + return io.grafeas.v1.PackageNote.getDefaultInstance(); + } + /** + *
+   * A note describing a package hosted by various package managers.
+   * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + @java.lang.Override + public io.grafeas.v1.PackageNoteOrBuilder getPackageOrBuilder() { + if (typeCase_ == 13) { + return (io.grafeas.v1.PackageNote) type_; + } + return io.grafeas.v1.PackageNote.getDefaultInstance(); + } + + public static final int DEPLOYMENT_FIELD_NUMBER = 14; + /** + *
+   * A note describing something that can be deployed.
+   * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + * @return Whether the deployment field is set. + */ + @java.lang.Override + public boolean hasDeployment() { + return typeCase_ == 14; + } + /** + *
+   * A note describing something that can be deployed.
+   * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + * @return The deployment. + */ + @java.lang.Override + public io.grafeas.v1.DeploymentNote getDeployment() { + if (typeCase_ == 14) { + return (io.grafeas.v1.DeploymentNote) type_; + } + return io.grafeas.v1.DeploymentNote.getDefaultInstance(); + } + /** + *
+   * A note describing something that can be deployed.
+   * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + @java.lang.Override + public io.grafeas.v1.DeploymentNoteOrBuilder getDeploymentOrBuilder() { + if (typeCase_ == 14) { + return (io.grafeas.v1.DeploymentNote) type_; + } + return io.grafeas.v1.DeploymentNote.getDefaultInstance(); + } + + public static final int DISCOVERY_FIELD_NUMBER = 15; + /** + *
+   * A note describing the initial analysis of a resource.
+   * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + * @return Whether the discovery field is set. + */ + @java.lang.Override + public boolean hasDiscovery() { + return typeCase_ == 15; + } + /** + *
+   * A note describing the initial analysis of a resource.
+   * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + * @return The discovery. + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryNote getDiscovery() { + if (typeCase_ == 15) { + return (io.grafeas.v1.DiscoveryNote) type_; + } + return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); + } + /** + *
+   * A note describing the initial analysis of a resource.
+   * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryNoteOrBuilder getDiscoveryOrBuilder() { + if (typeCase_ == 15) { + return (io.grafeas.v1.DiscoveryNote) type_; + } + return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); + } + + public static final int ATTESTATION_FIELD_NUMBER = 16; + /** + *
+   * A note describing an attestation role.
+   * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + * @return Whether the attestation field is set. + */ + @java.lang.Override + public boolean hasAttestation() { + return typeCase_ == 16; + } + /** + *
+   * A note describing an attestation role.
+   * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + * @return The attestation. + */ + @java.lang.Override + public io.grafeas.v1.AttestationNote getAttestation() { + if (typeCase_ == 16) { + return (io.grafeas.v1.AttestationNote) type_; + } + return io.grafeas.v1.AttestationNote.getDefaultInstance(); + } + /** + *
+   * A note describing an attestation role.
+   * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + @java.lang.Override + public io.grafeas.v1.AttestationNoteOrBuilder getAttestationOrBuilder() { + if (typeCase_ == 16) { + return (io.grafeas.v1.AttestationNote) type_; + } + return io.grafeas.v1.AttestationNote.getDefaultInstance(); + } + + public static final int UPGRADE_FIELD_NUMBER = 17; + /** + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * @return Whether the upgrade field is set. + */ + @java.lang.Override + public boolean hasUpgrade() { + return typeCase_ == 17; + } + /** + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * @return The upgrade. + */ + @java.lang.Override + public io.grafeas.v1.UpgradeNote getUpgrade() { + if (typeCase_ == 17) { + return (io.grafeas.v1.UpgradeNote) type_; + } + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + /** + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + @java.lang.Override + public io.grafeas.v1.UpgradeNoteOrBuilder getUpgradeOrBuilder() { + if (typeCase_ == 17) { + return (io.grafeas.v1.UpgradeNote) type_; + } + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + + public static final int COMPLIANCE_FIELD_NUMBER = 18; + /** + *
+   * A note describing a compliance check.
+   * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + * @return Whether the compliance field is set. + */ + @java.lang.Override + public boolean hasCompliance() { + return typeCase_ == 18; + } + /** + *
+   * A note describing a compliance check.
+   * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + * @return The compliance. + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNote getCompliance() { + if (typeCase_ == 18) { + return (io.grafeas.v1.ComplianceNote) type_; + } + return io.grafeas.v1.ComplianceNote.getDefaultInstance(); + } + /** + *
+   * A note describing a compliance check.
+   * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNoteOrBuilder getComplianceOrBuilder() { + if (typeCase_ == 18) { + return (io.grafeas.v1.ComplianceNote) type_; + } + return io.grafeas.v1.ComplianceNote.getDefaultInstance(); + } + + public static final int DSSE_ATTESTATION_FIELD_NUMBER = 19; + /** + *
+   * A note describing a dsse attestation note.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + * @return Whether the dsseAttestation field is set. + */ + @java.lang.Override + public boolean hasDsseAttestation() { + return typeCase_ == 19; + } + /** + *
+   * A note describing a dsse attestation note.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + * @return The dsseAttestation. + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote getDsseAttestation() { + if (typeCase_ == 19) { + return (io.grafeas.v1.DSSEAttestationNote) type_; + } + return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); + } + /** + *
+   * A note describing a dsse attestation note.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder() { + if (typeCase_ == 19) { + return (io.grafeas.v1.DSSEAttestationNote) type_; + } + return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); + } + + public static final int VULNERABILITY_ASSESSMENT_FIELD_NUMBER = 20; + /** + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * @return Whether the vulnerabilityAssessment field is set. + */ + @java.lang.Override + public boolean hasVulnerabilityAssessment() { + return typeCase_ == 20; + } + /** + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * @return The vulnerabilityAssessment. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote getVulnerabilityAssessment() { + if (typeCase_ == 20) { + return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; + } + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + /** + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder getVulnerabilityAssessmentOrBuilder() { + if (typeCase_ == 20) { + return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; + } + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, longDescription_); + } + if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(4, kind_); + } + for (int i = 0; i < relatedUrl_.size(); i++) { + output.writeMessage(5, relatedUrl_.get(i)); + } + if (expirationTime_ != null) { + output.writeMessage(6, getExpirationTime()); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(8, getUpdateTime()); + } + for (int i = 0; i < relatedNoteNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, relatedNoteNames_.getRaw(i)); + } + if (typeCase_ == 10) { + output.writeMessage(10, (io.grafeas.v1.VulnerabilityNote) type_); + } + if (typeCase_ == 11) { + output.writeMessage(11, (io.grafeas.v1.BuildNote) type_); + } + if (typeCase_ == 12) { + output.writeMessage(12, (io.grafeas.v1.ImageNote) type_); + } + if (typeCase_ == 13) { + output.writeMessage(13, (io.grafeas.v1.PackageNote) type_); + } + if (typeCase_ == 14) { + output.writeMessage(14, (io.grafeas.v1.DeploymentNote) type_); + } + if (typeCase_ == 15) { + output.writeMessage(15, (io.grafeas.v1.DiscoveryNote) type_); + } + if (typeCase_ == 16) { + output.writeMessage(16, (io.grafeas.v1.AttestationNote) type_); + } + if (typeCase_ == 17) { + output.writeMessage(17, (io.grafeas.v1.UpgradeNote) type_); + } + if (typeCase_ == 18) { + output.writeMessage(18, (io.grafeas.v1.ComplianceNote) type_); + } + if (typeCase_ == 19) { + output.writeMessage(19, (io.grafeas.v1.DSSEAttestationNote) type_); + } + if (typeCase_ == 20) { + output.writeMessage(20, (io.grafeas.v1.VulnerabilityAssessmentNote) type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, longDescription_); + } + if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, kind_); + } + for (int i = 0; i < relatedUrl_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, relatedUrl_.get(i)); + } + if (expirationTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getExpirationTime()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getUpdateTime()); + } + { + int dataSize = 0; + for (int i = 0; i < relatedNoteNames_.size(); i++) { + dataSize += computeStringSizeNoTag(relatedNoteNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelatedNoteNamesList().size(); + } + if (typeCase_ == 10) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, (io.grafeas.v1.VulnerabilityNote) type_); + } + if (typeCase_ == 11) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, (io.grafeas.v1.BuildNote) type_); + } + if (typeCase_ == 12) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, (io.grafeas.v1.ImageNote) type_); + } + if (typeCase_ == 13) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, (io.grafeas.v1.PackageNote) type_); + } + if (typeCase_ == 14) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, (io.grafeas.v1.DeploymentNote) type_); + } + if (typeCase_ == 15) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, (io.grafeas.v1.DiscoveryNote) type_); + } + if (typeCase_ == 16) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, (io.grafeas.v1.AttestationNote) type_); + } + if (typeCase_ == 17) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, (io.grafeas.v1.UpgradeNote) type_); + } + if (typeCase_ == 18) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, (io.grafeas.v1.ComplianceNote) type_); + } + if (typeCase_ == 19) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, (io.grafeas.v1.DSSEAttestationNote) type_); + } + if (typeCase_ == 20) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, (io.grafeas.v1.VulnerabilityAssessmentNote) type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Note)) { + return super.equals(obj); + } + io.grafeas.v1.Note other = (io.grafeas.v1.Note) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getShortDescription() + .equals(other.getShortDescription())) return false; + if (!getLongDescription() + .equals(other.getLongDescription())) return false; + if (kind_ != other.kind_) return false; + if (!getRelatedUrlList() + .equals(other.getRelatedUrlList())) return false; + if (hasExpirationTime() != other.hasExpirationTime()) return false; + if (hasExpirationTime()) { + if (!getExpirationTime() + .equals(other.getExpirationTime())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!getRelatedNoteNamesList() + .equals(other.getRelatedNoteNamesList())) return false; + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 10: + if (!getVulnerability() + .equals(other.getVulnerability())) return false; + break; + case 11: + if (!getBuild() + .equals(other.getBuild())) return false; + break; + case 12: + if (!getImage() + .equals(other.getImage())) return false; + break; + case 13: + if (!getPackage() + .equals(other.getPackage())) return false; + break; + case 14: + if (!getDeployment() + .equals(other.getDeployment())) return false; + break; + case 15: + if (!getDiscovery() + .equals(other.getDiscovery())) return false; + break; + case 16: + if (!getAttestation() + .equals(other.getAttestation())) return false; + break; + case 17: + if (!getUpgrade() + .equals(other.getUpgrade())) return false; + break; + case 18: + if (!getCompliance() + .equals(other.getCompliance())) return false; + break; + case 19: + if (!getDsseAttestation() + .equals(other.getDsseAttestation())) return false; + break; + case 20: + if (!getVulnerabilityAssessment() + .equals(other.getVulnerabilityAssessment())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SHORT_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getShortDescription().hashCode(); + hash = (37 * hash) + LONG_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getLongDescription().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + kind_; + if (getRelatedUrlCount() > 0) { + hash = (37 * hash) + RELATED_URL_FIELD_NUMBER; + hash = (53 * hash) + getRelatedUrlList().hashCode(); + } + if (hasExpirationTime()) { + hash = (37 * hash) + EXPIRATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpirationTime().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (getRelatedNoteNamesCount() > 0) { + hash = (37 * hash) + RELATED_NOTE_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getRelatedNoteNamesList().hashCode(); + } + switch (typeCase_) { + case 10: + hash = (37 * hash) + VULNERABILITY_FIELD_NUMBER; + hash = (53 * hash) + getVulnerability().hashCode(); + break; + case 11: + hash = (37 * hash) + BUILD_FIELD_NUMBER; + hash = (53 * hash) + getBuild().hashCode(); + break; + case 12: + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + break; + case 13: + hash = (37 * hash) + PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPackage().hashCode(); + break; + case 14: + hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getDeployment().hashCode(); + break; + case 15: + hash = (37 * hash) + DISCOVERY_FIELD_NUMBER; + hash = (53 * hash) + getDiscovery().hashCode(); + break; + case 16: + hash = (37 * hash) + ATTESTATION_FIELD_NUMBER; + hash = (53 * hash) + getAttestation().hashCode(); + break; + case 17: + hash = (37 * hash) + UPGRADE_FIELD_NUMBER; + hash = (53 * hash) + getUpgrade().hashCode(); + break; + case 18: + hash = (37 * hash) + COMPLIANCE_FIELD_NUMBER; + hash = (53 * hash) + getCompliance().hashCode(); + break; + case 19: + hash = (37 * hash) + DSSE_ATTESTATION_FIELD_NUMBER; + hash = (53 * hash) + getDsseAttestation().hashCode(); + break; + case 20: + hash = (37 * hash) + VULNERABILITY_ASSESSMENT_FIELD_NUMBER; + hash = (53 * hash) + getVulnerabilityAssessment().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Note parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Note parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Note parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Note parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Note parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Note parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Note parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Note parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Note parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Note parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Note parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Note parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Note prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A type of analysis that can be done for a resource.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Note} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Note) + io.grafeas.v1.NoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Note.class, io.grafeas.v1.Note.Builder.class); + } + + // Construct using io.grafeas.v1.Note.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + shortDescription_ = ""; + longDescription_ = ""; + kind_ = 0; + if (relatedUrlBuilder_ == null) { + relatedUrl_ = java.util.Collections.emptyList(); + } else { + relatedUrl_ = null; + relatedUrlBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + expirationTime_ = null; + if (expirationTimeBuilder_ != null) { + expirationTimeBuilder_.dispose(); + expirationTimeBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000100); + if (vulnerabilityBuilder_ != null) { + vulnerabilityBuilder_.clear(); + } + if (buildBuilder_ != null) { + buildBuilder_.clear(); + } + if (imageBuilder_ != null) { + imageBuilder_.clear(); + } + if (packageBuilder_ != null) { + packageBuilder_.clear(); + } + if (deploymentBuilder_ != null) { + deploymentBuilder_.clear(); + } + if (discoveryBuilder_ != null) { + discoveryBuilder_.clear(); + } + if (attestationBuilder_ != null) { + attestationBuilder_.clear(); + } + if (upgradeBuilder_ != null) { + upgradeBuilder_.clear(); + } + if (complianceBuilder_ != null) { + complianceBuilder_.clear(); + } + if (dsseAttestationBuilder_ != null) { + dsseAttestationBuilder_.clear(); + } + if (vulnerabilityAssessmentBuilder_ != null) { + vulnerabilityAssessmentBuilder_.clear(); + } + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Note getDefaultInstanceForType() { + return io.grafeas.v1.Note.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Note build() { + io.grafeas.v1.Note result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Note buildPartial() { + io.grafeas.v1.Note result = new io.grafeas.v1.Note(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.Note result) { + if (relatedUrlBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + relatedUrl_ = java.util.Collections.unmodifiableList(relatedUrl_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.relatedUrl_ = relatedUrl_; + } else { + result.relatedUrl_ = relatedUrlBuilder_.build(); + } + if (((bitField0_ & 0x00000100) != 0)) { + relatedNoteNames_ = relatedNoteNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.relatedNoteNames_ = relatedNoteNames_; + } + + private void buildPartial0(io.grafeas.v1.Note result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.shortDescription_ = shortDescription_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.longDescription_ = longDescription_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.expirationTime_ = expirationTimeBuilder_ == null + ? expirationTime_ + : expirationTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + } + } + + private void buildPartialOneofs(io.grafeas.v1.Note result) { + result.typeCase_ = typeCase_; + result.type_ = this.type_; + if (typeCase_ == 10 && + vulnerabilityBuilder_ != null) { + result.type_ = vulnerabilityBuilder_.build(); + } + if (typeCase_ == 11 && + buildBuilder_ != null) { + result.type_ = buildBuilder_.build(); + } + if (typeCase_ == 12 && + imageBuilder_ != null) { + result.type_ = imageBuilder_.build(); + } + if (typeCase_ == 13 && + packageBuilder_ != null) { + result.type_ = packageBuilder_.build(); + } + if (typeCase_ == 14 && + deploymentBuilder_ != null) { + result.type_ = deploymentBuilder_.build(); + } + if (typeCase_ == 15 && + discoveryBuilder_ != null) { + result.type_ = discoveryBuilder_.build(); + } + if (typeCase_ == 16 && + attestationBuilder_ != null) { + result.type_ = attestationBuilder_.build(); + } + if (typeCase_ == 17 && + upgradeBuilder_ != null) { + result.type_ = upgradeBuilder_.build(); + } + if (typeCase_ == 18 && + complianceBuilder_ != null) { + result.type_ = complianceBuilder_.build(); + } + if (typeCase_ == 19 && + dsseAttestationBuilder_ != null) { + result.type_ = dsseAttestationBuilder_.build(); + } + if (typeCase_ == 20 && + vulnerabilityAssessmentBuilder_ != null) { + result.type_ = vulnerabilityAssessmentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Note) { + return mergeFrom((io.grafeas.v1.Note)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Note other) { + if (other == io.grafeas.v1.Note.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getShortDescription().isEmpty()) { + shortDescription_ = other.shortDescription_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getLongDescription().isEmpty()) { + longDescription_ = other.longDescription_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.kind_ != 0) { + setKindValue(other.getKindValue()); + } + if (relatedUrlBuilder_ == null) { + if (!other.relatedUrl_.isEmpty()) { + if (relatedUrl_.isEmpty()) { + relatedUrl_ = other.relatedUrl_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureRelatedUrlIsMutable(); + relatedUrl_.addAll(other.relatedUrl_); + } + onChanged(); + } + } else { + if (!other.relatedUrl_.isEmpty()) { + if (relatedUrlBuilder_.isEmpty()) { + relatedUrlBuilder_.dispose(); + relatedUrlBuilder_ = null; + relatedUrl_ = other.relatedUrl_; + bitField0_ = (bitField0_ & ~0x00000010); + relatedUrlBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRelatedUrlFieldBuilder() : null; + } else { + relatedUrlBuilder_.addAllMessages(other.relatedUrl_); + } + } + } + if (other.hasExpirationTime()) { + mergeExpirationTime(other.getExpirationTime()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.relatedNoteNames_.isEmpty()) { + if (relatedNoteNames_.isEmpty()) { + relatedNoteNames_ = other.relatedNoteNames_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureRelatedNoteNamesIsMutable(); + relatedNoteNames_.addAll(other.relatedNoteNames_); + } + onChanged(); + } + switch (other.getTypeCase()) { + case VULNERABILITY: { + mergeVulnerability(other.getVulnerability()); + break; + } + case BUILD: { + mergeBuild(other.getBuild()); + break; + } + case IMAGE: { + mergeImage(other.getImage()); + break; + } + case PACKAGE: { + mergePackage(other.getPackage()); + break; + } + case DEPLOYMENT: { + mergeDeployment(other.getDeployment()); + break; + } + case DISCOVERY: { + mergeDiscovery(other.getDiscovery()); + break; + } + case ATTESTATION: { + mergeAttestation(other.getAttestation()); + break; + } + case UPGRADE: { + mergeUpgrade(other.getUpgrade()); + break; + } + case COMPLIANCE: { + mergeCompliance(other.getCompliance()); + break; + } + case DSSE_ATTESTATION: { + mergeDsseAttestation(other.getDsseAttestation()); + break; + } + case VULNERABILITY_ASSESSMENT: { + mergeVulnerabilityAssessment(other.getVulnerabilityAssessment()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + shortDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + longDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + kind_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + io.grafeas.v1.RelatedUrl m = + input.readMessage( + io.grafeas.v1.RelatedUrl.parser(), + extensionRegistry); + if (relatedUrlBuilder_ == null) { + ensureRelatedUrlIsMutable(); + relatedUrl_.add(m); + } else { + relatedUrlBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: { + input.readMessage( + getExpirationTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + ensureRelatedNoteNamesIsMutable(); + relatedNoteNames_.add(s); + break; + } // case 74 + case 82: { + input.readMessage( + getVulnerabilityFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 10; + break; + } // case 82 + case 90: { + input.readMessage( + getBuildFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 11; + break; + } // case 90 + case 98: { + input.readMessage( + getImageFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 12; + break; + } // case 98 + case 106: { + input.readMessage( + getPackageFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 13; + break; + } // case 106 + case 114: { + input.readMessage( + getDeploymentFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 14; + break; + } // case 114 + case 122: { + input.readMessage( + getDiscoveryFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 15; + break; + } // case 122 + case 130: { + input.readMessage( + getAttestationFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 16; + break; + } // case 130 + case 138: { + input.readMessage( + getUpgradeFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 17; + break; + } // case 138 + case 146: { + input.readMessage( + getComplianceFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 18; + break; + } // case 146 + case 154: { + input.readMessage( + getDsseAttestationFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 19; + break; + } // case 154 + case 162: { + input.readMessage( + getVulnerabilityAssessmentFieldBuilder().getBuilder(), + extensionRegistry); + typeCase_ = 20; + break; + } // case 162 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Output only. The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Output only. The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object shortDescription_ = ""; + /** + *
+     * A one sentence description of this note.
+     * 
+ * + * string short_description = 2; + * @return The shortDescription. + */ + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A one sentence description of this note.
+     * 
+ * + * string short_description = 2; + * @return The bytes for shortDescription. + */ + public com.google.protobuf.ByteString + getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A one sentence description of this note.
+     * 
+ * + * string short_description = 2; + * @param value The shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + shortDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A one sentence description of this note.
+     * 
+ * + * string short_description = 2; + * @return This builder for chaining. + */ + public Builder clearShortDescription() { + shortDescription_ = getDefaultInstance().getShortDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A one sentence description of this note.
+     * 
+ * + * string short_description = 2; + * @param value The bytes for shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + shortDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object longDescription_ = ""; + /** + *
+     * A detailed description of this note.
+     * 
+ * + * string long_description = 3; + * @return The longDescription. + */ + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A detailed description of this note.
+     * 
+ * + * string long_description = 3; + * @return The bytes for longDescription. + */ + public com.google.protobuf.ByteString + getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A detailed description of this note.
+     * 
+ * + * string long_description = 3; + * @param value The longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + longDescription_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * A detailed description of this note.
+     * 
+ * + * string long_description = 3; + * @return This builder for chaining. + */ + public Builder clearLongDescription() { + longDescription_ = getDefaultInstance().getLongDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * A detailed description of this note.
+     * 
+ * + * string long_description = 3; + * @param value The bytes for longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + longDescription_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int kind_ = 0; + /** + *
+     * Output only. The type of analysis. This field can be used as a filter in
+     * list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+     * Output only. The type of analysis. This field can be used as a filter in
+     * list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @param value The enum numeric value on the wire for kind to set. + * @return This builder for chaining. + */ + public Builder setKindValue(int value) { + kind_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The type of analysis. This field can be used as a filter in
+     * list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The kind. + */ + @java.lang.Override + public io.grafeas.v1.NoteKind getKind() { + io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); + return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The type of analysis. This field can be used as a filter in
+     * list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(io.grafeas.v1.NoteKind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The type of analysis. This field can be used as a filter in
+     * list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return This builder for chaining. + */ + public Builder clearKind() { + bitField0_ = (bitField0_ & ~0x00000008); + kind_ = 0; + onChanged(); + return this; + } + + private java.util.List relatedUrl_ = + java.util.Collections.emptyList(); + private void ensureRelatedUrlIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + relatedUrl_ = new java.util.ArrayList(relatedUrl_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> relatedUrlBuilder_; + + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public java.util.List getRelatedUrlList() { + if (relatedUrlBuilder_ == null) { + return java.util.Collections.unmodifiableList(relatedUrl_); + } else { + return relatedUrlBuilder_.getMessageList(); + } + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public int getRelatedUrlCount() { + if (relatedUrlBuilder_ == null) { + return relatedUrl_.size(); + } else { + return relatedUrlBuilder_.getCount(); + } + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public io.grafeas.v1.RelatedUrl getRelatedUrl(int index) { + if (relatedUrlBuilder_ == null) { + return relatedUrl_.get(index); + } else { + return relatedUrlBuilder_.getMessage(index); + } + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder setRelatedUrl( + int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrlIsMutable(); + relatedUrl_.set(index, value); + onChanged(); + } else { + relatedUrlBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder setRelatedUrl( + int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrlBuilder_ == null) { + ensureRelatedUrlIsMutable(); + relatedUrl_.set(index, builderForValue.build()); + onChanged(); + } else { + relatedUrlBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder addRelatedUrl(io.grafeas.v1.RelatedUrl value) { + if (relatedUrlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrlIsMutable(); + relatedUrl_.add(value); + onChanged(); + } else { + relatedUrlBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder addRelatedUrl( + int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrlIsMutable(); + relatedUrl_.add(index, value); + onChanged(); + } else { + relatedUrlBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder addRelatedUrl( + io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrlBuilder_ == null) { + ensureRelatedUrlIsMutable(); + relatedUrl_.add(builderForValue.build()); + onChanged(); + } else { + relatedUrlBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder addRelatedUrl( + int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrlBuilder_ == null) { + ensureRelatedUrlIsMutable(); + relatedUrl_.add(index, builderForValue.build()); + onChanged(); + } else { + relatedUrlBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder addAllRelatedUrl( + java.lang.Iterable values) { + if (relatedUrlBuilder_ == null) { + ensureRelatedUrlIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relatedUrl_); + onChanged(); + } else { + relatedUrlBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder clearRelatedUrl() { + if (relatedUrlBuilder_ == null) { + relatedUrl_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + relatedUrlBuilder_.clear(); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public Builder removeRelatedUrl(int index) { + if (relatedUrlBuilder_ == null) { + ensureRelatedUrlIsMutable(); + relatedUrl_.remove(index); + onChanged(); + } else { + relatedUrlBuilder_.remove(index); + } + return this; + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public io.grafeas.v1.RelatedUrl.Builder getRelatedUrlBuilder( + int index) { + return getRelatedUrlFieldBuilder().getBuilder(index); + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlOrBuilder( + int index) { + if (relatedUrlBuilder_ == null) { + return relatedUrl_.get(index); } else { + return relatedUrlBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public java.util.List + getRelatedUrlOrBuilderList() { + if (relatedUrlBuilder_ != null) { + return relatedUrlBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relatedUrl_); + } + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlBuilder() { + return getRelatedUrlFieldBuilder().addBuilder( + io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlBuilder( + int index) { + return getRelatedUrlFieldBuilder().addBuilder( + index, io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + *
+     * URLs associated with this note.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + public java.util.List + getRelatedUrlBuilderList() { + return getRelatedUrlFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> + getRelatedUrlFieldBuilder() { + if (relatedUrlBuilder_ == null) { + relatedUrlBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder>( + relatedUrl_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + relatedUrl_ = null; + } + return relatedUrlBuilder_; + } + + private com.google.protobuf.Timestamp expirationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expirationTimeBuilder_; + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + * @return Whether the expirationTime field is set. + */ + public boolean hasExpirationTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + * @return The expirationTime. + */ + public com.google.protobuf.Timestamp getExpirationTime() { + if (expirationTimeBuilder_ == null) { + return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; + } else { + return expirationTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + public Builder setExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expirationTime_ = value; + } else { + expirationTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + public Builder setExpirationTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (expirationTimeBuilder_ == null) { + expirationTime_ = builderForValue.build(); + } else { + expirationTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + public Builder mergeExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + expirationTime_ != null && + expirationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpirationTimeBuilder().mergeFrom(value); + } else { + expirationTime_ = value; + } + } else { + expirationTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + public Builder clearExpirationTime() { + bitField0_ = (bitField0_ & ~0x00000020); + expirationTime_ = null; + if (expirationTimeBuilder_ != null) { + expirationTimeBuilder_.dispose(); + expirationTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getExpirationTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getExpirationTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + if (expirationTimeBuilder_ != null) { + return expirationTimeBuilder_.getMessageOrBuilder(); + } else { + return expirationTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; + } + } + /** + *
+     * Time of expiration for this note. Empty if note does not expire.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getExpirationTimeFieldBuilder() { + if (expirationTimeBuilder_ == null) { + expirationTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getExpirationTime(), + getParentForChildren(), + isClean()); + expirationTime_ = null; + } + return expirationTimeBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time this note was created. This field can be used as a
+     * filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The time this note was last updated. This field can be used as
+     * a filter in list requests.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.LazyStringList relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRelatedNoteNamesIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + relatedNoteNames_ = new com.google.protobuf.LazyStringArrayList(relatedNoteNames_); + bitField0_ |= 0x00000100; + } + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @return A list containing the relatedNoteNames. + */ + public com.google.protobuf.ProtocolStringList + getRelatedNoteNamesList() { + return relatedNoteNames_.getUnmodifiableView(); + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @return The count of relatedNoteNames. + */ + public int getRelatedNoteNamesCount() { + return relatedNoteNames_.size(); + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @param index The index of the element to return. + * @return The relatedNoteNames at the given index. + */ + public java.lang.String getRelatedNoteNames(int index) { + return relatedNoteNames_.get(index); + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @param index The index of the value to return. + * @return The bytes of the relatedNoteNames at the given index. + */ + public com.google.protobuf.ByteString + getRelatedNoteNamesBytes(int index) { + return relatedNoteNames_.getByteString(index); + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @param index The index to set the value at. + * @param value The relatedNoteNames to set. + * @return This builder for chaining. + */ + public Builder setRelatedNoteNames( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureRelatedNoteNamesIsMutable(); + relatedNoteNames_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @param value The relatedNoteNames to add. + * @return This builder for chaining. + */ + public Builder addRelatedNoteNames( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureRelatedNoteNamesIsMutable(); + relatedNoteNames_.add(value); + onChanged(); + return this; + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @param values The relatedNoteNames to add. + * @return This builder for chaining. + */ + public Builder addAllRelatedNoteNames( + java.lang.Iterable values) { + ensureRelatedNoteNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relatedNoteNames_); + onChanged(); + return this; + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @return This builder for chaining. + */ + public Builder clearRelatedNoteNames() { + relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * Other notes related to this note.
+     * 
+ * + * repeated string related_note_names = 9; + * @param value The bytes of the relatedNoteNames to add. + * @return This builder for chaining. + */ + public Builder addRelatedNoteNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureRelatedNoteNamesIsMutable(); + relatedNoteNames_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote, io.grafeas.v1.VulnerabilityNote.Builder, io.grafeas.v1.VulnerabilityNoteOrBuilder> vulnerabilityBuilder_; + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + * @return Whether the vulnerability field is set. + */ + @java.lang.Override + public boolean hasVulnerability() { + return typeCase_ == 10; + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + * @return The vulnerability. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote getVulnerability() { + if (vulnerabilityBuilder_ == null) { + if (typeCase_ == 10) { + return (io.grafeas.v1.VulnerabilityNote) type_; + } + return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); + } else { + if (typeCase_ == 10) { + return vulnerabilityBuilder_.getMessage(); + } + return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + public Builder setVulnerability(io.grafeas.v1.VulnerabilityNote value) { + if (vulnerabilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + vulnerabilityBuilder_.setMessage(value); + } + typeCase_ = 10; + return this; + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + public Builder setVulnerability( + io.grafeas.v1.VulnerabilityNote.Builder builderForValue) { + if (vulnerabilityBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + vulnerabilityBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 10; + return this; + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + public Builder mergeVulnerability(io.grafeas.v1.VulnerabilityNote value) { + if (vulnerabilityBuilder_ == null) { + if (typeCase_ == 10 && + type_ != io.grafeas.v1.VulnerabilityNote.getDefaultInstance()) { + type_ = io.grafeas.v1.VulnerabilityNote.newBuilder((io.grafeas.v1.VulnerabilityNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 10) { + vulnerabilityBuilder_.mergeFrom(value); + } else { + vulnerabilityBuilder_.setMessage(value); + } + } + typeCase_ = 10; + return this; + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + public Builder clearVulnerability() { + if (vulnerabilityBuilder_ == null) { + if (typeCase_ == 10) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 10) { + typeCase_ = 0; + type_ = null; + } + vulnerabilityBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + public io.grafeas.v1.VulnerabilityNote.Builder getVulnerabilityBuilder() { + return getVulnerabilityFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNoteOrBuilder getVulnerabilityOrBuilder() { + if ((typeCase_ == 10) && (vulnerabilityBuilder_ != null)) { + return vulnerabilityBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 10) { + return (io.grafeas.v1.VulnerabilityNote) type_; + } + return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a package vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote, io.grafeas.v1.VulnerabilityNote.Builder, io.grafeas.v1.VulnerabilityNoteOrBuilder> + getVulnerabilityFieldBuilder() { + if (vulnerabilityBuilder_ == null) { + if (!(typeCase_ == 10)) { + type_ = io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); + } + vulnerabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote, io.grafeas.v1.VulnerabilityNote.Builder, io.grafeas.v1.VulnerabilityNoteOrBuilder>( + (io.grafeas.v1.VulnerabilityNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 10; + onChanged(); + return vulnerabilityBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildNote, io.grafeas.v1.BuildNote.Builder, io.grafeas.v1.BuildNoteOrBuilder> buildBuilder_; + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + * @return Whether the build field is set. + */ + @java.lang.Override + public boolean hasBuild() { + return typeCase_ == 11; + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + * @return The build. + */ + @java.lang.Override + public io.grafeas.v1.BuildNote getBuild() { + if (buildBuilder_ == null) { + if (typeCase_ == 11) { + return (io.grafeas.v1.BuildNote) type_; + } + return io.grafeas.v1.BuildNote.getDefaultInstance(); + } else { + if (typeCase_ == 11) { + return buildBuilder_.getMessage(); + } + return io.grafeas.v1.BuildNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + public Builder setBuild(io.grafeas.v1.BuildNote value) { + if (buildBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + buildBuilder_.setMessage(value); + } + typeCase_ = 11; + return this; + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + public Builder setBuild( + io.grafeas.v1.BuildNote.Builder builderForValue) { + if (buildBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + buildBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 11; + return this; + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + public Builder mergeBuild(io.grafeas.v1.BuildNote value) { + if (buildBuilder_ == null) { + if (typeCase_ == 11 && + type_ != io.grafeas.v1.BuildNote.getDefaultInstance()) { + type_ = io.grafeas.v1.BuildNote.newBuilder((io.grafeas.v1.BuildNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 11) { + buildBuilder_.mergeFrom(value); + } else { + buildBuilder_.setMessage(value); + } + } + typeCase_ = 11; + return this; + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + public Builder clearBuild() { + if (buildBuilder_ == null) { + if (typeCase_ == 11) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 11) { + typeCase_ = 0; + type_ = null; + } + buildBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + public io.grafeas.v1.BuildNote.Builder getBuildBuilder() { + return getBuildFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + @java.lang.Override + public io.grafeas.v1.BuildNoteOrBuilder getBuildOrBuilder() { + if ((typeCase_ == 11) && (buildBuilder_ != null)) { + return buildBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 11) { + return (io.grafeas.v1.BuildNote) type_; + } + return io.grafeas.v1.BuildNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing build provenance for a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildNote, io.grafeas.v1.BuildNote.Builder, io.grafeas.v1.BuildNoteOrBuilder> + getBuildFieldBuilder() { + if (buildBuilder_ == null) { + if (!(typeCase_ == 11)) { + type_ = io.grafeas.v1.BuildNote.getDefaultInstance(); + } + buildBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildNote, io.grafeas.v1.BuildNote.Builder, io.grafeas.v1.BuildNoteOrBuilder>( + (io.grafeas.v1.BuildNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 11; + onChanged(); + return buildBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ImageNote, io.grafeas.v1.ImageNote.Builder, io.grafeas.v1.ImageNoteOrBuilder> imageBuilder_; + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return typeCase_ == 12; + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + * @return The image. + */ + @java.lang.Override + public io.grafeas.v1.ImageNote getImage() { + if (imageBuilder_ == null) { + if (typeCase_ == 12) { + return (io.grafeas.v1.ImageNote) type_; + } + return io.grafeas.v1.ImageNote.getDefaultInstance(); + } else { + if (typeCase_ == 12) { + return imageBuilder_.getMessage(); + } + return io.grafeas.v1.ImageNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + public Builder setImage(io.grafeas.v1.ImageNote value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + imageBuilder_.setMessage(value); + } + typeCase_ = 12; + return this; + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + public Builder setImage( + io.grafeas.v1.ImageNote.Builder builderForValue) { + if (imageBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 12; + return this; + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + public Builder mergeImage(io.grafeas.v1.ImageNote value) { + if (imageBuilder_ == null) { + if (typeCase_ == 12 && + type_ != io.grafeas.v1.ImageNote.getDefaultInstance()) { + type_ = io.grafeas.v1.ImageNote.newBuilder((io.grafeas.v1.ImageNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 12) { + imageBuilder_.mergeFrom(value); + } else { + imageBuilder_.setMessage(value); + } + } + typeCase_ = 12; + return this; + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + public Builder clearImage() { + if (imageBuilder_ == null) { + if (typeCase_ == 12) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 12) { + typeCase_ = 0; + type_ = null; + } + imageBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + public io.grafeas.v1.ImageNote.Builder getImageBuilder() { + return getImageFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + @java.lang.Override + public io.grafeas.v1.ImageNoteOrBuilder getImageOrBuilder() { + if ((typeCase_ == 12) && (imageBuilder_ != null)) { + return imageBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 12) { + return (io.grafeas.v1.ImageNote) type_; + } + return io.grafeas.v1.ImageNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a base image.
+     * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ImageNote, io.grafeas.v1.ImageNote.Builder, io.grafeas.v1.ImageNoteOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + if (!(typeCase_ == 12)) { + type_ = io.grafeas.v1.ImageNote.getDefaultInstance(); + } + imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ImageNote, io.grafeas.v1.ImageNote.Builder, io.grafeas.v1.ImageNoteOrBuilder>( + (io.grafeas.v1.ImageNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 12; + onChanged(); + return imageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.PackageNote, io.grafeas.v1.PackageNote.Builder, io.grafeas.v1.PackageNoteOrBuilder> packageBuilder_; + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + * @return Whether the package field is set. + */ + @java.lang.Override + public boolean hasPackage() { + return typeCase_ == 13; + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + * @return The package. + */ + @java.lang.Override + public io.grafeas.v1.PackageNote getPackage() { + if (packageBuilder_ == null) { + if (typeCase_ == 13) { + return (io.grafeas.v1.PackageNote) type_; + } + return io.grafeas.v1.PackageNote.getDefaultInstance(); + } else { + if (typeCase_ == 13) { + return packageBuilder_.getMessage(); + } + return io.grafeas.v1.PackageNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + public Builder setPackage(io.grafeas.v1.PackageNote value) { + if (packageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + packageBuilder_.setMessage(value); + } + typeCase_ = 13; + return this; + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + public Builder setPackage( + io.grafeas.v1.PackageNote.Builder builderForValue) { + if (packageBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + packageBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 13; + return this; + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + public Builder mergePackage(io.grafeas.v1.PackageNote value) { + if (packageBuilder_ == null) { + if (typeCase_ == 13 && + type_ != io.grafeas.v1.PackageNote.getDefaultInstance()) { + type_ = io.grafeas.v1.PackageNote.newBuilder((io.grafeas.v1.PackageNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 13) { + packageBuilder_.mergeFrom(value); + } else { + packageBuilder_.setMessage(value); + } + } + typeCase_ = 13; + return this; + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + public Builder clearPackage() { + if (packageBuilder_ == null) { + if (typeCase_ == 13) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 13) { + typeCase_ = 0; + type_ = null; + } + packageBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + public io.grafeas.v1.PackageNote.Builder getPackageBuilder() { + return getPackageFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + @java.lang.Override + public io.grafeas.v1.PackageNoteOrBuilder getPackageOrBuilder() { + if ((typeCase_ == 13) && (packageBuilder_ != null)) { + return packageBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 13) { + return (io.grafeas.v1.PackageNote) type_; + } + return io.grafeas.v1.PackageNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a package hosted by various package managers.
+     * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.PackageNote, io.grafeas.v1.PackageNote.Builder, io.grafeas.v1.PackageNoteOrBuilder> + getPackageFieldBuilder() { + if (packageBuilder_ == null) { + if (!(typeCase_ == 13)) { + type_ = io.grafeas.v1.PackageNote.getDefaultInstance(); + } + packageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.PackageNote, io.grafeas.v1.PackageNote.Builder, io.grafeas.v1.PackageNoteOrBuilder>( + (io.grafeas.v1.PackageNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 13; + onChanged(); + return packageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DeploymentNote, io.grafeas.v1.DeploymentNote.Builder, io.grafeas.v1.DeploymentNoteOrBuilder> deploymentBuilder_; + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + * @return Whether the deployment field is set. + */ + @java.lang.Override + public boolean hasDeployment() { + return typeCase_ == 14; + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + * @return The deployment. + */ + @java.lang.Override + public io.grafeas.v1.DeploymentNote getDeployment() { + if (deploymentBuilder_ == null) { + if (typeCase_ == 14) { + return (io.grafeas.v1.DeploymentNote) type_; + } + return io.grafeas.v1.DeploymentNote.getDefaultInstance(); + } else { + if (typeCase_ == 14) { + return deploymentBuilder_.getMessage(); + } + return io.grafeas.v1.DeploymentNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + public Builder setDeployment(io.grafeas.v1.DeploymentNote value) { + if (deploymentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + deploymentBuilder_.setMessage(value); + } + typeCase_ = 14; + return this; + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + public Builder setDeployment( + io.grafeas.v1.DeploymentNote.Builder builderForValue) { + if (deploymentBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + deploymentBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 14; + return this; + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + public Builder mergeDeployment(io.grafeas.v1.DeploymentNote value) { + if (deploymentBuilder_ == null) { + if (typeCase_ == 14 && + type_ != io.grafeas.v1.DeploymentNote.getDefaultInstance()) { + type_ = io.grafeas.v1.DeploymentNote.newBuilder((io.grafeas.v1.DeploymentNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 14) { + deploymentBuilder_.mergeFrom(value); + } else { + deploymentBuilder_.setMessage(value); + } + } + typeCase_ = 14; + return this; + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + public Builder clearDeployment() { + if (deploymentBuilder_ == null) { + if (typeCase_ == 14) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 14) { + typeCase_ = 0; + type_ = null; + } + deploymentBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + public io.grafeas.v1.DeploymentNote.Builder getDeploymentBuilder() { + return getDeploymentFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + @java.lang.Override + public io.grafeas.v1.DeploymentNoteOrBuilder getDeploymentOrBuilder() { + if ((typeCase_ == 14) && (deploymentBuilder_ != null)) { + return deploymentBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 14) { + return (io.grafeas.v1.DeploymentNote) type_; + } + return io.grafeas.v1.DeploymentNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing something that can be deployed.
+     * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DeploymentNote, io.grafeas.v1.DeploymentNote.Builder, io.grafeas.v1.DeploymentNoteOrBuilder> + getDeploymentFieldBuilder() { + if (deploymentBuilder_ == null) { + if (!(typeCase_ == 14)) { + type_ = io.grafeas.v1.DeploymentNote.getDefaultInstance(); + } + deploymentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DeploymentNote, io.grafeas.v1.DeploymentNote.Builder, io.grafeas.v1.DeploymentNoteOrBuilder>( + (io.grafeas.v1.DeploymentNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 14; + onChanged(); + return deploymentBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryNote, io.grafeas.v1.DiscoveryNote.Builder, io.grafeas.v1.DiscoveryNoteOrBuilder> discoveryBuilder_; + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + * @return Whether the discovery field is set. + */ + @java.lang.Override + public boolean hasDiscovery() { + return typeCase_ == 15; + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + * @return The discovery. + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryNote getDiscovery() { + if (discoveryBuilder_ == null) { + if (typeCase_ == 15) { + return (io.grafeas.v1.DiscoveryNote) type_; + } + return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); + } else { + if (typeCase_ == 15) { + return discoveryBuilder_.getMessage(); + } + return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + public Builder setDiscovery(io.grafeas.v1.DiscoveryNote value) { + if (discoveryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + discoveryBuilder_.setMessage(value); + } + typeCase_ = 15; + return this; + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + public Builder setDiscovery( + io.grafeas.v1.DiscoveryNote.Builder builderForValue) { + if (discoveryBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + discoveryBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 15; + return this; + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + public Builder mergeDiscovery(io.grafeas.v1.DiscoveryNote value) { + if (discoveryBuilder_ == null) { + if (typeCase_ == 15 && + type_ != io.grafeas.v1.DiscoveryNote.getDefaultInstance()) { + type_ = io.grafeas.v1.DiscoveryNote.newBuilder((io.grafeas.v1.DiscoveryNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 15) { + discoveryBuilder_.mergeFrom(value); + } else { + discoveryBuilder_.setMessage(value); + } + } + typeCase_ = 15; + return this; + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + public Builder clearDiscovery() { + if (discoveryBuilder_ == null) { + if (typeCase_ == 15) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 15) { + typeCase_ = 0; + type_ = null; + } + discoveryBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + public io.grafeas.v1.DiscoveryNote.Builder getDiscoveryBuilder() { + return getDiscoveryFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryNoteOrBuilder getDiscoveryOrBuilder() { + if ((typeCase_ == 15) && (discoveryBuilder_ != null)) { + return discoveryBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 15) { + return (io.grafeas.v1.DiscoveryNote) type_; + } + return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing the initial analysis of a resource.
+     * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryNote, io.grafeas.v1.DiscoveryNote.Builder, io.grafeas.v1.DiscoveryNoteOrBuilder> + getDiscoveryFieldBuilder() { + if (discoveryBuilder_ == null) { + if (!(typeCase_ == 15)) { + type_ = io.grafeas.v1.DiscoveryNote.getDefaultInstance(); + } + discoveryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryNote, io.grafeas.v1.DiscoveryNote.Builder, io.grafeas.v1.DiscoveryNoteOrBuilder>( + (io.grafeas.v1.DiscoveryNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 15; + onChanged(); + return discoveryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationNote, io.grafeas.v1.AttestationNote.Builder, io.grafeas.v1.AttestationNoteOrBuilder> attestationBuilder_; + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + * @return Whether the attestation field is set. + */ + @java.lang.Override + public boolean hasAttestation() { + return typeCase_ == 16; + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + * @return The attestation. + */ + @java.lang.Override + public io.grafeas.v1.AttestationNote getAttestation() { + if (attestationBuilder_ == null) { + if (typeCase_ == 16) { + return (io.grafeas.v1.AttestationNote) type_; + } + return io.grafeas.v1.AttestationNote.getDefaultInstance(); + } else { + if (typeCase_ == 16) { + return attestationBuilder_.getMessage(); + } + return io.grafeas.v1.AttestationNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + public Builder setAttestation(io.grafeas.v1.AttestationNote value) { + if (attestationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + attestationBuilder_.setMessage(value); + } + typeCase_ = 16; + return this; + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + public Builder setAttestation( + io.grafeas.v1.AttestationNote.Builder builderForValue) { + if (attestationBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + attestationBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 16; + return this; + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + public Builder mergeAttestation(io.grafeas.v1.AttestationNote value) { + if (attestationBuilder_ == null) { + if (typeCase_ == 16 && + type_ != io.grafeas.v1.AttestationNote.getDefaultInstance()) { + type_ = io.grafeas.v1.AttestationNote.newBuilder((io.grafeas.v1.AttestationNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 16) { + attestationBuilder_.mergeFrom(value); + } else { + attestationBuilder_.setMessage(value); + } + } + typeCase_ = 16; + return this; + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + public Builder clearAttestation() { + if (attestationBuilder_ == null) { + if (typeCase_ == 16) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 16) { + typeCase_ = 0; + type_ = null; + } + attestationBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + public io.grafeas.v1.AttestationNote.Builder getAttestationBuilder() { + return getAttestationFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + @java.lang.Override + public io.grafeas.v1.AttestationNoteOrBuilder getAttestationOrBuilder() { + if ((typeCase_ == 16) && (attestationBuilder_ != null)) { + return attestationBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 16) { + return (io.grafeas.v1.AttestationNote) type_; + } + return io.grafeas.v1.AttestationNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing an attestation role.
+     * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationNote, io.grafeas.v1.AttestationNote.Builder, io.grafeas.v1.AttestationNoteOrBuilder> + getAttestationFieldBuilder() { + if (attestationBuilder_ == null) { + if (!(typeCase_ == 16)) { + type_ = io.grafeas.v1.AttestationNote.getDefaultInstance(); + } + attestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationNote, io.grafeas.v1.AttestationNote.Builder, io.grafeas.v1.AttestationNoteOrBuilder>( + (io.grafeas.v1.AttestationNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 16; + onChanged(); + return attestationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeNote, io.grafeas.v1.UpgradeNote.Builder, io.grafeas.v1.UpgradeNoteOrBuilder> upgradeBuilder_; + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * @return Whether the upgrade field is set. + */ + @java.lang.Override + public boolean hasUpgrade() { + return typeCase_ == 17; + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * @return The upgrade. + */ + @java.lang.Override + public io.grafeas.v1.UpgradeNote getUpgrade() { + if (upgradeBuilder_ == null) { + if (typeCase_ == 17) { + return (io.grafeas.v1.UpgradeNote) type_; + } + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } else { + if (typeCase_ == 17) { + return upgradeBuilder_.getMessage(); + } + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public Builder setUpgrade(io.grafeas.v1.UpgradeNote value) { + if (upgradeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + upgradeBuilder_.setMessage(value); + } + typeCase_ = 17; + return this; + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public Builder setUpgrade( + io.grafeas.v1.UpgradeNote.Builder builderForValue) { + if (upgradeBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + upgradeBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 17; + return this; + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public Builder mergeUpgrade(io.grafeas.v1.UpgradeNote value) { + if (upgradeBuilder_ == null) { + if (typeCase_ == 17 && + type_ != io.grafeas.v1.UpgradeNote.getDefaultInstance()) { + type_ = io.grafeas.v1.UpgradeNote.newBuilder((io.grafeas.v1.UpgradeNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 17) { + upgradeBuilder_.mergeFrom(value); + } else { + upgradeBuilder_.setMessage(value); + } + } + typeCase_ = 17; + return this; + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public Builder clearUpgrade() { + if (upgradeBuilder_ == null) { + if (typeCase_ == 17) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 17) { + typeCase_ = 0; + type_ = null; + } + upgradeBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public io.grafeas.v1.UpgradeNote.Builder getUpgradeBuilder() { + return getUpgradeFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + @java.lang.Override + public io.grafeas.v1.UpgradeNoteOrBuilder getUpgradeOrBuilder() { + if ((typeCase_ == 17) && (upgradeBuilder_ != null)) { + return upgradeBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 17) { + return (io.grafeas.v1.UpgradeNote) type_; + } + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeNote, io.grafeas.v1.UpgradeNote.Builder, io.grafeas.v1.UpgradeNoteOrBuilder> + getUpgradeFieldBuilder() { + if (upgradeBuilder_ == null) { + if (!(typeCase_ == 17)) { + type_ = io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + upgradeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeNote, io.grafeas.v1.UpgradeNote.Builder, io.grafeas.v1.UpgradeNoteOrBuilder>( + (io.grafeas.v1.UpgradeNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 17; + onChanged(); + return upgradeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceNote, io.grafeas.v1.ComplianceNote.Builder, io.grafeas.v1.ComplianceNoteOrBuilder> complianceBuilder_; + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + * @return Whether the compliance field is set. + */ + @java.lang.Override + public boolean hasCompliance() { + return typeCase_ == 18; + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + * @return The compliance. + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNote getCompliance() { + if (complianceBuilder_ == null) { + if (typeCase_ == 18) { + return (io.grafeas.v1.ComplianceNote) type_; + } + return io.grafeas.v1.ComplianceNote.getDefaultInstance(); + } else { + if (typeCase_ == 18) { + return complianceBuilder_.getMessage(); + } + return io.grafeas.v1.ComplianceNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + public Builder setCompliance(io.grafeas.v1.ComplianceNote value) { + if (complianceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + complianceBuilder_.setMessage(value); + } + typeCase_ = 18; + return this; + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + public Builder setCompliance( + io.grafeas.v1.ComplianceNote.Builder builderForValue) { + if (complianceBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + complianceBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 18; + return this; + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + public Builder mergeCompliance(io.grafeas.v1.ComplianceNote value) { + if (complianceBuilder_ == null) { + if (typeCase_ == 18 && + type_ != io.grafeas.v1.ComplianceNote.getDefaultInstance()) { + type_ = io.grafeas.v1.ComplianceNote.newBuilder((io.grafeas.v1.ComplianceNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 18) { + complianceBuilder_.mergeFrom(value); + } else { + complianceBuilder_.setMessage(value); + } + } + typeCase_ = 18; + return this; + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + public Builder clearCompliance() { + if (complianceBuilder_ == null) { + if (typeCase_ == 18) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 18) { + typeCase_ = 0; + type_ = null; + } + complianceBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + public io.grafeas.v1.ComplianceNote.Builder getComplianceBuilder() { + return getComplianceFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceNoteOrBuilder getComplianceOrBuilder() { + if ((typeCase_ == 18) && (complianceBuilder_ != null)) { + return complianceBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 18) { + return (io.grafeas.v1.ComplianceNote) type_; + } + return io.grafeas.v1.ComplianceNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a compliance check.
+     * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceNote, io.grafeas.v1.ComplianceNote.Builder, io.grafeas.v1.ComplianceNoteOrBuilder> + getComplianceFieldBuilder() { + if (complianceBuilder_ == null) { + if (!(typeCase_ == 18)) { + type_ = io.grafeas.v1.ComplianceNote.getDefaultInstance(); + } + complianceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceNote, io.grafeas.v1.ComplianceNote.Builder, io.grafeas.v1.ComplianceNoteOrBuilder>( + (io.grafeas.v1.ComplianceNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 18; + onChanged(); + return complianceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationNote, io.grafeas.v1.DSSEAttestationNote.Builder, io.grafeas.v1.DSSEAttestationNoteOrBuilder> dsseAttestationBuilder_; + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + * @return Whether the dsseAttestation field is set. + */ + @java.lang.Override + public boolean hasDsseAttestation() { + return typeCase_ == 19; + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + * @return The dsseAttestation. + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNote getDsseAttestation() { + if (dsseAttestationBuilder_ == null) { + if (typeCase_ == 19) { + return (io.grafeas.v1.DSSEAttestationNote) type_; + } + return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); + } else { + if (typeCase_ == 19) { + return dsseAttestationBuilder_.getMessage(); + } + return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + public Builder setDsseAttestation(io.grafeas.v1.DSSEAttestationNote value) { + if (dsseAttestationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + dsseAttestationBuilder_.setMessage(value); + } + typeCase_ = 19; + return this; + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + public Builder setDsseAttestation( + io.grafeas.v1.DSSEAttestationNote.Builder builderForValue) { + if (dsseAttestationBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + dsseAttestationBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 19; + return this; + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + public Builder mergeDsseAttestation(io.grafeas.v1.DSSEAttestationNote value) { + if (dsseAttestationBuilder_ == null) { + if (typeCase_ == 19 && + type_ != io.grafeas.v1.DSSEAttestationNote.getDefaultInstance()) { + type_ = io.grafeas.v1.DSSEAttestationNote.newBuilder((io.grafeas.v1.DSSEAttestationNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 19) { + dsseAttestationBuilder_.mergeFrom(value); + } else { + dsseAttestationBuilder_.setMessage(value); + } + } + typeCase_ = 19; + return this; + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + public Builder clearDsseAttestation() { + if (dsseAttestationBuilder_ == null) { + if (typeCase_ == 19) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 19) { + typeCase_ = 0; + type_ = null; + } + dsseAttestationBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + public io.grafeas.v1.DSSEAttestationNote.Builder getDsseAttestationBuilder() { + return getDsseAttestationFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder() { + if ((typeCase_ == 19) && (dsseAttestationBuilder_ != null)) { + return dsseAttestationBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 19) { + return (io.grafeas.v1.DSSEAttestationNote) type_; + } + return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a dsse attestation note.
+     * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationNote, io.grafeas.v1.DSSEAttestationNote.Builder, io.grafeas.v1.DSSEAttestationNoteOrBuilder> + getDsseAttestationFieldBuilder() { + if (dsseAttestationBuilder_ == null) { + if (!(typeCase_ == 19)) { + type_ = io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); + } + dsseAttestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationNote, io.grafeas.v1.DSSEAttestationNote.Builder, io.grafeas.v1.DSSEAttestationNoteOrBuilder>( + (io.grafeas.v1.DSSEAttestationNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 19; + onChanged(); + return dsseAttestationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote, io.grafeas.v1.VulnerabilityAssessmentNote.Builder, io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder> vulnerabilityAssessmentBuilder_; + /** + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * @return Whether the vulnerabilityAssessment field is set. + */ + @java.lang.Override + public boolean hasVulnerabilityAssessment() { + return typeCase_ == 20; + } + /** + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * @return The vulnerabilityAssessment. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote getVulnerabilityAssessment() { + if (vulnerabilityAssessmentBuilder_ == null) { + if (typeCase_ == 20) { + return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; + } + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } else { + if (typeCase_ == 20) { + return vulnerabilityAssessmentBuilder_.getMessage(); + } + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + public Builder setVulnerabilityAssessment(io.grafeas.v1.VulnerabilityAssessmentNote value) { + if (vulnerabilityAssessmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + vulnerabilityAssessmentBuilder_.setMessage(value); + } + typeCase_ = 20; + return this; + } + /** + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + public Builder setVulnerabilityAssessment( + io.grafeas.v1.VulnerabilityAssessmentNote.Builder builderForValue) { + if (vulnerabilityAssessmentBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + vulnerabilityAssessmentBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 20; + return this; + } + /** + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + public Builder mergeVulnerabilityAssessment(io.grafeas.v1.VulnerabilityAssessmentNote value) { + if (vulnerabilityAssessmentBuilder_ == null) { + if (typeCase_ == 20 && + type_ != io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance()) { + type_ = io.grafeas.v1.VulnerabilityAssessmentNote.newBuilder((io.grafeas.v1.VulnerabilityAssessmentNote) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 20) { + vulnerabilityAssessmentBuilder_.mergeFrom(value); + } else { + vulnerabilityAssessmentBuilder_.setMessage(value); + } + } + typeCase_ = 20; + return this; + } + /** + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + public Builder clearVulnerabilityAssessment() { + if (vulnerabilityAssessmentBuilder_ == null) { + if (typeCase_ == 20) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 20) { + typeCase_ = 0; + type_ = null; + } + vulnerabilityAssessmentBuilder_.clear(); + } + return this; + } + /** + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Builder getVulnerabilityAssessmentBuilder() { + return getVulnerabilityAssessmentFieldBuilder().getBuilder(); + } + /** + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder getVulnerabilityAssessmentOrBuilder() { + if ((typeCase_ == 20) && (vulnerabilityAssessmentBuilder_ != null)) { + return vulnerabilityAssessmentBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 20) { + return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; + } + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + } + /** + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote, io.grafeas.v1.VulnerabilityAssessmentNote.Builder, io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder> + getVulnerabilityAssessmentFieldBuilder() { + if (vulnerabilityAssessmentBuilder_ == null) { + if (!(typeCase_ == 20)) { + type_ = io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + vulnerabilityAssessmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote, io.grafeas.v1.VulnerabilityAssessmentNote.Builder, io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder>( + (io.grafeas.v1.VulnerabilityAssessmentNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 20; + onChanged(); + return vulnerabilityAssessmentBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Note) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Note) + private static final io.grafeas.v1.Note DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Note(); + } + + public static io.grafeas.v1.Note getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Note parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Note getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java new file mode 100644 index 000000000000..faf5dd358e75 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java @@ -0,0 +1,303 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + *
+ * Kind represents the kinds of notes supported.
+ * 
+ * + * Protobuf enum {@code grafeas.v1.NoteKind} + */ +public enum NoteKind + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Default value. This value is unused.
+   * 
+ * + * NOTE_KIND_UNSPECIFIED = 0; + */ + NOTE_KIND_UNSPECIFIED(0), + /** + *
+   * The note and occurrence represent a package vulnerability.
+   * 
+ * + * VULNERABILITY = 1; + */ + VULNERABILITY(1), + /** + *
+   * The note and occurrence assert build provenance.
+   * 
+ * + * BUILD = 2; + */ + BUILD(2), + /** + *
+   * This represents an image basis relationship.
+   * 
+ * + * IMAGE = 3; + */ + IMAGE(3), + /** + *
+   * This represents a package installed via a package manager.
+   * 
+ * + * PACKAGE = 4; + */ + PACKAGE(4), + /** + *
+   * The note and occurrence track deployment events.
+   * 
+ * + * DEPLOYMENT = 5; + */ + DEPLOYMENT(5), + /** + *
+   * The note and occurrence track the initial discovery status of a resource.
+   * 
+ * + * DISCOVERY = 6; + */ + DISCOVERY(6), + /** + *
+   * This represents a logical "role" that can attest to artifacts.
+   * 
+ * + * ATTESTATION = 7; + */ + ATTESTATION(7), + /** + *
+   * This represents an available package upgrade.
+   * 
+ * + * UPGRADE = 8; + */ + UPGRADE(8), + /** + *
+   * This represents a Compliance Note
+   * 
+ * + * COMPLIANCE = 9; + */ + COMPLIANCE(9), + /** + *
+   * This represents a DSSE attestation Note
+   * 
+ * + * DSSE_ATTESTATION = 10; + */ + DSSE_ATTESTATION(10), + /** + *
+   * This represents a Vulnerability Assessment.
+   * 
+ * + * VULNERABILITY_ASSESSMENT = 11; + */ + VULNERABILITY_ASSESSMENT(11), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Default value. This value is unused.
+   * 
+ * + * NOTE_KIND_UNSPECIFIED = 0; + */ + public static final int NOTE_KIND_UNSPECIFIED_VALUE = 0; + /** + *
+   * The note and occurrence represent a package vulnerability.
+   * 
+ * + * VULNERABILITY = 1; + */ + public static final int VULNERABILITY_VALUE = 1; + /** + *
+   * The note and occurrence assert build provenance.
+   * 
+ * + * BUILD = 2; + */ + public static final int BUILD_VALUE = 2; + /** + *
+   * This represents an image basis relationship.
+   * 
+ * + * IMAGE = 3; + */ + public static final int IMAGE_VALUE = 3; + /** + *
+   * This represents a package installed via a package manager.
+   * 
+ * + * PACKAGE = 4; + */ + public static final int PACKAGE_VALUE = 4; + /** + *
+   * The note and occurrence track deployment events.
+   * 
+ * + * DEPLOYMENT = 5; + */ + public static final int DEPLOYMENT_VALUE = 5; + /** + *
+   * The note and occurrence track the initial discovery status of a resource.
+   * 
+ * + * DISCOVERY = 6; + */ + public static final int DISCOVERY_VALUE = 6; + /** + *
+   * This represents a logical "role" that can attest to artifacts.
+   * 
+ * + * ATTESTATION = 7; + */ + public static final int ATTESTATION_VALUE = 7; + /** + *
+   * This represents an available package upgrade.
+   * 
+ * + * UPGRADE = 8; + */ + public static final int UPGRADE_VALUE = 8; + /** + *
+   * This represents a Compliance Note
+   * 
+ * + * COMPLIANCE = 9; + */ + public static final int COMPLIANCE_VALUE = 9; + /** + *
+   * This represents a DSSE attestation Note
+   * 
+ * + * DSSE_ATTESTATION = 10; + */ + public static final int DSSE_ATTESTATION_VALUE = 10; + /** + *
+   * This represents a Vulnerability Assessment.
+   * 
+ * + * VULNERABILITY_ASSESSMENT = 11; + */ + public static final int VULNERABILITY_ASSESSMENT_VALUE = 11; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NoteKind valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static NoteKind forNumber(int value) { + switch (value) { + case 0: return NOTE_KIND_UNSPECIFIED; + case 1: return VULNERABILITY; + case 2: return BUILD; + case 3: return IMAGE; + case 4: return PACKAGE; + case 5: return DEPLOYMENT; + case 6: return DISCOVERY; + case 7: return ATTESTATION; + case 8: return UPGRADE; + case 9: return COMPLIANCE; + case 10: return DSSE_ATTESTATION; + case 11: return VULNERABILITY_ASSESSMENT; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + NoteKind> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NoteKind findValueByNumber(int number) { + return NoteKind.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.Common.getDescriptor().getEnumTypes().get(0); + } + + private static final NoteKind[] VALUES = values(); + + public static NoteKind valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NoteKind(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.NoteKind) +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java new file mode 100644 index 000000000000..cc46d3b47ff2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java @@ -0,0 +1,191 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class NoteName implements ResourceName { + private static final PathTemplate PROJECT_NOTE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/notes/{note}"); + private volatile Map fieldValuesMap; + private final String project; + private final String note; + + @Deprecated + protected NoteName() { + project = null; + note = null; + } + + private NoteName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + note = Preconditions.checkNotNull(builder.getNote()); + } + + public String getProject() { + return project; + } + + public String getNote() { + return note; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static NoteName of(String project, String note) { + return newBuilder().setProject(project).setNote(note).build(); + } + + public static String format(String project, String note) { + return newBuilder().setProject(project).setNote(note).build().toString(); + } + + public static NoteName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_NOTE.validatedMatch( + formattedString, "NoteName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("note")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (NoteName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_NOTE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (note != null) { + fieldMapBuilder.put("note", note); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_NOTE.instantiate("project", project, "note", note); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + NoteName that = ((NoteName) o); + return Objects.equals(this.project, that.project) && Objects.equals(this.note, that.note); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(note); + return h; + } + + /** Builder for projects/{project}/notes/{note}. */ + public static class Builder { + private String project; + private String note; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getNote() { + return note; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setNote(String note) { + this.note = note; + return this; + } + + private Builder(NoteName noteName) { + this.project = noteName.project; + this.note = noteName.note; + } + + public NoteName build() { + return new NoteName(this); + } + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java new file mode 100644 index 000000000000..74cd8e258fd8 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java @@ -0,0 +1,563 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface NoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Note) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Output only. The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * A one sentence description of this note.
+   * 
+ * + * string short_description = 2; + * @return The shortDescription. + */ + java.lang.String getShortDescription(); + /** + *
+   * A one sentence description of this note.
+   * 
+ * + * string short_description = 2; + * @return The bytes for shortDescription. + */ + com.google.protobuf.ByteString + getShortDescriptionBytes(); + + /** + *
+   * A detailed description of this note.
+   * 
+ * + * string long_description = 3; + * @return The longDescription. + */ + java.lang.String getLongDescription(); + /** + *
+   * A detailed description of this note.
+   * 
+ * + * string long_description = 3; + * @return The bytes for longDescription. + */ + com.google.protobuf.ByteString + getLongDescriptionBytes(); + + /** + *
+   * Output only. The type of analysis. This field can be used as a filter in
+   * list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + int getKindValue(); + /** + *
+   * Output only. The type of analysis. This field can be used as a filter in
+   * list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The kind. + */ + io.grafeas.v1.NoteKind getKind(); + + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + java.util.List + getRelatedUrlList(); + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + io.grafeas.v1.RelatedUrl getRelatedUrl(int index); + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + int getRelatedUrlCount(); + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + java.util.List + getRelatedUrlOrBuilderList(); + /** + *
+   * URLs associated with this note.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlOrBuilder( + int index); + + /** + *
+   * Time of expiration for this note. Empty if note does not expire.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + * @return Whether the expirationTime field is set. + */ + boolean hasExpirationTime(); + /** + *
+   * Time of expiration for this note. Empty if note does not expire.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + * @return The expirationTime. + */ + com.google.protobuf.Timestamp getExpirationTime(); + /** + *
+   * Time of expiration for this note. Empty if note does not expire.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder(); + + /** + *
+   * Output only. The time this note was created. This field can be used as a
+   * filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time this note was created. This field can be used as a
+   * filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time this note was created. This field can be used as a
+   * filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time this note was last updated. This field can be used as
+   * a filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The time this note was last updated. This field can be used as
+   * a filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The time this note was last updated. This field can be used as
+   * a filter in list requests.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @return A list containing the relatedNoteNames. + */ + java.util.List + getRelatedNoteNamesList(); + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @return The count of relatedNoteNames. + */ + int getRelatedNoteNamesCount(); + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @param index The index of the element to return. + * @return The relatedNoteNames at the given index. + */ + java.lang.String getRelatedNoteNames(int index); + /** + *
+   * Other notes related to this note.
+   * 
+ * + * repeated string related_note_names = 9; + * @param index The index of the value to return. + * @return The bytes of the relatedNoteNames at the given index. + */ + com.google.protobuf.ByteString + getRelatedNoteNamesBytes(int index); + + /** + *
+   * A note describing a package vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + * @return Whether the vulnerability field is set. + */ + boolean hasVulnerability(); + /** + *
+   * A note describing a package vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + * @return The vulnerability. + */ + io.grafeas.v1.VulnerabilityNote getVulnerability(); + /** + *
+   * A note describing a package vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityNote vulnerability = 10; + */ + io.grafeas.v1.VulnerabilityNoteOrBuilder getVulnerabilityOrBuilder(); + + /** + *
+   * A note describing build provenance for a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildNote build = 11; + * @return Whether the build field is set. + */ + boolean hasBuild(); + /** + *
+   * A note describing build provenance for a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildNote build = 11; + * @return The build. + */ + io.grafeas.v1.BuildNote getBuild(); + /** + *
+   * A note describing build provenance for a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildNote build = 11; + */ + io.grafeas.v1.BuildNoteOrBuilder getBuildOrBuilder(); + + /** + *
+   * A note describing a base image.
+   * 
+ * + * .grafeas.v1.ImageNote image = 12; + * @return Whether the image field is set. + */ + boolean hasImage(); + /** + *
+   * A note describing a base image.
+   * 
+ * + * .grafeas.v1.ImageNote image = 12; + * @return The image. + */ + io.grafeas.v1.ImageNote getImage(); + /** + *
+   * A note describing a base image.
+   * 
+ * + * .grafeas.v1.ImageNote image = 12; + */ + io.grafeas.v1.ImageNoteOrBuilder getImageOrBuilder(); + + /** + *
+   * A note describing a package hosted by various package managers.
+   * 
+ * + * .grafeas.v1.PackageNote package = 13; + * @return Whether the package field is set. + */ + boolean hasPackage(); + /** + *
+   * A note describing a package hosted by various package managers.
+   * 
+ * + * .grafeas.v1.PackageNote package = 13; + * @return The package. + */ + io.grafeas.v1.PackageNote getPackage(); + /** + *
+   * A note describing a package hosted by various package managers.
+   * 
+ * + * .grafeas.v1.PackageNote package = 13; + */ + io.grafeas.v1.PackageNoteOrBuilder getPackageOrBuilder(); + + /** + *
+   * A note describing something that can be deployed.
+   * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + * @return Whether the deployment field is set. + */ + boolean hasDeployment(); + /** + *
+   * A note describing something that can be deployed.
+   * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + * @return The deployment. + */ + io.grafeas.v1.DeploymentNote getDeployment(); + /** + *
+   * A note describing something that can be deployed.
+   * 
+ * + * .grafeas.v1.DeploymentNote deployment = 14; + */ + io.grafeas.v1.DeploymentNoteOrBuilder getDeploymentOrBuilder(); + + /** + *
+   * A note describing the initial analysis of a resource.
+   * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + * @return Whether the discovery field is set. + */ + boolean hasDiscovery(); + /** + *
+   * A note describing the initial analysis of a resource.
+   * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + * @return The discovery. + */ + io.grafeas.v1.DiscoveryNote getDiscovery(); + /** + *
+   * A note describing the initial analysis of a resource.
+   * 
+ * + * .grafeas.v1.DiscoveryNote discovery = 15; + */ + io.grafeas.v1.DiscoveryNoteOrBuilder getDiscoveryOrBuilder(); + + /** + *
+   * A note describing an attestation role.
+   * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + * @return Whether the attestation field is set. + */ + boolean hasAttestation(); + /** + *
+   * A note describing an attestation role.
+   * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + * @return The attestation. + */ + io.grafeas.v1.AttestationNote getAttestation(); + /** + *
+   * A note describing an attestation role.
+   * 
+ * + * .grafeas.v1.AttestationNote attestation = 16; + */ + io.grafeas.v1.AttestationNoteOrBuilder getAttestationOrBuilder(); + + /** + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * @return Whether the upgrade field is set. + */ + boolean hasUpgrade(); + /** + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * @return The upgrade. + */ + io.grafeas.v1.UpgradeNote getUpgrade(); + /** + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + io.grafeas.v1.UpgradeNoteOrBuilder getUpgradeOrBuilder(); + + /** + *
+   * A note describing a compliance check.
+   * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + * @return Whether the compliance field is set. + */ + boolean hasCompliance(); + /** + *
+   * A note describing a compliance check.
+   * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + * @return The compliance. + */ + io.grafeas.v1.ComplianceNote getCompliance(); + /** + *
+   * A note describing a compliance check.
+   * 
+ * + * .grafeas.v1.ComplianceNote compliance = 18; + */ + io.grafeas.v1.ComplianceNoteOrBuilder getComplianceOrBuilder(); + + /** + *
+   * A note describing a dsse attestation note.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + * @return Whether the dsseAttestation field is set. + */ + boolean hasDsseAttestation(); + /** + *
+   * A note describing a dsse attestation note.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + * @return The dsseAttestation. + */ + io.grafeas.v1.DSSEAttestationNote getDsseAttestation(); + /** + *
+   * A note describing a dsse attestation note.
+   * 
+ * + * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + */ + io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder(); + + /** + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * @return Whether the vulnerabilityAssessment field is set. + */ + boolean hasVulnerabilityAssessment(); + /** + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * @return The vulnerabilityAssessment. + */ + io.grafeas.v1.VulnerabilityAssessmentNote getVulnerabilityAssessment(); + /** + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder getVulnerabilityAssessmentOrBuilder(); + + public io.grafeas.v1.Note.TypeCase getTypeCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java new file mode 100644 index 000000000000..bc2470a2d0cf --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java @@ -0,0 +1,4569 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * An instance of an analysis type that has been found on a resource.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Occurrence} + */ +public final class Occurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Occurrence) + OccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use Occurrence.newBuilder() to construct. + private Occurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Occurrence() { + name_ = ""; + resourceUri_ = ""; + noteName_ = ""; + kind_ = 0; + remediation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Occurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Occurrence.class, io.grafeas.v1.Occurrence.Builder.class); + } + + private int detailsCase_ = 0; + private java.lang.Object details_; + public enum DetailsCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VULNERABILITY(8), + BUILD(9), + IMAGE(10), + PACKAGE(11), + DEPLOYMENT(12), + DISCOVERY(13), + ATTESTATION(14), + UPGRADE(15), + COMPLIANCE(16), + DSSE_ATTESTATION(17), + DETAILS_NOT_SET(0); + private final int value; + private DetailsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DetailsCase valueOf(int value) { + return forNumber(value); + } + + public static DetailsCase forNumber(int value) { + switch (value) { + case 8: return VULNERABILITY; + case 9: return BUILD; + case 10: return IMAGE; + case 11: return PACKAGE; + case 12: return DEPLOYMENT; + case 13: return DISCOVERY; + case 14: return ATTESTATION; + case 15: return UPGRADE; + case 16: return COMPLIANCE; + case 17: return DSSE_ATTESTATION; + case 0: return DETAILS_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DetailsCase + getDetailsCase() { + return DetailsCase.forNumber( + detailsCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Output only. The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Output only. The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object resourceUri_ = ""; + /** + *
+   * Required. Immutable. A URI that represents the resource for which the
+   * occurrence applies. For example,
+   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+   * 
+ * + * string resource_uri = 2; + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } + } + /** + *
+   * Required. Immutable. A URI that represents the resource for which the
+   * occurrence applies. For example,
+   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+   * 
+ * + * string resource_uri = 2; + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTE_NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object noteName_ = ""; + /** + *
+   * Required. Immutable. The analysis note associated with this occurrence, in
+   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+   * used as a filter in list requests.
+   * 
+ * + * string note_name = 3; + * @return The noteName. + */ + @java.lang.Override + public java.lang.String getNoteName() { + java.lang.Object ref = noteName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteName_ = s; + return s; + } + } + /** + *
+   * Required. Immutable. The analysis note associated with this occurrence, in
+   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+   * used as a filter in list requests.
+   * 
+ * + * string note_name = 3; + * @return The bytes for noteName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNoteNameBytes() { + java.lang.Object ref = noteName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + noteName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KIND_FIELD_NUMBER = 4; + private int kind_ = 0; + /** + *
+   * Output only. This explicitly denotes which of the occurrence details are
+   * specified. This field can be used as a filter in list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+   * Output only. This explicitly denotes which of the occurrence details are
+   * specified. This field can be used as a filter in list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The kind. + */ + @java.lang.Override public io.grafeas.v1.NoteKind getKind() { + io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); + return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; + } + + public static final int REMEDIATION_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object remediation_ = ""; + /** + *
+   * A description of actions that can be taken to remedy the note.
+   * 
+ * + * string remediation = 5; + * @return The remediation. + */ + @java.lang.Override + public java.lang.String getRemediation() { + java.lang.Object ref = remediation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remediation_ = s; + return s; + } + } + /** + *
+   * A description of actions that can be taken to remedy the note.
+   * 
+ * + * string remediation = 5; + * @return The bytes for remediation. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRemediationBytes() { + java.lang.Object ref = remediation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remediation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time this occurrence was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time this occurrence was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time this occurrence was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The time this occurrence was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The time this occurrence was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The time this occurrence was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int VULNERABILITY_FIELD_NUMBER = 8; + /** + *
+   * Describes a security vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + * @return Whether the vulnerability field is set. + */ + @java.lang.Override + public boolean hasVulnerability() { + return detailsCase_ == 8; + } + /** + *
+   * Describes a security vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + * @return The vulnerability. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence getVulnerability() { + if (detailsCase_ == 8) { + return (io.grafeas.v1.VulnerabilityOccurrence) details_; + } + return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes a security vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrenceOrBuilder getVulnerabilityOrBuilder() { + if (detailsCase_ == 8) { + return (io.grafeas.v1.VulnerabilityOccurrence) details_; + } + return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); + } + + public static final int BUILD_FIELD_NUMBER = 9; + /** + *
+   * Describes a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + * @return Whether the build field is set. + */ + @java.lang.Override + public boolean hasBuild() { + return detailsCase_ == 9; + } + /** + *
+   * Describes a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + * @return The build. + */ + @java.lang.Override + public io.grafeas.v1.BuildOccurrence getBuild() { + if (detailsCase_ == 9) { + return (io.grafeas.v1.BuildOccurrence) details_; + } + return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + @java.lang.Override + public io.grafeas.v1.BuildOccurrenceOrBuilder getBuildOrBuilder() { + if (detailsCase_ == 9) { + return (io.grafeas.v1.BuildOccurrence) details_; + } + return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); + } + + public static final int IMAGE_FIELD_NUMBER = 10; + /** + *
+   * Describes how this resource derives from the basis in the associated
+   * note.
+   * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return detailsCase_ == 10; + } + /** + *
+   * Describes how this resource derives from the basis in the associated
+   * note.
+   * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + * @return The image. + */ + @java.lang.Override + public io.grafeas.v1.ImageOccurrence getImage() { + if (detailsCase_ == 10) { + return (io.grafeas.v1.ImageOccurrence) details_; + } + return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes how this resource derives from the basis in the associated
+   * note.
+   * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + @java.lang.Override + public io.grafeas.v1.ImageOccurrenceOrBuilder getImageOrBuilder() { + if (detailsCase_ == 10) { + return (io.grafeas.v1.ImageOccurrence) details_; + } + return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); + } + + public static final int PACKAGE_FIELD_NUMBER = 11; + /** + *
+   * Describes the installation of a package on the linked resource.
+   * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + * @return Whether the package field is set. + */ + @java.lang.Override + public boolean hasPackage() { + return detailsCase_ == 11; + } + /** + *
+   * Describes the installation of a package on the linked resource.
+   * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + * @return The package. + */ + @java.lang.Override + public io.grafeas.v1.PackageOccurrence getPackage() { + if (detailsCase_ == 11) { + return (io.grafeas.v1.PackageOccurrence) details_; + } + return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes the installation of a package on the linked resource.
+   * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + @java.lang.Override + public io.grafeas.v1.PackageOccurrenceOrBuilder getPackageOrBuilder() { + if (detailsCase_ == 11) { + return (io.grafeas.v1.PackageOccurrence) details_; + } + return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); + } + + public static final int DEPLOYMENT_FIELD_NUMBER = 12; + /** + *
+   * Describes the deployment of an artifact on a runtime.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + * @return Whether the deployment field is set. + */ + @java.lang.Override + public boolean hasDeployment() { + return detailsCase_ == 12; + } + /** + *
+   * Describes the deployment of an artifact on a runtime.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + * @return The deployment. + */ + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrence getDeployment() { + if (detailsCase_ == 12) { + return (io.grafeas.v1.DeploymentOccurrence) details_; + } + return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes the deployment of an artifact on a runtime.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrenceOrBuilder getDeploymentOrBuilder() { + if (detailsCase_ == 12) { + return (io.grafeas.v1.DeploymentOccurrence) details_; + } + return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); + } + + public static final int DISCOVERY_FIELD_NUMBER = 13; + /** + *
+   * Describes when a resource was discovered.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + * @return Whether the discovery field is set. + */ + @java.lang.Override + public boolean hasDiscovery() { + return detailsCase_ == 13; + } + /** + *
+   * Describes when a resource was discovered.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + * @return The discovery. + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence getDiscovery() { + if (detailsCase_ == 13) { + return (io.grafeas.v1.DiscoveryOccurrence) details_; + } + return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes when a resource was discovered.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrenceOrBuilder getDiscoveryOrBuilder() { + if (detailsCase_ == 13) { + return (io.grafeas.v1.DiscoveryOccurrence) details_; + } + return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); + } + + public static final int ATTESTATION_FIELD_NUMBER = 14; + /** + *
+   * Describes an attestation of an artifact.
+   * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + * @return Whether the attestation field is set. + */ + @java.lang.Override + public boolean hasAttestation() { + return detailsCase_ == 14; + } + /** + *
+   * Describes an attestation of an artifact.
+   * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + * @return The attestation. + */ + @java.lang.Override + public io.grafeas.v1.AttestationOccurrence getAttestation() { + if (detailsCase_ == 14) { + return (io.grafeas.v1.AttestationOccurrence) details_; + } + return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes an attestation of an artifact.
+   * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + @java.lang.Override + public io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder() { + if (detailsCase_ == 14) { + return (io.grafeas.v1.AttestationOccurrence) details_; + } + return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); + } + + public static final int UPGRADE_FIELD_NUMBER = 15; + /** + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * @return Whether the upgrade field is set. + */ + @java.lang.Override + public boolean hasUpgrade() { + return detailsCase_ == 15; + } + /** + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * @return The upgrade. + */ + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrence getUpgrade() { + if (detailsCase_ == 15) { + return (io.grafeas.v1.UpgradeOccurrence) details_; + } + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrenceOrBuilder getUpgradeOrBuilder() { + if (detailsCase_ == 15) { + return (io.grafeas.v1.UpgradeOccurrence) details_; + } + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + + public static final int COMPLIANCE_FIELD_NUMBER = 16; + /** + *
+   * Describes a compliance violation on a linked resource.
+   * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + * @return Whether the compliance field is set. + */ + @java.lang.Override + public boolean hasCompliance() { + return detailsCase_ == 16; + } + /** + *
+   * Describes a compliance violation on a linked resource.
+   * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + * @return The compliance. + */ + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrence getCompliance() { + if (detailsCase_ == 16) { + return (io.grafeas.v1.ComplianceOccurrence) details_; + } + return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes a compliance violation on a linked resource.
+   * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrenceOrBuilder getComplianceOrBuilder() { + if (detailsCase_ == 16) { + return (io.grafeas.v1.ComplianceOccurrence) details_; + } + return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); + } + + public static final int DSSE_ATTESTATION_FIELD_NUMBER = 17; + /** + *
+   * Describes an attestation of an artifact using dsse.
+   * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + * @return Whether the dsseAttestation field is set. + */ + @java.lang.Override + public boolean hasDsseAttestation() { + return detailsCase_ == 17; + } + /** + *
+   * Describes an attestation of an artifact using dsse.
+   * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + * @return The dsseAttestation. + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrence getDsseAttestation() { + if (detailsCase_ == 17) { + return (io.grafeas.v1.DSSEAttestationOccurrence) details_; + } + return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); + } + /** + *
+   * Describes an attestation of an artifact using dsse.
+   * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder getDsseAttestationOrBuilder() { + if (detailsCase_ == 17) { + return (io.grafeas.v1.DSSEAttestationOccurrence) details_; + } + return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); + } + + public static final int ENVELOPE_FIELD_NUMBER = 18; + private io.grafeas.v1.Envelope envelope_; + /** + *
+   * https://github.com/secure-systems-lab/dsse
+   * 
+ * + * .grafeas.v1.Envelope envelope = 18; + * @return Whether the envelope field is set. + */ + @java.lang.Override + public boolean hasEnvelope() { + return envelope_ != null; + } + /** + *
+   * https://github.com/secure-systems-lab/dsse
+   * 
+ * + * .grafeas.v1.Envelope envelope = 18; + * @return The envelope. + */ + @java.lang.Override + public io.grafeas.v1.Envelope getEnvelope() { + return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } + /** + *
+   * https://github.com/secure-systems-lab/dsse
+   * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + @java.lang.Override + public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { + return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, noteName_); + } + if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(4, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remediation_); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(7, getUpdateTime()); + } + if (detailsCase_ == 8) { + output.writeMessage(8, (io.grafeas.v1.VulnerabilityOccurrence) details_); + } + if (detailsCase_ == 9) { + output.writeMessage(9, (io.grafeas.v1.BuildOccurrence) details_); + } + if (detailsCase_ == 10) { + output.writeMessage(10, (io.grafeas.v1.ImageOccurrence) details_); + } + if (detailsCase_ == 11) { + output.writeMessage(11, (io.grafeas.v1.PackageOccurrence) details_); + } + if (detailsCase_ == 12) { + output.writeMessage(12, (io.grafeas.v1.DeploymentOccurrence) details_); + } + if (detailsCase_ == 13) { + output.writeMessage(13, (io.grafeas.v1.DiscoveryOccurrence) details_); + } + if (detailsCase_ == 14) { + output.writeMessage(14, (io.grafeas.v1.AttestationOccurrence) details_); + } + if (detailsCase_ == 15) { + output.writeMessage(15, (io.grafeas.v1.UpgradeOccurrence) details_); + } + if (detailsCase_ == 16) { + output.writeMessage(16, (io.grafeas.v1.ComplianceOccurrence) details_); + } + if (detailsCase_ == 17) { + output.writeMessage(17, (io.grafeas.v1.DSSEAttestationOccurrence) details_); + } + if (envelope_ != null) { + output.writeMessage(18, getEnvelope()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, noteName_); + } + if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remediation_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getUpdateTime()); + } + if (detailsCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (io.grafeas.v1.VulnerabilityOccurrence) details_); + } + if (detailsCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (io.grafeas.v1.BuildOccurrence) details_); + } + if (detailsCase_ == 10) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, (io.grafeas.v1.ImageOccurrence) details_); + } + if (detailsCase_ == 11) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, (io.grafeas.v1.PackageOccurrence) details_); + } + if (detailsCase_ == 12) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, (io.grafeas.v1.DeploymentOccurrence) details_); + } + if (detailsCase_ == 13) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, (io.grafeas.v1.DiscoveryOccurrence) details_); + } + if (detailsCase_ == 14) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, (io.grafeas.v1.AttestationOccurrence) details_); + } + if (detailsCase_ == 15) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, (io.grafeas.v1.UpgradeOccurrence) details_); + } + if (detailsCase_ == 16) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, (io.grafeas.v1.ComplianceOccurrence) details_); + } + if (detailsCase_ == 17) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, (io.grafeas.v1.DSSEAttestationOccurrence) details_); + } + if (envelope_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getEnvelope()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Occurrence)) { + return super.equals(obj); + } + io.grafeas.v1.Occurrence other = (io.grafeas.v1.Occurrence) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getResourceUri() + .equals(other.getResourceUri())) return false; + if (!getNoteName() + .equals(other.getNoteName())) return false; + if (kind_ != other.kind_) return false; + if (!getRemediation() + .equals(other.getRemediation())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (hasEnvelope() != other.hasEnvelope()) return false; + if (hasEnvelope()) { + if (!getEnvelope() + .equals(other.getEnvelope())) return false; + } + if (!getDetailsCase().equals(other.getDetailsCase())) return false; + switch (detailsCase_) { + case 8: + if (!getVulnerability() + .equals(other.getVulnerability())) return false; + break; + case 9: + if (!getBuild() + .equals(other.getBuild())) return false; + break; + case 10: + if (!getImage() + .equals(other.getImage())) return false; + break; + case 11: + if (!getPackage() + .equals(other.getPackage())) return false; + break; + case 12: + if (!getDeployment() + .equals(other.getDeployment())) return false; + break; + case 13: + if (!getDiscovery() + .equals(other.getDiscovery())) return false; + break; + case 14: + if (!getAttestation() + .equals(other.getAttestation())) return false; + break; + case 15: + if (!getUpgrade() + .equals(other.getUpgrade())) return false; + break; + case 16: + if (!getCompliance() + .equals(other.getCompliance())) return false; + break; + case 17: + if (!getDsseAttestation() + .equals(other.getDsseAttestation())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + hash = (37 * hash) + NOTE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getNoteName().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + kind_; + hash = (37 * hash) + REMEDIATION_FIELD_NUMBER; + hash = (53 * hash) + getRemediation().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasEnvelope()) { + hash = (37 * hash) + ENVELOPE_FIELD_NUMBER; + hash = (53 * hash) + getEnvelope().hashCode(); + } + switch (detailsCase_) { + case 8: + hash = (37 * hash) + VULNERABILITY_FIELD_NUMBER; + hash = (53 * hash) + getVulnerability().hashCode(); + break; + case 9: + hash = (37 * hash) + BUILD_FIELD_NUMBER; + hash = (53 * hash) + getBuild().hashCode(); + break; + case 10: + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + break; + case 11: + hash = (37 * hash) + PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPackage().hashCode(); + break; + case 12: + hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getDeployment().hashCode(); + break; + case 13: + hash = (37 * hash) + DISCOVERY_FIELD_NUMBER; + hash = (53 * hash) + getDiscovery().hashCode(); + break; + case 14: + hash = (37 * hash) + ATTESTATION_FIELD_NUMBER; + hash = (53 * hash) + getAttestation().hashCode(); + break; + case 15: + hash = (37 * hash) + UPGRADE_FIELD_NUMBER; + hash = (53 * hash) + getUpgrade().hashCode(); + break; + case 16: + hash = (37 * hash) + COMPLIANCE_FIELD_NUMBER; + hash = (53 * hash) + getCompliance().hashCode(); + break; + case 17: + hash = (37 * hash) + DSSE_ATTESTATION_FIELD_NUMBER; + hash = (53 * hash) + getDsseAttestation().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Occurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Occurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Occurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Occurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Occurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Occurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Occurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Occurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Occurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Occurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Occurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Occurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Occurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An instance of an analysis type that has been found on a resource.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Occurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Occurrence) + io.grafeas.v1.OccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Occurrence.class, io.grafeas.v1.Occurrence.Builder.class); + } + + // Construct using io.grafeas.v1.Occurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + resourceUri_ = ""; + noteName_ = ""; + kind_ = 0; + remediation_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + if (vulnerabilityBuilder_ != null) { + vulnerabilityBuilder_.clear(); + } + if (buildBuilder_ != null) { + buildBuilder_.clear(); + } + if (imageBuilder_ != null) { + imageBuilder_.clear(); + } + if (packageBuilder_ != null) { + packageBuilder_.clear(); + } + if (deploymentBuilder_ != null) { + deploymentBuilder_.clear(); + } + if (discoveryBuilder_ != null) { + discoveryBuilder_.clear(); + } + if (attestationBuilder_ != null) { + attestationBuilder_.clear(); + } + if (upgradeBuilder_ != null) { + upgradeBuilder_.clear(); + } + if (complianceBuilder_ != null) { + complianceBuilder_.clear(); + } + if (dsseAttestationBuilder_ != null) { + dsseAttestationBuilder_.clear(); + } + envelope_ = null; + if (envelopeBuilder_ != null) { + envelopeBuilder_.dispose(); + envelopeBuilder_ = null; + } + detailsCase_ = 0; + details_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Occurrence getDefaultInstanceForType() { + return io.grafeas.v1.Occurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Occurrence build() { + io.grafeas.v1.Occurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Occurrence buildPartial() { + io.grafeas.v1.Occurrence result = new io.grafeas.v1.Occurrence(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Occurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceUri_ = resourceUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.noteName_ = noteName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.remediation_ = remediation_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.envelope_ = envelopeBuilder_ == null + ? envelope_ + : envelopeBuilder_.build(); + } + } + + private void buildPartialOneofs(io.grafeas.v1.Occurrence result) { + result.detailsCase_ = detailsCase_; + result.details_ = this.details_; + if (detailsCase_ == 8 && + vulnerabilityBuilder_ != null) { + result.details_ = vulnerabilityBuilder_.build(); + } + if (detailsCase_ == 9 && + buildBuilder_ != null) { + result.details_ = buildBuilder_.build(); + } + if (detailsCase_ == 10 && + imageBuilder_ != null) { + result.details_ = imageBuilder_.build(); + } + if (detailsCase_ == 11 && + packageBuilder_ != null) { + result.details_ = packageBuilder_.build(); + } + if (detailsCase_ == 12 && + deploymentBuilder_ != null) { + result.details_ = deploymentBuilder_.build(); + } + if (detailsCase_ == 13 && + discoveryBuilder_ != null) { + result.details_ = discoveryBuilder_.build(); + } + if (detailsCase_ == 14 && + attestationBuilder_ != null) { + result.details_ = attestationBuilder_.build(); + } + if (detailsCase_ == 15 && + upgradeBuilder_ != null) { + result.details_ = upgradeBuilder_.build(); + } + if (detailsCase_ == 16 && + complianceBuilder_ != null) { + result.details_ = complianceBuilder_.build(); + } + if (detailsCase_ == 17 && + dsseAttestationBuilder_ != null) { + result.details_ = dsseAttestationBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Occurrence) { + return mergeFrom((io.grafeas.v1.Occurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Occurrence other) { + if (other == io.grafeas.v1.Occurrence.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getNoteName().isEmpty()) { + noteName_ = other.noteName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.kind_ != 0) { + setKindValue(other.getKindValue()); + } + if (!other.getRemediation().isEmpty()) { + remediation_ = other.remediation_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasEnvelope()) { + mergeEnvelope(other.getEnvelope()); + } + switch (other.getDetailsCase()) { + case VULNERABILITY: { + mergeVulnerability(other.getVulnerability()); + break; + } + case BUILD: { + mergeBuild(other.getBuild()); + break; + } + case IMAGE: { + mergeImage(other.getImage()); + break; + } + case PACKAGE: { + mergePackage(other.getPackage()); + break; + } + case DEPLOYMENT: { + mergeDeployment(other.getDeployment()); + break; + } + case DISCOVERY: { + mergeDiscovery(other.getDiscovery()); + break; + } + case ATTESTATION: { + mergeAttestation(other.getAttestation()); + break; + } + case UPGRADE: { + mergeUpgrade(other.getUpgrade()); + break; + } + case COMPLIANCE: { + mergeCompliance(other.getCompliance()); + break; + } + case DSSE_ATTESTATION: { + mergeDsseAttestation(other.getDsseAttestation()); + break; + } + case DETAILS_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + resourceUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + noteName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + kind_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + remediation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getVulnerabilityFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 8; + break; + } // case 66 + case 74: { + input.readMessage( + getBuildFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 9; + break; + } // case 74 + case 82: { + input.readMessage( + getImageFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 10; + break; + } // case 82 + case 90: { + input.readMessage( + getPackageFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 11; + break; + } // case 90 + case 98: { + input.readMessage( + getDeploymentFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 12; + break; + } // case 98 + case 106: { + input.readMessage( + getDiscoveryFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 13; + break; + } // case 106 + case 114: { + input.readMessage( + getAttestationFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 14; + break; + } // case 114 + case 122: { + input.readMessage( + getUpgradeFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 15; + break; + } // case 122 + case 130: { + input.readMessage( + getComplianceFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 16; + break; + } // case 130 + case 138: { + input.readMessage( + getDsseAttestationFieldBuilder().getBuilder(), + extensionRegistry); + detailsCase_ = 17; + break; + } // case 138 + case 146: { + input.readMessage( + getEnvelopeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 146 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int detailsCase_ = 0; + private java.lang.Object details_; + public DetailsCase + getDetailsCase() { + return DetailsCase.forNumber( + detailsCase_); + } + + public Builder clearDetails() { + detailsCase_ = 0; + details_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Output only. The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Output only. The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object resourceUri_ = ""; + /** + *
+     * Required. Immutable. A URI that represents the resource for which the
+     * occurrence applies. For example,
+     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+     * 
+ * + * string resource_uri = 2; + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Immutable. A URI that represents the resource for which the
+     * occurrence applies. For example,
+     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+     * 
+ * + * string resource_uri = 2; + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString + getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Immutable. A URI that represents the resource for which the
+     * occurrence applies. For example,
+     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+     * 
+ * + * string resource_uri = 2; + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resourceUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. A URI that represents the resource for which the
+     * occurrence applies. For example,
+     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+     * 
+ * + * string resource_uri = 2; + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + resourceUri_ = getDefaultInstance().getResourceUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. A URI that represents the resource for which the
+     * occurrence applies. For example,
+     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+     * 
+ * + * string resource_uri = 2; + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resourceUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object noteName_ = ""; + /** + *
+     * Required. Immutable. The analysis note associated with this occurrence, in
+     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+     * used as a filter in list requests.
+     * 
+ * + * string note_name = 3; + * @return The noteName. + */ + public java.lang.String getNoteName() { + java.lang.Object ref = noteName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Immutable. The analysis note associated with this occurrence, in
+     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+     * used as a filter in list requests.
+     * 
+ * + * string note_name = 3; + * @return The bytes for noteName. + */ + public com.google.protobuf.ByteString + getNoteNameBytes() { + java.lang.Object ref = noteName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + noteName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Immutable. The analysis note associated with this occurrence, in
+     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+     * used as a filter in list requests.
+     * 
+ * + * string note_name = 3; + * @param value The noteName to set. + * @return This builder for chaining. + */ + public Builder setNoteName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + noteName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The analysis note associated with this occurrence, in
+     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+     * used as a filter in list requests.
+     * 
+ * + * string note_name = 3; + * @return This builder for chaining. + */ + public Builder clearNoteName() { + noteName_ = getDefaultInstance().getNoteName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Required. Immutable. The analysis note associated with this occurrence, in
+     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+     * used as a filter in list requests.
+     * 
+ * + * string note_name = 3; + * @param value The bytes for noteName to set. + * @return This builder for chaining. + */ + public Builder setNoteNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + noteName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int kind_ = 0; + /** + *
+     * Output only. This explicitly denotes which of the occurrence details are
+     * specified. This field can be used as a filter in list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+     * Output only. This explicitly denotes which of the occurrence details are
+     * specified. This field can be used as a filter in list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @param value The enum numeric value on the wire for kind to set. + * @return This builder for chaining. + */ + public Builder setKindValue(int value) { + kind_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. This explicitly denotes which of the occurrence details are
+     * specified. This field can be used as a filter in list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The kind. + */ + @java.lang.Override + public io.grafeas.v1.NoteKind getKind() { + io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); + return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; + } + /** + *
+     * Output only. This explicitly denotes which of the occurrence details are
+     * specified. This field can be used as a filter in list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(io.grafeas.v1.NoteKind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. This explicitly denotes which of the occurrence details are
+     * specified. This field can be used as a filter in list requests.
+     * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return This builder for chaining. + */ + public Builder clearKind() { + bitField0_ = (bitField0_ & ~0x00000008); + kind_ = 0; + onChanged(); + return this; + } + + private java.lang.Object remediation_ = ""; + /** + *
+     * A description of actions that can be taken to remedy the note.
+     * 
+ * + * string remediation = 5; + * @return The remediation. + */ + public java.lang.String getRemediation() { + java.lang.Object ref = remediation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remediation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A description of actions that can be taken to remedy the note.
+     * 
+ * + * string remediation = 5; + * @return The bytes for remediation. + */ + public com.google.protobuf.ByteString + getRemediationBytes() { + java.lang.Object ref = remediation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remediation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A description of actions that can be taken to remedy the note.
+     * 
+ * + * string remediation = 5; + * @param value The remediation to set. + * @return This builder for chaining. + */ + public Builder setRemediation( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + remediation_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * A description of actions that can be taken to remedy the note.
+     * 
+ * + * string remediation = 5; + * @return This builder for chaining. + */ + public Builder clearRemediation() { + remediation_ = getDefaultInstance().getRemediation(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * A description of actions that can be taken to remedy the note.
+     * 
+ * + * string remediation = 5; + * @param value The bytes for remediation to set. + * @return This builder for chaining. + */ + public Builder setRemediationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + remediation_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time this occurrence was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The time this occurrence was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence, io.grafeas.v1.VulnerabilityOccurrence.Builder, io.grafeas.v1.VulnerabilityOccurrenceOrBuilder> vulnerabilityBuilder_; + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + * @return Whether the vulnerability field is set. + */ + @java.lang.Override + public boolean hasVulnerability() { + return detailsCase_ == 8; + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + * @return The vulnerability. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence getVulnerability() { + if (vulnerabilityBuilder_ == null) { + if (detailsCase_ == 8) { + return (io.grafeas.v1.VulnerabilityOccurrence) details_; + } + return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 8) { + return vulnerabilityBuilder_.getMessage(); + } + return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + public Builder setVulnerability(io.grafeas.v1.VulnerabilityOccurrence value) { + if (vulnerabilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + vulnerabilityBuilder_.setMessage(value); + } + detailsCase_ = 8; + return this; + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + public Builder setVulnerability( + io.grafeas.v1.VulnerabilityOccurrence.Builder builderForValue) { + if (vulnerabilityBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + vulnerabilityBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 8; + return this; + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + public Builder mergeVulnerability(io.grafeas.v1.VulnerabilityOccurrence value) { + if (vulnerabilityBuilder_ == null) { + if (detailsCase_ == 8 && + details_ != io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.VulnerabilityOccurrence.newBuilder((io.grafeas.v1.VulnerabilityOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 8) { + vulnerabilityBuilder_.mergeFrom(value); + } else { + vulnerabilityBuilder_.setMessage(value); + } + } + detailsCase_ = 8; + return this; + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + public Builder clearVulnerability() { + if (vulnerabilityBuilder_ == null) { + if (detailsCase_ == 8) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 8) { + detailsCase_ = 0; + details_ = null; + } + vulnerabilityBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + public io.grafeas.v1.VulnerabilityOccurrence.Builder getVulnerabilityBuilder() { + return getVulnerabilityFieldBuilder().getBuilder(); + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrenceOrBuilder getVulnerabilityOrBuilder() { + if ((detailsCase_ == 8) && (vulnerabilityBuilder_ != null)) { + return vulnerabilityBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 8) { + return (io.grafeas.v1.VulnerabilityOccurrence) details_; + } + return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes a security vulnerability.
+     * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence, io.grafeas.v1.VulnerabilityOccurrence.Builder, io.grafeas.v1.VulnerabilityOccurrenceOrBuilder> + getVulnerabilityFieldBuilder() { + if (vulnerabilityBuilder_ == null) { + if (!(detailsCase_ == 8)) { + details_ = io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); + } + vulnerabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence, io.grafeas.v1.VulnerabilityOccurrence.Builder, io.grafeas.v1.VulnerabilityOccurrenceOrBuilder>( + (io.grafeas.v1.VulnerabilityOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 8; + onChanged(); + return vulnerabilityBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildOccurrence, io.grafeas.v1.BuildOccurrence.Builder, io.grafeas.v1.BuildOccurrenceOrBuilder> buildBuilder_; + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + * @return Whether the build field is set. + */ + @java.lang.Override + public boolean hasBuild() { + return detailsCase_ == 9; + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + * @return The build. + */ + @java.lang.Override + public io.grafeas.v1.BuildOccurrence getBuild() { + if (buildBuilder_ == null) { + if (detailsCase_ == 9) { + return (io.grafeas.v1.BuildOccurrence) details_; + } + return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 9) { + return buildBuilder_.getMessage(); + } + return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + public Builder setBuild(io.grafeas.v1.BuildOccurrence value) { + if (buildBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + buildBuilder_.setMessage(value); + } + detailsCase_ = 9; + return this; + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + public Builder setBuild( + io.grafeas.v1.BuildOccurrence.Builder builderForValue) { + if (buildBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + buildBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 9; + return this; + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + public Builder mergeBuild(io.grafeas.v1.BuildOccurrence value) { + if (buildBuilder_ == null) { + if (detailsCase_ == 9 && + details_ != io.grafeas.v1.BuildOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.BuildOccurrence.newBuilder((io.grafeas.v1.BuildOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 9) { + buildBuilder_.mergeFrom(value); + } else { + buildBuilder_.setMessage(value); + } + } + detailsCase_ = 9; + return this; + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + public Builder clearBuild() { + if (buildBuilder_ == null) { + if (detailsCase_ == 9) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 9) { + detailsCase_ = 0; + details_ = null; + } + buildBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + public io.grafeas.v1.BuildOccurrence.Builder getBuildBuilder() { + return getBuildFieldBuilder().getBuilder(); + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + @java.lang.Override + public io.grafeas.v1.BuildOccurrenceOrBuilder getBuildOrBuilder() { + if ((detailsCase_ == 9) && (buildBuilder_ != null)) { + return buildBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 9) { + return (io.grafeas.v1.BuildOccurrence) details_; + } + return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes a verifiable build.
+     * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildOccurrence, io.grafeas.v1.BuildOccurrence.Builder, io.grafeas.v1.BuildOccurrenceOrBuilder> + getBuildFieldBuilder() { + if (buildBuilder_ == null) { + if (!(detailsCase_ == 9)) { + details_ = io.grafeas.v1.BuildOccurrence.getDefaultInstance(); + } + buildBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.BuildOccurrence, io.grafeas.v1.BuildOccurrence.Builder, io.grafeas.v1.BuildOccurrenceOrBuilder>( + (io.grafeas.v1.BuildOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 9; + onChanged(); + return buildBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ImageOccurrence, io.grafeas.v1.ImageOccurrence.Builder, io.grafeas.v1.ImageOccurrenceOrBuilder> imageBuilder_; + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return detailsCase_ == 10; + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + * @return The image. + */ + @java.lang.Override + public io.grafeas.v1.ImageOccurrence getImage() { + if (imageBuilder_ == null) { + if (detailsCase_ == 10) { + return (io.grafeas.v1.ImageOccurrence) details_; + } + return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 10) { + return imageBuilder_.getMessage(); + } + return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + public Builder setImage(io.grafeas.v1.ImageOccurrence value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + imageBuilder_.setMessage(value); + } + detailsCase_ = 10; + return this; + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + public Builder setImage( + io.grafeas.v1.ImageOccurrence.Builder builderForValue) { + if (imageBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 10; + return this; + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + public Builder mergeImage(io.grafeas.v1.ImageOccurrence value) { + if (imageBuilder_ == null) { + if (detailsCase_ == 10 && + details_ != io.grafeas.v1.ImageOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.ImageOccurrence.newBuilder((io.grafeas.v1.ImageOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 10) { + imageBuilder_.mergeFrom(value); + } else { + imageBuilder_.setMessage(value); + } + } + detailsCase_ = 10; + return this; + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + public Builder clearImage() { + if (imageBuilder_ == null) { + if (detailsCase_ == 10) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 10) { + detailsCase_ = 0; + details_ = null; + } + imageBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + public io.grafeas.v1.ImageOccurrence.Builder getImageBuilder() { + return getImageFieldBuilder().getBuilder(); + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + @java.lang.Override + public io.grafeas.v1.ImageOccurrenceOrBuilder getImageOrBuilder() { + if ((detailsCase_ == 10) && (imageBuilder_ != null)) { + return imageBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 10) { + return (io.grafeas.v1.ImageOccurrence) details_; + } + return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes how this resource derives from the basis in the associated
+     * note.
+     * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ImageOccurrence, io.grafeas.v1.ImageOccurrence.Builder, io.grafeas.v1.ImageOccurrenceOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + if (!(detailsCase_ == 10)) { + details_ = io.grafeas.v1.ImageOccurrence.getDefaultInstance(); + } + imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ImageOccurrence, io.grafeas.v1.ImageOccurrence.Builder, io.grafeas.v1.ImageOccurrenceOrBuilder>( + (io.grafeas.v1.ImageOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 10; + onChanged(); + return imageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.PackageOccurrence, io.grafeas.v1.PackageOccurrence.Builder, io.grafeas.v1.PackageOccurrenceOrBuilder> packageBuilder_; + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + * @return Whether the package field is set. + */ + @java.lang.Override + public boolean hasPackage() { + return detailsCase_ == 11; + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + * @return The package. + */ + @java.lang.Override + public io.grafeas.v1.PackageOccurrence getPackage() { + if (packageBuilder_ == null) { + if (detailsCase_ == 11) { + return (io.grafeas.v1.PackageOccurrence) details_; + } + return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 11) { + return packageBuilder_.getMessage(); + } + return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + public Builder setPackage(io.grafeas.v1.PackageOccurrence value) { + if (packageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + packageBuilder_.setMessage(value); + } + detailsCase_ = 11; + return this; + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + public Builder setPackage( + io.grafeas.v1.PackageOccurrence.Builder builderForValue) { + if (packageBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + packageBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 11; + return this; + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + public Builder mergePackage(io.grafeas.v1.PackageOccurrence value) { + if (packageBuilder_ == null) { + if (detailsCase_ == 11 && + details_ != io.grafeas.v1.PackageOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.PackageOccurrence.newBuilder((io.grafeas.v1.PackageOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 11) { + packageBuilder_.mergeFrom(value); + } else { + packageBuilder_.setMessage(value); + } + } + detailsCase_ = 11; + return this; + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + public Builder clearPackage() { + if (packageBuilder_ == null) { + if (detailsCase_ == 11) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 11) { + detailsCase_ = 0; + details_ = null; + } + packageBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + public io.grafeas.v1.PackageOccurrence.Builder getPackageBuilder() { + return getPackageFieldBuilder().getBuilder(); + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + @java.lang.Override + public io.grafeas.v1.PackageOccurrenceOrBuilder getPackageOrBuilder() { + if ((detailsCase_ == 11) && (packageBuilder_ != null)) { + return packageBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 11) { + return (io.grafeas.v1.PackageOccurrence) details_; + } + return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes the installation of a package on the linked resource.
+     * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.PackageOccurrence, io.grafeas.v1.PackageOccurrence.Builder, io.grafeas.v1.PackageOccurrenceOrBuilder> + getPackageFieldBuilder() { + if (packageBuilder_ == null) { + if (!(detailsCase_ == 11)) { + details_ = io.grafeas.v1.PackageOccurrence.getDefaultInstance(); + } + packageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.PackageOccurrence, io.grafeas.v1.PackageOccurrence.Builder, io.grafeas.v1.PackageOccurrenceOrBuilder>( + (io.grafeas.v1.PackageOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 11; + onChanged(); + return packageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DeploymentOccurrence, io.grafeas.v1.DeploymentOccurrence.Builder, io.grafeas.v1.DeploymentOccurrenceOrBuilder> deploymentBuilder_; + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + * @return Whether the deployment field is set. + */ + @java.lang.Override + public boolean hasDeployment() { + return detailsCase_ == 12; + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + * @return The deployment. + */ + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrence getDeployment() { + if (deploymentBuilder_ == null) { + if (detailsCase_ == 12) { + return (io.grafeas.v1.DeploymentOccurrence) details_; + } + return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 12) { + return deploymentBuilder_.getMessage(); + } + return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + public Builder setDeployment(io.grafeas.v1.DeploymentOccurrence value) { + if (deploymentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + deploymentBuilder_.setMessage(value); + } + detailsCase_ = 12; + return this; + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + public Builder setDeployment( + io.grafeas.v1.DeploymentOccurrence.Builder builderForValue) { + if (deploymentBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + deploymentBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 12; + return this; + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + public Builder mergeDeployment(io.grafeas.v1.DeploymentOccurrence value) { + if (deploymentBuilder_ == null) { + if (detailsCase_ == 12 && + details_ != io.grafeas.v1.DeploymentOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.DeploymentOccurrence.newBuilder((io.grafeas.v1.DeploymentOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 12) { + deploymentBuilder_.mergeFrom(value); + } else { + deploymentBuilder_.setMessage(value); + } + } + detailsCase_ = 12; + return this; + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + public Builder clearDeployment() { + if (deploymentBuilder_ == null) { + if (detailsCase_ == 12) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 12) { + detailsCase_ = 0; + details_ = null; + } + deploymentBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + public io.grafeas.v1.DeploymentOccurrence.Builder getDeploymentBuilder() { + return getDeploymentFieldBuilder().getBuilder(); + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + @java.lang.Override + public io.grafeas.v1.DeploymentOccurrenceOrBuilder getDeploymentOrBuilder() { + if ((detailsCase_ == 12) && (deploymentBuilder_ != null)) { + return deploymentBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 12) { + return (io.grafeas.v1.DeploymentOccurrence) details_; + } + return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes the deployment of an artifact on a runtime.
+     * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DeploymentOccurrence, io.grafeas.v1.DeploymentOccurrence.Builder, io.grafeas.v1.DeploymentOccurrenceOrBuilder> + getDeploymentFieldBuilder() { + if (deploymentBuilder_ == null) { + if (!(detailsCase_ == 12)) { + details_ = io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); + } + deploymentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DeploymentOccurrence, io.grafeas.v1.DeploymentOccurrence.Builder, io.grafeas.v1.DeploymentOccurrenceOrBuilder>( + (io.grafeas.v1.DeploymentOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 12; + onChanged(); + return deploymentBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryOccurrence, io.grafeas.v1.DiscoveryOccurrence.Builder, io.grafeas.v1.DiscoveryOccurrenceOrBuilder> discoveryBuilder_; + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + * @return Whether the discovery field is set. + */ + @java.lang.Override + public boolean hasDiscovery() { + return detailsCase_ == 13; + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + * @return The discovery. + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrence getDiscovery() { + if (discoveryBuilder_ == null) { + if (detailsCase_ == 13) { + return (io.grafeas.v1.DiscoveryOccurrence) details_; + } + return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 13) { + return discoveryBuilder_.getMessage(); + } + return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + public Builder setDiscovery(io.grafeas.v1.DiscoveryOccurrence value) { + if (discoveryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + discoveryBuilder_.setMessage(value); + } + detailsCase_ = 13; + return this; + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + public Builder setDiscovery( + io.grafeas.v1.DiscoveryOccurrence.Builder builderForValue) { + if (discoveryBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + discoveryBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 13; + return this; + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + public Builder mergeDiscovery(io.grafeas.v1.DiscoveryOccurrence value) { + if (discoveryBuilder_ == null) { + if (detailsCase_ == 13 && + details_ != io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.DiscoveryOccurrence.newBuilder((io.grafeas.v1.DiscoveryOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 13) { + discoveryBuilder_.mergeFrom(value); + } else { + discoveryBuilder_.setMessage(value); + } + } + detailsCase_ = 13; + return this; + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + public Builder clearDiscovery() { + if (discoveryBuilder_ == null) { + if (detailsCase_ == 13) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 13) { + detailsCase_ = 0; + details_ = null; + } + discoveryBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + public io.grafeas.v1.DiscoveryOccurrence.Builder getDiscoveryBuilder() { + return getDiscoveryFieldBuilder().getBuilder(); + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + @java.lang.Override + public io.grafeas.v1.DiscoveryOccurrenceOrBuilder getDiscoveryOrBuilder() { + if ((detailsCase_ == 13) && (discoveryBuilder_ != null)) { + return discoveryBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 13) { + return (io.grafeas.v1.DiscoveryOccurrence) details_; + } + return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes when a resource was discovered.
+     * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryOccurrence, io.grafeas.v1.DiscoveryOccurrence.Builder, io.grafeas.v1.DiscoveryOccurrenceOrBuilder> + getDiscoveryFieldBuilder() { + if (discoveryBuilder_ == null) { + if (!(detailsCase_ == 13)) { + details_ = io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); + } + discoveryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DiscoveryOccurrence, io.grafeas.v1.DiscoveryOccurrence.Builder, io.grafeas.v1.DiscoveryOccurrenceOrBuilder>( + (io.grafeas.v1.DiscoveryOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 13; + onChanged(); + return discoveryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationOccurrence, io.grafeas.v1.AttestationOccurrence.Builder, io.grafeas.v1.AttestationOccurrenceOrBuilder> attestationBuilder_; + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + * @return Whether the attestation field is set. + */ + @java.lang.Override + public boolean hasAttestation() { + return detailsCase_ == 14; + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + * @return The attestation. + */ + @java.lang.Override + public io.grafeas.v1.AttestationOccurrence getAttestation() { + if (attestationBuilder_ == null) { + if (detailsCase_ == 14) { + return (io.grafeas.v1.AttestationOccurrence) details_; + } + return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 14) { + return attestationBuilder_.getMessage(); + } + return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + public Builder setAttestation(io.grafeas.v1.AttestationOccurrence value) { + if (attestationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + attestationBuilder_.setMessage(value); + } + detailsCase_ = 14; + return this; + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + public Builder setAttestation( + io.grafeas.v1.AttestationOccurrence.Builder builderForValue) { + if (attestationBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + attestationBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 14; + return this; + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + public Builder mergeAttestation(io.grafeas.v1.AttestationOccurrence value) { + if (attestationBuilder_ == null) { + if (detailsCase_ == 14 && + details_ != io.grafeas.v1.AttestationOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.AttestationOccurrence.newBuilder((io.grafeas.v1.AttestationOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 14) { + attestationBuilder_.mergeFrom(value); + } else { + attestationBuilder_.setMessage(value); + } + } + detailsCase_ = 14; + return this; + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + public Builder clearAttestation() { + if (attestationBuilder_ == null) { + if (detailsCase_ == 14) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 14) { + detailsCase_ = 0; + details_ = null; + } + attestationBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + public io.grafeas.v1.AttestationOccurrence.Builder getAttestationBuilder() { + return getAttestationFieldBuilder().getBuilder(); + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + @java.lang.Override + public io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder() { + if ((detailsCase_ == 14) && (attestationBuilder_ != null)) { + return attestationBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 14) { + return (io.grafeas.v1.AttestationOccurrence) details_; + } + return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes an attestation of an artifact.
+     * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationOccurrence, io.grafeas.v1.AttestationOccurrence.Builder, io.grafeas.v1.AttestationOccurrenceOrBuilder> + getAttestationFieldBuilder() { + if (attestationBuilder_ == null) { + if (!(detailsCase_ == 14)) { + details_ = io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); + } + attestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationOccurrence, io.grafeas.v1.AttestationOccurrence.Builder, io.grafeas.v1.AttestationOccurrenceOrBuilder>( + (io.grafeas.v1.AttestationOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 14; + onChanged(); + return attestationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeOccurrence, io.grafeas.v1.UpgradeOccurrence.Builder, io.grafeas.v1.UpgradeOccurrenceOrBuilder> upgradeBuilder_; + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * @return Whether the upgrade field is set. + */ + @java.lang.Override + public boolean hasUpgrade() { + return detailsCase_ == 15; + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * @return The upgrade. + */ + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrence getUpgrade() { + if (upgradeBuilder_ == null) { + if (detailsCase_ == 15) { + return (io.grafeas.v1.UpgradeOccurrence) details_; + } + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 15) { + return upgradeBuilder_.getMessage(); + } + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public Builder setUpgrade(io.grafeas.v1.UpgradeOccurrence value) { + if (upgradeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + upgradeBuilder_.setMessage(value); + } + detailsCase_ = 15; + return this; + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public Builder setUpgrade( + io.grafeas.v1.UpgradeOccurrence.Builder builderForValue) { + if (upgradeBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + upgradeBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 15; + return this; + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public Builder mergeUpgrade(io.grafeas.v1.UpgradeOccurrence value) { + if (upgradeBuilder_ == null) { + if (detailsCase_ == 15 && + details_ != io.grafeas.v1.UpgradeOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.UpgradeOccurrence.newBuilder((io.grafeas.v1.UpgradeOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 15) { + upgradeBuilder_.mergeFrom(value); + } else { + upgradeBuilder_.setMessage(value); + } + } + detailsCase_ = 15; + return this; + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public Builder clearUpgrade() { + if (upgradeBuilder_ == null) { + if (detailsCase_ == 15) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 15) { + detailsCase_ = 0; + details_ = null; + } + upgradeBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public io.grafeas.v1.UpgradeOccurrence.Builder getUpgradeBuilder() { + return getUpgradeFieldBuilder().getBuilder(); + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrenceOrBuilder getUpgradeOrBuilder() { + if ((detailsCase_ == 15) && (upgradeBuilder_ != null)) { + return upgradeBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 15) { + return (io.grafeas.v1.UpgradeOccurrence) details_; + } + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeOccurrence, io.grafeas.v1.UpgradeOccurrence.Builder, io.grafeas.v1.UpgradeOccurrenceOrBuilder> + getUpgradeFieldBuilder() { + if (upgradeBuilder_ == null) { + if (!(detailsCase_ == 15)) { + details_ = io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + upgradeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeOccurrence, io.grafeas.v1.UpgradeOccurrence.Builder, io.grafeas.v1.UpgradeOccurrenceOrBuilder>( + (io.grafeas.v1.UpgradeOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 15; + onChanged(); + return upgradeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceOccurrence, io.grafeas.v1.ComplianceOccurrence.Builder, io.grafeas.v1.ComplianceOccurrenceOrBuilder> complianceBuilder_; + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + * @return Whether the compliance field is set. + */ + @java.lang.Override + public boolean hasCompliance() { + return detailsCase_ == 16; + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + * @return The compliance. + */ + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrence getCompliance() { + if (complianceBuilder_ == null) { + if (detailsCase_ == 16) { + return (io.grafeas.v1.ComplianceOccurrence) details_; + } + return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 16) { + return complianceBuilder_.getMessage(); + } + return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + public Builder setCompliance(io.grafeas.v1.ComplianceOccurrence value) { + if (complianceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + complianceBuilder_.setMessage(value); + } + detailsCase_ = 16; + return this; + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + public Builder setCompliance( + io.grafeas.v1.ComplianceOccurrence.Builder builderForValue) { + if (complianceBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + complianceBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 16; + return this; + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + public Builder mergeCompliance(io.grafeas.v1.ComplianceOccurrence value) { + if (complianceBuilder_ == null) { + if (detailsCase_ == 16 && + details_ != io.grafeas.v1.ComplianceOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.ComplianceOccurrence.newBuilder((io.grafeas.v1.ComplianceOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 16) { + complianceBuilder_.mergeFrom(value); + } else { + complianceBuilder_.setMessage(value); + } + } + detailsCase_ = 16; + return this; + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + public Builder clearCompliance() { + if (complianceBuilder_ == null) { + if (detailsCase_ == 16) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 16) { + detailsCase_ = 0; + details_ = null; + } + complianceBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + public io.grafeas.v1.ComplianceOccurrence.Builder getComplianceBuilder() { + return getComplianceFieldBuilder().getBuilder(); + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + @java.lang.Override + public io.grafeas.v1.ComplianceOccurrenceOrBuilder getComplianceOrBuilder() { + if ((detailsCase_ == 16) && (complianceBuilder_ != null)) { + return complianceBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 16) { + return (io.grafeas.v1.ComplianceOccurrence) details_; + } + return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes a compliance violation on a linked resource.
+     * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceOccurrence, io.grafeas.v1.ComplianceOccurrence.Builder, io.grafeas.v1.ComplianceOccurrenceOrBuilder> + getComplianceFieldBuilder() { + if (complianceBuilder_ == null) { + if (!(detailsCase_ == 16)) { + details_ = io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); + } + complianceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ComplianceOccurrence, io.grafeas.v1.ComplianceOccurrence.Builder, io.grafeas.v1.ComplianceOccurrenceOrBuilder>( + (io.grafeas.v1.ComplianceOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 16; + onChanged(); + return complianceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationOccurrence, io.grafeas.v1.DSSEAttestationOccurrence.Builder, io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder> dsseAttestationBuilder_; + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + * @return Whether the dsseAttestation field is set. + */ + @java.lang.Override + public boolean hasDsseAttestation() { + return detailsCase_ == 17; + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + * @return The dsseAttestation. + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrence getDsseAttestation() { + if (dsseAttestationBuilder_ == null) { + if (detailsCase_ == 17) { + return (io.grafeas.v1.DSSEAttestationOccurrence) details_; + } + return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 17) { + return dsseAttestationBuilder_.getMessage(); + } + return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + public Builder setDsseAttestation(io.grafeas.v1.DSSEAttestationOccurrence value) { + if (dsseAttestationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + dsseAttestationBuilder_.setMessage(value); + } + detailsCase_ = 17; + return this; + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + public Builder setDsseAttestation( + io.grafeas.v1.DSSEAttestationOccurrence.Builder builderForValue) { + if (dsseAttestationBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + dsseAttestationBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 17; + return this; + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + public Builder mergeDsseAttestation(io.grafeas.v1.DSSEAttestationOccurrence value) { + if (dsseAttestationBuilder_ == null) { + if (detailsCase_ == 17 && + details_ != io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance()) { + details_ = io.grafeas.v1.DSSEAttestationOccurrence.newBuilder((io.grafeas.v1.DSSEAttestationOccurrence) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 17) { + dsseAttestationBuilder_.mergeFrom(value); + } else { + dsseAttestationBuilder_.setMessage(value); + } + } + detailsCase_ = 17; + return this; + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + public Builder clearDsseAttestation() { + if (dsseAttestationBuilder_ == null) { + if (detailsCase_ == 17) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 17) { + detailsCase_ = 0; + details_ = null; + } + dsseAttestationBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + public io.grafeas.v1.DSSEAttestationOccurrence.Builder getDsseAttestationBuilder() { + return getDsseAttestationFieldBuilder().getBuilder(); + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + @java.lang.Override + public io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder getDsseAttestationOrBuilder() { + if ((detailsCase_ == 17) && (dsseAttestationBuilder_ != null)) { + return dsseAttestationBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 17) { + return (io.grafeas.v1.DSSEAttestationOccurrence) details_; + } + return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); + } + } + /** + *
+     * Describes an attestation of an artifact using dsse.
+     * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationOccurrence, io.grafeas.v1.DSSEAttestationOccurrence.Builder, io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder> + getDsseAttestationFieldBuilder() { + if (dsseAttestationBuilder_ == null) { + if (!(detailsCase_ == 17)) { + details_ = io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); + } + dsseAttestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.DSSEAttestationOccurrence, io.grafeas.v1.DSSEAttestationOccurrence.Builder, io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder>( + (io.grafeas.v1.DSSEAttestationOccurrence) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 17; + onChanged(); + return dsseAttestationBuilder_; + } + + private io.grafeas.v1.Envelope envelope_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> envelopeBuilder_; + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + * @return Whether the envelope field is set. + */ + public boolean hasEnvelope() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + * @return The envelope. + */ + public io.grafeas.v1.Envelope getEnvelope() { + if (envelopeBuilder_ == null) { + return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } else { + return envelopeBuilder_.getMessage(); + } + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + public Builder setEnvelope(io.grafeas.v1.Envelope value) { + if (envelopeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + envelope_ = value; + } else { + envelopeBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + public Builder setEnvelope( + io.grafeas.v1.Envelope.Builder builderForValue) { + if (envelopeBuilder_ == null) { + envelope_ = builderForValue.build(); + } else { + envelopeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + public Builder mergeEnvelope(io.grafeas.v1.Envelope value) { + if (envelopeBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) && + envelope_ != null && + envelope_ != io.grafeas.v1.Envelope.getDefaultInstance()) { + getEnvelopeBuilder().mergeFrom(value); + } else { + envelope_ = value; + } + } else { + envelopeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + public Builder clearEnvelope() { + bitField0_ = (bitField0_ & ~0x00020000); + envelope_ = null; + if (envelopeBuilder_ != null) { + envelopeBuilder_.dispose(); + envelopeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + public io.grafeas.v1.Envelope.Builder getEnvelopeBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getEnvelopeFieldBuilder().getBuilder(); + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { + if (envelopeBuilder_ != null) { + return envelopeBuilder_.getMessageOrBuilder(); + } else { + return envelope_ == null ? + io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; + } + } + /** + *
+     * https://github.com/secure-systems-lab/dsse
+     * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> + getEnvelopeFieldBuilder() { + if (envelopeBuilder_ == null) { + envelopeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder>( + getEnvelope(), + getParentForChildren(), + isClean()); + envelope_ = null; + } + return envelopeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Occurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Occurrence) + private static final io.grafeas.v1.Occurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Occurrence(); + } + + public static io.grafeas.v1.Occurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Occurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Occurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java new file mode 100644 index 000000000000..b4dc17a5f67a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class OccurrenceName implements ResourceName { + private static final PathTemplate PROJECT_OCCURRENCE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/occurrences/{occurrence}"); + private volatile Map fieldValuesMap; + private final String project; + private final String occurrence; + + @Deprecated + protected OccurrenceName() { + project = null; + occurrence = null; + } + + private OccurrenceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + occurrence = Preconditions.checkNotNull(builder.getOccurrence()); + } + + public String getProject() { + return project; + } + + public String getOccurrence() { + return occurrence; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static OccurrenceName of(String project, String occurrence) { + return newBuilder().setProject(project).setOccurrence(occurrence).build(); + } + + public static String format(String project, String occurrence) { + return newBuilder().setProject(project).setOccurrence(occurrence).build().toString(); + } + + public static OccurrenceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_OCCURRENCE.validatedMatch( + formattedString, "OccurrenceName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("occurrence")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (OccurrenceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_OCCURRENCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (occurrence != null) { + fieldMapBuilder.put("occurrence", occurrence); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_OCCURRENCE.instantiate("project", project, "occurrence", occurrence); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + OccurrenceName that = ((OccurrenceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.occurrence, that.occurrence); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(occurrence); + return h; + } + + /** Builder for projects/{project}/occurrences/{occurrence}. */ + public static class Builder { + private String project; + private String occurrence; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getOccurrence() { + return occurrence; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setOccurrence(String occurrence) { + this.occurrence = occurrence; + return this; + } + + private Builder(OccurrenceName occurrenceName) { + this.project = occurrenceName.project; + this.occurrence = occurrenceName.occurrence; + } + + public OccurrenceName build() { + return new OccurrenceName(this); + } + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java new file mode 100644 index 000000000000..bbc9843777f1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java @@ -0,0 +1,476 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface OccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Occurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Output only. The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required. Immutable. A URI that represents the resource for which the
+   * occurrence applies. For example,
+   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+   * 
+ * + * string resource_uri = 2; + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + /** + *
+   * Required. Immutable. A URI that represents the resource for which the
+   * occurrence applies. For example,
+   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
+   * 
+ * + * string resource_uri = 2; + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString + getResourceUriBytes(); + + /** + *
+   * Required. Immutable. The analysis note associated with this occurrence, in
+   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+   * used as a filter in list requests.
+   * 
+ * + * string note_name = 3; + * @return The noteName. + */ + java.lang.String getNoteName(); + /** + *
+   * Required. Immutable. The analysis note associated with this occurrence, in
+   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
+   * used as a filter in list requests.
+   * 
+ * + * string note_name = 3; + * @return The bytes for noteName. + */ + com.google.protobuf.ByteString + getNoteNameBytes(); + + /** + *
+   * Output only. This explicitly denotes which of the occurrence details are
+   * specified. This field can be used as a filter in list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + int getKindValue(); + /** + *
+   * Output only. This explicitly denotes which of the occurrence details are
+   * specified. This field can be used as a filter in list requests.
+   * 
+ * + * .grafeas.v1.NoteKind kind = 4; + * @return The kind. + */ + io.grafeas.v1.NoteKind getKind(); + + /** + *
+   * A description of actions that can be taken to remedy the note.
+   * 
+ * + * string remediation = 5; + * @return The remediation. + */ + java.lang.String getRemediation(); + /** + *
+   * A description of actions that can be taken to remedy the note.
+   * 
+ * + * string remediation = 5; + * @return The bytes for remediation. + */ + com.google.protobuf.ByteString + getRemediationBytes(); + + /** + *
+   * Output only. The time this occurrence was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time this occurrence was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time this occurrence was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time this occurrence was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The time this occurrence was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The time this occurrence was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * Describes a security vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + * @return Whether the vulnerability field is set. + */ + boolean hasVulnerability(); + /** + *
+   * Describes a security vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + * @return The vulnerability. + */ + io.grafeas.v1.VulnerabilityOccurrence getVulnerability(); + /** + *
+   * Describes a security vulnerability.
+   * 
+ * + * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + */ + io.grafeas.v1.VulnerabilityOccurrenceOrBuilder getVulnerabilityOrBuilder(); + + /** + *
+   * Describes a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + * @return Whether the build field is set. + */ + boolean hasBuild(); + /** + *
+   * Describes a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + * @return The build. + */ + io.grafeas.v1.BuildOccurrence getBuild(); + /** + *
+   * Describes a verifiable build.
+   * 
+ * + * .grafeas.v1.BuildOccurrence build = 9; + */ + io.grafeas.v1.BuildOccurrenceOrBuilder getBuildOrBuilder(); + + /** + *
+   * Describes how this resource derives from the basis in the associated
+   * note.
+   * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + * @return Whether the image field is set. + */ + boolean hasImage(); + /** + *
+   * Describes how this resource derives from the basis in the associated
+   * note.
+   * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + * @return The image. + */ + io.grafeas.v1.ImageOccurrence getImage(); + /** + *
+   * Describes how this resource derives from the basis in the associated
+   * note.
+   * 
+ * + * .grafeas.v1.ImageOccurrence image = 10; + */ + io.grafeas.v1.ImageOccurrenceOrBuilder getImageOrBuilder(); + + /** + *
+   * Describes the installation of a package on the linked resource.
+   * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + * @return Whether the package field is set. + */ + boolean hasPackage(); + /** + *
+   * Describes the installation of a package on the linked resource.
+   * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + * @return The package. + */ + io.grafeas.v1.PackageOccurrence getPackage(); + /** + *
+   * Describes the installation of a package on the linked resource.
+   * 
+ * + * .grafeas.v1.PackageOccurrence package = 11; + */ + io.grafeas.v1.PackageOccurrenceOrBuilder getPackageOrBuilder(); + + /** + *
+   * Describes the deployment of an artifact on a runtime.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + * @return Whether the deployment field is set. + */ + boolean hasDeployment(); + /** + *
+   * Describes the deployment of an artifact on a runtime.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + * @return The deployment. + */ + io.grafeas.v1.DeploymentOccurrence getDeployment(); + /** + *
+   * Describes the deployment of an artifact on a runtime.
+   * 
+ * + * .grafeas.v1.DeploymentOccurrence deployment = 12; + */ + io.grafeas.v1.DeploymentOccurrenceOrBuilder getDeploymentOrBuilder(); + + /** + *
+   * Describes when a resource was discovered.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + * @return Whether the discovery field is set. + */ + boolean hasDiscovery(); + /** + *
+   * Describes when a resource was discovered.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + * @return The discovery. + */ + io.grafeas.v1.DiscoveryOccurrence getDiscovery(); + /** + *
+   * Describes when a resource was discovered.
+   * 
+ * + * .grafeas.v1.DiscoveryOccurrence discovery = 13; + */ + io.grafeas.v1.DiscoveryOccurrenceOrBuilder getDiscoveryOrBuilder(); + + /** + *
+   * Describes an attestation of an artifact.
+   * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + * @return Whether the attestation field is set. + */ + boolean hasAttestation(); + /** + *
+   * Describes an attestation of an artifact.
+   * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + * @return The attestation. + */ + io.grafeas.v1.AttestationOccurrence getAttestation(); + /** + *
+   * Describes an attestation of an artifact.
+   * 
+ * + * .grafeas.v1.AttestationOccurrence attestation = 14; + */ + io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder(); + + /** + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * @return Whether the upgrade field is set. + */ + boolean hasUpgrade(); + /** + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * @return The upgrade. + */ + io.grafeas.v1.UpgradeOccurrence getUpgrade(); + /** + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + io.grafeas.v1.UpgradeOccurrenceOrBuilder getUpgradeOrBuilder(); + + /** + *
+   * Describes a compliance violation on a linked resource.
+   * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + * @return Whether the compliance field is set. + */ + boolean hasCompliance(); + /** + *
+   * Describes a compliance violation on a linked resource.
+   * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + * @return The compliance. + */ + io.grafeas.v1.ComplianceOccurrence getCompliance(); + /** + *
+   * Describes a compliance violation on a linked resource.
+   * 
+ * + * .grafeas.v1.ComplianceOccurrence compliance = 16; + */ + io.grafeas.v1.ComplianceOccurrenceOrBuilder getComplianceOrBuilder(); + + /** + *
+   * Describes an attestation of an artifact using dsse.
+   * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + * @return Whether the dsseAttestation field is set. + */ + boolean hasDsseAttestation(); + /** + *
+   * Describes an attestation of an artifact using dsse.
+   * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + * @return The dsseAttestation. + */ + io.grafeas.v1.DSSEAttestationOccurrence getDsseAttestation(); + /** + *
+   * Describes an attestation of an artifact using dsse.
+   * 
+ * + * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + */ + io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder getDsseAttestationOrBuilder(); + + /** + *
+   * https://github.com/secure-systems-lab/dsse
+   * 
+ * + * .grafeas.v1.Envelope envelope = 18; + * @return Whether the envelope field is set. + */ + boolean hasEnvelope(); + /** + *
+   * https://github.com/secure-systems-lab/dsse
+   * 
+ * + * .grafeas.v1.Envelope envelope = 18; + * @return The envelope. + */ + io.grafeas.v1.Envelope getEnvelope(); + /** + *
+   * https://github.com/secure-systems-lab/dsse
+   * 
+ * + * .grafeas.v1.Envelope envelope = 18; + */ + io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder(); + + public io.grafeas.v1.Occurrence.DetailsCase getDetailsCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java new file mode 100644 index 000000000000..d25d6b95e71b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +public final class Package { + private Package() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Distribution_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Distribution_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Location_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Location_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_PackageNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_PackageNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_PackageOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Version_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Version_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\030grafeas/v1/package.proto\022\ngrafeas.v1\032\037" + + "google/api/field_behavior.proto\032\027grafeas" + + "/v1/common.proto\"\267\001\n\014Distribution\022\024\n\007cpe" + + "_uri\030\001 \001(\tB\003\340A\002\022.\n\014architecture\030\002 \001(\0162\030." + + "grafeas.v1.Architecture\022+\n\016latest_versio" + + "n\030\003 \001(\0132\023.grafeas.v1.Version\022\022\n\nmaintain" + + "er\030\004 \001(\t\022\013\n\003url\030\005 \001(\t\022\023\n\013description\030\006 \001" + + "(\t\"O\n\010Location\022\017\n\007cpe_uri\030\001 \001(\t\022$\n\007versi" + + "on\030\002 \001(\0132\023.grafeas.v1.Version\022\014\n\004path\030\003 " + + "\001(\t\"\320\002\n\013PackageNote\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A" + + "\005\022.\n\014distribution\030\n \003(\0132\030.grafeas.v1.Dis" + + "tribution\022\024\n\014package_type\030\013 \001(\t\022\017\n\007cpe_u" + + "ri\030\014 \001(\t\022.\n\014architecture\030\r \001(\0162\030.grafeas" + + ".v1.Architecture\022$\n\007version\030\016 \001(\0132\023.graf" + + "eas.v1.Version\022\022\n\nmaintainer\030\017 \001(\t\022\013\n\003ur" + + "l\030\020 \001(\t\022\023\n\013description\030\021 \001(\t\022$\n\007license\030" + + "\022 \001(\0132\023.grafeas.v1.License\022\"\n\006digest\030\023 \003" + + "(\0132\022.grafeas.v1.Digest\"\210\002\n\021PackageOccurr" + + "ence\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\003\022&\n\010location\030\002" + + " \003(\0132\024.grafeas.v1.Location\022\031\n\014package_ty" + + "pe\030\003 \001(\tB\003\340A\003\022\024\n\007cpe_uri\030\004 \001(\tB\003\340A\003\0223\n\014a" + + "rchitecture\030\005 \001(\0162\030.grafeas.v1.Architect" + + "ureB\003\340A\003\022$\n\007license\030\006 \001(\0132\023.grafeas.v1.L" + + "icense\022)\n\007version\030\007 \001(\0132\023.grafeas.v1.Ver" + + "sionB\003\340A\003\"\340\001\n\007Version\022\r\n\005epoch\030\001 \001(\005\022\014\n\004" + + "name\030\002 \001(\t\022\020\n\010revision\030\003 \001(\t\022\021\n\tinclusiv" + + "e\030\006 \001(\010\022-\n\004kind\030\004 \001(\0162\037.grafeas.v1.Versi" + + "on.VersionKind\022\021\n\tfull_name\030\005 \001(\t\"Q\n\013Ver" + + "sionKind\022\034\n\030VERSION_KIND_UNSPECIFIED\020\000\022\n" + + "\n\006NORMAL\020\001\022\013\n\007MINIMUM\020\002\022\013\n\007MAXIMUM\020\003*>\n\014" + + "Architecture\022\034\n\030ARCHITECTURE_UNSPECIFIED" + + "\020\000\022\007\n\003X86\020\001\022\007\n\003X64\020\002BQ\n\rio.grafeas.v1P\001Z" + + "8google.golang.org/genproto/googleapis/g" + + "rafeas/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + io.grafeas.v1.Common.getDescriptor(), + }); + internal_static_grafeas_v1_Distribution_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_Distribution_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Distribution_descriptor, + new java.lang.String[] { "CpeUri", "Architecture", "LatestVersion", "Maintainer", "Url", "Description", }); + internal_static_grafeas_v1_Location_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Location_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Location_descriptor, + new java.lang.String[] { "CpeUri", "Version", "Path", }); + internal_static_grafeas_v1_PackageNote_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_PackageNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_PackageNote_descriptor, + new java.lang.String[] { "Name", "Distribution", "PackageType", "CpeUri", "Architecture", "Version", "Maintainer", "Url", "Description", "License", "Digest", }); + internal_static_grafeas_v1_PackageOccurrence_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_PackageOccurrence_descriptor, + new java.lang.String[] { "Name", "Location", "PackageType", "CpeUri", "Architecture", "License", "Version", }); + internal_static_grafeas_v1_Version_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grafeas_v1_Version_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Version_descriptor, + new java.lang.String[] { "Epoch", "Name", "Revision", "Inclusive", "Kind", "FullName", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + io.grafeas.v1.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java new file mode 100644 index 000000000000..0ef9a8e9eee2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java @@ -0,0 +1,2942 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +/** + *
+ * PackageNote represents a particular package version.
+ * 
+ * + * Protobuf type {@code grafeas.v1.PackageNote} + */ +public final class PackageNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.PackageNote) + PackageNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use PackageNote.newBuilder() to construct. + private PackageNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PackageNote() { + name_ = ""; + distribution_ = java.util.Collections.emptyList(); + packageType_ = ""; + cpeUri_ = ""; + architecture_ = 0; + maintainer_ = ""; + url_ = ""; + description_ = ""; + digest_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PackageNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.PackageNote.class, io.grafeas.v1.PackageNote.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISTRIBUTION_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private java.util.List distribution_; + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + @java.lang.Override + public java.util.List getDistributionList() { + return distribution_; + } + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + @java.lang.Override + public java.util.List + getDistributionOrBuilderList() { + return distribution_; + } + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + @java.lang.Override + public int getDistributionCount() { + return distribution_.size(); + } + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + @java.lang.Override + public io.grafeas.v1.Distribution getDistribution(int index) { + return distribution_.get(index); + } + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + @java.lang.Override + public io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder( + int index) { + return distribution_.get(index); + } + + public static final int PACKAGE_TYPE_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object packageType_ = ""; + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 11; + * @return The packageType. + */ + @java.lang.Override + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } + } + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 11; + * @return The bytes for packageType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CPE_URI_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private volatile java.lang.Object cpeUri_ = ""; + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 12; + * @return The cpeUri. + */ + @java.lang.Override + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } + } + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 12; + * @return The bytes for cpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 13; + private int architecture_ = 0; + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override public int getArchitectureValue() { + return architecture_; + } + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @return The architecture. + */ + @java.lang.Override public io.grafeas.v1.Architecture getArchitecture() { + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); + return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; + } + + public static final int VERSION_FIELD_NUMBER = 14; + private io.grafeas.v1.Version version_; + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 14; + * @return Whether the version field is set. + */ + @java.lang.Override + public boolean hasVersion() { + return version_ != null; + } + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 14; + * @return The version. + */ + @java.lang.Override + public io.grafeas.v1.Version getVersion() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 14; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + + public static final int MAINTAINER_FIELD_NUMBER = 15; + @SuppressWarnings("serial") + private volatile java.lang.Object maintainer_ = ""; + /** + *
+   * A freeform text denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 15; + * @return The maintainer. + */ + @java.lang.Override + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + maintainer_ = s; + return s; + } + } + /** + *
+   * A freeform text denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 15; + * @return The bytes for maintainer. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 16; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+   * The homepage for this package.
+   * 
+ * + * string url = 16; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+   * The homepage for this package.
+   * 
+ * + * string url = 16; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 17; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * The description of this package.
+   * 
+ * + * string description = 17; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The description of this package.
+   * 
+ * + * string description = 17; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LICENSE_FIELD_NUMBER = 18; + private io.grafeas.v1.License license_; + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 18; + * @return Whether the license field is set. + */ + @java.lang.Override + public boolean hasLicense() { + return license_ != null; + } + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 18; + * @return The license. + */ + @java.lang.Override + public io.grafeas.v1.License getLicense() { + return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; + } + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 18; + */ + @java.lang.Override + public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { + return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; + } + + public static final int DIGEST_FIELD_NUMBER = 19; + @SuppressWarnings("serial") + private java.util.List digest_; + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + @java.lang.Override + public java.util.List getDigestList() { + return digest_; + } + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + @java.lang.Override + public java.util.List + getDigestOrBuilderList() { + return digest_; + } + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + @java.lang.Override + public int getDigestCount() { + return digest_.size(); + } + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + @java.lang.Override + public io.grafeas.v1.Digest getDigest(int index) { + return digest_.get(index); + } + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + @java.lang.Override + public io.grafeas.v1.DigestOrBuilder getDigestOrBuilder( + int index) { + return digest_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < distribution_.size(); i++) { + output.writeMessage(10, distribution_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, packageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, cpeUri_); + } + if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { + output.writeEnum(13, architecture_); + } + if (version_ != null) { + output.writeMessage(14, getVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, maintainer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, description_); + } + if (license_ != null) { + output.writeMessage(18, getLicense()); + } + for (int i = 0; i < digest_.size(); i++) { + output.writeMessage(19, digest_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < distribution_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, distribution_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, packageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, cpeUri_); + } + if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(13, architecture_); + } + if (version_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, maintainer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, description_); + } + if (license_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getLicense()); + } + for (int i = 0; i < digest_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, digest_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.PackageNote)) { + return super.equals(obj); + } + io.grafeas.v1.PackageNote other = (io.grafeas.v1.PackageNote) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDistributionList() + .equals(other.getDistributionList())) return false; + if (!getPackageType() + .equals(other.getPackageType())) return false; + if (!getCpeUri() + .equals(other.getCpeUri())) return false; + if (architecture_ != other.architecture_) return false; + if (hasVersion() != other.hasVersion()) return false; + if (hasVersion()) { + if (!getVersion() + .equals(other.getVersion())) return false; + } + if (!getMaintainer() + .equals(other.getMaintainer())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (hasLicense() != other.hasLicense()) return false; + if (hasLicense()) { + if (!getLicense() + .equals(other.getLicense())) return false; + } + if (!getDigestList() + .equals(other.getDigestList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getDistributionCount() > 0) { + hash = (37 * hash) + DISTRIBUTION_FIELD_NUMBER; + hash = (53 * hash) + getDistributionList().hashCode(); + } + hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPackageType().hashCode(); + hash = (37 * hash) + CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCpeUri().hashCode(); + hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + architecture_; + if (hasVersion()) { + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + } + hash = (37 * hash) + MAINTAINER_FIELD_NUMBER; + hash = (53 * hash) + getMaintainer().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasLicense()) { + hash = (37 * hash) + LICENSE_FIELD_NUMBER; + hash = (53 * hash) + getLicense().hashCode(); + } + if (getDigestCount() > 0) { + hash = (37 * hash) + DIGEST_FIELD_NUMBER; + hash = (53 * hash) + getDigestList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.PackageNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.PackageNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.PackageNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.PackageNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.PackageNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.PackageNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.PackageNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.PackageNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.PackageNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.PackageNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.PackageNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.PackageNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.PackageNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PackageNote represents a particular package version.
+   * 
+ * + * Protobuf type {@code grafeas.v1.PackageNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.PackageNote) + io.grafeas.v1.PackageNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.PackageNote.class, io.grafeas.v1.PackageNote.Builder.class); + } + + // Construct using io.grafeas.v1.PackageNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (distributionBuilder_ == null) { + distribution_ = java.util.Collections.emptyList(); + } else { + distribution_ = null; + distributionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + packageType_ = ""; + cpeUri_ = ""; + architecture_ = 0; + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + maintainer_ = ""; + url_ = ""; + description_ = ""; + license_ = null; + if (licenseBuilder_ != null) { + licenseBuilder_.dispose(); + licenseBuilder_ = null; + } + if (digestBuilder_ == null) { + digest_ = java.util.Collections.emptyList(); + } else { + digest_ = null; + digestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.PackageNote getDefaultInstanceForType() { + return io.grafeas.v1.PackageNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.PackageNote build() { + io.grafeas.v1.PackageNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.PackageNote buildPartial() { + io.grafeas.v1.PackageNote result = new io.grafeas.v1.PackageNote(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.PackageNote result) { + if (distributionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + distribution_ = java.util.Collections.unmodifiableList(distribution_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.distribution_ = distribution_; + } else { + result.distribution_ = distributionBuilder_.build(); + } + if (digestBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + digest_ = java.util.Collections.unmodifiableList(digest_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.digest_ = digest_; + } else { + result.digest_ = digestBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.PackageNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.packageType_ = packageType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cpeUri_ = cpeUri_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.architecture_ = architecture_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.version_ = versionBuilder_ == null + ? version_ + : versionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.maintainer_ = maintainer_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.license_ = licenseBuilder_ == null + ? license_ + : licenseBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.PackageNote) { + return mergeFrom((io.grafeas.v1.PackageNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.PackageNote other) { + if (other == io.grafeas.v1.PackageNote.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (distributionBuilder_ == null) { + if (!other.distribution_.isEmpty()) { + if (distribution_.isEmpty()) { + distribution_ = other.distribution_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDistributionIsMutable(); + distribution_.addAll(other.distribution_); + } + onChanged(); + } + } else { + if (!other.distribution_.isEmpty()) { + if (distributionBuilder_.isEmpty()) { + distributionBuilder_.dispose(); + distributionBuilder_ = null; + distribution_ = other.distribution_; + bitField0_ = (bitField0_ & ~0x00000002); + distributionBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDistributionFieldBuilder() : null; + } else { + distributionBuilder_.addAllMessages(other.distribution_); + } + } + } + if (!other.getPackageType().isEmpty()) { + packageType_ = other.packageType_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.architecture_ != 0) { + setArchitectureValue(other.getArchitectureValue()); + } + if (other.hasVersion()) { + mergeVersion(other.getVersion()); + } + if (!other.getMaintainer().isEmpty()) { + maintainer_ = other.maintainer_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasLicense()) { + mergeLicense(other.getLicense()); + } + if (digestBuilder_ == null) { + if (!other.digest_.isEmpty()) { + if (digest_.isEmpty()) { + digest_ = other.digest_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureDigestIsMutable(); + digest_.addAll(other.digest_); + } + onChanged(); + } + } else { + if (!other.digest_.isEmpty()) { + if (digestBuilder_.isEmpty()) { + digestBuilder_.dispose(); + digestBuilder_ = null; + digest_ = other.digest_; + bitField0_ = (bitField0_ & ~0x00000400); + digestBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDigestFieldBuilder() : null; + } else { + digestBuilder_.addAllMessages(other.digest_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 82: { + io.grafeas.v1.Distribution m = + input.readMessage( + io.grafeas.v1.Distribution.parser(), + extensionRegistry); + if (distributionBuilder_ == null) { + ensureDistributionIsMutable(); + distribution_.add(m); + } else { + distributionBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: { + packageType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 90 + case 98: { + cpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 98 + case 104: { + architecture_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 104 + case 114: { + input.readMessage( + getVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 114 + case 122: { + maintainer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 122 + case 130: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 130 + case 138: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 138 + case 146: { + input.readMessage( + getLicenseFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 146 + case 154: { + io.grafeas.v1.Digest m = + input.readMessage( + io.grafeas.v1.Digest.parser(), + extensionRegistry); + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + digest_.add(m); + } else { + digestBuilder_.addMessage(m); + } + break; + } // case 154 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List distribution_ = + java.util.Collections.emptyList(); + private void ensureDistributionIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + distribution_ = new java.util.ArrayList(distribution_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Distribution, io.grafeas.v1.Distribution.Builder, io.grafeas.v1.DistributionOrBuilder> distributionBuilder_; + + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public java.util.List getDistributionList() { + if (distributionBuilder_ == null) { + return java.util.Collections.unmodifiableList(distribution_); + } else { + return distributionBuilder_.getMessageList(); + } + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public int getDistributionCount() { + if (distributionBuilder_ == null) { + return distribution_.size(); + } else { + return distributionBuilder_.getCount(); + } + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public io.grafeas.v1.Distribution getDistribution(int index) { + if (distributionBuilder_ == null) { + return distribution_.get(index); + } else { + return distributionBuilder_.getMessage(index); + } + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder setDistribution( + int index, io.grafeas.v1.Distribution value) { + if (distributionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDistributionIsMutable(); + distribution_.set(index, value); + onChanged(); + } else { + distributionBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder setDistribution( + int index, io.grafeas.v1.Distribution.Builder builderForValue) { + if (distributionBuilder_ == null) { + ensureDistributionIsMutable(); + distribution_.set(index, builderForValue.build()); + onChanged(); + } else { + distributionBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder addDistribution(io.grafeas.v1.Distribution value) { + if (distributionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDistributionIsMutable(); + distribution_.add(value); + onChanged(); + } else { + distributionBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder addDistribution( + int index, io.grafeas.v1.Distribution value) { + if (distributionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDistributionIsMutable(); + distribution_.add(index, value); + onChanged(); + } else { + distributionBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder addDistribution( + io.grafeas.v1.Distribution.Builder builderForValue) { + if (distributionBuilder_ == null) { + ensureDistributionIsMutable(); + distribution_.add(builderForValue.build()); + onChanged(); + } else { + distributionBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder addDistribution( + int index, io.grafeas.v1.Distribution.Builder builderForValue) { + if (distributionBuilder_ == null) { + ensureDistributionIsMutable(); + distribution_.add(index, builderForValue.build()); + onChanged(); + } else { + distributionBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder addAllDistribution( + java.lang.Iterable values) { + if (distributionBuilder_ == null) { + ensureDistributionIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, distribution_); + onChanged(); + } else { + distributionBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder clearDistribution() { + if (distributionBuilder_ == null) { + distribution_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + distributionBuilder_.clear(); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public Builder removeDistribution(int index) { + if (distributionBuilder_ == null) { + ensureDistributionIsMutable(); + distribution_.remove(index); + onChanged(); + } else { + distributionBuilder_.remove(index); + } + return this; + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public io.grafeas.v1.Distribution.Builder getDistributionBuilder( + int index) { + return getDistributionFieldBuilder().getBuilder(index); + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder( + int index) { + if (distributionBuilder_ == null) { + return distribution_.get(index); } else { + return distributionBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public java.util.List + getDistributionOrBuilderList() { + if (distributionBuilder_ != null) { + return distributionBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(distribution_); + } + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public io.grafeas.v1.Distribution.Builder addDistributionBuilder() { + return getDistributionFieldBuilder().addBuilder( + io.grafeas.v1.Distribution.getDefaultInstance()); + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public io.grafeas.v1.Distribution.Builder addDistributionBuilder( + int index) { + return getDistributionFieldBuilder().addBuilder( + index, io.grafeas.v1.Distribution.getDefaultInstance()); + } + /** + *
+     * Deprecated.
+     * The various channels by which a package is distributed.
+     * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + public java.util.List + getDistributionBuilderList() { + return getDistributionFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Distribution, io.grafeas.v1.Distribution.Builder, io.grafeas.v1.DistributionOrBuilder> + getDistributionFieldBuilder() { + if (distributionBuilder_ == null) { + distributionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Distribution, io.grafeas.v1.Distribution.Builder, io.grafeas.v1.DistributionOrBuilder>( + distribution_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + distribution_ = null; + } + return distributionBuilder_; + } + + private java.lang.Object packageType_ = ""; + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 11; + * @return The packageType. + */ + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 11; + * @return The bytes for packageType. + */ + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 11; + * @param value The packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + packageType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 11; + * @return This builder for chaining. + */ + public Builder clearPackageType() { + packageType_ = getDefaultInstance().getPackageType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 11; + * @param value The bytes for packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + packageType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object cpeUri_ = ""; + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 12; + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 12; + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 12; + * @param value The cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 12; + * @return This builder for chaining. + */ + public Builder clearCpeUri() { + cpeUri_ = getDefaultInstance().getCpeUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 12; + * @param value The bytes for cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int architecture_ = 0; + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override public int getArchitectureValue() { + return architecture_; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @param value The enum numeric value on the wire for architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitectureValue(int value) { + architecture_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @return The architecture. + */ + @java.lang.Override + public io.grafeas.v1.Architecture getArchitecture() { + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); + return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @param value The architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitecture(io.grafeas.v1.Architecture value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + architecture_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @return This builder for chaining. + */ + public Builder clearArchitecture() { + bitField0_ = (bitField0_ & ~0x00000010); + architecture_ = 0; + onChanged(); + return this; + } + + private io.grafeas.v1.Version version_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + * @return Whether the version field is set. + */ + public boolean hasVersion() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + * @return The version. + */ + public io.grafeas.v1.Version getVersion() { + if (versionBuilder_ == null) { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } else { + return versionBuilder_.getMessage(); + } + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + public Builder setVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + } else { + versionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + public Builder setVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (versionBuilder_ == null) { + version_ = builderForValue.build(); + } else { + versionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + public Builder mergeVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + version_ != null && + version_ != io.grafeas.v1.Version.getDefaultInstance()) { + getVersionBuilder().mergeFrom(value); + } else { + version_ = value; + } + } else { + versionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + public Builder clearVersion() { + bitField0_ = (bitField0_ & ~0x00000020); + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + public io.grafeas.v1.Version.Builder getVersionBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getVersionFieldBuilder().getBuilder(); + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + if (versionBuilder_ != null) { + return versionBuilder_.getMessageOrBuilder(); + } else { + return version_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : version_; + } + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getVersionFieldBuilder() { + if (versionBuilder_ == null) { + versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getVersion(), + getParentForChildren(), + isClean()); + version_ = null; + } + return versionBuilder_; + } + + private java.lang.Object maintainer_ = ""; + /** + *
+     * A freeform text denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 15; + * @return The maintainer. + */ + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + maintainer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A freeform text denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 15; + * @return The bytes for maintainer. + */ + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A freeform text denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 15; + * @param value The maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainer( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + maintainer_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * A freeform text denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 15; + * @return This builder for chaining. + */ + public Builder clearMaintainer() { + maintainer_ = getDefaultInstance().getMaintainer(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * A freeform text denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 15; + * @param value The bytes for maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + maintainer_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+     * The homepage for this package.
+     * 
+ * + * string url = 16; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The homepage for this package.
+     * 
+ * + * string url = 16; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The homepage for this package.
+     * 
+ * + * string url = 16; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The homepage for this package.
+     * 
+ * + * string url = 16; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + *
+     * The homepage for this package.
+     * 
+ * + * string url = 16; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The description of this package.
+     * 
+ * + * string description = 17; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The description of this package.
+     * 
+ * + * string description = 17; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The description of this package.
+     * 
+ * + * string description = 17; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * The description of this package.
+     * 
+ * + * string description = 17; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * The description of this package.
+     * 
+ * + * string description = 17; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private io.grafeas.v1.License license_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> licenseBuilder_; + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + * @return Whether the license field is set. + */ + public boolean hasLicense() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + * @return The license. + */ + public io.grafeas.v1.License getLicense() { + if (licenseBuilder_ == null) { + return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; + } else { + return licenseBuilder_.getMessage(); + } + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + */ + public Builder setLicense(io.grafeas.v1.License value) { + if (licenseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + license_ = value; + } else { + licenseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + */ + public Builder setLicense( + io.grafeas.v1.License.Builder builderForValue) { + if (licenseBuilder_ == null) { + license_ = builderForValue.build(); + } else { + licenseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + */ + public Builder mergeLicense(io.grafeas.v1.License value) { + if (licenseBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) && + license_ != null && + license_ != io.grafeas.v1.License.getDefaultInstance()) { + getLicenseBuilder().mergeFrom(value); + } else { + license_ = value; + } + } else { + licenseBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + */ + public Builder clearLicense() { + bitField0_ = (bitField0_ & ~0x00000200); + license_ = null; + if (licenseBuilder_ != null) { + licenseBuilder_.dispose(); + licenseBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + */ + public io.grafeas.v1.License.Builder getLicenseBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getLicenseFieldBuilder().getBuilder(); + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + */ + public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { + if (licenseBuilder_ != null) { + return licenseBuilder_.getMessageOrBuilder(); + } else { + return license_ == null ? + io.grafeas.v1.License.getDefaultInstance() : license_; + } + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> + getLicenseFieldBuilder() { + if (licenseBuilder_ == null) { + licenseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder>( + getLicense(), + getParentForChildren(), + isClean()); + license_ = null; + } + return licenseBuilder_; + } + + private java.util.List digest_ = + java.util.Collections.emptyList(); + private void ensureDigestIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + digest_ = new java.util.ArrayList(digest_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder> digestBuilder_; + + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public java.util.List getDigestList() { + if (digestBuilder_ == null) { + return java.util.Collections.unmodifiableList(digest_); + } else { + return digestBuilder_.getMessageList(); + } + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public int getDigestCount() { + if (digestBuilder_ == null) { + return digest_.size(); + } else { + return digestBuilder_.getCount(); + } + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public io.grafeas.v1.Digest getDigest(int index) { + if (digestBuilder_ == null) { + return digest_.get(index); + } else { + return digestBuilder_.getMessage(index); + } + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder setDigest( + int index, io.grafeas.v1.Digest value) { + if (digestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDigestIsMutable(); + digest_.set(index, value); + onChanged(); + } else { + digestBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder setDigest( + int index, io.grafeas.v1.Digest.Builder builderForValue) { + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + digest_.set(index, builderForValue.build()); + onChanged(); + } else { + digestBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder addDigest(io.grafeas.v1.Digest value) { + if (digestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDigestIsMutable(); + digest_.add(value); + onChanged(); + } else { + digestBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder addDigest( + int index, io.grafeas.v1.Digest value) { + if (digestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDigestIsMutable(); + digest_.add(index, value); + onChanged(); + } else { + digestBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder addDigest( + io.grafeas.v1.Digest.Builder builderForValue) { + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + digest_.add(builderForValue.build()); + onChanged(); + } else { + digestBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder addDigest( + int index, io.grafeas.v1.Digest.Builder builderForValue) { + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + digest_.add(index, builderForValue.build()); + onChanged(); + } else { + digestBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder addAllDigest( + java.lang.Iterable values) { + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, digest_); + onChanged(); + } else { + digestBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder clearDigest() { + if (digestBuilder_ == null) { + digest_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + digestBuilder_.clear(); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public Builder removeDigest(int index) { + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + digest_.remove(index); + onChanged(); + } else { + digestBuilder_.remove(index); + } + return this; + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public io.grafeas.v1.Digest.Builder getDigestBuilder( + int index) { + return getDigestFieldBuilder().getBuilder(index); + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public io.grafeas.v1.DigestOrBuilder getDigestOrBuilder( + int index) { + if (digestBuilder_ == null) { + return digest_.get(index); } else { + return digestBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public java.util.List + getDigestOrBuilderList() { + if (digestBuilder_ != null) { + return digestBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(digest_); + } + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public io.grafeas.v1.Digest.Builder addDigestBuilder() { + return getDigestFieldBuilder().addBuilder( + io.grafeas.v1.Digest.getDefaultInstance()); + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public io.grafeas.v1.Digest.Builder addDigestBuilder( + int index) { + return getDigestFieldBuilder().addBuilder( + index, io.grafeas.v1.Digest.getDefaultInstance()); + } + /** + *
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
+     * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + public java.util.List + getDigestBuilderList() { + return getDigestFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder> + getDigestFieldBuilder() { + if (digestBuilder_ == null) { + digestBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder>( + digest_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + digest_ = null; + } + return digestBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.PackageNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.PackageNote) + private static final io.grafeas.v1.PackageNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.PackageNote(); + } + + public static io.grafeas.v1.PackageNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PackageNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.PackageNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java new file mode 100644 index 000000000000..e9bfeaf13aee --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java @@ -0,0 +1,308 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +public interface PackageNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.PackageNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + java.util.List + getDistributionList(); + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + io.grafeas.v1.Distribution getDistribution(int index); + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + int getDistributionCount(); + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + java.util.List + getDistributionOrBuilderList(); + /** + *
+   * Deprecated.
+   * The various channels by which a package is distributed.
+   * 
+ * + * repeated .grafeas.v1.Distribution distribution = 10; + */ + io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder( + int index); + + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 11; + * @return The packageType. + */ + java.lang.String getPackageType(); + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 11; + * @return The bytes for packageType. + */ + com.google.protobuf.ByteString + getPackageTypeBytes(); + + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 12; + * @return The cpeUri. + */ + java.lang.String getCpeUri(); + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 12; + * @return The bytes for cpeUri. + */ + com.google.protobuf.ByteString + getCpeUriBytes(); + + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @return The enum numeric value on the wire for architecture. + */ + int getArchitectureValue(); + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 13; + * @return The architecture. + */ + io.grafeas.v1.Architecture getArchitecture(); + + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 14; + * @return Whether the version field is set. + */ + boolean hasVersion(); + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 14; + * @return The version. + */ + io.grafeas.v1.Version getVersion(); + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 14; + */ + io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); + + /** + *
+   * A freeform text denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 15; + * @return The maintainer. + */ + java.lang.String getMaintainer(); + /** + *
+   * A freeform text denoting the maintainer of this package.
+   * 
+ * + * string maintainer = 15; + * @return The bytes for maintainer. + */ + com.google.protobuf.ByteString + getMaintainerBytes(); + + /** + *
+   * The homepage for this package.
+   * 
+ * + * string url = 16; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+   * The homepage for this package.
+   * 
+ * + * string url = 16; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+   * The description of this package.
+   * 
+ * + * string description = 17; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The description of this package.
+   * 
+ * + * string description = 17; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 18; + * @return Whether the license field is set. + */ + boolean hasLicense(); + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 18; + * @return The license. + */ + io.grafeas.v1.License getLicense(); + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 18; + */ + io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder(); + + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + java.util.List + getDigestList(); + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + io.grafeas.v1.Digest getDigest(int index); + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + int getDigestCount(); + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + java.util.List + getDigestOrBuilderList(); + /** + *
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
+   * 
+ * + * repeated .grafeas.v1.Digest digest = 19; + */ + io.grafeas.v1.DigestOrBuilder getDigestOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java new file mode 100644 index 000000000000..c5383f689414 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java @@ -0,0 +1,1985 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +/** + *
+ * Details on how a particular software package was installed on a system.
+ * 
+ * + * Protobuf type {@code grafeas.v1.PackageOccurrence} + */ +public final class PackageOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.PackageOccurrence) + PackageOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use PackageOccurrence.newBuilder() to construct. + private PackageOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PackageOccurrence() { + name_ = ""; + location_ = java.util.Collections.emptyList(); + packageType_ = ""; + cpeUri_ = ""; + architecture_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PackageOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.PackageOccurrence.class, io.grafeas.v1.PackageOccurrence.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the installed package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the installed package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List location_; + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + @java.lang.Override + public java.util.List getLocationList() { + return location_; + } + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + @java.lang.Override + public java.util.List + getLocationOrBuilderList() { + return location_; + } + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + @java.lang.Override + public int getLocationCount() { + return location_.size(); + } + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + @java.lang.Override + public io.grafeas.v1.Location getLocation(int index) { + return location_.get(index); + } + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + @java.lang.Override + public io.grafeas.v1.LocationOrBuilder getLocationOrBuilder( + int index) { + return location_.get(index); + } + + public static final int PACKAGE_TYPE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object packageType_ = ""; + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The packageType. + */ + @java.lang.Override + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } + } + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for packageType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CPE_URI_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object cpeUri_ = ""; + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The cpeUri. + */ + @java.lang.Override + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } + } + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for cpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 5; + private int architecture_ = 0; + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override public int getArchitectureValue() { + return architecture_; + } + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The architecture. + */ + @java.lang.Override public io.grafeas.v1.Architecture getArchitecture() { + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); + return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; + } + + public static final int LICENSE_FIELD_NUMBER = 6; + private io.grafeas.v1.License license_; + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 6; + * @return Whether the license field is set. + */ + @java.lang.Override + public boolean hasLicense() { + return license_ != null; + } + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 6; + * @return The license. + */ + @java.lang.Override + public io.grafeas.v1.License getLicense() { + return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; + } + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 6; + */ + @java.lang.Override + public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { + return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; + } + + public static final int VERSION_FIELD_NUMBER = 7; + private io.grafeas.v1.Version version_; + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the version field is set. + */ + @java.lang.Override + public boolean hasVersion() { + return version_ != null; + } + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The version. + */ + @java.lang.Override + public io.grafeas.v1.Version getVersion() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < location_.size(); i++) { + output.writeMessage(2, location_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, packageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cpeUri_); + } + if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, architecture_); + } + if (license_ != null) { + output.writeMessage(6, getLicense()); + } + if (version_ != null) { + output.writeMessage(7, getVersion()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < location_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, location_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, packageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cpeUri_); + } + if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, architecture_); + } + if (license_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getLicense()); + } + if (version_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getVersion()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.PackageOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.PackageOccurrence other = (io.grafeas.v1.PackageOccurrence) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getLocationList() + .equals(other.getLocationList())) return false; + if (!getPackageType() + .equals(other.getPackageType())) return false; + if (!getCpeUri() + .equals(other.getCpeUri())) return false; + if (architecture_ != other.architecture_) return false; + if (hasLicense() != other.hasLicense()) return false; + if (hasLicense()) { + if (!getLicense() + .equals(other.getLicense())) return false; + } + if (hasVersion() != other.hasVersion()) return false; + if (hasVersion()) { + if (!getVersion() + .equals(other.getVersion())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getLocationCount() > 0) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocationList().hashCode(); + } + hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPackageType().hashCode(); + hash = (37 * hash) + CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCpeUri().hashCode(); + hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + architecture_; + if (hasLicense()) { + hash = (37 * hash) + LICENSE_FIELD_NUMBER; + hash = (53 * hash) + getLicense().hashCode(); + } + if (hasVersion()) { + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.PackageOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.PackageOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.PackageOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.PackageOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.PackageOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.PackageOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.PackageOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.PackageOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.PackageOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.PackageOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.PackageOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.PackageOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.PackageOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Details on how a particular software package was installed on a system.
+   * 
+ * + * Protobuf type {@code grafeas.v1.PackageOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.PackageOccurrence) + io.grafeas.v1.PackageOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.PackageOccurrence.class, io.grafeas.v1.PackageOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.PackageOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (locationBuilder_ == null) { + location_ = java.util.Collections.emptyList(); + } else { + location_ = null; + locationBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + packageType_ = ""; + cpeUri_ = ""; + architecture_ = 0; + license_ = null; + if (licenseBuilder_ != null) { + licenseBuilder_.dispose(); + licenseBuilder_ = null; + } + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.PackageOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.PackageOccurrence build() { + io.grafeas.v1.PackageOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.PackageOccurrence buildPartial() { + io.grafeas.v1.PackageOccurrence result = new io.grafeas.v1.PackageOccurrence(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.PackageOccurrence result) { + if (locationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + location_ = java.util.Collections.unmodifiableList(location_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.location_ = location_; + } else { + result.location_ = locationBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.PackageOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.packageType_ = packageType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cpeUri_ = cpeUri_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.architecture_ = architecture_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.license_ = licenseBuilder_ == null + ? license_ + : licenseBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.version_ = versionBuilder_ == null + ? version_ + : versionBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.PackageOccurrence) { + return mergeFrom((io.grafeas.v1.PackageOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.PackageOccurrence other) { + if (other == io.grafeas.v1.PackageOccurrence.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (locationBuilder_ == null) { + if (!other.location_.isEmpty()) { + if (location_.isEmpty()) { + location_ = other.location_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLocationIsMutable(); + location_.addAll(other.location_); + } + onChanged(); + } + } else { + if (!other.location_.isEmpty()) { + if (locationBuilder_.isEmpty()) { + locationBuilder_.dispose(); + locationBuilder_ = null; + location_ = other.location_; + bitField0_ = (bitField0_ & ~0x00000002); + locationBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLocationFieldBuilder() : null; + } else { + locationBuilder_.addAllMessages(other.location_); + } + } + } + if (!other.getPackageType().isEmpty()) { + packageType_ = other.packageType_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.architecture_ != 0) { + setArchitectureValue(other.getArchitectureValue()); + } + if (other.hasLicense()) { + mergeLicense(other.getLicense()); + } + if (other.hasVersion()) { + mergeVersion(other.getVersion()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + io.grafeas.v1.Location m = + input.readMessage( + io.grafeas.v1.Location.parser(), + extensionRegistry); + if (locationBuilder_ == null) { + ensureLocationIsMutable(); + location_.add(m); + } else { + locationBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + packageType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + cpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + architecture_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + input.readMessage( + getLicenseFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the installed package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the installed package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the installed package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the installed package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the installed package.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List location_ = + java.util.Collections.emptyList(); + private void ensureLocationIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + location_ = new java.util.ArrayList(location_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Location, io.grafeas.v1.Location.Builder, io.grafeas.v1.LocationOrBuilder> locationBuilder_; + + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public java.util.List getLocationList() { + if (locationBuilder_ == null) { + return java.util.Collections.unmodifiableList(location_); + } else { + return locationBuilder_.getMessageList(); + } + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public int getLocationCount() { + if (locationBuilder_ == null) { + return location_.size(); + } else { + return locationBuilder_.getCount(); + } + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public io.grafeas.v1.Location getLocation(int index) { + if (locationBuilder_ == null) { + return location_.get(index); + } else { + return locationBuilder_.getMessage(index); + } + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder setLocation( + int index, io.grafeas.v1.Location value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationIsMutable(); + location_.set(index, value); + onChanged(); + } else { + locationBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder setLocation( + int index, io.grafeas.v1.Location.Builder builderForValue) { + if (locationBuilder_ == null) { + ensureLocationIsMutable(); + location_.set(index, builderForValue.build()); + onChanged(); + } else { + locationBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder addLocation(io.grafeas.v1.Location value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationIsMutable(); + location_.add(value); + onChanged(); + } else { + locationBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder addLocation( + int index, io.grafeas.v1.Location value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationIsMutable(); + location_.add(index, value); + onChanged(); + } else { + locationBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder addLocation( + io.grafeas.v1.Location.Builder builderForValue) { + if (locationBuilder_ == null) { + ensureLocationIsMutable(); + location_.add(builderForValue.build()); + onChanged(); + } else { + locationBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder addLocation( + int index, io.grafeas.v1.Location.Builder builderForValue) { + if (locationBuilder_ == null) { + ensureLocationIsMutable(); + location_.add(index, builderForValue.build()); + onChanged(); + } else { + locationBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder addAllLocation( + java.lang.Iterable values) { + if (locationBuilder_ == null) { + ensureLocationIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, location_); + onChanged(); + } else { + locationBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder clearLocation() { + if (locationBuilder_ == null) { + location_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + locationBuilder_.clear(); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public Builder removeLocation(int index) { + if (locationBuilder_ == null) { + ensureLocationIsMutable(); + location_.remove(index); + onChanged(); + } else { + locationBuilder_.remove(index); + } + return this; + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public io.grafeas.v1.Location.Builder getLocationBuilder( + int index) { + return getLocationFieldBuilder().getBuilder(index); + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public io.grafeas.v1.LocationOrBuilder getLocationOrBuilder( + int index) { + if (locationBuilder_ == null) { + return location_.get(index); } else { + return locationBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public java.util.List + getLocationOrBuilderList() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(location_); + } + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public io.grafeas.v1.Location.Builder addLocationBuilder() { + return getLocationFieldBuilder().addBuilder( + io.grafeas.v1.Location.getDefaultInstance()); + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public io.grafeas.v1.Location.Builder addLocationBuilder( + int index) { + return getLocationFieldBuilder().addBuilder( + index, io.grafeas.v1.Location.getDefaultInstance()); + } + /** + *
+     * All of the places within the filesystem versions of this package
+     * have been found.
+     * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + public java.util.List + getLocationBuilderList() { + return getLocationFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Location, io.grafeas.v1.Location.Builder, io.grafeas.v1.LocationOrBuilder> + getLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.Location, io.grafeas.v1.Location.Builder, io.grafeas.v1.LocationOrBuilder>( + location_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + location_ = null; + } + return locationBuilder_; + } + + private java.lang.Object packageType_ = ""; + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The packageType. + */ + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for packageType. + */ + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + packageType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearPackageType() { + packageType_ = getDefaultInstance().getPackageType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + packageType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object cpeUri_ = ""; + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearCpeUri() { + cpeUri_ = getDefaultInstance().getCpeUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * denoting the package manager version distributing a package.
+     * The cpe_uri will be blank for language packages.
+     * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int architecture_ = 0; + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override public int getArchitectureValue() { + return architecture_; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitectureValue(int value) { + architecture_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The architecture. + */ + @java.lang.Override + public io.grafeas.v1.Architecture getArchitecture() { + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); + return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitecture(io.grafeas.v1.Architecture value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + architecture_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The CPU architecture for which packages in this distribution channel were
+     * built. Architecture will be blank for language packages.
+     * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearArchitecture() { + bitField0_ = (bitField0_ & ~0x00000010); + architecture_ = 0; + onChanged(); + return this; + } + + private io.grafeas.v1.License license_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> licenseBuilder_; + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + * @return Whether the license field is set. + */ + public boolean hasLicense() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + * @return The license. + */ + public io.grafeas.v1.License getLicense() { + if (licenseBuilder_ == null) { + return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; + } else { + return licenseBuilder_.getMessage(); + } + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + */ + public Builder setLicense(io.grafeas.v1.License value) { + if (licenseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + license_ = value; + } else { + licenseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + */ + public Builder setLicense( + io.grafeas.v1.License.Builder builderForValue) { + if (licenseBuilder_ == null) { + license_ = builderForValue.build(); + } else { + licenseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + */ + public Builder mergeLicense(io.grafeas.v1.License value) { + if (licenseBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + license_ != null && + license_ != io.grafeas.v1.License.getDefaultInstance()) { + getLicenseBuilder().mergeFrom(value); + } else { + license_ = value; + } + } else { + licenseBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + */ + public Builder clearLicense() { + bitField0_ = (bitField0_ & ~0x00000020); + license_ = null; + if (licenseBuilder_ != null) { + licenseBuilder_.dispose(); + licenseBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + */ + public io.grafeas.v1.License.Builder getLicenseBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getLicenseFieldBuilder().getBuilder(); + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + */ + public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { + if (licenseBuilder_ != null) { + return licenseBuilder_.getMessageOrBuilder(); + } else { + return license_ == null ? + io.grafeas.v1.License.getDefaultInstance() : license_; + } + } + /** + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> + getLicenseFieldBuilder() { + if (licenseBuilder_ == null) { + licenseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder>( + getLicense(), + getParentForChildren(), + isClean()); + license_ = null; + } + return licenseBuilder_; + } + + private io.grafeas.v1.Version version_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the version field is set. + */ + public boolean hasVersion() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The version. + */ + public io.grafeas.v1.Version getVersion() { + if (versionBuilder_ == null) { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } else { + return versionBuilder_.getMessage(); + } + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + } else { + versionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (versionBuilder_ == null) { + version_ = builderForValue.build(); + } else { + versionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + version_ != null && + version_ != io.grafeas.v1.Version.getDefaultInstance()) { + getVersionBuilder().mergeFrom(value); + } else { + version_ = value; + } + } else { + versionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearVersion() { + bitField0_ = (bitField0_ & ~0x00000040); + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public io.grafeas.v1.Version.Builder getVersionBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getVersionFieldBuilder().getBuilder(); + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + if (versionBuilder_ != null) { + return versionBuilder_.getMessageOrBuilder(); + } else { + return version_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : version_; + } + } + /** + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getVersionFieldBuilder() { + if (versionBuilder_ == null) { + versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getVersion(), + getParentForChildren(), + isClean()); + version_ = null; + } + return versionBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.PackageOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.PackageOccurrence) + private static final io.grafeas.v1.PackageOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.PackageOccurrence(); + } + + public static io.grafeas.v1.PackageOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PackageOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.PackageOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java new file mode 100644 index 000000000000..52fa9a813313 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java @@ -0,0 +1,199 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +public interface PackageOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.PackageOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the installed package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the installed package.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + java.util.List + getLocationList(); + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + io.grafeas.v1.Location getLocation(int index); + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + int getLocationCount(); + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + java.util.List + getLocationOrBuilderList(); + /** + *
+   * All of the places within the filesystem versions of this package
+   * have been found.
+   * 
+ * + * repeated .grafeas.v1.Location location = 2; + */ + io.grafeas.v1.LocationOrBuilder getLocationOrBuilder( + int index); + + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The packageType. + */ + java.lang.String getPackageType(); + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems,
+   * node.js packages, etc.).
+   * 
+ * + * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for packageType. + */ + com.google.protobuf.ByteString + getPackageTypeBytes(); + + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The cpeUri. + */ + java.lang.String getCpeUri(); + /** + *
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * denoting the package manager version distributing a package.
+   * The cpe_uri will be blank for language packages.
+   * 
+ * + * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for cpeUri. + */ + com.google.protobuf.ByteString + getCpeUriBytes(); + + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for architecture. + */ + int getArchitectureValue(); + /** + *
+   * The CPU architecture for which packages in this distribution channel were
+   * built. Architecture will be blank for language packages.
+   * 
+ * + * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The architecture. + */ + io.grafeas.v1.Architecture getArchitecture(); + + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 6; + * @return Whether the license field is set. + */ + boolean hasLicense(); + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 6; + * @return The license. + */ + io.grafeas.v1.License getLicense(); + /** + *
+   * Licenses that have been declared by the authors of the package.
+   * 
+ * + * .grafeas.v1.License license = 6; + */ + io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder(); + + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the version field is set. + */ + boolean hasVersion(); + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The version. + */ + io.grafeas.v1.Version getVersion(); + /** + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java new file mode 100644 index 000000000000..8cfc04621ecb --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProjectName implements ResourceName { + private static final PathTemplate PROJECT = + PathTemplate.createWithoutUrlEncoding("projects/{project}"); + private volatile Map fieldValuesMap; + private final String project; + + @Deprecated + protected ProjectName() { + project = null; + } + + private ProjectName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProjectName of(String project) { + return newBuilder().setProject(project).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + public static ProjectName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT.validatedMatch( + formattedString, "ProjectName.parse: formattedString not in valid format"); + return of(matchMap.get("project")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProjectName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT.instantiate("project", project); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ProjectName that = ((ProjectName) o); + return Objects.equals(this.project, that.project); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** Builder for projects/{project}. */ + public static class Builder { + private String project; + + protected Builder() {} + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder(ProjectName projectName) { + this.project = projectName.project; + } + + public ProjectName build() { + return new ProjectName(this); + } + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java new file mode 100644 index 000000000000..2e04badc87e5 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java @@ -0,0 +1,746 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Selects a repo using a Google Cloud Platform project ID (e.g.,
+ * winged-cargo-31) and a repo name within that project.
+ * 
+ * + * Protobuf type {@code grafeas.v1.ProjectRepoId} + */ +public final class ProjectRepoId extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.ProjectRepoId) + ProjectRepoIdOrBuilder { +private static final long serialVersionUID = 0L; + // Use ProjectRepoId.newBuilder() to construct. + private ProjectRepoId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProjectRepoId() { + projectId_ = ""; + repoName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProjectRepoId(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ProjectRepoId.class, io.grafeas.v1.ProjectRepoId.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + *
+   * The ID of the project.
+   * 
+ * + * string project_id = 1; + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + *
+   * The ID of the project.
+   * 
+ * + * string project_id = 1; + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPO_NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object repoName_ = ""; + /** + *
+   * The name of the repo. Leave empty for the default repo.
+   * 
+ * + * string repo_name = 2; + * @return The repoName. + */ + @java.lang.Override + public java.lang.String getRepoName() { + java.lang.Object ref = repoName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repoName_ = s; + return s; + } + } + /** + *
+   * The name of the repo. Leave empty for the default repo.
+   * 
+ * + * string repo_name = 2; + * @return The bytes for repoName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRepoNameBytes() { + java.lang.Object ref = repoName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + repoName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repoName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, repoName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repoName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, repoName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.ProjectRepoId)) { + return super.equals(obj); + } + io.grafeas.v1.ProjectRepoId other = (io.grafeas.v1.ProjectRepoId) obj; + + if (!getProjectId() + .equals(other.getProjectId())) return false; + if (!getRepoName() + .equals(other.getRepoName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + REPO_NAME_FIELD_NUMBER; + hash = (53 * hash) + getRepoName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.ProjectRepoId parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ProjectRepoId parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ProjectRepoId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ProjectRepoId parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ProjectRepoId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.ProjectRepoId parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.ProjectRepoId parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ProjectRepoId parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ProjectRepoId parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.ProjectRepoId parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.ProjectRepoId parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.ProjectRepoId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.ProjectRepoId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Selects a repo using a Google Cloud Platform project ID (e.g.,
+   * winged-cargo-31) and a repo name within that project.
+   * 
+ * + * Protobuf type {@code grafeas.v1.ProjectRepoId} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.ProjectRepoId) + io.grafeas.v1.ProjectRepoIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.ProjectRepoId.class, io.grafeas.v1.ProjectRepoId.Builder.class); + } + + // Construct using io.grafeas.v1.ProjectRepoId.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + repoName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.ProjectRepoId getDefaultInstanceForType() { + return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.ProjectRepoId build() { + io.grafeas.v1.ProjectRepoId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.ProjectRepoId buildPartial() { + io.grafeas.v1.ProjectRepoId result = new io.grafeas.v1.ProjectRepoId(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.ProjectRepoId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.repoName_ = repoName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.ProjectRepoId) { + return mergeFrom((io.grafeas.v1.ProjectRepoId)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.ProjectRepoId other) { + if (other == io.grafeas.v1.ProjectRepoId.getDefaultInstance()) return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRepoName().isEmpty()) { + repoName_ = other.repoName_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + repoName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object projectId_ = ""; + /** + *
+     * The ID of the project.
+     * 
+ * + * string project_id = 1; + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the project.
+     * 
+ * + * string project_id = 1; + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the project.
+     * 
+ * + * string project_id = 1; + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the project.
+     * 
+ * + * string project_id = 1; + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID of the project.
+     * 
+ * + * string project_id = 1; + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object repoName_ = ""; + /** + *
+     * The name of the repo. Leave empty for the default repo.
+     * 
+ * + * string repo_name = 2; + * @return The repoName. + */ + public java.lang.String getRepoName() { + java.lang.Object ref = repoName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repoName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the repo. Leave empty for the default repo.
+     * 
+ * + * string repo_name = 2; + * @return The bytes for repoName. + */ + public com.google.protobuf.ByteString + getRepoNameBytes() { + java.lang.Object ref = repoName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + repoName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the repo. Leave empty for the default repo.
+     * 
+ * + * string repo_name = 2; + * @param value The repoName to set. + * @return This builder for chaining. + */ + public Builder setRepoName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + repoName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The name of the repo. Leave empty for the default repo.
+     * 
+ * + * string repo_name = 2; + * @return This builder for chaining. + */ + public Builder clearRepoName() { + repoName_ = getDefaultInstance().getRepoName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The name of the repo. Leave empty for the default repo.
+     * 
+ * + * string repo_name = 2; + * @param value The bytes for repoName to set. + * @return This builder for chaining. + */ + public Builder setRepoNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + repoName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.ProjectRepoId) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.ProjectRepoId) + private static final io.grafeas.v1.ProjectRepoId DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.ProjectRepoId(); + } + + public static io.grafeas.v1.ProjectRepoId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProjectRepoId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.ProjectRepoId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java new file mode 100644 index 000000000000..3c9ea6025916 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface ProjectRepoIdOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.ProjectRepoId) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the project.
+   * 
+ * + * string project_id = 1; + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + *
+   * The ID of the project.
+   * 
+ * + * string project_id = 1; + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString + getProjectIdBytes(); + + /** + *
+   * The name of the repo. Leave empty for the default repo.
+   * 
+ * + * string repo_name = 2; + * @return The repoName. + */ + java.lang.String getRepoName(); + /** + *
+   * The name of the repo. Leave empty for the default repo.
+   * 
+ * + * string repo_name = 2; + * @return The bytes for repoName. + */ + com.google.protobuf.ByteString + getRepoNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java new file mode 100644 index 000000000000..97c8f268ca63 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java @@ -0,0 +1,266 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public final class Provenance { + private Provenance() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BuildProvenance_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Source_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Source_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Source_FileHashesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Source_FileHashesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_FileHashes_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_FileHashes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Hash_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Hash_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Command_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Command_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_Artifact_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_Artifact_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SourceContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SourceContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SourceContext_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_AliasContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_AliasContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_GerritSourceContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_GitSourceContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_RepoId_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_RepoId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_ProjectRepoId_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033grafeas/v1/provenance.proto\022\ngrafeas.v" + + "1\032\037google/protobuf/timestamp.proto\"\220\004\n\017B" + + "uildProvenance\022\n\n\002id\030\001 \001(\t\022\022\n\nproject_id" + + "\030\002 \001(\t\022%\n\010commands\030\003 \003(\0132\023.grafeas.v1.Co" + + "mmand\022-\n\017built_artifacts\030\004 \003(\0132\024.grafeas" + + ".v1.Artifact\022/\n\013create_time\030\005 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022.\n\nstart_time\030\006 \001(" + + "\0132\032.google.protobuf.Timestamp\022,\n\010end_tim" + + "e\030\007 \001(\0132\032.google.protobuf.Timestamp\022\017\n\007c" + + "reator\030\010 \001(\t\022\020\n\010logs_uri\030\t \001(\t\022-\n\021source" + + "_provenance\030\n \001(\0132\022.grafeas.v1.Source\022\022\n" + + "\ntrigger_id\030\013 \001(\t\022D\n\rbuild_options\030\014 \003(\013" + + "2-.grafeas.v1.BuildProvenance.BuildOptio" + + "nsEntry\022\027\n\017builder_version\030\r \001(\t\0323\n\021Buil" + + "dOptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001\"\225\002\n\006Source\022#\n\033artifact_storage_sou" + + "rce_uri\030\001 \001(\t\0227\n\013file_hashes\030\002 \003(\0132\".gra" + + "feas.v1.Source.FileHashesEntry\022*\n\007contex" + + "t\030\003 \001(\0132\031.grafeas.v1.SourceContext\0226\n\023ad" + + "ditional_contexts\030\004 \003(\0132\031.grafeas.v1.Sou" + + "rceContext\032I\n\017FileHashesEntry\022\013\n\003key\030\001 \001" + + "(\t\022%\n\005value\030\002 \001(\0132\026.grafeas.v1.FileHashe" + + "s:\0028\001\"1\n\nFileHashes\022#\n\tfile_hash\030\001 \003(\0132\020" + + ".grafeas.v1.Hash\"#\n\004Hash\022\014\n\004type\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\014\"]\n\007Command\022\014\n\004name\030\001 \001(\t\022\013" + + "\n\003env\030\002 \003(\t\022\014\n\004args\030\003 \003(\t\022\013\n\003dir\030\004 \001(\t\022\n" + + "\n\002id\030\005 \001(\t\022\020\n\010wait_for\030\006 \003(\t\"7\n\010Artifact" + + "\022\020\n\010checksum\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\r\n\005names\030" + + "\003 \003(\t\"\232\002\n\rSourceContext\0228\n\ncloud_repo\030\001 " + + "\001(\0132\".grafeas.v1.CloudRepoSourceContextH" + + "\000\0221\n\006gerrit\030\002 \001(\0132\037.grafeas.v1.GerritSou" + + "rceContextH\000\022+\n\003git\030\003 \001(\0132\034.grafeas.v1.G" + + "itSourceContextH\000\0225\n\006labels\030\004 \003(\0132%.graf" + + "eas.v1.SourceContext.LabelsEntry\032-\n\013Labe" + + "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B" + + "\t\n\007context\"\212\001\n\014AliasContext\022+\n\004kind\030\001 \001(" + + "\0162\035.grafeas.v1.AliasContext.Kind\022\014\n\004name" + + "\030\002 \001(\t\"?\n\004Kind\022\024\n\020KIND_UNSPECIFIED\020\000\022\t\n\005" + + "FIXED\020\001\022\013\n\007MOVABLE\020\002\022\t\n\005OTHER\020\004\"\223\001\n\026Clou" + + "dRepoSourceContext\022#\n\007repo_id\030\001 \001(\0132\022.gr" + + "afeas.v1.RepoId\022\025\n\013revision_id\030\002 \001(\tH\000\0221" + + "\n\ralias_context\030\003 \001(\0132\030.grafeas.v1.Alias" + + "ContextH\000B\n\n\010revision\"\225\001\n\023GerritSourceCo" + + "ntext\022\020\n\010host_uri\030\001 \001(\t\022\026\n\016gerrit_projec" + + "t\030\002 \001(\t\022\025\n\013revision_id\030\003 \001(\tH\000\0221\n\ralias_" + + "context\030\004 \001(\0132\030.grafeas.v1.AliasContextH" + + "\000B\n\n\010revision\"4\n\020GitSourceContext\022\013\n\003url" + + "\030\001 \001(\t\022\023\n\013revision_id\030\002 \001(\t\"S\n\006RepoId\0224\n" + + "\017project_repo_id\030\001 \001(\0132\031.grafeas.v1.Proj" + + "ectRepoIdH\000\022\r\n\003uid\030\002 \001(\tH\000B\004\n\002id\"6\n\rProj" + + "ectRepoId\022\022\n\nproject_id\030\001 \001(\t\022\021\n\trepo_na" + + "me\030\002 \001(\tBQ\n\rio.grafeas.v1P\001Z8google.gola" + + "ng.org/genproto/googleapis/grafeas/v1;gr" + + "afeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_grafeas_v1_BuildProvenance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BuildProvenance_descriptor, + new java.lang.String[] { "Id", "ProjectId", "Commands", "BuiltArtifacts", "CreateTime", "StartTime", "EndTime", "Creator", "LogsUri", "SourceProvenance", "TriggerId", "BuildOptions", "BuilderVersion", }); + internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor = + internal_static_grafeas_v1_BuildProvenance_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grafeas_v1_Source_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_Source_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Source_descriptor, + new java.lang.String[] { "ArtifactStorageSourceUri", "FileHashes", "Context", "AdditionalContexts", }); + internal_static_grafeas_v1_Source_FileHashesEntry_descriptor = + internal_static_grafeas_v1_Source_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_Source_FileHashesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Source_FileHashesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grafeas_v1_FileHashes_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_FileHashes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_FileHashes_descriptor, + new java.lang.String[] { "FileHash", }); + internal_static_grafeas_v1_Hash_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_Hash_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Hash_descriptor, + new java.lang.String[] { "Type", "Value", }); + internal_static_grafeas_v1_Command_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grafeas_v1_Command_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Command_descriptor, + new java.lang.String[] { "Name", "Env", "Args", "Dir", "Id", "WaitFor", }); + internal_static_grafeas_v1_Artifact_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_grafeas_v1_Artifact_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_Artifact_descriptor, + new java.lang.String[] { "Checksum", "Id", "Names", }); + internal_static_grafeas_v1_SourceContext_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_grafeas_v1_SourceContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SourceContext_descriptor, + new java.lang.String[] { "CloudRepo", "Gerrit", "Git", "Labels", "Context", }); + internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor = + internal_static_grafeas_v1_SourceContext_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_SourceContext_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grafeas_v1_AliasContext_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_grafeas_v1_AliasContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_AliasContext_descriptor, + new java.lang.String[] { "Kind", "Name", }); + internal_static_grafeas_v1_CloudRepoSourceContext_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_CloudRepoSourceContext_descriptor, + new java.lang.String[] { "RepoId", "RevisionId", "AliasContext", "Revision", }); + internal_static_grafeas_v1_GerritSourceContext_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_GerritSourceContext_descriptor, + new java.lang.String[] { "HostUri", "GerritProject", "RevisionId", "AliasContext", "Revision", }); + internal_static_grafeas_v1_GitSourceContext_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_GitSourceContext_descriptor, + new java.lang.String[] { "Url", "RevisionId", }); + internal_static_grafeas_v1_RepoId_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_grafeas_v1_RepoId_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_RepoId_descriptor, + new java.lang.String[] { "ProjectRepoId", "Uid", "Id", }); + internal_static_grafeas_v1_ProjectRepoId_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_ProjectRepoId_descriptor, + new java.lang.String[] { "ProjectId", "RepoName", }); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java new file mode 100644 index 000000000000..eb956626b15c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java @@ -0,0 +1,1954 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Steps taken to build the artifact.
+ * For a TaskRun, typically each container corresponds to one step in the
+ * recipe.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Recipe} + */ +public final class Recipe extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Recipe) + RecipeOrBuilder { +private static final long serialVersionUID = 0L; + // Use Recipe.newBuilder() to construct. + private Recipe(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Recipe() { + type_ = ""; + entryPoint_ = ""; + arguments_ = java.util.Collections.emptyList(); + environment_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Recipe(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Recipe.class, io.grafeas.v1.Recipe.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + *
+   * URI indicating what type of recipe was performed. It determines the meaning
+   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+   * 
+ * + * string type = 1; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * URI indicating what type of recipe was performed. It determines the meaning
+   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+   * 
+ * + * string type = 1; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFINED_IN_MATERIAL_FIELD_NUMBER = 2; + private long definedInMaterial_ = 0L; + /** + *
+   * Index in materials containing the recipe steps that are not implied by
+   * recipe.type. For example, if the recipe type were "make", then this would
+   * point to the source containing the Makefile, not the make program itself.
+   * Set to -1 if the recipe doesn't come from a material, as zero is default
+   * unset value for int64.
+   * 
+ * + * int64 defined_in_material = 2; + * @return The definedInMaterial. + */ + @java.lang.Override + public long getDefinedInMaterial() { + return definedInMaterial_; + } + + public static final int ENTRY_POINT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object entryPoint_ = ""; + /** + *
+   * String identifying the entry point into the build.
+   * This is often a path to a configuration file and/or a target label within
+   * that file. The syntax and meaning are defined by recipe.type. For example,
+   * if the recipe type were "make", then this would reference the directory in
+   * which to run make as well as which target to use.
+   * 
+ * + * string entry_point = 3; + * @return The entryPoint. + */ + @java.lang.Override + public java.lang.String getEntryPoint() { + java.lang.Object ref = entryPoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryPoint_ = s; + return s; + } + } + /** + *
+   * String identifying the entry point into the build.
+   * This is often a path to a configuration file and/or a target label within
+   * that file. The syntax and meaning are defined by recipe.type. For example,
+   * if the recipe type were "make", then this would reference the directory in
+   * which to run make as well as which target to use.
+   * 
+ * + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEntryPointBytes() { + java.lang.Object ref = entryPoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entryPoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARGUMENTS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List arguments_; + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + @java.lang.Override + public java.util.List getArgumentsList() { + return arguments_; + } + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + @java.lang.Override + public java.util.List + getArgumentsOrBuilderList() { + return arguments_; + } + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + @java.lang.Override + public int getArgumentsCount() { + return arguments_.size(); + } + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + @java.lang.Override + public com.google.protobuf.Any getArguments(int index) { + return arguments_.get(index); + } + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder( + int index) { + return arguments_.get(index); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List environment_; + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + @java.lang.Override + public java.util.List getEnvironmentList() { + return environment_; + } + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + @java.lang.Override + public java.util.List + getEnvironmentOrBuilderList() { + return environment_; + } + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + @java.lang.Override + public int getEnvironmentCount() { + return environment_.size(); + } + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + @java.lang.Override + public com.google.protobuf.Any getEnvironment(int index) { + return environment_.get(index); + } + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder( + int index) { + return environment_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (definedInMaterial_ != 0L) { + output.writeInt64(2, definedInMaterial_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entryPoint_); + } + for (int i = 0; i < arguments_.size(); i++) { + output.writeMessage(4, arguments_.get(i)); + } + for (int i = 0; i < environment_.size(); i++) { + output.writeMessage(5, environment_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (definedInMaterial_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, definedInMaterial_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entryPoint_); + } + for (int i = 0; i < arguments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, arguments_.get(i)); + } + for (int i = 0; i < environment_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, environment_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Recipe)) { + return super.equals(obj); + } + io.grafeas.v1.Recipe other = (io.grafeas.v1.Recipe) obj; + + if (!getType() + .equals(other.getType())) return false; + if (getDefinedInMaterial() + != other.getDefinedInMaterial()) return false; + if (!getEntryPoint() + .equals(other.getEntryPoint())) return false; + if (!getArgumentsList() + .equals(other.getArgumentsList())) return false; + if (!getEnvironmentList() + .equals(other.getEnvironmentList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + DEFINED_IN_MATERIAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDefinedInMaterial()); + hash = (37 * hash) + ENTRY_POINT_FIELD_NUMBER; + hash = (53 * hash) + getEntryPoint().hashCode(); + if (getArgumentsCount() > 0) { + hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getArgumentsList().hashCode(); + } + if (getEnvironmentCount() > 0) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironmentList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Recipe parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Recipe parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Recipe parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Recipe parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Recipe parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Recipe parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Recipe parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Recipe parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Recipe parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Recipe parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Recipe parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Recipe parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Recipe prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Steps taken to build the artifact.
+   * For a TaskRun, typically each container corresponds to one step in the
+   * recipe.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Recipe} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Recipe) + io.grafeas.v1.RecipeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Recipe.class, io.grafeas.v1.Recipe.Builder.class); + } + + // Construct using io.grafeas.v1.Recipe.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + definedInMaterial_ = 0L; + entryPoint_ = ""; + if (argumentsBuilder_ == null) { + arguments_ = java.util.Collections.emptyList(); + } else { + arguments_ = null; + argumentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (environmentBuilder_ == null) { + environment_ = java.util.Collections.emptyList(); + } else { + environment_ = null; + environmentBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Recipe getDefaultInstanceForType() { + return io.grafeas.v1.Recipe.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Recipe build() { + io.grafeas.v1.Recipe result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Recipe buildPartial() { + io.grafeas.v1.Recipe result = new io.grafeas.v1.Recipe(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.Recipe result) { + if (argumentsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + arguments_ = java.util.Collections.unmodifiableList(arguments_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.arguments_ = arguments_; + } else { + result.arguments_ = argumentsBuilder_.build(); + } + if (environmentBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + environment_ = java.util.Collections.unmodifiableList(environment_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.environment_ = environment_; + } else { + result.environment_ = environmentBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.Recipe result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.definedInMaterial_ = definedInMaterial_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.entryPoint_ = entryPoint_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Recipe) { + return mergeFrom((io.grafeas.v1.Recipe)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Recipe other) { + if (other == io.grafeas.v1.Recipe.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getDefinedInMaterial() != 0L) { + setDefinedInMaterial(other.getDefinedInMaterial()); + } + if (!other.getEntryPoint().isEmpty()) { + entryPoint_ = other.entryPoint_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (argumentsBuilder_ == null) { + if (!other.arguments_.isEmpty()) { + if (arguments_.isEmpty()) { + arguments_ = other.arguments_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureArgumentsIsMutable(); + arguments_.addAll(other.arguments_); + } + onChanged(); + } + } else { + if (!other.arguments_.isEmpty()) { + if (argumentsBuilder_.isEmpty()) { + argumentsBuilder_.dispose(); + argumentsBuilder_ = null; + arguments_ = other.arguments_; + bitField0_ = (bitField0_ & ~0x00000008); + argumentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getArgumentsFieldBuilder() : null; + } else { + argumentsBuilder_.addAllMessages(other.arguments_); + } + } + } + if (environmentBuilder_ == null) { + if (!other.environment_.isEmpty()) { + if (environment_.isEmpty()) { + environment_ = other.environment_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureEnvironmentIsMutable(); + environment_.addAll(other.environment_); + } + onChanged(); + } + } else { + if (!other.environment_.isEmpty()) { + if (environmentBuilder_.isEmpty()) { + environmentBuilder_.dispose(); + environmentBuilder_ = null; + environment_ = other.environment_; + bitField0_ = (bitField0_ & ~0x00000010); + environmentBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEnvironmentFieldBuilder() : null; + } else { + environmentBuilder_.addAllMessages(other.environment_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + definedInMaterial_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + entryPoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.google.protobuf.Any m = + input.readMessage( + com.google.protobuf.Any.parser(), + extensionRegistry); + if (argumentsBuilder_ == null) { + ensureArgumentsIsMutable(); + arguments_.add(m); + } else { + argumentsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + com.google.protobuf.Any m = + input.readMessage( + com.google.protobuf.Any.parser(), + extensionRegistry); + if (environmentBuilder_ == null) { + ensureEnvironmentIsMutable(); + environment_.add(m); + } else { + environmentBuilder_.addMessage(m); + } + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + *
+     * URI indicating what type of recipe was performed. It determines the meaning
+     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+     * 
+ * + * string type = 1; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * URI indicating what type of recipe was performed. It determines the meaning
+     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+     * 
+ * + * string type = 1; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * URI indicating what type of recipe was performed. It determines the meaning
+     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+     * 
+ * + * string type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * URI indicating what type of recipe was performed. It determines the meaning
+     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+     * 
+ * + * string type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * URI indicating what type of recipe was performed. It determines the meaning
+     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+     * 
+ * + * string type = 1; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long definedInMaterial_ ; + /** + *
+     * Index in materials containing the recipe steps that are not implied by
+     * recipe.type. For example, if the recipe type were "make", then this would
+     * point to the source containing the Makefile, not the make program itself.
+     * Set to -1 if the recipe doesn't come from a material, as zero is default
+     * unset value for int64.
+     * 
+ * + * int64 defined_in_material = 2; + * @return The definedInMaterial. + */ + @java.lang.Override + public long getDefinedInMaterial() { + return definedInMaterial_; + } + /** + *
+     * Index in materials containing the recipe steps that are not implied by
+     * recipe.type. For example, if the recipe type were "make", then this would
+     * point to the source containing the Makefile, not the make program itself.
+     * Set to -1 if the recipe doesn't come from a material, as zero is default
+     * unset value for int64.
+     * 
+ * + * int64 defined_in_material = 2; + * @param value The definedInMaterial to set. + * @return This builder for chaining. + */ + public Builder setDefinedInMaterial(long value) { + + definedInMaterial_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Index in materials containing the recipe steps that are not implied by
+     * recipe.type. For example, if the recipe type were "make", then this would
+     * point to the source containing the Makefile, not the make program itself.
+     * Set to -1 if the recipe doesn't come from a material, as zero is default
+     * unset value for int64.
+     * 
+ * + * int64 defined_in_material = 2; + * @return This builder for chaining. + */ + public Builder clearDefinedInMaterial() { + bitField0_ = (bitField0_ & ~0x00000002); + definedInMaterial_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object entryPoint_ = ""; + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For example,
+     * if the recipe type were "make", then this would reference the directory in
+     * which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @return The entryPoint. + */ + public java.lang.String getEntryPoint() { + java.lang.Object ref = entryPoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryPoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For example,
+     * if the recipe type were "make", then this would reference the directory in
+     * which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + public com.google.protobuf.ByteString + getEntryPointBytes() { + java.lang.Object ref = entryPoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entryPoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For example,
+     * if the recipe type were "make", then this would reference the directory in
+     * which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @param value The entryPoint to set. + * @return This builder for chaining. + */ + public Builder setEntryPoint( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + entryPoint_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For example,
+     * if the recipe type were "make", then this would reference the directory in
+     * which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @return This builder for chaining. + */ + public Builder clearEntryPoint() { + entryPoint_ = getDefaultInstance().getEntryPoint(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For example,
+     * if the recipe type were "make", then this would reference the directory in
+     * which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @param value The bytes for entryPoint to set. + * @return This builder for chaining. + */ + public Builder setEntryPointBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + entryPoint_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List arguments_ = + java.util.Collections.emptyList(); + private void ensureArgumentsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + arguments_ = new java.util.ArrayList(arguments_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> argumentsBuilder_; + + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public java.util.List getArgumentsList() { + if (argumentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(arguments_); + } else { + return argumentsBuilder_.getMessageList(); + } + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public int getArgumentsCount() { + if (argumentsBuilder_ == null) { + return arguments_.size(); + } else { + return argumentsBuilder_.getCount(); + } + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public com.google.protobuf.Any getArguments(int index) { + if (argumentsBuilder_ == null) { + return arguments_.get(index); + } else { + return argumentsBuilder_.getMessage(index); + } + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder setArguments( + int index, com.google.protobuf.Any value) { + if (argumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgumentsIsMutable(); + arguments_.set(index, value); + onChanged(); + } else { + argumentsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder setArguments( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (argumentsBuilder_ == null) { + ensureArgumentsIsMutable(); + arguments_.set(index, builderForValue.build()); + onChanged(); + } else { + argumentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder addArguments(com.google.protobuf.Any value) { + if (argumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgumentsIsMutable(); + arguments_.add(value); + onChanged(); + } else { + argumentsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder addArguments( + int index, com.google.protobuf.Any value) { + if (argumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgumentsIsMutable(); + arguments_.add(index, value); + onChanged(); + } else { + argumentsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder addArguments( + com.google.protobuf.Any.Builder builderForValue) { + if (argumentsBuilder_ == null) { + ensureArgumentsIsMutable(); + arguments_.add(builderForValue.build()); + onChanged(); + } else { + argumentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder addArguments( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (argumentsBuilder_ == null) { + ensureArgumentsIsMutable(); + arguments_.add(index, builderForValue.build()); + onChanged(); + } else { + argumentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder addAllArguments( + java.lang.Iterable values) { + if (argumentsBuilder_ == null) { + ensureArgumentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, arguments_); + onChanged(); + } else { + argumentsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder clearArguments() { + if (argumentsBuilder_ == null) { + arguments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + argumentsBuilder_.clear(); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public Builder removeArguments(int index) { + if (argumentsBuilder_ == null) { + ensureArgumentsIsMutable(); + arguments_.remove(index); + onChanged(); + } else { + argumentsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public com.google.protobuf.Any.Builder getArgumentsBuilder( + int index) { + return getArgumentsFieldBuilder().getBuilder(index); + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder( + int index) { + if (argumentsBuilder_ == null) { + return arguments_.get(index); } else { + return argumentsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public java.util.List + getArgumentsOrBuilderList() { + if (argumentsBuilder_ != null) { + return argumentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(arguments_); + } + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public com.google.protobuf.Any.Builder addArgumentsBuilder() { + return getArgumentsFieldBuilder().addBuilder( + com.google.protobuf.Any.getDefaultInstance()); + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public com.google.protobuf.Any.Builder addArgumentsBuilder( + int index) { + return getArgumentsFieldBuilder().addBuilder( + index, com.google.protobuf.Any.getDefaultInstance()); + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+     * type were "make", then this might be the flags passed to make aside from
+     * the target, which is captured in recipe.entryPoint. Since the arguments
+     * field can greatly vary in structure, depending on the builder and recipe
+     * type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + public java.util.List + getArgumentsBuilderList() { + return getArgumentsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getArgumentsFieldBuilder() { + if (argumentsBuilder_ == null) { + argumentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + arguments_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + arguments_ = null; + } + return argumentsBuilder_; + } + + private java.util.List environment_ = + java.util.Collections.emptyList(); + private void ensureEnvironmentIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + environment_ = new java.util.ArrayList(environment_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> environmentBuilder_; + + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public java.util.List getEnvironmentList() { + if (environmentBuilder_ == null) { + return java.util.Collections.unmodifiableList(environment_); + } else { + return environmentBuilder_.getMessageList(); + } + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public int getEnvironmentCount() { + if (environmentBuilder_ == null) { + return environment_.size(); + } else { + return environmentBuilder_.getCount(); + } + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public com.google.protobuf.Any getEnvironment(int index) { + if (environmentBuilder_ == null) { + return environment_.get(index); + } else { + return environmentBuilder_.getMessage(index); + } + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder setEnvironment( + int index, com.google.protobuf.Any value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentIsMutable(); + environment_.set(index, value); + onChanged(); + } else { + environmentBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder setEnvironment( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (environmentBuilder_ == null) { + ensureEnvironmentIsMutable(); + environment_.set(index, builderForValue.build()); + onChanged(); + } else { + environmentBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder addEnvironment(com.google.protobuf.Any value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentIsMutable(); + environment_.add(value); + onChanged(); + } else { + environmentBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder addEnvironment( + int index, com.google.protobuf.Any value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentIsMutable(); + environment_.add(index, value); + onChanged(); + } else { + environmentBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder addEnvironment( + com.google.protobuf.Any.Builder builderForValue) { + if (environmentBuilder_ == null) { + ensureEnvironmentIsMutable(); + environment_.add(builderForValue.build()); + onChanged(); + } else { + environmentBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder addEnvironment( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (environmentBuilder_ == null) { + ensureEnvironmentIsMutable(); + environment_.add(index, builderForValue.build()); + onChanged(); + } else { + environmentBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder addAllEnvironment( + java.lang.Iterable values) { + if (environmentBuilder_ == null) { + ensureEnvironmentIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, environment_); + onChanged(); + } else { + environmentBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder clearEnvironment() { + if (environmentBuilder_ == null) { + environment_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + environmentBuilder_.clear(); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public Builder removeEnvironment(int index) { + if (environmentBuilder_ == null) { + ensureEnvironmentIsMutable(); + environment_.remove(index); + onChanged(); + } else { + environmentBuilder_.remove(index); + } + return this; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public com.google.protobuf.Any.Builder getEnvironmentBuilder( + int index) { + return getEnvironmentFieldBuilder().getBuilder(index); + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder( + int index) { + if (environmentBuilder_ == null) { + return environment_.get(index); } else { + return environmentBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public java.util.List + getEnvironmentOrBuilderList() { + if (environmentBuilder_ != null) { + return environmentBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(environment_); + } + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public com.google.protobuf.Any.Builder addEnvironmentBuilder() { + return getEnvironmentFieldBuilder().addBuilder( + com.google.protobuf.Any.getDefaultInstance()); + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public com.google.protobuf.Any.Builder addEnvironmentBuilder( + int index) { + return getEnvironmentFieldBuilder().addBuilder( + index, com.google.protobuf.Any.getDefaultInstance()); + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating the
+     * recipe. Usually only needed for reproducing the build but not evaluated as
+     * part of policy. Since the environment field can greatly vary in structure,
+     * depending on the builder and recipe type, this is of form "Any".
+     * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + public java.util.List + getEnvironmentBuilderList() { + return getEnvironmentFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getEnvironmentFieldBuilder() { + if (environmentBuilder_ == null) { + environmentBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + environment_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + environment_ = null; + } + return environmentBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Recipe) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Recipe) + private static final io.grafeas.v1.Recipe DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Recipe(); + } + + public static io.grafeas.v1.Recipe getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Recipe parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Recipe getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java new file mode 100644 index 000000000000..c45233e0a691 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java @@ -0,0 +1,201 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_provenance.proto + +package io.grafeas.v1; + +public interface RecipeOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Recipe) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * URI indicating what type of recipe was performed. It determines the meaning
+   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+   * 
+ * + * string type = 1; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * URI indicating what type of recipe was performed. It determines the meaning
+   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
+   * 
+ * + * string type = 1; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+   * Index in materials containing the recipe steps that are not implied by
+   * recipe.type. For example, if the recipe type were "make", then this would
+   * point to the source containing the Makefile, not the make program itself.
+   * Set to -1 if the recipe doesn't come from a material, as zero is default
+   * unset value for int64.
+   * 
+ * + * int64 defined_in_material = 2; + * @return The definedInMaterial. + */ + long getDefinedInMaterial(); + + /** + *
+   * String identifying the entry point into the build.
+   * This is often a path to a configuration file and/or a target label within
+   * that file. The syntax and meaning are defined by recipe.type. For example,
+   * if the recipe type were "make", then this would reference the directory in
+   * which to run make as well as which target to use.
+   * 
+ * + * string entry_point = 3; + * @return The entryPoint. + */ + java.lang.String getEntryPoint(); + /** + *
+   * String identifying the entry point into the build.
+   * This is often a path to a configuration file and/or a target label within
+   * that file. The syntax and meaning are defined by recipe.type. For example,
+   * if the recipe type were "make", then this would reference the directory in
+   * which to run make as well as which target to use.
+   * 
+ * + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + com.google.protobuf.ByteString + getEntryPointBytes(); + + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + java.util.List + getArgumentsList(); + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + com.google.protobuf.Any getArguments(int index); + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + int getArgumentsCount(); + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + java.util.List + getArgumentsOrBuilderList(); + /** + *
+   * Collection of all external inputs that influenced the build on top of
+   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
+   * type were "make", then this might be the flags passed to make aside from
+   * the target, which is captured in recipe.entryPoint. Since the arguments
+   * field can greatly vary in structure, depending on the builder and recipe
+   * type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any arguments = 4; + */ + com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder( + int index); + + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + java.util.List + getEnvironmentList(); + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + com.google.protobuf.Any getEnvironment(int index); + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + int getEnvironmentCount(); + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + java.util.List + getEnvironmentOrBuilderList(); + /** + *
+   * Any other builder-controlled inputs necessary for correctly evaluating the
+   * recipe. Usually only needed for reproducing the build but not evaluated as
+   * part of policy. Since the environment field can greatly vary in structure,
+   * depending on the builder and recipe type, this is of form "Any".
+   * 
+ * + * repeated .google.protobuf.Any environment = 5; + */ + com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java new file mode 100644 index 000000000000..6f36de79b4d2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java @@ -0,0 +1,744 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + *
+ * Metadata for any related URL information.
+ * 
+ * + * Protobuf type {@code grafeas.v1.RelatedUrl} + */ +public final class RelatedUrl extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.RelatedUrl) + RelatedUrlOrBuilder { +private static final long serialVersionUID = 0L; + // Use RelatedUrl.newBuilder() to construct. + private RelatedUrl(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RelatedUrl() { + url_ = ""; + label_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RelatedUrl(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.RelatedUrl.class, io.grafeas.v1.RelatedUrl.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+   * Specific URL associated with the resource.
+   * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+   * Specific URL associated with the resource.
+   * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABEL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object label_ = ""; + /** + *
+   * Label to describe usage of the URL.
+   * 
+ * + * string label = 2; + * @return The label. + */ + @java.lang.Override + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } + } + /** + *
+   * Label to describe usage of the URL.
+   * 
+ * + * string label = 2; + * @return The bytes for label. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, label_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, label_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.RelatedUrl)) { + return super.equals(obj); + } + io.grafeas.v1.RelatedUrl other = (io.grafeas.v1.RelatedUrl) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getLabel() + .equals(other.getLabel())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.RelatedUrl parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.RelatedUrl parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.RelatedUrl parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.RelatedUrl parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.RelatedUrl parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.RelatedUrl parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.RelatedUrl parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.RelatedUrl parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.RelatedUrl parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.RelatedUrl parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.RelatedUrl parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.RelatedUrl parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.RelatedUrl prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Metadata for any related URL information.
+   * 
+ * + * Protobuf type {@code grafeas.v1.RelatedUrl} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.RelatedUrl) + io.grafeas.v1.RelatedUrlOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.RelatedUrl.class, io.grafeas.v1.RelatedUrl.Builder.class); + } + + // Construct using io.grafeas.v1.RelatedUrl.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + url_ = ""; + label_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.RelatedUrl getDefaultInstanceForType() { + return io.grafeas.v1.RelatedUrl.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.RelatedUrl build() { + io.grafeas.v1.RelatedUrl result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.RelatedUrl buildPartial() { + io.grafeas.v1.RelatedUrl result = new io.grafeas.v1.RelatedUrl(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.RelatedUrl result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.label_ = label_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.RelatedUrl) { + return mergeFrom((io.grafeas.v1.RelatedUrl)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.RelatedUrl other) { + if (other == io.grafeas.v1.RelatedUrl.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLabel().isEmpty()) { + label_ = other.label_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + label_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object url_ = ""; + /** + *
+     * Specific URL associated with the resource.
+     * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Specific URL associated with the resource.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Specific URL associated with the resource.
+     * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Specific URL associated with the resource.
+     * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Specific URL associated with the resource.
+     * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object label_ = ""; + /** + *
+     * Label to describe usage of the URL.
+     * 
+ * + * string label = 2; + * @return The label. + */ + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Label to describe usage of the URL.
+     * 
+ * + * string label = 2; + * @return The bytes for label. + */ + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Label to describe usage of the URL.
+     * 
+ * + * string label = 2; + * @param value The label to set. + * @return This builder for chaining. + */ + public Builder setLabel( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + label_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Label to describe usage of the URL.
+     * 
+ * + * string label = 2; + * @return This builder for chaining. + */ + public Builder clearLabel() { + label_ = getDefaultInstance().getLabel(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Label to describe usage of the URL.
+     * 
+ * + * string label = 2; + * @param value The bytes for label to set. + * @return This builder for chaining. + */ + public Builder setLabelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + label_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.RelatedUrl) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.RelatedUrl) + private static final io.grafeas.v1.RelatedUrl DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.RelatedUrl(); + } + + public static io.grafeas.v1.RelatedUrl getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelatedUrl parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.RelatedUrl getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java new file mode 100644 index 000000000000..f90406db3f4f --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public interface RelatedUrlOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.RelatedUrl) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Specific URL associated with the resource.
+   * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+   * Specific URL associated with the resource.
+   * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+   * Label to describe usage of the URL.
+   * 
+ * + * string label = 2; + * @return The label. + */ + java.lang.String getLabel(); + /** + *
+   * Label to describe usage of the URL.
+   * 
+ * + * string label = 2; + * @return The bytes for label. + */ + com.google.protobuf.ByteString + getLabelBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java new file mode 100644 index 000000000000..0ee53da9cea2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java @@ -0,0 +1,955 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * A unique identifier for a Cloud Repo.
+ * 
+ * + * Protobuf type {@code grafeas.v1.RepoId} + */ +public final class RepoId extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.RepoId) + RepoIdOrBuilder { +private static final long serialVersionUID = 0L; + // Use RepoId.newBuilder() to construct. + private RepoId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RepoId() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RepoId(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.RepoId.class, io.grafeas.v1.RepoId.Builder.class); + } + + private int idCase_ = 0; + private java.lang.Object id_; + public enum IdCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PROJECT_REPO_ID(1), + UID(2), + ID_NOT_SET(0); + private final int value; + private IdCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IdCase valueOf(int value) { + return forNumber(value); + } + + public static IdCase forNumber(int value) { + switch (value) { + case 1: return PROJECT_REPO_ID; + case 2: return UID; + case 0: return ID_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public IdCase + getIdCase() { + return IdCase.forNumber( + idCase_); + } + + public static final int PROJECT_REPO_ID_FIELD_NUMBER = 1; + /** + *
+   * A combination of a project ID and a repo name.
+   * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + * @return Whether the projectRepoId field is set. + */ + @java.lang.Override + public boolean hasProjectRepoId() { + return idCase_ == 1; + } + /** + *
+   * A combination of a project ID and a repo name.
+   * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + * @return The projectRepoId. + */ + @java.lang.Override + public io.grafeas.v1.ProjectRepoId getProjectRepoId() { + if (idCase_ == 1) { + return (io.grafeas.v1.ProjectRepoId) id_; + } + return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); + } + /** + *
+   * A combination of a project ID and a repo name.
+   * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + @java.lang.Override + public io.grafeas.v1.ProjectRepoIdOrBuilder getProjectRepoIdOrBuilder() { + if (idCase_ == 1) { + return (io.grafeas.v1.ProjectRepoId) id_; + } + return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); + } + + public static final int UID_FIELD_NUMBER = 2; + /** + *
+   * A server-assigned, globally unique identifier.
+   * 
+ * + * string uid = 2; + * @return Whether the uid field is set. + */ + public boolean hasUid() { + return idCase_ == 2; + } + /** + *
+   * A server-assigned, globally unique identifier.
+   * 
+ * + * string uid = 2; + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 2) { + id_ = s; + } + return s; + } + } + /** + *
+   * A server-assigned, globally unique identifier.
+   * 
+ * + * string uid = 2; + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (idCase_ == 2) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (idCase_ == 1) { + output.writeMessage(1, (io.grafeas.v1.ProjectRepoId) id_); + } + if (idCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (idCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (io.grafeas.v1.ProjectRepoId) id_); + } + if (idCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.RepoId)) { + return super.equals(obj); + } + io.grafeas.v1.RepoId other = (io.grafeas.v1.RepoId) obj; + + if (!getIdCase().equals(other.getIdCase())) return false; + switch (idCase_) { + case 1: + if (!getProjectRepoId() + .equals(other.getProjectRepoId())) return false; + break; + case 2: + if (!getUid() + .equals(other.getUid())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (idCase_) { + case 1: + hash = (37 * hash) + PROJECT_REPO_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectRepoId().hashCode(); + break; + case 2: + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.RepoId parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.RepoId parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.RepoId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.RepoId parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.RepoId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.RepoId parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.RepoId parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.RepoId parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.RepoId parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.RepoId parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.RepoId parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.RepoId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.RepoId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A unique identifier for a Cloud Repo.
+   * 
+ * + * Protobuf type {@code grafeas.v1.RepoId} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.RepoId) + io.grafeas.v1.RepoIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.RepoId.class, io.grafeas.v1.RepoId.Builder.class); + } + + // Construct using io.grafeas.v1.RepoId.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (projectRepoIdBuilder_ != null) { + projectRepoIdBuilder_.clear(); + } + idCase_ = 0; + id_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.RepoId getDefaultInstanceForType() { + return io.grafeas.v1.RepoId.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.RepoId build() { + io.grafeas.v1.RepoId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.RepoId buildPartial() { + io.grafeas.v1.RepoId result = new io.grafeas.v1.RepoId(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.RepoId result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(io.grafeas.v1.RepoId result) { + result.idCase_ = idCase_; + result.id_ = this.id_; + if (idCase_ == 1 && + projectRepoIdBuilder_ != null) { + result.id_ = projectRepoIdBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.RepoId) { + return mergeFrom((io.grafeas.v1.RepoId)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.RepoId other) { + if (other == io.grafeas.v1.RepoId.getDefaultInstance()) return this; + switch (other.getIdCase()) { + case PROJECT_REPO_ID: { + mergeProjectRepoId(other.getProjectRepoId()); + break; + } + case UID: { + idCase_ = 2; + id_ = other.id_; + onChanged(); + break; + } + case ID_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getProjectRepoIdFieldBuilder().getBuilder(), + extensionRegistry); + idCase_ = 1; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + idCase_ = 2; + id_ = s; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int idCase_ = 0; + private java.lang.Object id_; + public IdCase + getIdCase() { + return IdCase.forNumber( + idCase_); + } + + public Builder clearId() { + idCase_ = 0; + id_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ProjectRepoId, io.grafeas.v1.ProjectRepoId.Builder, io.grafeas.v1.ProjectRepoIdOrBuilder> projectRepoIdBuilder_; + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + * @return Whether the projectRepoId field is set. + */ + @java.lang.Override + public boolean hasProjectRepoId() { + return idCase_ == 1; + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + * @return The projectRepoId. + */ + @java.lang.Override + public io.grafeas.v1.ProjectRepoId getProjectRepoId() { + if (projectRepoIdBuilder_ == null) { + if (idCase_ == 1) { + return (io.grafeas.v1.ProjectRepoId) id_; + } + return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); + } else { + if (idCase_ == 1) { + return projectRepoIdBuilder_.getMessage(); + } + return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); + } + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + public Builder setProjectRepoId(io.grafeas.v1.ProjectRepoId value) { + if (projectRepoIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + onChanged(); + } else { + projectRepoIdBuilder_.setMessage(value); + } + idCase_ = 1; + return this; + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + public Builder setProjectRepoId( + io.grafeas.v1.ProjectRepoId.Builder builderForValue) { + if (projectRepoIdBuilder_ == null) { + id_ = builderForValue.build(); + onChanged(); + } else { + projectRepoIdBuilder_.setMessage(builderForValue.build()); + } + idCase_ = 1; + return this; + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + public Builder mergeProjectRepoId(io.grafeas.v1.ProjectRepoId value) { + if (projectRepoIdBuilder_ == null) { + if (idCase_ == 1 && + id_ != io.grafeas.v1.ProjectRepoId.getDefaultInstance()) { + id_ = io.grafeas.v1.ProjectRepoId.newBuilder((io.grafeas.v1.ProjectRepoId) id_) + .mergeFrom(value).buildPartial(); + } else { + id_ = value; + } + onChanged(); + } else { + if (idCase_ == 1) { + projectRepoIdBuilder_.mergeFrom(value); + } else { + projectRepoIdBuilder_.setMessage(value); + } + } + idCase_ = 1; + return this; + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + public Builder clearProjectRepoId() { + if (projectRepoIdBuilder_ == null) { + if (idCase_ == 1) { + idCase_ = 0; + id_ = null; + onChanged(); + } + } else { + if (idCase_ == 1) { + idCase_ = 0; + id_ = null; + } + projectRepoIdBuilder_.clear(); + } + return this; + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + public io.grafeas.v1.ProjectRepoId.Builder getProjectRepoIdBuilder() { + return getProjectRepoIdFieldBuilder().getBuilder(); + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + @java.lang.Override + public io.grafeas.v1.ProjectRepoIdOrBuilder getProjectRepoIdOrBuilder() { + if ((idCase_ == 1) && (projectRepoIdBuilder_ != null)) { + return projectRepoIdBuilder_.getMessageOrBuilder(); + } else { + if (idCase_ == 1) { + return (io.grafeas.v1.ProjectRepoId) id_; + } + return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); + } + } + /** + *
+     * A combination of a project ID and a repo name.
+     * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ProjectRepoId, io.grafeas.v1.ProjectRepoId.Builder, io.grafeas.v1.ProjectRepoIdOrBuilder> + getProjectRepoIdFieldBuilder() { + if (projectRepoIdBuilder_ == null) { + if (!(idCase_ == 1)) { + id_ = io.grafeas.v1.ProjectRepoId.getDefaultInstance(); + } + projectRepoIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.ProjectRepoId, io.grafeas.v1.ProjectRepoId.Builder, io.grafeas.v1.ProjectRepoIdOrBuilder>( + (io.grafeas.v1.ProjectRepoId) id_, + getParentForChildren(), + isClean()); + id_ = null; + } + idCase_ = 1; + onChanged(); + return projectRepoIdBuilder_; + } + + /** + *
+     * A server-assigned, globally unique identifier.
+     * 
+ * + * string uid = 2; + * @return Whether the uid field is set. + */ + @java.lang.Override + public boolean hasUid() { + return idCase_ == 2; + } + /** + *
+     * A server-assigned, globally unique identifier.
+     * 
+ * + * string uid = 2; + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 2) { + id_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A server-assigned, globally unique identifier.
+     * 
+ * + * string uid = 2; + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (idCase_ == 2) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A server-assigned, globally unique identifier.
+     * 
+ * + * string uid = 2; + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + idCase_ = 2; + id_ = value; + onChanged(); + return this; + } + /** + *
+     * A server-assigned, globally unique identifier.
+     * 
+ * + * string uid = 2; + * @return This builder for chaining. + */ + public Builder clearUid() { + if (idCase_ == 2) { + idCase_ = 0; + id_ = null; + onChanged(); + } + return this; + } + /** + *
+     * A server-assigned, globally unique identifier.
+     * 
+ * + * string uid = 2; + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + idCase_ = 2; + id_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.RepoId) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.RepoId) + private static final io.grafeas.v1.RepoId DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.RepoId(); + } + + public static io.grafeas.v1.RepoId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RepoId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.RepoId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java new file mode 100644 index 000000000000..0bc7c33ef942 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java @@ -0,0 +1,67 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface RepoIdOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.RepoId) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A combination of a project ID and a repo name.
+   * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + * @return Whether the projectRepoId field is set. + */ + boolean hasProjectRepoId(); + /** + *
+   * A combination of a project ID and a repo name.
+   * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + * @return The projectRepoId. + */ + io.grafeas.v1.ProjectRepoId getProjectRepoId(); + /** + *
+   * A combination of a project ID and a repo name.
+   * 
+ * + * .grafeas.v1.ProjectRepoId project_repo_id = 1; + */ + io.grafeas.v1.ProjectRepoIdOrBuilder getProjectRepoIdOrBuilder(); + + /** + *
+   * A server-assigned, globally unique identifier.
+   * 
+ * + * string uid = 2; + * @return Whether the uid field is set. + */ + boolean hasUid(); + /** + *
+   * A server-assigned, globally unique identifier.
+   * 
+ * + * string uid = 2; + * @return The uid. + */ + java.lang.String getUid(); + /** + *
+   * A server-assigned, globally unique identifier.
+   * 
+ * + * string uid = 2; + * @return The bytes for uid. + */ + com.google.protobuf.ByteString + getUidBytes(); + + public io.grafeas.v1.RepoId.IdCase getIdCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java new file mode 100644 index 000000000000..5201a5381fd1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java @@ -0,0 +1,201 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/severity.proto + +package io.grafeas.v1; + +/** + *
+ * Note provider assigned severity/impact ranking.
+ * 
+ * + * Protobuf enum {@code grafeas.v1.Severity} + */ +public enum Severity + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unknown.
+   * 
+ * + * SEVERITY_UNSPECIFIED = 0; + */ + SEVERITY_UNSPECIFIED(0), + /** + *
+   * Minimal severity.
+   * 
+ * + * MINIMAL = 1; + */ + MINIMAL(1), + /** + *
+   * Low severity.
+   * 
+ * + * LOW = 2; + */ + LOW(2), + /** + *
+   * Medium severity.
+   * 
+ * + * MEDIUM = 3; + */ + MEDIUM(3), + /** + *
+   * High severity.
+   * 
+ * + * HIGH = 4; + */ + HIGH(4), + /** + *
+   * Critical severity.
+   * 
+ * + * CRITICAL = 5; + */ + CRITICAL(5), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unknown.
+   * 
+ * + * SEVERITY_UNSPECIFIED = 0; + */ + public static final int SEVERITY_UNSPECIFIED_VALUE = 0; + /** + *
+   * Minimal severity.
+   * 
+ * + * MINIMAL = 1; + */ + public static final int MINIMAL_VALUE = 1; + /** + *
+   * Low severity.
+   * 
+ * + * LOW = 2; + */ + public static final int LOW_VALUE = 2; + /** + *
+   * Medium severity.
+   * 
+ * + * MEDIUM = 3; + */ + public static final int MEDIUM_VALUE = 3; + /** + *
+   * High severity.
+   * 
+ * + * HIGH = 4; + */ + public static final int HIGH_VALUE = 4; + /** + *
+   * Critical severity.
+   * 
+ * + * CRITICAL = 5; + */ + public static final int CRITICAL_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Severity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Severity forNumber(int value) { + switch (value) { + case 0: return SEVERITY_UNSPECIFIED; + case 1: return MINIMAL; + case 2: return LOW; + case 3: return MEDIUM; + case 4: return HIGH; + case 5: return CRITICAL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Severity> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Severity findValueByNumber(int number) { + return Severity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.SeverityOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final Severity[] VALUES = values(); + + public static Severity valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Severity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.Severity) +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java new file mode 100644 index 000000000000..2181e45065aa --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java @@ -0,0 +1,40 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/severity.proto + +package io.grafeas.v1; + +public final class SeverityOuterClass { + private SeverityOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031grafeas/v1/severity.proto\022\ngrafeas.v1*" + + "^\n\010Severity\022\030\n\024SEVERITY_UNSPECIFIED\020\000\022\013\n" + + "\007MINIMAL\020\001\022\007\n\003LOW\020\002\022\n\n\006MEDIUM\020\003\022\010\n\004HIGH\020" + + "\004\022\014\n\010CRITICAL\020\005BQ\n\rio.grafeas.v1P\001Z8goog" + + "le.golang.org/genproto/googleapis/grafea" + + "s/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java new file mode 100644 index 000000000000..66964ee7bd73 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java @@ -0,0 +1,812 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +/** + *
+ * Verifiers (e.g. Kritis implementations) MUST verify signatures
+ * with respect to the trust anchors defined in policy (e.g. a Kritis policy).
+ * Typically this means that the verifier has been configured with a map from
+ * `public_key_id` to public key material (and any required parameters, e.g.
+ * signing algorithm).
+ * In particular, verification implementations MUST NOT treat the signature
+ * `public_key_id` as anything more than a key lookup hint. The `public_key_id`
+ * DOES NOT validate or authenticate a public key; it only provides a mechanism
+ * for quickly selecting a public key ALREADY CONFIGURED on the verifier through
+ * a trusted channel. Verification implementations MUST reject signatures in any
+ * of the following circumstances:
+ *   * The `public_key_id` is not recognized by the verifier.
+ *   * The public key that `public_key_id` refers to does not verify the
+ *     signature with respect to the payload.
+ * The `signature` contents SHOULD NOT be "attached" (where the payload is
+ * included with the serialized `signature` bytes). Verifiers MUST ignore any
+ * "attached" payload and only verify signatures with respect to explicitly
+ * provided payload (e.g. a `payload` field on the proto message that holds
+ * this Signature, or the canonical serialization of the proto message that
+ * holds this signature).
+ * 
+ * + * Protobuf type {@code grafeas.v1.Signature} + */ +public final class Signature extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Signature) + SignatureOrBuilder { +private static final long serialVersionUID = 0L; + // Use Signature.newBuilder() to construct. + private Signature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Signature() { + signature_ = com.google.protobuf.ByteString.EMPTY; + publicKeyId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Signature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Signature.class, io.grafeas.v1.Signature.Builder.class); + } + + public static final int SIGNATURE_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+   * The content of the signature, an opaque bytestring.
+   * The payload that this signature verifies MUST be unambiguously provided
+   * with the Signature during verification. A wrapper message might provide
+   * the payload explicitly. Alternatively, a message might have a canonical
+   * serialization that can always be unambiguously computed to derive the
+   * payload.
+   * 
+ * + * bytes signature = 1; + * @return The signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSignature() { + return signature_; + } + + public static final int PUBLIC_KEY_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object publicKeyId_ = ""; + /** + *
+   * The identifier for the public key that verifies this signature.
+   *   * The `public_key_id` is required.
+   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+   *     such as a cryptographic digest.
+   * Examples of valid `public_key_id`s:
+   * OpenPGP V4 public key fingerprint:
+   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+   * details on this scheme.
+   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+   * serialization):
+   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+   * 
+ * + * string public_key_id = 2; + * @return The publicKeyId. + */ + @java.lang.Override + public java.lang.String getPublicKeyId() { + java.lang.Object ref = publicKeyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKeyId_ = s; + return s; + } + } + /** + *
+   * The identifier for the public key that verifies this signature.
+   *   * The `public_key_id` is required.
+   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+   *     such as a cryptographic digest.
+   * Examples of valid `public_key_id`s:
+   * OpenPGP V4 public key fingerprint:
+   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+   * details on this scheme.
+   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+   * serialization):
+   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+   * 
+ * + * string public_key_id = 2; + * @return The bytes for publicKeyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPublicKeyIdBytes() { + java.lang.Object ref = publicKeyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKeyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!signature_.isEmpty()) { + output.writeBytes(1, signature_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, publicKeyId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!signature_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, signature_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, publicKeyId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Signature)) { + return super.equals(obj); + } + io.grafeas.v1.Signature other = (io.grafeas.v1.Signature) obj; + + if (!getSignature() + .equals(other.getSignature())) return false; + if (!getPublicKeyId() + .equals(other.getPublicKeyId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getSignature().hashCode(); + hash = (37 * hash) + PUBLIC_KEY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPublicKeyId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Signature parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Signature parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Signature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Signature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Signature parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Signature parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Signature parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Signature parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Signature parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Signature parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Signature parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Signature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Signature prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Verifiers (e.g. Kritis implementations) MUST verify signatures
+   * with respect to the trust anchors defined in policy (e.g. a Kritis policy).
+   * Typically this means that the verifier has been configured with a map from
+   * `public_key_id` to public key material (and any required parameters, e.g.
+   * signing algorithm).
+   * In particular, verification implementations MUST NOT treat the signature
+   * `public_key_id` as anything more than a key lookup hint. The `public_key_id`
+   * DOES NOT validate or authenticate a public key; it only provides a mechanism
+   * for quickly selecting a public key ALREADY CONFIGURED on the verifier through
+   * a trusted channel. Verification implementations MUST reject signatures in any
+   * of the following circumstances:
+   *   * The `public_key_id` is not recognized by the verifier.
+   *   * The public key that `public_key_id` refers to does not verify the
+   *     signature with respect to the payload.
+   * The `signature` contents SHOULD NOT be "attached" (where the payload is
+   * included with the serialized `signature` bytes). Verifiers MUST ignore any
+   * "attached" payload and only verify signatures with respect to explicitly
+   * provided payload (e.g. a `payload` field on the proto message that holds
+   * this Signature, or the canonical serialization of the proto message that
+   * holds this signature).
+   * 
+ * + * Protobuf type {@code grafeas.v1.Signature} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Signature) + io.grafeas.v1.SignatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Signature.class, io.grafeas.v1.Signature.Builder.class); + } + + // Construct using io.grafeas.v1.Signature.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + signature_ = com.google.protobuf.ByteString.EMPTY; + publicKeyId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Signature getDefaultInstanceForType() { + return io.grafeas.v1.Signature.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Signature build() { + io.grafeas.v1.Signature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Signature buildPartial() { + io.grafeas.v1.Signature result = new io.grafeas.v1.Signature(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Signature result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.signature_ = signature_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.publicKeyId_ = publicKeyId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Signature) { + return mergeFrom((io.grafeas.v1.Signature)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Signature other) { + if (other == io.grafeas.v1.Signature.getDefaultInstance()) return this; + if (other.getSignature() != com.google.protobuf.ByteString.EMPTY) { + setSignature(other.getSignature()); + } + if (!other.getPublicKeyId().isEmpty()) { + publicKeyId_ = other.publicKeyId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + signature_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + publicKeyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * The content of the signature, an opaque bytestring.
+     * The payload that this signature verifies MUST be unambiguously provided
+     * with the Signature during verification. A wrapper message might provide
+     * the payload explicitly. Alternatively, a message might have a canonical
+     * serialization that can always be unambiguously computed to derive the
+     * payload.
+     * 
+ * + * bytes signature = 1; + * @return The signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSignature() { + return signature_; + } + /** + *
+     * The content of the signature, an opaque bytestring.
+     * The payload that this signature verifies MUST be unambiguously provided
+     * with the Signature during verification. A wrapper message might provide
+     * the payload explicitly. Alternatively, a message might have a canonical
+     * serialization that can always be unambiguously computed to derive the
+     * payload.
+     * 
+ * + * bytes signature = 1; + * @param value The signature to set. + * @return This builder for chaining. + */ + public Builder setSignature(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + signature_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The content of the signature, an opaque bytestring.
+     * The payload that this signature verifies MUST be unambiguously provided
+     * with the Signature during verification. A wrapper message might provide
+     * the payload explicitly. Alternatively, a message might have a canonical
+     * serialization that can always be unambiguously computed to derive the
+     * payload.
+     * 
+ * + * bytes signature = 1; + * @return This builder for chaining. + */ + public Builder clearSignature() { + bitField0_ = (bitField0_ & ~0x00000001); + signature_ = getDefaultInstance().getSignature(); + onChanged(); + return this; + } + + private java.lang.Object publicKeyId_ = ""; + /** + *
+     * The identifier for the public key that verifies this signature.
+     *   * The `public_key_id` is required.
+     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+     *     such as a cryptographic digest.
+     * Examples of valid `public_key_id`s:
+     * OpenPGP V4 public key fingerprint:
+     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+     * details on this scheme.
+     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+     * serialization):
+     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+     * 
+ * + * string public_key_id = 2; + * @return The publicKeyId. + */ + public java.lang.String getPublicKeyId() { + java.lang.Object ref = publicKeyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKeyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The identifier for the public key that verifies this signature.
+     *   * The `public_key_id` is required.
+     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+     *     such as a cryptographic digest.
+     * Examples of valid `public_key_id`s:
+     * OpenPGP V4 public key fingerprint:
+     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+     * details on this scheme.
+     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+     * serialization):
+     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+     * 
+ * + * string public_key_id = 2; + * @return The bytes for publicKeyId. + */ + public com.google.protobuf.ByteString + getPublicKeyIdBytes() { + java.lang.Object ref = publicKeyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKeyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The identifier for the public key that verifies this signature.
+     *   * The `public_key_id` is required.
+     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+     *     such as a cryptographic digest.
+     * Examples of valid `public_key_id`s:
+     * OpenPGP V4 public key fingerprint:
+     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+     * details on this scheme.
+     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+     * serialization):
+     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+     * 
+ * + * string public_key_id = 2; + * @param value The publicKeyId to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + publicKeyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The identifier for the public key that verifies this signature.
+     *   * The `public_key_id` is required.
+     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+     *     such as a cryptographic digest.
+     * Examples of valid `public_key_id`s:
+     * OpenPGP V4 public key fingerprint:
+     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+     * details on this scheme.
+     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+     * serialization):
+     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+     * 
+ * + * string public_key_id = 2; + * @return This builder for chaining. + */ + public Builder clearPublicKeyId() { + publicKeyId_ = getDefaultInstance().getPublicKeyId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The identifier for the public key that verifies this signature.
+     *   * The `public_key_id` is required.
+     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+     *     such as a cryptographic digest.
+     * Examples of valid `public_key_id`s:
+     * OpenPGP V4 public key fingerprint:
+     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+     * details on this scheme.
+     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+     * serialization):
+     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+     * 
+ * + * string public_key_id = 2; + * @param value The bytes for publicKeyId to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + publicKeyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Signature) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Signature) + private static final io.grafeas.v1.Signature DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Signature(); + } + + public static io.grafeas.v1.Signature getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Signature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Signature getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java new file mode 100644 index 000000000000..abe4d6a9a8d9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java @@ -0,0 +1,70 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/common.proto + +package io.grafeas.v1; + +public interface SignatureOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Signature) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The content of the signature, an opaque bytestring.
+   * The payload that this signature verifies MUST be unambiguously provided
+   * with the Signature during verification. A wrapper message might provide
+   * the payload explicitly. Alternatively, a message might have a canonical
+   * serialization that can always be unambiguously computed to derive the
+   * payload.
+   * 
+ * + * bytes signature = 1; + * @return The signature. + */ + com.google.protobuf.ByteString getSignature(); + + /** + *
+   * The identifier for the public key that verifies this signature.
+   *   * The `public_key_id` is required.
+   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+   *     such as a cryptographic digest.
+   * Examples of valid `public_key_id`s:
+   * OpenPGP V4 public key fingerprint:
+   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+   * details on this scheme.
+   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+   * serialization):
+   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+   * 
+ * + * string public_key_id = 2; + * @return The publicKeyId. + */ + java.lang.String getPublicKeyId(); + /** + *
+   * The identifier for the public key that verifies this signature.
+   *   * The `public_key_id` is required.
+   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
+   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
+   *     such as a cryptographic digest.
+   * Examples of valid `public_key_id`s:
+   * OpenPGP V4 public key fingerprint:
+   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
+   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+   * details on this scheme.
+   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
+   * serialization):
+   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
+   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+   * 
+ * + * string public_key_id = 2; + * @return The bytes for publicKeyId. + */ + com.google.protobuf.ByteString + getPublicKeyIdBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java new file mode 100644 index 000000000000..e4dd833a02bd --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java @@ -0,0 +1,6801 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/slsa_provenance.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.SlsaProvenance} + */ +public final class SlsaProvenance extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance) + SlsaProvenanceOrBuilder { +private static final long serialVersionUID = 0L; + // Use SlsaProvenance.newBuilder() to construct. + private SlsaProvenance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaProvenance() { + materials_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaProvenance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.class, io.grafeas.v1.SlsaProvenance.Builder.class); + } + + public interface SlsaRecipeOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaRecipe) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * URI indicating what type of recipe was performed. It determines the
+     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+     * materials.
+     * 
+ * + * string type = 1; + * @return The type. + */ + java.lang.String getType(); + /** + *
+     * URI indicating what type of recipe was performed. It determines the
+     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+     * materials.
+     * 
+ * + * string type = 1; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+     * Index in materials containing the recipe steps that are not implied by
+     * recipe.type. For example, if the recipe type were "make", then this would
+     * point to the source containing the Makefile, not the make program itself.
+     * Set to -1 if the recipe doesn't come from a material, as zero is default
+     * unset value for int64.
+     * 
+ * + * int64 defined_in_material = 2; + * @return The definedInMaterial. + */ + long getDefinedInMaterial(); + + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For
+     * example, if the recipe type were "make", then this would reference the
+     * directory in which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @return The entryPoint. + */ + java.lang.String getEntryPoint(); + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For
+     * example, if the recipe type were "make", then this would reference the
+     * directory in which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + com.google.protobuf.ByteString + getEntryPointBytes(); + + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+     * recipe type were "make", then this might be the flags passed to make
+     * aside from the target, which is captured in recipe.entryPoint. Depending
+     * on the recipe Type, the structure may be different.
+     * 
+ * + * .google.protobuf.Any arguments = 4; + * @return Whether the arguments field is set. + */ + boolean hasArguments(); + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+     * recipe type were "make", then this might be the flags passed to make
+     * aside from the target, which is captured in recipe.entryPoint. Depending
+     * on the recipe Type, the structure may be different.
+     * 
+ * + * .google.protobuf.Any arguments = 4; + * @return The arguments. + */ + com.google.protobuf.Any getArguments(); + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+     * recipe type were "make", then this might be the flags passed to make
+     * aside from the target, which is captured in recipe.entryPoint. Depending
+     * on the recipe Type, the structure may be different.
+     * 
+ * + * .google.protobuf.Any arguments = 4; + */ + com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder(); + + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating
+     * the recipe. Usually only needed for reproducing the build but not
+     * evaluated as part of policy. Depending on the recipe Type, the structure
+     * may be different.
+     * 
+ * + * .google.protobuf.Any environment = 5; + * @return Whether the environment field is set. + */ + boolean hasEnvironment(); + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating
+     * the recipe. Usually only needed for reproducing the build but not
+     * evaluated as part of policy. Depending on the recipe Type, the structure
+     * may be different.
+     * 
+ * + * .google.protobuf.Any environment = 5; + * @return The environment. + */ + com.google.protobuf.Any getEnvironment(); + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating
+     * the recipe. Usually only needed for reproducing the build but not
+     * evaluated as part of policy. Depending on the recipe Type, the structure
+     * may be different.
+     * 
+ * + * .google.protobuf.Any environment = 5; + */ + com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder(); + } + /** + *
+   * Steps taken to build the artifact.
+   * For a TaskRun, typically each container corresponds to one step in the
+   * recipe.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaRecipe} + */ + public static final class SlsaRecipe extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaRecipe) + SlsaRecipeOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaRecipe.newBuilder() to construct. + private SlsaRecipe(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaRecipe() { + type_ = ""; + entryPoint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaRecipe(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaRecipe.class, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + *
+     * URI indicating what type of recipe was performed. It determines the
+     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+     * materials.
+     * 
+ * + * string type = 1; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+     * URI indicating what type of recipe was performed. It determines the
+     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+     * materials.
+     * 
+ * + * string type = 1; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFINED_IN_MATERIAL_FIELD_NUMBER = 2; + private long definedInMaterial_ = 0L; + /** + *
+     * Index in materials containing the recipe steps that are not implied by
+     * recipe.type. For example, if the recipe type were "make", then this would
+     * point to the source containing the Makefile, not the make program itself.
+     * Set to -1 if the recipe doesn't come from a material, as zero is default
+     * unset value for int64.
+     * 
+ * + * int64 defined_in_material = 2; + * @return The definedInMaterial. + */ + @java.lang.Override + public long getDefinedInMaterial() { + return definedInMaterial_; + } + + public static final int ENTRY_POINT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object entryPoint_ = ""; + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For
+     * example, if the recipe type were "make", then this would reference the
+     * directory in which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @return The entryPoint. + */ + @java.lang.Override + public java.lang.String getEntryPoint() { + java.lang.Object ref = entryPoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryPoint_ = s; + return s; + } + } + /** + *
+     * String identifying the entry point into the build.
+     * This is often a path to a configuration file and/or a target label within
+     * that file. The syntax and meaning are defined by recipe.type. For
+     * example, if the recipe type were "make", then this would reference the
+     * directory in which to run make as well as which target to use.
+     * 
+ * + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEntryPointBytes() { + java.lang.Object ref = entryPoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entryPoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARGUMENTS_FIELD_NUMBER = 4; + private com.google.protobuf.Any arguments_; + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+     * recipe type were "make", then this might be the flags passed to make
+     * aside from the target, which is captured in recipe.entryPoint. Depending
+     * on the recipe Type, the structure may be different.
+     * 
+ * + * .google.protobuf.Any arguments = 4; + * @return Whether the arguments field is set. + */ + @java.lang.Override + public boolean hasArguments() { + return arguments_ != null; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+     * recipe type were "make", then this might be the flags passed to make
+     * aside from the target, which is captured in recipe.entryPoint. Depending
+     * on the recipe Type, the structure may be different.
+     * 
+ * + * .google.protobuf.Any arguments = 4; + * @return The arguments. + */ + @java.lang.Override + public com.google.protobuf.Any getArguments() { + return arguments_ == null ? com.google.protobuf.Any.getDefaultInstance() : arguments_; + } + /** + *
+     * Collection of all external inputs that influenced the build on top of
+     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+     * recipe type were "make", then this might be the flags passed to make
+     * aside from the target, which is captured in recipe.entryPoint. Depending
+     * on the recipe Type, the structure may be different.
+     * 
+ * + * .google.protobuf.Any arguments = 4; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder() { + return arguments_ == null ? com.google.protobuf.Any.getDefaultInstance() : arguments_; + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 5; + private com.google.protobuf.Any environment_; + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating
+     * the recipe. Usually only needed for reproducing the build but not
+     * evaluated as part of policy. Depending on the recipe Type, the structure
+     * may be different.
+     * 
+ * + * .google.protobuf.Any environment = 5; + * @return Whether the environment field is set. + */ + @java.lang.Override + public boolean hasEnvironment() { + return environment_ != null; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating
+     * the recipe. Usually only needed for reproducing the build but not
+     * evaluated as part of policy. Depending on the recipe Type, the structure
+     * may be different.
+     * 
+ * + * .google.protobuf.Any environment = 5; + * @return The environment. + */ + @java.lang.Override + public com.google.protobuf.Any getEnvironment() { + return environment_ == null ? com.google.protobuf.Any.getDefaultInstance() : environment_; + } + /** + *
+     * Any other builder-controlled inputs necessary for correctly evaluating
+     * the recipe. Usually only needed for reproducing the build but not
+     * evaluated as part of policy. Depending on the recipe Type, the structure
+     * may be different.
+     * 
+ * + * .google.protobuf.Any environment = 5; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder() { + return environment_ == null ? com.google.protobuf.Any.getDefaultInstance() : environment_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (definedInMaterial_ != 0L) { + output.writeInt64(2, definedInMaterial_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entryPoint_); + } + if (arguments_ != null) { + output.writeMessage(4, getArguments()); + } + if (environment_ != null) { + output.writeMessage(5, getEnvironment()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (definedInMaterial_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, definedInMaterial_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entryPoint_); + } + if (arguments_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getArguments()); + } + if (environment_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getEnvironment()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaRecipe)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenance.SlsaRecipe other = (io.grafeas.v1.SlsaProvenance.SlsaRecipe) obj; + + if (!getType() + .equals(other.getType())) return false; + if (getDefinedInMaterial() + != other.getDefinedInMaterial()) return false; + if (!getEntryPoint() + .equals(other.getEntryPoint())) return false; + if (hasArguments() != other.hasArguments()) return false; + if (hasArguments()) { + if (!getArguments() + .equals(other.getArguments())) return false; + } + if (hasEnvironment() != other.hasEnvironment()) return false; + if (hasEnvironment()) { + if (!getEnvironment() + .equals(other.getEnvironment())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + DEFINED_IN_MATERIAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDefinedInMaterial()); + hash = (37 * hash) + ENTRY_POINT_FIELD_NUMBER; + hash = (53 * hash) + getEntryPoint().hashCode(); + if (hasArguments()) { + hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getArguments().hashCode(); + } + if (hasEnvironment()) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaRecipe prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Steps taken to build the artifact.
+     * For a TaskRun, typically each container corresponds to one step in the
+     * recipe.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaRecipe} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaRecipe) + io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaRecipe.class, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenance.SlsaRecipe.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + definedInMaterial_ = 0L; + entryPoint_ = ""; + arguments_ = null; + if (argumentsBuilder_ != null) { + argumentsBuilder_.dispose(); + argumentsBuilder_ = null; + } + environment_ = null; + if (environmentBuilder_ != null) { + environmentBuilder_.dispose(); + environmentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaRecipe getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaRecipe build() { + io.grafeas.v1.SlsaProvenance.SlsaRecipe result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaRecipe buildPartial() { + io.grafeas.v1.SlsaProvenance.SlsaRecipe result = new io.grafeas.v1.SlsaProvenance.SlsaRecipe(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaRecipe result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.definedInMaterial_ = definedInMaterial_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.entryPoint_ = entryPoint_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.arguments_ = argumentsBuilder_ == null + ? arguments_ + : argumentsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.environment_ = environmentBuilder_ == null + ? environment_ + : environmentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaRecipe) { + return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaRecipe)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaRecipe other) { + if (other == io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getDefinedInMaterial() != 0L) { + setDefinedInMaterial(other.getDefinedInMaterial()); + } + if (!other.getEntryPoint().isEmpty()) { + entryPoint_ = other.entryPoint_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasArguments()) { + mergeArguments(other.getArguments()); + } + if (other.hasEnvironment()) { + mergeEnvironment(other.getEnvironment()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + definedInMaterial_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + entryPoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getArgumentsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getEnvironmentFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + *
+       * URI indicating what type of recipe was performed. It determines the
+       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+       * materials.
+       * 
+ * + * string type = 1; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * URI indicating what type of recipe was performed. It determines the
+       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+       * materials.
+       * 
+ * + * string type = 1; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * URI indicating what type of recipe was performed. It determines the
+       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+       * materials.
+       * 
+ * + * string type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * URI indicating what type of recipe was performed. It determines the
+       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+       * materials.
+       * 
+ * + * string type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * URI indicating what type of recipe was performed. It determines the
+       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
+       * materials.
+       * 
+ * + * string type = 1; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long definedInMaterial_ ; + /** + *
+       * Index in materials containing the recipe steps that are not implied by
+       * recipe.type. For example, if the recipe type were "make", then this would
+       * point to the source containing the Makefile, not the make program itself.
+       * Set to -1 if the recipe doesn't come from a material, as zero is default
+       * unset value for int64.
+       * 
+ * + * int64 defined_in_material = 2; + * @return The definedInMaterial. + */ + @java.lang.Override + public long getDefinedInMaterial() { + return definedInMaterial_; + } + /** + *
+       * Index in materials containing the recipe steps that are not implied by
+       * recipe.type. For example, if the recipe type were "make", then this would
+       * point to the source containing the Makefile, not the make program itself.
+       * Set to -1 if the recipe doesn't come from a material, as zero is default
+       * unset value for int64.
+       * 
+ * + * int64 defined_in_material = 2; + * @param value The definedInMaterial to set. + * @return This builder for chaining. + */ + public Builder setDefinedInMaterial(long value) { + + definedInMaterial_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Index in materials containing the recipe steps that are not implied by
+       * recipe.type. For example, if the recipe type were "make", then this would
+       * point to the source containing the Makefile, not the make program itself.
+       * Set to -1 if the recipe doesn't come from a material, as zero is default
+       * unset value for int64.
+       * 
+ * + * int64 defined_in_material = 2; + * @return This builder for chaining. + */ + public Builder clearDefinedInMaterial() { + bitField0_ = (bitField0_ & ~0x00000002); + definedInMaterial_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object entryPoint_ = ""; + /** + *
+       * String identifying the entry point into the build.
+       * This is often a path to a configuration file and/or a target label within
+       * that file. The syntax and meaning are defined by recipe.type. For
+       * example, if the recipe type were "make", then this would reference the
+       * directory in which to run make as well as which target to use.
+       * 
+ * + * string entry_point = 3; + * @return The entryPoint. + */ + public java.lang.String getEntryPoint() { + java.lang.Object ref = entryPoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryPoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * String identifying the entry point into the build.
+       * This is often a path to a configuration file and/or a target label within
+       * that file. The syntax and meaning are defined by recipe.type. For
+       * example, if the recipe type were "make", then this would reference the
+       * directory in which to run make as well as which target to use.
+       * 
+ * + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + public com.google.protobuf.ByteString + getEntryPointBytes() { + java.lang.Object ref = entryPoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entryPoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * String identifying the entry point into the build.
+       * This is often a path to a configuration file and/or a target label within
+       * that file. The syntax and meaning are defined by recipe.type. For
+       * example, if the recipe type were "make", then this would reference the
+       * directory in which to run make as well as which target to use.
+       * 
+ * + * string entry_point = 3; + * @param value The entryPoint to set. + * @return This builder for chaining. + */ + public Builder setEntryPoint( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + entryPoint_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * String identifying the entry point into the build.
+       * This is often a path to a configuration file and/or a target label within
+       * that file. The syntax and meaning are defined by recipe.type. For
+       * example, if the recipe type were "make", then this would reference the
+       * directory in which to run make as well as which target to use.
+       * 
+ * + * string entry_point = 3; + * @return This builder for chaining. + */ + public Builder clearEntryPoint() { + entryPoint_ = getDefaultInstance().getEntryPoint(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * String identifying the entry point into the build.
+       * This is often a path to a configuration file and/or a target label within
+       * that file. The syntax and meaning are defined by recipe.type. For
+       * example, if the recipe type were "make", then this would reference the
+       * directory in which to run make as well as which target to use.
+       * 
+ * + * string entry_point = 3; + * @param value The bytes for entryPoint to set. + * @return This builder for chaining. + */ + public Builder setEntryPointBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + entryPoint_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Any arguments_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> argumentsBuilder_; + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + * @return Whether the arguments field is set. + */ + public boolean hasArguments() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + * @return The arguments. + */ + public com.google.protobuf.Any getArguments() { + if (argumentsBuilder_ == null) { + return arguments_ == null ? com.google.protobuf.Any.getDefaultInstance() : arguments_; + } else { + return argumentsBuilder_.getMessage(); + } + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + */ + public Builder setArguments(com.google.protobuf.Any value) { + if (argumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + arguments_ = value; + } else { + argumentsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + */ + public Builder setArguments( + com.google.protobuf.Any.Builder builderForValue) { + if (argumentsBuilder_ == null) { + arguments_ = builderForValue.build(); + } else { + argumentsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + */ + public Builder mergeArguments(com.google.protobuf.Any value) { + if (argumentsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + arguments_ != null && + arguments_ != com.google.protobuf.Any.getDefaultInstance()) { + getArgumentsBuilder().mergeFrom(value); + } else { + arguments_ = value; + } + } else { + argumentsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + */ + public Builder clearArguments() { + bitField0_ = (bitField0_ & ~0x00000008); + arguments_ = null; + if (argumentsBuilder_ != null) { + argumentsBuilder_.dispose(); + argumentsBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + */ + public com.google.protobuf.Any.Builder getArgumentsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getArgumentsFieldBuilder().getBuilder(); + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + */ + public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder() { + if (argumentsBuilder_ != null) { + return argumentsBuilder_.getMessageOrBuilder(); + } else { + return arguments_ == null ? + com.google.protobuf.Any.getDefaultInstance() : arguments_; + } + } + /** + *
+       * Collection of all external inputs that influenced the build on top of
+       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
+       * recipe type were "make", then this might be the flags passed to make
+       * aside from the target, which is captured in recipe.entryPoint. Depending
+       * on the recipe Type, the structure may be different.
+       * 
+ * + * .google.protobuf.Any arguments = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getArgumentsFieldBuilder() { + if (argumentsBuilder_ == null) { + argumentsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getArguments(), + getParentForChildren(), + isClean()); + arguments_ = null; + } + return argumentsBuilder_; + } + + private com.google.protobuf.Any environment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> environmentBuilder_; + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + * @return Whether the environment field is set. + */ + public boolean hasEnvironment() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + * @return The environment. + */ + public com.google.protobuf.Any getEnvironment() { + if (environmentBuilder_ == null) { + return environment_ == null ? com.google.protobuf.Any.getDefaultInstance() : environment_; + } else { + return environmentBuilder_.getMessage(); + } + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + */ + public Builder setEnvironment(com.google.protobuf.Any value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + } else { + environmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + */ + public Builder setEnvironment( + com.google.protobuf.Any.Builder builderForValue) { + if (environmentBuilder_ == null) { + environment_ = builderForValue.build(); + } else { + environmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + */ + public Builder mergeEnvironment(com.google.protobuf.Any value) { + if (environmentBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + environment_ != null && + environment_ != com.google.protobuf.Any.getDefaultInstance()) { + getEnvironmentBuilder().mergeFrom(value); + } else { + environment_ = value; + } + } else { + environmentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + */ + public Builder clearEnvironment() { + bitField0_ = (bitField0_ & ~0x00000010); + environment_ = null; + if (environmentBuilder_ != null) { + environmentBuilder_.dispose(); + environmentBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + */ + public com.google.protobuf.Any.Builder getEnvironmentBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getEnvironmentFieldBuilder().getBuilder(); + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + */ + public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder() { + if (environmentBuilder_ != null) { + return environmentBuilder_.getMessageOrBuilder(); + } else { + return environment_ == null ? + com.google.protobuf.Any.getDefaultInstance() : environment_; + } + } + /** + *
+       * Any other builder-controlled inputs necessary for correctly evaluating
+       * the recipe. Usually only needed for reproducing the build but not
+       * evaluated as part of policy. Depending on the recipe Type, the structure
+       * may be different.
+       * 
+ * + * .google.protobuf.Any environment = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getEnvironmentFieldBuilder() { + if (environmentBuilder_ == null) { + environmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getEnvironment(), + getParentForChildren(), + isClean()); + environment_ = null; + } + return environmentBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaRecipe) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaRecipe) + private static final io.grafeas.v1.SlsaProvenance.SlsaRecipe DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaRecipe(); + } + + public static io.grafeas.v1.SlsaProvenance.SlsaRecipe getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaRecipe parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaRecipe getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaCompletenessOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaCompleteness) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * If true, the builder claims that recipe.arguments is complete, meaning
+     * that all external inputs are properly captured in the recipe.
+     * 
+ * + * bool arguments = 1; + * @return The arguments. + */ + boolean getArguments(); + + /** + *
+     * If true, the builder claims that recipe.environment is claimed to be
+     * complete.
+     * 
+ * + * bool environment = 2; + * @return The environment. + */ + boolean getEnvironment(); + + /** + *
+     * If true, the builder claims that materials are complete, usually through
+     * some controls to prevent network access. Sometimes called "hermetic".
+     * 
+ * + * bool materials = 3; + * @return The materials. + */ + boolean getMaterials(); + } + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaCompleteness} + */ + public static final class SlsaCompleteness extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaCompleteness) + SlsaCompletenessOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaCompleteness.newBuilder() to construct. + private SlsaCompleteness(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaCompleteness() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaCompleteness(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder.class); + } + + public static final int ARGUMENTS_FIELD_NUMBER = 1; + private boolean arguments_ = false; + /** + *
+     * If true, the builder claims that recipe.arguments is complete, meaning
+     * that all external inputs are properly captured in the recipe.
+     * 
+ * + * bool arguments = 1; + * @return The arguments. + */ + @java.lang.Override + public boolean getArguments() { + return arguments_; + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 2; + private boolean environment_ = false; + /** + *
+     * If true, the builder claims that recipe.environment is claimed to be
+     * complete.
+     * 
+ * + * bool environment = 2; + * @return The environment. + */ + @java.lang.Override + public boolean getEnvironment() { + return environment_; + } + + public static final int MATERIALS_FIELD_NUMBER = 3; + private boolean materials_ = false; + /** + *
+     * If true, the builder claims that materials are complete, usually through
+     * some controls to prevent network access. Sometimes called "hermetic".
+     * 
+ * + * bool materials = 3; + * @return The materials. + */ + @java.lang.Override + public boolean getMaterials() { + return materials_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (arguments_ != false) { + output.writeBool(1, arguments_); + } + if (environment_ != false) { + output.writeBool(2, environment_); + } + if (materials_ != false) { + output.writeBool(3, materials_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (arguments_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, arguments_); + } + if (environment_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, environment_); + } + if (materials_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, materials_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaCompleteness)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenance.SlsaCompleteness other = (io.grafeas.v1.SlsaProvenance.SlsaCompleteness) obj; + + if (getArguments() + != other.getArguments()) return false; + if (getEnvironment() + != other.getEnvironment()) return false; + if (getMaterials() + != other.getMaterials()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getArguments()); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnvironment()); + hash = (37 * hash) + MATERIALS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMaterials()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaCompleteness prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaCompleteness} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaCompleteness) + io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenance.SlsaCompleteness.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + arguments_ = false; + environment_ = false; + materials_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaCompleteness build() { + io.grafeas.v1.SlsaProvenance.SlsaCompleteness result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaCompleteness buildPartial() { + io.grafeas.v1.SlsaProvenance.SlsaCompleteness result = new io.grafeas.v1.SlsaProvenance.SlsaCompleteness(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaCompleteness result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.arguments_ = arguments_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.environment_ = environment_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.materials_ = materials_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaCompleteness) { + return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaCompleteness)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaCompleteness other) { + if (other == io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance()) return this; + if (other.getArguments() != false) { + setArguments(other.getArguments()); + } + if (other.getEnvironment() != false) { + setEnvironment(other.getEnvironment()); + } + if (other.getMaterials() != false) { + setMaterials(other.getMaterials()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + arguments_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + environment_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + materials_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean arguments_ ; + /** + *
+       * If true, the builder claims that recipe.arguments is complete, meaning
+       * that all external inputs are properly captured in the recipe.
+       * 
+ * + * bool arguments = 1; + * @return The arguments. + */ + @java.lang.Override + public boolean getArguments() { + return arguments_; + } + /** + *
+       * If true, the builder claims that recipe.arguments is complete, meaning
+       * that all external inputs are properly captured in the recipe.
+       * 
+ * + * bool arguments = 1; + * @param value The arguments to set. + * @return This builder for chaining. + */ + public Builder setArguments(boolean value) { + + arguments_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * If true, the builder claims that recipe.arguments is complete, meaning
+       * that all external inputs are properly captured in the recipe.
+       * 
+ * + * bool arguments = 1; + * @return This builder for chaining. + */ + public Builder clearArguments() { + bitField0_ = (bitField0_ & ~0x00000001); + arguments_ = false; + onChanged(); + return this; + } + + private boolean environment_ ; + /** + *
+       * If true, the builder claims that recipe.environment is claimed to be
+       * complete.
+       * 
+ * + * bool environment = 2; + * @return The environment. + */ + @java.lang.Override + public boolean getEnvironment() { + return environment_; + } + /** + *
+       * If true, the builder claims that recipe.environment is claimed to be
+       * complete.
+       * 
+ * + * bool environment = 2; + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(boolean value) { + + environment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * If true, the builder claims that recipe.environment is claimed to be
+       * complete.
+       * 
+ * + * bool environment = 2; + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + bitField0_ = (bitField0_ & ~0x00000002); + environment_ = false; + onChanged(); + return this; + } + + private boolean materials_ ; + /** + *
+       * If true, the builder claims that materials are complete, usually through
+       * some controls to prevent network access. Sometimes called "hermetic".
+       * 
+ * + * bool materials = 3; + * @return The materials. + */ + @java.lang.Override + public boolean getMaterials() { + return materials_; + } + /** + *
+       * If true, the builder claims that materials are complete, usually through
+       * some controls to prevent network access. Sometimes called "hermetic".
+       * 
+ * + * bool materials = 3; + * @param value The materials to set. + * @return This builder for chaining. + */ + public Builder setMaterials(boolean value) { + + materials_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * If true, the builder claims that materials are complete, usually through
+       * some controls to prevent network access. Sometimes called "hermetic".
+       * 
+ * + * bool materials = 3; + * @return This builder for chaining. + */ + public Builder clearMaterials() { + bitField0_ = (bitField0_ & ~0x00000004); + materials_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaCompleteness) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaCompleteness) + private static final io.grafeas.v1.SlsaProvenance.SlsaCompleteness DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaCompleteness(); + } + + public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaCompleteness parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Identifies the particular build invocation, which can be useful for
+     * finding associated logs or other ad-hoc analysis. The value SHOULD be
+     * globally unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + java.lang.String getBuildInvocationId(); + /** + *
+     * Identifies the particular build invocation, which can be useful for
+     * finding associated logs or other ad-hoc analysis. The value SHOULD be
+     * globally unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + com.google.protobuf.ByteString + getBuildInvocationIdBytes(); + + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + boolean hasBuildStartedOn(); + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + com.google.protobuf.Timestamp getBuildStartedOn(); + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder(); + + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + boolean hasBuildFinishedOn(); + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + com.google.protobuf.Timestamp getBuildFinishedOn(); + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder(); + + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + * @return Whether the completeness field is set. + */ + boolean hasCompleteness(); + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + * @return The completeness. + */ + io.grafeas.v1.SlsaProvenance.SlsaCompleteness getCompleteness(); + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder getCompletenessOrBuilder(); + + /** + *
+     * If true, the builder claims that running the recipe on materials will
+     * produce bit-for-bit identical output.
+     * 
+ * + * bool reproducible = 5; + * @return The reproducible. + */ + boolean getReproducible(); + } + /** + *
+   * Other properties of the build.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaMetadata} + */ + public static final class SlsaMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaMetadata) + SlsaMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaMetadata.newBuilder() to construct. + private SlsaMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaMetadata() { + buildInvocationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaMetadata.class, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder.class); + } + + public static final int BUILD_INVOCATION_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object buildInvocationId_ = ""; + /** + *
+     * Identifies the particular build invocation, which can be useful for
+     * finding associated logs or other ad-hoc analysis. The value SHOULD be
+     * globally unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + @java.lang.Override + public java.lang.String getBuildInvocationId() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildInvocationId_ = s; + return s; + } + } + /** + *
+     * Identifies the particular build invocation, which can be useful for
+     * finding associated logs or other ad-hoc analysis. The value SHOULD be
+     * globally unique, per in-toto Provenance spec.
+     * 
+ * + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBuildInvocationIdBytes() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildInvocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUILD_STARTED_ON_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp buildStartedOn_; + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + @java.lang.Override + public boolean hasBuildStartedOn() { + return buildStartedOn_ != null; + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getBuildStartedOn() { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + /** + *
+     * The timestamp of when the build started.
+     * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + + public static final int BUILD_FINISHED_ON_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp buildFinishedOn_; + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + @java.lang.Override + public boolean hasBuildFinishedOn() { + return buildFinishedOn_ != null; + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getBuildFinishedOn() { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + /** + *
+     * The timestamp of when the build completed.
+     * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + + public static final int COMPLETENESS_FIELD_NUMBER = 4; + private io.grafeas.v1.SlsaProvenance.SlsaCompleteness completeness_; + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + * @return Whether the completeness field is set. + */ + @java.lang.Override + public boolean hasCompleteness() { + return completeness_ != null; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + * @return The completeness. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getCompleteness() { + return completeness_ == null ? io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { + return completeness_ == null ? io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; + } + + public static final int REPRODUCIBLE_FIELD_NUMBER = 5; + private boolean reproducible_ = false; + /** + *
+     * If true, the builder claims that running the recipe on materials will
+     * produce bit-for-bit identical output.
+     * 
+ * + * bool reproducible = 5; + * @return The reproducible. + */ + @java.lang.Override + public boolean getReproducible() { + return reproducible_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, buildInvocationId_); + } + if (buildStartedOn_ != null) { + output.writeMessage(2, getBuildStartedOn()); + } + if (buildFinishedOn_ != null) { + output.writeMessage(3, getBuildFinishedOn()); + } + if (completeness_ != null) { + output.writeMessage(4, getCompleteness()); + } + if (reproducible_ != false) { + output.writeBool(5, reproducible_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, buildInvocationId_); + } + if (buildStartedOn_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBuildStartedOn()); + } + if (buildFinishedOn_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getBuildFinishedOn()); + } + if (completeness_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCompleteness()); + } + if (reproducible_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, reproducible_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaMetadata)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenance.SlsaMetadata other = (io.grafeas.v1.SlsaProvenance.SlsaMetadata) obj; + + if (!getBuildInvocationId() + .equals(other.getBuildInvocationId())) return false; + if (hasBuildStartedOn() != other.hasBuildStartedOn()) return false; + if (hasBuildStartedOn()) { + if (!getBuildStartedOn() + .equals(other.getBuildStartedOn())) return false; + } + if (hasBuildFinishedOn() != other.hasBuildFinishedOn()) return false; + if (hasBuildFinishedOn()) { + if (!getBuildFinishedOn() + .equals(other.getBuildFinishedOn())) return false; + } + if (hasCompleteness() != other.hasCompleteness()) return false; + if (hasCompleteness()) { + if (!getCompleteness() + .equals(other.getCompleteness())) return false; + } + if (getReproducible() + != other.getReproducible()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BUILD_INVOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getBuildInvocationId().hashCode(); + if (hasBuildStartedOn()) { + hash = (37 * hash) + BUILD_STARTED_ON_FIELD_NUMBER; + hash = (53 * hash) + getBuildStartedOn().hashCode(); + } + if (hasBuildFinishedOn()) { + hash = (37 * hash) + BUILD_FINISHED_ON_FIELD_NUMBER; + hash = (53 * hash) + getBuildFinishedOn().hashCode(); + } + if (hasCompleteness()) { + hash = (37 * hash) + COMPLETENESS_FIELD_NUMBER; + hash = (53 * hash) + getCompleteness().hashCode(); + } + hash = (37 * hash) + REPRODUCIBLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReproducible()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Other properties of the build.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaMetadata) + io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaMetadata.class, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenance.SlsaMetadata.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + buildInvocationId_ = ""; + buildStartedOn_ = null; + if (buildStartedOnBuilder_ != null) { + buildStartedOnBuilder_.dispose(); + buildStartedOnBuilder_ = null; + } + buildFinishedOn_ = null; + if (buildFinishedOnBuilder_ != null) { + buildFinishedOnBuilder_.dispose(); + buildFinishedOnBuilder_ = null; + } + completeness_ = null; + if (completenessBuilder_ != null) { + completenessBuilder_.dispose(); + completenessBuilder_ = null; + } + reproducible_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaMetadata getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaMetadata build() { + io.grafeas.v1.SlsaProvenance.SlsaMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaMetadata buildPartial() { + io.grafeas.v1.SlsaProvenance.SlsaMetadata result = new io.grafeas.v1.SlsaProvenance.SlsaMetadata(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.buildInvocationId_ = buildInvocationId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.buildStartedOn_ = buildStartedOnBuilder_ == null + ? buildStartedOn_ + : buildStartedOnBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.buildFinishedOn_ = buildFinishedOnBuilder_ == null + ? buildFinishedOn_ + : buildFinishedOnBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.completeness_ = completenessBuilder_ == null + ? completeness_ + : completenessBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.reproducible_ = reproducible_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaMetadata) { + return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaMetadata other) { + if (other == io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance()) return this; + if (!other.getBuildInvocationId().isEmpty()) { + buildInvocationId_ = other.buildInvocationId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasBuildStartedOn()) { + mergeBuildStartedOn(other.getBuildStartedOn()); + } + if (other.hasBuildFinishedOn()) { + mergeBuildFinishedOn(other.getBuildFinishedOn()); + } + if (other.hasCompleteness()) { + mergeCompleteness(other.getCompleteness()); + } + if (other.getReproducible() != false) { + setReproducible(other.getReproducible()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + buildInvocationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getBuildStartedOnFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getBuildFinishedOnFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getCompletenessFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + reproducible_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object buildInvocationId_ = ""; + /** + *
+       * Identifies the particular build invocation, which can be useful for
+       * finding associated logs or other ad-hoc analysis. The value SHOULD be
+       * globally unique, per in-toto Provenance spec.
+       * 
+ * + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + public java.lang.String getBuildInvocationId() { + java.lang.Object ref = buildInvocationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildInvocationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Identifies the particular build invocation, which can be useful for
+       * finding associated logs or other ad-hoc analysis. The value SHOULD be
+       * globally unique, per in-toto Provenance spec.
+       * 
+ * + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + public com.google.protobuf.ByteString + getBuildInvocationIdBytes() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildInvocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Identifies the particular build invocation, which can be useful for
+       * finding associated logs or other ad-hoc analysis. The value SHOULD be
+       * globally unique, per in-toto Provenance spec.
+       * 
+ * + * string build_invocation_id = 1; + * @param value The buildInvocationId to set. + * @return This builder for chaining. + */ + public Builder setBuildInvocationId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + buildInvocationId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Identifies the particular build invocation, which can be useful for
+       * finding associated logs or other ad-hoc analysis. The value SHOULD be
+       * globally unique, per in-toto Provenance spec.
+       * 
+ * + * string build_invocation_id = 1; + * @return This builder for chaining. + */ + public Builder clearBuildInvocationId() { + buildInvocationId_ = getDefaultInstance().getBuildInvocationId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Identifies the particular build invocation, which can be useful for
+       * finding associated logs or other ad-hoc analysis. The value SHOULD be
+       * globally unique, per in-toto Provenance spec.
+       * 
+ * + * string build_invocation_id = 1; + * @param value The bytes for buildInvocationId to set. + * @return This builder for chaining. + */ + public Builder setBuildInvocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + buildInvocationId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp buildStartedOn_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildStartedOnBuilder_; + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + public boolean hasBuildStartedOn() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + public com.google.protobuf.Timestamp getBuildStartedOn() { + if (buildStartedOnBuilder_ == null) { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } else { + return buildStartedOnBuilder_.getMessage(); + } + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder setBuildStartedOn(com.google.protobuf.Timestamp value) { + if (buildStartedOnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + buildStartedOn_ = value; + } else { + buildStartedOnBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder setBuildStartedOn( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (buildStartedOnBuilder_ == null) { + buildStartedOn_ = builderForValue.build(); + } else { + buildStartedOnBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder mergeBuildStartedOn(com.google.protobuf.Timestamp value) { + if (buildStartedOnBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + buildStartedOn_ != null && + buildStartedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getBuildStartedOnBuilder().mergeFrom(value); + } else { + buildStartedOn_ = value; + } + } else { + buildStartedOnBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder clearBuildStartedOn() { + bitField0_ = (bitField0_ & ~0x00000002); + buildStartedOn_ = null; + if (buildStartedOnBuilder_ != null) { + buildStartedOnBuilder_.dispose(); + buildStartedOnBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public com.google.protobuf.Timestamp.Builder getBuildStartedOnBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBuildStartedOnFieldBuilder().getBuilder(); + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { + if (buildStartedOnBuilder_ != null) { + return buildStartedOnBuilder_.getMessageOrBuilder(); + } else { + return buildStartedOn_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + } + /** + *
+       * The timestamp of when the build started.
+       * 
+ * + * .google.protobuf.Timestamp build_started_on = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getBuildStartedOnFieldBuilder() { + if (buildStartedOnBuilder_ == null) { + buildStartedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getBuildStartedOn(), + getParentForChildren(), + isClean()); + buildStartedOn_ = null; + } + return buildStartedOnBuilder_; + } + + private com.google.protobuf.Timestamp buildFinishedOn_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildFinishedOnBuilder_; + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + public boolean hasBuildFinishedOn() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + public com.google.protobuf.Timestamp getBuildFinishedOn() { + if (buildFinishedOnBuilder_ == null) { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } else { + return buildFinishedOnBuilder_.getMessage(); + } + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder setBuildFinishedOn(com.google.protobuf.Timestamp value) { + if (buildFinishedOnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + buildFinishedOn_ = value; + } else { + buildFinishedOnBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder setBuildFinishedOn( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (buildFinishedOnBuilder_ == null) { + buildFinishedOn_ = builderForValue.build(); + } else { + buildFinishedOnBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder mergeBuildFinishedOn(com.google.protobuf.Timestamp value) { + if (buildFinishedOnBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + buildFinishedOn_ != null && + buildFinishedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getBuildFinishedOnBuilder().mergeFrom(value); + } else { + buildFinishedOn_ = value; + } + } else { + buildFinishedOnBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder clearBuildFinishedOn() { + bitField0_ = (bitField0_ & ~0x00000004); + buildFinishedOn_ = null; + if (buildFinishedOnBuilder_ != null) { + buildFinishedOnBuilder_.dispose(); + buildFinishedOnBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public com.google.protobuf.Timestamp.Builder getBuildFinishedOnBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBuildFinishedOnFieldBuilder().getBuilder(); + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { + if (buildFinishedOnBuilder_ != null) { + return buildFinishedOnBuilder_.getMessageOrBuilder(); + } else { + return buildFinishedOn_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + } + /** + *
+       * The timestamp of when the build completed.
+       * 
+ * + * .google.protobuf.Timestamp build_finished_on = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getBuildFinishedOnFieldBuilder() { + if (buildFinishedOnBuilder_ == null) { + buildFinishedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getBuildFinishedOn(), + getParentForChildren(), + isClean()); + buildFinishedOn_ = null; + } + return buildFinishedOnBuilder_; + } + + private io.grafeas.v1.SlsaProvenance.SlsaCompleteness completeness_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaCompleteness, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder> completenessBuilder_; + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + * @return Whether the completeness field is set. + */ + public boolean hasCompleteness() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + * @return The completeness. + */ + public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getCompleteness() { + if (completenessBuilder_ == null) { + return completeness_ == null ? io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; + } else { + return completenessBuilder_.getMessage(); + } + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + public Builder setCompleteness(io.grafeas.v1.SlsaProvenance.SlsaCompleteness value) { + if (completenessBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + completeness_ = value; + } else { + completenessBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + public Builder setCompleteness( + io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder builderForValue) { + if (completenessBuilder_ == null) { + completeness_ = builderForValue.build(); + } else { + completenessBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + public Builder mergeCompleteness(io.grafeas.v1.SlsaProvenance.SlsaCompleteness value) { + if (completenessBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + completeness_ != null && + completeness_ != io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance()) { + getCompletenessBuilder().mergeFrom(value); + } else { + completeness_ = value; + } + } else { + completenessBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + public Builder clearCompleteness() { + bitField0_ = (bitField0_ & ~0x00000008); + completeness_ = null; + if (completenessBuilder_ != null) { + completenessBuilder_.dispose(); + completenessBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + public io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder getCompletenessBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCompletenessFieldBuilder().getBuilder(); + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + public io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { + if (completenessBuilder_ != null) { + return completenessBuilder_.getMessageOrBuilder(); + } else { + return completeness_ == null ? + io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; + } + } + /** + *
+       * Indicates that the builder claims certain fields in this message to be
+       * complete.
+       * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaCompleteness, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder> + getCompletenessFieldBuilder() { + if (completenessBuilder_ == null) { + completenessBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaCompleteness, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder>( + getCompleteness(), + getParentForChildren(), + isClean()); + completeness_ = null; + } + return completenessBuilder_; + } + + private boolean reproducible_ ; + /** + *
+       * If true, the builder claims that running the recipe on materials will
+       * produce bit-for-bit identical output.
+       * 
+ * + * bool reproducible = 5; + * @return The reproducible. + */ + @java.lang.Override + public boolean getReproducible() { + return reproducible_; + } + /** + *
+       * If true, the builder claims that running the recipe on materials will
+       * produce bit-for-bit identical output.
+       * 
+ * + * bool reproducible = 5; + * @param value The reproducible to set. + * @return This builder for chaining. + */ + public Builder setReproducible(boolean value) { + + reproducible_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * If true, the builder claims that running the recipe on materials will
+       * produce bit-for-bit identical output.
+       * 
+ * + * bool reproducible = 5; + * @return This builder for chaining. + */ + public Builder clearReproducible() { + bitField0_ = (bitField0_ & ~0x00000010); + reproducible_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaMetadata) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaMetadata) + private static final io.grafeas.v1.SlsaProvenance.SlsaMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaMetadata(); + } + + public static io.grafeas.v1.SlsaProvenance.SlsaMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaBuilderOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaBuilder) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + } + /** + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaBuilder} + */ + public static final class SlsaBuilder extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaBuilder) + SlsaBuilderOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaBuilder.newBuilder() to construct. + private SlsaBuilder(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaBuilder() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaBuilder(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaBuilder.class, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaBuilder)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenance.SlsaBuilder other = (io.grafeas.v1.SlsaProvenance.SlsaBuilder) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaBuilder prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaBuilder} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaBuilder) + io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.SlsaBuilder.class, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenance.SlsaBuilder.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaBuilder getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaBuilder build() { + io.grafeas.v1.SlsaProvenance.SlsaBuilder result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaBuilder buildPartial() { + io.grafeas.v1.SlsaProvenance.SlsaBuilder result = new io.grafeas.v1.SlsaProvenance.SlsaBuilder(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaBuilder result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaBuilder) { + return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaBuilder)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaBuilder other) { + if (other == io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaBuilder) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaBuilder) + private static final io.grafeas.v1.SlsaProvenance.SlsaBuilder DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaBuilder(); + } + + public static io.grafeas.v1.SlsaProvenance.SlsaBuilder getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaBuilder parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaBuilder getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MaterialOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.Material) + com.google.protobuf.MessageOrBuilder { + + /** + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + * map<string, string> digest = 2; + */ + int getDigestCount(); + /** + * map<string, string> digest = 2; + */ + boolean containsDigest( + java.lang.String key); + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getDigest(); + /** + * map<string, string> digest = 2; + */ + java.util.Map + getDigestMap(); + /** + * map<string, string> digest = 2; + */ + /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * map<string, string> digest = 2; + */ + java.lang.String getDigestOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code grafeas.v1.SlsaProvenance.Material} + */ + public static final class Material extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.Material) + MaterialOrBuilder { + private static final long serialVersionUID = 0L; + // Use Material.newBuilder() to construct. + private Material(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Material() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Material(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.Material.class, io.grafeas.v1.SlsaProvenance.Material.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIGEST_FIELD_NUMBER = 2; + private static final class DigestDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetDigest(), + DigestDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + for (java.util.Map.Entry entry + : internalGetDigest().getMap().entrySet()) { + com.google.protobuf.MapEntry + digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, digest__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenance.Material)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenance.Material other = (io.grafeas.v1.SlsaProvenance.Material) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (!internalGetDigest().equals( + other.internalGetDigest())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (!internalGetDigest().getMap().isEmpty()) { + hash = (37 * hash) + DIGEST_FIELD_NUMBER; + hash = (53 * hash) + internalGetDigest().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.Material parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.Material parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance.Material parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.Material prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.SlsaProvenance.Material} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.Material) + io.grafeas.v1.SlsaProvenance.MaterialOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.Material.class, io.grafeas.v1.SlsaProvenance.Material.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenance.Material.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + internalGetMutableDigest().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.Material getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.Material build() { + io.grafeas.v1.SlsaProvenance.Material result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.Material buildPartial() { + io.grafeas.v1.SlsaProvenance.Material result = new io.grafeas.v1.SlsaProvenance.Material(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenance.Material result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.digest_ = internalGetDigest(); + result.digest_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenance.Material) { + return mergeFrom((io.grafeas.v1.SlsaProvenance.Material)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.Material other) { + if (other == io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableDigest().mergeFrom( + other.internalGetDigest()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + digest__ = input.readMessage( + DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableDigest().getMutableMap().put( + digest__.getKey(), digest__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + private com.google.protobuf.MapField + internalGetMutableDigest() { + if (digest_ == null) { + digest_ = com.google.protobuf.MapField.newMapField( + DigestDefaultEntryHolder.defaultEntry); + } + if (!digest_.isMutable()) { + digest_ = digest_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearDigest() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableDigest().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> digest = 2; + */ + public Builder removeDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableDigest().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableDigest() { + bitField0_ |= 0x00000002; + return internalGetMutableDigest().getMutableMap(); + } + /** + * map<string, string> digest = 2; + */ + public Builder putDigest( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableDigest().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * map<string, string> digest = 2; + */ + public Builder putAllDigest( + java.util.Map values) { + internalGetMutableDigest().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.Material) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.Material) + private static final io.grafeas.v1.SlsaProvenance.Material DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.Material(); + } + + public static io.grafeas.v1.SlsaProvenance.Material getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Material parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.Material getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int BUILDER_FIELD_NUMBER = 1; + private io.grafeas.v1.SlsaProvenance.SlsaBuilder builder_; + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + * @return Whether the builder field is set. + */ + @java.lang.Override + public boolean hasBuilder() { + return builder_ != null; + } + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + * @return The builder. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaBuilder getBuilder() { + return builder_ == null ? io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; + } + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder getBuilderOrBuilder() { + return builder_ == null ? io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; + } + + public static final int RECIPE_FIELD_NUMBER = 2; + private io.grafeas.v1.SlsaProvenance.SlsaRecipe recipe_; + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + * @return Whether the recipe field is set. + */ + @java.lang.Override + public boolean hasRecipe() { + return recipe_ != null; + } + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + * @return The recipe. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaRecipe getRecipe() { + return recipe_ == null ? io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; + } + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder getRecipeOrBuilder() { + return recipe_ == null ? io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; + } + + public static final int METADATA_FIELD_NUMBER = 3; + private io.grafeas.v1.SlsaProvenance.SlsaMetadata metadata_; + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + * @return The metadata. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaMetadata getMetadata() { + return metadata_ == null ? io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; + } + + public static final int MATERIALS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List materials_; + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + @java.lang.Override + public java.util.List getMaterialsList() { + return materials_; + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + @java.lang.Override + public java.util.List + getMaterialsOrBuilderList() { + return materials_; + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + @java.lang.Override + public int getMaterialsCount() { + return materials_.size(); + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.Material getMaterials(int index) { + return materials_.get(index); + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenance.MaterialOrBuilder getMaterialsOrBuilder( + int index) { + return materials_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (builder_ != null) { + output.writeMessage(1, getBuilder()); + } + if (recipe_ != null) { + output.writeMessage(2, getRecipe()); + } + if (metadata_ != null) { + output.writeMessage(3, getMetadata()); + } + for (int i = 0; i < materials_.size(); i++) { + output.writeMessage(4, materials_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (builder_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBuilder()); + } + if (recipe_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRecipe()); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getMetadata()); + } + for (int i = 0; i < materials_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, materials_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenance)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenance other = (io.grafeas.v1.SlsaProvenance) obj; + + if (hasBuilder() != other.hasBuilder()) return false; + if (hasBuilder()) { + if (!getBuilder() + .equals(other.getBuilder())) return false; + } + if (hasRecipe() != other.hasRecipe()) return false; + if (hasRecipe()) { + if (!getRecipe() + .equals(other.getRecipe())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getMaterialsList() + .equals(other.getMaterialsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBuilder()) { + hash = (37 * hash) + BUILDER_FIELD_NUMBER; + hash = (53 * hash) + getBuilder().hashCode(); + } + if (hasRecipe()) { + hash = (37 * hash) + RECIPE_FIELD_NUMBER; + hash = (53 * hash) + getRecipe().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (getMaterialsCount() > 0) { + hash = (37 * hash) + MATERIALS_FIELD_NUMBER; + hash = (53 * hash) + getMaterialsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenance parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenance parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenance parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.SlsaProvenance} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance) + io.grafeas.v1.SlsaProvenanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenance.class, io.grafeas.v1.SlsaProvenance.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenance.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + builder_ = null; + if (builderBuilder_ != null) { + builderBuilder_.dispose(); + builderBuilder_ = null; + } + recipe_ = null; + if (recipeBuilder_ != null) { + recipeBuilder_.dispose(); + recipeBuilder_ = null; + } + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + if (materialsBuilder_ == null) { + materials_ = java.util.Collections.emptyList(); + } else { + materials_ = null; + materialsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance build() { + io.grafeas.v1.SlsaProvenance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance buildPartial() { + io.grafeas.v1.SlsaProvenance result = new io.grafeas.v1.SlsaProvenance(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.SlsaProvenance result) { + if (materialsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + materials_ = java.util.Collections.unmodifiableList(materials_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.materials_ = materials_; + } else { + result.materials_ = materialsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.builder_ = builderBuilder_ == null + ? builder_ + : builderBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.recipe_ = recipeBuilder_ == null + ? recipe_ + : recipeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenance) { + return mergeFrom((io.grafeas.v1.SlsaProvenance)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenance other) { + if (other == io.grafeas.v1.SlsaProvenance.getDefaultInstance()) return this; + if (other.hasBuilder()) { + mergeBuilder(other.getBuilder()); + } + if (other.hasRecipe()) { + mergeRecipe(other.getRecipe()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (materialsBuilder_ == null) { + if (!other.materials_.isEmpty()) { + if (materials_.isEmpty()) { + materials_ = other.materials_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureMaterialsIsMutable(); + materials_.addAll(other.materials_); + } + onChanged(); + } + } else { + if (!other.materials_.isEmpty()) { + if (materialsBuilder_.isEmpty()) { + materialsBuilder_.dispose(); + materialsBuilder_ = null; + materials_ = other.materials_; + bitField0_ = (bitField0_ & ~0x00000008); + materialsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMaterialsFieldBuilder() : null; + } else { + materialsBuilder_.addAllMessages(other.materials_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getBuilderFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getRecipeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + io.grafeas.v1.SlsaProvenance.Material m = + input.readMessage( + io.grafeas.v1.SlsaProvenance.Material.parser(), + extensionRegistry); + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.add(m); + } else { + materialsBuilder_.addMessage(m); + } + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.SlsaProvenance.SlsaBuilder builder_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaBuilder, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder> builderBuilder_; + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + * @return Whether the builder field is set. + */ + public boolean hasBuilder() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + * @return The builder. + */ + public io.grafeas.v1.SlsaProvenance.SlsaBuilder getBuilder() { + if (builderBuilder_ == null) { + return builder_ == null ? io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; + } else { + return builderBuilder_.getMessage(); + } + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + public Builder setBuilder(io.grafeas.v1.SlsaProvenance.SlsaBuilder value) { + if (builderBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + builder_ = value; + } else { + builderBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + public Builder setBuilder( + io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder builderForValue) { + if (builderBuilder_ == null) { + builder_ = builderForValue.build(); + } else { + builderBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + public Builder mergeBuilder(io.grafeas.v1.SlsaProvenance.SlsaBuilder value) { + if (builderBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + builder_ != null && + builder_ != io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance()) { + getBuilderBuilder().mergeFrom(value); + } else { + builder_ = value; + } + } else { + builderBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + public Builder clearBuilder() { + bitField0_ = (bitField0_ & ~0x00000001); + builder_ = null; + if (builderBuilder_ != null) { + builderBuilder_.dispose(); + builderBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + public io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder getBuilderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBuilderFieldBuilder().getBuilder(); + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + public io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder getBuilderOrBuilder() { + if (builderBuilder_ != null) { + return builderBuilder_.getMessageOrBuilder(); + } else { + return builder_ == null ? + io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; + } + } + /** + *
+     * required
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaBuilder, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder> + getBuilderFieldBuilder() { + if (builderBuilder_ == null) { + builderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaBuilder, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder>( + getBuilder(), + getParentForChildren(), + isClean()); + builder_ = null; + } + return builderBuilder_; + } + + private io.grafeas.v1.SlsaProvenance.SlsaRecipe recipe_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaRecipe, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder, io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder> recipeBuilder_; + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + * @return Whether the recipe field is set. + */ + public boolean hasRecipe() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + * @return The recipe. + */ + public io.grafeas.v1.SlsaProvenance.SlsaRecipe getRecipe() { + if (recipeBuilder_ == null) { + return recipe_ == null ? io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; + } else { + return recipeBuilder_.getMessage(); + } + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + public Builder setRecipe(io.grafeas.v1.SlsaProvenance.SlsaRecipe value) { + if (recipeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + recipe_ = value; + } else { + recipeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + public Builder setRecipe( + io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder builderForValue) { + if (recipeBuilder_ == null) { + recipe_ = builderForValue.build(); + } else { + recipeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + public Builder mergeRecipe(io.grafeas.v1.SlsaProvenance.SlsaRecipe value) { + if (recipeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + recipe_ != null && + recipe_ != io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance()) { + getRecipeBuilder().mergeFrom(value); + } else { + recipe_ = value; + } + } else { + recipeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + public Builder clearRecipe() { + bitField0_ = (bitField0_ & ~0x00000002); + recipe_ = null; + if (recipeBuilder_ != null) { + recipeBuilder_.dispose(); + recipeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + public io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder getRecipeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRecipeFieldBuilder().getBuilder(); + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + public io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder getRecipeOrBuilder() { + if (recipeBuilder_ != null) { + return recipeBuilder_.getMessageOrBuilder(); + } else { + return recipe_ == null ? + io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; + } + } + /** + *
+     * Identifies the configuration used for the build.
+     * When combined with materials, this SHOULD fully describe the build,
+     * such that re-running this recipe results in bit-for-bit identical output
+     * (if the build is reproducible).
+     * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaRecipe, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder, io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder> + getRecipeFieldBuilder() { + if (recipeBuilder_ == null) { + recipeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaRecipe, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder, io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder>( + getRecipe(), + getParentForChildren(), + isClean()); + recipe_ = null; + } + return recipeBuilder_; + } + + private io.grafeas.v1.SlsaProvenance.SlsaMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaMetadata, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder> metadataBuilder_; + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + * @return The metadata. + */ + public io.grafeas.v1.SlsaProvenance.SlsaMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + public Builder setMetadata(io.grafeas.v1.SlsaProvenance.SlsaMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + public Builder setMetadata( + io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + public Builder mergeMetadata(io.grafeas.v1.SlsaProvenance.SlsaMetadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + metadata_ != null && + metadata_ != io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + public io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + public io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; + } + } + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaMetadata, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.SlsaMetadata, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private java.util.List materials_ = + java.util.Collections.emptyList(); + private void ensureMaterialsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + materials_ = new java.util.ArrayList(materials_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.Material, io.grafeas.v1.SlsaProvenance.Material.Builder, io.grafeas.v1.SlsaProvenance.MaterialOrBuilder> materialsBuilder_; + + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public java.util.List getMaterialsList() { + if (materialsBuilder_ == null) { + return java.util.Collections.unmodifiableList(materials_); + } else { + return materialsBuilder_.getMessageList(); + } + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public int getMaterialsCount() { + if (materialsBuilder_ == null) { + return materials_.size(); + } else { + return materialsBuilder_.getCount(); + } + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public io.grafeas.v1.SlsaProvenance.Material getMaterials(int index) { + if (materialsBuilder_ == null) { + return materials_.get(index); + } else { + return materialsBuilder_.getMessage(index); + } + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder setMaterials( + int index, io.grafeas.v1.SlsaProvenance.Material value) { + if (materialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaterialsIsMutable(); + materials_.set(index, value); + onChanged(); + } else { + materialsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder setMaterials( + int index, io.grafeas.v1.SlsaProvenance.Material.Builder builderForValue) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.set(index, builderForValue.build()); + onChanged(); + } else { + materialsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder addMaterials(io.grafeas.v1.SlsaProvenance.Material value) { + if (materialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaterialsIsMutable(); + materials_.add(value); + onChanged(); + } else { + materialsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder addMaterials( + int index, io.grafeas.v1.SlsaProvenance.Material value) { + if (materialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaterialsIsMutable(); + materials_.add(index, value); + onChanged(); + } else { + materialsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder addMaterials( + io.grafeas.v1.SlsaProvenance.Material.Builder builderForValue) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.add(builderForValue.build()); + onChanged(); + } else { + materialsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder addMaterials( + int index, io.grafeas.v1.SlsaProvenance.Material.Builder builderForValue) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.add(index, builderForValue.build()); + onChanged(); + } else { + materialsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder addAllMaterials( + java.lang.Iterable values) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, materials_); + onChanged(); + } else { + materialsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder clearMaterials() { + if (materialsBuilder_ == null) { + materials_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + materialsBuilder_.clear(); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public Builder removeMaterials(int index) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.remove(index); + onChanged(); + } else { + materialsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public io.grafeas.v1.SlsaProvenance.Material.Builder getMaterialsBuilder( + int index) { + return getMaterialsFieldBuilder().getBuilder(index); + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public io.grafeas.v1.SlsaProvenance.MaterialOrBuilder getMaterialsOrBuilder( + int index) { + if (materialsBuilder_ == null) { + return materials_.get(index); } else { + return materialsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public java.util.List + getMaterialsOrBuilderList() { + if (materialsBuilder_ != null) { + return materialsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(materials_); + } + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public io.grafeas.v1.SlsaProvenance.Material.Builder addMaterialsBuilder() { + return getMaterialsFieldBuilder().addBuilder( + io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance()); + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public io.grafeas.v1.SlsaProvenance.Material.Builder addMaterialsBuilder( + int index) { + return getMaterialsFieldBuilder().addBuilder( + index, io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance()); + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on. This is considered to be
+     * incomplete unless metadata.completeness.materials is true. Unset or null is
+     * equivalent to empty.
+     * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + public java.util.List + getMaterialsBuilderList() { + return getMaterialsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.Material, io.grafeas.v1.SlsaProvenance.Material.Builder, io.grafeas.v1.SlsaProvenance.MaterialOrBuilder> + getMaterialsFieldBuilder() { + if (materialsBuilder_ == null) { + materialsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SlsaProvenance.Material, io.grafeas.v1.SlsaProvenance.Material.Builder, io.grafeas.v1.SlsaProvenance.MaterialOrBuilder>( + materials_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + materials_ = null; + } + return materialsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance) + private static final io.grafeas.v1.SlsaProvenance DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance(); + } + + public static io.grafeas.v1.SlsaProvenance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaProvenance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java new file mode 100644 index 000000000000..d7b66088f1c3 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java @@ -0,0 +1,146 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/slsa_provenance.proto + +package io.grafeas.v1; + +public interface SlsaProvenanceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + * @return Whether the builder field is set. + */ + boolean hasBuilder(); + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + * @return The builder. + */ + io.grafeas.v1.SlsaProvenance.SlsaBuilder getBuilder(); + /** + *
+   * required
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder getBuilderOrBuilder(); + + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + * @return Whether the recipe field is set. + */ + boolean hasRecipe(); + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + * @return The recipe. + */ + io.grafeas.v1.SlsaProvenance.SlsaRecipe getRecipe(); + /** + *
+   * Identifies the configuration used for the build.
+   * When combined with materials, this SHOULD fully describe the build,
+   * such that re-running this recipe results in bit-for-bit identical output
+   * (if the build is reproducible).
+   * 
+ * + * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder getRecipeOrBuilder(); + + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + * @return The metadata. + */ + io.grafeas.v1.SlsaProvenance.SlsaMetadata getMetadata(); + /** + * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder getMetadataOrBuilder(); + + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + java.util.List + getMaterialsList(); + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + io.grafeas.v1.SlsaProvenance.Material getMaterials(int index); + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + int getMaterialsCount(); + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + java.util.List + getMaterialsOrBuilderList(); + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on. This is considered to be
+   * incomplete unless metadata.completeness.materials is true. Unset or null is
+   * equivalent to empty.
+   * 
+ * + * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + io.grafeas.v1.SlsaProvenance.MaterialOrBuilder getMaterialsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java new file mode 100644 index 000000000000..f58193641147 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java @@ -0,0 +1,143 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/slsa_provenance.proto + +package io.grafeas.v1; + +public final class SlsaProvenanceProto { + private SlsaProvenanceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenance_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n grafeas/v1/slsa_provenance.proto\022\ngraf" + + "eas.v1\032\031google/protobuf/any.proto\032\037googl" + + "e/protobuf/timestamp.proto\"\376\006\n\016SlsaProve" + + "nance\0227\n\007builder\030\001 \001(\0132&.grafeas.v1.Slsa" + + "Provenance.SlsaBuilder\0225\n\006recipe\030\002 \001(\0132%" + + ".grafeas.v1.SlsaProvenance.SlsaRecipe\0229\n" + + "\010metadata\030\003 \001(\0132\'.grafeas.v1.SlsaProvena" + + "nce.SlsaMetadata\0226\n\tmaterials\030\004 \003(\0132#.gr" + + "afeas.v1.SlsaProvenance.Material\032\240\001\n\nSls" + + "aRecipe\022\014\n\004type\030\001 \001(\t\022\033\n\023defined_in_mate" + + "rial\030\002 \001(\003\022\023\n\013entry_point\030\003 \001(\t\022\'\n\targum" + + "ents\030\004 \001(\0132\024.google.protobuf.Any\022)\n\013envi" + + "ronment\030\005 \001(\0132\024.google.protobuf.Any\032M\n\020S" + + "lsaCompleteness\022\021\n\targuments\030\001 \001(\010\022\023\n\013en" + + "vironment\030\002 \001(\010\022\021\n\tmaterials\030\003 \001(\010\032\361\001\n\014S" + + "lsaMetadata\022\033\n\023build_invocation_id\030\001 \001(\t" + + "\0224\n\020build_started_on\030\002 \001(\0132\032.google.prot" + + "obuf.Timestamp\0225\n\021build_finished_on\030\003 \001(" + + "\0132\032.google.protobuf.Timestamp\022A\n\014complet" + + "eness\030\004 \001(\0132+.grafeas.v1.SlsaProvenance." + + "SlsaCompleteness\022\024\n\014reproducible\030\005 \001(\010\032\031" + + "\n\013SlsaBuilder\022\n\n\002id\030\001 \001(\t\032\207\001\n\010Material\022\013" + + "\n\003uri\030\001 \001(\t\022?\n\006digest\030\002 \003(\0132/.grafeas.v1" + + ".SlsaProvenance.Material.DigestEntry\032-\n\013" + + "DigestEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + + "\0028\001Bf\n\rio.grafeas.v1B\023SlsaProvenanceProt" + + "oP\001Z8google.golang.org/genproto/googleap" + + "is/grafeas/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.AnyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_grafeas_v1_SlsaProvenance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenance_descriptor, + new java.lang.String[] { "Builder", "Recipe", "Metadata", "Materials", }); + internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor = + internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor, + new java.lang.String[] { "Type", "DefinedInMaterial", "EntryPoint", "Arguments", "Environment", }); + internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor = + internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor, + new java.lang.String[] { "Arguments", "Environment", "Materials", }); + internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor = + internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(2); + internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor, + new java.lang.String[] { "BuildInvocationId", "BuildStartedOn", "BuildFinishedOn", "Completeness", "Reproducible", }); + internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor = + internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(3); + internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor, + new java.lang.String[] { "Id", }); + internal_static_grafeas_v1_SlsaProvenance_Material_descriptor = + internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(4); + internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenance_Material_descriptor, + new java.lang.String[] { "Uri", "Digest", }); + internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor = + internal_static_grafeas_v1_SlsaProvenance_Material_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java new file mode 100644 index 000000000000..41831c9804aa --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java @@ -0,0 +1,6962 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/slsa_provenance_zero_two.proto + +package io.grafeas.v1; + +/** + *
+ * See full explanation of fields at slsa.dev/provenance/v0.2.
+ * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo} + */ +public final class SlsaProvenanceZeroTwo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo) + SlsaProvenanceZeroTwoOrBuilder { +private static final long serialVersionUID = 0L; + // Use SlsaProvenanceZeroTwo.newBuilder() to construct. + private SlsaProvenanceZeroTwo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaProvenanceZeroTwo() { + buildType_ = ""; + materials_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaProvenanceZeroTwo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.class, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder.class); + } + + public interface SlsaBuilderOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + } + /** + *
+   * Identifies the entity that executed the recipe, which is trusted to have
+   * correctly performed the operation and populated this provenance.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder} + */ + public static final class SlsaBuilder extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) + SlsaBuilderOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaBuilder.newBuilder() to construct. + private SlsaBuilder(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaBuilder() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaBuilder(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Identifies the entity that executed the recipe, which is trusted to have
+     * correctly performed the operation and populated this provenance.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder build() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder buildPartial() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) { + return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder other) { + if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) + private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder(); + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaBuilder parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaMaterialOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) + com.google.protobuf.MessageOrBuilder { + + /** + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + * map<string, string> digest = 2; + */ + int getDigestCount(); + /** + * map<string, string> digest = 2; + */ + boolean containsDigest( + java.lang.String key); + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getDigest(); + /** + * map<string, string> digest = 2; + */ + java.util.Map + getDigestMap(); + /** + * map<string, string> digest = 2; + */ + /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * map<string, string> digest = 2; + */ + java.lang.String getDigestOrThrow( + java.lang.String key); + } + /** + *
+   * The collection of artifacts that influenced the build including sources,
+   * dependencies, build tools, base images, and so on.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial} + */ + public static final class SlsaMaterial extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) + SlsaMaterialOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaMaterial.newBuilder() to construct. + private SlsaMaterial(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaMaterial() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaMaterial(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIGEST_FIELD_NUMBER = 2; + private static final class DigestDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetDigest(), + DigestDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + for (java.util.Map.Entry entry + : internalGetDigest().getMap().entrySet()) { + com.google.protobuf.MapEntry + digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, digest__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (!internalGetDigest().equals( + other.internalGetDigest())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (!internalGetDigest().getMap().isEmpty()) { + hash = (37 * hash) + DIGEST_FIELD_NUMBER; + hash = (53 * hash) + internalGetDigest().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * The collection of artifacts that influenced the build including sources,
+     * dependencies, build tools, base images, and so on.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + internalGetMutableDigest().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial build() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial buildPartial() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.digest_ = internalGetDigest(); + result.digest_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) { + return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial other) { + if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableDigest().mergeFrom( + other.internalGetDigest()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + digest__ = input.readMessage( + DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableDigest().getMutableMap().put( + digest__.getKey(), digest__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + private com.google.protobuf.MapField + internalGetMutableDigest() { + if (digest_ == null) { + digest_ = com.google.protobuf.MapField.newMapField( + DigestDefaultEntryHolder.defaultEntry); + } + if (!digest_.isMutable()) { + digest_ = digest_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearDigest() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableDigest().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> digest = 2; + */ + public Builder removeDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableDigest().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableDigest() { + bitField0_ |= 0x00000002; + return internalGetMutableDigest().getMutableMap(); + } + /** + * map<string, string> digest = 2; + */ + public Builder putDigest( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableDigest().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * map<string, string> digest = 2; + */ + public Builder putAllDigest( + java.util.Map values) { + internalGetMutableDigest().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) + private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial(); + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaMaterial parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaInvocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) + com.google.protobuf.MessageOrBuilder { + + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + * @return Whether the configSource field is set. + */ + boolean hasConfigSource(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + * @return The configSource. + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getConfigSource(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder getConfigSourceOrBuilder(); + + /** + * .google.protobuf.Struct parameters = 2; + * @return Whether the parameters field is set. + */ + boolean hasParameters(); + /** + * .google.protobuf.Struct parameters = 2; + * @return The parameters. + */ + com.google.protobuf.Struct getParameters(); + /** + * .google.protobuf.Struct parameters = 2; + */ + com.google.protobuf.StructOrBuilder getParametersOrBuilder(); + + /** + * .google.protobuf.Struct environment = 3; + * @return Whether the environment field is set. + */ + boolean hasEnvironment(); + /** + * .google.protobuf.Struct environment = 3; + * @return The environment. + */ + com.google.protobuf.Struct getEnvironment(); + /** + * .google.protobuf.Struct environment = 3; + */ + com.google.protobuf.StructOrBuilder getEnvironmentOrBuilder(); + } + /** + *
+   * Identifies the event that kicked off the build.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation} + */ + public static final class SlsaInvocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) + SlsaInvocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaInvocation.newBuilder() to construct. + private SlsaInvocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaInvocation() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaInvocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder.class); + } + + public static final int CONFIG_SOURCE_FIELD_NUMBER = 1; + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource configSource_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + * @return Whether the configSource field is set. + */ + @java.lang.Override + public boolean hasConfigSource() { + return configSource_ != null; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + * @return The configSource. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getConfigSource() { + return configSource_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder getConfigSourceOrBuilder() { + return configSource_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; + } + + public static final int PARAMETERS_FIELD_NUMBER = 2; + private com.google.protobuf.Struct parameters_; + /** + * .google.protobuf.Struct parameters = 2; + * @return Whether the parameters field is set. + */ + @java.lang.Override + public boolean hasParameters() { + return parameters_ != null; + } + /** + * .google.protobuf.Struct parameters = 2; + * @return The parameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getParameters() { + return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; + } + /** + * .google.protobuf.Struct parameters = 2; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { + return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 3; + private com.google.protobuf.Struct environment_; + /** + * .google.protobuf.Struct environment = 3; + * @return Whether the environment field is set. + */ + @java.lang.Override + public boolean hasEnvironment() { + return environment_ != null; + } + /** + * .google.protobuf.Struct environment = 3; + * @return The environment. + */ + @java.lang.Override + public com.google.protobuf.Struct getEnvironment() { + return environment_ == null ? com.google.protobuf.Struct.getDefaultInstance() : environment_; + } + /** + * .google.protobuf.Struct environment = 3; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getEnvironmentOrBuilder() { + return environment_ == null ? com.google.protobuf.Struct.getDefaultInstance() : environment_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (configSource_ != null) { + output.writeMessage(1, getConfigSource()); + } + if (parameters_ != null) { + output.writeMessage(2, getParameters()); + } + if (environment_ != null) { + output.writeMessage(3, getEnvironment()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (configSource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConfigSource()); + } + if (parameters_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getParameters()); + } + if (environment_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getEnvironment()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) obj; + + if (hasConfigSource() != other.hasConfigSource()) return false; + if (hasConfigSource()) { + if (!getConfigSource() + .equals(other.getConfigSource())) return false; + } + if (hasParameters() != other.hasParameters()) return false; + if (hasParameters()) { + if (!getParameters() + .equals(other.getParameters())) return false; + } + if (hasEnvironment() != other.hasEnvironment()) return false; + if (hasEnvironment()) { + if (!getEnvironment() + .equals(other.getEnvironment())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasConfigSource()) { + hash = (37 * hash) + CONFIG_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getConfigSource().hashCode(); + } + if (hasParameters()) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParameters().hashCode(); + } + if (hasEnvironment()) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Identifies the event that kicked off the build.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + configSource_ = null; + if (configSourceBuilder_ != null) { + configSourceBuilder_.dispose(); + configSourceBuilder_ = null; + } + parameters_ = null; + if (parametersBuilder_ != null) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + } + environment_ = null; + if (environmentBuilder_ != null) { + environmentBuilder_.dispose(); + environmentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation build() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation buildPartial() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.configSource_ = configSourceBuilder_ == null + ? configSource_ + : configSourceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parameters_ = parametersBuilder_ == null + ? parameters_ + : parametersBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.environment_ = environmentBuilder_ == null + ? environment_ + : environmentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) { + return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation other) { + if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance()) return this; + if (other.hasConfigSource()) { + mergeConfigSource(other.getConfigSource()); + } + if (other.hasParameters()) { + mergeParameters(other.getParameters()); + } + if (other.hasEnvironment()) { + mergeEnvironment(other.getEnvironment()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getConfigSourceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getParametersFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getEnvironmentFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource configSource_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder> configSourceBuilder_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + * @return Whether the configSource field is set. + */ + public boolean hasConfigSource() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + * @return The configSource. + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getConfigSource() { + if (configSourceBuilder_ == null) { + return configSource_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; + } else { + return configSourceBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + public Builder setConfigSource(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource value) { + if (configSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configSource_ = value; + } else { + configSourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + public Builder setConfigSource( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder builderForValue) { + if (configSourceBuilder_ == null) { + configSource_ = builderForValue.build(); + } else { + configSourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + public Builder mergeConfigSource(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource value) { + if (configSourceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + configSource_ != null && + configSource_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance()) { + getConfigSourceBuilder().mergeFrom(value); + } else { + configSource_ = value; + } + } else { + configSourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + public Builder clearConfigSource() { + bitField0_ = (bitField0_ & ~0x00000001); + configSource_ = null; + if (configSourceBuilder_ != null) { + configSourceBuilder_.dispose(); + configSourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder getConfigSourceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConfigSourceFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder getConfigSourceOrBuilder() { + if (configSourceBuilder_ != null) { + return configSourceBuilder_.getMessageOrBuilder(); + } else { + return configSource_ == null ? + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder> + getConfigSourceFieldBuilder() { + if (configSourceBuilder_ == null) { + configSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder>( + getConfigSource(), + getParentForChildren(), + isClean()); + configSource_ = null; + } + return configSourceBuilder_; + } + + private com.google.protobuf.Struct parameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> parametersBuilder_; + /** + * .google.protobuf.Struct parameters = 2; + * @return Whether the parameters field is set. + */ + public boolean hasParameters() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .google.protobuf.Struct parameters = 2; + * @return The parameters. + */ + public com.google.protobuf.Struct getParameters() { + if (parametersBuilder_ == null) { + return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; + } else { + return parametersBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Struct parameters = 2; + */ + public Builder setParameters(com.google.protobuf.Struct value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parameters_ = value; + } else { + parametersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct parameters = 2; + */ + public Builder setParameters( + com.google.protobuf.Struct.Builder builderForValue) { + if (parametersBuilder_ == null) { + parameters_ = builderForValue.build(); + } else { + parametersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct parameters = 2; + */ + public Builder mergeParameters(com.google.protobuf.Struct value) { + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + parameters_ != null && + parameters_ != com.google.protobuf.Struct.getDefaultInstance()) { + getParametersBuilder().mergeFrom(value); + } else { + parameters_ = value; + } + } else { + parametersBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct parameters = 2; + */ + public Builder clearParameters() { + bitField0_ = (bitField0_ & ~0x00000002); + parameters_ = null; + if (parametersBuilder_ != null) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Struct parameters = 2; + */ + public com.google.protobuf.Struct.Builder getParametersBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getParametersFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Struct parameters = 2; + */ + public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilder(); + } else { + return parameters_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : parameters_; + } + } + /** + * .google.protobuf.Struct parameters = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getParameters(), + getParentForChildren(), + isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + private com.google.protobuf.Struct environment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> environmentBuilder_; + /** + * .google.protobuf.Struct environment = 3; + * @return Whether the environment field is set. + */ + public boolean hasEnvironment() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .google.protobuf.Struct environment = 3; + * @return The environment. + */ + public com.google.protobuf.Struct getEnvironment() { + if (environmentBuilder_ == null) { + return environment_ == null ? com.google.protobuf.Struct.getDefaultInstance() : environment_; + } else { + return environmentBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Struct environment = 3; + */ + public Builder setEnvironment(com.google.protobuf.Struct value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + } else { + environmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct environment = 3; + */ + public Builder setEnvironment( + com.google.protobuf.Struct.Builder builderForValue) { + if (environmentBuilder_ == null) { + environment_ = builderForValue.build(); + } else { + environmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct environment = 3; + */ + public Builder mergeEnvironment(com.google.protobuf.Struct value) { + if (environmentBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + environment_ != null && + environment_ != com.google.protobuf.Struct.getDefaultInstance()) { + getEnvironmentBuilder().mergeFrom(value); + } else { + environment_ = value; + } + } else { + environmentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct environment = 3; + */ + public Builder clearEnvironment() { + bitField0_ = (bitField0_ & ~0x00000004); + environment_ = null; + if (environmentBuilder_ != null) { + environmentBuilder_.dispose(); + environmentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Struct environment = 3; + */ + public com.google.protobuf.Struct.Builder getEnvironmentBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEnvironmentFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Struct environment = 3; + */ + public com.google.protobuf.StructOrBuilder getEnvironmentOrBuilder() { + if (environmentBuilder_ != null) { + return environmentBuilder_.getMessageOrBuilder(); + } else { + return environment_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : environment_; + } + } + /** + * .google.protobuf.Struct environment = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getEnvironmentFieldBuilder() { + if (environmentBuilder_ == null) { + environmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getEnvironment(), + getParentForChildren(), + isClean()); + environment_ = null; + } + return environmentBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) + private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation(); + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaInvocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaConfigSourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) + com.google.protobuf.MessageOrBuilder { + + /** + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + * map<string, string> digest = 2; + */ + int getDigestCount(); + /** + * map<string, string> digest = 2; + */ + boolean containsDigest( + java.lang.String key); + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getDigest(); + /** + * map<string, string> digest = 2; + */ + java.util.Map + getDigestMap(); + /** + * map<string, string> digest = 2; + */ + /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * map<string, string> digest = 2; + */ + java.lang.String getDigestOrThrow( + java.lang.String key); + + /** + * string entry_point = 3; + * @return The entryPoint. + */ + java.lang.String getEntryPoint(); + /** + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + com.google.protobuf.ByteString + getEntryPointBytes(); + } + /** + *
+   * Describes where the config file that kicked off the build came from.
+   * This is effectively a pointer to the source where buildConfig came from.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource} + */ + public static final class SlsaConfigSource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) + SlsaConfigSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaConfigSource.newBuilder() to construct. + private SlsaConfigSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaConfigSource() { + uri_ = ""; + entryPoint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaConfigSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIGEST_FIELD_NUMBER = 2; + private static final class DigestDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ENTRY_POINT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object entryPoint_ = ""; + /** + * string entry_point = 3; + * @return The entryPoint. + */ + @java.lang.Override + public java.lang.String getEntryPoint() { + java.lang.Object ref = entryPoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryPoint_ = s; + return s; + } + } + /** + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEntryPointBytes() { + java.lang.Object ref = entryPoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entryPoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetDigest(), + DigestDefaultEntryHolder.defaultEntry, + 2); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entryPoint_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + for (java.util.Map.Entry entry + : internalGetDigest().getMap().entrySet()) { + com.google.protobuf.MapEntry + digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, digest__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entryPoint_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (!internalGetDigest().equals( + other.internalGetDigest())) return false; + if (!getEntryPoint() + .equals(other.getEntryPoint())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (!internalGetDigest().getMap().isEmpty()) { + hash = (37 * hash) + DIGEST_FIELD_NUMBER; + hash = (53 * hash) + internalGetDigest().hashCode(); + } + hash = (37 * hash) + ENTRY_POINT_FIELD_NUMBER; + hash = (53 * hash) + getEntryPoint().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Describes where the config file that kicked off the build came from.
+     * This is effectively a pointer to the source where buildConfig came from.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + internalGetMutableDigest().clear(); + entryPoint_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource build() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource buildPartial() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.digest_ = internalGetDigest(); + result.digest_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.entryPoint_ = entryPoint_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) { + return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource other) { + if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableDigest().mergeFrom( + other.internalGetDigest()); + bitField0_ |= 0x00000002; + if (!other.getEntryPoint().isEmpty()) { + entryPoint_ = other.entryPoint_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + digest__ = input.readMessage( + DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableDigest().getMutableMap().put( + digest__.getKey(), digest__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + entryPoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + private com.google.protobuf.MapField + internalGetMutableDigest() { + if (digest_ == null) { + digest_ = com.google.protobuf.MapField.newMapField( + DigestDefaultEntryHolder.defaultEntry); + } + if (!digest_.isMutable()) { + digest_ = digest_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearDigest() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableDigest().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> digest = 2; + */ + public Builder removeDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableDigest().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableDigest() { + bitField0_ |= 0x00000002; + return internalGetMutableDigest().getMutableMap(); + } + /** + * map<string, string> digest = 2; + */ + public Builder putDigest( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableDigest().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * map<string, string> digest = 2; + */ + public Builder putAllDigest( + java.util.Map values) { + internalGetMutableDigest().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private java.lang.Object entryPoint_ = ""; + /** + * string entry_point = 3; + * @return The entryPoint. + */ + public java.lang.String getEntryPoint() { + java.lang.Object ref = entryPoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryPoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string entry_point = 3; + * @return The bytes for entryPoint. + */ + public com.google.protobuf.ByteString + getEntryPointBytes() { + java.lang.Object ref = entryPoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entryPoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string entry_point = 3; + * @param value The entryPoint to set. + * @return This builder for chaining. + */ + public Builder setEntryPoint( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + entryPoint_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string entry_point = 3; + * @return This builder for chaining. + */ + public Builder clearEntryPoint() { + entryPoint_ = getDefaultInstance().getEntryPoint(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string entry_point = 3; + * @param value The bytes for entryPoint to set. + * @return This builder for chaining. + */ + public Builder setEntryPointBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + entryPoint_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) + private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource(); + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaConfigSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + java.lang.String getBuildInvocationId(); + /** + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + com.google.protobuf.ByteString + getBuildInvocationIdBytes(); + + /** + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + boolean hasBuildStartedOn(); + /** + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + com.google.protobuf.Timestamp getBuildStartedOn(); + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder(); + + /** + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + boolean hasBuildFinishedOn(); + /** + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + com.google.protobuf.Timestamp getBuildFinishedOn(); + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder(); + + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + * @return Whether the completeness field is set. + */ + boolean hasCompleteness(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + * @return The completeness. + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getCompleteness(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder getCompletenessOrBuilder(); + + /** + * bool reproducible = 5; + * @return The reproducible. + */ + boolean getReproducible(); + } + /** + *
+   * Other properties of the build.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata} + */ + public static final class SlsaMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) + SlsaMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaMetadata.newBuilder() to construct. + private SlsaMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaMetadata() { + buildInvocationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder.class); + } + + public static final int BUILD_INVOCATION_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object buildInvocationId_ = ""; + /** + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + @java.lang.Override + public java.lang.String getBuildInvocationId() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildInvocationId_ = s; + return s; + } + } + /** + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBuildInvocationIdBytes() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildInvocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUILD_STARTED_ON_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp buildStartedOn_; + /** + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + @java.lang.Override + public boolean hasBuildStartedOn() { + return buildStartedOn_ != null; + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getBuildStartedOn() { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + + public static final int BUILD_FINISHED_ON_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp buildFinishedOn_; + /** + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + @java.lang.Override + public boolean hasBuildFinishedOn() { + return buildFinishedOn_ != null; + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getBuildFinishedOn() { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + + public static final int COMPLETENESS_FIELD_NUMBER = 4; + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + * @return Whether the completeness field is set. + */ + @java.lang.Override + public boolean hasCompleteness() { + return completeness_ != null; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + * @return The completeness. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getCompleteness() { + return completeness_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { + return completeness_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; + } + + public static final int REPRODUCIBLE_FIELD_NUMBER = 5; + private boolean reproducible_ = false; + /** + * bool reproducible = 5; + * @return The reproducible. + */ + @java.lang.Override + public boolean getReproducible() { + return reproducible_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, buildInvocationId_); + } + if (buildStartedOn_ != null) { + output.writeMessage(2, getBuildStartedOn()); + } + if (buildFinishedOn_ != null) { + output.writeMessage(3, getBuildFinishedOn()); + } + if (completeness_ != null) { + output.writeMessage(4, getCompleteness()); + } + if (reproducible_ != false) { + output.writeBool(5, reproducible_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, buildInvocationId_); + } + if (buildStartedOn_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBuildStartedOn()); + } + if (buildFinishedOn_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getBuildFinishedOn()); + } + if (completeness_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCompleteness()); + } + if (reproducible_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, reproducible_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) obj; + + if (!getBuildInvocationId() + .equals(other.getBuildInvocationId())) return false; + if (hasBuildStartedOn() != other.hasBuildStartedOn()) return false; + if (hasBuildStartedOn()) { + if (!getBuildStartedOn() + .equals(other.getBuildStartedOn())) return false; + } + if (hasBuildFinishedOn() != other.hasBuildFinishedOn()) return false; + if (hasBuildFinishedOn()) { + if (!getBuildFinishedOn() + .equals(other.getBuildFinishedOn())) return false; + } + if (hasCompleteness() != other.hasCompleteness()) return false; + if (hasCompleteness()) { + if (!getCompleteness() + .equals(other.getCompleteness())) return false; + } + if (getReproducible() + != other.getReproducible()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BUILD_INVOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getBuildInvocationId().hashCode(); + if (hasBuildStartedOn()) { + hash = (37 * hash) + BUILD_STARTED_ON_FIELD_NUMBER; + hash = (53 * hash) + getBuildStartedOn().hashCode(); + } + if (hasBuildFinishedOn()) { + hash = (37 * hash) + BUILD_FINISHED_ON_FIELD_NUMBER; + hash = (53 * hash) + getBuildFinishedOn().hashCode(); + } + if (hasCompleteness()) { + hash = (37 * hash) + COMPLETENESS_FIELD_NUMBER; + hash = (53 * hash) + getCompleteness().hashCode(); + } + hash = (37 * hash) + REPRODUCIBLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReproducible()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Other properties of the build.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + buildInvocationId_ = ""; + buildStartedOn_ = null; + if (buildStartedOnBuilder_ != null) { + buildStartedOnBuilder_.dispose(); + buildStartedOnBuilder_ = null; + } + buildFinishedOn_ = null; + if (buildFinishedOnBuilder_ != null) { + buildFinishedOnBuilder_.dispose(); + buildFinishedOnBuilder_ = null; + } + completeness_ = null; + if (completenessBuilder_ != null) { + completenessBuilder_.dispose(); + completenessBuilder_ = null; + } + reproducible_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata build() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata buildPartial() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.buildInvocationId_ = buildInvocationId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.buildStartedOn_ = buildStartedOnBuilder_ == null + ? buildStartedOn_ + : buildStartedOnBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.buildFinishedOn_ = buildFinishedOnBuilder_ == null + ? buildFinishedOn_ + : buildFinishedOnBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.completeness_ = completenessBuilder_ == null + ? completeness_ + : completenessBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.reproducible_ = reproducible_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) { + return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata other) { + if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance()) return this; + if (!other.getBuildInvocationId().isEmpty()) { + buildInvocationId_ = other.buildInvocationId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasBuildStartedOn()) { + mergeBuildStartedOn(other.getBuildStartedOn()); + } + if (other.hasBuildFinishedOn()) { + mergeBuildFinishedOn(other.getBuildFinishedOn()); + } + if (other.hasCompleteness()) { + mergeCompleteness(other.getCompleteness()); + } + if (other.getReproducible() != false) { + setReproducible(other.getReproducible()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + buildInvocationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getBuildStartedOnFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getBuildFinishedOnFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getCompletenessFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + reproducible_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object buildInvocationId_ = ""; + /** + * string build_invocation_id = 1; + * @return The buildInvocationId. + */ + public java.lang.String getBuildInvocationId() { + java.lang.Object ref = buildInvocationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildInvocationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string build_invocation_id = 1; + * @return The bytes for buildInvocationId. + */ + public com.google.protobuf.ByteString + getBuildInvocationIdBytes() { + java.lang.Object ref = buildInvocationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildInvocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string build_invocation_id = 1; + * @param value The buildInvocationId to set. + * @return This builder for chaining. + */ + public Builder setBuildInvocationId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + buildInvocationId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string build_invocation_id = 1; + * @return This builder for chaining. + */ + public Builder clearBuildInvocationId() { + buildInvocationId_ = getDefaultInstance().getBuildInvocationId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string build_invocation_id = 1; + * @param value The bytes for buildInvocationId to set. + * @return This builder for chaining. + */ + public Builder setBuildInvocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + buildInvocationId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp buildStartedOn_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildStartedOnBuilder_; + /** + * .google.protobuf.Timestamp build_started_on = 2; + * @return Whether the buildStartedOn field is set. + */ + public boolean hasBuildStartedOn() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + * @return The buildStartedOn. + */ + public com.google.protobuf.Timestamp getBuildStartedOn() { + if (buildStartedOnBuilder_ == null) { + return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } else { + return buildStartedOnBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder setBuildStartedOn(com.google.protobuf.Timestamp value) { + if (buildStartedOnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + buildStartedOn_ = value; + } else { + buildStartedOnBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder setBuildStartedOn( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (buildStartedOnBuilder_ == null) { + buildStartedOn_ = builderForValue.build(); + } else { + buildStartedOnBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder mergeBuildStartedOn(com.google.protobuf.Timestamp value) { + if (buildStartedOnBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + buildStartedOn_ != null && + buildStartedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getBuildStartedOnBuilder().mergeFrom(value); + } else { + buildStartedOn_ = value; + } + } else { + buildStartedOnBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + public Builder clearBuildStartedOn() { + bitField0_ = (bitField0_ & ~0x00000002); + buildStartedOn_ = null; + if (buildStartedOnBuilder_ != null) { + buildStartedOnBuilder_.dispose(); + buildStartedOnBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + public com.google.protobuf.Timestamp.Builder getBuildStartedOnBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBuildStartedOnFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { + if (buildStartedOnBuilder_ != null) { + return buildStartedOnBuilder_.getMessageOrBuilder(); + } else { + return buildStartedOn_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; + } + } + /** + * .google.protobuf.Timestamp build_started_on = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getBuildStartedOnFieldBuilder() { + if (buildStartedOnBuilder_ == null) { + buildStartedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getBuildStartedOn(), + getParentForChildren(), + isClean()); + buildStartedOn_ = null; + } + return buildStartedOnBuilder_; + } + + private com.google.protobuf.Timestamp buildFinishedOn_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildFinishedOnBuilder_; + /** + * .google.protobuf.Timestamp build_finished_on = 3; + * @return Whether the buildFinishedOn field is set. + */ + public boolean hasBuildFinishedOn() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + * @return The buildFinishedOn. + */ + public com.google.protobuf.Timestamp getBuildFinishedOn() { + if (buildFinishedOnBuilder_ == null) { + return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } else { + return buildFinishedOnBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder setBuildFinishedOn(com.google.protobuf.Timestamp value) { + if (buildFinishedOnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + buildFinishedOn_ = value; + } else { + buildFinishedOnBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder setBuildFinishedOn( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (buildFinishedOnBuilder_ == null) { + buildFinishedOn_ = builderForValue.build(); + } else { + buildFinishedOnBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder mergeBuildFinishedOn(com.google.protobuf.Timestamp value) { + if (buildFinishedOnBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + buildFinishedOn_ != null && + buildFinishedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getBuildFinishedOnBuilder().mergeFrom(value); + } else { + buildFinishedOn_ = value; + } + } else { + buildFinishedOnBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public Builder clearBuildFinishedOn() { + bitField0_ = (bitField0_ & ~0x00000004); + buildFinishedOn_ = null; + if (buildFinishedOnBuilder_ != null) { + buildFinishedOnBuilder_.dispose(); + buildFinishedOnBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public com.google.protobuf.Timestamp.Builder getBuildFinishedOnBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBuildFinishedOnFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { + if (buildFinishedOnBuilder_ != null) { + return buildFinishedOnBuilder_.getMessageOrBuilder(); + } else { + return buildFinishedOn_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; + } + } + /** + * .google.protobuf.Timestamp build_finished_on = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getBuildFinishedOnFieldBuilder() { + if (buildFinishedOnBuilder_ == null) { + buildFinishedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getBuildFinishedOn(), + getParentForChildren(), + isClean()); + buildFinishedOn_ = null; + } + return buildFinishedOnBuilder_; + } + + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder> completenessBuilder_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + * @return Whether the completeness field is set. + */ + public boolean hasCompleteness() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + * @return The completeness. + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getCompleteness() { + if (completenessBuilder_ == null) { + return completeness_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; + } else { + return completenessBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + public Builder setCompleteness(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness value) { + if (completenessBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + completeness_ = value; + } else { + completenessBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + public Builder setCompleteness( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder builderForValue) { + if (completenessBuilder_ == null) { + completeness_ = builderForValue.build(); + } else { + completenessBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + public Builder mergeCompleteness(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness value) { + if (completenessBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + completeness_ != null && + completeness_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance()) { + getCompletenessBuilder().mergeFrom(value); + } else { + completeness_ = value; + } + } else { + completenessBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + public Builder clearCompleteness() { + bitField0_ = (bitField0_ & ~0x00000008); + completeness_ = null; + if (completenessBuilder_ != null) { + completenessBuilder_.dispose(); + completenessBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder getCompletenessBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCompletenessFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { + if (completenessBuilder_ != null) { + return completenessBuilder_.getMessageOrBuilder(); + } else { + return completeness_ == null ? + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder> + getCompletenessFieldBuilder() { + if (completenessBuilder_ == null) { + completenessBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder>( + getCompleteness(), + getParentForChildren(), + isClean()); + completeness_ = null; + } + return completenessBuilder_; + } + + private boolean reproducible_ ; + /** + * bool reproducible = 5; + * @return The reproducible. + */ + @java.lang.Override + public boolean getReproducible() { + return reproducible_; + } + /** + * bool reproducible = 5; + * @param value The reproducible to set. + * @return This builder for chaining. + */ + public Builder setReproducible(boolean value) { + + reproducible_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * bool reproducible = 5; + * @return This builder for chaining. + */ + public Builder clearReproducible() { + bitField0_ = (bitField0_ & ~0x00000010); + reproducible_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) + private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata(); + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SlsaCompletenessOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) + com.google.protobuf.MessageOrBuilder { + + /** + * bool parameters = 1; + * @return The parameters. + */ + boolean getParameters(); + + /** + * bool environment = 2; + * @return The environment. + */ + boolean getEnvironment(); + + /** + * bool materials = 3; + * @return The materials. + */ + boolean getMaterials(); + } + /** + *
+   * Indicates that the builder claims certain fields in this message to be
+   * complete.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness} + */ + public static final class SlsaCompleteness extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) + SlsaCompletenessOrBuilder { + private static final long serialVersionUID = 0L; + // Use SlsaCompleteness.newBuilder() to construct. + private SlsaCompleteness(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SlsaCompleteness() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SlsaCompleteness(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder.class); + } + + public static final int PARAMETERS_FIELD_NUMBER = 1; + private boolean parameters_ = false; + /** + * bool parameters = 1; + * @return The parameters. + */ + @java.lang.Override + public boolean getParameters() { + return parameters_; + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 2; + private boolean environment_ = false; + /** + * bool environment = 2; + * @return The environment. + */ + @java.lang.Override + public boolean getEnvironment() { + return environment_; + } + + public static final int MATERIALS_FIELD_NUMBER = 3; + private boolean materials_ = false; + /** + * bool materials = 3; + * @return The materials. + */ + @java.lang.Override + public boolean getMaterials() { + return materials_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (parameters_ != false) { + output.writeBool(1, parameters_); + } + if (environment_ != false) { + output.writeBool(2, environment_); + } + if (materials_ != false) { + output.writeBool(3, materials_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (parameters_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, parameters_); + } + if (environment_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, environment_); + } + if (materials_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, materials_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) obj; + + if (getParameters() + != other.getParameters()) return false; + if (getEnvironment() + != other.getEnvironment()) return false; + if (getMaterials() + != other.getMaterials()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getParameters()); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnvironment()); + hash = (37 * hash) + MATERIALS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMaterials()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Indicates that the builder claims certain fields in this message to be
+     * complete.
+     * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parameters_ = false; + environment_ = false; + materials_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness build() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness buildPartial() { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parameters_ = parameters_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.environment_ = environment_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.materials_ = materials_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) { + return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness other) { + if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance()) return this; + if (other.getParameters() != false) { + setParameters(other.getParameters()); + } + if (other.getEnvironment() != false) { + setEnvironment(other.getEnvironment()); + } + if (other.getMaterials() != false) { + setMaterials(other.getMaterials()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + parameters_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + environment_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + materials_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean parameters_ ; + /** + * bool parameters = 1; + * @return The parameters. + */ + @java.lang.Override + public boolean getParameters() { + return parameters_; + } + /** + * bool parameters = 1; + * @param value The parameters to set. + * @return This builder for chaining. + */ + public Builder setParameters(boolean value) { + + parameters_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool parameters = 1; + * @return This builder for chaining. + */ + public Builder clearParameters() { + bitField0_ = (bitField0_ & ~0x00000001); + parameters_ = false; + onChanged(); + return this; + } + + private boolean environment_ ; + /** + * bool environment = 2; + * @return The environment. + */ + @java.lang.Override + public boolean getEnvironment() { + return environment_; + } + /** + * bool environment = 2; + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(boolean value) { + + environment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool environment = 2; + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + bitField0_ = (bitField0_ & ~0x00000002); + environment_ = false; + onChanged(); + return this; + } + + private boolean materials_ ; + /** + * bool materials = 3; + * @return The materials. + */ + @java.lang.Override + public boolean getMaterials() { + return materials_; + } + /** + * bool materials = 3; + * @param value The materials to set. + * @return This builder for chaining. + */ + public Builder setMaterials(boolean value) { + + materials_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool materials = 3; + * @return This builder for chaining. + */ + public Builder clearMaterials() { + bitField0_ = (bitField0_ & ~0x00000004); + materials_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) + private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness(); + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaCompleteness parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int BUILDER_FIELD_NUMBER = 1; + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + * @return Whether the builder field is set. + */ + @java.lang.Override + public boolean hasBuilder() { + return builder_ != null; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + * @return The builder. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getBuilder() { + return builder_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder getBuilderOrBuilder() { + return builder_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; + } + + public static final int BUILD_TYPE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object buildType_ = ""; + /** + * string build_type = 2; + * @return The buildType. + */ + @java.lang.Override + public java.lang.String getBuildType() { + java.lang.Object ref = buildType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildType_ = s; + return s; + } + } + /** + * string build_type = 2; + * @return The bytes for buildType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBuildTypeBytes() { + java.lang.Object ref = buildType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INVOCATION_FIELD_NUMBER = 3; + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + * @return Whether the invocation field is set. + */ + @java.lang.Override + public boolean hasInvocation() { + return invocation_ != null; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + * @return The invocation. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getInvocation() { + return invocation_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder getInvocationOrBuilder() { + return invocation_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; + } + + public static final int BUILD_CONFIG_FIELD_NUMBER = 4; + private com.google.protobuf.Struct buildConfig_; + /** + * .google.protobuf.Struct build_config = 4; + * @return Whether the buildConfig field is set. + */ + @java.lang.Override + public boolean hasBuildConfig() { + return buildConfig_ != null; + } + /** + * .google.protobuf.Struct build_config = 4; + * @return The buildConfig. + */ + @java.lang.Override + public com.google.protobuf.Struct getBuildConfig() { + return buildConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; + } + /** + * .google.protobuf.Struct build_config = 4; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getBuildConfigOrBuilder() { + return buildConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; + } + + public static final int METADATA_FIELD_NUMBER = 5; + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + * @return The metadata. + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getMetadata() { + return metadata_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; + } + + public static final int MATERIALS_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private java.util.List materials_; + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + @java.lang.Override + public java.util.List getMaterialsList() { + return materials_; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + @java.lang.Override + public java.util.List + getMaterialsOrBuilderList() { + return materials_; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + @java.lang.Override + public int getMaterialsCount() { + return materials_.size(); + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getMaterials(int index) { + return materials_.get(index); + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder getMaterialsOrBuilder( + int index) { + return materials_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (builder_ != null) { + output.writeMessage(1, getBuilder()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, buildType_); + } + if (invocation_ != null) { + output.writeMessage(3, getInvocation()); + } + if (buildConfig_ != null) { + output.writeMessage(4, getBuildConfig()); + } + if (metadata_ != null) { + output.writeMessage(5, getMetadata()); + } + for (int i = 0; i < materials_.size(); i++) { + output.writeMessage(6, materials_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (builder_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBuilder()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, buildType_); + } + if (invocation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getInvocation()); + } + if (buildConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getBuildConfig()); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getMetadata()); + } + for (int i = 0; i < materials_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, materials_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo)) { + return super.equals(obj); + } + io.grafeas.v1.SlsaProvenanceZeroTwo other = (io.grafeas.v1.SlsaProvenanceZeroTwo) obj; + + if (hasBuilder() != other.hasBuilder()) return false; + if (hasBuilder()) { + if (!getBuilder() + .equals(other.getBuilder())) return false; + } + if (!getBuildType() + .equals(other.getBuildType())) return false; + if (hasInvocation() != other.hasInvocation()) return false; + if (hasInvocation()) { + if (!getInvocation() + .equals(other.getInvocation())) return false; + } + if (hasBuildConfig() != other.hasBuildConfig()) return false; + if (hasBuildConfig()) { + if (!getBuildConfig() + .equals(other.getBuildConfig())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getMaterialsList() + .equals(other.getMaterialsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBuilder()) { + hash = (37 * hash) + BUILDER_FIELD_NUMBER; + hash = (53 * hash) + getBuilder().hashCode(); + } + hash = (37 * hash) + BUILD_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getBuildType().hashCode(); + if (hasInvocation()) { + hash = (37 * hash) + INVOCATION_FIELD_NUMBER; + hash = (53 * hash) + getInvocation().hashCode(); + } + if (hasBuildConfig()) { + hash = (37 * hash) + BUILD_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBuildConfig().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (getMaterialsCount() > 0) { + hash = (37 * hash) + MATERIALS_FIELD_NUMBER; + hash = (53 * hash) + getMaterialsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * See full explanation of fields at slsa.dev/provenance/v0.2.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo) + io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SlsaProvenanceZeroTwo.class, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder.class); + } + + // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + builder_ = null; + if (builderBuilder_ != null) { + builderBuilder_.dispose(); + builderBuilder_ = null; + } + buildType_ = ""; + invocation_ = null; + if (invocationBuilder_ != null) { + invocationBuilder_.dispose(); + invocationBuilder_ = null; + } + buildConfig_ = null; + if (buildConfigBuilder_ != null) { + buildConfigBuilder_.dispose(); + buildConfigBuilder_ = null; + } + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + if (materialsBuilder_ == null) { + materials_ = java.util.Collections.emptyList(); + } else { + materials_ = null; + materialsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo getDefaultInstanceForType() { + return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo build() { + io.grafeas.v1.SlsaProvenanceZeroTwo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo buildPartial() { + io.grafeas.v1.SlsaProvenanceZeroTwo result = new io.grafeas.v1.SlsaProvenanceZeroTwo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.SlsaProvenanceZeroTwo result) { + if (materialsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + materials_ = java.util.Collections.unmodifiableList(materials_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.materials_ = materials_; + } else { + result.materials_ = materialsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.builder_ = builderBuilder_ == null + ? builder_ + : builderBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.buildType_ = buildType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.invocation_ = invocationBuilder_ == null + ? invocation_ + : invocationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.buildConfig_ = buildConfigBuilder_ == null + ? buildConfig_ + : buildConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo) { + return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo other) { + if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance()) return this; + if (other.hasBuilder()) { + mergeBuilder(other.getBuilder()); + } + if (!other.getBuildType().isEmpty()) { + buildType_ = other.buildType_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasInvocation()) { + mergeInvocation(other.getInvocation()); + } + if (other.hasBuildConfig()) { + mergeBuildConfig(other.getBuildConfig()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (materialsBuilder_ == null) { + if (!other.materials_.isEmpty()) { + if (materials_.isEmpty()) { + materials_ = other.materials_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureMaterialsIsMutable(); + materials_.addAll(other.materials_); + } + onChanged(); + } + } else { + if (!other.materials_.isEmpty()) { + if (materialsBuilder_.isEmpty()) { + materialsBuilder_.dispose(); + materialsBuilder_ = null; + materials_ = other.materials_; + bitField0_ = (bitField0_ & ~0x00000020); + materialsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMaterialsFieldBuilder() : null; + } else { + materialsBuilder_.addAllMessages(other.materials_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getBuilderFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + buildType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getInvocationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getBuildConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial m = + input.readMessage( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.parser(), + extensionRegistry); + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.add(m); + } else { + materialsBuilder_.addMessage(m); + } + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder> builderBuilder_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + * @return Whether the builder field is set. + */ + public boolean hasBuilder() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + * @return The builder. + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getBuilder() { + if (builderBuilder_ == null) { + return builder_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; + } else { + return builderBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + public Builder setBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder value) { + if (builderBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + builder_ = value; + } else { + builderBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + public Builder setBuilder( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder builderForValue) { + if (builderBuilder_ == null) { + builder_ = builderForValue.build(); + } else { + builderBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + public Builder mergeBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder value) { + if (builderBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + builder_ != null && + builder_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance()) { + getBuilderBuilder().mergeFrom(value); + } else { + builder_ = value; + } + } else { + builderBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + public Builder clearBuilder() { + bitField0_ = (bitField0_ & ~0x00000001); + builder_ = null; + if (builderBuilder_ != null) { + builderBuilder_.dispose(); + builderBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder getBuilderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBuilderFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder getBuilderOrBuilder() { + if (builderBuilder_ != null) { + return builderBuilder_.getMessageOrBuilder(); + } else { + return builder_ == null ? + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder> + getBuilderFieldBuilder() { + if (builderBuilder_ == null) { + builderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder>( + getBuilder(), + getParentForChildren(), + isClean()); + builder_ = null; + } + return builderBuilder_; + } + + private java.lang.Object buildType_ = ""; + /** + * string build_type = 2; + * @return The buildType. + */ + public java.lang.String getBuildType() { + java.lang.Object ref = buildType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string build_type = 2; + * @return The bytes for buildType. + */ + public com.google.protobuf.ByteString + getBuildTypeBytes() { + java.lang.Object ref = buildType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string build_type = 2; + * @param value The buildType to set. + * @return This builder for chaining. + */ + public Builder setBuildType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + buildType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string build_type = 2; + * @return This builder for chaining. + */ + public Builder clearBuildType() { + buildType_ = getDefaultInstance().getBuildType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string build_type = 2; + * @param value The bytes for buildType to set. + * @return This builder for chaining. + */ + public Builder setBuildTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + buildType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder> invocationBuilder_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + * @return Whether the invocation field is set. + */ + public boolean hasInvocation() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + * @return The invocation. + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getInvocation() { + if (invocationBuilder_ == null) { + return invocation_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; + } else { + return invocationBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + public Builder setInvocation(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation value) { + if (invocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + invocation_ = value; + } else { + invocationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + public Builder setInvocation( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder builderForValue) { + if (invocationBuilder_ == null) { + invocation_ = builderForValue.build(); + } else { + invocationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + public Builder mergeInvocation(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation value) { + if (invocationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + invocation_ != null && + invocation_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance()) { + getInvocationBuilder().mergeFrom(value); + } else { + invocation_ = value; + } + } else { + invocationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + public Builder clearInvocation() { + bitField0_ = (bitField0_ & ~0x00000004); + invocation_ = null; + if (invocationBuilder_ != null) { + invocationBuilder_.dispose(); + invocationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder getInvocationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getInvocationFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder getInvocationOrBuilder() { + if (invocationBuilder_ != null) { + return invocationBuilder_.getMessageOrBuilder(); + } else { + return invocation_ == null ? + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder> + getInvocationFieldBuilder() { + if (invocationBuilder_ == null) { + invocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder>( + getInvocation(), + getParentForChildren(), + isClean()); + invocation_ = null; + } + return invocationBuilder_; + } + + private com.google.protobuf.Struct buildConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> buildConfigBuilder_; + /** + * .google.protobuf.Struct build_config = 4; + * @return Whether the buildConfig field is set. + */ + public boolean hasBuildConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .google.protobuf.Struct build_config = 4; + * @return The buildConfig. + */ + public com.google.protobuf.Struct getBuildConfig() { + if (buildConfigBuilder_ == null) { + return buildConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; + } else { + return buildConfigBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Struct build_config = 4; + */ + public Builder setBuildConfig(com.google.protobuf.Struct value) { + if (buildConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + buildConfig_ = value; + } else { + buildConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct build_config = 4; + */ + public Builder setBuildConfig( + com.google.protobuf.Struct.Builder builderForValue) { + if (buildConfigBuilder_ == null) { + buildConfig_ = builderForValue.build(); + } else { + buildConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct build_config = 4; + */ + public Builder mergeBuildConfig(com.google.protobuf.Struct value) { + if (buildConfigBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + buildConfig_ != null && + buildConfig_ != com.google.protobuf.Struct.getDefaultInstance()) { + getBuildConfigBuilder().mergeFrom(value); + } else { + buildConfig_ = value; + } + } else { + buildConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct build_config = 4; + */ + public Builder clearBuildConfig() { + bitField0_ = (bitField0_ & ~0x00000008); + buildConfig_ = null; + if (buildConfigBuilder_ != null) { + buildConfigBuilder_.dispose(); + buildConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Struct build_config = 4; + */ + public com.google.protobuf.Struct.Builder getBuildConfigBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getBuildConfigFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Struct build_config = 4; + */ + public com.google.protobuf.StructOrBuilder getBuildConfigOrBuilder() { + if (buildConfigBuilder_ != null) { + return buildConfigBuilder_.getMessageOrBuilder(); + } else { + return buildConfig_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; + } + } + /** + * .google.protobuf.Struct build_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getBuildConfigFieldBuilder() { + if (buildConfigBuilder_ == null) { + buildConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getBuildConfig(), + getParentForChildren(), + isClean()); + buildConfig_ = null; + } + return buildConfigBuilder_; + } + + private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder> metadataBuilder_; + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + * @return The metadata. + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + public Builder setMetadata(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + public Builder setMetadata( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + public Builder mergeMetadata(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + metadata_ != null && + metadata_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000010); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; + } + } + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private java.util.List materials_ = + java.util.Collections.emptyList(); + private void ensureMaterialsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + materials_ = new java.util.ArrayList(materials_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder> materialsBuilder_; + + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public java.util.List getMaterialsList() { + if (materialsBuilder_ == null) { + return java.util.Collections.unmodifiableList(materials_); + } else { + return materialsBuilder_.getMessageList(); + } + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public int getMaterialsCount() { + if (materialsBuilder_ == null) { + return materials_.size(); + } else { + return materialsBuilder_.getCount(); + } + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getMaterials(int index) { + if (materialsBuilder_ == null) { + return materials_.get(index); + } else { + return materialsBuilder_.getMessage(index); + } + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder setMaterials( + int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial value) { + if (materialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaterialsIsMutable(); + materials_.set(index, value); + onChanged(); + } else { + materialsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder setMaterials( + int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder builderForValue) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.set(index, builderForValue.build()); + onChanged(); + } else { + materialsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder addMaterials(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial value) { + if (materialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaterialsIsMutable(); + materials_.add(value); + onChanged(); + } else { + materialsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder addMaterials( + int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial value) { + if (materialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaterialsIsMutable(); + materials_.add(index, value); + onChanged(); + } else { + materialsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder addMaterials( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder builderForValue) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.add(builderForValue.build()); + onChanged(); + } else { + materialsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder addMaterials( + int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder builderForValue) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.add(index, builderForValue.build()); + onChanged(); + } else { + materialsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder addAllMaterials( + java.lang.Iterable values) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, materials_); + onChanged(); + } else { + materialsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder clearMaterials() { + if (materialsBuilder_ == null) { + materials_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + materialsBuilder_.clear(); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public Builder removeMaterials(int index) { + if (materialsBuilder_ == null) { + ensureMaterialsIsMutable(); + materials_.remove(index); + onChanged(); + } else { + materialsBuilder_.remove(index); + } + return this; + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder getMaterialsBuilder( + int index) { + return getMaterialsFieldBuilder().getBuilder(index); + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder getMaterialsOrBuilder( + int index) { + if (materialsBuilder_ == null) { + return materials_.get(index); } else { + return materialsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public java.util.List + getMaterialsOrBuilderList() { + if (materialsBuilder_ != null) { + return materialsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(materials_); + } + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder addMaterialsBuilder() { + return getMaterialsFieldBuilder().addBuilder( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder addMaterialsBuilder( + int index) { + return getMaterialsFieldBuilder().addBuilder( + index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance()); + } + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + public java.util.List + getMaterialsBuilderList() { + return getMaterialsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder> + getMaterialsFieldBuilder() { + if (materialsBuilder_ == null) { + materialsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder>( + materials_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + materials_ = null; + } + return materialsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo) + private static final io.grafeas.v1.SlsaProvenanceZeroTwo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo(); + } + + public static io.grafeas.v1.SlsaProvenanceZeroTwo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SlsaProvenanceZeroTwo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SlsaProvenanceZeroTwo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java new file mode 100644 index 000000000000..42e35172f0ca --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java @@ -0,0 +1,105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/slsa_provenance_zero_two.proto + +package io.grafeas.v1; + +public interface SlsaProvenanceZeroTwoOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo) + com.google.protobuf.MessageOrBuilder { + + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + * @return Whether the builder field is set. + */ + boolean hasBuilder(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + * @return The builder. + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getBuilder(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder getBuilderOrBuilder(); + + /** + * string build_type = 2; + * @return The buildType. + */ + java.lang.String getBuildType(); + /** + * string build_type = 2; + * @return The bytes for buildType. + */ + com.google.protobuf.ByteString + getBuildTypeBytes(); + + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + * @return Whether the invocation field is set. + */ + boolean hasInvocation(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + * @return The invocation. + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getInvocation(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder getInvocationOrBuilder(); + + /** + * .google.protobuf.Struct build_config = 4; + * @return Whether the buildConfig field is set. + */ + boolean hasBuildConfig(); + /** + * .google.protobuf.Struct build_config = 4; + * @return The buildConfig. + */ + com.google.protobuf.Struct getBuildConfig(); + /** + * .google.protobuf.Struct build_config = 4; + */ + com.google.protobuf.StructOrBuilder getBuildConfigOrBuilder(); + + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + * @return The metadata. + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getMetadata(); + /** + * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder getMetadataOrBuilder(); + + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + java.util.List + getMaterialsList(); + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getMaterials(int index); + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + int getMaterialsCount(); + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + java.util.List + getMaterialsOrBuilderList(); + /** + * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder getMaterialsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java new file mode 100644 index 000000000000..eec7126b0270 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java @@ -0,0 +1,174 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/slsa_provenance_zero_two.proto + +package io.grafeas.v1; + +public final class SlsaProvenanceZeroTwoProto { + private SlsaProvenanceZeroTwoProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n)grafeas/v1/slsa_provenance_zero_two.pr" + + "oto\022\ngrafeas.v1\032\034google/protobuf/struct." + + "proto\032\037google/protobuf/timestamp.proto\"\323" + + "\t\n\025SlsaProvenanceZeroTwo\022>\n\007builder\030\001 \001(" + + "\0132-.grafeas.v1.SlsaProvenanceZeroTwo.Sls" + + "aBuilder\022\022\n\nbuild_type\030\002 \001(\t\022D\n\ninvocati" + + "on\030\003 \001(\01320.grafeas.v1.SlsaProvenanceZero" + + "Two.SlsaInvocation\022-\n\014build_config\030\004 \001(\013" + + "2\027.google.protobuf.Struct\022@\n\010metadata\030\005 " + + "\001(\0132..grafeas.v1.SlsaProvenanceZeroTwo.S" + + "lsaMetadata\022A\n\tmaterials\030\006 \003(\0132..grafeas" + + ".v1.SlsaProvenanceZeroTwo.SlsaMaterial\032\031" + + "\n\013SlsaBuilder\022\n\n\002id\030\001 \001(\t\032\226\001\n\014SlsaMateri" + + "al\022\013\n\003uri\030\001 \001(\t\022J\n\006digest\030\002 \003(\0132:.grafea" + + "s.v1.SlsaProvenanceZeroTwo.SlsaMaterial." + + "DigestEntry\032-\n\013DigestEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001\032\266\001\n\016SlsaInvocation\022I\n" + + "\rconfig_source\030\001 \001(\01322.grafeas.v1.SlsaPr" + + "ovenanceZeroTwo.SlsaConfigSource\022+\n\npara" + + "meters\030\002 \001(\0132\027.google.protobuf.Struct\022,\n" + + "\013environment\030\003 \001(\0132\027.google.protobuf.Str" + + "uct\032\263\001\n\020SlsaConfigSource\022\013\n\003uri\030\001 \001(\t\022N\n" + + "\006digest\030\002 \003(\0132>.grafeas.v1.SlsaProvenanc" + + "eZeroTwo.SlsaConfigSource.DigestEntry\022\023\n" + + "\013entry_point\030\003 \001(\t\032-\n\013DigestEntry\022\013\n\003key" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032\370\001\n\014SlsaMetada" + + "ta\022\033\n\023build_invocation_id\030\001 \001(\t\0224\n\020build" + + "_started_on\030\002 \001(\0132\032.google.protobuf.Time" + + "stamp\0225\n\021build_finished_on\030\003 \001(\0132\032.googl" + + "e.protobuf.Timestamp\022H\n\014completeness\030\004 \001" + + "(\01322.grafeas.v1.SlsaProvenanceZeroTwo.Sl" + + "saCompleteness\022\024\n\014reproducible\030\005 \001(\010\032N\n\020" + + "SlsaCompleteness\022\022\n\nparameters\030\001 \001(\010\022\023\n\013" + + "environment\030\002 \001(\010\022\021\n\tmaterials\030\003 \001(\010Bm\n\r" + + "io.grafeas.v1B\032SlsaProvenanceZeroTwoProt" + + "oP\001Z8google.golang.org/genproto/googleap" + + "is/grafeas/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor, + new java.lang.String[] { "Builder", "BuildType", "Invocation", "BuildConfig", "Metadata", "Materials", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor, + new java.lang.String[] { "Id", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor, + new java.lang.String[] { "Uri", "Digest", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(2); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor, + new java.lang.String[] { "ConfigSource", "Parameters", "Environment", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(3); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor, + new java.lang.String[] { "Uri", "Digest", "EntryPoint", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(4); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor, + new java.lang.String[] { "BuildInvocationId", "BuildStartedOn", "BuildFinishedOn", "Completeness", "Reproducible", }); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor = + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(5); + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor, + new java.lang.String[] { "Parameters", "Environment", "Materials", }); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java new file mode 100644 index 000000000000..17dcda68fad0 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java @@ -0,0 +1,1709 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * Source describes the location of the source used for the build.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Source} + */ +public final class Source extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Source) + SourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use Source.newBuilder() to construct. + private Source(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Source() { + artifactStorageSourceUri_ = ""; + additionalContexts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Source(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetFileHashes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Source.class, io.grafeas.v1.Source.Builder.class); + } + + public static final int ARTIFACT_STORAGE_SOURCE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object artifactStorageSourceUri_ = ""; + /** + *
+   * If provided, the input binary artifacts for the build came from this
+   * location.
+   * 
+ * + * string artifact_storage_source_uri = 1; + * @return The artifactStorageSourceUri. + */ + @java.lang.Override + public java.lang.String getArtifactStorageSourceUri() { + java.lang.Object ref = artifactStorageSourceUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactStorageSourceUri_ = s; + return s; + } + } + /** + *
+   * If provided, the input binary artifacts for the build came from this
+   * location.
+   * 
+ * + * string artifact_storage_source_uri = 1; + * @return The bytes for artifactStorageSourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getArtifactStorageSourceUriBytes() { + java.lang.Object ref = artifactStorageSourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + artifactStorageSourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_HASHES_FIELD_NUMBER = 2; + private static final class FileHashesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, io.grafeas.v1.FileHashes> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_FileHashesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + io.grafeas.v1.FileHashes.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, io.grafeas.v1.FileHashes> fileHashes_; + private com.google.protobuf.MapField + internalGetFileHashes() { + if (fileHashes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FileHashesDefaultEntryHolder.defaultEntry); + } + return fileHashes_; + } + public int getFileHashesCount() { + return internalGetFileHashes().getMap().size(); + } + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public boolean containsFileHashes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetFileHashes().getMap().containsKey(key); + } + /** + * Use {@link #getFileHashesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFileHashes() { + return getFileHashesMap(); + } + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public java.util.Map getFileHashesMap() { + return internalGetFileHashes().getMap(); + } + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public /* nullable */ +io.grafeas.v1.FileHashes getFileHashesOrDefault( + java.lang.String key, + /* nullable */ +io.grafeas.v1.FileHashes defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetFileHashes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public io.grafeas.v1.FileHashes getFileHashesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetFileHashes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CONTEXT_FIELD_NUMBER = 3; + private io.grafeas.v1.SourceContext context_; + /** + *
+   * If provided, the source code used for the build came from this location.
+   * 
+ * + * .grafeas.v1.SourceContext context = 3; + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + *
+   * If provided, the source code used for the build came from this location.
+   * 
+ * + * .grafeas.v1.SourceContext context = 3; + * @return The context. + */ + @java.lang.Override + public io.grafeas.v1.SourceContext getContext() { + return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_; + } + /** + *
+   * If provided, the source code used for the build came from this location.
+   * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + @java.lang.Override + public io.grafeas.v1.SourceContextOrBuilder getContextOrBuilder() { + return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_; + } + + public static final int ADDITIONAL_CONTEXTS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List additionalContexts_; + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + @java.lang.Override + public java.util.List getAdditionalContextsList() { + return additionalContexts_; + } + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + @java.lang.Override + public java.util.List + getAdditionalContextsOrBuilderList() { + return additionalContexts_; + } + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + @java.lang.Override + public int getAdditionalContextsCount() { + return additionalContexts_.size(); + } + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + @java.lang.Override + public io.grafeas.v1.SourceContext getAdditionalContexts(int index) { + return additionalContexts_.get(index); + } + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + @java.lang.Override + public io.grafeas.v1.SourceContextOrBuilder getAdditionalContextsOrBuilder( + int index) { + return additionalContexts_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorageSourceUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, artifactStorageSourceUri_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetFileHashes(), + FileHashesDefaultEntryHolder.defaultEntry, + 2); + if (context_ != null) { + output.writeMessage(3, getContext()); + } + for (int i = 0; i < additionalContexts_.size(); i++) { + output.writeMessage(4, additionalContexts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorageSourceUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, artifactStorageSourceUri_); + } + for (java.util.Map.Entry entry + : internalGetFileHashes().getMap().entrySet()) { + com.google.protobuf.MapEntry + fileHashes__ = FileHashesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, fileHashes__); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getContext()); + } + for (int i = 0; i < additionalContexts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, additionalContexts_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Source)) { + return super.equals(obj); + } + io.grafeas.v1.Source other = (io.grafeas.v1.Source) obj; + + if (!getArtifactStorageSourceUri() + .equals(other.getArtifactStorageSourceUri())) return false; + if (!internalGetFileHashes().equals( + other.internalGetFileHashes())) return false; + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (!getAdditionalContextsList() + .equals(other.getAdditionalContextsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ARTIFACT_STORAGE_SOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getArtifactStorageSourceUri().hashCode(); + if (!internalGetFileHashes().getMap().isEmpty()) { + hash = (37 * hash) + FILE_HASHES_FIELD_NUMBER; + hash = (53 * hash) + internalGetFileHashes().hashCode(); + } + if (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + if (getAdditionalContextsCount() > 0) { + hash = (37 * hash) + ADDITIONAL_CONTEXTS_FIELD_NUMBER; + hash = (53 * hash) + getAdditionalContextsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Source parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Source parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Source parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Source parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Source parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Source parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Source parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Source parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Source parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Source parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Source parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Source parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Source prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Source describes the location of the source used for the build.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Source} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Source) + io.grafeas.v1.SourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetFileHashes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableFileHashes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Source.class, io.grafeas.v1.Source.Builder.class); + } + + // Construct using io.grafeas.v1.Source.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + artifactStorageSourceUri_ = ""; + internalGetMutableFileHashes().clear(); + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + if (additionalContextsBuilder_ == null) { + additionalContexts_ = java.util.Collections.emptyList(); + } else { + additionalContexts_ = null; + additionalContextsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Source getDefaultInstanceForType() { + return io.grafeas.v1.Source.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Source build() { + io.grafeas.v1.Source result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Source buildPartial() { + io.grafeas.v1.Source result = new io.grafeas.v1.Source(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.Source result) { + if (additionalContextsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + additionalContexts_ = java.util.Collections.unmodifiableList(additionalContexts_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.additionalContexts_ = additionalContexts_; + } else { + result.additionalContexts_ = additionalContextsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.Source result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.artifactStorageSourceUri_ = artifactStorageSourceUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fileHashes_ = internalGetFileHashes(); + result.fileHashes_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.context_ = contextBuilder_ == null + ? context_ + : contextBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Source) { + return mergeFrom((io.grafeas.v1.Source)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Source other) { + if (other == io.grafeas.v1.Source.getDefaultInstance()) return this; + if (!other.getArtifactStorageSourceUri().isEmpty()) { + artifactStorageSourceUri_ = other.artifactStorageSourceUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableFileHashes().mergeFrom( + other.internalGetFileHashes()); + bitField0_ |= 0x00000002; + if (other.hasContext()) { + mergeContext(other.getContext()); + } + if (additionalContextsBuilder_ == null) { + if (!other.additionalContexts_.isEmpty()) { + if (additionalContexts_.isEmpty()) { + additionalContexts_ = other.additionalContexts_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureAdditionalContextsIsMutable(); + additionalContexts_.addAll(other.additionalContexts_); + } + onChanged(); + } + } else { + if (!other.additionalContexts_.isEmpty()) { + if (additionalContextsBuilder_.isEmpty()) { + additionalContextsBuilder_.dispose(); + additionalContextsBuilder_ = null; + additionalContexts_ = other.additionalContexts_; + bitField0_ = (bitField0_ & ~0x00000008); + additionalContextsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAdditionalContextsFieldBuilder() : null; + } else { + additionalContextsBuilder_.addAllMessages(other.additionalContexts_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + artifactStorageSourceUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + fileHashes__ = input.readMessage( + FileHashesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableFileHashes().getMutableMap().put( + fileHashes__.getKey(), fileHashes__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getContextFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + io.grafeas.v1.SourceContext m = + input.readMessage( + io.grafeas.v1.SourceContext.parser(), + extensionRegistry); + if (additionalContextsBuilder_ == null) { + ensureAdditionalContextsIsMutable(); + additionalContexts_.add(m); + } else { + additionalContextsBuilder_.addMessage(m); + } + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object artifactStorageSourceUri_ = ""; + /** + *
+     * If provided, the input binary artifacts for the build came from this
+     * location.
+     * 
+ * + * string artifact_storage_source_uri = 1; + * @return The artifactStorageSourceUri. + */ + public java.lang.String getArtifactStorageSourceUri() { + java.lang.Object ref = artifactStorageSourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactStorageSourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * If provided, the input binary artifacts for the build came from this
+     * location.
+     * 
+ * + * string artifact_storage_source_uri = 1; + * @return The bytes for artifactStorageSourceUri. + */ + public com.google.protobuf.ByteString + getArtifactStorageSourceUriBytes() { + java.lang.Object ref = artifactStorageSourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + artifactStorageSourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * If provided, the input binary artifacts for the build came from this
+     * location.
+     * 
+ * + * string artifact_storage_source_uri = 1; + * @param value The artifactStorageSourceUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactStorageSourceUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + artifactStorageSourceUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * If provided, the input binary artifacts for the build came from this
+     * location.
+     * 
+ * + * string artifact_storage_source_uri = 1; + * @return This builder for chaining. + */ + public Builder clearArtifactStorageSourceUri() { + artifactStorageSourceUri_ = getDefaultInstance().getArtifactStorageSourceUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * If provided, the input binary artifacts for the build came from this
+     * location.
+     * 
+ * + * string artifact_storage_source_uri = 1; + * @param value The bytes for artifactStorageSourceUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactStorageSourceUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + artifactStorageSourceUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, io.grafeas.v1.FileHashes> fileHashes_; + private com.google.protobuf.MapField + internalGetFileHashes() { + if (fileHashes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FileHashesDefaultEntryHolder.defaultEntry); + } + return fileHashes_; + } + private com.google.protobuf.MapField + internalGetMutableFileHashes() { + if (fileHashes_ == null) { + fileHashes_ = com.google.protobuf.MapField.newMapField( + FileHashesDefaultEntryHolder.defaultEntry); + } + if (!fileHashes_.isMutable()) { + fileHashes_ = fileHashes_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return fileHashes_; + } + public int getFileHashesCount() { + return internalGetFileHashes().getMap().size(); + } + /** + *
+     * Hash(es) of the build source, which can be used to verify that the original
+     * source integrity was maintained in the build.
+     * The keys to this map are file paths used as build source and the values
+     * contain the hash values for those files.
+     * If the build source came in a single package such as a gzipped tarfile
+     * (.tar.gz), the FileHash will be for the single path to that file.
+     * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public boolean containsFileHashes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetFileHashes().getMap().containsKey(key); + } + /** + * Use {@link #getFileHashesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFileHashes() { + return getFileHashesMap(); + } + /** + *
+     * Hash(es) of the build source, which can be used to verify that the original
+     * source integrity was maintained in the build.
+     * The keys to this map are file paths used as build source and the values
+     * contain the hash values for those files.
+     * If the build source came in a single package such as a gzipped tarfile
+     * (.tar.gz), the FileHash will be for the single path to that file.
+     * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public java.util.Map getFileHashesMap() { + return internalGetFileHashes().getMap(); + } + /** + *
+     * Hash(es) of the build source, which can be used to verify that the original
+     * source integrity was maintained in the build.
+     * The keys to this map are file paths used as build source and the values
+     * contain the hash values for those files.
+     * If the build source came in a single package such as a gzipped tarfile
+     * (.tar.gz), the FileHash will be for the single path to that file.
+     * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public /* nullable */ +io.grafeas.v1.FileHashes getFileHashesOrDefault( + java.lang.String key, + /* nullable */ +io.grafeas.v1.FileHashes defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetFileHashes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Hash(es) of the build source, which can be used to verify that the original
+     * source integrity was maintained in the build.
+     * The keys to this map are file paths used as build source and the values
+     * contain the hash values for those files.
+     * If the build source came in a single package such as a gzipped tarfile
+     * (.tar.gz), the FileHash will be for the single path to that file.
+     * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + @java.lang.Override + public io.grafeas.v1.FileHashes getFileHashesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetFileHashes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearFileHashes() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableFileHashes().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Hash(es) of the build source, which can be used to verify that the original
+     * source integrity was maintained in the build.
+     * The keys to this map are file paths used as build source and the values
+     * contain the hash values for those files.
+     * If the build source came in a single package such as a gzipped tarfile
+     * (.tar.gz), the FileHash will be for the single path to that file.
+     * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + public Builder removeFileHashes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableFileHashes().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableFileHashes() { + bitField0_ |= 0x00000002; + return internalGetMutableFileHashes().getMutableMap(); + } + /** + *
+     * Hash(es) of the build source, which can be used to verify that the original
+     * source integrity was maintained in the build.
+     * The keys to this map are file paths used as build source and the values
+     * contain the hash values for those files.
+     * If the build source came in a single package such as a gzipped tarfile
+     * (.tar.gz), the FileHash will be for the single path to that file.
+     * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + public Builder putFileHashes( + java.lang.String key, + io.grafeas.v1.FileHashes value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableFileHashes().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Hash(es) of the build source, which can be used to verify that the original
+     * source integrity was maintained in the build.
+     * The keys to this map are file paths used as build source and the values
+     * contain the hash values for those files.
+     * If the build source came in a single package such as a gzipped tarfile
+     * (.tar.gz), the FileHash will be for the single path to that file.
+     * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + public Builder putAllFileHashes( + java.util.Map values) { + internalGetMutableFileHashes().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private io.grafeas.v1.SourceContext context_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> contextBuilder_; + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + * @return Whether the context field is set. + */ + public boolean hasContext() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + * @return The context. + */ + public io.grafeas.v1.SourceContext getContext() { + if (contextBuilder_ == null) { + return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_; + } else { + return contextBuilder_.getMessage(); + } + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + public Builder setContext(io.grafeas.v1.SourceContext value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + } else { + contextBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + public Builder setContext( + io.grafeas.v1.SourceContext.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + public Builder mergeContext(io.grafeas.v1.SourceContext value) { + if (contextBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + context_ != null && + context_ != io.grafeas.v1.SourceContext.getDefaultInstance()) { + getContextBuilder().mergeFrom(value); + } else { + context_ = value; + } + } else { + contextBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + public Builder clearContext() { + bitField0_ = (bitField0_ & ~0x00000004); + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + public io.grafeas.v1.SourceContext.Builder getContextBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + public io.grafeas.v1.SourceContextOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + io.grafeas.v1.SourceContext.getDefaultInstance() : context_; + } + } + /** + *
+     * If provided, the source code used for the build came from this location.
+     * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> + getContextFieldBuilder() { + if (contextBuilder_ == null) { + contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder>( + getContext(), + getParentForChildren(), + isClean()); + context_ = null; + } + return contextBuilder_; + } + + private java.util.List additionalContexts_ = + java.util.Collections.emptyList(); + private void ensureAdditionalContextsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + additionalContexts_ = new java.util.ArrayList(additionalContexts_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> additionalContextsBuilder_; + + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public java.util.List getAdditionalContextsList() { + if (additionalContextsBuilder_ == null) { + return java.util.Collections.unmodifiableList(additionalContexts_); + } else { + return additionalContextsBuilder_.getMessageList(); + } + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public int getAdditionalContextsCount() { + if (additionalContextsBuilder_ == null) { + return additionalContexts_.size(); + } else { + return additionalContextsBuilder_.getCount(); + } + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public io.grafeas.v1.SourceContext getAdditionalContexts(int index) { + if (additionalContextsBuilder_ == null) { + return additionalContexts_.get(index); + } else { + return additionalContextsBuilder_.getMessage(index); + } + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder setAdditionalContexts( + int index, io.grafeas.v1.SourceContext value) { + if (additionalContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalContextsIsMutable(); + additionalContexts_.set(index, value); + onChanged(); + } else { + additionalContextsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder setAdditionalContexts( + int index, io.grafeas.v1.SourceContext.Builder builderForValue) { + if (additionalContextsBuilder_ == null) { + ensureAdditionalContextsIsMutable(); + additionalContexts_.set(index, builderForValue.build()); + onChanged(); + } else { + additionalContextsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder addAdditionalContexts(io.grafeas.v1.SourceContext value) { + if (additionalContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalContextsIsMutable(); + additionalContexts_.add(value); + onChanged(); + } else { + additionalContextsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder addAdditionalContexts( + int index, io.grafeas.v1.SourceContext value) { + if (additionalContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalContextsIsMutable(); + additionalContexts_.add(index, value); + onChanged(); + } else { + additionalContextsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder addAdditionalContexts( + io.grafeas.v1.SourceContext.Builder builderForValue) { + if (additionalContextsBuilder_ == null) { + ensureAdditionalContextsIsMutable(); + additionalContexts_.add(builderForValue.build()); + onChanged(); + } else { + additionalContextsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder addAdditionalContexts( + int index, io.grafeas.v1.SourceContext.Builder builderForValue) { + if (additionalContextsBuilder_ == null) { + ensureAdditionalContextsIsMutable(); + additionalContexts_.add(index, builderForValue.build()); + onChanged(); + } else { + additionalContextsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder addAllAdditionalContexts( + java.lang.Iterable values) { + if (additionalContextsBuilder_ == null) { + ensureAdditionalContextsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, additionalContexts_); + onChanged(); + } else { + additionalContextsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder clearAdditionalContexts() { + if (additionalContextsBuilder_ == null) { + additionalContexts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + additionalContextsBuilder_.clear(); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public Builder removeAdditionalContexts(int index) { + if (additionalContextsBuilder_ == null) { + ensureAdditionalContextsIsMutable(); + additionalContexts_.remove(index); + onChanged(); + } else { + additionalContextsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public io.grafeas.v1.SourceContext.Builder getAdditionalContextsBuilder( + int index) { + return getAdditionalContextsFieldBuilder().getBuilder(index); + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public io.grafeas.v1.SourceContextOrBuilder getAdditionalContextsOrBuilder( + int index) { + if (additionalContextsBuilder_ == null) { + return additionalContexts_.get(index); } else { + return additionalContextsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public java.util.List + getAdditionalContextsOrBuilderList() { + if (additionalContextsBuilder_ != null) { + return additionalContextsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(additionalContexts_); + } + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public io.grafeas.v1.SourceContext.Builder addAdditionalContextsBuilder() { + return getAdditionalContextsFieldBuilder().addBuilder( + io.grafeas.v1.SourceContext.getDefaultInstance()); + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public io.grafeas.v1.SourceContext.Builder addAdditionalContextsBuilder( + int index) { + return getAdditionalContextsFieldBuilder().addBuilder( + index, io.grafeas.v1.SourceContext.getDefaultInstance()); + } + /** + *
+     * If provided, some of the source code used for the build may be found in
+     * these locations, in the case where the source repository had multiple
+     * remotes or submodules. This list will not include the context specified in
+     * the context field.
+     * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + public java.util.List + getAdditionalContextsBuilderList() { + return getAdditionalContextsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> + getAdditionalContextsFieldBuilder() { + if (additionalContextsBuilder_ == null) { + additionalContextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder>( + additionalContexts_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + additionalContexts_ = null; + } + return additionalContextsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Source) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Source) + private static final io.grafeas.v1.Source DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Source(); + } + + public static io.grafeas.v1.Source getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Source parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Source getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java new file mode 100644 index 000000000000..bb5845b66bc9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java @@ -0,0 +1,1583 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +/** + *
+ * A SourceContext is a reference to a tree of files. A SourceContext together
+ * with a path point to a unique revision of a single file or directory.
+ * 
+ * + * Protobuf type {@code grafeas.v1.SourceContext} + */ +public final class SourceContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.SourceContext) + SourceContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use SourceContext.newBuilder() to construct. + private SourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SourceContext() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SourceContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SourceContext.class, io.grafeas.v1.SourceContext.Builder.class); + } + + private int contextCase_ = 0; + private java.lang.Object context_; + public enum ContextCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLOUD_REPO(1), + GERRIT(2), + GIT(3), + CONTEXT_NOT_SET(0); + private final int value; + private ContextCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContextCase valueOf(int value) { + return forNumber(value); + } + + public static ContextCase forNumber(int value) { + switch (value) { + case 1: return CLOUD_REPO; + case 2: return GERRIT; + case 3: return GIT; + case 0: return CONTEXT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ContextCase + getContextCase() { + return ContextCase.forNumber( + contextCase_); + } + + public static final int CLOUD_REPO_FIELD_NUMBER = 1; + /** + *
+   * A SourceContext referring to a revision in a Google Cloud Source Repo.
+   * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + * @return Whether the cloudRepo field is set. + */ + @java.lang.Override + public boolean hasCloudRepo() { + return contextCase_ == 1; + } + /** + *
+   * A SourceContext referring to a revision in a Google Cloud Source Repo.
+   * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + * @return The cloudRepo. + */ + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContext getCloudRepo() { + if (contextCase_ == 1) { + return (io.grafeas.v1.CloudRepoSourceContext) context_; + } + return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); + } + /** + *
+   * A SourceContext referring to a revision in a Google Cloud Source Repo.
+   * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder() { + if (contextCase_ == 1) { + return (io.grafeas.v1.CloudRepoSourceContext) context_; + } + return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); + } + + public static final int GERRIT_FIELD_NUMBER = 2; + /** + *
+   * A SourceContext referring to a Gerrit project.
+   * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + * @return Whether the gerrit field is set. + */ + @java.lang.Override + public boolean hasGerrit() { + return contextCase_ == 2; + } + /** + *
+   * A SourceContext referring to a Gerrit project.
+   * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + * @return The gerrit. + */ + @java.lang.Override + public io.grafeas.v1.GerritSourceContext getGerrit() { + if (contextCase_ == 2) { + return (io.grafeas.v1.GerritSourceContext) context_; + } + return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); + } + /** + *
+   * A SourceContext referring to a Gerrit project.
+   * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + @java.lang.Override + public io.grafeas.v1.GerritSourceContextOrBuilder getGerritOrBuilder() { + if (contextCase_ == 2) { + return (io.grafeas.v1.GerritSourceContext) context_; + } + return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); + } + + public static final int GIT_FIELD_NUMBER = 3; + /** + *
+   * A SourceContext referring to any third party Git repo (e.g., GitHub).
+   * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + * @return Whether the git field is set. + */ + @java.lang.Override + public boolean hasGit() { + return contextCase_ == 3; + } + /** + *
+   * A SourceContext referring to any third party Git repo (e.g., GitHub).
+   * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + * @return The git. + */ + @java.lang.Override + public io.grafeas.v1.GitSourceContext getGit() { + if (contextCase_ == 3) { + return (io.grafeas.v1.GitSourceContext) context_; + } + return io.grafeas.v1.GitSourceContext.getDefaultInstance(); + } + /** + *
+   * A SourceContext referring to any third party Git repo (e.g., GitHub).
+   * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + @java.lang.Override + public io.grafeas.v1.GitSourceContextOrBuilder getGitOrBuilder() { + if (contextCase_ == 3) { + return (io.grafeas.v1.GitSourceContext) context_; + } + return io.grafeas.v1.GitSourceContext.getDefaultInstance(); + } + + public static final int LABELS_FIELD_NUMBER = 4; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (contextCase_ == 1) { + output.writeMessage(1, (io.grafeas.v1.CloudRepoSourceContext) context_); + } + if (contextCase_ == 2) { + output.writeMessage(2, (io.grafeas.v1.GerritSourceContext) context_); + } + if (contextCase_ == 3) { + output.writeMessage(3, (io.grafeas.v1.GitSourceContext) context_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 4); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (contextCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (io.grafeas.v1.CloudRepoSourceContext) context_); + } + if (contextCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (io.grafeas.v1.GerritSourceContext) context_); + } + if (contextCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (io.grafeas.v1.GitSourceContext) context_); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, labels__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.SourceContext)) { + return super.equals(obj); + } + io.grafeas.v1.SourceContext other = (io.grafeas.v1.SourceContext) obj; + + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!getContextCase().equals(other.getContextCase())) return false; + switch (contextCase_) { + case 1: + if (!getCloudRepo() + .equals(other.getCloudRepo())) return false; + break; + case 2: + if (!getGerrit() + .equals(other.getGerrit())) return false; + break; + case 3: + if (!getGit() + .equals(other.getGit())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + switch (contextCase_) { + case 1: + hash = (37 * hash) + CLOUD_REPO_FIELD_NUMBER; + hash = (53 * hash) + getCloudRepo().hashCode(); + break; + case 2: + hash = (37 * hash) + GERRIT_FIELD_NUMBER; + hash = (53 * hash) + getGerrit().hashCode(); + break; + case 3: + hash = (37 * hash) + GIT_FIELD_NUMBER; + hash = (53 * hash) + getGit().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.SourceContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SourceContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SourceContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SourceContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SourceContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.SourceContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.SourceContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SourceContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SourceContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.SourceContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.SourceContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.SourceContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.SourceContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A SourceContext is a reference to a tree of files. A SourceContext together
+   * with a path point to a unique revision of a single file or directory.
+   * 
+ * + * Protobuf type {@code grafeas.v1.SourceContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.SourceContext) + io.grafeas.v1.SourceContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.SourceContext.class, io.grafeas.v1.SourceContext.Builder.class); + } + + // Construct using io.grafeas.v1.SourceContext.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (cloudRepoBuilder_ != null) { + cloudRepoBuilder_.clear(); + } + if (gerritBuilder_ != null) { + gerritBuilder_.clear(); + } + if (gitBuilder_ != null) { + gitBuilder_.clear(); + } + internalGetMutableLabels().clear(); + contextCase_ = 0; + context_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.SourceContext getDefaultInstanceForType() { + return io.grafeas.v1.SourceContext.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.SourceContext build() { + io.grafeas.v1.SourceContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.SourceContext buildPartial() { + io.grafeas.v1.SourceContext result = new io.grafeas.v1.SourceContext(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.SourceContext result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + } + + private void buildPartialOneofs(io.grafeas.v1.SourceContext result) { + result.contextCase_ = contextCase_; + result.context_ = this.context_; + if (contextCase_ == 1 && + cloudRepoBuilder_ != null) { + result.context_ = cloudRepoBuilder_.build(); + } + if (contextCase_ == 2 && + gerritBuilder_ != null) { + result.context_ = gerritBuilder_.build(); + } + if (contextCase_ == 3 && + gitBuilder_ != null) { + result.context_ = gitBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.SourceContext) { + return mergeFrom((io.grafeas.v1.SourceContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.SourceContext other) { + if (other == io.grafeas.v1.SourceContext.getDefaultInstance()) return this; + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + bitField0_ |= 0x00000008; + switch (other.getContextCase()) { + case CLOUD_REPO: { + mergeCloudRepo(other.getCloudRepo()); + break; + } + case GERRIT: { + mergeGerrit(other.getGerrit()); + break; + } + case GIT: { + mergeGit(other.getGit()); + break; + } + case CONTEXT_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCloudRepoFieldBuilder().getBuilder(), + extensionRegistry); + contextCase_ = 1; + break; + } // case 10 + case 18: { + input.readMessage( + getGerritFieldBuilder().getBuilder(), + extensionRegistry); + contextCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + getGitFieldBuilder().getBuilder(), + extensionRegistry); + contextCase_ = 3; + break; + } // case 26 + case 34: { + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLabels().getMutableMap().put( + labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int contextCase_ = 0; + private java.lang.Object context_; + public ContextCase + getContextCase() { + return ContextCase.forNumber( + contextCase_); + } + + public Builder clearContext() { + contextCase_ = 0; + context_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CloudRepoSourceContext, io.grafeas.v1.CloudRepoSourceContext.Builder, io.grafeas.v1.CloudRepoSourceContextOrBuilder> cloudRepoBuilder_; + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + * @return Whether the cloudRepo field is set. + */ + @java.lang.Override + public boolean hasCloudRepo() { + return contextCase_ == 1; + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + * @return The cloudRepo. + */ + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContext getCloudRepo() { + if (cloudRepoBuilder_ == null) { + if (contextCase_ == 1) { + return (io.grafeas.v1.CloudRepoSourceContext) context_; + } + return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); + } else { + if (contextCase_ == 1) { + return cloudRepoBuilder_.getMessage(); + } + return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); + } + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + public Builder setCloudRepo(io.grafeas.v1.CloudRepoSourceContext value) { + if (cloudRepoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + cloudRepoBuilder_.setMessage(value); + } + contextCase_ = 1; + return this; + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + public Builder setCloudRepo( + io.grafeas.v1.CloudRepoSourceContext.Builder builderForValue) { + if (cloudRepoBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + cloudRepoBuilder_.setMessage(builderForValue.build()); + } + contextCase_ = 1; + return this; + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + public Builder mergeCloudRepo(io.grafeas.v1.CloudRepoSourceContext value) { + if (cloudRepoBuilder_ == null) { + if (contextCase_ == 1 && + context_ != io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance()) { + context_ = io.grafeas.v1.CloudRepoSourceContext.newBuilder((io.grafeas.v1.CloudRepoSourceContext) context_) + .mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + if (contextCase_ == 1) { + cloudRepoBuilder_.mergeFrom(value); + } else { + cloudRepoBuilder_.setMessage(value); + } + } + contextCase_ = 1; + return this; + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + public Builder clearCloudRepo() { + if (cloudRepoBuilder_ == null) { + if (contextCase_ == 1) { + contextCase_ = 0; + context_ = null; + onChanged(); + } + } else { + if (contextCase_ == 1) { + contextCase_ = 0; + context_ = null; + } + cloudRepoBuilder_.clear(); + } + return this; + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + public io.grafeas.v1.CloudRepoSourceContext.Builder getCloudRepoBuilder() { + return getCloudRepoFieldBuilder().getBuilder(); + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + @java.lang.Override + public io.grafeas.v1.CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder() { + if ((contextCase_ == 1) && (cloudRepoBuilder_ != null)) { + return cloudRepoBuilder_.getMessageOrBuilder(); + } else { + if (contextCase_ == 1) { + return (io.grafeas.v1.CloudRepoSourceContext) context_; + } + return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); + } + } + /** + *
+     * A SourceContext referring to a revision in a Google Cloud Source Repo.
+     * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CloudRepoSourceContext, io.grafeas.v1.CloudRepoSourceContext.Builder, io.grafeas.v1.CloudRepoSourceContextOrBuilder> + getCloudRepoFieldBuilder() { + if (cloudRepoBuilder_ == null) { + if (!(contextCase_ == 1)) { + context_ = io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); + } + cloudRepoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CloudRepoSourceContext, io.grafeas.v1.CloudRepoSourceContext.Builder, io.grafeas.v1.CloudRepoSourceContextOrBuilder>( + (io.grafeas.v1.CloudRepoSourceContext) context_, + getParentForChildren(), + isClean()); + context_ = null; + } + contextCase_ = 1; + onChanged(); + return cloudRepoBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.GerritSourceContext, io.grafeas.v1.GerritSourceContext.Builder, io.grafeas.v1.GerritSourceContextOrBuilder> gerritBuilder_; + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + * @return Whether the gerrit field is set. + */ + @java.lang.Override + public boolean hasGerrit() { + return contextCase_ == 2; + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + * @return The gerrit. + */ + @java.lang.Override + public io.grafeas.v1.GerritSourceContext getGerrit() { + if (gerritBuilder_ == null) { + if (contextCase_ == 2) { + return (io.grafeas.v1.GerritSourceContext) context_; + } + return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); + } else { + if (contextCase_ == 2) { + return gerritBuilder_.getMessage(); + } + return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); + } + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + public Builder setGerrit(io.grafeas.v1.GerritSourceContext value) { + if (gerritBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + gerritBuilder_.setMessage(value); + } + contextCase_ = 2; + return this; + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + public Builder setGerrit( + io.grafeas.v1.GerritSourceContext.Builder builderForValue) { + if (gerritBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + gerritBuilder_.setMessage(builderForValue.build()); + } + contextCase_ = 2; + return this; + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + public Builder mergeGerrit(io.grafeas.v1.GerritSourceContext value) { + if (gerritBuilder_ == null) { + if (contextCase_ == 2 && + context_ != io.grafeas.v1.GerritSourceContext.getDefaultInstance()) { + context_ = io.grafeas.v1.GerritSourceContext.newBuilder((io.grafeas.v1.GerritSourceContext) context_) + .mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + if (contextCase_ == 2) { + gerritBuilder_.mergeFrom(value); + } else { + gerritBuilder_.setMessage(value); + } + } + contextCase_ = 2; + return this; + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + public Builder clearGerrit() { + if (gerritBuilder_ == null) { + if (contextCase_ == 2) { + contextCase_ = 0; + context_ = null; + onChanged(); + } + } else { + if (contextCase_ == 2) { + contextCase_ = 0; + context_ = null; + } + gerritBuilder_.clear(); + } + return this; + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + public io.grafeas.v1.GerritSourceContext.Builder getGerritBuilder() { + return getGerritFieldBuilder().getBuilder(); + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + @java.lang.Override + public io.grafeas.v1.GerritSourceContextOrBuilder getGerritOrBuilder() { + if ((contextCase_ == 2) && (gerritBuilder_ != null)) { + return gerritBuilder_.getMessageOrBuilder(); + } else { + if (contextCase_ == 2) { + return (io.grafeas.v1.GerritSourceContext) context_; + } + return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); + } + } + /** + *
+     * A SourceContext referring to a Gerrit project.
+     * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.GerritSourceContext, io.grafeas.v1.GerritSourceContext.Builder, io.grafeas.v1.GerritSourceContextOrBuilder> + getGerritFieldBuilder() { + if (gerritBuilder_ == null) { + if (!(contextCase_ == 2)) { + context_ = io.grafeas.v1.GerritSourceContext.getDefaultInstance(); + } + gerritBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.GerritSourceContext, io.grafeas.v1.GerritSourceContext.Builder, io.grafeas.v1.GerritSourceContextOrBuilder>( + (io.grafeas.v1.GerritSourceContext) context_, + getParentForChildren(), + isClean()); + context_ = null; + } + contextCase_ = 2; + onChanged(); + return gerritBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.GitSourceContext, io.grafeas.v1.GitSourceContext.Builder, io.grafeas.v1.GitSourceContextOrBuilder> gitBuilder_; + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + * @return Whether the git field is set. + */ + @java.lang.Override + public boolean hasGit() { + return contextCase_ == 3; + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + * @return The git. + */ + @java.lang.Override + public io.grafeas.v1.GitSourceContext getGit() { + if (gitBuilder_ == null) { + if (contextCase_ == 3) { + return (io.grafeas.v1.GitSourceContext) context_; + } + return io.grafeas.v1.GitSourceContext.getDefaultInstance(); + } else { + if (contextCase_ == 3) { + return gitBuilder_.getMessage(); + } + return io.grafeas.v1.GitSourceContext.getDefaultInstance(); + } + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + public Builder setGit(io.grafeas.v1.GitSourceContext value) { + if (gitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + gitBuilder_.setMessage(value); + } + contextCase_ = 3; + return this; + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + public Builder setGit( + io.grafeas.v1.GitSourceContext.Builder builderForValue) { + if (gitBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + gitBuilder_.setMessage(builderForValue.build()); + } + contextCase_ = 3; + return this; + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + public Builder mergeGit(io.grafeas.v1.GitSourceContext value) { + if (gitBuilder_ == null) { + if (contextCase_ == 3 && + context_ != io.grafeas.v1.GitSourceContext.getDefaultInstance()) { + context_ = io.grafeas.v1.GitSourceContext.newBuilder((io.grafeas.v1.GitSourceContext) context_) + .mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + if (contextCase_ == 3) { + gitBuilder_.mergeFrom(value); + } else { + gitBuilder_.setMessage(value); + } + } + contextCase_ = 3; + return this; + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + public Builder clearGit() { + if (gitBuilder_ == null) { + if (contextCase_ == 3) { + contextCase_ = 0; + context_ = null; + onChanged(); + } + } else { + if (contextCase_ == 3) { + contextCase_ = 0; + context_ = null; + } + gitBuilder_.clear(); + } + return this; + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + public io.grafeas.v1.GitSourceContext.Builder getGitBuilder() { + return getGitFieldBuilder().getBuilder(); + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + @java.lang.Override + public io.grafeas.v1.GitSourceContextOrBuilder getGitOrBuilder() { + if ((contextCase_ == 3) && (gitBuilder_ != null)) { + return gitBuilder_.getMessageOrBuilder(); + } else { + if (contextCase_ == 3) { + return (io.grafeas.v1.GitSourceContext) context_; + } + return io.grafeas.v1.GitSourceContext.getDefaultInstance(); + } + } + /** + *
+     * A SourceContext referring to any third party Git repo (e.g., GitHub).
+     * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.GitSourceContext, io.grafeas.v1.GitSourceContext.Builder, io.grafeas.v1.GitSourceContextOrBuilder> + getGitFieldBuilder() { + if (gitBuilder_ == null) { + if (!(contextCase_ == 3)) { + context_ = io.grafeas.v1.GitSourceContext.getDefaultInstance(); + } + gitBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.GitSourceContext, io.grafeas.v1.GitSourceContext.Builder, io.grafeas.v1.GitSourceContextOrBuilder>( + (io.grafeas.v1.GitSourceContext) context_, + getParentForChildren(), + isClean()); + context_ = null; + } + contextCase_ = 3; + onChanged(); + return gitBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * Labels with user defined metadata.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * Labels with user defined metadata.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * Labels with user defined metadata.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Labels with user defined metadata.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Labels with user defined metadata.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * Labels with user defined metadata.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableLabels().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + *
+     * Labels with user defined metadata.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000008; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.SourceContext) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.SourceContext) + private static final io.grafeas.v1.SourceContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.SourceContext(); + } + + public static io.grafeas.v1.SourceContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SourceContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.SourceContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java new file mode 100644 index 000000000000..3c735c2fd76a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java @@ -0,0 +1,146 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface SourceContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.SourceContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A SourceContext referring to a revision in a Google Cloud Source Repo.
+   * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + * @return Whether the cloudRepo field is set. + */ + boolean hasCloudRepo(); + /** + *
+   * A SourceContext referring to a revision in a Google Cloud Source Repo.
+   * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + * @return The cloudRepo. + */ + io.grafeas.v1.CloudRepoSourceContext getCloudRepo(); + /** + *
+   * A SourceContext referring to a revision in a Google Cloud Source Repo.
+   * 
+ * + * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + */ + io.grafeas.v1.CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder(); + + /** + *
+   * A SourceContext referring to a Gerrit project.
+   * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + * @return Whether the gerrit field is set. + */ + boolean hasGerrit(); + /** + *
+   * A SourceContext referring to a Gerrit project.
+   * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + * @return The gerrit. + */ + io.grafeas.v1.GerritSourceContext getGerrit(); + /** + *
+   * A SourceContext referring to a Gerrit project.
+   * 
+ * + * .grafeas.v1.GerritSourceContext gerrit = 2; + */ + io.grafeas.v1.GerritSourceContextOrBuilder getGerritOrBuilder(); + + /** + *
+   * A SourceContext referring to any third party Git repo (e.g., GitHub).
+   * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + * @return Whether the git field is set. + */ + boolean hasGit(); + /** + *
+   * A SourceContext referring to any third party Git repo (e.g., GitHub).
+   * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + * @return The git. + */ + io.grafeas.v1.GitSourceContext getGit(); + /** + *
+   * A SourceContext referring to any third party Git repo (e.g., GitHub).
+   * 
+ * + * .grafeas.v1.GitSourceContext git = 3; + */ + io.grafeas.v1.GitSourceContextOrBuilder getGitOrBuilder(); + + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Labels with user defined metadata.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow( + java.lang.String key); + + public io.grafeas.v1.SourceContext.ContextCase getContextCase(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java new file mode 100644 index 000000000000..875eea1d4768 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java @@ -0,0 +1,196 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/provenance.proto + +package io.grafeas.v1; + +public interface SourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Source) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If provided, the input binary artifacts for the build came from this
+   * location.
+   * 
+ * + * string artifact_storage_source_uri = 1; + * @return The artifactStorageSourceUri. + */ + java.lang.String getArtifactStorageSourceUri(); + /** + *
+   * If provided, the input binary artifacts for the build came from this
+   * location.
+   * 
+ * + * string artifact_storage_source_uri = 1; + * @return The bytes for artifactStorageSourceUri. + */ + com.google.protobuf.ByteString + getArtifactStorageSourceUriBytes(); + + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + int getFileHashesCount(); + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + boolean containsFileHashes( + java.lang.String key); + /** + * Use {@link #getFileHashesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getFileHashes(); + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + java.util.Map + getFileHashesMap(); + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + /* nullable */ +io.grafeas.v1.FileHashes getFileHashesOrDefault( + java.lang.String key, + /* nullable */ +io.grafeas.v1.FileHashes defaultValue); + /** + *
+   * Hash(es) of the build source, which can be used to verify that the original
+   * source integrity was maintained in the build.
+   * The keys to this map are file paths used as build source and the values
+   * contain the hash values for those files.
+   * If the build source came in a single package such as a gzipped tarfile
+   * (.tar.gz), the FileHash will be for the single path to that file.
+   * 
+ * + * map<string, .grafeas.v1.FileHashes> file_hashes = 2; + */ + io.grafeas.v1.FileHashes getFileHashesOrThrow( + java.lang.String key); + + /** + *
+   * If provided, the source code used for the build came from this location.
+   * 
+ * + * .grafeas.v1.SourceContext context = 3; + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + *
+   * If provided, the source code used for the build came from this location.
+   * 
+ * + * .grafeas.v1.SourceContext context = 3; + * @return The context. + */ + io.grafeas.v1.SourceContext getContext(); + /** + *
+   * If provided, the source code used for the build came from this location.
+   * 
+ * + * .grafeas.v1.SourceContext context = 3; + */ + io.grafeas.v1.SourceContextOrBuilder getContextOrBuilder(); + + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + java.util.List + getAdditionalContextsList(); + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + io.grafeas.v1.SourceContext getAdditionalContexts(int index); + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + int getAdditionalContextsCount(); + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + java.util.List + getAdditionalContextsOrBuilderList(); + /** + *
+   * If provided, some of the source code used for the build may be found in
+   * these locations, in the case where the source repository had multiple
+   * remotes or submodules. This list will not include the context specified in
+   * the context field.
+   * 
+ * + * repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + io.grafeas.v1.SourceContextOrBuilder getAdditionalContextsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java new file mode 100644 index 000000000000..b5d14fc26d97 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java @@ -0,0 +1,900 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_statement.proto + +package io.grafeas.v1; + +/** + * Protobuf type {@code grafeas.v1.Subject} + */ +public final class Subject extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Subject) + SubjectOrBuilder { +private static final long serialVersionUID = 0L; + // Use Subject.newBuilder() to construct. + private Subject(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Subject() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Subject(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Subject.class, io.grafeas.v1.Subject.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIGEST_FIELD_NUMBER = 2; + private static final class DigestDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_DigestEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetDigest(), + DigestDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (java.util.Map.Entry entry + : internalGetDigest().getMap().entrySet()) { + com.google.protobuf.MapEntry + digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, digest__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Subject)) { + return super.equals(obj); + } + io.grafeas.v1.Subject other = (io.grafeas.v1.Subject) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!internalGetDigest().equals( + other.internalGetDigest())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (!internalGetDigest().getMap().isEmpty()) { + hash = (37 * hash) + DIGEST_FIELD_NUMBER; + hash = (53 * hash) + internalGetDigest().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Subject parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Subject parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Subject parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Subject parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Subject parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Subject parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Subject parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Subject parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Subject parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Subject parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Subject parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Subject parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Subject prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.Subject} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Subject) + io.grafeas.v1.SubjectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableDigest(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Subject.class, io.grafeas.v1.Subject.Builder.class); + } + + // Construct using io.grafeas.v1.Subject.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + internalGetMutableDigest().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Subject getDefaultInstanceForType() { + return io.grafeas.v1.Subject.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Subject build() { + io.grafeas.v1.Subject result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Subject buildPartial() { + io.grafeas.v1.Subject result = new io.grafeas.v1.Subject(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Subject result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.digest_ = internalGetDigest(); + result.digest_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Subject) { + return mergeFrom((io.grafeas.v1.Subject)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Subject other) { + if (other == io.grafeas.v1.Subject.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableDigest().mergeFrom( + other.internalGetDigest()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + digest__ = input.readMessage( + DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableDigest().getMutableMap().put( + digest__.getKey(), digest__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> digest_; + private com.google.protobuf.MapField + internalGetDigest() { + if (digest_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DigestDefaultEntryHolder.defaultEntry); + } + return digest_; + } + private com.google.protobuf.MapField + internalGetMutableDigest() { + if (digest_ == null) { + digest_ = com.google.protobuf.MapField.newMapField( + DigestDefaultEntryHolder.defaultEntry); + } + if (!digest_.isMutable()) { + digest_ = digest_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return digest_; + } + public int getDigestCount() { + return internalGetDigest().getMap().size(); + } + /** + *
+     * `"<ALGORITHM>": "<HEX_VALUE>"`
+     * Algorithms can be e.g. sha256, sha512
+     * See
+     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+     * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public boolean containsDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDigest().getMap().containsKey(key); + } + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDigest() { + return getDigestMap(); + } + /** + *
+     * `"<ALGORITHM>": "<HEX_VALUE>"`
+     * Algorithms can be e.g. sha256, sha512
+     * See
+     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+     * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.util.Map getDigestMap() { + return internalGetDigest().getMap(); + } + /** + *
+     * `"<ALGORITHM>": "<HEX_VALUE>"`
+     * Algorithms can be e.g. sha256, sha512
+     * See
+     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+     * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * `"<ALGORITHM>": "<HEX_VALUE>"`
+     * Algorithms can be e.g. sha256, sha512
+     * See
+     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+     * 
+ * + * map<string, string> digest = 2; + */ + @java.lang.Override + public java.lang.String getDigestOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDigest().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearDigest() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableDigest().getMutableMap() + .clear(); + return this; + } + /** + *
+     * `"<ALGORITHM>": "<HEX_VALUE>"`
+     * Algorithms can be e.g. sha256, sha512
+     * See
+     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+     * 
+ * + * map<string, string> digest = 2; + */ + public Builder removeDigest( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableDigest().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableDigest() { + bitField0_ |= 0x00000002; + return internalGetMutableDigest().getMutableMap(); + } + /** + *
+     * `"<ALGORITHM>": "<HEX_VALUE>"`
+     * Algorithms can be e.g. sha256, sha512
+     * See
+     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+     * 
+ * + * map<string, string> digest = 2; + */ + public Builder putDigest( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableDigest().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * `"<ALGORITHM>": "<HEX_VALUE>"`
+     * Algorithms can be e.g. sha256, sha512
+     * See
+     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+     * 
+ * + * map<string, string> digest = 2; + */ + public Builder putAllDigest( + java.util.Map values) { + internalGetMutableDigest().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Subject) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Subject) + private static final io.grafeas.v1.Subject DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Subject(); + } + + public static io.grafeas.v1.Subject getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Subject parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Subject getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java new file mode 100644 index 000000000000..b196d4c7afe9 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java @@ -0,0 +1,90 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/intoto_statement.proto + +package io.grafeas.v1; + +public interface SubjectOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Subject) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + int getDigestCount(); + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + boolean containsDigest( + java.lang.String key); + /** + * Use {@link #getDigestMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getDigest(); + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + java.util.Map + getDigestMap(); + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + /* nullable */ +java.lang.String getDigestOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * `"<ALGORITHM>": "<HEX_VALUE>"`
+   * Algorithms can be e.g. sha256, sha512
+   * See
+   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
+   * 
+ * + * map<string, string> digest = 2; + */ + java.lang.String getDigestOrThrow( + java.lang.String key); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java new file mode 100644 index 000000000000..3f5c80409510 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to update a note.
+ * 
+ * + * Protobuf type {@code grafeas.v1.UpdateNoteRequest} + */ +public final class UpdateNoteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.UpdateNoteRequest) + UpdateNoteRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateNoteRequest.newBuilder() to construct. + private UpdateNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateNoteRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateNoteRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpdateNoteRequest.class, io.grafeas.v1.UpdateNoteRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTE_FIELD_NUMBER = 2; + private io.grafeas.v1.Note note_; + /** + *
+   * The updated note.
+   * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the note field is set. + */ + @java.lang.Override + public boolean hasNote() { + return note_ != null; + } + /** + *
+   * The updated note.
+   * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The note. + */ + @java.lang.Override + public io.grafeas.v1.Note getNote() { + return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; + } + /** + *
+   * The updated note.
+   * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { + return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (note_ != null) { + output.writeMessage(2, getNote()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (note_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getNote()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.UpdateNoteRequest)) { + return super.equals(obj); + } + io.grafeas.v1.UpdateNoteRequest other = (io.grafeas.v1.UpdateNoteRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasNote() != other.hasNote()) return false; + if (hasNote()) { + if (!getNote() + .equals(other.getNote())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasNote()) { + hash = (37 * hash) + NOTE_FIELD_NUMBER; + hash = (53 * hash) + getNote().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpdateNoteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpdateNoteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpdateNoteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.UpdateNoteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to update a note.
+   * 
+ * + * Protobuf type {@code grafeas.v1.UpdateNoteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.UpdateNoteRequest) + io.grafeas.v1.UpdateNoteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpdateNoteRequest.class, io.grafeas.v1.UpdateNoteRequest.Builder.class); + } + + // Construct using io.grafeas.v1.UpdateNoteRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + note_ = null; + if (noteBuilder_ != null) { + noteBuilder_.dispose(); + noteBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.UpdateNoteRequest getDefaultInstanceForType() { + return io.grafeas.v1.UpdateNoteRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.UpdateNoteRequest build() { + io.grafeas.v1.UpdateNoteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.UpdateNoteRequest buildPartial() { + io.grafeas.v1.UpdateNoteRequest result = new io.grafeas.v1.UpdateNoteRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.UpdateNoteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.note_ = noteBuilder_ == null + ? note_ + : noteBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null + ? updateMask_ + : updateMaskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.UpdateNoteRequest) { + return mergeFrom((io.grafeas.v1.UpdateNoteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.UpdateNoteRequest other) { + if (other == io.grafeas.v1.UpdateNoteRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasNote()) { + mergeNote(other.getNote()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getNoteFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getUpdateMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the note in the form of
+     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.grafeas.v1.Note note_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> noteBuilder_; + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the note field is set. + */ + public boolean hasNote() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The note. + */ + public io.grafeas.v1.Note getNote() { + if (noteBuilder_ == null) { + return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; + } else { + return noteBuilder_.getMessage(); + } + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNote(io.grafeas.v1.Note value) { + if (noteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + note_ = value; + } else { + noteBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNote( + io.grafeas.v1.Note.Builder builderForValue) { + if (noteBuilder_ == null) { + note_ = builderForValue.build(); + } else { + noteBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeNote(io.grafeas.v1.Note value) { + if (noteBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + note_ != null && + note_ != io.grafeas.v1.Note.getDefaultInstance()) { + getNoteBuilder().mergeFrom(value); + } else { + note_ = value; + } + } else { + noteBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearNote() { + bitField0_ = (bitField0_ & ~0x00000002); + note_ = null; + if (noteBuilder_ != null) { + noteBuilder_.dispose(); + noteBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Note.Builder getNoteBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNoteFieldBuilder().getBuilder(); + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { + if (noteBuilder_ != null) { + return noteBuilder_.getMessageOrBuilder(); + } else { + return note_ == null ? + io.grafeas.v1.Note.getDefaultInstance() : note_; + } + } + /** + *
+     * The updated note.
+     * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> + getNoteFieldBuilder() { + if (noteBuilder_ == null) { + noteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( + getNote(), + getParentForChildren(), + isClean()); + note_ = null; + } + return noteBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + updateMask_ != null && + updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000004); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.UpdateNoteRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.UpdateNoteRequest) + private static final io.grafeas.v1.UpdateNoteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.UpdateNoteRequest(); + } + + public static io.grafeas.v1.UpdateNoteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateNoteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.UpdateNoteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java new file mode 100644 index 000000000000..4d7ef876c432 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface UpdateNoteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.UpdateNoteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the note in the form of
+   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The updated note.
+   * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the note field is set. + */ + boolean hasNote(); + /** + *
+   * The updated note.
+   * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The note. + */ + io.grafeas.v1.Note getNote(); + /** + *
+   * The updated note.
+   * 
+ * + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + io.grafeas.v1.NoteOrBuilder getNoteOrBuilder(); + + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java new file mode 100644 index 000000000000..f6f6febe0d11 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +/** + *
+ * Request to update an occurrence.
+ * 
+ * + * Protobuf type {@code grafeas.v1.UpdateOccurrenceRequest} + */ +public final class UpdateOccurrenceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.UpdateOccurrenceRequest) + UpdateOccurrenceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateOccurrenceRequest.newBuilder() to construct. + private UpdateOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateOccurrenceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateOccurrenceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpdateOccurrenceRequest.class, io.grafeas.v1.UpdateOccurrenceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OCCURRENCE_FIELD_NUMBER = 2; + private io.grafeas.v1.Occurrence occurrence_; + /** + *
+   * The updated occurrence.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the occurrence field is set. + */ + @java.lang.Override + public boolean hasOccurrence() { + return occurrence_ != null; + } + /** + *
+   * The updated occurrence.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The occurrence. + */ + @java.lang.Override + public io.grafeas.v1.Occurrence getOccurrence() { + return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } + /** + *
+   * The updated occurrence.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { + return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (occurrence_ != null) { + output.writeMessage(2, getOccurrence()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (occurrence_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOccurrence()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.UpdateOccurrenceRequest)) { + return super.equals(obj); + } + io.grafeas.v1.UpdateOccurrenceRequest other = (io.grafeas.v1.UpdateOccurrenceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasOccurrence() != other.hasOccurrence()) return false; + if (hasOccurrence()) { + if (!getOccurrence() + .equals(other.getOccurrence())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasOccurrence()) { + hash = (37 * hash) + OCCURRENCE_FIELD_NUMBER; + hash = (53 * hash) + getOccurrence().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.UpdateOccurrenceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to update an occurrence.
+   * 
+ * + * Protobuf type {@code grafeas.v1.UpdateOccurrenceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.UpdateOccurrenceRequest) + io.grafeas.v1.UpdateOccurrenceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpdateOccurrenceRequest.class, io.grafeas.v1.UpdateOccurrenceRequest.Builder.class); + } + + // Construct using io.grafeas.v1.UpdateOccurrenceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + occurrence_ = null; + if (occurrenceBuilder_ != null) { + occurrenceBuilder_.dispose(); + occurrenceBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.UpdateOccurrenceRequest getDefaultInstanceForType() { + return io.grafeas.v1.UpdateOccurrenceRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.UpdateOccurrenceRequest build() { + io.grafeas.v1.UpdateOccurrenceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.UpdateOccurrenceRequest buildPartial() { + io.grafeas.v1.UpdateOccurrenceRequest result = new io.grafeas.v1.UpdateOccurrenceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.UpdateOccurrenceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.occurrence_ = occurrenceBuilder_ == null + ? occurrence_ + : occurrenceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null + ? updateMask_ + : updateMaskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.UpdateOccurrenceRequest) { + return mergeFrom((io.grafeas.v1.UpdateOccurrenceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.UpdateOccurrenceRequest other) { + if (other == io.grafeas.v1.UpdateOccurrenceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasOccurrence()) { + mergeOccurrence(other.getOccurrence()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getOccurrenceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getUpdateMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the occurrence in the form of
+     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.grafeas.v1.Occurrence occurrence_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrenceBuilder_; + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the occurrence field is set. + */ + public boolean hasOccurrence() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The occurrence. + */ + public io.grafeas.v1.Occurrence getOccurrence() { + if (occurrenceBuilder_ == null) { + return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } else { + return occurrenceBuilder_.getMessage(); + } + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOccurrence(io.grafeas.v1.Occurrence value) { + if (occurrenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + occurrence_ = value; + } else { + occurrenceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOccurrence( + io.grafeas.v1.Occurrence.Builder builderForValue) { + if (occurrenceBuilder_ == null) { + occurrence_ = builderForValue.build(); + } else { + occurrenceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeOccurrence(io.grafeas.v1.Occurrence value) { + if (occurrenceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + occurrence_ != null && + occurrence_ != io.grafeas.v1.Occurrence.getDefaultInstance()) { + getOccurrenceBuilder().mergeFrom(value); + } else { + occurrence_ = value; + } + } else { + occurrenceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearOccurrence() { + bitField0_ = (bitField0_ & ~0x00000002); + occurrence_ = null; + if (occurrenceBuilder_ != null) { + occurrenceBuilder_.dispose(); + occurrenceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.Occurrence.Builder getOccurrenceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOccurrenceFieldBuilder().getBuilder(); + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { + if (occurrenceBuilder_ != null) { + return occurrenceBuilder_.getMessageOrBuilder(); + } else { + return occurrence_ == null ? + io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; + } + } + /** + *
+     * The updated occurrence.
+     * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> + getOccurrenceFieldBuilder() { + if (occurrenceBuilder_ == null) { + occurrenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( + getOccurrence(), + getParentForChildren(), + isClean()); + occurrence_ = null; + } + return occurrenceBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + updateMask_ != null && + updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000004); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * The fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.UpdateOccurrenceRequest) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.UpdateOccurrenceRequest) + private static final io.grafeas.v1.UpdateOccurrenceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.UpdateOccurrenceRequest(); + } + + public static io.grafeas.v1.UpdateOccurrenceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateOccurrenceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.UpdateOccurrenceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java new file mode 100644 index 000000000000..ccec13dc04a7 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/grafeas.proto + +package io.grafeas.v1; + +public interface UpdateOccurrenceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.UpdateOccurrenceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the occurrence in the form of
+   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The updated occurrence.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the occurrence field is set. + */ + boolean hasOccurrence(); + /** + *
+   * The updated occurrence.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The occurrence. + */ + io.grafeas.v1.Occurrence getOccurrence(); + /** + *
+   * The updated occurrence.
+   * 
+ * + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder(); + + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * The fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java new file mode 100644 index 000000000000..4872b0e752da --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java @@ -0,0 +1,130 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +public final class Upgrade { + private Upgrade() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_UpgradeNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_UpgradeDistribution_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_WindowsUpdate_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_UpgradeOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\030grafeas/v1/upgrade.proto\022\ngrafeas.v1\032\037" + + "google/protobuf/timestamp.proto\032\030grafeas" + + "/v1/package.proto\"\257\001\n\013UpgradeNote\022\017\n\007pac" + + "kage\030\001 \001(\t\022$\n\007version\030\002 \001(\0132\023.grafeas.v1" + + ".Version\0226\n\rdistributions\030\003 \003(\0132\037.grafea" + + "s.v1.UpgradeDistribution\0221\n\016windows_upda" + + "te\030\004 \001(\0132\031.grafeas.v1.WindowsUpdate\"]\n\023U" + + "pgradeDistribution\022\017\n\007cpe_uri\030\001 \001(\t\022\026\n\016c" + + "lassification\030\002 \001(\t\022\020\n\010severity\030\003 \001(\t\022\013\n" + + "\003cve\030\004 \003(\t\"\354\002\n\rWindowsUpdate\0224\n\010identity" + + "\030\001 \001(\0132\".grafeas.v1.WindowsUpdate.Identi" + + "ty\022\r\n\005title\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\0226" + + "\n\ncategories\030\004 \003(\0132\".grafeas.v1.WindowsU" + + "pdate.Category\022\026\n\016kb_article_ids\030\005 \003(\t\022\023" + + "\n\013support_url\030\006 \001(\t\022<\n\030last_published_ti" + + "mestamp\030\007 \001(\0132\032.google.protobuf.Timestam" + + "p\032/\n\010Identity\022\021\n\tupdate_id\030\001 \001(\t\022\020\n\010revi" + + "sion\030\002 \001(\005\032-\n\010Category\022\023\n\013category_id\030\001 " + + "\001(\t\022\014\n\004name\030\002 \001(\t\"\273\001\n\021UpgradeOccurrence\022" + + "\017\n\007package\030\001 \001(\t\022+\n\016parsed_version\030\003 \001(\013" + + "2\023.grafeas.v1.Version\0225\n\014distribution\030\004 " + + "\001(\0132\037.grafeas.v1.UpgradeDistribution\0221\n\016" + + "windows_update\030\005 \001(\0132\031.grafeas.v1.Window" + + "sUpdateBQ\n\rio.grafeas.v1P\001Z8google.golan" + + "g.org/genproto/googleapis/grafeas/v1;gra" + + "feas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + io.grafeas.v1.Package.getDescriptor(), + }); + internal_static_grafeas_v1_UpgradeNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_UpgradeNote_descriptor, + new java.lang.String[] { "Package", "Version", "Distributions", "WindowsUpdate", }); + internal_static_grafeas_v1_UpgradeDistribution_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_UpgradeDistribution_descriptor, + new java.lang.String[] { "CpeUri", "Classification", "Severity", "Cve", }); + internal_static_grafeas_v1_WindowsUpdate_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_WindowsUpdate_descriptor, + new java.lang.String[] { "Identity", "Title", "Description", "Categories", "KbArticleIds", "SupportUrl", "LastPublishedTimestamp", }); + internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor = + internal_static_grafeas_v1_WindowsUpdate_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor, + new java.lang.String[] { "UpdateId", "Revision", }); + internal_static_grafeas_v1_WindowsUpdate_Category_descriptor = + internal_static_grafeas_v1_WindowsUpdate_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_WindowsUpdate_Category_descriptor, + new java.lang.String[] { "CategoryId", "Name", }); + internal_static_grafeas_v1_UpgradeOccurrence_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_UpgradeOccurrence_descriptor, + new java.lang.String[] { "Package", "ParsedVersion", "Distribution", "WindowsUpdate", }); + com.google.protobuf.TimestampProto.getDescriptor(); + io.grafeas.v1.Package.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java new file mode 100644 index 000000000000..0a867618fecf --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java @@ -0,0 +1,1177 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +/** + *
+ * The Upgrade Distribution represents metadata about the Upgrade for each
+ * operating system (CPE). Some distributions have additional metadata around
+ * updates, classifying them into various categories and severities.
+ * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeDistribution} + */ +public final class UpgradeDistribution extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeDistribution) + UpgradeDistributionOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpgradeDistribution.newBuilder() to construct. + private UpgradeDistribution(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpgradeDistribution() { + cpeUri_ = ""; + classification_ = ""; + severity_ = ""; + cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpgradeDistribution(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeDistribution.class, io.grafeas.v1.UpgradeDistribution.Builder.class); + } + + public static final int CPE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cpeUri_ = ""; + /** + *
+   * Required - The specific operating system this metadata applies to. See
+   * https://cpe.mitre.org/specification/.
+   * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + @java.lang.Override + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } + } + /** + *
+   * Required - The specific operating system this metadata applies to. See
+   * https://cpe.mitre.org/specification/.
+   * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLASSIFICATION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object classification_ = ""; + /** + *
+   * The operating system classification of this Upgrade, as specified by the
+   * upstream operating system upgrade feed. For Windows the classification is
+   * one of the category_ids listed at
+   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+   * 
+ * + * string classification = 2; + * @return The classification. + */ + @java.lang.Override + public java.lang.String getClassification() { + java.lang.Object ref = classification_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + classification_ = s; + return s; + } + } + /** + *
+   * The operating system classification of this Upgrade, as specified by the
+   * upstream operating system upgrade feed. For Windows the classification is
+   * one of the category_ids listed at
+   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+   * 
+ * + * string classification = 2; + * @return The bytes for classification. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getClassificationBytes() { + java.lang.Object ref = classification_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + classification_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEVERITY_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object severity_ = ""; + /** + *
+   * The severity as specified by the upstream operating system.
+   * 
+ * + * string severity = 3; + * @return The severity. + */ + @java.lang.Override + public java.lang.String getSeverity() { + java.lang.Object ref = severity_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + severity_ = s; + return s; + } + } + /** + *
+   * The severity as specified by the upstream operating system.
+   * 
+ * + * string severity = 3; + * @return The bytes for severity. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSeverityBytes() { + java.lang.Object ref = severity_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + severity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CVE_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList cve_; + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @return A list containing the cve. + */ + public com.google.protobuf.ProtocolStringList + getCveList() { + return cve_; + } + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @return The count of cve. + */ + public int getCveCount() { + return cve_.size(); + } + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @param index The index of the element to return. + * @return The cve at the given index. + */ + public java.lang.String getCve(int index) { + return cve_.get(index); + } + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @param index The index of the value to return. + * @return The bytes of the cve at the given index. + */ + public com.google.protobuf.ByteString + getCveBytes(int index) { + return cve_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(classification_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, classification_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severity_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, severity_); + } + for (int i = 0; i < cve_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cve_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(classification_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, classification_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severity_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, severity_); + } + { + int dataSize = 0; + for (int i = 0; i < cve_.size(); i++) { + dataSize += computeStringSizeNoTag(cve_.getRaw(i)); + } + size += dataSize; + size += 1 * getCveList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.UpgradeDistribution)) { + return super.equals(obj); + } + io.grafeas.v1.UpgradeDistribution other = (io.grafeas.v1.UpgradeDistribution) obj; + + if (!getCpeUri() + .equals(other.getCpeUri())) return false; + if (!getClassification() + .equals(other.getClassification())) return false; + if (!getSeverity() + .equals(other.getSeverity())) return false; + if (!getCveList() + .equals(other.getCveList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCpeUri().hashCode(); + hash = (37 * hash) + CLASSIFICATION_FIELD_NUMBER; + hash = (53 * hash) + getClassification().hashCode(); + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + getSeverity().hashCode(); + if (getCveCount() > 0) { + hash = (37 * hash) + CVE_FIELD_NUMBER; + hash = (53 * hash) + getCveList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.UpgradeDistribution parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpgradeDistribution parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeDistribution parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeDistribution parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.UpgradeDistribution prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The Upgrade Distribution represents metadata about the Upgrade for each
+   * operating system (CPE). Some distributions have additional metadata around
+   * updates, classifying them into various categories and severities.
+   * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeDistribution} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeDistribution) + io.grafeas.v1.UpgradeDistributionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeDistribution.class, io.grafeas.v1.UpgradeDistribution.Builder.class); + } + + // Construct using io.grafeas.v1.UpgradeDistribution.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cpeUri_ = ""; + classification_ = ""; + severity_ = ""; + cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeDistribution getDefaultInstanceForType() { + return io.grafeas.v1.UpgradeDistribution.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.UpgradeDistribution build() { + io.grafeas.v1.UpgradeDistribution result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeDistribution buildPartial() { + io.grafeas.v1.UpgradeDistribution result = new io.grafeas.v1.UpgradeDistribution(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.UpgradeDistribution result) { + if (((bitField0_ & 0x00000008) != 0)) { + cve_ = cve_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.cve_ = cve_; + } + + private void buildPartial0(io.grafeas.v1.UpgradeDistribution result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cpeUri_ = cpeUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.classification_ = classification_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.severity_ = severity_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.UpgradeDistribution) { + return mergeFrom((io.grafeas.v1.UpgradeDistribution)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.UpgradeDistribution other) { + if (other == io.grafeas.v1.UpgradeDistribution.getDefaultInstance()) return this; + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getClassification().isEmpty()) { + classification_ = other.classification_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSeverity().isEmpty()) { + severity_ = other.severity_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.cve_.isEmpty()) { + if (cve_.isEmpty()) { + cve_ = other.cve_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureCveIsMutable(); + cve_.addAll(other.cve_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + classification_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + severity_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + ensureCveIsMutable(); + cve_.add(s); + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cpeUri_ = ""; + /** + *
+     * Required - The specific operating system this metadata applies to. See
+     * https://cpe.mitre.org/specification/.
+     * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required - The specific operating system this metadata applies to. See
+     * https://cpe.mitre.org/specification/.
+     * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required - The specific operating system this metadata applies to. See
+     * https://cpe.mitre.org/specification/.
+     * 
+ * + * string cpe_uri = 1; + * @param value The cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required - The specific operating system this metadata applies to. See
+     * https://cpe.mitre.org/specification/.
+     * 
+ * + * string cpe_uri = 1; + * @return This builder for chaining. + */ + public Builder clearCpeUri() { + cpeUri_ = getDefaultInstance().getCpeUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required - The specific operating system this metadata applies to. See
+     * https://cpe.mitre.org/specification/.
+     * 
+ * + * string cpe_uri = 1; + * @param value The bytes for cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object classification_ = ""; + /** + *
+     * The operating system classification of this Upgrade, as specified by the
+     * upstream operating system upgrade feed. For Windows the classification is
+     * one of the category_ids listed at
+     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+     * 
+ * + * string classification = 2; + * @return The classification. + */ + public java.lang.String getClassification() { + java.lang.Object ref = classification_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + classification_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The operating system classification of this Upgrade, as specified by the
+     * upstream operating system upgrade feed. For Windows the classification is
+     * one of the category_ids listed at
+     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+     * 
+ * + * string classification = 2; + * @return The bytes for classification. + */ + public com.google.protobuf.ByteString + getClassificationBytes() { + java.lang.Object ref = classification_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + classification_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The operating system classification of this Upgrade, as specified by the
+     * upstream operating system upgrade feed. For Windows the classification is
+     * one of the category_ids listed at
+     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+     * 
+ * + * string classification = 2; + * @param value The classification to set. + * @return This builder for chaining. + */ + public Builder setClassification( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + classification_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The operating system classification of this Upgrade, as specified by the
+     * upstream operating system upgrade feed. For Windows the classification is
+     * one of the category_ids listed at
+     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+     * 
+ * + * string classification = 2; + * @return This builder for chaining. + */ + public Builder clearClassification() { + classification_ = getDefaultInstance().getClassification(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The operating system classification of this Upgrade, as specified by the
+     * upstream operating system upgrade feed. For Windows the classification is
+     * one of the category_ids listed at
+     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+     * 
+ * + * string classification = 2; + * @param value The bytes for classification to set. + * @return This builder for chaining. + */ + public Builder setClassificationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + classification_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object severity_ = ""; + /** + *
+     * The severity as specified by the upstream operating system.
+     * 
+ * + * string severity = 3; + * @return The severity. + */ + public java.lang.String getSeverity() { + java.lang.Object ref = severity_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + severity_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The severity as specified by the upstream operating system.
+     * 
+ * + * string severity = 3; + * @return The bytes for severity. + */ + public com.google.protobuf.ByteString + getSeverityBytes() { + java.lang.Object ref = severity_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + severity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The severity as specified by the upstream operating system.
+     * 
+ * + * string severity = 3; + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + severity_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The severity as specified by the upstream operating system.
+     * 
+ * + * string severity = 3; + * @return This builder for chaining. + */ + public Builder clearSeverity() { + severity_ = getDefaultInstance().getSeverity(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The severity as specified by the upstream operating system.
+     * 
+ * + * string severity = 3; + * @param value The bytes for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + severity_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureCveIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + cve_ = new com.google.protobuf.LazyStringArrayList(cve_); + bitField0_ |= 0x00000008; + } + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @return A list containing the cve. + */ + public com.google.protobuf.ProtocolStringList + getCveList() { + return cve_.getUnmodifiableView(); + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @return The count of cve. + */ + public int getCveCount() { + return cve_.size(); + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @param index The index of the element to return. + * @return The cve at the given index. + */ + public java.lang.String getCve(int index) { + return cve_.get(index); + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @param index The index of the value to return. + * @return The bytes of the cve at the given index. + */ + public com.google.protobuf.ByteString + getCveBytes(int index) { + return cve_.getByteString(index); + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @param index The index to set the value at. + * @param value The cve to set. + * @return This builder for chaining. + */ + public Builder setCve( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureCveIsMutable(); + cve_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @param value The cve to add. + * @return This builder for chaining. + */ + public Builder addCve( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureCveIsMutable(); + cve_.add(value); + onChanged(); + return this; + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @param values The cve to add. + * @return This builder for chaining. + */ + public Builder addAllCve( + java.lang.Iterable values) { + ensureCveIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, cve_); + onChanged(); + return this; + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @return This builder for chaining. + */ + public Builder clearCve() { + cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * @param value The bytes of the cve to add. + * @return This builder for chaining. + */ + public Builder addCveBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureCveIsMutable(); + cve_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.UpgradeDistribution) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeDistribution) + private static final io.grafeas.v1.UpgradeDistribution DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeDistribution(); + } + + public static io.grafeas.v1.UpgradeDistribution getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeDistribution parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeDistribution getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java new file mode 100644 index 000000000000..ae654ff74cbf --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java @@ -0,0 +1,118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +public interface UpgradeDistributionOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.UpgradeDistribution) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required - The specific operating system this metadata applies to. See
+   * https://cpe.mitre.org/specification/.
+   * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + java.lang.String getCpeUri(); + /** + *
+   * Required - The specific operating system this metadata applies to. See
+   * https://cpe.mitre.org/specification/.
+   * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + com.google.protobuf.ByteString + getCpeUriBytes(); + + /** + *
+   * The operating system classification of this Upgrade, as specified by the
+   * upstream operating system upgrade feed. For Windows the classification is
+   * one of the category_ids listed at
+   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+   * 
+ * + * string classification = 2; + * @return The classification. + */ + java.lang.String getClassification(); + /** + *
+   * The operating system classification of this Upgrade, as specified by the
+   * upstream operating system upgrade feed. For Windows the classification is
+   * one of the category_ids listed at
+   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+   * 
+ * + * string classification = 2; + * @return The bytes for classification. + */ + com.google.protobuf.ByteString + getClassificationBytes(); + + /** + *
+   * The severity as specified by the upstream operating system.
+   * 
+ * + * string severity = 3; + * @return The severity. + */ + java.lang.String getSeverity(); + /** + *
+   * The severity as specified by the upstream operating system.
+   * 
+ * + * string severity = 3; + * @return The bytes for severity. + */ + com.google.protobuf.ByteString + getSeverityBytes(); + + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @return A list containing the cve. + */ + java.util.List + getCveList(); + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @return The count of cve. + */ + int getCveCount(); + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @param index The index of the element to return. + * @return The cve at the given index. + */ + java.lang.String getCve(int index); + /** + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * @param index The index of the value to return. + * @return The bytes of the cve at the given index. + */ + com.google.protobuf.ByteString + getCveBytes(int index); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java new file mode 100644 index 000000000000..98cf3755164e --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java @@ -0,0 +1,1502 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +/** + *
+ * An Upgrade Note represents a potential upgrade of a package to a given
+ * version. For each package version combination (i.e. bash 4.0, bash 4.1,
+ * bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field
+ * represents the information related to the update.
+ * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeNote} + */ +public final class UpgradeNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeNote) + UpgradeNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpgradeNote.newBuilder() to construct. + private UpgradeNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpgradeNote() { + package_ = ""; + distributions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpgradeNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeNote.class, io.grafeas.v1.UpgradeNote.Builder.class); + } + + public static final int PACKAGE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object package_ = ""; + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The package. + */ + @java.lang.Override + public java.lang.String getPackage() { + java.lang.Object ref = package_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + package_ = s; + return s; + } + } + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The bytes for package. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPackageBytes() { + java.lang.Object ref = package_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + package_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + private io.grafeas.v1.Version version_; + /** + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return Whether the version field is set. + */ + @java.lang.Override + public boolean hasVersion() { + return version_ != null; + } + /** + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return The version. + */ + @java.lang.Override + public io.grafeas.v1.Version getVersion() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + /** + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + + public static final int DISTRIBUTIONS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List distributions_; + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + @java.lang.Override + public java.util.List getDistributionsList() { + return distributions_; + } + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + @java.lang.Override + public java.util.List + getDistributionsOrBuilderList() { + return distributions_; + } + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + @java.lang.Override + public int getDistributionsCount() { + return distributions_.size(); + } + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + @java.lang.Override + public io.grafeas.v1.UpgradeDistribution getDistributions(int index) { + return distributions_.get(index); + } + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + @java.lang.Override + public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder( + int index) { + return distributions_.get(index); + } + + public static final int WINDOWS_UPDATE_FIELD_NUMBER = 4; + private io.grafeas.v1.WindowsUpdate windowsUpdate_; + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * @return Whether the windowsUpdate field is set. + */ + @java.lang.Override + public boolean hasWindowsUpdate() { + return windowsUpdate_ != null; + } + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * @return The windowsUpdate. + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { + return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { + return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, package_); + } + if (version_ != null) { + output.writeMessage(2, getVersion()); + } + for (int i = 0; i < distributions_.size(); i++) { + output.writeMessage(3, distributions_.get(i)); + } + if (windowsUpdate_ != null) { + output.writeMessage(4, getWindowsUpdate()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, package_); + } + if (version_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getVersion()); + } + for (int i = 0; i < distributions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, distributions_.get(i)); + } + if (windowsUpdate_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getWindowsUpdate()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.UpgradeNote)) { + return super.equals(obj); + } + io.grafeas.v1.UpgradeNote other = (io.grafeas.v1.UpgradeNote) obj; + + if (!getPackage() + .equals(other.getPackage())) return false; + if (hasVersion() != other.hasVersion()) return false; + if (hasVersion()) { + if (!getVersion() + .equals(other.getVersion())) return false; + } + if (!getDistributionsList() + .equals(other.getDistributionsList())) return false; + if (hasWindowsUpdate() != other.hasWindowsUpdate()) return false; + if (hasWindowsUpdate()) { + if (!getWindowsUpdate() + .equals(other.getWindowsUpdate())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPackage().hashCode(); + if (hasVersion()) { + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + } + if (getDistributionsCount() > 0) { + hash = (37 * hash) + DISTRIBUTIONS_FIELD_NUMBER; + hash = (53 * hash) + getDistributionsList().hashCode(); + } + if (hasWindowsUpdate()) { + hash = (37 * hash) + WINDOWS_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getWindowsUpdate().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.UpgradeNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpgradeNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpgradeNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.UpgradeNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An Upgrade Note represents a potential upgrade of a package to a given
+   * version. For each package version combination (i.e. bash 4.0, bash 4.1,
+   * bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field
+   * represents the information related to the update.
+   * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeNote) + io.grafeas.v1.UpgradeNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeNote.class, io.grafeas.v1.UpgradeNote.Builder.class); + } + + // Construct using io.grafeas.v1.UpgradeNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + package_ = ""; + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + if (distributionsBuilder_ == null) { + distributions_ = java.util.Collections.emptyList(); + } else { + distributions_ = null; + distributionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + windowsUpdate_ = null; + if (windowsUpdateBuilder_ != null) { + windowsUpdateBuilder_.dispose(); + windowsUpdateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeNote getDefaultInstanceForType() { + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.UpgradeNote build() { + io.grafeas.v1.UpgradeNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeNote buildPartial() { + io.grafeas.v1.UpgradeNote result = new io.grafeas.v1.UpgradeNote(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.UpgradeNote result) { + if (distributionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + distributions_ = java.util.Collections.unmodifiableList(distributions_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.distributions_ = distributions_; + } else { + result.distributions_ = distributionsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.UpgradeNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.package_ = package_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.version_ = versionBuilder_ == null + ? version_ + : versionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.windowsUpdate_ = windowsUpdateBuilder_ == null + ? windowsUpdate_ + : windowsUpdateBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.UpgradeNote) { + return mergeFrom((io.grafeas.v1.UpgradeNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.UpgradeNote other) { + if (other == io.grafeas.v1.UpgradeNote.getDefaultInstance()) return this; + if (!other.getPackage().isEmpty()) { + package_ = other.package_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasVersion()) { + mergeVersion(other.getVersion()); + } + if (distributionsBuilder_ == null) { + if (!other.distributions_.isEmpty()) { + if (distributions_.isEmpty()) { + distributions_ = other.distributions_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDistributionsIsMutable(); + distributions_.addAll(other.distributions_); + } + onChanged(); + } + } else { + if (!other.distributions_.isEmpty()) { + if (distributionsBuilder_.isEmpty()) { + distributionsBuilder_.dispose(); + distributionsBuilder_ = null; + distributions_ = other.distributions_; + bitField0_ = (bitField0_ & ~0x00000004); + distributionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDistributionsFieldBuilder() : null; + } else { + distributionsBuilder_.addAllMessages(other.distributions_); + } + } + } + if (other.hasWindowsUpdate()) { + mergeWindowsUpdate(other.getWindowsUpdate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + package_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + io.grafeas.v1.UpgradeDistribution m = + input.readMessage( + io.grafeas.v1.UpgradeDistribution.parser(), + extensionRegistry); + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + distributions_.add(m); + } else { + distributionsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: { + input.readMessage( + getWindowsUpdateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object package_ = ""; + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @return The package. + */ + public java.lang.String getPackage() { + java.lang.Object ref = package_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + package_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @return The bytes for package. + */ + public com.google.protobuf.ByteString + getPackageBytes() { + java.lang.Object ref = package_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + package_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @param value The package to set. + * @return This builder for chaining. + */ + public Builder setPackage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + package_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @return This builder for chaining. + */ + public Builder clearPackage() { + package_ = getDefaultInstance().getPackage(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @param value The bytes for package to set. + * @return This builder for chaining. + */ + public Builder setPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + package_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.grafeas.v1.Version version_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + * @return Whether the version field is set. + */ + public boolean hasVersion() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + * @return The version. + */ + public io.grafeas.v1.Version getVersion() { + if (versionBuilder_ == null) { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } else { + return versionBuilder_.getMessage(); + } + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder setVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + } else { + versionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder setVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (versionBuilder_ == null) { + version_ = builderForValue.build(); + } else { + versionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder mergeVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + version_ != null && + version_ != io.grafeas.v1.Version.getDefaultInstance()) { + getVersionBuilder().mergeFrom(value); + } else { + version_ = value; + } + } else { + versionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder clearVersion() { + bitField0_ = (bitField0_ & ~0x00000002); + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); + versionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public io.grafeas.v1.Version.Builder getVersionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getVersionFieldBuilder().getBuilder(); + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + if (versionBuilder_ != null) { + return versionBuilder_.getMessageOrBuilder(); + } else { + return version_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : version_; + } + } + /** + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getVersionFieldBuilder() { + if (versionBuilder_ == null) { + versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getVersion(), + getParentForChildren(), + isClean()); + version_ = null; + } + return versionBuilder_; + } + + private java.util.List distributions_ = + java.util.Collections.emptyList(); + private void ensureDistributionsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + distributions_ = new java.util.ArrayList(distributions_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> distributionsBuilder_; + + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public java.util.List getDistributionsList() { + if (distributionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(distributions_); + } else { + return distributionsBuilder_.getMessageList(); + } + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public int getDistributionsCount() { + if (distributionsBuilder_ == null) { + return distributions_.size(); + } else { + return distributionsBuilder_.getCount(); + } + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistribution getDistributions(int index) { + if (distributionsBuilder_ == null) { + return distributions_.get(index); + } else { + return distributionsBuilder_.getMessage(index); + } + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder setDistributions( + int index, io.grafeas.v1.UpgradeDistribution value) { + if (distributionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDistributionsIsMutable(); + distributions_.set(index, value); + onChanged(); + } else { + distributionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder setDistributions( + int index, io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + distributions_.set(index, builderForValue.build()); + onChanged(); + } else { + distributionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder addDistributions(io.grafeas.v1.UpgradeDistribution value) { + if (distributionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDistributionsIsMutable(); + distributions_.add(value); + onChanged(); + } else { + distributionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder addDistributions( + int index, io.grafeas.v1.UpgradeDistribution value) { + if (distributionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDistributionsIsMutable(); + distributions_.add(index, value); + onChanged(); + } else { + distributionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder addDistributions( + io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + distributions_.add(builderForValue.build()); + onChanged(); + } else { + distributionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder addDistributions( + int index, io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + distributions_.add(index, builderForValue.build()); + onChanged(); + } else { + distributionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder addAllDistributions( + java.lang.Iterable values) { + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, distributions_); + onChanged(); + } else { + distributionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder clearDistributions() { + if (distributionsBuilder_ == null) { + distributions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + distributionsBuilder_.clear(); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder removeDistributions(int index) { + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + distributions_.remove(index); + onChanged(); + } else { + distributionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistribution.Builder getDistributionsBuilder( + int index) { + return getDistributionsFieldBuilder().getBuilder(index); + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder( + int index) { + if (distributionsBuilder_ == null) { + return distributions_.get(index); } else { + return distributionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public java.util.List + getDistributionsOrBuilderList() { + if (distributionsBuilder_ != null) { + return distributionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(distributions_); + } + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistribution.Builder addDistributionsBuilder() { + return getDistributionsFieldBuilder().addBuilder( + io.grafeas.v1.UpgradeDistribution.getDefaultInstance()); + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistribution.Builder addDistributionsBuilder( + int index) { + return getDistributionsFieldBuilder().addBuilder( + index, io.grafeas.v1.UpgradeDistribution.getDefaultInstance()); + } + /** + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public java.util.List + getDistributionsBuilderList() { + return getDistributionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> + getDistributionsFieldBuilder() { + if (distributionsBuilder_ == null) { + distributionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder>( + distributions_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + distributions_ = null; + } + return distributionsBuilder_; + } + + private io.grafeas.v1.WindowsUpdate windowsUpdate_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> windowsUpdateBuilder_; + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * @return Whether the windowsUpdate field is set. + */ + public boolean hasWindowsUpdate() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * @return The windowsUpdate. + */ + public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { + if (windowsUpdateBuilder_ == null) { + return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } else { + return windowsUpdateBuilder_.getMessage(); + } + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public Builder setWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { + if (windowsUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + windowsUpdate_ = value; + } else { + windowsUpdateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public Builder setWindowsUpdate( + io.grafeas.v1.WindowsUpdate.Builder builderForValue) { + if (windowsUpdateBuilder_ == null) { + windowsUpdate_ = builderForValue.build(); + } else { + windowsUpdateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public Builder mergeWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { + if (windowsUpdateBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + windowsUpdate_ != null && + windowsUpdate_ != io.grafeas.v1.WindowsUpdate.getDefaultInstance()) { + getWindowsUpdateBuilder().mergeFrom(value); + } else { + windowsUpdate_ = value; + } + } else { + windowsUpdateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public Builder clearWindowsUpdate() { + bitField0_ = (bitField0_ & ~0x00000008); + windowsUpdate_ = null; + if (windowsUpdateBuilder_ != null) { + windowsUpdateBuilder_.dispose(); + windowsUpdateBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public io.grafeas.v1.WindowsUpdate.Builder getWindowsUpdateBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getWindowsUpdateFieldBuilder().getBuilder(); + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { + if (windowsUpdateBuilder_ != null) { + return windowsUpdateBuilder_.getMessageOrBuilder(); + } else { + return windowsUpdate_ == null ? + io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> + getWindowsUpdateFieldBuilder() { + if (windowsUpdateBuilder_ == null) { + windowsUpdateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder>( + getWindowsUpdate(), + getParentForChildren(), + isClean()); + windowsUpdate_ = null; + } + return windowsUpdateBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.UpgradeNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeNote) + private static final io.grafeas.v1.UpgradeNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeNote(); + } + + public static io.grafeas.v1.UpgradeNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java new file mode 100644 index 000000000000..5ba319277bdd --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java @@ -0,0 +1,130 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +public interface UpgradeNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.UpgradeNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The package. + */ + java.lang.String getPackage(); + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The bytes for package. + */ + com.google.protobuf.ByteString + getPackageBytes(); + + /** + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return Whether the version field is set. + */ + boolean hasVersion(); + /** + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * @return The version. + */ + io.grafeas.v1.Version getVersion(); + /** + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + */ + io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); + + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + java.util.List + getDistributionsList(); + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + io.grafeas.v1.UpgradeDistribution getDistributions(int index); + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + int getDistributionsCount(); + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + java.util.List + getDistributionsOrBuilderList(); + /** + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder( + int index); + + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * @return Whether the windowsUpdate field is set. + */ + boolean hasWindowsUpdate(); + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * @return The windowsUpdate. + */ + io.grafeas.v1.WindowsUpdate getWindowsUpdate(); + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java new file mode 100644 index 000000000000..c82c44559daa --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java @@ -0,0 +1,1311 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +/** + *
+ * An Upgrade Occurrence represents that a specific resource_url could install a
+ * specific upgrade. This presence is supplied via local sources (i.e. it is
+ * present in the mirror and the running system has noticed its availability).
+ * For Windows, both distribution and windows_update contain information for the
+ * Windows update.
+ * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeOccurrence} + */ +public final class UpgradeOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeOccurrence) + UpgradeOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpgradeOccurrence.newBuilder() to construct. + private UpgradeOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpgradeOccurrence() { + package_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpgradeOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeOccurrence.class, io.grafeas.v1.UpgradeOccurrence.Builder.class); + } + + public static final int PACKAGE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object package_ = ""; + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The package. + */ + @java.lang.Override + public java.lang.String getPackage() { + java.lang.Object ref = package_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + package_ = s; + return s; + } + } + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The bytes for package. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPackageBytes() { + java.lang.Object ref = package_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + package_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARSED_VERSION_FIELD_NUMBER = 3; + private io.grafeas.v1.Version parsedVersion_; + /** + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * @return Whether the parsedVersion field is set. + */ + @java.lang.Override + public boolean hasParsedVersion() { + return parsedVersion_ != null; + } + /** + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * @return The parsedVersion. + */ + @java.lang.Override + public io.grafeas.v1.Version getParsedVersion() { + return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; + } + /** + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder() { + return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; + } + + public static final int DISTRIBUTION_FIELD_NUMBER = 4; + private io.grafeas.v1.UpgradeDistribution distribution_; + /** + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * @return Whether the distribution field is set. + */ + @java.lang.Override + public boolean hasDistribution() { + return distribution_ != null; + } + /** + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * @return The distribution. + */ + @java.lang.Override + public io.grafeas.v1.UpgradeDistribution getDistribution() { + return distribution_ == null ? io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; + } + /** + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + @java.lang.Override + public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder() { + return distribution_ == null ? io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; + } + + public static final int WINDOWS_UPDATE_FIELD_NUMBER = 5; + private io.grafeas.v1.WindowsUpdate windowsUpdate_; + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * @return Whether the windowsUpdate field is set. + */ + @java.lang.Override + public boolean hasWindowsUpdate() { + return windowsUpdate_ != null; + } + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * @return The windowsUpdate. + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { + return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { + return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, package_); + } + if (parsedVersion_ != null) { + output.writeMessage(3, getParsedVersion()); + } + if (distribution_ != null) { + output.writeMessage(4, getDistribution()); + } + if (windowsUpdate_ != null) { + output.writeMessage(5, getWindowsUpdate()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, package_); + } + if (parsedVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getParsedVersion()); + } + if (distribution_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getDistribution()); + } + if (windowsUpdate_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getWindowsUpdate()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.UpgradeOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.UpgradeOccurrence other = (io.grafeas.v1.UpgradeOccurrence) obj; + + if (!getPackage() + .equals(other.getPackage())) return false; + if (hasParsedVersion() != other.hasParsedVersion()) return false; + if (hasParsedVersion()) { + if (!getParsedVersion() + .equals(other.getParsedVersion())) return false; + } + if (hasDistribution() != other.hasDistribution()) return false; + if (hasDistribution()) { + if (!getDistribution() + .equals(other.getDistribution())) return false; + } + if (hasWindowsUpdate() != other.hasWindowsUpdate()) return false; + if (hasWindowsUpdate()) { + if (!getWindowsUpdate() + .equals(other.getWindowsUpdate())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPackage().hashCode(); + if (hasParsedVersion()) { + hash = (37 * hash) + PARSED_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getParsedVersion().hashCode(); + } + if (hasDistribution()) { + hash = (37 * hash) + DISTRIBUTION_FIELD_NUMBER; + hash = (53 * hash) + getDistribution().hashCode(); + } + if (hasWindowsUpdate()) { + hash = (37 * hash) + WINDOWS_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getWindowsUpdate().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpgradeOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.UpgradeOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An Upgrade Occurrence represents that a specific resource_url could install a
+   * specific upgrade. This presence is supplied via local sources (i.e. it is
+   * present in the mirror and the running system has noticed its availability).
+   * For Windows, both distribution and windows_update contain information for the
+   * Windows update.
+   * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeOccurrence) + io.grafeas.v1.UpgradeOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeOccurrence.class, io.grafeas.v1.UpgradeOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.UpgradeOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + package_ = ""; + parsedVersion_ = null; + if (parsedVersionBuilder_ != null) { + parsedVersionBuilder_.dispose(); + parsedVersionBuilder_ = null; + } + distribution_ = null; + if (distributionBuilder_ != null) { + distributionBuilder_.dispose(); + distributionBuilder_ = null; + } + windowsUpdate_ = null; + if (windowsUpdateBuilder_ != null) { + windowsUpdateBuilder_.dispose(); + windowsUpdateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrence build() { + io.grafeas.v1.UpgradeOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrence buildPartial() { + io.grafeas.v1.UpgradeOccurrence result = new io.grafeas.v1.UpgradeOccurrence(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.UpgradeOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.package_ = package_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parsedVersion_ = parsedVersionBuilder_ == null + ? parsedVersion_ + : parsedVersionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.distribution_ = distributionBuilder_ == null + ? distribution_ + : distributionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.windowsUpdate_ = windowsUpdateBuilder_ == null + ? windowsUpdate_ + : windowsUpdateBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.UpgradeOccurrence) { + return mergeFrom((io.grafeas.v1.UpgradeOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.UpgradeOccurrence other) { + if (other == io.grafeas.v1.UpgradeOccurrence.getDefaultInstance()) return this; + if (!other.getPackage().isEmpty()) { + package_ = other.package_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasParsedVersion()) { + mergeParsedVersion(other.getParsedVersion()); + } + if (other.hasDistribution()) { + mergeDistribution(other.getDistribution()); + } + if (other.hasWindowsUpdate()) { + mergeWindowsUpdate(other.getWindowsUpdate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + package_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: { + input.readMessage( + getParsedVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: { + input.readMessage( + getDistributionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: { + input.readMessage( + getWindowsUpdateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object package_ = ""; + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @return The package. + */ + public java.lang.String getPackage() { + java.lang.Object ref = package_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + package_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @return The bytes for package. + */ + public com.google.protobuf.ByteString + getPackageBytes() { + java.lang.Object ref = package_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + package_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @param value The package to set. + * @return This builder for chaining. + */ + public Builder setPackage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + package_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @return This builder for chaining. + */ + public Builder clearPackage() { + package_ = getDefaultInstance().getPackage(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * @param value The bytes for package to set. + * @return This builder for chaining. + */ + public Builder setPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + package_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.grafeas.v1.Version parsedVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> parsedVersionBuilder_; + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * @return Whether the parsedVersion field is set. + */ + public boolean hasParsedVersion() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * @return The parsedVersion. + */ + public io.grafeas.v1.Version getParsedVersion() { + if (parsedVersionBuilder_ == null) { + return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; + } else { + return parsedVersionBuilder_.getMessage(); + } + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public Builder setParsedVersion(io.grafeas.v1.Version value) { + if (parsedVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parsedVersion_ = value; + } else { + parsedVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public Builder setParsedVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (parsedVersionBuilder_ == null) { + parsedVersion_ = builderForValue.build(); + } else { + parsedVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public Builder mergeParsedVersion(io.grafeas.v1.Version value) { + if (parsedVersionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + parsedVersion_ != null && + parsedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { + getParsedVersionBuilder().mergeFrom(value); + } else { + parsedVersion_ = value; + } + } else { + parsedVersionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public Builder clearParsedVersion() { + bitField0_ = (bitField0_ & ~0x00000002); + parsedVersion_ = null; + if (parsedVersionBuilder_ != null) { + parsedVersionBuilder_.dispose(); + parsedVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public io.grafeas.v1.Version.Builder getParsedVersionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getParsedVersionFieldBuilder().getBuilder(); + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder() { + if (parsedVersionBuilder_ != null) { + return parsedVersionBuilder_.getMessageOrBuilder(); + } else { + return parsedVersion_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; + } + } + /** + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getParsedVersionFieldBuilder() { + if (parsedVersionBuilder_ == null) { + parsedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getParsedVersion(), + getParentForChildren(), + isClean()); + parsedVersion_ = null; + } + return parsedVersionBuilder_; + } + + private io.grafeas.v1.UpgradeDistribution distribution_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> distributionBuilder_; + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * @return Whether the distribution field is set. + */ + public boolean hasDistribution() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * @return The distribution. + */ + public io.grafeas.v1.UpgradeDistribution getDistribution() { + if (distributionBuilder_ == null) { + return distribution_ == null ? io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; + } else { + return distributionBuilder_.getMessage(); + } + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public Builder setDistribution(io.grafeas.v1.UpgradeDistribution value) { + if (distributionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + distribution_ = value; + } else { + distributionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public Builder setDistribution( + io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { + if (distributionBuilder_ == null) { + distribution_ = builderForValue.build(); + } else { + distributionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public Builder mergeDistribution(io.grafeas.v1.UpgradeDistribution value) { + if (distributionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + distribution_ != null && + distribution_ != io.grafeas.v1.UpgradeDistribution.getDefaultInstance()) { + getDistributionBuilder().mergeFrom(value); + } else { + distribution_ = value; + } + } else { + distributionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public Builder clearDistribution() { + bitField0_ = (bitField0_ & ~0x00000004); + distribution_ = null; + if (distributionBuilder_ != null) { + distributionBuilder_.dispose(); + distributionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public io.grafeas.v1.UpgradeDistribution.Builder getDistributionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDistributionFieldBuilder().getBuilder(); + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder() { + if (distributionBuilder_ != null) { + return distributionBuilder_.getMessageOrBuilder(); + } else { + return distribution_ == null ? + io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; + } + } + /** + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> + getDistributionFieldBuilder() { + if (distributionBuilder_ == null) { + distributionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder>( + getDistribution(), + getParentForChildren(), + isClean()); + distribution_ = null; + } + return distributionBuilder_; + } + + private io.grafeas.v1.WindowsUpdate windowsUpdate_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> windowsUpdateBuilder_; + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * @return Whether the windowsUpdate field is set. + */ + public boolean hasWindowsUpdate() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * @return The windowsUpdate. + */ + public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { + if (windowsUpdateBuilder_ == null) { + return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } else { + return windowsUpdateBuilder_.getMessage(); + } + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public Builder setWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { + if (windowsUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + windowsUpdate_ = value; + } else { + windowsUpdateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public Builder setWindowsUpdate( + io.grafeas.v1.WindowsUpdate.Builder builderForValue) { + if (windowsUpdateBuilder_ == null) { + windowsUpdate_ = builderForValue.build(); + } else { + windowsUpdateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public Builder mergeWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { + if (windowsUpdateBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + windowsUpdate_ != null && + windowsUpdate_ != io.grafeas.v1.WindowsUpdate.getDefaultInstance()) { + getWindowsUpdateBuilder().mergeFrom(value); + } else { + windowsUpdate_ = value; + } + } else { + windowsUpdateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public Builder clearWindowsUpdate() { + bitField0_ = (bitField0_ & ~0x00000008); + windowsUpdate_ = null; + if (windowsUpdateBuilder_ != null) { + windowsUpdateBuilder_.dispose(); + windowsUpdateBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public io.grafeas.v1.WindowsUpdate.Builder getWindowsUpdateBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getWindowsUpdateFieldBuilder().getBuilder(); + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { + if (windowsUpdateBuilder_ != null) { + return windowsUpdateBuilder_.getMessageOrBuilder(); + } else { + return windowsUpdate_ == null ? + io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; + } + } + /** + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> + getWindowsUpdateFieldBuilder() { + if (windowsUpdateBuilder_ == null) { + windowsUpdateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder>( + getWindowsUpdate(), + getParentForChildren(), + isClean()); + windowsUpdate_ = null; + } + return windowsUpdateBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.UpgradeOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeOccurrence) + private static final io.grafeas.v1.UpgradeOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeOccurrence(); + } + + public static io.grafeas.v1.UpgradeOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java new file mode 100644 index 000000000000..0b38a1018b82 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +public interface UpgradeOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.UpgradeOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The package. + */ + java.lang.String getPackage(); + /** + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * @return The bytes for package. + */ + com.google.protobuf.ByteString + getPackageBytes(); + + /** + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * @return Whether the parsedVersion field is set. + */ + boolean hasParsedVersion(); + /** + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * @return The parsedVersion. + */ + io.grafeas.v1.Version getParsedVersion(); + /** + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder(); + + /** + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * @return Whether the distribution field is set. + */ + boolean hasDistribution(); + /** + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * @return The distribution. + */ + io.grafeas.v1.UpgradeDistribution getDistribution(); + /** + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder(); + + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * @return Whether the windowsUpdate field is set. + */ + boolean hasWindowsUpdate(); + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * @return The windowsUpdate. + */ + io.grafeas.v1.WindowsUpdate getWindowsUpdate(); + /** + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java new file mode 100644 index 000000000000..327a4d2a0671 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java @@ -0,0 +1,1398 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +/** + *
+ * Version contains structured information about the version of a package.
+ * 
+ * + * Protobuf type {@code grafeas.v1.Version} + */ +public final class Version extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.Version) + VersionOrBuilder { +private static final long serialVersionUID = 0L; + // Use Version.newBuilder() to construct. + private Version(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Version() { + name_ = ""; + revision_ = ""; + kind_ = 0; + fullName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Version(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Version.class, io.grafeas.v1.Version.Builder.class); + } + + /** + *
+   * Whether this is an ordinary package version or a sentinel MIN/MAX version.
+   * 
+ * + * Protobuf enum {@code grafeas.v1.Version.VersionKind} + */ + public enum VersionKind + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown.
+     * 
+ * + * VERSION_KIND_UNSPECIFIED = 0; + */ + VERSION_KIND_UNSPECIFIED(0), + /** + *
+     * A standard package version.
+     * 
+ * + * NORMAL = 1; + */ + NORMAL(1), + /** + *
+     * A special version representing negative infinity.
+     * 
+ * + * MINIMUM = 2; + */ + MINIMUM(2), + /** + *
+     * A special version representing positive infinity.
+     * 
+ * + * MAXIMUM = 3; + */ + MAXIMUM(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unknown.
+     * 
+ * + * VERSION_KIND_UNSPECIFIED = 0; + */ + public static final int VERSION_KIND_UNSPECIFIED_VALUE = 0; + /** + *
+     * A standard package version.
+     * 
+ * + * NORMAL = 1; + */ + public static final int NORMAL_VALUE = 1; + /** + *
+     * A special version representing negative infinity.
+     * 
+ * + * MINIMUM = 2; + */ + public static final int MINIMUM_VALUE = 2; + /** + *
+     * A special version representing positive infinity.
+     * 
+ * + * MAXIMUM = 3; + */ + public static final int MAXIMUM_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VersionKind valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static VersionKind forNumber(int value) { + switch (value) { + case 0: return VERSION_KIND_UNSPECIFIED; + case 1: return NORMAL; + case 2: return MINIMUM; + case 3: return MAXIMUM; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + VersionKind> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public VersionKind findValueByNumber(int number) { + return VersionKind.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.Version.getDescriptor().getEnumTypes().get(0); + } + + private static final VersionKind[] VALUES = values(); + + public static VersionKind valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private VersionKind(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.Version.VersionKind) + } + + public static final int EPOCH_FIELD_NUMBER = 1; + private int epoch_ = 0; + /** + *
+   * Used to correct mistakes in the version numbering scheme.
+   * 
+ * + * int32 epoch = 1; + * @return The epoch. + */ + @java.lang.Override + public int getEpoch() { + return epoch_; + } + + public static final int NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required only when version kind is NORMAL. The main part of the version
+   * name.
+   * 
+ * + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required only when version kind is NORMAL. The main part of the version
+   * name.
+   * 
+ * + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object revision_ = ""; + /** + *
+   * The iteration of the package build from the above version.
+   * 
+ * + * string revision = 3; + * @return The revision. + */ + @java.lang.Override + public java.lang.String getRevision() { + java.lang.Object ref = revision_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revision_ = s; + return s; + } + } + /** + *
+   * The iteration of the package build from the above version.
+   * 
+ * + * string revision = 3; + * @return The bytes for revision. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRevisionBytes() { + java.lang.Object ref = revision_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INCLUSIVE_FIELD_NUMBER = 6; + private boolean inclusive_ = false; + /** + *
+   * Whether this version is specifying part of an inclusive range. Grafeas
+   * does not have the capability to specify version ranges; instead we have
+   * fields that specify start version and end versions. At times this is
+   * insufficient - we also need to specify whether the version is included in
+   * the range or is excluded from the range. This boolean is expected to be set
+   * to true when the version is included in a range.
+   * 
+ * + * bool inclusive = 6; + * @return The inclusive. + */ + @java.lang.Override + public boolean getInclusive() { + return inclusive_; + } + + public static final int KIND_FIELD_NUMBER = 4; + private int kind_ = 0; + /** + *
+   * Required. Distinguishes between sentinel MIN/MAX versions and normal
+   * versions.
+   * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+   * Required. Distinguishes between sentinel MIN/MAX versions and normal
+   * versions.
+   * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @return The kind. + */ + @java.lang.Override public io.grafeas.v1.Version.VersionKind getKind() { + io.grafeas.v1.Version.VersionKind result = io.grafeas.v1.Version.VersionKind.forNumber(kind_); + return result == null ? io.grafeas.v1.Version.VersionKind.UNRECOGNIZED : result; + } + + public static final int FULL_NAME_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object fullName_ = ""; + /** + *
+   * Human readable version string. This string is of the form
+   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+   * 
+ * + * string full_name = 5; + * @return The fullName. + */ + @java.lang.Override + public java.lang.String getFullName() { + java.lang.Object ref = fullName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullName_ = s; + return s; + } + } + /** + *
+   * Human readable version string. This string is of the form
+   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+   * 
+ * + * string full_name = 5; + * @return The bytes for fullName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFullNameBytes() { + java.lang.Object ref = fullName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (epoch_ != 0) { + output.writeInt32(1, epoch_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, revision_); + } + if (kind_ != io.grafeas.v1.Version.VersionKind.VERSION_KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(4, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fullName_); + } + if (inclusive_ != false) { + output.writeBool(6, inclusive_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (epoch_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, epoch_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, revision_); + } + if (kind_ != io.grafeas.v1.Version.VersionKind.VERSION_KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, fullName_); + } + if (inclusive_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, inclusive_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.Version)) { + return super.equals(obj); + } + io.grafeas.v1.Version other = (io.grafeas.v1.Version) obj; + + if (getEpoch() + != other.getEpoch()) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getRevision() + .equals(other.getRevision())) return false; + if (getInclusive() + != other.getInclusive()) return false; + if (kind_ != other.kind_) return false; + if (!getFullName() + .equals(other.getFullName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EPOCH_FIELD_NUMBER; + hash = (53 * hash) + getEpoch(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REVISION_FIELD_NUMBER; + hash = (53 * hash) + getRevision().hashCode(); + hash = (37 * hash) + INCLUSIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getInclusive()); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + kind_; + hash = (37 * hash) + FULL_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFullName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.Version parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Version parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Version parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Version parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Version parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.Version parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.Version parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Version parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Version parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.Version parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.Version parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.Version parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.Version prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Version contains structured information about the version of a package.
+   * 
+ * + * Protobuf type {@code grafeas.v1.Version} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.Version) + io.grafeas.v1.VersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.Version.class, io.grafeas.v1.Version.Builder.class); + } + + // Construct using io.grafeas.v1.Version.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + epoch_ = 0; + name_ = ""; + revision_ = ""; + inclusive_ = false; + kind_ = 0; + fullName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.Version getDefaultInstanceForType() { + return io.grafeas.v1.Version.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.Version build() { + io.grafeas.v1.Version result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.Version buildPartial() { + io.grafeas.v1.Version result = new io.grafeas.v1.Version(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.Version result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.epoch_ = epoch_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.revision_ = revision_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.inclusive_ = inclusive_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.fullName_ = fullName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.Version) { + return mergeFrom((io.grafeas.v1.Version)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.Version other) { + if (other == io.grafeas.v1.Version.getDefaultInstance()) return this; + if (other.getEpoch() != 0) { + setEpoch(other.getEpoch()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRevision().isEmpty()) { + revision_ = other.revision_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getInclusive() != false) { + setInclusive(other.getInclusive()); + } + if (other.kind_ != 0) { + setKindValue(other.getKindValue()); + } + if (!other.getFullName().isEmpty()) { + fullName_ = other.fullName_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + epoch_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + revision_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + kind_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 32 + case 42: { + fullName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 48: { + inclusive_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 48 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int epoch_ ; + /** + *
+     * Used to correct mistakes in the version numbering scheme.
+     * 
+ * + * int32 epoch = 1; + * @return The epoch. + */ + @java.lang.Override + public int getEpoch() { + return epoch_; + } + /** + *
+     * Used to correct mistakes in the version numbering scheme.
+     * 
+ * + * int32 epoch = 1; + * @param value The epoch to set. + * @return This builder for chaining. + */ + public Builder setEpoch(int value) { + + epoch_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Used to correct mistakes in the version numbering scheme.
+     * 
+ * + * int32 epoch = 1; + * @return This builder for chaining. + */ + public Builder clearEpoch() { + bitField0_ = (bitField0_ & ~0x00000001); + epoch_ = 0; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required only when version kind is NORMAL. The main part of the version
+     * name.
+     * 
+ * + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required only when version kind is NORMAL. The main part of the version
+     * name.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required only when version kind is NORMAL. The main part of the version
+     * name.
+     * 
+ * + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required only when version kind is NORMAL. The main part of the version
+     * name.
+     * 
+ * + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Required only when version kind is NORMAL. The main part of the version
+     * name.
+     * 
+ * + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object revision_ = ""; + /** + *
+     * The iteration of the package build from the above version.
+     * 
+ * + * string revision = 3; + * @return The revision. + */ + public java.lang.String getRevision() { + java.lang.Object ref = revision_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revision_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The iteration of the package build from the above version.
+     * 
+ * + * string revision = 3; + * @return The bytes for revision. + */ + public com.google.protobuf.ByteString + getRevisionBytes() { + java.lang.Object ref = revision_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The iteration of the package build from the above version.
+     * 
+ * + * string revision = 3; + * @param value The revision to set. + * @return This builder for chaining. + */ + public Builder setRevision( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + revision_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The iteration of the package build from the above version.
+     * 
+ * + * string revision = 3; + * @return This builder for chaining. + */ + public Builder clearRevision() { + revision_ = getDefaultInstance().getRevision(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The iteration of the package build from the above version.
+     * 
+ * + * string revision = 3; + * @param value The bytes for revision to set. + * @return This builder for chaining. + */ + public Builder setRevisionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + revision_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean inclusive_ ; + /** + *
+     * Whether this version is specifying part of an inclusive range. Grafeas
+     * does not have the capability to specify version ranges; instead we have
+     * fields that specify start version and end versions. At times this is
+     * insufficient - we also need to specify whether the version is included in
+     * the range or is excluded from the range. This boolean is expected to be set
+     * to true when the version is included in a range.
+     * 
+ * + * bool inclusive = 6; + * @return The inclusive. + */ + @java.lang.Override + public boolean getInclusive() { + return inclusive_; + } + /** + *
+     * Whether this version is specifying part of an inclusive range. Grafeas
+     * does not have the capability to specify version ranges; instead we have
+     * fields that specify start version and end versions. At times this is
+     * insufficient - we also need to specify whether the version is included in
+     * the range or is excluded from the range. This boolean is expected to be set
+     * to true when the version is included in a range.
+     * 
+ * + * bool inclusive = 6; + * @param value The inclusive to set. + * @return This builder for chaining. + */ + public Builder setInclusive(boolean value) { + + inclusive_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Whether this version is specifying part of an inclusive range. Grafeas
+     * does not have the capability to specify version ranges; instead we have
+     * fields that specify start version and end versions. At times this is
+     * insufficient - we also need to specify whether the version is included in
+     * the range or is excluded from the range. This boolean is expected to be set
+     * to true when the version is included in a range.
+     * 
+ * + * bool inclusive = 6; + * @return This builder for chaining. + */ + public Builder clearInclusive() { + bitField0_ = (bitField0_ & ~0x00000008); + inclusive_ = false; + onChanged(); + return this; + } + + private int kind_ = 0; + /** + *
+     * Required. Distinguishes between sentinel MIN/MAX versions and normal
+     * versions.
+     * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + *
+     * Required. Distinguishes between sentinel MIN/MAX versions and normal
+     * versions.
+     * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @param value The enum numeric value on the wire for kind to set. + * @return This builder for chaining. + */ + public Builder setKindValue(int value) { + kind_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Required. Distinguishes between sentinel MIN/MAX versions and normal
+     * versions.
+     * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @return The kind. + */ + @java.lang.Override + public io.grafeas.v1.Version.VersionKind getKind() { + io.grafeas.v1.Version.VersionKind result = io.grafeas.v1.Version.VersionKind.forNumber(kind_); + return result == null ? io.grafeas.v1.Version.VersionKind.UNRECOGNIZED : result; + } + /** + *
+     * Required. Distinguishes between sentinel MIN/MAX versions and normal
+     * versions.
+     * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(io.grafeas.v1.Version.VersionKind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Required. Distinguishes between sentinel MIN/MAX versions and normal
+     * versions.
+     * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @return This builder for chaining. + */ + public Builder clearKind() { + bitField0_ = (bitField0_ & ~0x00000010); + kind_ = 0; + onChanged(); + return this; + } + + private java.lang.Object fullName_ = ""; + /** + *
+     * Human readable version string. This string is of the form
+     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+     * 
+ * + * string full_name = 5; + * @return The fullName. + */ + public java.lang.String getFullName() { + java.lang.Object ref = fullName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Human readable version string. This string is of the form
+     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+     * 
+ * + * string full_name = 5; + * @return The bytes for fullName. + */ + public com.google.protobuf.ByteString + getFullNameBytes() { + java.lang.Object ref = fullName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Human readable version string. This string is of the form
+     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+     * 
+ * + * string full_name = 5; + * @param value The fullName to set. + * @return This builder for chaining. + */ + public Builder setFullName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fullName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Human readable version string. This string is of the form
+     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+     * 
+ * + * string full_name = 5; + * @return This builder for chaining. + */ + public Builder clearFullName() { + fullName_ = getDefaultInstance().getFullName(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Human readable version string. This string is of the form
+     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+     * 
+ * + * string full_name = 5; + * @param value The bytes for fullName to set. + * @return This builder for chaining. + */ + public Builder setFullNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fullName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.Version) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.Version) + private static final io.grafeas.v1.Version DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.Version(); + } + + public static io.grafeas.v1.Version getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Version parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.Version getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java new file mode 100644 index 000000000000..07895ef1f299 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/package.proto + +package io.grafeas.v1; + +public interface VersionOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.Version) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Used to correct mistakes in the version numbering scheme.
+   * 
+ * + * int32 epoch = 1; + * @return The epoch. + */ + int getEpoch(); + + /** + *
+   * Required only when version kind is NORMAL. The main part of the version
+   * name.
+   * 
+ * + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required only when version kind is NORMAL. The main part of the version
+   * name.
+   * 
+ * + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The iteration of the package build from the above version.
+   * 
+ * + * string revision = 3; + * @return The revision. + */ + java.lang.String getRevision(); + /** + *
+   * The iteration of the package build from the above version.
+   * 
+ * + * string revision = 3; + * @return The bytes for revision. + */ + com.google.protobuf.ByteString + getRevisionBytes(); + + /** + *
+   * Whether this version is specifying part of an inclusive range. Grafeas
+   * does not have the capability to specify version ranges; instead we have
+   * fields that specify start version and end versions. At times this is
+   * insufficient - we also need to specify whether the version is included in
+   * the range or is excluded from the range. This boolean is expected to be set
+   * to true when the version is included in a range.
+   * 
+ * + * bool inclusive = 6; + * @return The inclusive. + */ + boolean getInclusive(); + + /** + *
+   * Required. Distinguishes between sentinel MIN/MAX versions and normal
+   * versions.
+   * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @return The enum numeric value on the wire for kind. + */ + int getKindValue(); + /** + *
+   * Required. Distinguishes between sentinel MIN/MAX versions and normal
+   * versions.
+   * 
+ * + * .grafeas.v1.Version.VersionKind kind = 4; + * @return The kind. + */ + io.grafeas.v1.Version.VersionKind getKind(); + + /** + *
+   * Human readable version string. This string is of the form
+   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+   * 
+ * + * string full_name = 5; + * @return The fullName. + */ + java.lang.String getFullName(); + /** + *
+   * Human readable version string. This string is of the form
+   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
+   * 
+ * + * string full_name = 5; + * @return The bytes for fullName. + */ + com.google.protobuf.ByteString + getFullNameBytes(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vex.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vex.java new file mode 100644 index 000000000000..c6a1aab7670b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vex.java @@ -0,0 +1,149 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vex.proto + +package io.grafeas.v1; + +public final class Vex { + private Vex() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024grafeas/v1/vex.proto\022\ngrafeas.v1\032\027graf" + + "eas/v1/common.proto\"\252\r\n\033VulnerabilityAss" + + "essmentNote\022\r\n\005title\030\001 \001(\t\022\031\n\021short_desc" + + "ription\030\002 \001(\t\022\030\n\020long_description\030\003 \001(\t\022" + + "\025\n\rlanguage_code\030\004 \001(\t\022D\n\tpublisher\030\005 \001(" + + "\01321.grafeas.v1.VulnerabilityAssessmentNo" + + "te.Publisher\022@\n\007product\030\006 \001(\0132/.grafeas." + + "v1.VulnerabilityAssessmentNote.Product\022F" + + "\n\nassessment\030\007 \001(\01322.grafeas.v1.Vulnerab" + + "ilityAssessmentNote.Assessment\032Q\n\tPublis" + + "her\022\014\n\004name\030\001 \001(\t\022\031\n\021issuing_authority\030\002" + + " \001(\t\022\033\n\023publisher_namespace\030\003 \001(\t\032H\n\007Pro" + + "duct\022\014\n\004name\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\025\n\013generi" + + "c_uri\030\003 \001(\tH\000B\014\n\nidentifier\032\302\t\n\nAssessme" + + "nt\022\013\n\003cve\030\001 \001(\t\022\031\n\021short_description\030\002 \001" + + "(\t\022\030\n\020long_description\030\003 \001(\t\022,\n\014related_" + + "uris\030\004 \003(\0132\026.grafeas.v1.RelatedUrl\022G\n\005st" + + "ate\030\005 \001(\01628.grafeas.v1.VulnerabilityAsse" + + "ssmentNote.Assessment.State\022\017\n\007impacts\030\006" + + " \003(\t\022W\n\rjustification\030\007 \001(\0132@.grafeas.v1" + + ".VulnerabilityAssessmentNote.Assessment." + + "Justification\022T\n\014remediations\030\010 \003(\0132>.gr" + + "afeas.v1.VulnerabilityAssessmentNote.Ass" + + "essment.Remediation\032\214\003\n\rJustification\022n\n" + + "\022justification_type\030\001 \001(\0162R.grafeas.v1.V" + + "ulnerabilityAssessmentNote.Assessment.Ju" + + "stification.JustificationType\022\017\n\007details" + + "\030\002 \001(\t\"\371\001\n\021JustificationType\022\"\n\036JUSTIFIC" + + "ATION_TYPE_UNSPECIFIED\020\000\022\031\n\025COMPONENT_NO" + + "T_PRESENT\020\001\022\037\n\033VULNERABLE_CODE_NOT_PRESE" + + "NT\020\002\022\'\n#VULNERABLE_CODE_NOT_IN_EXECUTE_P" + + "ATH\020\003\0225\n1VULNERABLE_CODE_CANNOT_BE_CONTR" + + "OLLED_BY_ADVERSARY\020\004\022$\n INLINE_MITIGATIO" + + "NS_ALREADY_EXIST\020\005\032\307\002\n\013Remediation\022h\n\020re" + + "mediation_type\030\001 \001(\0162N.grafeas.v1.Vulner" + + "abilityAssessmentNote.Assessment.Remedia" + + "tion.RemediationType\022\017\n\007details\030\002 \001(\t\022/\n" + + "\017remediation_uri\030\003 \001(\0132\026.grafeas.v1.Rela" + + "tedUrl\"\213\001\n\017RemediationType\022 \n\034REMEDIATIO" + + "N_TYPE_UNSPECIFIED\020\000\022\016\n\nMITIGATION\020\001\022\022\n\016" + + "NO_FIX_PLANNED\020\002\022\022\n\016NONE_AVAILABLE\020\003\022\016\n\n" + + "VENDOR_FIX\020\004\022\016\n\nWORKAROUND\020\005\"b\n\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n\010AFFECTED\020\001\022\020\n\014NO" + + "T_AFFECTED\020\002\022\t\n\005FIXED\020\003\022\027\n\023UNDER_INVESTI" + + "GATION\020\004BQ\n\rio.grafeas.v1P\001Z8google.gola" + + "ng.org/genproto/googleapis/grafeas/v1;gr" + + "afeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grafeas.v1.Common.getDescriptor(), + }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor, + new java.lang.String[] { "Title", "ShortDescription", "LongDescription", "LanguageCode", "Publisher", "Product", "Assessment", }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor = + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor, + new java.lang.String[] { "Name", "IssuingAuthority", "PublisherNamespace", }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor = + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor, + new java.lang.String[] { "Name", "Id", "GenericUri", "Identifier", }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor = + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor.getNestedTypes().get(2); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor, + new java.lang.String[] { "Cve", "ShortDescription", "LongDescription", "RelatedUris", "State", "Impacts", "Justification", "Remediations", }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor = + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor, + new java.lang.String[] { "JustificationType", "Details", }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor = + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor, + new java.lang.String[] { "RemediationType", "Details", "RemediationUri", }); + io.grafeas.v1.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java new file mode 100644 index 000000000000..8ed5bc66fe1b --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java @@ -0,0 +1,195 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vulnerability.proto + +package io.grafeas.v1; + +public final class Vulnerability { + private Vulnerability() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityNote_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\036grafeas/v1/vulnerability.proto\022\ngrafea" + + "s.v1\032\037google/api/field_behavior.proto\032\037g" + + "oogle/protobuf/timestamp.proto\032\027grafeas/" + + "v1/common.proto\032\025grafeas/v1/cvss.proto\032\030" + + "grafeas/v1/package.proto\032\031grafeas/v1/sev" + + "erity.proto\032\024grafeas/v1/vex.proto\"\354\007\n\021Vu" + + "lnerabilityNote\022\022\n\ncvss_score\030\001 \001(\002\022&\n\010s" + + "everity\030\002 \001(\0162\024.grafeas.v1.Severity\0225\n\007d" + + "etails\030\003 \003(\0132$.grafeas.v1.VulnerabilityN" + + "ote.Detail\022#\n\007cvss_v3\030\004 \001(\0132\022.grafeas.v1" + + ".CVSSv3\022D\n\017windows_details\030\005 \003(\0132+.grafe" + + "as.v1.VulnerabilityNote.WindowsDetail\0226\n" + + "\022source_update_time\030\006 \001(\0132\032.google.proto" + + "buf.Timestamp\022-\n\014cvss_version\030\007 \001(\0162\027.gr" + + "afeas.v1.CVSSVersion\022!\n\007cvss_v2\030\010 \001(\0132\020." + + "grafeas.v1.CVSS\032\255\003\n\006Detail\022\025\n\rseverity_n" + + "ame\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\024\n\014packag" + + "e_type\030\003 \001(\t\022\030\n\020affected_cpe_uri\030\004 \001(\t\022\030" + + "\n\020affected_package\030\005 \001(\t\0223\n\026affected_ver" + + "sion_start\030\006 \001(\0132\023.grafeas.v1.Version\0221\n" + + "\024affected_version_end\030\007 \001(\0132\023.grafeas.v1" + + ".Version\022\025\n\rfixed_cpe_uri\030\010 \001(\t\022\025\n\rfixed" + + "_package\030\t \001(\t\022*\n\rfixed_version\030\n \001(\0132\023." + + "grafeas.v1.Version\022\023\n\013is_obsolete\030\013 \001(\010\022" + + "6\n\022source_update_time\030\014 \001(\0132\032.google.pro" + + "tobuf.Timestamp\022\016\n\006source\030\r \001(\t\022\016\n\006vendo" + + "r\030\016 \001(\t\032\276\001\n\rWindowsDetail\022\017\n\007cpe_uri\030\001 \001" + + "(\t\022\014\n\004name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022M\n" + + "\nfixing_kbs\030\004 \003(\01329.grafeas.v1.Vulnerabi" + + "lityNote.WindowsDetail.KnowledgeBase\032*\n\r" + + "KnowledgeBase\022\014\n\004name\030\001 \001(\t\022\013\n\003url\030\002 \001(\t" + + "\"\343\t\n\027VulnerabilityOccurrence\022\014\n\004type\030\001 \001" + + "(\t\022&\n\010severity\030\002 \001(\0162\024.grafeas.v1.Severi" + + "ty\022\022\n\ncvss_score\030\003 \001(\002\022 \n\006cvssv3\030\n \001(\0132\020" + + ".grafeas.v1.CVSS\022G\n\rpackage_issue\030\004 \003(\0132" + + "0.grafeas.v1.VulnerabilityOccurrence.Pac" + + "kageIssue\022\031\n\021short_description\030\005 \001(\t\022\030\n\020" + + "long_description\030\006 \001(\t\022,\n\014related_urls\030\007" + + " \003(\0132\026.grafeas.v1.RelatedUrl\0220\n\022effectiv" + + "e_severity\030\010 \001(\0162\024.grafeas.v1.Severity\022\025" + + "\n\rfix_available\030\t \001(\010\022-\n\014cvss_version\030\013 " + + "\001(\0162\027.grafeas.v1.CVSSVersion\022!\n\007cvss_v2\030" + + "\014 \001(\0132\020.grafeas.v1.CVSS\022I\n\016vex_assessmen" + + "t\030\r \001(\01321.grafeas.v1.VulnerabilityOccurr" + + "ence.VexAssessment\032\340\002\n\014PackageIssue\022\030\n\020a" + + "ffected_cpe_uri\030\001 \001(\t\022\030\n\020affected_packag" + + "e\030\002 \001(\t\022-\n\020affected_version\030\003 \001(\0132\023.graf" + + "eas.v1.Version\022\025\n\rfixed_cpe_uri\030\004 \001(\t\022\025\n" + + "\rfixed_package\030\005 \001(\t\022*\n\rfixed_version\030\006 " + + "\001(\0132\023.grafeas.v1.Version\022\025\n\rfix_availabl" + + "e\030\007 \001(\010\022\024\n\014package_type\030\010 \001(\t\0225\n\022effecti" + + "ve_severity\030\t \001(\0162\024.grafeas.v1.SeverityB" + + "\003\340A\003\022/\n\rfile_location\030\n \003(\0132\030.grafeas.v1" + + ".FileLocation\032\346\002\n\rVexAssessment\022\013\n\003cve\030\001" + + " \001(\t\022,\n\014related_uris\030\002 \003(\0132\026.grafeas.v1." + + "RelatedUrl\022\021\n\tnote_name\030\003 \001(\t\022G\n\005state\030\004" + + " \001(\01628.grafeas.v1.VulnerabilityAssessmen" + + "tNote.Assessment.State\022\017\n\007impacts\030\005 \003(\t\022" + + "T\n\014remediations\030\006 \003(\0132>.grafeas.v1.Vulne" + + "rabilityAssessmentNote.Assessment.Remedi" + + "ation\022W\n\rjustification\030\007 \001(\0132@.grafeas.v" + + "1.VulnerabilityAssessmentNote.Assessment" + + ".JustificationBQ\n\rio.grafeas.v1P\001Z8googl" + + "e.golang.org/genproto/googleapis/grafeas" + + "/v1;grafeas\242\002\003GRAb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + io.grafeas.v1.Common.getDescriptor(), + io.grafeas.v1.CVSSProto.getDescriptor(), + io.grafeas.v1.Package.getDescriptor(), + io.grafeas.v1.SeverityOuterClass.getDescriptor(), + io.grafeas.v1.Vex.getDescriptor(), + }); + internal_static_grafeas_v1_VulnerabilityNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityNote_descriptor, + new java.lang.String[] { "CvssScore", "Severity", "Details", "CvssV3", "WindowsDetails", "SourceUpdateTime", "CvssVersion", "CvssV2", }); + internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor = + internal_static_grafeas_v1_VulnerabilityNote_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor, + new java.lang.String[] { "SeverityName", "Description", "PackageType", "AffectedCpeUri", "AffectedPackage", "AffectedVersionStart", "AffectedVersionEnd", "FixedCpeUri", "FixedPackage", "FixedVersion", "IsObsolete", "SourceUpdateTime", "Source", "Vendor", }); + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor = + internal_static_grafeas_v1_VulnerabilityNote_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor, + new java.lang.String[] { "CpeUri", "Name", "Description", "FixingKbs", }); + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor = + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor, + new java.lang.String[] { "Name", "Url", }); + internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor, + new java.lang.String[] { "Type", "Severity", "CvssScore", "Cvssv3", "PackageIssue", "ShortDescription", "LongDescription", "RelatedUrls", "EffectiveSeverity", "FixAvailable", "CvssVersion", "CvssV2", "VexAssessment", }); + internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor = + internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor, + new java.lang.String[] { "AffectedCpeUri", "AffectedPackage", "AffectedVersion", "FixedCpeUri", "FixedPackage", "FixedVersion", "FixAvailable", "PackageType", "EffectiveSeverity", "FileLocation", }); + internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor = + internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor, + new java.lang.String[] { "Cve", "RelatedUris", "NoteName", "State", "Impacts", "Remediations", "Justification", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + io.grafeas.v1.Common.getDescriptor(); + io.grafeas.v1.CVSSProto.getDescriptor(); + io.grafeas.v1.Package.getDescriptor(); + io.grafeas.v1.SeverityOuterClass.getDescriptor(); + io.grafeas.v1.Vex.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNote.java new file mode 100644 index 000000000000..6c16dc7ffc43 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNote.java @@ -0,0 +1,8998 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vex.proto + +package io.grafeas.v1; + +/** + *
+ * A single VulnerabilityAssessmentNote represents
+ * one particular product's vulnerability assessment for one CVE.
+ * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote} + */ +public final class VulnerabilityAssessmentNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote) + VulnerabilityAssessmentNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use VulnerabilityAssessmentNote.newBuilder() to construct. + private VulnerabilityAssessmentNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VulnerabilityAssessmentNote() { + title_ = ""; + shortDescription_ = ""; + longDescription_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VulnerabilityAssessmentNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.class, io.grafeas.v1.VulnerabilityAssessmentNote.Builder.class); + } + + public interface PublisherOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Publisher) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Name of the publisher.
+     * Examples: 'Google', 'Google Cloud Platform'.
+     * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Name of the publisher.
+     * Examples: 'Google', 'Google Cloud Platform'.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Provides information about the authority of the issuing party to
+     * release the document, in particular, the party's constituency and
+     * responsibilities or other obligations.
+     * 
+ * + * string issuing_authority = 2; + * @return The issuingAuthority. + */ + java.lang.String getIssuingAuthority(); + /** + *
+     * Provides information about the authority of the issuing party to
+     * release the document, in particular, the party's constituency and
+     * responsibilities or other obligations.
+     * 
+ * + * string issuing_authority = 2; + * @return The bytes for issuingAuthority. + */ + com.google.protobuf.ByteString + getIssuingAuthorityBytes(); + + /** + *
+     * The context or namespace.
+     * Contains a URL which is under control of the issuing party and can
+     * be used as a globally unique identifier for that issuing party.
+     * Example: https://csaf.io
+     * 
+ * + * string publisher_namespace = 3; + * @return The publisherNamespace. + */ + java.lang.String getPublisherNamespace(); + /** + *
+     * The context or namespace.
+     * Contains a URL which is under control of the issuing party and can
+     * be used as a globally unique identifier for that issuing party.
+     * Example: https://csaf.io
+     * 
+ * + * string publisher_namespace = 3; + * @return The bytes for publisherNamespace. + */ + com.google.protobuf.ByteString + getPublisherNamespaceBytes(); + } + /** + *
+   * Publisher contains information about the publisher of
+   * this Note.
+   * (-- api-linter: core::0123::resource-annotation=disabled
+   *     aip.dev/not-precedent: Publisher is not a separate resource. --)
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Publisher} + */ + public static final class Publisher extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Publisher) + PublisherOrBuilder { + private static final long serialVersionUID = 0L; + // Use Publisher.newBuilder() to construct. + private Publisher(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Publisher() { + name_ = ""; + issuingAuthority_ = ""; + publisherNamespace_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Publisher(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.class, io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+     * Name of the publisher.
+     * Examples: 'Google', 'Google Cloud Platform'.
+     * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+     * Name of the publisher.
+     * Examples: 'Google', 'Google Cloud Platform'.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ISSUING_AUTHORITY_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object issuingAuthority_ = ""; + /** + *
+     * Provides information about the authority of the issuing party to
+     * release the document, in particular, the party's constituency and
+     * responsibilities or other obligations.
+     * 
+ * + * string issuing_authority = 2; + * @return The issuingAuthority. + */ + @java.lang.Override + public java.lang.String getIssuingAuthority() { + java.lang.Object ref = issuingAuthority_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + issuingAuthority_ = s; + return s; + } + } + /** + *
+     * Provides information about the authority of the issuing party to
+     * release the document, in particular, the party's constituency and
+     * responsibilities or other obligations.
+     * 
+ * + * string issuing_authority = 2; + * @return The bytes for issuingAuthority. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIssuingAuthorityBytes() { + java.lang.Object ref = issuingAuthority_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + issuingAuthority_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLISHER_NAMESPACE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object publisherNamespace_ = ""; + /** + *
+     * The context or namespace.
+     * Contains a URL which is under control of the issuing party and can
+     * be used as a globally unique identifier for that issuing party.
+     * Example: https://csaf.io
+     * 
+ * + * string publisher_namespace = 3; + * @return The publisherNamespace. + */ + @java.lang.Override + public java.lang.String getPublisherNamespace() { + java.lang.Object ref = publisherNamespace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publisherNamespace_ = s; + return s; + } + } + /** + *
+     * The context or namespace.
+     * Contains a URL which is under control of the issuing party and can
+     * be used as a globally unique identifier for that issuing party.
+     * Example: https://csaf.io
+     * 
+ * + * string publisher_namespace = 3; + * @return The bytes for publisherNamespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPublisherNamespaceBytes() { + java.lang.Object ref = publisherNamespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publisherNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(issuingAuthority_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, issuingAuthority_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publisherNamespace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, publisherNamespace_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(issuingAuthority_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, issuingAuthority_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publisherNamespace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, publisherNamespace_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Publisher)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher other = (io.grafeas.v1.VulnerabilityAssessmentNote.Publisher) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getIssuingAuthority() + .equals(other.getIssuingAuthority())) return false; + if (!getPublisherNamespace() + .equals(other.getPublisherNamespace())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ISSUING_AUTHORITY_FIELD_NUMBER; + hash = (53 * hash) + getIssuingAuthority().hashCode(); + hash = (37 * hash) + PUBLISHER_NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getPublisherNamespace().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Publisher contains information about the publisher of
+     * this Note.
+     * (-- api-linter: core::0123::resource-annotation=disabled
+     *     aip.dev/not-precedent: Publisher is not a separate resource. --)
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Publisher} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote.Publisher) + io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.class, io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + issuingAuthority_ = ""; + publisherNamespace_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher build() { + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher buildPartial() { + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher result = new io.grafeas.v1.VulnerabilityAssessmentNote.Publisher(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.issuingAuthority_ = issuingAuthority_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.publisherNamespace_ = publisherNamespace_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Publisher) { + return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Publisher)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher other) { + if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getIssuingAuthority().isEmpty()) { + issuingAuthority_ = other.issuingAuthority_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPublisherNamespace().isEmpty()) { + publisherNamespace_ = other.publisherNamespace_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + issuingAuthority_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + publisherNamespace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+       * Name of the publisher.
+       * Examples: 'Google', 'Google Cloud Platform'.
+       * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Name of the publisher.
+       * Examples: 'Google', 'Google Cloud Platform'.
+       * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Name of the publisher.
+       * Examples: 'Google', 'Google Cloud Platform'.
+       * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Name of the publisher.
+       * Examples: 'Google', 'Google Cloud Platform'.
+       * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Name of the publisher.
+       * Examples: 'Google', 'Google Cloud Platform'.
+       * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object issuingAuthority_ = ""; + /** + *
+       * Provides information about the authority of the issuing party to
+       * release the document, in particular, the party's constituency and
+       * responsibilities or other obligations.
+       * 
+ * + * string issuing_authority = 2; + * @return The issuingAuthority. + */ + public java.lang.String getIssuingAuthority() { + java.lang.Object ref = issuingAuthority_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + issuingAuthority_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Provides information about the authority of the issuing party to
+       * release the document, in particular, the party's constituency and
+       * responsibilities or other obligations.
+       * 
+ * + * string issuing_authority = 2; + * @return The bytes for issuingAuthority. + */ + public com.google.protobuf.ByteString + getIssuingAuthorityBytes() { + java.lang.Object ref = issuingAuthority_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + issuingAuthority_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Provides information about the authority of the issuing party to
+       * release the document, in particular, the party's constituency and
+       * responsibilities or other obligations.
+       * 
+ * + * string issuing_authority = 2; + * @param value The issuingAuthority to set. + * @return This builder for chaining. + */ + public Builder setIssuingAuthority( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + issuingAuthority_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Provides information about the authority of the issuing party to
+       * release the document, in particular, the party's constituency and
+       * responsibilities or other obligations.
+       * 
+ * + * string issuing_authority = 2; + * @return This builder for chaining. + */ + public Builder clearIssuingAuthority() { + issuingAuthority_ = getDefaultInstance().getIssuingAuthority(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * Provides information about the authority of the issuing party to
+       * release the document, in particular, the party's constituency and
+       * responsibilities or other obligations.
+       * 
+ * + * string issuing_authority = 2; + * @param value The bytes for issuingAuthority to set. + * @return This builder for chaining. + */ + public Builder setIssuingAuthorityBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + issuingAuthority_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object publisherNamespace_ = ""; + /** + *
+       * The context or namespace.
+       * Contains a URL which is under control of the issuing party and can
+       * be used as a globally unique identifier for that issuing party.
+       * Example: https://csaf.io
+       * 
+ * + * string publisher_namespace = 3; + * @return The publisherNamespace. + */ + public java.lang.String getPublisherNamespace() { + java.lang.Object ref = publisherNamespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publisherNamespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The context or namespace.
+       * Contains a URL which is under control of the issuing party and can
+       * be used as a globally unique identifier for that issuing party.
+       * Example: https://csaf.io
+       * 
+ * + * string publisher_namespace = 3; + * @return The bytes for publisherNamespace. + */ + public com.google.protobuf.ByteString + getPublisherNamespaceBytes() { + java.lang.Object ref = publisherNamespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publisherNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The context or namespace.
+       * Contains a URL which is under control of the issuing party and can
+       * be used as a globally unique identifier for that issuing party.
+       * Example: https://csaf.io
+       * 
+ * + * string publisher_namespace = 3; + * @param value The publisherNamespace to set. + * @return This builder for chaining. + */ + public Builder setPublisherNamespace( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + publisherNamespace_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The context or namespace.
+       * Contains a URL which is under control of the issuing party and can
+       * be used as a globally unique identifier for that issuing party.
+       * Example: https://csaf.io
+       * 
+ * + * string publisher_namespace = 3; + * @return This builder for chaining. + */ + public Builder clearPublisherNamespace() { + publisherNamespace_ = getDefaultInstance().getPublisherNamespace(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * The context or namespace.
+       * Contains a URL which is under control of the issuing party and can
+       * be used as a globally unique identifier for that issuing party.
+       * Example: https://csaf.io
+       * 
+ * + * string publisher_namespace = 3; + * @param value The bytes for publisherNamespace to set. + * @return This builder for chaining. + */ + public Builder setPublisherNamespaceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + publisherNamespace_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Publisher) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Publisher) + private static final io.grafeas.v1.VulnerabilityAssessmentNote.Publisher DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Publisher(); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Publisher parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ProductOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Product) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Name of the product.
+     * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Name of the product.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Token that identifies a product so that it can be referred to from other
+     * parts in the document. There is no predefined format as long as it
+     * uniquely identifies a group in the context of the current document.
+     * 
+ * + * string id = 2; + * @return The id. + */ + java.lang.String getId(); + /** + *
+     * Token that identifies a product so that it can be referred to from other
+     * parts in the document. There is no predefined format as long as it
+     * uniquely identifies a group in the context of the current document.
+     * 
+ * + * string id = 2; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+     * Contains a URI which is vendor-specific.
+     * Example: The artifact repository URL of an image.
+     * 
+ * + * string generic_uri = 3; + * @return Whether the genericUri field is set. + */ + boolean hasGenericUri(); + /** + *
+     * Contains a URI which is vendor-specific.
+     * Example: The artifact repository URL of an image.
+     * 
+ * + * string generic_uri = 3; + * @return The genericUri. + */ + java.lang.String getGenericUri(); + /** + *
+     * Contains a URI which is vendor-specific.
+     * Example: The artifact repository URL of an image.
+     * 
+ * + * string generic_uri = 3; + * @return The bytes for genericUri. + */ + com.google.protobuf.ByteString + getGenericUriBytes(); + + public io.grafeas.v1.VulnerabilityAssessmentNote.Product.IdentifierCase getIdentifierCase(); + } + /** + *
+   * Product contains information about a product and how to uniquely identify
+   * it.
+   * (-- api-linter: core::0123::resource-annotation=disabled
+   *     aip.dev/not-precedent: Product is not a separate resource. --)
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Product} + */ + public static final class Product extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Product) + ProductOrBuilder { + private static final long serialVersionUID = 0L; + // Use Product.newBuilder() to construct. + private Product(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Product() { + name_ = ""; + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Product(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Product.class, io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder.class); + } + + private int identifierCase_ = 0; + private java.lang.Object identifier_; + public enum IdentifierCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GENERIC_URI(3), + IDENTIFIER_NOT_SET(0); + private final int value; + private IdentifierCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IdentifierCase valueOf(int value) { + return forNumber(value); + } + + public static IdentifierCase forNumber(int value) { + switch (value) { + case 3: return GENERIC_URI; + case 0: return IDENTIFIER_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public IdentifierCase + getIdentifierCase() { + return IdentifierCase.forNumber( + identifierCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+     * Name of the product.
+     * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+     * Name of the product.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+     * Token that identifies a product so that it can be referred to from other
+     * parts in the document. There is no predefined format as long as it
+     * uniquely identifies a group in the context of the current document.
+     * 
+ * + * string id = 2; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+     * Token that identifies a product so that it can be referred to from other
+     * parts in the document. There is no predefined format as long as it
+     * uniquely identifies a group in the context of the current document.
+     * 
+ * + * string id = 2; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GENERIC_URI_FIELD_NUMBER = 3; + /** + *
+     * Contains a URI which is vendor-specific.
+     * Example: The artifact repository URL of an image.
+     * 
+ * + * string generic_uri = 3; + * @return Whether the genericUri field is set. + */ + public boolean hasGenericUri() { + return identifierCase_ == 3; + } + /** + *
+     * Contains a URI which is vendor-specific.
+     * Example: The artifact repository URL of an image.
+     * 
+ * + * string generic_uri = 3; + * @return The genericUri. + */ + public java.lang.String getGenericUri() { + java.lang.Object ref = ""; + if (identifierCase_ == 3) { + ref = identifier_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (identifierCase_ == 3) { + identifier_ = s; + } + return s; + } + } + /** + *
+     * Contains a URI which is vendor-specific.
+     * Example: The artifact repository URL of an image.
+     * 
+ * + * string generic_uri = 3; + * @return The bytes for genericUri. + */ + public com.google.protobuf.ByteString + getGenericUriBytes() { + java.lang.Object ref = ""; + if (identifierCase_ == 3) { + ref = identifier_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (identifierCase_ == 3) { + identifier_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + if (identifierCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, identifier_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + if (identifierCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, identifier_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Product)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityAssessmentNote.Product other = (io.grafeas.v1.VulnerabilityAssessmentNote.Product) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getId() + .equals(other.getId())) return false; + if (!getIdentifierCase().equals(other.getIdentifierCase())) return false; + switch (identifierCase_) { + case 3: + if (!getGenericUri() + .equals(other.getGenericUri())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + switch (identifierCase_) { + case 3: + hash = (37 * hash) + GENERIC_URI_FIELD_NUMBER; + hash = (53 * hash) + getGenericUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote.Product prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Product contains information about a product and how to uniquely identify
+     * it.
+     * (-- api-linter: core::0123::resource-annotation=disabled
+     *     aip.dev/not-precedent: Product is not a separate resource. --)
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Product} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote.Product) + io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Product.class, io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.Product.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + id_ = ""; + identifierCase_ = 0; + identifier_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Product getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Product build() { + io.grafeas.v1.VulnerabilityAssessmentNote.Product result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Product buildPartial() { + io.grafeas.v1.VulnerabilityAssessmentNote.Product result = new io.grafeas.v1.VulnerabilityAssessmentNote.Product(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Product result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.id_ = id_; + } + } + + private void buildPartialOneofs(io.grafeas.v1.VulnerabilityAssessmentNote.Product result) { + result.identifierCase_ = identifierCase_; + result.identifier_ = this.identifier_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Product) { + return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Product)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Product other) { + if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getIdentifierCase()) { + case GENERIC_URI: { + identifierCase_ = 3; + identifier_ = other.identifier_; + onChanged(); + break; + } + case IDENTIFIER_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + identifierCase_ = 3; + identifier_ = s; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int identifierCase_ = 0; + private java.lang.Object identifier_; + public IdentifierCase + getIdentifierCase() { + return IdentifierCase.forNumber( + identifierCase_); + } + + public Builder clearIdentifier() { + identifierCase_ = 0; + identifier_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+       * Name of the product.
+       * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Name of the product.
+       * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Name of the product.
+       * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Name of the product.
+       * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Name of the product.
+       * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + *
+       * Token that identifies a product so that it can be referred to from other
+       * parts in the document. There is no predefined format as long as it
+       * uniquely identifies a group in the context of the current document.
+       * 
+ * + * string id = 2; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Token that identifies a product so that it can be referred to from other
+       * parts in the document. There is no predefined format as long as it
+       * uniquely identifies a group in the context of the current document.
+       * 
+ * + * string id = 2; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Token that identifies a product so that it can be referred to from other
+       * parts in the document. There is no predefined format as long as it
+       * uniquely identifies a group in the context of the current document.
+       * 
+ * + * string id = 2; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Token that identifies a product so that it can be referred to from other
+       * parts in the document. There is no predefined format as long as it
+       * uniquely identifies a group in the context of the current document.
+       * 
+ * + * string id = 2; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * Token that identifies a product so that it can be referred to from other
+       * parts in the document. There is no predefined format as long as it
+       * uniquely identifies a group in the context of the current document.
+       * 
+ * + * string id = 2; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + *
+       * Contains a URI which is vendor-specific.
+       * Example: The artifact repository URL of an image.
+       * 
+ * + * string generic_uri = 3; + * @return Whether the genericUri field is set. + */ + @java.lang.Override + public boolean hasGenericUri() { + return identifierCase_ == 3; + } + /** + *
+       * Contains a URI which is vendor-specific.
+       * Example: The artifact repository URL of an image.
+       * 
+ * + * string generic_uri = 3; + * @return The genericUri. + */ + @java.lang.Override + public java.lang.String getGenericUri() { + java.lang.Object ref = ""; + if (identifierCase_ == 3) { + ref = identifier_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (identifierCase_ == 3) { + identifier_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Contains a URI which is vendor-specific.
+       * Example: The artifact repository URL of an image.
+       * 
+ * + * string generic_uri = 3; + * @return The bytes for genericUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGenericUriBytes() { + java.lang.Object ref = ""; + if (identifierCase_ == 3) { + ref = identifier_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (identifierCase_ == 3) { + identifier_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Contains a URI which is vendor-specific.
+       * Example: The artifact repository URL of an image.
+       * 
+ * + * string generic_uri = 3; + * @param value The genericUri to set. + * @return This builder for chaining. + */ + public Builder setGenericUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + identifierCase_ = 3; + identifier_ = value; + onChanged(); + return this; + } + /** + *
+       * Contains a URI which is vendor-specific.
+       * Example: The artifact repository URL of an image.
+       * 
+ * + * string generic_uri = 3; + * @return This builder for chaining. + */ + public Builder clearGenericUri() { + if (identifierCase_ == 3) { + identifierCase_ = 0; + identifier_ = null; + onChanged(); + } + return this; + } + /** + *
+       * Contains a URI which is vendor-specific.
+       * Example: The artifact repository URL of an image.
+       * 
+ * + * string generic_uri = 3; + * @param value The bytes for genericUri to set. + * @return This builder for chaining. + */ + public Builder setGenericUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + identifierCase_ = 3; + identifier_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Product) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Product) + private static final io.grafeas.v1.VulnerabilityAssessmentNote.Product DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Product(); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Product parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Product getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AssessmentOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Assessment) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * @return The cve. + */ + java.lang.String getCve(); + /** + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * @return The bytes for cve. + */ + com.google.protobuf.ByteString + getCveBytes(); + + /** + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * @return The shortDescription. + */ + java.lang.String getShortDescription(); + /** + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * @return The bytes for shortDescription. + */ + com.google.protobuf.ByteString + getShortDescriptionBytes(); + + /** + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * @return The longDescription. + */ + java.lang.String getLongDescription(); + /** + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * @return The bytes for longDescription. + */ + com.google.protobuf.ByteString + getLongDescriptionBytes(); + + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + java.util.List + getRelatedUrisList(); + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + io.grafeas.v1.RelatedUrl getRelatedUris(int index); + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + int getRelatedUrisCount(); + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + java.util.List + getRelatedUrisOrBuilderList(); + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder( + int index); + + /** + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * @return The state. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState(); + + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * @return A list containing the impacts. + */ + java.util.List + getImpactsList(); + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * @return The count of impacts. + */ + int getImpactsCount(); + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * @param index The index of the element to return. + * @return The impacts at the given index. + */ + java.lang.String getImpacts(int index); + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * @param index The index of the value to return. + * @return The bytes of the impacts at the given index. + */ + com.google.protobuf.ByteString + getImpactsBytes(int index); + + /** + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * @return Whether the justification field is set. + */ + boolean hasJustification(); + /** + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * @return The justification. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification(); + /** + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder getJustificationOrBuilder(); + + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + java.util.List + getRemediationsList(); + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index); + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + int getRemediationsCount(); + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + java.util.List + getRemediationsOrBuilderList(); + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder getRemediationsOrBuilder( + int index); + } + /** + *
+   * Assessment provides all information that is related to a single
+   * vulnerability for this product.
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment} + */ + public static final class Assessment extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment) + AssessmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Assessment.newBuilder() to construct. + private Assessment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Assessment() { + cve_ = ""; + shortDescription_ = ""; + longDescription_ = ""; + relatedUris_ = java.util.Collections.emptyList(); + state_ = 0; + impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + remediations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Assessment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.class, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder.class); + } + + /** + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * Protobuf enum {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * No state is specified.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+       * This product is known to be affected by this vulnerability.
+       * 
+ * + * AFFECTED = 1; + */ + AFFECTED(1), + /** + *
+       * This product is known to be not affected by this vulnerability.
+       * 
+ * + * NOT_AFFECTED = 2; + */ + NOT_AFFECTED(2), + /** + *
+       * This product contains a fix for this vulnerability.
+       * 
+ * + * FIXED = 3; + */ + FIXED(3), + /** + *
+       * It is not known yet whether these versions are or are not affected
+       * by the vulnerability. However, it is still under investigation.
+       * 
+ * + * UNDER_INVESTIGATION = 4; + */ + UNDER_INVESTIGATION(4), + UNRECOGNIZED(-1), + ; + + /** + *
+       * No state is specified.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+       * This product is known to be affected by this vulnerability.
+       * 
+ * + * AFFECTED = 1; + */ + public static final int AFFECTED_VALUE = 1; + /** + *
+       * This product is known to be not affected by this vulnerability.
+       * 
+ * + * NOT_AFFECTED = 2; + */ + public static final int NOT_AFFECTED_VALUE = 2; + /** + *
+       * This product contains a fix for this vulnerability.
+       * 
+ * + * FIXED = 3; + */ + public static final int FIXED_VALUE = 3; + /** + *
+       * It is not known yet whether these versions are or are not affected
+       * by the vulnerability. However, it is still under investigation.
+       * 
+ * + * UNDER_INVESTIGATION = 4; + */ + public static final int UNDER_INVESTIGATION_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return AFFECTED; + case 2: return NOT_AFFECTED; + case 3: return FIXED; + case 4: return UNDER_INVESTIGATION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.State) + } + + public interface JustificationOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * The justification type for this vulnerability.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * @return The enum numeric value on the wire for justificationType. + */ + int getJustificationTypeValue(); + /** + *
+       * The justification type for this vulnerability.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * @return The justificationType. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType getJustificationType(); + + /** + *
+       * Additional details on why this justification was chosen.
+       * 
+ * + * string details = 2; + * @return The details. + */ + java.lang.String getDetails(); + /** + *
+       * Additional details on why this justification was chosen.
+       * 
+ * + * string details = 2; + * @return The bytes for details. + */ + com.google.protobuf.ByteString + getDetailsBytes(); + } + /** + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification} + */ + public static final class Justification extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) + JustificationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Justification.newBuilder() to construct. + private Justification(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Justification() { + justificationType_ = 0; + details_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Justification(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.class, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder.class); + } + + /** + *
+       * Provides the type of justification.
+       * 
+ * + * Protobuf enum {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType} + */ + public enum JustificationType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+         * JUSTIFICATION_TYPE_UNSPECIFIED.
+         * 
+ * + * JUSTIFICATION_TYPE_UNSPECIFIED = 0; + */ + JUSTIFICATION_TYPE_UNSPECIFIED(0), + /** + *
+         * The vulnerable component is not present in the product.
+         * 
+ * + * COMPONENT_NOT_PRESENT = 1; + */ + COMPONENT_NOT_PRESENT(1), + /** + *
+         * The vulnerable code is not present. Typically this case
+         * occurs when source code is configured or built in a way that excludes
+         * the vulnerable code.
+         * 
+ * + * VULNERABLE_CODE_NOT_PRESENT = 2; + */ + VULNERABLE_CODE_NOT_PRESENT(2), + /** + *
+         * The vulnerable code can not be executed.
+         * Typically this case occurs when the product includes the vulnerable
+         * code but does not call or use the vulnerable code.
+         * 
+ * + * VULNERABLE_CODE_NOT_IN_EXECUTE_PATH = 3; + */ + VULNERABLE_CODE_NOT_IN_EXECUTE_PATH(3), + /** + *
+         * The vulnerable code cannot be controlled by an attacker to exploit
+         * the vulnerability.
+         * 
+ * + * VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY = 4; + */ + VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY(4), + /** + *
+         * The product includes built-in protections or features that prevent
+         * exploitation of the vulnerability. These built-in protections cannot
+         * be subverted by the attacker and cannot be configured or disabled by
+         * the user. These mitigations completely prevent exploitation based on
+         * known attack vectors.
+         * 
+ * + * INLINE_MITIGATIONS_ALREADY_EXIST = 5; + */ + INLINE_MITIGATIONS_ALREADY_EXIST(5), + UNRECOGNIZED(-1), + ; + + /** + *
+         * JUSTIFICATION_TYPE_UNSPECIFIED.
+         * 
+ * + * JUSTIFICATION_TYPE_UNSPECIFIED = 0; + */ + public static final int JUSTIFICATION_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+         * The vulnerable component is not present in the product.
+         * 
+ * + * COMPONENT_NOT_PRESENT = 1; + */ + public static final int COMPONENT_NOT_PRESENT_VALUE = 1; + /** + *
+         * The vulnerable code is not present. Typically this case
+         * occurs when source code is configured or built in a way that excludes
+         * the vulnerable code.
+         * 
+ * + * VULNERABLE_CODE_NOT_PRESENT = 2; + */ + public static final int VULNERABLE_CODE_NOT_PRESENT_VALUE = 2; + /** + *
+         * The vulnerable code can not be executed.
+         * Typically this case occurs when the product includes the vulnerable
+         * code but does not call or use the vulnerable code.
+         * 
+ * + * VULNERABLE_CODE_NOT_IN_EXECUTE_PATH = 3; + */ + public static final int VULNERABLE_CODE_NOT_IN_EXECUTE_PATH_VALUE = 3; + /** + *
+         * The vulnerable code cannot be controlled by an attacker to exploit
+         * the vulnerability.
+         * 
+ * + * VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY = 4; + */ + public static final int VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY_VALUE = 4; + /** + *
+         * The product includes built-in protections or features that prevent
+         * exploitation of the vulnerability. These built-in protections cannot
+         * be subverted by the attacker and cannot be configured or disabled by
+         * the user. These mitigations completely prevent exploitation based on
+         * known attack vectors.
+         * 
+ * + * INLINE_MITIGATIONS_ALREADY_EXIST = 5; + */ + public static final int INLINE_MITIGATIONS_ALREADY_EXIST_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JustificationType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static JustificationType forNumber(int value) { + switch (value) { + case 0: return JUSTIFICATION_TYPE_UNSPECIFIED; + case 1: return COMPONENT_NOT_PRESENT; + case 2: return VULNERABLE_CODE_NOT_PRESENT; + case 3: return VULNERABLE_CODE_NOT_IN_EXECUTE_PATH; + case 4: return VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY; + case 5: return INLINE_MITIGATIONS_ALREADY_EXIST; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + JustificationType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public JustificationType findValueByNumber(int number) { + return JustificationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDescriptor().getEnumTypes().get(0); + } + + private static final JustificationType[] VALUES = values(); + + public static JustificationType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private JustificationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType) + } + + public static final int JUSTIFICATION_TYPE_FIELD_NUMBER = 1; + private int justificationType_ = 0; + /** + *
+       * The justification type for this vulnerability.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * @return The enum numeric value on the wire for justificationType. + */ + @java.lang.Override public int getJustificationTypeValue() { + return justificationType_; + } + /** + *
+       * The justification type for this vulnerability.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * @return The justificationType. + */ + @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType getJustificationType() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType.forNumber(justificationType_); + return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType.UNRECOGNIZED : result; + } + + public static final int DETAILS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object details_ = ""; + /** + *
+       * Additional details on why this justification was chosen.
+       * 
+ * + * string details = 2; + * @return The details. + */ + @java.lang.Override + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } + } + /** + *
+       * Additional details on why this justification was chosen.
+       * 
+ * + * string details = 2; + * @return The bytes for details. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (justificationType_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType.JUSTIFICATION_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, justificationType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, details_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (justificationType_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType.JUSTIFICATION_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, justificationType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, details_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification other = (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) obj; + + if (justificationType_ != other.justificationType_) return false; + if (!getDetails() + .equals(other.getDetails())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + JUSTIFICATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + justificationType_; + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.class, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + justificationType_ = 0; + details_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification build() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification buildPartial() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification result = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.justificationType_ = justificationType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.details_ = details_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) { + return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification other) { + if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance()) return this; + if (other.justificationType_ != 0) { + setJustificationTypeValue(other.getJustificationTypeValue()); + } + if (!other.getDetails().isEmpty()) { + details_ = other.details_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + justificationType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + details_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int justificationType_ = 0; + /** + *
+         * The justification type for this vulnerability.
+         * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * @return The enum numeric value on the wire for justificationType. + */ + @java.lang.Override public int getJustificationTypeValue() { + return justificationType_; + } + /** + *
+         * The justification type for this vulnerability.
+         * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * @param value The enum numeric value on the wire for justificationType to set. + * @return This builder for chaining. + */ + public Builder setJustificationTypeValue(int value) { + justificationType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+         * The justification type for this vulnerability.
+         * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * @return The justificationType. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType getJustificationType() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType.forNumber(justificationType_); + return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType.UNRECOGNIZED : result; + } + /** + *
+         * The justification type for this vulnerability.
+         * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * @param value The justificationType to set. + * @return This builder for chaining. + */ + public Builder setJustificationType(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + justificationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+         * The justification type for this vulnerability.
+         * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * @return This builder for chaining. + */ + public Builder clearJustificationType() { + bitField0_ = (bitField0_ & ~0x00000001); + justificationType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object details_ = ""; + /** + *
+         * Additional details on why this justification was chosen.
+         * 
+ * + * string details = 2; + * @return The details. + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+         * Additional details on why this justification was chosen.
+         * 
+ * + * string details = 2; + * @return The bytes for details. + */ + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+         * Additional details on why this justification was chosen.
+         * 
+ * + * string details = 2; + * @param value The details to set. + * @return This builder for chaining. + */ + public Builder setDetails( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + details_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+         * Additional details on why this justification was chosen.
+         * 
+ * + * string details = 2; + * @return This builder for chaining. + */ + public Builder clearDetails() { + details_ = getDefaultInstance().getDetails(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+         * Additional details on why this justification was chosen.
+         * 
+ * + * string details = 2; + * @param value The bytes for details to set. + * @return This builder for chaining. + */ + public Builder setDetailsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + details_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) + private static final io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification(); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Justification parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RemediationOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * The type of remediation that can be applied.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * @return The enum numeric value on the wire for remediationType. + */ + int getRemediationTypeValue(); + /** + *
+       * The type of remediation that can be applied.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * @return The remediationType. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType getRemediationType(); + + /** + *
+       * Contains a comprehensive human-readable discussion of the remediation.
+       * 
+ * + * string details = 2; + * @return The details. + */ + java.lang.String getDetails(); + /** + *
+       * Contains a comprehensive human-readable discussion of the remediation.
+       * 
+ * + * string details = 2; + * @return The bytes for details. + */ + com.google.protobuf.ByteString + getDetailsBytes(); + + /** + *
+       * Contains the URL where to obtain the remediation.
+       * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + * @return Whether the remediationUri field is set. + */ + boolean hasRemediationUri(); + /** + *
+       * Contains the URL where to obtain the remediation.
+       * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + * @return The remediationUri. + */ + io.grafeas.v1.RelatedUrl getRemediationUri(); + /** + *
+       * Contains the URL where to obtain the remediation.
+       * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + io.grafeas.v1.RelatedUrlOrBuilder getRemediationUriOrBuilder(); + } + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation} + */ + public static final class Remediation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) + RemediationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Remediation.newBuilder() to construct. + private Remediation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Remediation() { + remediationType_ = 0; + details_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Remediation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.class, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder.class); + } + + /** + *
+       * The type of remediation that can be applied.
+       * 
+ * + * Protobuf enum {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType} + */ + public enum RemediationType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+         * No remediation type specified.
+         * 
+ * + * REMEDIATION_TYPE_UNSPECIFIED = 0; + */ + REMEDIATION_TYPE_UNSPECIFIED(0), + /** + *
+         * A MITIGATION is available.
+         * 
+ * + * MITIGATION = 1; + */ + MITIGATION(1), + /** + *
+         * No fix is planned.
+         * 
+ * + * NO_FIX_PLANNED = 2; + */ + NO_FIX_PLANNED(2), + /** + *
+         * Not available.
+         * 
+ * + * NONE_AVAILABLE = 3; + */ + NONE_AVAILABLE(3), + /** + *
+         * A vendor fix is available.
+         * 
+ * + * VENDOR_FIX = 4; + */ + VENDOR_FIX(4), + /** + *
+         * A workaround is available.
+         * 
+ * + * WORKAROUND = 5; + */ + WORKAROUND(5), + UNRECOGNIZED(-1), + ; + + /** + *
+         * No remediation type specified.
+         * 
+ * + * REMEDIATION_TYPE_UNSPECIFIED = 0; + */ + public static final int REMEDIATION_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+         * A MITIGATION is available.
+         * 
+ * + * MITIGATION = 1; + */ + public static final int MITIGATION_VALUE = 1; + /** + *
+         * No fix is planned.
+         * 
+ * + * NO_FIX_PLANNED = 2; + */ + public static final int NO_FIX_PLANNED_VALUE = 2; + /** + *
+         * Not available.
+         * 
+ * + * NONE_AVAILABLE = 3; + */ + public static final int NONE_AVAILABLE_VALUE = 3; + /** + *
+         * A vendor fix is available.
+         * 
+ * + * VENDOR_FIX = 4; + */ + public static final int VENDOR_FIX_VALUE = 4; + /** + *
+         * A workaround is available.
+         * 
+ * + * WORKAROUND = 5; + */ + public static final int WORKAROUND_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RemediationType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RemediationType forNumber(int value) { + switch (value) { + case 0: return REMEDIATION_TYPE_UNSPECIFIED; + case 1: return MITIGATION; + case 2: return NO_FIX_PLANNED; + case 3: return NONE_AVAILABLE; + case 4: return VENDOR_FIX; + case 5: return WORKAROUND; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + RemediationType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RemediationType findValueByNumber(int number) { + return RemediationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDescriptor().getEnumTypes().get(0); + } + + private static final RemediationType[] VALUES = values(); + + public static RemediationType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RemediationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType) + } + + public static final int REMEDIATION_TYPE_FIELD_NUMBER = 1; + private int remediationType_ = 0; + /** + *
+       * The type of remediation that can be applied.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * @return The enum numeric value on the wire for remediationType. + */ + @java.lang.Override public int getRemediationTypeValue() { + return remediationType_; + } + /** + *
+       * The type of remediation that can be applied.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * @return The remediationType. + */ + @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType getRemediationType() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType.forNumber(remediationType_); + return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType.UNRECOGNIZED : result; + } + + public static final int DETAILS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object details_ = ""; + /** + *
+       * Contains a comprehensive human-readable discussion of the remediation.
+       * 
+ * + * string details = 2; + * @return The details. + */ + @java.lang.Override + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } + } + /** + *
+       * Contains a comprehensive human-readable discussion of the remediation.
+       * 
+ * + * string details = 2; + * @return The bytes for details. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REMEDIATION_URI_FIELD_NUMBER = 3; + private io.grafeas.v1.RelatedUrl remediationUri_; + /** + *
+       * Contains the URL where to obtain the remediation.
+       * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + * @return Whether the remediationUri field is set. + */ + @java.lang.Override + public boolean hasRemediationUri() { + return remediationUri_ != null; + } + /** + *
+       * Contains the URL where to obtain the remediation.
+       * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + * @return The remediationUri. + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrl getRemediationUri() { + return remediationUri_ == null ? io.grafeas.v1.RelatedUrl.getDefaultInstance() : remediationUri_; + } + /** + *
+       * Contains the URL where to obtain the remediation.
+       * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrlOrBuilder getRemediationUriOrBuilder() { + return remediationUri_ == null ? io.grafeas.v1.RelatedUrl.getDefaultInstance() : remediationUri_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (remediationType_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType.REMEDIATION_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, remediationType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, details_); + } + if (remediationUri_ != null) { + output.writeMessage(3, getRemediationUri()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (remediationType_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType.REMEDIATION_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, remediationType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, details_); + } + if (remediationUri_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getRemediationUri()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation other = (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) obj; + + if (remediationType_ != other.remediationType_) return false; + if (!getDetails() + .equals(other.getDetails())) return false; + if (hasRemediationUri() != other.hasRemediationUri()) return false; + if (hasRemediationUri()) { + if (!getRemediationUri() + .equals(other.getRemediationUri())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REMEDIATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + remediationType_; + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + if (hasRemediationUri()) { + hash = (37 * hash) + REMEDIATION_URI_FIELD_NUMBER; + hash = (53 * hash) + getRemediationUri().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.class, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + remediationType_ = 0; + details_ = ""; + remediationUri_ = null; + if (remediationUriBuilder_ != null) { + remediationUriBuilder_.dispose(); + remediationUriBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation build() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation buildPartial() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation result = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.remediationType_ = remediationType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.details_ = details_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.remediationUri_ = remediationUriBuilder_ == null + ? remediationUri_ + : remediationUriBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) { + return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation other) { + if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDefaultInstance()) return this; + if (other.remediationType_ != 0) { + setRemediationTypeValue(other.getRemediationTypeValue()); + } + if (!other.getDetails().isEmpty()) { + details_ = other.details_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasRemediationUri()) { + mergeRemediationUri(other.getRemediationUri()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + remediationType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + details_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getRemediationUriFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int remediationType_ = 0; + /** + *
+         * The type of remediation that can be applied.
+         * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * @return The enum numeric value on the wire for remediationType. + */ + @java.lang.Override public int getRemediationTypeValue() { + return remediationType_; + } + /** + *
+         * The type of remediation that can be applied.
+         * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * @param value The enum numeric value on the wire for remediationType to set. + * @return This builder for chaining. + */ + public Builder setRemediationTypeValue(int value) { + remediationType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+         * The type of remediation that can be applied.
+         * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * @return The remediationType. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType getRemediationType() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType.forNumber(remediationType_); + return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType.UNRECOGNIZED : result; + } + /** + *
+         * The type of remediation that can be applied.
+         * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * @param value The remediationType to set. + * @return This builder for chaining. + */ + public Builder setRemediationType(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + remediationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+         * The type of remediation that can be applied.
+         * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * @return This builder for chaining. + */ + public Builder clearRemediationType() { + bitField0_ = (bitField0_ & ~0x00000001); + remediationType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object details_ = ""; + /** + *
+         * Contains a comprehensive human-readable discussion of the remediation.
+         * 
+ * + * string details = 2; + * @return The details. + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+         * Contains a comprehensive human-readable discussion of the remediation.
+         * 
+ * + * string details = 2; + * @return The bytes for details. + */ + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+         * Contains a comprehensive human-readable discussion of the remediation.
+         * 
+ * + * string details = 2; + * @param value The details to set. + * @return This builder for chaining. + */ + public Builder setDetails( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + details_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+         * Contains a comprehensive human-readable discussion of the remediation.
+         * 
+ * + * string details = 2; + * @return This builder for chaining. + */ + public Builder clearDetails() { + details_ = getDefaultInstance().getDetails(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+         * Contains a comprehensive human-readable discussion of the remediation.
+         * 
+ * + * string details = 2; + * @param value The bytes for details to set. + * @return This builder for chaining. + */ + public Builder setDetailsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + details_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.grafeas.v1.RelatedUrl remediationUri_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> remediationUriBuilder_; + /** + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + * @return Whether the remediationUri field is set. + */ + public boolean hasRemediationUri() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + * @return The remediationUri. + */ + public io.grafeas.v1.RelatedUrl getRemediationUri() { + if (remediationUriBuilder_ == null) { + return remediationUri_ == null ? io.grafeas.v1.RelatedUrl.getDefaultInstance() : remediationUri_; + } else { + return remediationUriBuilder_.getMessage(); + } + } + /** + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + public Builder setRemediationUri(io.grafeas.v1.RelatedUrl value) { + if (remediationUriBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remediationUri_ = value; + } else { + remediationUriBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + public Builder setRemediationUri( + io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (remediationUriBuilder_ == null) { + remediationUri_ = builderForValue.build(); + } else { + remediationUriBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + public Builder mergeRemediationUri(io.grafeas.v1.RelatedUrl value) { + if (remediationUriBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + remediationUri_ != null && + remediationUri_ != io.grafeas.v1.RelatedUrl.getDefaultInstance()) { + getRemediationUriBuilder().mergeFrom(value); + } else { + remediationUri_ = value; + } + } else { + remediationUriBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + public Builder clearRemediationUri() { + bitField0_ = (bitField0_ & ~0x00000004); + remediationUri_ = null; + if (remediationUriBuilder_ != null) { + remediationUriBuilder_.dispose(); + remediationUriBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + public io.grafeas.v1.RelatedUrl.Builder getRemediationUriBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getRemediationUriFieldBuilder().getBuilder(); + } + /** + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + public io.grafeas.v1.RelatedUrlOrBuilder getRemediationUriOrBuilder() { + if (remediationUriBuilder_ != null) { + return remediationUriBuilder_.getMessageOrBuilder(); + } else { + return remediationUri_ == null ? + io.grafeas.v1.RelatedUrl.getDefaultInstance() : remediationUri_; + } + } + /** + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> + getRemediationUriFieldBuilder() { + if (remediationUriBuilder_ == null) { + remediationUriBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder>( + getRemediationUri(), + getParentForChildren(), + isClean()); + remediationUri_ = null; + } + return remediationUriBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) + private static final io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation(); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Remediation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int CVE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cve_ = ""; + /** + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * @return The cve. + */ + @java.lang.Override + public java.lang.String getCve() { + java.lang.Object ref = cve_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cve_ = s; + return s; + } + } + /** + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * @return The bytes for cve. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCveBytes() { + java.lang.Object ref = cve_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cve_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object shortDescription_ = ""; + /** + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * @return The shortDescription. + */ + @java.lang.Override + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } + } + /** + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * @return The bytes for shortDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LONG_DESCRIPTION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object longDescription_ = ""; + /** + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * @return The longDescription. + */ + @java.lang.Override + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } + } + /** + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * @return The bytes for longDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATED_URIS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List relatedUris_; + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + @java.lang.Override + public java.util.List getRelatedUrisList() { + return relatedUris_; + } + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + @java.lang.Override + public java.util.List + getRelatedUrisOrBuilderList() { + return relatedUris_; + } + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + @java.lang.Override + public int getRelatedUrisCount() { + return relatedUris_.size(); + } + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrl getRelatedUris(int index) { + return relatedUris_.get(index); + } + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder( + int index) { + return relatedUris_.get(index); + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_ = 0; + /** + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * @return The state. + */ + @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); + return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED : result; + } + + public static final int IMPACTS_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList impacts_; + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * @return A list containing the impacts. + */ + public com.google.protobuf.ProtocolStringList + getImpactsList() { + return impacts_; + } + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * @return The count of impacts. + */ + public int getImpactsCount() { + return impacts_.size(); + } + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * @param index The index of the element to return. + * @return The impacts at the given index. + */ + public java.lang.String getImpacts(int index) { + return impacts_.get(index); + } + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * @param index The index of the value to return. + * @return The bytes of the impacts at the given index. + */ + public com.google.protobuf.ByteString + getImpactsBytes(int index) { + return impacts_.getByteString(index); + } + + public static final int JUSTIFICATION_FIELD_NUMBER = 7; + private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_; + /** + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * @return Whether the justification field is set. + */ + @java.lang.Override + public boolean hasJustification() { + return justification_ != null; + } + /** + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * @return The justification. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() { + return justification_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; + } + /** + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder getJustificationOrBuilder() { + return justification_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; + } + + public static final int REMEDIATIONS_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private java.util.List remediations_; + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + @java.lang.Override + public java.util.List getRemediationsList() { + return remediations_; + } + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + @java.lang.Override + public java.util.List + getRemediationsOrBuilderList() { + return remediations_; + } + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + @java.lang.Override + public int getRemediationsCount() { + return remediations_.size(); + } + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index) { + return remediations_.get(index); + } + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder getRemediationsOrBuilder( + int index) { + return remediations_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cve_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cve_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, longDescription_); + } + for (int i = 0; i < relatedUris_.size(); i++) { + output.writeMessage(4, relatedUris_.get(i)); + } + if (state_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + for (int i = 0; i < impacts_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, impacts_.getRaw(i)); + } + if (justification_ != null) { + output.writeMessage(7, getJustification()); + } + for (int i = 0; i < remediations_.size(); i++) { + output.writeMessage(8, remediations_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cve_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cve_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, longDescription_); + } + for (int i = 0; i < relatedUris_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, relatedUris_.get(i)); + } + if (state_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, state_); + } + { + int dataSize = 0; + for (int i = 0; i < impacts_.size(); i++) { + dataSize += computeStringSizeNoTag(impacts_.getRaw(i)); + } + size += dataSize; + size += 1 * getImpactsList().size(); + } + if (justification_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getJustification()); + } + for (int i = 0; i < remediations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, remediations_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment other = (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment) obj; + + if (!getCve() + .equals(other.getCve())) return false; + if (!getShortDescription() + .equals(other.getShortDescription())) return false; + if (!getLongDescription() + .equals(other.getLongDescription())) return false; + if (!getRelatedUrisList() + .equals(other.getRelatedUrisList())) return false; + if (state_ != other.state_) return false; + if (!getImpactsList() + .equals(other.getImpactsList())) return false; + if (hasJustification() != other.hasJustification()) return false; + if (hasJustification()) { + if (!getJustification() + .equals(other.getJustification())) return false; + } + if (!getRemediationsList() + .equals(other.getRemediationsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CVE_FIELD_NUMBER; + hash = (53 * hash) + getCve().hashCode(); + hash = (37 * hash) + SHORT_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getShortDescription().hashCode(); + hash = (37 * hash) + LONG_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getLongDescription().hashCode(); + if (getRelatedUrisCount() > 0) { + hash = (37 * hash) + RELATED_URIS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedUrisList().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getImpactsCount() > 0) { + hash = (37 * hash) + IMPACTS_FIELD_NUMBER; + hash = (53 * hash) + getImpactsList().hashCode(); + } + if (hasJustification()) { + hash = (37 * hash) + JUSTIFICATION_FIELD_NUMBER; + hash = (53 * hash) + getJustification().hashCode(); + } + if (getRemediationsCount() > 0) { + hash = (37 * hash) + REMEDIATIONS_FIELD_NUMBER; + hash = (53 * hash) + getRemediationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Assessment provides all information that is related to a single
+     * vulnerability for this product.
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment) + io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.class, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cve_ = ""; + shortDescription_ = ""; + longDescription_ = ""; + if (relatedUrisBuilder_ == null) { + relatedUris_ = java.util.Collections.emptyList(); + } else { + relatedUris_ = null; + relatedUrisBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + justification_ = null; + if (justificationBuilder_ != null) { + justificationBuilder_.dispose(); + justificationBuilder_ = null; + } + if (remediationsBuilder_ == null) { + remediations_ = java.util.Collections.emptyList(); + } else { + remediations_ = null; + remediationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment build() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment buildPartial() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment result = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment result) { + if (relatedUrisBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + relatedUris_ = java.util.Collections.unmodifiableList(relatedUris_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.relatedUris_ = relatedUris_; + } else { + result.relatedUris_ = relatedUrisBuilder_.build(); + } + if (((bitField0_ & 0x00000020) != 0)) { + impacts_ = impacts_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.impacts_ = impacts_; + if (remediationsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + remediations_ = java.util.Collections.unmodifiableList(remediations_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.remediations_ = remediations_; + } else { + result.remediations_ = remediationsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cve_ = cve_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.shortDescription_ = shortDescription_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.longDescription_ = longDescription_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.justification_ = justificationBuilder_ == null + ? justification_ + : justificationBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment) { + return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Assessment)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment other) { + if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance()) return this; + if (!other.getCve().isEmpty()) { + cve_ = other.cve_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getShortDescription().isEmpty()) { + shortDescription_ = other.shortDescription_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getLongDescription().isEmpty()) { + longDescription_ = other.longDescription_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (relatedUrisBuilder_ == null) { + if (!other.relatedUris_.isEmpty()) { + if (relatedUris_.isEmpty()) { + relatedUris_ = other.relatedUris_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureRelatedUrisIsMutable(); + relatedUris_.addAll(other.relatedUris_); + } + onChanged(); + } + } else { + if (!other.relatedUris_.isEmpty()) { + if (relatedUrisBuilder_.isEmpty()) { + relatedUrisBuilder_.dispose(); + relatedUrisBuilder_ = null; + relatedUris_ = other.relatedUris_; + bitField0_ = (bitField0_ & ~0x00000008); + relatedUrisBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRelatedUrisFieldBuilder() : null; + } else { + relatedUrisBuilder_.addAllMessages(other.relatedUris_); + } + } + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.impacts_.isEmpty()) { + if (impacts_.isEmpty()) { + impacts_ = other.impacts_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureImpactsIsMutable(); + impacts_.addAll(other.impacts_); + } + onChanged(); + } + if (other.hasJustification()) { + mergeJustification(other.getJustification()); + } + if (remediationsBuilder_ == null) { + if (!other.remediations_.isEmpty()) { + if (remediations_.isEmpty()) { + remediations_ = other.remediations_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureRemediationsIsMutable(); + remediations_.addAll(other.remediations_); + } + onChanged(); + } + } else { + if (!other.remediations_.isEmpty()) { + if (remediationsBuilder_.isEmpty()) { + remediationsBuilder_.dispose(); + remediationsBuilder_ = null; + remediations_ = other.remediations_; + bitField0_ = (bitField0_ & ~0x00000080); + remediationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRemediationsFieldBuilder() : null; + } else { + remediationsBuilder_.addAllMessages(other.remediations_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cve_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + shortDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + longDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + io.grafeas.v1.RelatedUrl m = + input.readMessage( + io.grafeas.v1.RelatedUrl.parser(), + extensionRegistry); + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.add(m); + } else { + relatedUrisBuilder_.addMessage(m); + } + break; + } // case 34 + case 40: { + state_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + ensureImpactsIsMutable(); + impacts_.add(s); + break; + } // case 50 + case 58: { + input.readMessage( + getJustificationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation m = + input.readMessage( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.parser(), + extensionRegistry); + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.add(m); + } else { + remediationsBuilder_.addMessage(m); + } + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cve_ = ""; + /** + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * @return The cve. + */ + public java.lang.String getCve() { + java.lang.Object ref = cve_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cve_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * @return The bytes for cve. + */ + public com.google.protobuf.ByteString + getCveBytes() { + java.lang.Object ref = cve_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cve_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * @param value The cve to set. + * @return This builder for chaining. + */ + public Builder setCve( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cve_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * @return This builder for chaining. + */ + public Builder clearCve() { + cve_ = getDefaultInstance().getCve(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * @param value The bytes for cve to set. + * @return This builder for chaining. + */ + public Builder setCveBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cve_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object shortDescription_ = ""; + /** + *
+       * A one sentence description of this Vex.
+       * 
+ * + * string short_description = 2; + * @return The shortDescription. + */ + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A one sentence description of this Vex.
+       * 
+ * + * string short_description = 2; + * @return The bytes for shortDescription. + */ + public com.google.protobuf.ByteString + getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A one sentence description of this Vex.
+       * 
+ * + * string short_description = 2; + * @param value The shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + shortDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * A one sentence description of this Vex.
+       * 
+ * + * string short_description = 2; + * @return This builder for chaining. + */ + public Builder clearShortDescription() { + shortDescription_ = getDefaultInstance().getShortDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * A one sentence description of this Vex.
+       * 
+ * + * string short_description = 2; + * @param value The bytes for shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + shortDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object longDescription_ = ""; + /** + *
+       * A detailed description of this Vex.
+       * 
+ * + * string long_description = 3; + * @return The longDescription. + */ + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A detailed description of this Vex.
+       * 
+ * + * string long_description = 3; + * @return The bytes for longDescription. + */ + public com.google.protobuf.ByteString + getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A detailed description of this Vex.
+       * 
+ * + * string long_description = 3; + * @param value The longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + longDescription_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * A detailed description of this Vex.
+       * 
+ * + * string long_description = 3; + * @return This builder for chaining. + */ + public Builder clearLongDescription() { + longDescription_ = getDefaultInstance().getLongDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * A detailed description of this Vex.
+       * 
+ * + * string long_description = 3; + * @param value The bytes for longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + longDescription_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List relatedUris_ = + java.util.Collections.emptyList(); + private void ensureRelatedUrisIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + relatedUris_ = new java.util.ArrayList(relatedUris_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> relatedUrisBuilder_; + + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public java.util.List getRelatedUrisList() { + if (relatedUrisBuilder_ == null) { + return java.util.Collections.unmodifiableList(relatedUris_); + } else { + return relatedUrisBuilder_.getMessageList(); + } + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public int getRelatedUrisCount() { + if (relatedUrisBuilder_ == null) { + return relatedUris_.size(); + } else { + return relatedUrisBuilder_.getCount(); + } + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public io.grafeas.v1.RelatedUrl getRelatedUris(int index) { + if (relatedUrisBuilder_ == null) { + return relatedUris_.get(index); + } else { + return relatedUrisBuilder_.getMessage(index); + } + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder setRelatedUris( + int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrisIsMutable(); + relatedUris_.set(index, value); + onChanged(); + } else { + relatedUrisBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder setRelatedUris( + int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.set(index, builderForValue.build()); + onChanged(); + } else { + relatedUrisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder addRelatedUris(io.grafeas.v1.RelatedUrl value) { + if (relatedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrisIsMutable(); + relatedUris_.add(value); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder addRelatedUris( + int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrisIsMutable(); + relatedUris_.add(index, value); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder addRelatedUris( + io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.add(builderForValue.build()); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder addRelatedUris( + int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.add(index, builderForValue.build()); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder addAllRelatedUris( + java.lang.Iterable values) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relatedUris_); + onChanged(); + } else { + relatedUrisBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder clearRelatedUris() { + if (relatedUrisBuilder_ == null) { + relatedUris_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + relatedUrisBuilder_.clear(); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder removeRelatedUris(int index) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.remove(index); + onChanged(); + } else { + relatedUrisBuilder_.remove(index); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public io.grafeas.v1.RelatedUrl.Builder getRelatedUrisBuilder( + int index) { + return getRelatedUrisFieldBuilder().getBuilder(index); + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder( + int index) { + if (relatedUrisBuilder_ == null) { + return relatedUris_.get(index); } else { + return relatedUrisBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public java.util.List + getRelatedUrisOrBuilderList() { + if (relatedUrisBuilder_ != null) { + return relatedUrisBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relatedUris_); + } + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder() { + return getRelatedUrisFieldBuilder().addBuilder( + io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder( + int index) { + return getRelatedUrisFieldBuilder().addBuilder( + index, io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public java.util.List + getRelatedUrisBuilderList() { + return getRelatedUrisFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> + getRelatedUrisFieldBuilder() { + if (relatedUrisBuilder_ == null) { + relatedUrisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder>( + relatedUris_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + relatedUris_ = null; + } + return relatedUrisBuilder_; + } + + private int state_ = 0; + /** + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * @return The state. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); + return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED : result; + } + /** + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000010); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureImpactsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + impacts_ = new com.google.protobuf.LazyStringArrayList(impacts_); + bitField0_ |= 0x00000020; + } + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * @return A list containing the impacts. + */ + public com.google.protobuf.ProtocolStringList + getImpactsList() { + return impacts_.getUnmodifiableView(); + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * @return The count of impacts. + */ + public int getImpactsCount() { + return impacts_.size(); + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * @param index The index of the element to return. + * @return The impacts at the given index. + */ + public java.lang.String getImpacts(int index) { + return impacts_.get(index); + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * @param index The index of the value to return. + * @return The bytes of the impacts at the given index. + */ + public com.google.protobuf.ByteString + getImpactsBytes(int index) { + return impacts_.getByteString(index); + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * @param index The index to set the value at. + * @param value The impacts to set. + * @return This builder for chaining. + */ + public Builder setImpacts( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureImpactsIsMutable(); + impacts_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * @param value The impacts to add. + * @return This builder for chaining. + */ + public Builder addImpacts( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureImpactsIsMutable(); + impacts_.add(value); + onChanged(); + return this; + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * @param values The impacts to add. + * @return This builder for chaining. + */ + public Builder addAllImpacts( + java.lang.Iterable values) { + ensureImpactsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, impacts_); + onChanged(); + return this; + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * @return This builder for chaining. + */ + public Builder clearImpacts() { + impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * @param value The bytes of the impacts to add. + * @return This builder for chaining. + */ + public Builder addImpactsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureImpactsIsMutable(); + impacts_.add(value); + onChanged(); + return this; + } + + private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> justificationBuilder_; + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * @return Whether the justification field is set. + */ + public boolean hasJustification() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * @return The justification. + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() { + if (justificationBuilder_ == null) { + return justification_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; + } else { + return justificationBuilder_.getMessage(); + } + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + public Builder setJustification(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { + if (justificationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + justification_ = value; + } else { + justificationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + public Builder setJustification( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder builderForValue) { + if (justificationBuilder_ == null) { + justification_ = builderForValue.build(); + } else { + justificationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + public Builder mergeJustification(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { + if (justificationBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + justification_ != null && + justification_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance()) { + getJustificationBuilder().mergeFrom(value); + } else { + justification_ = value; + } + } else { + justificationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + public Builder clearJustification() { + bitField0_ = (bitField0_ & ~0x00000040); + justification_ = null; + if (justificationBuilder_ != null) { + justificationBuilder_.dispose(); + justificationBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder getJustificationBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getJustificationFieldBuilder().getBuilder(); + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder getJustificationOrBuilder() { + if (justificationBuilder_ != null) { + return justificationBuilder_.getMessageOrBuilder(); + } else { + return justification_ == null ? + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; + } + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> + getJustificationFieldBuilder() { + if (justificationBuilder_ == null) { + justificationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder>( + getJustification(), + getParentForChildren(), + isClean()); + justification_ = null; + } + return justificationBuilder_; + } + + private java.util.List remediations_ = + java.util.Collections.emptyList(); + private void ensureRemediationsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + remediations_ = new java.util.ArrayList(remediations_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> remediationsBuilder_; + + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public java.util.List getRemediationsList() { + if (remediationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(remediations_); + } else { + return remediationsBuilder_.getMessageList(); + } + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public int getRemediationsCount() { + if (remediationsBuilder_ == null) { + return remediations_.size(); + } else { + return remediationsBuilder_.getCount(); + } + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index) { + if (remediationsBuilder_ == null) { + return remediations_.get(index); + } else { + return remediationsBuilder_.getMessage(index); + } + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public Builder setRemediations( + int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + if (remediationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemediationsIsMutable(); + remediations_.set(index, value); + onChanged(); + } else { + remediationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public Builder setRemediations( + int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder builderForValue) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.set(index, builderForValue.build()); + onChanged(); + } else { + remediationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public Builder addRemediations(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + if (remediationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemediationsIsMutable(); + remediations_.add(value); + onChanged(); + } else { + remediationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public Builder addRemediations( + int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + if (remediationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemediationsIsMutable(); + remediations_.add(index, value); + onChanged(); + } else { + remediationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public Builder addRemediations( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder builderForValue) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.add(builderForValue.build()); + onChanged(); + } else { + remediationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public Builder addRemediations( + int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder builderForValue) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.add(index, builderForValue.build()); + onChanged(); + } else { + remediationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public Builder addAllRemediations( + java.lang.Iterable values) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, remediations_); + onChanged(); + } else { + remediationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public Builder clearRemediations() { + if (remediationsBuilder_ == null) { + remediations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + remediationsBuilder_.clear(); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public Builder removeRemediations(int index) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.remove(index); + onChanged(); + } else { + remediationsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder getRemediationsBuilder( + int index) { + return getRemediationsFieldBuilder().getBuilder(index); + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder getRemediationsOrBuilder( + int index) { + if (remediationsBuilder_ == null) { + return remediations_.get(index); } else { + return remediationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public java.util.List + getRemediationsOrBuilderList() { + if (remediationsBuilder_ != null) { + return remediationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(remediations_); + } + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder addRemediationsBuilder() { + return getRemediationsFieldBuilder().addBuilder( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDefaultInstance()); + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder addRemediationsBuilder( + int index) { + return getRemediationsFieldBuilder().addBuilder( + index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDefaultInstance()); + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + */ + public java.util.List + getRemediationsBuilderList() { + return getRemediationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + getRemediationsFieldBuilder() { + if (remediationsBuilder_ == null) { + remediationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder>( + remediations_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + remediations_ = null; + } + return remediationsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment) + private static final io.grafeas.v1.VulnerabilityAssessmentNote.Assessment DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment(); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Assessment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int TITLE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + *
+   * The title of the note. E.g. `Vex-Debian-11.4`
+   * 
+ * + * string title = 1; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + *
+   * The title of the note. E.g. `Vex-Debian-11.4`
+   * 
+ * + * string title = 1; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object shortDescription_ = ""; + /** + *
+   * A one sentence description of this Vex.
+   * 
+ * + * string short_description = 2; + * @return The shortDescription. + */ + @java.lang.Override + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } + } + /** + *
+   * A one sentence description of this Vex.
+   * 
+ * + * string short_description = 2; + * @return The bytes for shortDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LONG_DESCRIPTION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object longDescription_ = ""; + /** + *
+   * A detailed description of this Vex.
+   * 
+ * + * string long_description = 3; + * @return The longDescription. + */ + @java.lang.Override + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } + } + /** + *
+   * A detailed description of this Vex.
+   * 
+ * + * string long_description = 3; + * @return The bytes for longDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + *
+   * Identifies the language used by this document,
+   * corresponding to IETF BCP 47 / RFC 5646.
+   * 
+ * + * string language_code = 4; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+   * Identifies the language used by this document,
+   * corresponding to IETF BCP 47 / RFC 5646.
+   * 
+ * + * string language_code = 4; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLISHER_FIELD_NUMBER = 5; + private io.grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher_; + /** + *
+   * Publisher details of this Note.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * @return Whether the publisher field is set. + */ + @java.lang.Override + public boolean hasPublisher() { + return publisher_ != null; + } + /** + *
+   * Publisher details of this Note.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * @return The publisher. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getPublisher() { + return publisher_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() : publisher_; + } + /** + *
+   * Publisher details of this Note.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder getPublisherOrBuilder() { + return publisher_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() : publisher_; + } + + public static final int PRODUCT_FIELD_NUMBER = 6; + private io.grafeas.v1.VulnerabilityAssessmentNote.Product product_; + /** + *
+   * The product affected by this vex.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * @return Whether the product field is set. + */ + @java.lang.Override + public boolean hasProduct() { + return product_ != null; + } + /** + *
+   * The product affected by this vex.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * @return The product. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Product getProduct() { + return product_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() : product_; + } + /** + *
+   * The product affected by this vex.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder getProductOrBuilder() { + return product_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() : product_; + } + + public static final int ASSESSMENT_FIELD_NUMBER = 7; + private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment_; + /** + *
+   * Represents a vulnerability assessment for the product.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * @return Whether the assessment field is set. + */ + @java.lang.Override + public boolean hasAssessment() { + return assessment_ != null; + } + /** + *
+   * Represents a vulnerability assessment for the product.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * @return The assessment. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getAssessment() { + return assessment_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() : assessment_; + } + /** + *
+   * Represents a vulnerability assessment for the product.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder getAssessmentOrBuilder() { + return assessment_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() : assessment_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, longDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, languageCode_); + } + if (publisher_ != null) { + output.writeMessage(5, getPublisher()); + } + if (product_ != null) { + output.writeMessage(6, getProduct()); + } + if (assessment_ != null) { + output.writeMessage(7, getAssessment()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, longDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, languageCode_); + } + if (publisher_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getPublisher()); + } + if (product_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getProduct()); + } + if (assessment_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getAssessment()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityAssessmentNote other = (io.grafeas.v1.VulnerabilityAssessmentNote) obj; + + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getShortDescription() + .equals(other.getShortDescription())) return false; + if (!getLongDescription() + .equals(other.getLongDescription())) return false; + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (hasPublisher() != other.hasPublisher()) return false; + if (hasPublisher()) { + if (!getPublisher() + .equals(other.getPublisher())) return false; + } + if (hasProduct() != other.hasProduct()) return false; + if (hasProduct()) { + if (!getProduct() + .equals(other.getProduct())) return false; + } + if (hasAssessment() != other.hasAssessment()) return false; + if (hasAssessment()) { + if (!getAssessment() + .equals(other.getAssessment())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + SHORT_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getShortDescription().hashCode(); + hash = (37 * hash) + LONG_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getLongDescription().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + if (hasPublisher()) { + hash = (37 * hash) + PUBLISHER_FIELD_NUMBER; + hash = (53 * hash) + getPublisher().hashCode(); + } + if (hasProduct()) { + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + } + if (hasAssessment()) { + hash = (37 * hash) + ASSESSMENT_FIELD_NUMBER; + hash = (53 * hash) + getAssessment().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A single VulnerabilityAssessmentNote represents
+   * one particular product's vulnerability assessment for one CVE.
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote) + io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.class, io.grafeas.v1.VulnerabilityAssessmentNote.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + title_ = ""; + shortDescription_ = ""; + longDescription_ = ""; + languageCode_ = ""; + publisher_ = null; + if (publisherBuilder_ != null) { + publisherBuilder_.dispose(); + publisherBuilder_ = null; + } + product_ = null; + if (productBuilder_ != null) { + productBuilder_.dispose(); + productBuilder_ = null; + } + assessment_ = null; + if (assessmentBuilder_ != null) { + assessmentBuilder_.dispose(); + assessmentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote build() { + io.grafeas.v1.VulnerabilityAssessmentNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote buildPartial() { + io.grafeas.v1.VulnerabilityAssessmentNote result = new io.grafeas.v1.VulnerabilityAssessmentNote(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.shortDescription_ = shortDescription_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.longDescription_ = longDescription_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.languageCode_ = languageCode_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.publisher_ = publisherBuilder_ == null + ? publisher_ + : publisherBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.product_ = productBuilder_ == null + ? product_ + : productBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.assessment_ = assessmentBuilder_ == null + ? assessment_ + : assessmentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote) { + return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote other) { + if (other == io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance()) return this; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getShortDescription().isEmpty()) { + shortDescription_ = other.shortDescription_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getLongDescription().isEmpty()) { + longDescription_ = other.longDescription_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasPublisher()) { + mergePublisher(other.getPublisher()); + } + if (other.hasProduct()) { + mergeProduct(other.getProduct()); + } + if (other.hasAssessment()) { + mergeAssessment(other.getAssessment()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + shortDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + longDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getPublisherFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getProductFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getAssessmentFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object title_ = ""; + /** + *
+     * The title of the note. E.g. `Vex-Debian-11.4`
+     * 
+ * + * string title = 1; + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The title of the note. E.g. `Vex-Debian-11.4`
+     * 
+ * + * string title = 1; + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The title of the note. E.g. `Vex-Debian-11.4`
+     * 
+ * + * string title = 1; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The title of the note. E.g. `Vex-Debian-11.4`
+     * 
+ * + * string title = 1; + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The title of the note. E.g. `Vex-Debian-11.4`
+     * 
+ * + * string title = 1; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object shortDescription_ = ""; + /** + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * @return The shortDescription. + */ + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * @return The bytes for shortDescription. + */ + public com.google.protobuf.ByteString + getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * @param value The shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + shortDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * @return This builder for chaining. + */ + public Builder clearShortDescription() { + shortDescription_ = getDefaultInstance().getShortDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * @param value The bytes for shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + shortDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object longDescription_ = ""; + /** + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * @return The longDescription. + */ + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * @return The bytes for longDescription. + */ + public com.google.protobuf.ByteString + getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * @param value The longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + longDescription_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * @return This builder for chaining. + */ + public Builder clearLongDescription() { + longDescription_ = getDefaultInstance().getLongDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * @param value The bytes for longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + longDescription_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+     * Identifies the language used by this document,
+     * corresponding to IETF BCP 47 / RFC 5646.
+     * 
+ * + * string language_code = 4; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Identifies the language used by this document,
+     * corresponding to IETF BCP 47 / RFC 5646.
+     * 
+ * + * string language_code = 4; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Identifies the language used by this document,
+     * corresponding to IETF BCP 47 / RFC 5646.
+     * 
+ * + * string language_code = 4; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + languageCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Identifies the language used by this document,
+     * corresponding to IETF BCP 47 / RFC 5646.
+     * 
+ * + * string language_code = 4; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Identifies the language used by this document,
+     * corresponding to IETF BCP 47 / RFC 5646.
+     * 
+ * + * string language_code = 4; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private io.grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher, io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder> publisherBuilder_; + /** + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * @return Whether the publisher field is set. + */ + public boolean hasPublisher() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * @return The publisher. + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getPublisher() { + if (publisherBuilder_ == null) { + return publisher_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() : publisher_; + } else { + return publisherBuilder_.getMessage(); + } + } + /** + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + public Builder setPublisher(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher value) { + if (publisherBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publisher_ = value; + } else { + publisherBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + public Builder setPublisher( + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder builderForValue) { + if (publisherBuilder_ == null) { + publisher_ = builderForValue.build(); + } else { + publisherBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + public Builder mergePublisher(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher value) { + if (publisherBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + publisher_ != null && + publisher_ != io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance()) { + getPublisherBuilder().mergeFrom(value); + } else { + publisher_ = value; + } + } else { + publisherBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + public Builder clearPublisher() { + bitField0_ = (bitField0_ & ~0x00000010); + publisher_ = null; + if (publisherBuilder_ != null) { + publisherBuilder_.dispose(); + publisherBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder getPublisherBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getPublisherFieldBuilder().getBuilder(); + } + /** + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder getPublisherOrBuilder() { + if (publisherBuilder_ != null) { + return publisherBuilder_.getMessageOrBuilder(); + } else { + return publisher_ == null ? + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() : publisher_; + } + } + /** + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher, io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder> + getPublisherFieldBuilder() { + if (publisherBuilder_ == null) { + publisherBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher, io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder>( + getPublisher(), + getParentForChildren(), + isClean()); + publisher_ = null; + } + return publisherBuilder_; + } + + private io.grafeas.v1.VulnerabilityAssessmentNote.Product product_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Product, io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder> productBuilder_; + /** + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * @return Whether the product field is set. + */ + public boolean hasProduct() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * @return The product. + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Product getProduct() { + if (productBuilder_ == null) { + return product_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() : product_; + } else { + return productBuilder_.getMessage(); + } + } + /** + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + public Builder setProduct(io.grafeas.v1.VulnerabilityAssessmentNote.Product value) { + if (productBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + product_ = value; + } else { + productBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + public Builder setProduct( + io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder builderForValue) { + if (productBuilder_ == null) { + product_ = builderForValue.build(); + } else { + productBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + public Builder mergeProduct(io.grafeas.v1.VulnerabilityAssessmentNote.Product value) { + if (productBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + product_ != null && + product_ != io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance()) { + getProductBuilder().mergeFrom(value); + } else { + product_ = value; + } + } else { + productBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + public Builder clearProduct() { + bitField0_ = (bitField0_ & ~0x00000020); + product_ = null; + if (productBuilder_ != null) { + productBuilder_.dispose(); + productBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder getProductBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getProductFieldBuilder().getBuilder(); + } + /** + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder getProductOrBuilder() { + if (productBuilder_ != null) { + return productBuilder_.getMessageOrBuilder(); + } else { + return product_ == null ? + io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() : product_; + } + } + /** + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Product, io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder> + getProductFieldBuilder() { + if (productBuilder_ == null) { + productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Product, io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder>( + getProduct(), + getParentForChildren(), + isClean()); + product_ = null; + } + return productBuilder_; + } + + private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder> assessmentBuilder_; + /** + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * @return Whether the assessment field is set. + */ + public boolean hasAssessment() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * @return The assessment. + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getAssessment() { + if (assessmentBuilder_ == null) { + return assessment_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() : assessment_; + } else { + return assessmentBuilder_.getMessage(); + } + } + /** + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + public Builder setAssessment(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment value) { + if (assessmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + assessment_ = value; + } else { + assessmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + public Builder setAssessment( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder builderForValue) { + if (assessmentBuilder_ == null) { + assessment_ = builderForValue.build(); + } else { + assessmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + public Builder mergeAssessment(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment value) { + if (assessmentBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + assessment_ != null && + assessment_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance()) { + getAssessmentBuilder().mergeFrom(value); + } else { + assessment_ = value; + } + } else { + assessmentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + public Builder clearAssessment() { + bitField0_ = (bitField0_ & ~0x00000040); + assessment_ = null; + if (assessmentBuilder_ != null) { + assessmentBuilder_.dispose(); + assessmentBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder getAssessmentBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getAssessmentFieldBuilder().getBuilder(); + } + /** + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder getAssessmentOrBuilder() { + if (assessmentBuilder_ != null) { + return assessmentBuilder_.getMessageOrBuilder(); + } else { + return assessment_ == null ? + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() : assessment_; + } + } + /** + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder> + getAssessmentFieldBuilder() { + if (assessmentBuilder_ == null) { + assessmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder>( + getAssessment(), + getParentForChildren(), + isClean()); + assessment_ = null; + } + return assessmentBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote) + private static final io.grafeas.v1.VulnerabilityAssessmentNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote(); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VulnerabilityAssessmentNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNoteOrBuilder.java new file mode 100644 index 000000000000..e2e96e109edc --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNoteOrBuilder.java @@ -0,0 +1,172 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vex.proto + +package io.grafeas.v1; + +public interface VulnerabilityAssessmentNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The title of the note. E.g. `Vex-Debian-11.4`
+   * 
+ * + * string title = 1; + * @return The title. + */ + java.lang.String getTitle(); + /** + *
+   * The title of the note. E.g. `Vex-Debian-11.4`
+   * 
+ * + * string title = 1; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + *
+   * A one sentence description of this Vex.
+   * 
+ * + * string short_description = 2; + * @return The shortDescription. + */ + java.lang.String getShortDescription(); + /** + *
+   * A one sentence description of this Vex.
+   * 
+ * + * string short_description = 2; + * @return The bytes for shortDescription. + */ + com.google.protobuf.ByteString + getShortDescriptionBytes(); + + /** + *
+   * A detailed description of this Vex.
+   * 
+ * + * string long_description = 3; + * @return The longDescription. + */ + java.lang.String getLongDescription(); + /** + *
+   * A detailed description of this Vex.
+   * 
+ * + * string long_description = 3; + * @return The bytes for longDescription. + */ + com.google.protobuf.ByteString + getLongDescriptionBytes(); + + /** + *
+   * Identifies the language used by this document,
+   * corresponding to IETF BCP 47 / RFC 5646.
+   * 
+ * + * string language_code = 4; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+   * Identifies the language used by this document,
+   * corresponding to IETF BCP 47 / RFC 5646.
+   * 
+ * + * string language_code = 4; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + + /** + *
+   * Publisher details of this Note.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * @return Whether the publisher field is set. + */ + boolean hasPublisher(); + /** + *
+   * Publisher details of this Note.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * @return The publisher. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getPublisher(); + /** + *
+   * Publisher details of this Note.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder getPublisherOrBuilder(); + + /** + *
+   * The product affected by this vex.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * @return Whether the product field is set. + */ + boolean hasProduct(); + /** + *
+   * The product affected by this vex.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * @return The product. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Product getProduct(); + /** + *
+   * The product affected by this vex.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder getProductOrBuilder(); + + /** + *
+   * Represents a vulnerability assessment for the product.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * @return Whether the assessment field is set. + */ + boolean hasAssessment(); + /** + *
+   * Represents a vulnerability assessment for the product.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * @return The assessment. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getAssessment(); + /** + *
+   * Represents a vulnerability assessment for the product.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder getAssessmentOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java new file mode 100644 index 000000000000..30c6784762cc --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java @@ -0,0 +1,8231 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vulnerability.proto + +package io.grafeas.v1; + +/** + *
+ * A security vulnerability that can be found in resources.
+ * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityNote} + */ +public final class VulnerabilityNote extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote) + VulnerabilityNoteOrBuilder { +private static final long serialVersionUID = 0L; + // Use VulnerabilityNote.newBuilder() to construct. + private VulnerabilityNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VulnerabilityNote() { + severity_ = 0; + details_ = java.util.Collections.emptyList(); + windowsDetails_ = java.util.Collections.emptyList(); + cvssVersion_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VulnerabilityNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.class, io.grafeas.v1.VulnerabilityNote.Builder.class); + } + + public interface DetailOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote.Detail) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The distro assigned severity of this vulnerability.
+     * 
+ * + * string severity_name = 1; + * @return The severityName. + */ + java.lang.String getSeverityName(); + /** + *
+     * The distro assigned severity of this vulnerability.
+     * 
+ * + * string severity_name = 1; + * @return The bytes for severityName. + */ + com.google.protobuf.ByteString + getSeverityNameBytes(); + + /** + *
+     * A vendor-specific description of this vulnerability.
+     * 
+ * + * string description = 2; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+     * A vendor-specific description of this vulnerability.
+     * 
+ * + * string description = 2; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3; + * @return The packageType. + */ + java.lang.String getPackageType(); + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3; + * @return The bytes for packageType. + */ + com.google.protobuf.ByteString + getPackageTypeBytes(); + + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string affected_cpe_uri = 4; + * @return The affectedCpeUri. + */ + java.lang.String getAffectedCpeUri(); + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string affected_cpe_uri = 4; + * @return The bytes for affectedCpeUri. + */ + com.google.protobuf.ByteString + getAffectedCpeUriBytes(); + + /** + *
+     * Required. The package this vulnerability affects.
+     * 
+ * + * string affected_package = 5; + * @return The affectedPackage. + */ + java.lang.String getAffectedPackage(); + /** + *
+     * Required. The package this vulnerability affects.
+     * 
+ * + * string affected_package = 5; + * @return The bytes for affectedPackage. + */ + com.google.protobuf.ByteString + getAffectedPackageBytes(); + + /** + *
+     * The version number at the start of an interval in which this
+     * vulnerability exists. A vulnerability can affect a package between
+     * version numbers that are disjoint sets of intervals (example:
+     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+     * represented in its own Detail. If a specific affected version is provided
+     * by a vulnerability database, affected_version_start and
+     * affected_version_end will be the same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + * @return Whether the affectedVersionStart field is set. + */ + boolean hasAffectedVersionStart(); + /** + *
+     * The version number at the start of an interval in which this
+     * vulnerability exists. A vulnerability can affect a package between
+     * version numbers that are disjoint sets of intervals (example:
+     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+     * represented in its own Detail. If a specific affected version is provided
+     * by a vulnerability database, affected_version_start and
+     * affected_version_end will be the same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + * @return The affectedVersionStart. + */ + io.grafeas.v1.Version getAffectedVersionStart(); + /** + *
+     * The version number at the start of an interval in which this
+     * vulnerability exists. A vulnerability can affect a package between
+     * version numbers that are disjoint sets of intervals (example:
+     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+     * represented in its own Detail. If a specific affected version is provided
+     * by a vulnerability database, affected_version_start and
+     * affected_version_end will be the same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + io.grafeas.v1.VersionOrBuilder getAffectedVersionStartOrBuilder(); + + /** + *
+     * The version number at the end of an interval in which this vulnerability
+     * exists. A vulnerability can affect a package between version numbers
+     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+     * own Detail. If a specific affected version is provided by a vulnerability
+     * database, affected_version_start and affected_version_end will be the
+     * same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + * @return Whether the affectedVersionEnd field is set. + */ + boolean hasAffectedVersionEnd(); + /** + *
+     * The version number at the end of an interval in which this vulnerability
+     * exists. A vulnerability can affect a package between version numbers
+     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+     * own Detail. If a specific affected version is provided by a vulnerability
+     * database, affected_version_start and affected_version_end will be the
+     * same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + * @return The affectedVersionEnd. + */ + io.grafeas.v1.Version getAffectedVersionEnd(); + /** + *
+     * The version number at the end of an interval in which this vulnerability
+     * exists. A vulnerability can affect a package between version numbers
+     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+     * own Detail. If a specific affected version is provided by a vulnerability
+     * database, affected_version_start and affected_version_end will be the
+     * same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + io.grafeas.v1.VersionOrBuilder getAffectedVersionEndOrBuilder(); + + /** + *
+     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+     * to update to that contains a fix for this vulnerability. It is possible
+     * for this to be different from the affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 8; + * @return The fixedCpeUri. + */ + java.lang.String getFixedCpeUri(); + /** + *
+     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+     * to update to that contains a fix for this vulnerability. It is possible
+     * for this to be different from the affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 8; + * @return The bytes for fixedCpeUri. + */ + com.google.protobuf.ByteString + getFixedCpeUriBytes(); + + /** + *
+     * The distro recommended package to update to that contains a fix for this
+     * vulnerability. It is possible for this to be different from the
+     * affected_package.
+     * 
+ * + * string fixed_package = 9; + * @return The fixedPackage. + */ + java.lang.String getFixedPackage(); + /** + *
+     * The distro recommended package to update to that contains a fix for this
+     * vulnerability. It is possible for this to be different from the
+     * affected_package.
+     * 
+ * + * string fixed_package = 9; + * @return The bytes for fixedPackage. + */ + com.google.protobuf.ByteString + getFixedPackageBytes(); + + /** + *
+     * The distro recommended version to update to that contains a
+     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+     * such version is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 10; + * @return Whether the fixedVersion field is set. + */ + boolean hasFixedVersion(); + /** + *
+     * The distro recommended version to update to that contains a
+     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+     * such version is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 10; + * @return The fixedVersion. + */ + io.grafeas.v1.Version getFixedVersion(); + /** + *
+     * The distro recommended version to update to that contains a
+     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+     * such version is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder(); + + /** + *
+     * Whether this detail is obsolete. Occurrences are expected not to point to
+     * obsolete details.
+     * 
+ * + * bool is_obsolete = 11; + * @return The isObsolete. + */ + boolean getIsObsolete(); + + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * @return Whether the sourceUpdateTime field is set. + */ + boolean hasSourceUpdateTime(); + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * @return The sourceUpdateTime. + */ + com.google.protobuf.Timestamp getSourceUpdateTime(); + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder(); + + /** + *
+     * The source from which the information in this Detail was obtained.
+     * 
+ * + * string source = 13; + * @return The source. + */ + java.lang.String getSource(); + /** + *
+     * The source from which the information in this Detail was obtained.
+     * 
+ * + * string source = 13; + * @return The bytes for source. + */ + com.google.protobuf.ByteString + getSourceBytes(); + + /** + *
+     * The name of the vendor of the product.
+     * 
+ * + * string vendor = 14; + * @return The vendor. + */ + java.lang.String getVendor(); + /** + *
+     * The name of the vendor of the product.
+     * 
+ * + * string vendor = 14; + * @return The bytes for vendor. + */ + com.google.protobuf.ByteString + getVendorBytes(); + } + /** + *
+   * A detail for a distro and package affected by this vulnerability and its
+   * associated fix (if one is available).
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityNote.Detail} + */ + public static final class Detail extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote.Detail) + DetailOrBuilder { + private static final long serialVersionUID = 0L; + // Use Detail.newBuilder() to construct. + private Detail(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Detail() { + severityName_ = ""; + description_ = ""; + packageType_ = ""; + affectedCpeUri_ = ""; + affectedPackage_ = ""; + fixedCpeUri_ = ""; + fixedPackage_ = ""; + source_ = ""; + vendor_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Detail(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.Detail.class, io.grafeas.v1.VulnerabilityNote.Detail.Builder.class); + } + + public static final int SEVERITY_NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object severityName_ = ""; + /** + *
+     * The distro assigned severity of this vulnerability.
+     * 
+ * + * string severity_name = 1; + * @return The severityName. + */ + @java.lang.Override + public java.lang.String getSeverityName() { + java.lang.Object ref = severityName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + severityName_ = s; + return s; + } + } + /** + *
+     * The distro assigned severity of this vulnerability.
+     * 
+ * + * string severity_name = 1; + * @return The bytes for severityName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSeverityNameBytes() { + java.lang.Object ref = severityName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + severityName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+     * A vendor-specific description of this vulnerability.
+     * 
+ * + * string description = 2; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+     * A vendor-specific description of this vulnerability.
+     * 
+ * + * string description = 2; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PACKAGE_TYPE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object packageType_ = ""; + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3; + * @return The packageType. + */ + @java.lang.Override + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems,
+     * node.js packages, etc.).
+     * 
+ * + * string package_type = 3; + * @return The bytes for packageType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AFFECTED_CPE_URI_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object affectedCpeUri_ = ""; + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string affected_cpe_uri = 4; + * @return The affectedCpeUri. + */ + @java.lang.Override + public java.lang.String getAffectedCpeUri() { + java.lang.Object ref = affectedCpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedCpeUri_ = s; + return s; + } + } + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string affected_cpe_uri = 4; + * @return The bytes for affectedCpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAffectedCpeUriBytes() { + java.lang.Object ref = affectedCpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AFFECTED_PACKAGE_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object affectedPackage_ = ""; + /** + *
+     * Required. The package this vulnerability affects.
+     * 
+ * + * string affected_package = 5; + * @return The affectedPackage. + */ + @java.lang.Override + public java.lang.String getAffectedPackage() { + java.lang.Object ref = affectedPackage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedPackage_ = s; + return s; + } + } + /** + *
+     * Required. The package this vulnerability affects.
+     * 
+ * + * string affected_package = 5; + * @return The bytes for affectedPackage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAffectedPackageBytes() { + java.lang.Object ref = affectedPackage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AFFECTED_VERSION_START_FIELD_NUMBER = 6; + private io.grafeas.v1.Version affectedVersionStart_; + /** + *
+     * The version number at the start of an interval in which this
+     * vulnerability exists. A vulnerability can affect a package between
+     * version numbers that are disjoint sets of intervals (example:
+     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+     * represented in its own Detail. If a specific affected version is provided
+     * by a vulnerability database, affected_version_start and
+     * affected_version_end will be the same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + * @return Whether the affectedVersionStart field is set. + */ + @java.lang.Override + public boolean hasAffectedVersionStart() { + return affectedVersionStart_ != null; + } + /** + *
+     * The version number at the start of an interval in which this
+     * vulnerability exists. A vulnerability can affect a package between
+     * version numbers that are disjoint sets of intervals (example:
+     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+     * represented in its own Detail. If a specific affected version is provided
+     * by a vulnerability database, affected_version_start and
+     * affected_version_end will be the same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + * @return The affectedVersionStart. + */ + @java.lang.Override + public io.grafeas.v1.Version getAffectedVersionStart() { + return affectedVersionStart_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; + } + /** + *
+     * The version number at the start of an interval in which this
+     * vulnerability exists. A vulnerability can affect a package between
+     * version numbers that are disjoint sets of intervals (example:
+     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+     * represented in its own Detail. If a specific affected version is provided
+     * by a vulnerability database, affected_version_start and
+     * affected_version_end will be the same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getAffectedVersionStartOrBuilder() { + return affectedVersionStart_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; + } + + public static final int AFFECTED_VERSION_END_FIELD_NUMBER = 7; + private io.grafeas.v1.Version affectedVersionEnd_; + /** + *
+     * The version number at the end of an interval in which this vulnerability
+     * exists. A vulnerability can affect a package between version numbers
+     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+     * own Detail. If a specific affected version is provided by a vulnerability
+     * database, affected_version_start and affected_version_end will be the
+     * same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + * @return Whether the affectedVersionEnd field is set. + */ + @java.lang.Override + public boolean hasAffectedVersionEnd() { + return affectedVersionEnd_ != null; + } + /** + *
+     * The version number at the end of an interval in which this vulnerability
+     * exists. A vulnerability can affect a package between version numbers
+     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+     * own Detail. If a specific affected version is provided by a vulnerability
+     * database, affected_version_start and affected_version_end will be the
+     * same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + * @return The affectedVersionEnd. + */ + @java.lang.Override + public io.grafeas.v1.Version getAffectedVersionEnd() { + return affectedVersionEnd_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; + } + /** + *
+     * The version number at the end of an interval in which this vulnerability
+     * exists. A vulnerability can affect a package between version numbers
+     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+     * own Detail. If a specific affected version is provided by a vulnerability
+     * database, affected_version_start and affected_version_end will be the
+     * same in that Detail.
+     * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getAffectedVersionEndOrBuilder() { + return affectedVersionEnd_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; + } + + public static final int FIXED_CPE_URI_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object fixedCpeUri_ = ""; + /** + *
+     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+     * to update to that contains a fix for this vulnerability. It is possible
+     * for this to be different from the affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 8; + * @return The fixedCpeUri. + */ + @java.lang.Override + public java.lang.String getFixedCpeUri() { + java.lang.Object ref = fixedCpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedCpeUri_ = s; + return s; + } + } + /** + *
+     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+     * to update to that contains a fix for this vulnerability. It is possible
+     * for this to be different from the affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 8; + * @return The bytes for fixedCpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFixedCpeUriBytes() { + java.lang.Object ref = fixedCpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIXED_PACKAGE_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private volatile java.lang.Object fixedPackage_ = ""; + /** + *
+     * The distro recommended package to update to that contains a fix for this
+     * vulnerability. It is possible for this to be different from the
+     * affected_package.
+     * 
+ * + * string fixed_package = 9; + * @return The fixedPackage. + */ + @java.lang.Override + public java.lang.String getFixedPackage() { + java.lang.Object ref = fixedPackage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedPackage_ = s; + return s; + } + } + /** + *
+     * The distro recommended package to update to that contains a fix for this
+     * vulnerability. It is possible for this to be different from the
+     * affected_package.
+     * 
+ * + * string fixed_package = 9; + * @return The bytes for fixedPackage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFixedPackageBytes() { + java.lang.Object ref = fixedPackage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIXED_VERSION_FIELD_NUMBER = 10; + private io.grafeas.v1.Version fixedVersion_; + /** + *
+     * The distro recommended version to update to that contains a
+     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+     * such version is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 10; + * @return Whether the fixedVersion field is set. + */ + @java.lang.Override + public boolean hasFixedVersion() { + return fixedVersion_ != null; + } + /** + *
+     * The distro recommended version to update to that contains a
+     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+     * such version is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 10; + * @return The fixedVersion. + */ + @java.lang.Override + public io.grafeas.v1.Version getFixedVersion() { + return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } + /** + *
+     * The distro recommended version to update to that contains a
+     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+     * such version is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { + return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } + + public static final int IS_OBSOLETE_FIELD_NUMBER = 11; + private boolean isObsolete_ = false; + /** + *
+     * Whether this detail is obsolete. Occurrences are expected not to point to
+     * obsolete details.
+     * 
+ * + * bool is_obsolete = 11; + * @return The isObsolete. + */ + @java.lang.Override + public boolean getIsObsolete() { + return isObsolete_; + } + + public static final int SOURCE_UPDATE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp sourceUpdateTime_; + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * @return Whether the sourceUpdateTime field is set. + */ + @java.lang.Override + public boolean hasSourceUpdateTime() { + return sourceUpdateTime_ != null; + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * @return The sourceUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSourceUpdateTime() { + return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { + return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } + + public static final int SOURCE_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private volatile java.lang.Object source_ = ""; + /** + *
+     * The source from which the information in this Detail was obtained.
+     * 
+ * + * string source = 13; + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } + } + /** + *
+     * The source from which the information in this Detail was obtained.
+     * 
+ * + * string source = 13; + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VENDOR_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private volatile java.lang.Object vendor_ = ""; + /** + *
+     * The name of the vendor of the product.
+     * 
+ * + * string vendor = 14; + * @return The vendor. + */ + @java.lang.Override + public java.lang.String getVendor() { + java.lang.Object ref = vendor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vendor_ = s; + return s; + } + } + /** + *
+     * The name of the vendor of the product.
+     * 
+ * + * string vendor = 14; + * @return The bytes for vendor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVendorBytes() { + java.lang.Object ref = vendor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + vendor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severityName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, severityName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, packageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, affectedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, affectedPackage_); + } + if (affectedVersionStart_ != null) { + output.writeMessage(6, getAffectedVersionStart()); + } + if (affectedVersionEnd_ != null) { + output.writeMessage(7, getAffectedVersionEnd()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, fixedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, fixedPackage_); + } + if (fixedVersion_ != null) { + output.writeMessage(10, getFixedVersion()); + } + if (isObsolete_ != false) { + output.writeBool(11, isObsolete_); + } + if (sourceUpdateTime_ != null) { + output.writeMessage(12, getSourceUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, source_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vendor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, vendor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severityName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, severityName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, packageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, affectedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, affectedPackage_); + } + if (affectedVersionStart_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getAffectedVersionStart()); + } + if (affectedVersionEnd_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getAffectedVersionEnd()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, fixedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, fixedPackage_); + } + if (fixedVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getFixedVersion()); + } + if (isObsolete_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(11, isObsolete_); + } + if (sourceUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getSourceUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, source_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vendor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, vendor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityNote.Detail)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityNote.Detail other = (io.grafeas.v1.VulnerabilityNote.Detail) obj; + + if (!getSeverityName() + .equals(other.getSeverityName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getPackageType() + .equals(other.getPackageType())) return false; + if (!getAffectedCpeUri() + .equals(other.getAffectedCpeUri())) return false; + if (!getAffectedPackage() + .equals(other.getAffectedPackage())) return false; + if (hasAffectedVersionStart() != other.hasAffectedVersionStart()) return false; + if (hasAffectedVersionStart()) { + if (!getAffectedVersionStart() + .equals(other.getAffectedVersionStart())) return false; + } + if (hasAffectedVersionEnd() != other.hasAffectedVersionEnd()) return false; + if (hasAffectedVersionEnd()) { + if (!getAffectedVersionEnd() + .equals(other.getAffectedVersionEnd())) return false; + } + if (!getFixedCpeUri() + .equals(other.getFixedCpeUri())) return false; + if (!getFixedPackage() + .equals(other.getFixedPackage())) return false; + if (hasFixedVersion() != other.hasFixedVersion()) return false; + if (hasFixedVersion()) { + if (!getFixedVersion() + .equals(other.getFixedVersion())) return false; + } + if (getIsObsolete() + != other.getIsObsolete()) return false; + if (hasSourceUpdateTime() != other.hasSourceUpdateTime()) return false; + if (hasSourceUpdateTime()) { + if (!getSourceUpdateTime() + .equals(other.getSourceUpdateTime())) return false; + } + if (!getSource() + .equals(other.getSource())) return false; + if (!getVendor() + .equals(other.getVendor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SEVERITY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getSeverityName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPackageType().hashCode(); + hash = (37 * hash) + AFFECTED_CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getAffectedCpeUri().hashCode(); + hash = (37 * hash) + AFFECTED_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getAffectedPackage().hashCode(); + if (hasAffectedVersionStart()) { + hash = (37 * hash) + AFFECTED_VERSION_START_FIELD_NUMBER; + hash = (53 * hash) + getAffectedVersionStart().hashCode(); + } + if (hasAffectedVersionEnd()) { + hash = (37 * hash) + AFFECTED_VERSION_END_FIELD_NUMBER; + hash = (53 * hash) + getAffectedVersionEnd().hashCode(); + } + hash = (37 * hash) + FIXED_CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getFixedCpeUri().hashCode(); + hash = (37 * hash) + FIXED_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getFixedPackage().hashCode(); + if (hasFixedVersion()) { + hash = (37 * hash) + FIXED_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getFixedVersion().hashCode(); + } + hash = (37 * hash) + IS_OBSOLETE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsObsolete()); + if (hasSourceUpdateTime()) { + hash = (37 * hash) + SOURCE_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSourceUpdateTime().hashCode(); + } + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + hash = (37 * hash) + VENDOR_FIELD_NUMBER; + hash = (53 * hash) + getVendor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote.Detail prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A detail for a distro and package affected by this vulnerability and its
+     * associated fix (if one is available).
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityNote.Detail} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote.Detail) + io.grafeas.v1.VulnerabilityNote.DetailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.Detail.class, io.grafeas.v1.VulnerabilityNote.Detail.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityNote.Detail.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + severityName_ = ""; + description_ = ""; + packageType_ = ""; + affectedCpeUri_ = ""; + affectedPackage_ = ""; + affectedVersionStart_ = null; + if (affectedVersionStartBuilder_ != null) { + affectedVersionStartBuilder_.dispose(); + affectedVersionStartBuilder_ = null; + } + affectedVersionEnd_ = null; + if (affectedVersionEndBuilder_ != null) { + affectedVersionEndBuilder_.dispose(); + affectedVersionEndBuilder_ = null; + } + fixedCpeUri_ = ""; + fixedPackage_ = ""; + fixedVersion_ = null; + if (fixedVersionBuilder_ != null) { + fixedVersionBuilder_.dispose(); + fixedVersionBuilder_ = null; + } + isObsolete_ = false; + sourceUpdateTime_ = null; + if (sourceUpdateTimeBuilder_ != null) { + sourceUpdateTimeBuilder_.dispose(); + sourceUpdateTimeBuilder_ = null; + } + source_ = ""; + vendor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.Detail getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.Detail build() { + io.grafeas.v1.VulnerabilityNote.Detail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.Detail buildPartial() { + io.grafeas.v1.VulnerabilityNote.Detail result = new io.grafeas.v1.VulnerabilityNote.Detail(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityNote.Detail result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.severityName_ = severityName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.packageType_ = packageType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.affectedCpeUri_ = affectedCpeUri_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.affectedPackage_ = affectedPackage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.affectedVersionStart_ = affectedVersionStartBuilder_ == null + ? affectedVersionStart_ + : affectedVersionStartBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.affectedVersionEnd_ = affectedVersionEndBuilder_ == null + ? affectedVersionEnd_ + : affectedVersionEndBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.fixedCpeUri_ = fixedCpeUri_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.fixedPackage_ = fixedPackage_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.fixedVersion_ = fixedVersionBuilder_ == null + ? fixedVersion_ + : fixedVersionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.isObsolete_ = isObsolete_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.sourceUpdateTime_ = sourceUpdateTimeBuilder_ == null + ? sourceUpdateTime_ + : sourceUpdateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.source_ = source_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.vendor_ = vendor_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityNote.Detail) { + return mergeFrom((io.grafeas.v1.VulnerabilityNote.Detail)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote.Detail other) { + if (other == io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance()) return this; + if (!other.getSeverityName().isEmpty()) { + severityName_ = other.severityName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPackageType().isEmpty()) { + packageType_ = other.packageType_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getAffectedCpeUri().isEmpty()) { + affectedCpeUri_ = other.affectedCpeUri_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getAffectedPackage().isEmpty()) { + affectedPackage_ = other.affectedPackage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasAffectedVersionStart()) { + mergeAffectedVersionStart(other.getAffectedVersionStart()); + } + if (other.hasAffectedVersionEnd()) { + mergeAffectedVersionEnd(other.getAffectedVersionEnd()); + } + if (!other.getFixedCpeUri().isEmpty()) { + fixedCpeUri_ = other.fixedCpeUri_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getFixedPackage().isEmpty()) { + fixedPackage_ = other.fixedPackage_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasFixedVersion()) { + mergeFixedVersion(other.getFixedVersion()); + } + if (other.getIsObsolete() != false) { + setIsObsolete(other.getIsObsolete()); + } + if (other.hasSourceUpdateTime()) { + mergeSourceUpdateTime(other.getSourceUpdateTime()); + } + if (!other.getSource().isEmpty()) { + source_ = other.source_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (!other.getVendor().isEmpty()) { + vendor_ = other.vendor_; + bitField0_ |= 0x00002000; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + severityName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + packageType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + affectedCpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + affectedPackage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getAffectedVersionStartFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getAffectedVersionEndFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + fixedCpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + fixedPackage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: { + input.readMessage( + getFixedVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 88: { + isObsolete_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 98: { + input.readMessage( + getSourceUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: { + vendor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 114 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object severityName_ = ""; + /** + *
+       * The distro assigned severity of this vulnerability.
+       * 
+ * + * string severity_name = 1; + * @return The severityName. + */ + public java.lang.String getSeverityName() { + java.lang.Object ref = severityName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + severityName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The distro assigned severity of this vulnerability.
+       * 
+ * + * string severity_name = 1; + * @return The bytes for severityName. + */ + public com.google.protobuf.ByteString + getSeverityNameBytes() { + java.lang.Object ref = severityName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + severityName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The distro assigned severity of this vulnerability.
+       * 
+ * + * string severity_name = 1; + * @param value The severityName to set. + * @return This builder for chaining. + */ + public Builder setSeverityName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + severityName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The distro assigned severity of this vulnerability.
+       * 
+ * + * string severity_name = 1; + * @return This builder for chaining. + */ + public Builder clearSeverityName() { + severityName_ = getDefaultInstance().getSeverityName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The distro assigned severity of this vulnerability.
+       * 
+ * + * string severity_name = 1; + * @param value The bytes for severityName to set. + * @return This builder for chaining. + */ + public Builder setSeverityNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + severityName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+       * A vendor-specific description of this vulnerability.
+       * 
+ * + * string description = 2; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A vendor-specific description of this vulnerability.
+       * 
+ * + * string description = 2; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A vendor-specific description of this vulnerability.
+       * 
+ * + * string description = 2; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * A vendor-specific description of this vulnerability.
+       * 
+ * + * string description = 2; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * A vendor-specific description of this vulnerability.
+       * 
+ * + * string description = 2; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object packageType_ = ""; + /** + *
+       * The type of package; whether native or non native (e.g., ruby gems,
+       * node.js packages, etc.).
+       * 
+ * + * string package_type = 3; + * @return The packageType. + */ + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The type of package; whether native or non native (e.g., ruby gems,
+       * node.js packages, etc.).
+       * 
+ * + * string package_type = 3; + * @return The bytes for packageType. + */ + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The type of package; whether native or non native (e.g., ruby gems,
+       * node.js packages, etc.).
+       * 
+ * + * string package_type = 3; + * @param value The packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + packageType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The type of package; whether native or non native (e.g., ruby gems,
+       * node.js packages, etc.).
+       * 
+ * + * string package_type = 3; + * @return This builder for chaining. + */ + public Builder clearPackageType() { + packageType_ = getDefaultInstance().getPackageType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * The type of package; whether native or non native (e.g., ruby gems,
+       * node.js packages, etc.).
+       * 
+ * + * string package_type = 3; + * @param value The bytes for packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + packageType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object affectedCpeUri_ = ""; + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string affected_cpe_uri = 4; + * @return The affectedCpeUri. + */ + public java.lang.String getAffectedCpeUri() { + java.lang.Object ref = affectedCpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedCpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string affected_cpe_uri = 4; + * @return The bytes for affectedCpeUri. + */ + public com.google.protobuf.ByteString + getAffectedCpeUriBytes() { + java.lang.Object ref = affectedCpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string affected_cpe_uri = 4; + * @param value The affectedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setAffectedCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + affectedCpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string affected_cpe_uri = 4; + * @return This builder for chaining. + */ + public Builder clearAffectedCpeUri() { + affectedCpeUri_ = getDefaultInstance().getAffectedCpeUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string affected_cpe_uri = 4; + * @param value The bytes for affectedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setAffectedCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + affectedCpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object affectedPackage_ = ""; + /** + *
+       * Required. The package this vulnerability affects.
+       * 
+ * + * string affected_package = 5; + * @return The affectedPackage. + */ + public java.lang.String getAffectedPackage() { + java.lang.Object ref = affectedPackage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedPackage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The package this vulnerability affects.
+       * 
+ * + * string affected_package = 5; + * @return The bytes for affectedPackage. + */ + public com.google.protobuf.ByteString + getAffectedPackageBytes() { + java.lang.Object ref = affectedPackage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The package this vulnerability affects.
+       * 
+ * + * string affected_package = 5; + * @param value The affectedPackage to set. + * @return This builder for chaining. + */ + public Builder setAffectedPackage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + affectedPackage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * Required. The package this vulnerability affects.
+       * 
+ * + * string affected_package = 5; + * @return This builder for chaining. + */ + public Builder clearAffectedPackage() { + affectedPackage_ = getDefaultInstance().getAffectedPackage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+       * Required. The package this vulnerability affects.
+       * 
+ * + * string affected_package = 5; + * @param value The bytes for affectedPackage to set. + * @return This builder for chaining. + */ + public Builder setAffectedPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + affectedPackage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private io.grafeas.v1.Version affectedVersionStart_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> affectedVersionStartBuilder_; + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + * @return Whether the affectedVersionStart field is set. + */ + public boolean hasAffectedVersionStart() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + * @return The affectedVersionStart. + */ + public io.grafeas.v1.Version getAffectedVersionStart() { + if (affectedVersionStartBuilder_ == null) { + return affectedVersionStart_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; + } else { + return affectedVersionStartBuilder_.getMessage(); + } + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + public Builder setAffectedVersionStart(io.grafeas.v1.Version value) { + if (affectedVersionStartBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + affectedVersionStart_ = value; + } else { + affectedVersionStartBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + public Builder setAffectedVersionStart( + io.grafeas.v1.Version.Builder builderForValue) { + if (affectedVersionStartBuilder_ == null) { + affectedVersionStart_ = builderForValue.build(); + } else { + affectedVersionStartBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + public Builder mergeAffectedVersionStart(io.grafeas.v1.Version value) { + if (affectedVersionStartBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + affectedVersionStart_ != null && + affectedVersionStart_ != io.grafeas.v1.Version.getDefaultInstance()) { + getAffectedVersionStartBuilder().mergeFrom(value); + } else { + affectedVersionStart_ = value; + } + } else { + affectedVersionStartBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + public Builder clearAffectedVersionStart() { + bitField0_ = (bitField0_ & ~0x00000020); + affectedVersionStart_ = null; + if (affectedVersionStartBuilder_ != null) { + affectedVersionStartBuilder_.dispose(); + affectedVersionStartBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + public io.grafeas.v1.Version.Builder getAffectedVersionStartBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getAffectedVersionStartFieldBuilder().getBuilder(); + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + public io.grafeas.v1.VersionOrBuilder getAffectedVersionStartOrBuilder() { + if (affectedVersionStartBuilder_ != null) { + return affectedVersionStartBuilder_.getMessageOrBuilder(); + } else { + return affectedVersionStart_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; + } + } + /** + *
+       * The version number at the start of an interval in which this
+       * vulnerability exists. A vulnerability can affect a package between
+       * version numbers that are disjoint sets of intervals (example:
+       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
+       * represented in its own Detail. If a specific affected version is provided
+       * by a vulnerability database, affected_version_start and
+       * affected_version_end will be the same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_start = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getAffectedVersionStartFieldBuilder() { + if (affectedVersionStartBuilder_ == null) { + affectedVersionStartBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getAffectedVersionStart(), + getParentForChildren(), + isClean()); + affectedVersionStart_ = null; + } + return affectedVersionStartBuilder_; + } + + private io.grafeas.v1.Version affectedVersionEnd_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> affectedVersionEndBuilder_; + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + * @return Whether the affectedVersionEnd field is set. + */ + public boolean hasAffectedVersionEnd() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + * @return The affectedVersionEnd. + */ + public io.grafeas.v1.Version getAffectedVersionEnd() { + if (affectedVersionEndBuilder_ == null) { + return affectedVersionEnd_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; + } else { + return affectedVersionEndBuilder_.getMessage(); + } + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + public Builder setAffectedVersionEnd(io.grafeas.v1.Version value) { + if (affectedVersionEndBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + affectedVersionEnd_ = value; + } else { + affectedVersionEndBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + public Builder setAffectedVersionEnd( + io.grafeas.v1.Version.Builder builderForValue) { + if (affectedVersionEndBuilder_ == null) { + affectedVersionEnd_ = builderForValue.build(); + } else { + affectedVersionEndBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + public Builder mergeAffectedVersionEnd(io.grafeas.v1.Version value) { + if (affectedVersionEndBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + affectedVersionEnd_ != null && + affectedVersionEnd_ != io.grafeas.v1.Version.getDefaultInstance()) { + getAffectedVersionEndBuilder().mergeFrom(value); + } else { + affectedVersionEnd_ = value; + } + } else { + affectedVersionEndBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + public Builder clearAffectedVersionEnd() { + bitField0_ = (bitField0_ & ~0x00000040); + affectedVersionEnd_ = null; + if (affectedVersionEndBuilder_ != null) { + affectedVersionEndBuilder_.dispose(); + affectedVersionEndBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + public io.grafeas.v1.Version.Builder getAffectedVersionEndBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getAffectedVersionEndFieldBuilder().getBuilder(); + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + public io.grafeas.v1.VersionOrBuilder getAffectedVersionEndOrBuilder() { + if (affectedVersionEndBuilder_ != null) { + return affectedVersionEndBuilder_.getMessageOrBuilder(); + } else { + return affectedVersionEnd_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; + } + } + /** + *
+       * The version number at the end of an interval in which this vulnerability
+       * exists. A vulnerability can affect a package between version numbers
+       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
+       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
+       * own Detail. If a specific affected version is provided by a vulnerability
+       * database, affected_version_start and affected_version_end will be the
+       * same in that Detail.
+       * 
+ * + * .grafeas.v1.Version affected_version_end = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getAffectedVersionEndFieldBuilder() { + if (affectedVersionEndBuilder_ == null) { + affectedVersionEndBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getAffectedVersionEnd(), + getParentForChildren(), + isClean()); + affectedVersionEnd_ = null; + } + return affectedVersionEndBuilder_; + } + + private java.lang.Object fixedCpeUri_ = ""; + /** + *
+       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+       * to update to that contains a fix for this vulnerability. It is possible
+       * for this to be different from the affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 8; + * @return The fixedCpeUri. + */ + public java.lang.String getFixedCpeUri() { + java.lang.Object ref = fixedCpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedCpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+       * to update to that contains a fix for this vulnerability. It is possible
+       * for this to be different from the affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 8; + * @return The bytes for fixedCpeUri. + */ + public com.google.protobuf.ByteString + getFixedCpeUriBytes() { + java.lang.Object ref = fixedCpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+       * to update to that contains a fix for this vulnerability. It is possible
+       * for this to be different from the affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 8; + * @param value The fixedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setFixedCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fixedCpeUri_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+       * to update to that contains a fix for this vulnerability. It is possible
+       * for this to be different from the affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 8; + * @return This builder for chaining. + */ + public Builder clearFixedCpeUri() { + fixedCpeUri_ = getDefaultInstance().getFixedCpeUri(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + *
+       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
+       * to update to that contains a fix for this vulnerability. It is possible
+       * for this to be different from the affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 8; + * @param value The bytes for fixedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setFixedCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fixedCpeUri_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object fixedPackage_ = ""; + /** + *
+       * The distro recommended package to update to that contains a fix for this
+       * vulnerability. It is possible for this to be different from the
+       * affected_package.
+       * 
+ * + * string fixed_package = 9; + * @return The fixedPackage. + */ + public java.lang.String getFixedPackage() { + java.lang.Object ref = fixedPackage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedPackage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The distro recommended package to update to that contains a fix for this
+       * vulnerability. It is possible for this to be different from the
+       * affected_package.
+       * 
+ * + * string fixed_package = 9; + * @return The bytes for fixedPackage. + */ + public com.google.protobuf.ByteString + getFixedPackageBytes() { + java.lang.Object ref = fixedPackage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The distro recommended package to update to that contains a fix for this
+       * vulnerability. It is possible for this to be different from the
+       * affected_package.
+       * 
+ * + * string fixed_package = 9; + * @param value The fixedPackage to set. + * @return This builder for chaining. + */ + public Builder setFixedPackage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fixedPackage_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+       * The distro recommended package to update to that contains a fix for this
+       * vulnerability. It is possible for this to be different from the
+       * affected_package.
+       * 
+ * + * string fixed_package = 9; + * @return This builder for chaining. + */ + public Builder clearFixedPackage() { + fixedPackage_ = getDefaultInstance().getFixedPackage(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+       * The distro recommended package to update to that contains a fix for this
+       * vulnerability. It is possible for this to be different from the
+       * affected_package.
+       * 
+ * + * string fixed_package = 9; + * @param value The bytes for fixedPackage to set. + * @return This builder for chaining. + */ + public Builder setFixedPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fixedPackage_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private io.grafeas.v1.Version fixedVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> fixedVersionBuilder_; + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + * @return Whether the fixedVersion field is set. + */ + public boolean hasFixedVersion() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + * @return The fixedVersion. + */ + public io.grafeas.v1.Version getFixedVersion() { + if (fixedVersionBuilder_ == null) { + return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } else { + return fixedVersionBuilder_.getMessage(); + } + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + public Builder setFixedVersion(io.grafeas.v1.Version value) { + if (fixedVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fixedVersion_ = value; + } else { + fixedVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + public Builder setFixedVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (fixedVersionBuilder_ == null) { + fixedVersion_ = builderForValue.build(); + } else { + fixedVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + public Builder mergeFixedVersion(io.grafeas.v1.Version value) { + if (fixedVersionBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) && + fixedVersion_ != null && + fixedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { + getFixedVersionBuilder().mergeFrom(value); + } else { + fixedVersion_ = value; + } + } else { + fixedVersionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + public Builder clearFixedVersion() { + bitField0_ = (bitField0_ & ~0x00000200); + fixedVersion_ = null; + if (fixedVersionBuilder_ != null) { + fixedVersionBuilder_.dispose(); + fixedVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + public io.grafeas.v1.Version.Builder getFixedVersionBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getFixedVersionFieldBuilder().getBuilder(); + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { + if (fixedVersionBuilder_ != null) { + return fixedVersionBuilder_.getMessageOrBuilder(); + } else { + return fixedVersion_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } + } + /** + *
+       * The distro recommended version to update to that contains a
+       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
+       * such version is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getFixedVersionFieldBuilder() { + if (fixedVersionBuilder_ == null) { + fixedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getFixedVersion(), + getParentForChildren(), + isClean()); + fixedVersion_ = null; + } + return fixedVersionBuilder_; + } + + private boolean isObsolete_ ; + /** + *
+       * Whether this detail is obsolete. Occurrences are expected not to point to
+       * obsolete details.
+       * 
+ * + * bool is_obsolete = 11; + * @return The isObsolete. + */ + @java.lang.Override + public boolean getIsObsolete() { + return isObsolete_; + } + /** + *
+       * Whether this detail is obsolete. Occurrences are expected not to point to
+       * obsolete details.
+       * 
+ * + * bool is_obsolete = 11; + * @param value The isObsolete to set. + * @return This builder for chaining. + */ + public Builder setIsObsolete(boolean value) { + + isObsolete_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+       * Whether this detail is obsolete. Occurrences are expected not to point to
+       * obsolete details.
+       * 
+ * + * bool is_obsolete = 11; + * @return This builder for chaining. + */ + public Builder clearIsObsolete() { + bitField0_ = (bitField0_ & ~0x00000400); + isObsolete_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp sourceUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> sourceUpdateTimeBuilder_; + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * @return Whether the sourceUpdateTime field is set. + */ + public boolean hasSourceUpdateTime() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * @return The sourceUpdateTime. + */ + public com.google.protobuf.Timestamp getSourceUpdateTime() { + if (sourceUpdateTimeBuilder_ == null) { + return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } else { + return sourceUpdateTimeBuilder_.getMessage(); + } + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public Builder setSourceUpdateTime(com.google.protobuf.Timestamp value) { + if (sourceUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceUpdateTime_ = value; + } else { + sourceUpdateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public Builder setSourceUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTime_ = builderForValue.build(); + } else { + sourceUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public Builder mergeSourceUpdateTime(com.google.protobuf.Timestamp value) { + if (sourceUpdateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) && + sourceUpdateTime_ != null && + sourceUpdateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getSourceUpdateTimeBuilder().mergeFrom(value); + } else { + sourceUpdateTime_ = value; + } + } else { + sourceUpdateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public Builder clearSourceUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000800); + sourceUpdateTime_ = null; + if (sourceUpdateTimeBuilder_ != null) { + sourceUpdateTimeBuilder_.dispose(); + sourceUpdateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public com.google.protobuf.Timestamp.Builder getSourceUpdateTimeBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getSourceUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { + if (sourceUpdateTimeBuilder_ != null) { + return sourceUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return sourceUpdateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } + } + /** + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getSourceUpdateTimeFieldBuilder() { + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getSourceUpdateTime(), + getParentForChildren(), + isClean()); + sourceUpdateTime_ = null; + } + return sourceUpdateTimeBuilder_; + } + + private java.lang.Object source_ = ""; + /** + *
+       * The source from which the information in this Detail was obtained.
+       * 
+ * + * string source = 13; + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The source from which the information in this Detail was obtained.
+       * 
+ * + * string source = 13; + * @return The bytes for source. + */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The source from which the information in this Detail was obtained.
+       * 
+ * + * string source = 13; + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + source_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+       * The source from which the information in this Detail was obtained.
+       * 
+ * + * string source = 13; + * @return This builder for chaining. + */ + public Builder clearSource() { + source_ = getDefaultInstance().getSource(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + *
+       * The source from which the information in this Detail was obtained.
+       * 
+ * + * string source = 13; + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + source_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private java.lang.Object vendor_ = ""; + /** + *
+       * The name of the vendor of the product.
+       * 
+ * + * string vendor = 14; + * @return The vendor. + */ + public java.lang.String getVendor() { + java.lang.Object ref = vendor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vendor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the vendor of the product.
+       * 
+ * + * string vendor = 14; + * @return The bytes for vendor. + */ + public com.google.protobuf.ByteString + getVendorBytes() { + java.lang.Object ref = vendor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + vendor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the vendor of the product.
+       * 
+ * + * string vendor = 14; + * @param value The vendor to set. + * @return This builder for chaining. + */ + public Builder setVendor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + vendor_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+       * The name of the vendor of the product.
+       * 
+ * + * string vendor = 14; + * @return This builder for chaining. + */ + public Builder clearVendor() { + vendor_ = getDefaultInstance().getVendor(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + *
+       * The name of the vendor of the product.
+       * 
+ * + * string vendor = 14; + * @param value The bytes for vendor to set. + * @return This builder for chaining. + */ + public Builder setVendorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + vendor_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote.Detail) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote.Detail) + private static final io.grafeas.v1.VulnerabilityNote.Detail DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote.Detail(); + } + + public static io.grafeas.v1.VulnerabilityNote.Detail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Detail parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.Detail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WindowsDetailOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote.WindowsDetail) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + java.lang.String getCpeUri(); + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + com.google.protobuf.ByteString + getCpeUriBytes(); + + /** + *
+     * Required. The name of this vulnerability.
+     * 
+ * + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Required. The name of this vulnerability.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * The description of this vulnerability.
+     * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+     * The description of this vulnerability.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + java.util.List + getFixingKbsList(); + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getFixingKbs(int index); + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + int getFixingKbsCount(); + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + java.util.List + getFixingKbsOrBuilderList(); + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder getFixingKbsOrBuilder( + int index); + } + /** + * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail} + */ + public static final class WindowsDetail extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote.WindowsDetail) + WindowsDetailOrBuilder { + private static final long serialVersionUID = 0L; + // Use WindowsDetail.newBuilder() to construct. + private WindowsDetail(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WindowsDetail() { + cpeUri_ = ""; + name_ = ""; + description_ = ""; + fixingKbs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WindowsDetail(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder.class); + } + + public interface KnowledgeBaseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+       * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+       * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+       * A link to the KB in the [Windows update catalog]
+       * (https://www.catalog.update.microsoft.com/).
+       * 
+ * + * string url = 2; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+       * A link to the KB in the [Windows update catalog]
+       * (https://www.catalog.update.microsoft.com/).
+       * 
+ * + * string url = 2; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + } + /** + * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} + */ + public static final class KnowledgeBase extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) + KnowledgeBaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use KnowledgeBase.newBuilder() to construct. + private KnowledgeBase(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KnowledgeBase() { + name_ = ""; + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KnowledgeBase(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+       * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+       * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+       * A link to the KB in the [Windows update catalog]
+       * (https://www.catalog.update.microsoft.com/).
+       * 
+ * + * string url = 2; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+       * A link to the KB in the [Windows update catalog]
+       * (https://www.catalog.update.microsoft.com/).
+       * 
+ * + * string url = 2; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase other = (io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + url_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase build() { + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase buildPartial() { + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase result = new io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.url_ = url_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) { + return mergeFrom((io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase other) { + if (other == io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+         * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+         * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+         * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+         * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
+         * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+         * A link to the KB in the [Windows update catalog]
+         * (https://www.catalog.update.microsoft.com/).
+         * 
+ * + * string url = 2; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+         * A link to the KB in the [Windows update catalog]
+         * (https://www.catalog.update.microsoft.com/).
+         * 
+ * + * string url = 2; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+         * A link to the KB in the [Windows update catalog]
+         * (https://www.catalog.update.microsoft.com/).
+         * 
+ * + * string url = 2; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+         * A link to the KB in the [Windows update catalog]
+         * (https://www.catalog.update.microsoft.com/).
+         * 
+ * + * string url = 2; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+         * A link to the KB in the [Windows update catalog]
+         * (https://www.catalog.update.microsoft.com/).
+         * 
+ * + * string url = 2; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) + private static final io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase(); + } + + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KnowledgeBase parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int CPE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cpeUri_ = ""; + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + @java.lang.Override + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } + } + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability affects.
+     * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+     * Required. The name of this vulnerability.
+     * 
+ * + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+     * Required. The name of this vulnerability.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+     * The description of this vulnerability.
+     * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+     * The description of this vulnerability.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIXING_KBS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List fixingKbs_; + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + @java.lang.Override + public java.util.List getFixingKbsList() { + return fixingKbs_; + } + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + @java.lang.Override + public java.util.List + getFixingKbsOrBuilderList() { + return fixingKbs_; + } + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + @java.lang.Override + public int getFixingKbsCount() { + return fixingKbs_.size(); + } + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getFixingKbs(int index) { + return fixingKbs_.get(index); + } + /** + *
+     * Required. The names of the KBs which have hotfixes to mitigate this
+     * vulnerability. Note that there may be multiple hotfixes (and thus
+     * multiple KBs) that mitigate a given vulnerability. Currently any listed
+     * KBs presence is considered a fix.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder getFixingKbsOrBuilder( + int index) { + return fixingKbs_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + for (int i = 0; i < fixingKbs_.size(); i++) { + output.writeMessage(4, fixingKbs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + for (int i = 0; i < fixingKbs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, fixingKbs_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityNote.WindowsDetail other = (io.grafeas.v1.VulnerabilityNote.WindowsDetail) obj; + + if (!getCpeUri() + .equals(other.getCpeUri())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getFixingKbsList() + .equals(other.getFixingKbsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCpeUri().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getFixingKbsCount() > 0) { + hash = (37 * hash) + FIXING_KBS_FIELD_NUMBER; + hash = (53 * hash) + getFixingKbsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote.WindowsDetail prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote.WindowsDetail) + io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityNote.WindowsDetail.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cpeUri_ = ""; + name_ = ""; + description_ = ""; + if (fixingKbsBuilder_ == null) { + fixingKbs_ = java.util.Collections.emptyList(); + } else { + fixingKbs_ = null; + fixingKbsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail build() { + io.grafeas.v1.VulnerabilityNote.WindowsDetail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail buildPartial() { + io.grafeas.v1.VulnerabilityNote.WindowsDetail result = new io.grafeas.v1.VulnerabilityNote.WindowsDetail(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityNote.WindowsDetail result) { + if (fixingKbsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + fixingKbs_ = java.util.Collections.unmodifiableList(fixingKbs_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.fixingKbs_ = fixingKbs_; + } else { + result.fixingKbs_ = fixingKbsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityNote.WindowsDetail result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cpeUri_ = cpeUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail) { + return mergeFrom((io.grafeas.v1.VulnerabilityNote.WindowsDetail)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote.WindowsDetail other) { + if (other == io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance()) return this; + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (fixingKbsBuilder_ == null) { + if (!other.fixingKbs_.isEmpty()) { + if (fixingKbs_.isEmpty()) { + fixingKbs_ = other.fixingKbs_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureFixingKbsIsMutable(); + fixingKbs_.addAll(other.fixingKbs_); + } + onChanged(); + } + } else { + if (!other.fixingKbs_.isEmpty()) { + if (fixingKbsBuilder_.isEmpty()) { + fixingKbsBuilder_.dispose(); + fixingKbsBuilder_ = null; + fixingKbs_ = other.fixingKbs_; + bitField0_ = (bitField0_ & ~0x00000008); + fixingKbsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFixingKbsFieldBuilder() : null; + } else { + fixingKbsBuilder_.addAllMessages(other.fixingKbs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase m = + input.readMessage( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.parser(), + extensionRegistry); + if (fixingKbsBuilder_ == null) { + ensureFixingKbsIsMutable(); + fixingKbs_.add(m); + } else { + fixingKbsBuilder_.addMessage(m); + } + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cpeUri_ = ""; + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string cpe_uri = 1; + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string cpe_uri = 1; + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString + getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string cpe_uri = 1; + * @param value The cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string cpe_uri = 1; + * @return This builder for chaining. + */ + public Builder clearCpeUri() { + cpeUri_ = getDefaultInstance().getCpeUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability affects.
+       * 
+ * + * string cpe_uri = 1; + * @param value The bytes for cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Required. The name of this vulnerability.
+       * 
+ * + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The name of this vulnerability.
+       * 
+ * + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The name of this vulnerability.
+       * 
+ * + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Required. The name of this vulnerability.
+       * 
+ * + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * Required. The name of this vulnerability.
+       * 
+ * + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+       * The description of this vulnerability.
+       * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The description of this vulnerability.
+       * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The description of this vulnerability.
+       * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The description of this vulnerability.
+       * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * The description of this vulnerability.
+       * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List fixingKbs_ = + java.util.Collections.emptyList(); + private void ensureFixingKbsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + fixingKbs_ = new java.util.ArrayList(fixingKbs_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder> fixingKbsBuilder_; + + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public java.util.List getFixingKbsList() { + if (fixingKbsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fixingKbs_); + } else { + return fixingKbsBuilder_.getMessageList(); + } + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public int getFixingKbsCount() { + if (fixingKbsBuilder_ == null) { + return fixingKbs_.size(); + } else { + return fixingKbsBuilder_.getCount(); + } + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getFixingKbs(int index) { + if (fixingKbsBuilder_ == null) { + return fixingKbs_.get(index); + } else { + return fixingKbsBuilder_.getMessage(index); + } + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder setFixingKbs( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase value) { + if (fixingKbsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFixingKbsIsMutable(); + fixingKbs_.set(index, value); + onChanged(); + } else { + fixingKbsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder setFixingKbs( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder builderForValue) { + if (fixingKbsBuilder_ == null) { + ensureFixingKbsIsMutable(); + fixingKbs_.set(index, builderForValue.build()); + onChanged(); + } else { + fixingKbsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder addFixingKbs(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase value) { + if (fixingKbsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFixingKbsIsMutable(); + fixingKbs_.add(value); + onChanged(); + } else { + fixingKbsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder addFixingKbs( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase value) { + if (fixingKbsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFixingKbsIsMutable(); + fixingKbs_.add(index, value); + onChanged(); + } else { + fixingKbsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder addFixingKbs( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder builderForValue) { + if (fixingKbsBuilder_ == null) { + ensureFixingKbsIsMutable(); + fixingKbs_.add(builderForValue.build()); + onChanged(); + } else { + fixingKbsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder addFixingKbs( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder builderForValue) { + if (fixingKbsBuilder_ == null) { + ensureFixingKbsIsMutable(); + fixingKbs_.add(index, builderForValue.build()); + onChanged(); + } else { + fixingKbsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder addAllFixingKbs( + java.lang.Iterable values) { + if (fixingKbsBuilder_ == null) { + ensureFixingKbsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fixingKbs_); + onChanged(); + } else { + fixingKbsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder clearFixingKbs() { + if (fixingKbsBuilder_ == null) { + fixingKbs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + fixingKbsBuilder_.clear(); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public Builder removeFixingKbs(int index) { + if (fixingKbsBuilder_ == null) { + ensureFixingKbsIsMutable(); + fixingKbs_.remove(index); + onChanged(); + } else { + fixingKbsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder getFixingKbsBuilder( + int index) { + return getFixingKbsFieldBuilder().getBuilder(index); + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder getFixingKbsOrBuilder( + int index) { + if (fixingKbsBuilder_ == null) { + return fixingKbs_.get(index); } else { + return fixingKbsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public java.util.List + getFixingKbsOrBuilderList() { + if (fixingKbsBuilder_ != null) { + return fixingKbsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fixingKbs_); + } + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder addFixingKbsBuilder() { + return getFixingKbsFieldBuilder().addBuilder( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance()); + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder addFixingKbsBuilder( + int index) { + return getFixingKbsFieldBuilder().addBuilder( + index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance()); + } + /** + *
+       * Required. The names of the KBs which have hotfixes to mitigate this
+       * vulnerability. Note that there may be multiple hotfixes (and thus
+       * multiple KBs) that mitigate a given vulnerability. Currently any listed
+       * KBs presence is considered a fix.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + public java.util.List + getFixingKbsBuilderList() { + return getFixingKbsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder> + getFixingKbsFieldBuilder() { + if (fixingKbsBuilder_ == null) { + fixingKbsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder>( + fixingKbs_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + fixingKbs_ = null; + } + return fixingKbsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote.WindowsDetail) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote.WindowsDetail) + private static final io.grafeas.v1.VulnerabilityNote.WindowsDetail DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote.WindowsDetail(); + } + + public static io.grafeas.v1.VulnerabilityNote.WindowsDetail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WindowsDetail parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int CVSS_SCORE_FIELD_NUMBER = 1; + private float cvssScore_ = 0F; + /** + *
+   * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
+   * where 0 indicates low severity and 10 indicates high severity.
+   * 
+ * + * float cvss_score = 1; + * @return The cvssScore. + */ + @java.lang.Override + public float getCvssScore() { + return cvssScore_; + } + + public static final int SEVERITY_FIELD_NUMBER = 2; + private int severity_ = 0; + /** + *
+   * The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override public int getSeverityValue() { + return severity_; + } + /** + *
+   * The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + @java.lang.Override public io.grafeas.v1.Severity getSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + + public static final int DETAILS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List details_; + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + @java.lang.Override + public java.util.List getDetailsList() { + return details_; + } + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + @java.lang.Override + public java.util.List + getDetailsOrBuilderList() { + return details_; + } + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + @java.lang.Override + public int getDetailsCount() { + return details_.size(); + } + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.Detail getDetails(int index) { + return details_.get(index); + } + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.DetailOrBuilder getDetailsOrBuilder( + int index) { + return details_.get(index); + } + + public static final int CVSS_V3_FIELD_NUMBER = 4; + private io.grafeas.v1.CVSSv3 cvssV3_; + /** + *
+   * The full description of the CVSSv3 for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + * @return Whether the cvssV3 field is set. + */ + @java.lang.Override + public boolean hasCvssV3() { + return cvssV3_ != null; + } + /** + *
+   * The full description of the CVSSv3 for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + * @return The cvssV3. + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3 getCvssV3() { + return cvssV3_ == null ? io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; + } + /** + *
+   * The full description of the CVSSv3 for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + @java.lang.Override + public io.grafeas.v1.CVSSv3OrBuilder getCvssV3OrBuilder() { + return cvssV3_ == null ? io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; + } + + public static final int WINDOWS_DETAILS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List windowsDetails_; + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + @java.lang.Override + public java.util.List getWindowsDetailsList() { + return windowsDetails_; + } + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + @java.lang.Override + public java.util.List + getWindowsDetailsOrBuilderList() { + return windowsDetails_; + } + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + @java.lang.Override + public int getWindowsDetailsCount() { + return windowsDetails_.size(); + } + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetail getWindowsDetails(int index) { + return windowsDetails_.get(index); + } + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder getWindowsDetailsOrBuilder( + int index) { + return windowsDetails_.get(index); + } + + public static final int SOURCE_UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp sourceUpdateTime_; + /** + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * @return Whether the sourceUpdateTime field is set. + */ + @java.lang.Override + public boolean hasSourceUpdateTime() { + return sourceUpdateTime_ != null; + } + /** + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * @return The sourceUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSourceUpdateTime() { + return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } + /** + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { + return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } + + public static final int CVSS_VERSION_FIELD_NUMBER = 7; + private int cvssVersion_ = 0; + /** + *
+   * CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @return The enum numeric value on the wire for cvssVersion. + */ + @java.lang.Override public int getCvssVersionValue() { + return cvssVersion_; + } + /** + *
+   * CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @return The cvssVersion. + */ + @java.lang.Override public io.grafeas.v1.CVSSVersion getCvssVersion() { + io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); + return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; + } + + public static final int CVSS_V2_FIELD_NUMBER = 8; + private io.grafeas.v1.CVSS cvssV2_; + /** + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * @return Whether the cvssV2 field is set. + */ + @java.lang.Override + public boolean hasCvssV2() { + return cvssV2_ != null; + } + /** + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * @return The cvssV2. + */ + @java.lang.Override + public io.grafeas.v1.CVSS getCvssV2() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + /** + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + @java.lang.Override + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { + output.writeFloat(1, cvssScore_); + } + if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + output.writeEnum(2, severity_); + } + for (int i = 0; i < details_.size(); i++) { + output.writeMessage(3, details_.get(i)); + } + if (cvssV3_ != null) { + output.writeMessage(4, getCvssV3()); + } + for (int i = 0; i < windowsDetails_.size(); i++) { + output.writeMessage(5, windowsDetails_.get(i)); + } + if (sourceUpdateTime_ != null) { + output.writeMessage(6, getSourceUpdateTime()); + } + if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { + output.writeEnum(7, cvssVersion_); + } + if (cvssV2_ != null) { + output.writeMessage(8, getCvssV2()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, cvssScore_); + } + if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, severity_); + } + for (int i = 0; i < details_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, details_.get(i)); + } + if (cvssV3_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCvssV3()); + } + for (int i = 0; i < windowsDetails_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, windowsDetails_.get(i)); + } + if (sourceUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getSourceUpdateTime()); + } + if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, cvssVersion_); + } + if (cvssV2_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getCvssV2()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityNote)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityNote other = (io.grafeas.v1.VulnerabilityNote) obj; + + if (java.lang.Float.floatToIntBits(getCvssScore()) + != java.lang.Float.floatToIntBits( + other.getCvssScore())) return false; + if (severity_ != other.severity_) return false; + if (!getDetailsList() + .equals(other.getDetailsList())) return false; + if (hasCvssV3() != other.hasCvssV3()) return false; + if (hasCvssV3()) { + if (!getCvssV3() + .equals(other.getCvssV3())) return false; + } + if (!getWindowsDetailsList() + .equals(other.getWindowsDetailsList())) return false; + if (hasSourceUpdateTime() != other.hasSourceUpdateTime()) return false; + if (hasSourceUpdateTime()) { + if (!getSourceUpdateTime() + .equals(other.getSourceUpdateTime())) return false; + } + if (cvssVersion_ != other.cvssVersion_) return false; + if (hasCvssV2() != other.hasCvssV2()) return false; + if (hasCvssV2()) { + if (!getCvssV2() + .equals(other.getCvssV2())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CVSS_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getCvssScore()); + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + severity_; + if (getDetailsCount() > 0) { + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetailsList().hashCode(); + } + if (hasCvssV3()) { + hash = (37 * hash) + CVSS_V3_FIELD_NUMBER; + hash = (53 * hash) + getCvssV3().hashCode(); + } + if (getWindowsDetailsCount() > 0) { + hash = (37 * hash) + WINDOWS_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getWindowsDetailsList().hashCode(); + } + if (hasSourceUpdateTime()) { + hash = (37 * hash) + SOURCE_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSourceUpdateTime().hashCode(); + } + hash = (37 * hash) + CVSS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + cvssVersion_; + if (hasCvssV2()) { + hash = (37 * hash) + CVSS_V2_FIELD_NUMBER; + hash = (53 * hash) + getCvssV2().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityNote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A security vulnerability that can be found in resources.
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityNote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote) + io.grafeas.v1.VulnerabilityNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityNote.class, io.grafeas.v1.VulnerabilityNote.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityNote.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cvssScore_ = 0F; + severity_ = 0; + if (detailsBuilder_ == null) { + details_ = java.util.Collections.emptyList(); + } else { + details_ = null; + detailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + cvssV3_ = null; + if (cvssV3Builder_ != null) { + cvssV3Builder_.dispose(); + cvssV3Builder_ = null; + } + if (windowsDetailsBuilder_ == null) { + windowsDetails_ = java.util.Collections.emptyList(); + } else { + windowsDetails_ = null; + windowsDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + sourceUpdateTime_ = null; + if (sourceUpdateTimeBuilder_ != null) { + sourceUpdateTimeBuilder_.dispose(); + sourceUpdateTimeBuilder_ = null; + } + cvssVersion_ = 0; + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote build() { + io.grafeas.v1.VulnerabilityNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote buildPartial() { + io.grafeas.v1.VulnerabilityNote result = new io.grafeas.v1.VulnerabilityNote(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityNote result) { + if (detailsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + details_ = java.util.Collections.unmodifiableList(details_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.details_ = details_; + } else { + result.details_ = detailsBuilder_.build(); + } + if (windowsDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + windowsDetails_ = java.util.Collections.unmodifiableList(windowsDetails_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.windowsDetails_ = windowsDetails_; + } else { + result.windowsDetails_ = windowsDetailsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cvssScore_ = cvssScore_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.severity_ = severity_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cvssV3_ = cvssV3Builder_ == null + ? cvssV3_ + : cvssV3Builder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.sourceUpdateTime_ = sourceUpdateTimeBuilder_ == null + ? sourceUpdateTime_ + : sourceUpdateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.cvssVersion_ = cvssVersion_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.cvssV2_ = cvssV2Builder_ == null + ? cvssV2_ + : cvssV2Builder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityNote) { + return mergeFrom((io.grafeas.v1.VulnerabilityNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote other) { + if (other == io.grafeas.v1.VulnerabilityNote.getDefaultInstance()) return this; + if (other.getCvssScore() != 0F) { + setCvssScore(other.getCvssScore()); + } + if (other.severity_ != 0) { + setSeverityValue(other.getSeverityValue()); + } + if (detailsBuilder_ == null) { + if (!other.details_.isEmpty()) { + if (details_.isEmpty()) { + details_ = other.details_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDetailsIsMutable(); + details_.addAll(other.details_); + } + onChanged(); + } + } else { + if (!other.details_.isEmpty()) { + if (detailsBuilder_.isEmpty()) { + detailsBuilder_.dispose(); + detailsBuilder_ = null; + details_ = other.details_; + bitField0_ = (bitField0_ & ~0x00000004); + detailsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDetailsFieldBuilder() : null; + } else { + detailsBuilder_.addAllMessages(other.details_); + } + } + } + if (other.hasCvssV3()) { + mergeCvssV3(other.getCvssV3()); + } + if (windowsDetailsBuilder_ == null) { + if (!other.windowsDetails_.isEmpty()) { + if (windowsDetails_.isEmpty()) { + windowsDetails_ = other.windowsDetails_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureWindowsDetailsIsMutable(); + windowsDetails_.addAll(other.windowsDetails_); + } + onChanged(); + } + } else { + if (!other.windowsDetails_.isEmpty()) { + if (windowsDetailsBuilder_.isEmpty()) { + windowsDetailsBuilder_.dispose(); + windowsDetailsBuilder_ = null; + windowsDetails_ = other.windowsDetails_; + bitField0_ = (bitField0_ & ~0x00000010); + windowsDetailsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWindowsDetailsFieldBuilder() : null; + } else { + windowsDetailsBuilder_.addAllMessages(other.windowsDetails_); + } + } + } + if (other.hasSourceUpdateTime()) { + mergeSourceUpdateTime(other.getSourceUpdateTime()); + } + if (other.cvssVersion_ != 0) { + setCvssVersionValue(other.getCvssVersionValue()); + } + if (other.hasCvssV2()) { + mergeCvssV2(other.getCvssV2()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + cvssScore_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 16: { + severity_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + io.grafeas.v1.VulnerabilityNote.Detail m = + input.readMessage( + io.grafeas.v1.VulnerabilityNote.Detail.parser(), + extensionRegistry); + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.add(m); + } else { + detailsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: { + input.readMessage( + getCvssV3FieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + io.grafeas.v1.VulnerabilityNote.WindowsDetail m = + input.readMessage( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.parser(), + extensionRegistry); + if (windowsDetailsBuilder_ == null) { + ensureWindowsDetailsIsMutable(); + windowsDetails_.add(m); + } else { + windowsDetailsBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: { + input.readMessage( + getSourceUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + cvssVersion_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + input.readMessage( + getCvssV2FieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private float cvssScore_ ; + /** + *
+     * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
+     * where 0 indicates low severity and 10 indicates high severity.
+     * 
+ * + * float cvss_score = 1; + * @return The cvssScore. + */ + @java.lang.Override + public float getCvssScore() { + return cvssScore_; + } + /** + *
+     * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
+     * where 0 indicates low severity and 10 indicates high severity.
+     * 
+ * + * float cvss_score = 1; + * @param value The cvssScore to set. + * @return This builder for chaining. + */ + public Builder setCvssScore(float value) { + + cvssScore_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
+     * where 0 indicates low severity and 10 indicates high severity.
+     * 
+ * + * float cvss_score = 1; + * @return This builder for chaining. + */ + public Builder clearCvssScore() { + bitField0_ = (bitField0_ & ~0x00000001); + cvssScore_ = 0F; + onChanged(); + return this; + } + + private int severity_ = 0; + /** + *
+     * The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override public int getSeverityValue() { + return severity_; + } + /** + *
+     * The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @param value The enum numeric value on the wire for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityValue(int value) { + severity_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + @java.lang.Override + public io.grafeas.v1.Severity getSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + /** + *
+     * The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity(io.grafeas.v1.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + severity_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return This builder for chaining. + */ + public Builder clearSeverity() { + bitField0_ = (bitField0_ & ~0x00000002); + severity_ = 0; + onChanged(); + return this; + } + + private java.util.List details_ = + java.util.Collections.emptyList(); + private void ensureDetailsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + details_ = new java.util.ArrayList(details_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.Detail, io.grafeas.v1.VulnerabilityNote.Detail.Builder, io.grafeas.v1.VulnerabilityNote.DetailOrBuilder> detailsBuilder_; + + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public java.util.List getDetailsList() { + if (detailsBuilder_ == null) { + return java.util.Collections.unmodifiableList(details_); + } else { + return detailsBuilder_.getMessageList(); + } + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public int getDetailsCount() { + if (detailsBuilder_ == null) { + return details_.size(); + } else { + return detailsBuilder_.getCount(); + } + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public io.grafeas.v1.VulnerabilityNote.Detail getDetails(int index) { + if (detailsBuilder_ == null) { + return details_.get(index); + } else { + return detailsBuilder_.getMessage(index); + } + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder setDetails( + int index, io.grafeas.v1.VulnerabilityNote.Detail value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetailsIsMutable(); + details_.set(index, value); + onChanged(); + } else { + detailsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder setDetails( + int index, io.grafeas.v1.VulnerabilityNote.Detail.Builder builderForValue) { + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.set(index, builderForValue.build()); + onChanged(); + } else { + detailsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder addDetails(io.grafeas.v1.VulnerabilityNote.Detail value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetailsIsMutable(); + details_.add(value); + onChanged(); + } else { + detailsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder addDetails( + int index, io.grafeas.v1.VulnerabilityNote.Detail value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetailsIsMutable(); + details_.add(index, value); + onChanged(); + } else { + detailsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder addDetails( + io.grafeas.v1.VulnerabilityNote.Detail.Builder builderForValue) { + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.add(builderForValue.build()); + onChanged(); + } else { + detailsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder addDetails( + int index, io.grafeas.v1.VulnerabilityNote.Detail.Builder builderForValue) { + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.add(index, builderForValue.build()); + onChanged(); + } else { + detailsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder addAllDetails( + java.lang.Iterable values) { + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, details_); + onChanged(); + } else { + detailsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder clearDetails() { + if (detailsBuilder_ == null) { + details_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + detailsBuilder_.clear(); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public Builder removeDetails(int index) { + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.remove(index); + onChanged(); + } else { + detailsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public io.grafeas.v1.VulnerabilityNote.Detail.Builder getDetailsBuilder( + int index) { + return getDetailsFieldBuilder().getBuilder(index); + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public io.grafeas.v1.VulnerabilityNote.DetailOrBuilder getDetailsOrBuilder( + int index) { + if (detailsBuilder_ == null) { + return details_.get(index); } else { + return detailsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public java.util.List + getDetailsOrBuilderList() { + if (detailsBuilder_ != null) { + return detailsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(details_); + } + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public io.grafeas.v1.VulnerabilityNote.Detail.Builder addDetailsBuilder() { + return getDetailsFieldBuilder().addBuilder( + io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance()); + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public io.grafeas.v1.VulnerabilityNote.Detail.Builder addDetailsBuilder( + int index) { + return getDetailsFieldBuilder().addBuilder( + index, io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance()); + } + /** + *
+     * Details of all known distros and packages affected by this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + public java.util.List + getDetailsBuilderList() { + return getDetailsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.Detail, io.grafeas.v1.VulnerabilityNote.Detail.Builder, io.grafeas.v1.VulnerabilityNote.DetailOrBuilder> + getDetailsFieldBuilder() { + if (detailsBuilder_ == null) { + detailsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.Detail, io.grafeas.v1.VulnerabilityNote.Detail.Builder, io.grafeas.v1.VulnerabilityNote.DetailOrBuilder>( + details_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + details_ = null; + } + return detailsBuilder_; + } + + private io.grafeas.v1.CVSSv3 cvssV3_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSSv3, io.grafeas.v1.CVSSv3.Builder, io.grafeas.v1.CVSSv3OrBuilder> cvssV3Builder_; + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + * @return Whether the cvssV3 field is set. + */ + public boolean hasCvssV3() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + * @return The cvssV3. + */ + public io.grafeas.v1.CVSSv3 getCvssV3() { + if (cvssV3Builder_ == null) { + return cvssV3_ == null ? io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; + } else { + return cvssV3Builder_.getMessage(); + } + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + public Builder setCvssV3(io.grafeas.v1.CVSSv3 value) { + if (cvssV3Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cvssV3_ = value; + } else { + cvssV3Builder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + public Builder setCvssV3( + io.grafeas.v1.CVSSv3.Builder builderForValue) { + if (cvssV3Builder_ == null) { + cvssV3_ = builderForValue.build(); + } else { + cvssV3Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + public Builder mergeCvssV3(io.grafeas.v1.CVSSv3 value) { + if (cvssV3Builder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + cvssV3_ != null && + cvssV3_ != io.grafeas.v1.CVSSv3.getDefaultInstance()) { + getCvssV3Builder().mergeFrom(value); + } else { + cvssV3_ = value; + } + } else { + cvssV3Builder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + public Builder clearCvssV3() { + bitField0_ = (bitField0_ & ~0x00000008); + cvssV3_ = null; + if (cvssV3Builder_ != null) { + cvssV3Builder_.dispose(); + cvssV3Builder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + public io.grafeas.v1.CVSSv3.Builder getCvssV3Builder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCvssV3FieldBuilder().getBuilder(); + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + public io.grafeas.v1.CVSSv3OrBuilder getCvssV3OrBuilder() { + if (cvssV3Builder_ != null) { + return cvssV3Builder_.getMessageOrBuilder(); + } else { + return cvssV3_ == null ? + io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; + } + } + /** + *
+     * The full description of the CVSSv3 for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSSv3, io.grafeas.v1.CVSSv3.Builder, io.grafeas.v1.CVSSv3OrBuilder> + getCvssV3FieldBuilder() { + if (cvssV3Builder_ == null) { + cvssV3Builder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSSv3, io.grafeas.v1.CVSSv3.Builder, io.grafeas.v1.CVSSv3OrBuilder>( + getCvssV3(), + getParentForChildren(), + isClean()); + cvssV3_ = null; + } + return cvssV3Builder_; + } + + private java.util.List windowsDetails_ = + java.util.Collections.emptyList(); + private void ensureWindowsDetailsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + windowsDetails_ = new java.util.ArrayList(windowsDetails_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.WindowsDetail, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder> windowsDetailsBuilder_; + + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public java.util.List getWindowsDetailsList() { + if (windowsDetailsBuilder_ == null) { + return java.util.Collections.unmodifiableList(windowsDetails_); + } else { + return windowsDetailsBuilder_.getMessageList(); + } + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public int getWindowsDetailsCount() { + if (windowsDetailsBuilder_ == null) { + return windowsDetails_.size(); + } else { + return windowsDetailsBuilder_.getCount(); + } + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail getWindowsDetails(int index) { + if (windowsDetailsBuilder_ == null) { + return windowsDetails_.get(index); + } else { + return windowsDetailsBuilder_.getMessage(index); + } + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder setWindowsDetails( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail value) { + if (windowsDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWindowsDetailsIsMutable(); + windowsDetails_.set(index, value); + onChanged(); + } else { + windowsDetailsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder setWindowsDetails( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder builderForValue) { + if (windowsDetailsBuilder_ == null) { + ensureWindowsDetailsIsMutable(); + windowsDetails_.set(index, builderForValue.build()); + onChanged(); + } else { + windowsDetailsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder addWindowsDetails(io.grafeas.v1.VulnerabilityNote.WindowsDetail value) { + if (windowsDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWindowsDetailsIsMutable(); + windowsDetails_.add(value); + onChanged(); + } else { + windowsDetailsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder addWindowsDetails( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail value) { + if (windowsDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWindowsDetailsIsMutable(); + windowsDetails_.add(index, value); + onChanged(); + } else { + windowsDetailsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder addWindowsDetails( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder builderForValue) { + if (windowsDetailsBuilder_ == null) { + ensureWindowsDetailsIsMutable(); + windowsDetails_.add(builderForValue.build()); + onChanged(); + } else { + windowsDetailsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder addWindowsDetails( + int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder builderForValue) { + if (windowsDetailsBuilder_ == null) { + ensureWindowsDetailsIsMutable(); + windowsDetails_.add(index, builderForValue.build()); + onChanged(); + } else { + windowsDetailsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder addAllWindowsDetails( + java.lang.Iterable values) { + if (windowsDetailsBuilder_ == null) { + ensureWindowsDetailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, windowsDetails_); + onChanged(); + } else { + windowsDetailsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder clearWindowsDetails() { + if (windowsDetailsBuilder_ == null) { + windowsDetails_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + windowsDetailsBuilder_.clear(); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public Builder removeWindowsDetails(int index) { + if (windowsDetailsBuilder_ == null) { + ensureWindowsDetailsIsMutable(); + windowsDetails_.remove(index); + onChanged(); + } else { + windowsDetailsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder getWindowsDetailsBuilder( + int index) { + return getWindowsDetailsFieldBuilder().getBuilder(index); + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder getWindowsDetailsOrBuilder( + int index) { + if (windowsDetailsBuilder_ == null) { + return windowsDetails_.get(index); } else { + return windowsDetailsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public java.util.List + getWindowsDetailsOrBuilderList() { + if (windowsDetailsBuilder_ != null) { + return windowsDetailsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(windowsDetails_); + } + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder addWindowsDetailsBuilder() { + return getWindowsDetailsFieldBuilder().addBuilder( + io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance()); + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder addWindowsDetailsBuilder( + int index) { + return getWindowsDetailsFieldBuilder().addBuilder( + index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance()); + } + /** + *
+     * Windows details get their own format because the information format and
+     * model don't match a normal detail. Specifically Windows updates are done as
+     * patches, thus Windows vulnerabilities really are a missing package, rather
+     * than a package being at an incorrect version.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + public java.util.List + getWindowsDetailsBuilderList() { + return getWindowsDetailsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.WindowsDetail, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder> + getWindowsDetailsFieldBuilder() { + if (windowsDetailsBuilder_ == null) { + windowsDetailsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityNote.WindowsDetail, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder>( + windowsDetails_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + windowsDetails_ = null; + } + return windowsDetailsBuilder_; + } + + private com.google.protobuf.Timestamp sourceUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> sourceUpdateTimeBuilder_; + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * @return Whether the sourceUpdateTime field is set. + */ + public boolean hasSourceUpdateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * @return The sourceUpdateTime. + */ + public com.google.protobuf.Timestamp getSourceUpdateTime() { + if (sourceUpdateTimeBuilder_ == null) { + return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } else { + return sourceUpdateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public Builder setSourceUpdateTime(com.google.protobuf.Timestamp value) { + if (sourceUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceUpdateTime_ = value; + } else { + sourceUpdateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public Builder setSourceUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTime_ = builderForValue.build(); + } else { + sourceUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public Builder mergeSourceUpdateTime(com.google.protobuf.Timestamp value) { + if (sourceUpdateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + sourceUpdateTime_ != null && + sourceUpdateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getSourceUpdateTimeBuilder().mergeFrom(value); + } else { + sourceUpdateTime_ = value; + } + } else { + sourceUpdateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public Builder clearSourceUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + sourceUpdateTime_ = null; + if (sourceUpdateTimeBuilder_ != null) { + sourceUpdateTimeBuilder_.dispose(); + sourceUpdateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getSourceUpdateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getSourceUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { + if (sourceUpdateTimeBuilder_ != null) { + return sourceUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return sourceUpdateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; + } + } + /** + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getSourceUpdateTimeFieldBuilder() { + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getSourceUpdateTime(), + getParentForChildren(), + isClean()); + sourceUpdateTime_ = null; + } + return sourceUpdateTimeBuilder_; + } + + private int cvssVersion_ = 0; + /** + *
+     * CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @return The enum numeric value on the wire for cvssVersion. + */ + @java.lang.Override public int getCvssVersionValue() { + return cvssVersion_; + } + /** + *
+     * CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @param value The enum numeric value on the wire for cvssVersion to set. + * @return This builder for chaining. + */ + public Builder setCvssVersionValue(int value) { + cvssVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @return The cvssVersion. + */ + @java.lang.Override + public io.grafeas.v1.CVSSVersion getCvssVersion() { + io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); + return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; + } + /** + *
+     * CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @param value The cvssVersion to set. + * @return This builder for chaining. + */ + public Builder setCvssVersion(io.grafeas.v1.CVSSVersion value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + cvssVersion_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @return This builder for chaining. + */ + public Builder clearCvssVersion() { + bitField0_ = (bitField0_ & ~0x00000040); + cvssVersion_ = 0; + onChanged(); + return this; + } + + private io.grafeas.v1.CVSS cvssV2_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> cvssV2Builder_; + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * @return Whether the cvssV2 field is set. + */ + public boolean hasCvssV2() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * @return The cvssV2. + */ + public io.grafeas.v1.CVSS getCvssV2() { + if (cvssV2Builder_ == null) { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } else { + return cvssV2Builder_.getMessage(); + } + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder setCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cvssV2_ = value; + } else { + cvssV2Builder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder setCvssV2( + io.grafeas.v1.CVSS.Builder builderForValue) { + if (cvssV2Builder_ == null) { + cvssV2_ = builderForValue.build(); + } else { + cvssV2Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder mergeCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + cvssV2_ != null && + cvssV2_ != io.grafeas.v1.CVSS.getDefaultInstance()) { + getCvssV2Builder().mergeFrom(value); + } else { + cvssV2_ = value; + } + } else { + cvssV2Builder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder clearCvssV2() { + bitField0_ = (bitField0_ & ~0x00000080); + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public io.grafeas.v1.CVSS.Builder getCvssV2Builder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCvssV2FieldBuilder().getBuilder(); + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + if (cvssV2Builder_ != null) { + return cvssV2Builder_.getMessageOrBuilder(); + } else { + return cvssV2_ == null ? + io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + } + /** + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> + getCvssV2FieldBuilder() { + if (cvssV2Builder_ == null) { + cvssV2Builder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( + getCvssV2(), + getParentForChildren(), + isClean()); + cvssV2_ = null; + } + return cvssV2Builder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote) + private static final io.grafeas.v1.VulnerabilityNote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote(); + } + + public static io.grafeas.v1.VulnerabilityNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VulnerabilityNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java new file mode 100644 index 000000000000..1e1b884465be --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java @@ -0,0 +1,248 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vulnerability.proto + +package io.grafeas.v1; + +public interface VulnerabilityNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
+   * where 0 indicates low severity and 10 indicates high severity.
+   * 
+ * + * float cvss_score = 1; + * @return The cvssScore. + */ + float getCvssScore(); + + /** + *
+   * The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + int getSeverityValue(); + /** + *
+   * The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + io.grafeas.v1.Severity getSeverity(); + + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + java.util.List + getDetailsList(); + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + io.grafeas.v1.VulnerabilityNote.Detail getDetails(int index); + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + int getDetailsCount(); + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + java.util.List + getDetailsOrBuilderList(); + /** + *
+   * Details of all known distros and packages affected by this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + io.grafeas.v1.VulnerabilityNote.DetailOrBuilder getDetailsOrBuilder( + int index); + + /** + *
+   * The full description of the CVSSv3 for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + * @return Whether the cvssV3 field is set. + */ + boolean hasCvssV3(); + /** + *
+   * The full description of the CVSSv3 for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + * @return The cvssV3. + */ + io.grafeas.v1.CVSSv3 getCvssV3(); + /** + *
+   * The full description of the CVSSv3 for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + io.grafeas.v1.CVSSv3OrBuilder getCvssV3OrBuilder(); + + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + java.util.List + getWindowsDetailsList(); + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + io.grafeas.v1.VulnerabilityNote.WindowsDetail getWindowsDetails(int index); + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + int getWindowsDetailsCount(); + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + java.util.List + getWindowsDetailsOrBuilderList(); + /** + *
+   * Windows details get their own format because the information format and
+   * model don't match a normal detail. Specifically Windows updates are done as
+   * patches, thus Windows vulnerabilities really are a missing package, rather
+   * than a package being at an incorrect version.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder getWindowsDetailsOrBuilder( + int index); + + /** + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * @return Whether the sourceUpdateTime field is set. + */ + boolean hasSourceUpdateTime(); + /** + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * @return The sourceUpdateTime. + */ + com.google.protobuf.Timestamp getSourceUpdateTime(); + /** + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder(); + + /** + *
+   * CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @return The enum numeric value on the wire for cvssVersion. + */ + int getCvssVersionValue(); + /** + *
+   * CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 7; + * @return The cvssVersion. + */ + io.grafeas.v1.CVSSVersion getCvssVersion(); + + /** + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * @return Whether the cvssV2 field is set. + */ + boolean hasCvssV2(); + /** + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * @return The cvssV2. + */ + io.grafeas.v1.CVSS getCvssV2(); + /** + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java new file mode 100644 index 000000000000..8544d0e881a8 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java @@ -0,0 +1,8260 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vulnerability.proto + +package io.grafeas.v1; + +/** + *
+ * An occurrence of a severity vulnerability on a resource.
+ * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence} + */ +public final class VulnerabilityOccurrence extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityOccurrence) + VulnerabilityOccurrenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use VulnerabilityOccurrence.newBuilder() to construct. + private VulnerabilityOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VulnerabilityOccurrence() { + type_ = ""; + severity_ = 0; + packageIssue_ = java.util.Collections.emptyList(); + shortDescription_ = ""; + longDescription_ = ""; + relatedUrls_ = java.util.Collections.emptyList(); + effectiveSeverity_ = 0; + cvssVersion_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VulnerabilityOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityOccurrence.class, io.grafeas.v1.VulnerabilityOccurrence.Builder.class); + } + + public interface PackageIssueOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityOccurrence.PackageIssue) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability was found in.
+     * 
+ * + * string affected_cpe_uri = 1; + * @return The affectedCpeUri. + */ + java.lang.String getAffectedCpeUri(); + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability was found in.
+     * 
+ * + * string affected_cpe_uri = 1; + * @return The bytes for affectedCpeUri. + */ + com.google.protobuf.ByteString + getAffectedCpeUriBytes(); + + /** + *
+     * Required. The package this vulnerability was found in.
+     * 
+ * + * string affected_package = 2; + * @return The affectedPackage. + */ + java.lang.String getAffectedPackage(); + /** + *
+     * Required. The package this vulnerability was found in.
+     * 
+ * + * string affected_package = 2; + * @return The bytes for affectedPackage. + */ + com.google.protobuf.ByteString + getAffectedPackageBytes(); + + /** + *
+     * Required. The version of the package that is installed on the resource
+     * affected by this vulnerability.
+     * 
+ * + * .grafeas.v1.Version affected_version = 3; + * @return Whether the affectedVersion field is set. + */ + boolean hasAffectedVersion(); + /** + *
+     * Required. The version of the package that is installed on the resource
+     * affected by this vulnerability.
+     * 
+ * + * .grafeas.v1.Version affected_version = 3; + * @return The affectedVersion. + */ + io.grafeas.v1.Version getAffectedVersion(); + /** + *
+     * Required. The version of the package that is installed on the resource
+     * affected by this vulnerability.
+     * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + io.grafeas.v1.VersionOrBuilder getAffectedVersionOrBuilder(); + + /** + *
+     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+     * was fixed in. It is possible for this to be different from the
+     * affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 4; + * @return The fixedCpeUri. + */ + java.lang.String getFixedCpeUri(); + /** + *
+     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+     * was fixed in. It is possible for this to be different from the
+     * affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 4; + * @return The bytes for fixedCpeUri. + */ + com.google.protobuf.ByteString + getFixedCpeUriBytes(); + + /** + *
+     * The package this vulnerability was fixed in. It is possible for this to
+     * be different from the affected_package.
+     * 
+ * + * string fixed_package = 5; + * @return The fixedPackage. + */ + java.lang.String getFixedPackage(); + /** + *
+     * The package this vulnerability was fixed in. It is possible for this to
+     * be different from the affected_package.
+     * 
+ * + * string fixed_package = 5; + * @return The bytes for fixedPackage. + */ + com.google.protobuf.ByteString + getFixedPackageBytes(); + + /** + *
+     * Required. The version of the package this vulnerability was fixed in.
+     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 6; + * @return Whether the fixedVersion field is set. + */ + boolean hasFixedVersion(); + /** + *
+     * Required. The version of the package this vulnerability was fixed in.
+     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 6; + * @return The fixedVersion. + */ + io.grafeas.v1.Version getFixedVersion(); + /** + *
+     * Required. The version of the package this vulnerability was fixed in.
+     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder(); + + /** + *
+     * Output only. Whether a fix is available for this package.
+     * 
+ * + * bool fix_available = 7; + * @return The fixAvailable. + */ + boolean getFixAvailable(); + + /** + *
+     * The type of package (e.g. OS, MAVEN, GO).
+     * 
+ * + * string package_type = 8; + * @return The packageType. + */ + java.lang.String getPackageType(); + /** + *
+     * The type of package (e.g. OS, MAVEN, GO).
+     * 
+ * + * string package_type = 8; + * @return The bytes for packageType. + */ + com.google.protobuf.ByteString + getPackageTypeBytes(); + + /** + *
+     * The distro or language system assigned severity for this vulnerability
+     * when that is available and note provider assigned severity when it is not
+     * available.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for effectiveSeverity. + */ + int getEffectiveSeverityValue(); + /** + *
+     * The distro or language system assigned severity for this vulnerability
+     * when that is available and note provider assigned severity when it is not
+     * available.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The effectiveSeverity. + */ + io.grafeas.v1.Severity getEffectiveSeverity(); + + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + java.util.List + getFileLocationList(); + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + io.grafeas.v1.FileLocation getFileLocation(int index); + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + int getFileLocationCount(); + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + java.util.List + getFileLocationOrBuilderList(); + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + io.grafeas.v1.FileLocationOrBuilder getFileLocationOrBuilder( + int index); + } + /** + *
+   * A detail for a distro and package this vulnerability occurrence was found
+   * in and its associated fix (if one is available).
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.PackageIssue} + */ + public static final class PackageIssue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityOccurrence.PackageIssue) + PackageIssueOrBuilder { + private static final long serialVersionUID = 0L; + // Use PackageIssue.newBuilder() to construct. + private PackageIssue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PackageIssue() { + affectedCpeUri_ = ""; + affectedPackage_ = ""; + fixedCpeUri_ = ""; + fixedPackage_ = ""; + packageType_ = ""; + effectiveSeverity_ = 0; + fileLocation_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PackageIssue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.class, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder.class); + } + + public static final int AFFECTED_CPE_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object affectedCpeUri_ = ""; + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability was found in.
+     * 
+ * + * string affected_cpe_uri = 1; + * @return The affectedCpeUri. + */ + @java.lang.Override + public java.lang.String getAffectedCpeUri() { + java.lang.Object ref = affectedCpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedCpeUri_ = s; + return s; + } + } + /** + *
+     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+     * vulnerability was found in.
+     * 
+ * + * string affected_cpe_uri = 1; + * @return The bytes for affectedCpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAffectedCpeUriBytes() { + java.lang.Object ref = affectedCpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AFFECTED_PACKAGE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object affectedPackage_ = ""; + /** + *
+     * Required. The package this vulnerability was found in.
+     * 
+ * + * string affected_package = 2; + * @return The affectedPackage. + */ + @java.lang.Override + public java.lang.String getAffectedPackage() { + java.lang.Object ref = affectedPackage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedPackage_ = s; + return s; + } + } + /** + *
+     * Required. The package this vulnerability was found in.
+     * 
+ * + * string affected_package = 2; + * @return The bytes for affectedPackage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAffectedPackageBytes() { + java.lang.Object ref = affectedPackage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AFFECTED_VERSION_FIELD_NUMBER = 3; + private io.grafeas.v1.Version affectedVersion_; + /** + *
+     * Required. The version of the package that is installed on the resource
+     * affected by this vulnerability.
+     * 
+ * + * .grafeas.v1.Version affected_version = 3; + * @return Whether the affectedVersion field is set. + */ + @java.lang.Override + public boolean hasAffectedVersion() { + return affectedVersion_ != null; + } + /** + *
+     * Required. The version of the package that is installed on the resource
+     * affected by this vulnerability.
+     * 
+ * + * .grafeas.v1.Version affected_version = 3; + * @return The affectedVersion. + */ + @java.lang.Override + public io.grafeas.v1.Version getAffectedVersion() { + return affectedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; + } + /** + *
+     * Required. The version of the package that is installed on the resource
+     * affected by this vulnerability.
+     * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getAffectedVersionOrBuilder() { + return affectedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; + } + + public static final int FIXED_CPE_URI_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object fixedCpeUri_ = ""; + /** + *
+     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+     * was fixed in. It is possible for this to be different from the
+     * affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 4; + * @return The fixedCpeUri. + */ + @java.lang.Override + public java.lang.String getFixedCpeUri() { + java.lang.Object ref = fixedCpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedCpeUri_ = s; + return s; + } + } + /** + *
+     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+     * was fixed in. It is possible for this to be different from the
+     * affected_cpe_uri.
+     * 
+ * + * string fixed_cpe_uri = 4; + * @return The bytes for fixedCpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFixedCpeUriBytes() { + java.lang.Object ref = fixedCpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIXED_PACKAGE_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object fixedPackage_ = ""; + /** + *
+     * The package this vulnerability was fixed in. It is possible for this to
+     * be different from the affected_package.
+     * 
+ * + * string fixed_package = 5; + * @return The fixedPackage. + */ + @java.lang.Override + public java.lang.String getFixedPackage() { + java.lang.Object ref = fixedPackage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedPackage_ = s; + return s; + } + } + /** + *
+     * The package this vulnerability was fixed in. It is possible for this to
+     * be different from the affected_package.
+     * 
+ * + * string fixed_package = 5; + * @return The bytes for fixedPackage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFixedPackageBytes() { + java.lang.Object ref = fixedPackage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIXED_VERSION_FIELD_NUMBER = 6; + private io.grafeas.v1.Version fixedVersion_; + /** + *
+     * Required. The version of the package this vulnerability was fixed in.
+     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 6; + * @return Whether the fixedVersion field is set. + */ + @java.lang.Override + public boolean hasFixedVersion() { + return fixedVersion_ != null; + } + /** + *
+     * Required. The version of the package this vulnerability was fixed in.
+     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 6; + * @return The fixedVersion. + */ + @java.lang.Override + public io.grafeas.v1.Version getFixedVersion() { + return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } + /** + *
+     * Required. The version of the package this vulnerability was fixed in.
+     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+     * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { + return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } + + public static final int FIX_AVAILABLE_FIELD_NUMBER = 7; + private boolean fixAvailable_ = false; + /** + *
+     * Output only. Whether a fix is available for this package.
+     * 
+ * + * bool fix_available = 7; + * @return The fixAvailable. + */ + @java.lang.Override + public boolean getFixAvailable() { + return fixAvailable_; + } + + public static final int PACKAGE_TYPE_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object packageType_ = ""; + /** + *
+     * The type of package (e.g. OS, MAVEN, GO).
+     * 
+ * + * string package_type = 8; + * @return The packageType. + */ + @java.lang.Override + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } + } + /** + *
+     * The type of package (e.g. OS, MAVEN, GO).
+     * 
+ * + * string package_type = 8; + * @return The bytes for packageType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EFFECTIVE_SEVERITY_FIELD_NUMBER = 9; + private int effectiveSeverity_ = 0; + /** + *
+     * The distro or language system assigned severity for this vulnerability
+     * when that is available and note provider assigned severity when it is not
+     * available.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for effectiveSeverity. + */ + @java.lang.Override public int getEffectiveSeverityValue() { + return effectiveSeverity_; + } + /** + *
+     * The distro or language system assigned severity for this vulnerability
+     * when that is available and note provider assigned severity when it is not
+     * available.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The effectiveSeverity. + */ + @java.lang.Override public io.grafeas.v1.Severity getEffectiveSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + + public static final int FILE_LOCATION_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private java.util.List fileLocation_; + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + @java.lang.Override + public java.util.List getFileLocationList() { + return fileLocation_; + } + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + @java.lang.Override + public java.util.List + getFileLocationOrBuilderList() { + return fileLocation_; + } + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + @java.lang.Override + public int getFileLocationCount() { + return fileLocation_.size(); + } + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + @java.lang.Override + public io.grafeas.v1.FileLocation getFileLocation(int index) { + return fileLocation_.get(index); + } + /** + *
+     * The location at which this package was found.
+     * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + @java.lang.Override + public io.grafeas.v1.FileLocationOrBuilder getFileLocationOrBuilder( + int index) { + return fileLocation_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, affectedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, affectedPackage_); + } + if (affectedVersion_ != null) { + output.writeMessage(3, getAffectedVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, fixedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fixedPackage_); + } + if (fixedVersion_ != null) { + output.writeMessage(6, getFixedVersion()); + } + if (fixAvailable_ != false) { + output.writeBool(7, fixAvailable_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, packageType_); + } + if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + output.writeEnum(9, effectiveSeverity_); + } + for (int i = 0; i < fileLocation_.size(); i++) { + output.writeMessage(10, fileLocation_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, affectedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, affectedPackage_); + } + if (affectedVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getAffectedVersion()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, fixedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, fixedPackage_); + } + if (fixedVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getFixedVersion()); + } + if (fixAvailable_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, fixAvailable_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, packageType_); + } + if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, effectiveSeverity_); + } + for (int i = 0; i < fileLocation_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, fileLocation_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityOccurrence.PackageIssue)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue other = (io.grafeas.v1.VulnerabilityOccurrence.PackageIssue) obj; + + if (!getAffectedCpeUri() + .equals(other.getAffectedCpeUri())) return false; + if (!getAffectedPackage() + .equals(other.getAffectedPackage())) return false; + if (hasAffectedVersion() != other.hasAffectedVersion()) return false; + if (hasAffectedVersion()) { + if (!getAffectedVersion() + .equals(other.getAffectedVersion())) return false; + } + if (!getFixedCpeUri() + .equals(other.getFixedCpeUri())) return false; + if (!getFixedPackage() + .equals(other.getFixedPackage())) return false; + if (hasFixedVersion() != other.hasFixedVersion()) return false; + if (hasFixedVersion()) { + if (!getFixedVersion() + .equals(other.getFixedVersion())) return false; + } + if (getFixAvailable() + != other.getFixAvailable()) return false; + if (!getPackageType() + .equals(other.getPackageType())) return false; + if (effectiveSeverity_ != other.effectiveSeverity_) return false; + if (!getFileLocationList() + .equals(other.getFileLocationList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AFFECTED_CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getAffectedCpeUri().hashCode(); + hash = (37 * hash) + AFFECTED_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getAffectedPackage().hashCode(); + if (hasAffectedVersion()) { + hash = (37 * hash) + AFFECTED_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getAffectedVersion().hashCode(); + } + hash = (37 * hash) + FIXED_CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getFixedCpeUri().hashCode(); + hash = (37 * hash) + FIXED_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getFixedPackage().hashCode(); + if (hasFixedVersion()) { + hash = (37 * hash) + FIXED_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getFixedVersion().hashCode(); + } + hash = (37 * hash) + FIX_AVAILABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFixAvailable()); + hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPackageType().hashCode(); + hash = (37 * hash) + EFFECTIVE_SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + effectiveSeverity_; + if (getFileLocationCount() > 0) { + hash = (37 * hash) + FILE_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getFileLocationList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A detail for a distro and package this vulnerability occurrence was found
+     * in and its associated fix (if one is available).
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.PackageIssue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityOccurrence.PackageIssue) + io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.class, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + affectedCpeUri_ = ""; + affectedPackage_ = ""; + affectedVersion_ = null; + if (affectedVersionBuilder_ != null) { + affectedVersionBuilder_.dispose(); + affectedVersionBuilder_ = null; + } + fixedCpeUri_ = ""; + fixedPackage_ = ""; + fixedVersion_ = null; + if (fixedVersionBuilder_ != null) { + fixedVersionBuilder_.dispose(); + fixedVersionBuilder_ = null; + } + fixAvailable_ = false; + packageType_ = ""; + effectiveSeverity_ = 0; + if (fileLocationBuilder_ == null) { + fileLocation_ = java.util.Collections.emptyList(); + } else { + fileLocation_ = null; + fileLocationBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue build() { + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue buildPartial() { + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result = new io.grafeas.v1.VulnerabilityOccurrence.PackageIssue(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result) { + if (fileLocationBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + fileLocation_ = java.util.Collections.unmodifiableList(fileLocation_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.fileLocation_ = fileLocation_; + } else { + result.fileLocation_ = fileLocationBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.affectedCpeUri_ = affectedCpeUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.affectedPackage_ = affectedPackage_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.affectedVersion_ = affectedVersionBuilder_ == null + ? affectedVersion_ + : affectedVersionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.fixedCpeUri_ = fixedCpeUri_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.fixedPackage_ = fixedPackage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.fixedVersion_ = fixedVersionBuilder_ == null + ? fixedVersion_ + : fixedVersionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.fixAvailable_ = fixAvailable_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.packageType_ = packageType_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.effectiveSeverity_ = effectiveSeverity_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityOccurrence.PackageIssue) { + return mergeFrom((io.grafeas.v1.VulnerabilityOccurrence.PackageIssue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue other) { + if (other == io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance()) return this; + if (!other.getAffectedCpeUri().isEmpty()) { + affectedCpeUri_ = other.affectedCpeUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAffectedPackage().isEmpty()) { + affectedPackage_ = other.affectedPackage_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAffectedVersion()) { + mergeAffectedVersion(other.getAffectedVersion()); + } + if (!other.getFixedCpeUri().isEmpty()) { + fixedCpeUri_ = other.fixedCpeUri_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getFixedPackage().isEmpty()) { + fixedPackage_ = other.fixedPackage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasFixedVersion()) { + mergeFixedVersion(other.getFixedVersion()); + } + if (other.getFixAvailable() != false) { + setFixAvailable(other.getFixAvailable()); + } + if (!other.getPackageType().isEmpty()) { + packageType_ = other.packageType_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.effectiveSeverity_ != 0) { + setEffectiveSeverityValue(other.getEffectiveSeverityValue()); + } + if (fileLocationBuilder_ == null) { + if (!other.fileLocation_.isEmpty()) { + if (fileLocation_.isEmpty()) { + fileLocation_ = other.fileLocation_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureFileLocationIsMutable(); + fileLocation_.addAll(other.fileLocation_); + } + onChanged(); + } + } else { + if (!other.fileLocation_.isEmpty()) { + if (fileLocationBuilder_.isEmpty()) { + fileLocationBuilder_.dispose(); + fileLocationBuilder_ = null; + fileLocation_ = other.fileLocation_; + bitField0_ = (bitField0_ & ~0x00000200); + fileLocationBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFileLocationFieldBuilder() : null; + } else { + fileLocationBuilder_.addAllMessages(other.fileLocation_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + affectedCpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + affectedPackage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getAffectedVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + fixedCpeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + fixedPackage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getFixedVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + fixAvailable_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + packageType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: { + effectiveSeverity_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: { + io.grafeas.v1.FileLocation m = + input.readMessage( + io.grafeas.v1.FileLocation.parser(), + extensionRegistry); + if (fileLocationBuilder_ == null) { + ensureFileLocationIsMutable(); + fileLocation_.add(m); + } else { + fileLocationBuilder_.addMessage(m); + } + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object affectedCpeUri_ = ""; + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability was found in.
+       * 
+ * + * string affected_cpe_uri = 1; + * @return The affectedCpeUri. + */ + public java.lang.String getAffectedCpeUri() { + java.lang.Object ref = affectedCpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedCpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability was found in.
+       * 
+ * + * string affected_cpe_uri = 1; + * @return The bytes for affectedCpeUri. + */ + public com.google.protobuf.ByteString + getAffectedCpeUriBytes() { + java.lang.Object ref = affectedCpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability was found in.
+       * 
+ * + * string affected_cpe_uri = 1; + * @param value The affectedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setAffectedCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + affectedCpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability was found in.
+       * 
+ * + * string affected_cpe_uri = 1; + * @return This builder for chaining. + */ + public Builder clearAffectedCpeUri() { + affectedCpeUri_ = getDefaultInstance().getAffectedCpeUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
+       * vulnerability was found in.
+       * 
+ * + * string affected_cpe_uri = 1; + * @param value The bytes for affectedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setAffectedCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + affectedCpeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object affectedPackage_ = ""; + /** + *
+       * Required. The package this vulnerability was found in.
+       * 
+ * + * string affected_package = 2; + * @return The affectedPackage. + */ + public java.lang.String getAffectedPackage() { + java.lang.Object ref = affectedPackage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + affectedPackage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The package this vulnerability was found in.
+       * 
+ * + * string affected_package = 2; + * @return The bytes for affectedPackage. + */ + public com.google.protobuf.ByteString + getAffectedPackageBytes() { + java.lang.Object ref = affectedPackage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + affectedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The package this vulnerability was found in.
+       * 
+ * + * string affected_package = 2; + * @param value The affectedPackage to set. + * @return This builder for chaining. + */ + public Builder setAffectedPackage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + affectedPackage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Required. The package this vulnerability was found in.
+       * 
+ * + * string affected_package = 2; + * @return This builder for chaining. + */ + public Builder clearAffectedPackage() { + affectedPackage_ = getDefaultInstance().getAffectedPackage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * Required. The package this vulnerability was found in.
+       * 
+ * + * string affected_package = 2; + * @param value The bytes for affectedPackage to set. + * @return This builder for chaining. + */ + public Builder setAffectedPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + affectedPackage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.grafeas.v1.Version affectedVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> affectedVersionBuilder_; + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + * @return Whether the affectedVersion field is set. + */ + public boolean hasAffectedVersion() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + * @return The affectedVersion. + */ + public io.grafeas.v1.Version getAffectedVersion() { + if (affectedVersionBuilder_ == null) { + return affectedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; + } else { + return affectedVersionBuilder_.getMessage(); + } + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + public Builder setAffectedVersion(io.grafeas.v1.Version value) { + if (affectedVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + affectedVersion_ = value; + } else { + affectedVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + public Builder setAffectedVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (affectedVersionBuilder_ == null) { + affectedVersion_ = builderForValue.build(); + } else { + affectedVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + public Builder mergeAffectedVersion(io.grafeas.v1.Version value) { + if (affectedVersionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + affectedVersion_ != null && + affectedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { + getAffectedVersionBuilder().mergeFrom(value); + } else { + affectedVersion_ = value; + } + } else { + affectedVersionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + public Builder clearAffectedVersion() { + bitField0_ = (bitField0_ & ~0x00000004); + affectedVersion_ = null; + if (affectedVersionBuilder_ != null) { + affectedVersionBuilder_.dispose(); + affectedVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + public io.grafeas.v1.Version.Builder getAffectedVersionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAffectedVersionFieldBuilder().getBuilder(); + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + public io.grafeas.v1.VersionOrBuilder getAffectedVersionOrBuilder() { + if (affectedVersionBuilder_ != null) { + return affectedVersionBuilder_.getMessageOrBuilder(); + } else { + return affectedVersion_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; + } + } + /** + *
+       * Required. The version of the package that is installed on the resource
+       * affected by this vulnerability.
+       * 
+ * + * .grafeas.v1.Version affected_version = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getAffectedVersionFieldBuilder() { + if (affectedVersionBuilder_ == null) { + affectedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getAffectedVersion(), + getParentForChildren(), + isClean()); + affectedVersion_ = null; + } + return affectedVersionBuilder_; + } + + private java.lang.Object fixedCpeUri_ = ""; + /** + *
+       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+       * was fixed in. It is possible for this to be different from the
+       * affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 4; + * @return The fixedCpeUri. + */ + public java.lang.String getFixedCpeUri() { + java.lang.Object ref = fixedCpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedCpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+       * was fixed in. It is possible for this to be different from the
+       * affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 4; + * @return The bytes for fixedCpeUri. + */ + public com.google.protobuf.ByteString + getFixedCpeUriBytes() { + java.lang.Object ref = fixedCpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+       * was fixed in. It is possible for this to be different from the
+       * affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 4; + * @param value The fixedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setFixedCpeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fixedCpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+       * was fixed in. It is possible for this to be different from the
+       * affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 4; + * @return This builder for chaining. + */ + public Builder clearFixedCpeUri() { + fixedCpeUri_ = getDefaultInstance().getFixedCpeUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
+       * was fixed in. It is possible for this to be different from the
+       * affected_cpe_uri.
+       * 
+ * + * string fixed_cpe_uri = 4; + * @param value The bytes for fixedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setFixedCpeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fixedCpeUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object fixedPackage_ = ""; + /** + *
+       * The package this vulnerability was fixed in. It is possible for this to
+       * be different from the affected_package.
+       * 
+ * + * string fixed_package = 5; + * @return The fixedPackage. + */ + public java.lang.String getFixedPackage() { + java.lang.Object ref = fixedPackage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedPackage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The package this vulnerability was fixed in. It is possible for this to
+       * be different from the affected_package.
+       * 
+ * + * string fixed_package = 5; + * @return The bytes for fixedPackage. + */ + public com.google.protobuf.ByteString + getFixedPackageBytes() { + java.lang.Object ref = fixedPackage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fixedPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The package this vulnerability was fixed in. It is possible for this to
+       * be different from the affected_package.
+       * 
+ * + * string fixed_package = 5; + * @param value The fixedPackage to set. + * @return This builder for chaining. + */ + public Builder setFixedPackage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fixedPackage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * The package this vulnerability was fixed in. It is possible for this to
+       * be different from the affected_package.
+       * 
+ * + * string fixed_package = 5; + * @return This builder for chaining. + */ + public Builder clearFixedPackage() { + fixedPackage_ = getDefaultInstance().getFixedPackage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+       * The package this vulnerability was fixed in. It is possible for this to
+       * be different from the affected_package.
+       * 
+ * + * string fixed_package = 5; + * @param value The bytes for fixedPackage to set. + * @return This builder for chaining. + */ + public Builder setFixedPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fixedPackage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private io.grafeas.v1.Version fixedVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> fixedVersionBuilder_; + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + * @return Whether the fixedVersion field is set. + */ + public boolean hasFixedVersion() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + * @return The fixedVersion. + */ + public io.grafeas.v1.Version getFixedVersion() { + if (fixedVersionBuilder_ == null) { + return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } else { + return fixedVersionBuilder_.getMessage(); + } + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + public Builder setFixedVersion(io.grafeas.v1.Version value) { + if (fixedVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fixedVersion_ = value; + } else { + fixedVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + public Builder setFixedVersion( + io.grafeas.v1.Version.Builder builderForValue) { + if (fixedVersionBuilder_ == null) { + fixedVersion_ = builderForValue.build(); + } else { + fixedVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + public Builder mergeFixedVersion(io.grafeas.v1.Version value) { + if (fixedVersionBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + fixedVersion_ != null && + fixedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { + getFixedVersionBuilder().mergeFrom(value); + } else { + fixedVersion_ = value; + } + } else { + fixedVersionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + public Builder clearFixedVersion() { + bitField0_ = (bitField0_ & ~0x00000020); + fixedVersion_ = null; + if (fixedVersionBuilder_ != null) { + fixedVersionBuilder_.dispose(); + fixedVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + public io.grafeas.v1.Version.Builder getFixedVersionBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getFixedVersionFieldBuilder().getBuilder(); + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { + if (fixedVersionBuilder_ != null) { + return fixedVersionBuilder_.getMessageOrBuilder(); + } else { + return fixedVersion_ == null ? + io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; + } + } + /** + *
+       * Required. The version of the package this vulnerability was fixed in.
+       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
+       * 
+ * + * .grafeas.v1.Version fixed_version = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getFixedVersionFieldBuilder() { + if (fixedVersionBuilder_ == null) { + fixedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( + getFixedVersion(), + getParentForChildren(), + isClean()); + fixedVersion_ = null; + } + return fixedVersionBuilder_; + } + + private boolean fixAvailable_ ; + /** + *
+       * Output only. Whether a fix is available for this package.
+       * 
+ * + * bool fix_available = 7; + * @return The fixAvailable. + */ + @java.lang.Override + public boolean getFixAvailable() { + return fixAvailable_; + } + /** + *
+       * Output only. Whether a fix is available for this package.
+       * 
+ * + * bool fix_available = 7; + * @param value The fixAvailable to set. + * @return This builder for chaining. + */ + public Builder setFixAvailable(boolean value) { + + fixAvailable_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * Output only. Whether a fix is available for this package.
+       * 
+ * + * bool fix_available = 7; + * @return This builder for chaining. + */ + public Builder clearFixAvailable() { + bitField0_ = (bitField0_ & ~0x00000040); + fixAvailable_ = false; + onChanged(); + return this; + } + + private java.lang.Object packageType_ = ""; + /** + *
+       * The type of package (e.g. OS, MAVEN, GO).
+       * 
+ * + * string package_type = 8; + * @return The packageType. + */ + public java.lang.String getPackageType() { + java.lang.Object ref = packageType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The type of package (e.g. OS, MAVEN, GO).
+       * 
+ * + * string package_type = 8; + * @return The bytes for packageType. + */ + public com.google.protobuf.ByteString + getPackageTypeBytes() { + java.lang.Object ref = packageType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The type of package (e.g. OS, MAVEN, GO).
+       * 
+ * + * string package_type = 8; + * @param value The packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + packageType_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+       * The type of package (e.g. OS, MAVEN, GO).
+       * 
+ * + * string package_type = 8; + * @return This builder for chaining. + */ + public Builder clearPackageType() { + packageType_ = getDefaultInstance().getPackageType(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + *
+       * The type of package (e.g. OS, MAVEN, GO).
+       * 
+ * + * string package_type = 8; + * @param value The bytes for packageType to set. + * @return This builder for chaining. + */ + public Builder setPackageTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + packageType_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private int effectiveSeverity_ = 0; + /** + *
+       * The distro or language system assigned severity for this vulnerability
+       * when that is available and note provider assigned severity when it is not
+       * available.
+       * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for effectiveSeverity. + */ + @java.lang.Override public int getEffectiveSeverityValue() { + return effectiveSeverity_; + } + /** + *
+       * The distro or language system assigned severity for this vulnerability
+       * when that is available and note provider assigned severity when it is not
+       * available.
+       * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for effectiveSeverity to set. + * @return This builder for chaining. + */ + public Builder setEffectiveSeverityValue(int value) { + effectiveSeverity_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+       * The distro or language system assigned severity for this vulnerability
+       * when that is available and note provider assigned severity when it is not
+       * available.
+       * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The effectiveSeverity. + */ + @java.lang.Override + public io.grafeas.v1.Severity getEffectiveSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + /** + *
+       * The distro or language system assigned severity for this vulnerability
+       * when that is available and note provider assigned severity when it is not
+       * available.
+       * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The effectiveSeverity to set. + * @return This builder for chaining. + */ + public Builder setEffectiveSeverity(io.grafeas.v1.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + effectiveSeverity_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The distro or language system assigned severity for this vulnerability
+       * when that is available and note provider assigned severity when it is not
+       * available.
+       * 
+ * + * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearEffectiveSeverity() { + bitField0_ = (bitField0_ & ~0x00000100); + effectiveSeverity_ = 0; + onChanged(); + return this; + } + + private java.util.List fileLocation_ = + java.util.Collections.emptyList(); + private void ensureFileLocationIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + fileLocation_ = new java.util.ArrayList(fileLocation_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.FileLocation, io.grafeas.v1.FileLocation.Builder, io.grafeas.v1.FileLocationOrBuilder> fileLocationBuilder_; + + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public java.util.List getFileLocationList() { + if (fileLocationBuilder_ == null) { + return java.util.Collections.unmodifiableList(fileLocation_); + } else { + return fileLocationBuilder_.getMessageList(); + } + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public int getFileLocationCount() { + if (fileLocationBuilder_ == null) { + return fileLocation_.size(); + } else { + return fileLocationBuilder_.getCount(); + } + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public io.grafeas.v1.FileLocation getFileLocation(int index) { + if (fileLocationBuilder_ == null) { + return fileLocation_.get(index); + } else { + return fileLocationBuilder_.getMessage(index); + } + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder setFileLocation( + int index, io.grafeas.v1.FileLocation value) { + if (fileLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileLocationIsMutable(); + fileLocation_.set(index, value); + onChanged(); + } else { + fileLocationBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder setFileLocation( + int index, io.grafeas.v1.FileLocation.Builder builderForValue) { + if (fileLocationBuilder_ == null) { + ensureFileLocationIsMutable(); + fileLocation_.set(index, builderForValue.build()); + onChanged(); + } else { + fileLocationBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder addFileLocation(io.grafeas.v1.FileLocation value) { + if (fileLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileLocationIsMutable(); + fileLocation_.add(value); + onChanged(); + } else { + fileLocationBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder addFileLocation( + int index, io.grafeas.v1.FileLocation value) { + if (fileLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileLocationIsMutable(); + fileLocation_.add(index, value); + onChanged(); + } else { + fileLocationBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder addFileLocation( + io.grafeas.v1.FileLocation.Builder builderForValue) { + if (fileLocationBuilder_ == null) { + ensureFileLocationIsMutable(); + fileLocation_.add(builderForValue.build()); + onChanged(); + } else { + fileLocationBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder addFileLocation( + int index, io.grafeas.v1.FileLocation.Builder builderForValue) { + if (fileLocationBuilder_ == null) { + ensureFileLocationIsMutable(); + fileLocation_.add(index, builderForValue.build()); + onChanged(); + } else { + fileLocationBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder addAllFileLocation( + java.lang.Iterable values) { + if (fileLocationBuilder_ == null) { + ensureFileLocationIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fileLocation_); + onChanged(); + } else { + fileLocationBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder clearFileLocation() { + if (fileLocationBuilder_ == null) { + fileLocation_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + fileLocationBuilder_.clear(); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public Builder removeFileLocation(int index) { + if (fileLocationBuilder_ == null) { + ensureFileLocationIsMutable(); + fileLocation_.remove(index); + onChanged(); + } else { + fileLocationBuilder_.remove(index); + } + return this; + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public io.grafeas.v1.FileLocation.Builder getFileLocationBuilder( + int index) { + return getFileLocationFieldBuilder().getBuilder(index); + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public io.grafeas.v1.FileLocationOrBuilder getFileLocationOrBuilder( + int index) { + if (fileLocationBuilder_ == null) { + return fileLocation_.get(index); } else { + return fileLocationBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public java.util.List + getFileLocationOrBuilderList() { + if (fileLocationBuilder_ != null) { + return fileLocationBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fileLocation_); + } + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public io.grafeas.v1.FileLocation.Builder addFileLocationBuilder() { + return getFileLocationFieldBuilder().addBuilder( + io.grafeas.v1.FileLocation.getDefaultInstance()); + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public io.grafeas.v1.FileLocation.Builder addFileLocationBuilder( + int index) { + return getFileLocationFieldBuilder().addBuilder( + index, io.grafeas.v1.FileLocation.getDefaultInstance()); + } + /** + *
+       * The location at which this package was found.
+       * 
+ * + * repeated .grafeas.v1.FileLocation file_location = 10; + */ + public java.util.List + getFileLocationBuilderList() { + return getFileLocationFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.FileLocation, io.grafeas.v1.FileLocation.Builder, io.grafeas.v1.FileLocationOrBuilder> + getFileLocationFieldBuilder() { + if (fileLocationBuilder_ == null) { + fileLocationBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.FileLocation, io.grafeas.v1.FileLocation.Builder, io.grafeas.v1.FileLocationOrBuilder>( + fileLocation_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + fileLocation_ = null; + } + return fileLocationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityOccurrence.PackageIssue) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityOccurrence.PackageIssue) + private static final io.grafeas.v1.VulnerabilityOccurrence.PackageIssue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityOccurrence.PackageIssue(); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PackageIssue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface VexAssessmentOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityOccurrence.VexAssessment) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * @return The cve. + */ + java.lang.String getCve(); + /** + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * @return The bytes for cve. + */ + com.google.protobuf.ByteString + getCveBytes(); + + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + java.util.List + getRelatedUrisList(); + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + io.grafeas.v1.RelatedUrl getRelatedUris(int index); + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + int getRelatedUrisCount(); + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + java.util.List + getRelatedUrisOrBuilderList(); + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder( + int index); + + /** + *
+     * The VulnerabilityAssessment note from which this VexAssessment was
+     * generated.
+     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+     * 
+ * + * string note_name = 3; + * @return The noteName. + */ + java.lang.String getNoteName(); + /** + *
+     * The VulnerabilityAssessment note from which this VexAssessment was
+     * generated.
+     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+     * 
+ * + * string note_name = 3; + * @return The bytes for noteName. + */ + com.google.protobuf.ByteString + getNoteNameBytes(); + + /** + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * @return The state. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState(); + + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * @return A list containing the impacts. + */ + java.util.List + getImpactsList(); + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * @return The count of impacts. + */ + int getImpactsCount(); + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * @param index The index of the element to return. + * @return The impacts at the given index. + */ + java.lang.String getImpacts(int index); + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * @param index The index of the value to return. + * @return The bytes of the impacts at the given index. + */ + com.google.protobuf.ByteString + getImpactsBytes(int index); + + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + java.util.List + getRemediationsList(); + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index); + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + int getRemediationsCount(); + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + java.util.List + getRemediationsOrBuilderList(); + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder getRemediationsOrBuilder( + int index); + + /** + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * @return Whether the justification field is set. + */ + boolean hasJustification(); + /** + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * @return The justification. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification(); + /** + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder getJustificationOrBuilder(); + } + /** + *
+   * VexAssessment provides all publisher provided Vex information that is
+   * related to this vulnerability.
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.VexAssessment} + */ + public static final class VexAssessment extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityOccurrence.VexAssessment) + VexAssessmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use VexAssessment.newBuilder() to construct. + private VexAssessment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VexAssessment() { + cve_ = ""; + relatedUris_ = java.util.Collections.emptyList(); + noteName_ = ""; + state_ = 0; + impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + remediations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VexAssessment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.class, io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder.class); + } + + public static final int CVE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cve_ = ""; + /** + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * @return The cve. + */ + @java.lang.Override + public java.lang.String getCve() { + java.lang.Object ref = cve_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cve_ = s; + return s; + } + } + /** + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * @return The bytes for cve. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCveBytes() { + java.lang.Object ref = cve_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cve_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATED_URIS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List relatedUris_; + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + @java.lang.Override + public java.util.List getRelatedUrisList() { + return relatedUris_; + } + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + @java.lang.Override + public java.util.List + getRelatedUrisOrBuilderList() { + return relatedUris_; + } + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + @java.lang.Override + public int getRelatedUrisCount() { + return relatedUris_.size(); + } + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrl getRelatedUris(int index) { + return relatedUris_.get(index); + } + /** + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder( + int index) { + return relatedUris_.get(index); + } + + public static final int NOTE_NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object noteName_ = ""; + /** + *
+     * The VulnerabilityAssessment note from which this VexAssessment was
+     * generated.
+     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+     * 
+ * + * string note_name = 3; + * @return The noteName. + */ + @java.lang.Override + public java.lang.String getNoteName() { + java.lang.Object ref = noteName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteName_ = s; + return s; + } + } + /** + *
+     * The VulnerabilityAssessment note from which this VexAssessment was
+     * generated.
+     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+     * 
+ * + * string note_name = 3; + * @return The bytes for noteName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNoteNameBytes() { + java.lang.Object ref = noteName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + noteName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + /** + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * @return The state. + */ + @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); + return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED : result; + } + + public static final int IMPACTS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList impacts_; + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * @return A list containing the impacts. + */ + public com.google.protobuf.ProtocolStringList + getImpactsList() { + return impacts_; + } + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * @return The count of impacts. + */ + public int getImpactsCount() { + return impacts_.size(); + } + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * @param index The index of the element to return. + * @return The impacts at the given index. + */ + public java.lang.String getImpacts(int index) { + return impacts_.get(index); + } + /** + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * @param index The index of the value to return. + * @return The bytes of the impacts at the given index. + */ + public com.google.protobuf.ByteString + getImpactsBytes(int index) { + return impacts_.getByteString(index); + } + + public static final int REMEDIATIONS_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private java.util.List remediations_; + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + @java.lang.Override + public java.util.List getRemediationsList() { + return remediations_; + } + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + @java.lang.Override + public java.util.List + getRemediationsOrBuilderList() { + return remediations_; + } + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + @java.lang.Override + public int getRemediationsCount() { + return remediations_.size(); + } + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index) { + return remediations_.get(index); + } + /** + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder getRemediationsOrBuilder( + int index) { + return remediations_.get(index); + } + + public static final int JUSTIFICATION_FIELD_NUMBER = 7; + private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_; + /** + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * @return Whether the justification field is set. + */ + @java.lang.Override + public boolean hasJustification() { + return justification_ != null; + } + /** + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * @return The justification. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() { + return justification_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; + } + /** + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder getJustificationOrBuilder() { + return justification_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cve_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cve_); + } + for (int i = 0; i < relatedUris_.size(); i++) { + output.writeMessage(2, relatedUris_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, noteName_); + } + if (state_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + for (int i = 0; i < impacts_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, impacts_.getRaw(i)); + } + for (int i = 0; i < remediations_.size(); i++) { + output.writeMessage(6, remediations_.get(i)); + } + if (justification_ != null) { + output.writeMessage(7, getJustification()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cve_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cve_); + } + for (int i = 0; i < relatedUris_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, relatedUris_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, noteName_); + } + if (state_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, state_); + } + { + int dataSize = 0; + for (int i = 0; i < impacts_.size(); i++) { + dataSize += computeStringSizeNoTag(impacts_.getRaw(i)); + } + size += dataSize; + size += 1 * getImpactsList().size(); + } + for (int i = 0; i < remediations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, remediations_.get(i)); + } + if (justification_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getJustification()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityOccurrence.VexAssessment)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment other = (io.grafeas.v1.VulnerabilityOccurrence.VexAssessment) obj; + + if (!getCve() + .equals(other.getCve())) return false; + if (!getRelatedUrisList() + .equals(other.getRelatedUrisList())) return false; + if (!getNoteName() + .equals(other.getNoteName())) return false; + if (state_ != other.state_) return false; + if (!getImpactsList() + .equals(other.getImpactsList())) return false; + if (!getRemediationsList() + .equals(other.getRemediationsList())) return false; + if (hasJustification() != other.hasJustification()) return false; + if (hasJustification()) { + if (!getJustification() + .equals(other.getJustification())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CVE_FIELD_NUMBER; + hash = (53 * hash) + getCve().hashCode(); + if (getRelatedUrisCount() > 0) { + hash = (37 * hash) + RELATED_URIS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedUrisList().hashCode(); + } + hash = (37 * hash) + NOTE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getNoteName().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getImpactsCount() > 0) { + hash = (37 * hash) + IMPACTS_FIELD_NUMBER; + hash = (53 * hash) + getImpactsList().hashCode(); + } + if (getRemediationsCount() > 0) { + hash = (37 * hash) + REMEDIATIONS_FIELD_NUMBER; + hash = (53 * hash) + getRemediationsList().hashCode(); + } + if (hasJustification()) { + hash = (37 * hash) + JUSTIFICATION_FIELD_NUMBER; + hash = (53 * hash) + getJustification().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * VexAssessment provides all publisher provided Vex information that is
+     * related to this vulnerability.
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.VexAssessment} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityOccurrence.VexAssessment) + io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.class, io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cve_ = ""; + if (relatedUrisBuilder_ == null) { + relatedUris_ = java.util.Collections.emptyList(); + } else { + relatedUris_ = null; + relatedUrisBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + noteName_ = ""; + state_ = 0; + impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + if (remediationsBuilder_ == null) { + remediations_ = java.util.Collections.emptyList(); + } else { + remediations_ = null; + remediationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + justification_ = null; + if (justificationBuilder_ != null) { + justificationBuilder_.dispose(); + justificationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment build() { + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment buildPartial() { + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result = new io.grafeas.v1.VulnerabilityOccurrence.VexAssessment(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result) { + if (relatedUrisBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + relatedUris_ = java.util.Collections.unmodifiableList(relatedUris_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.relatedUris_ = relatedUris_; + } else { + result.relatedUris_ = relatedUrisBuilder_.build(); + } + if (((bitField0_ & 0x00000010) != 0)) { + impacts_ = impacts_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.impacts_ = impacts_; + if (remediationsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + remediations_ = java.util.Collections.unmodifiableList(remediations_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.remediations_ = remediations_; + } else { + result.remediations_ = remediationsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cve_ = cve_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.noteName_ = noteName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.justification_ = justificationBuilder_ == null + ? justification_ + : justificationBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityOccurrence.VexAssessment) { + return mergeFrom((io.grafeas.v1.VulnerabilityOccurrence.VexAssessment)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment other) { + if (other == io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance()) return this; + if (!other.getCve().isEmpty()) { + cve_ = other.cve_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (relatedUrisBuilder_ == null) { + if (!other.relatedUris_.isEmpty()) { + if (relatedUris_.isEmpty()) { + relatedUris_ = other.relatedUris_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRelatedUrisIsMutable(); + relatedUris_.addAll(other.relatedUris_); + } + onChanged(); + } + } else { + if (!other.relatedUris_.isEmpty()) { + if (relatedUrisBuilder_.isEmpty()) { + relatedUrisBuilder_.dispose(); + relatedUrisBuilder_ = null; + relatedUris_ = other.relatedUris_; + bitField0_ = (bitField0_ & ~0x00000002); + relatedUrisBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRelatedUrisFieldBuilder() : null; + } else { + relatedUrisBuilder_.addAllMessages(other.relatedUris_); + } + } + } + if (!other.getNoteName().isEmpty()) { + noteName_ = other.noteName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.impacts_.isEmpty()) { + if (impacts_.isEmpty()) { + impacts_ = other.impacts_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureImpactsIsMutable(); + impacts_.addAll(other.impacts_); + } + onChanged(); + } + if (remediationsBuilder_ == null) { + if (!other.remediations_.isEmpty()) { + if (remediations_.isEmpty()) { + remediations_ = other.remediations_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureRemediationsIsMutable(); + remediations_.addAll(other.remediations_); + } + onChanged(); + } + } else { + if (!other.remediations_.isEmpty()) { + if (remediationsBuilder_.isEmpty()) { + remediationsBuilder_.dispose(); + remediationsBuilder_ = null; + remediations_ = other.remediations_; + bitField0_ = (bitField0_ & ~0x00000020); + remediationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRemediationsFieldBuilder() : null; + } else { + remediationsBuilder_.addAllMessages(other.remediations_); + } + } + } + if (other.hasJustification()) { + mergeJustification(other.getJustification()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cve_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + io.grafeas.v1.RelatedUrl m = + input.readMessage( + io.grafeas.v1.RelatedUrl.parser(), + extensionRegistry); + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.add(m); + } else { + relatedUrisBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + noteName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + ensureImpactsIsMutable(); + impacts_.add(s); + break; + } // case 42 + case 50: { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation m = + input.readMessage( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.parser(), + extensionRegistry); + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.add(m); + } else { + remediationsBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: { + input.readMessage( + getJustificationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cve_ = ""; + /** + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * @return The cve. + */ + public java.lang.String getCve() { + java.lang.Object ref = cve_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cve_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * @return The bytes for cve. + */ + public com.google.protobuf.ByteString + getCveBytes() { + java.lang.Object ref = cve_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cve_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * @param value The cve to set. + * @return This builder for chaining. + */ + public Builder setCve( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cve_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * @return This builder for chaining. + */ + public Builder clearCve() { + cve_ = getDefaultInstance().getCve(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * @param value The bytes for cve to set. + * @return This builder for chaining. + */ + public Builder setCveBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cve_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List relatedUris_ = + java.util.Collections.emptyList(); + private void ensureRelatedUrisIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + relatedUris_ = new java.util.ArrayList(relatedUris_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> relatedUrisBuilder_; + + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public java.util.List getRelatedUrisList() { + if (relatedUrisBuilder_ == null) { + return java.util.Collections.unmodifiableList(relatedUris_); + } else { + return relatedUrisBuilder_.getMessageList(); + } + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public int getRelatedUrisCount() { + if (relatedUrisBuilder_ == null) { + return relatedUris_.size(); + } else { + return relatedUrisBuilder_.getCount(); + } + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public io.grafeas.v1.RelatedUrl getRelatedUris(int index) { + if (relatedUrisBuilder_ == null) { + return relatedUris_.get(index); + } else { + return relatedUrisBuilder_.getMessage(index); + } + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder setRelatedUris( + int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrisIsMutable(); + relatedUris_.set(index, value); + onChanged(); + } else { + relatedUrisBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder setRelatedUris( + int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.set(index, builderForValue.build()); + onChanged(); + } else { + relatedUrisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder addRelatedUris(io.grafeas.v1.RelatedUrl value) { + if (relatedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrisIsMutable(); + relatedUris_.add(value); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder addRelatedUris( + int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrisIsMutable(); + relatedUris_.add(index, value); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder addRelatedUris( + io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.add(builderForValue.build()); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder addRelatedUris( + int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.add(index, builderForValue.build()); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder addAllRelatedUris( + java.lang.Iterable values) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relatedUris_); + onChanged(); + } else { + relatedUrisBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder clearRelatedUris() { + if (relatedUrisBuilder_ == null) { + relatedUris_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + relatedUrisBuilder_.clear(); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder removeRelatedUris(int index) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.remove(index); + onChanged(); + } else { + relatedUrisBuilder_.remove(index); + } + return this; + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public io.grafeas.v1.RelatedUrl.Builder getRelatedUrisBuilder( + int index) { + return getRelatedUrisFieldBuilder().getBuilder(index); + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder( + int index) { + if (relatedUrisBuilder_ == null) { + return relatedUris_.get(index); } else { + return relatedUrisBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public java.util.List + getRelatedUrisOrBuilderList() { + if (relatedUrisBuilder_ != null) { + return relatedUrisBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relatedUris_); + } + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder() { + return getRelatedUrisFieldBuilder().addBuilder( + io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder( + int index) { + return getRelatedUrisFieldBuilder().addBuilder( + index, io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public java.util.List + getRelatedUrisBuilderList() { + return getRelatedUrisFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> + getRelatedUrisFieldBuilder() { + if (relatedUrisBuilder_ == null) { + relatedUrisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder>( + relatedUris_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + relatedUris_ = null; + } + return relatedUrisBuilder_; + } + + private java.lang.Object noteName_ = ""; + /** + *
+       * The VulnerabilityAssessment note from which this VexAssessment was
+       * generated.
+       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+       * 
+ * + * string note_name = 3; + * @return The noteName. + */ + public java.lang.String getNoteName() { + java.lang.Object ref = noteName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The VulnerabilityAssessment note from which this VexAssessment was
+       * generated.
+       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+       * 
+ * + * string note_name = 3; + * @return The bytes for noteName. + */ + public com.google.protobuf.ByteString + getNoteNameBytes() { + java.lang.Object ref = noteName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + noteName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The VulnerabilityAssessment note from which this VexAssessment was
+       * generated.
+       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+       * 
+ * + * string note_name = 3; + * @param value The noteName to set. + * @return This builder for chaining. + */ + public Builder setNoteName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + noteName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The VulnerabilityAssessment note from which this VexAssessment was
+       * generated.
+       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+       * 
+ * + * string note_name = 3; + * @return This builder for chaining. + */ + public Builder clearNoteName() { + noteName_ = getDefaultInstance().getNoteName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * The VulnerabilityAssessment note from which this VexAssessment was
+       * generated.
+       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+       * 
+ * + * string note_name = 3; + * @param value The bytes for noteName to set. + * @return This builder for chaining. + */ + public Builder setNoteNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + noteName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int state_ = 0; + /** + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * @return The state. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); + return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED : result; + } + /** + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureImpactsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + impacts_ = new com.google.protobuf.LazyStringArrayList(impacts_); + bitField0_ |= 0x00000010; + } + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * @return A list containing the impacts. + */ + public com.google.protobuf.ProtocolStringList + getImpactsList() { + return impacts_.getUnmodifiableView(); + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * @return The count of impacts. + */ + public int getImpactsCount() { + return impacts_.size(); + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * @param index The index of the element to return. + * @return The impacts at the given index. + */ + public java.lang.String getImpacts(int index) { + return impacts_.get(index); + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * @param index The index of the value to return. + * @return The bytes of the impacts at the given index. + */ + public com.google.protobuf.ByteString + getImpactsBytes(int index) { + return impacts_.getByteString(index); + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * @param index The index to set the value at. + * @param value The impacts to set. + * @return This builder for chaining. + */ + public Builder setImpacts( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureImpactsIsMutable(); + impacts_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * @param value The impacts to add. + * @return This builder for chaining. + */ + public Builder addImpacts( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureImpactsIsMutable(); + impacts_.add(value); + onChanged(); + return this; + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * @param values The impacts to add. + * @return This builder for chaining. + */ + public Builder addAllImpacts( + java.lang.Iterable values) { + ensureImpactsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, impacts_); + onChanged(); + return this; + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * @return This builder for chaining. + */ + public Builder clearImpacts() { + impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * @param value The bytes of the impacts to add. + * @return This builder for chaining. + */ + public Builder addImpactsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureImpactsIsMutable(); + impacts_.add(value); + onChanged(); + return this; + } + + private java.util.List remediations_ = + java.util.Collections.emptyList(); + private void ensureRemediationsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + remediations_ = new java.util.ArrayList(remediations_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> remediationsBuilder_; + + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public java.util.List getRemediationsList() { + if (remediationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(remediations_); + } else { + return remediationsBuilder_.getMessageList(); + } + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public int getRemediationsCount() { + if (remediationsBuilder_ == null) { + return remediations_.size(); + } else { + return remediationsBuilder_.getCount(); + } + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index) { + if (remediationsBuilder_ == null) { + return remediations_.get(index); + } else { + return remediationsBuilder_.getMessage(index); + } + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public Builder setRemediations( + int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + if (remediationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemediationsIsMutable(); + remediations_.set(index, value); + onChanged(); + } else { + remediationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public Builder setRemediations( + int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder builderForValue) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.set(index, builderForValue.build()); + onChanged(); + } else { + remediationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public Builder addRemediations(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + if (remediationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemediationsIsMutable(); + remediations_.add(value); + onChanged(); + } else { + remediationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public Builder addRemediations( + int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + if (remediationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemediationsIsMutable(); + remediations_.add(index, value); + onChanged(); + } else { + remediationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public Builder addRemediations( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder builderForValue) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.add(builderForValue.build()); + onChanged(); + } else { + remediationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public Builder addRemediations( + int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder builderForValue) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.add(index, builderForValue.build()); + onChanged(); + } else { + remediationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public Builder addAllRemediations( + java.lang.Iterable values) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, remediations_); + onChanged(); + } else { + remediationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public Builder clearRemediations() { + if (remediationsBuilder_ == null) { + remediations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + remediationsBuilder_.clear(); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public Builder removeRemediations(int index) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.remove(index); + onChanged(); + } else { + remediationsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder getRemediationsBuilder( + int index) { + return getRemediationsFieldBuilder().getBuilder(index); + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder getRemediationsOrBuilder( + int index) { + if (remediationsBuilder_ == null) { + return remediations_.get(index); } else { + return remediationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public java.util.List + getRemediationsOrBuilderList() { + if (remediationsBuilder_ != null) { + return remediationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(remediations_); + } + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder addRemediationsBuilder() { + return getRemediationsFieldBuilder().addBuilder( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDefaultInstance()); + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder addRemediationsBuilder( + int index) { + return getRemediationsFieldBuilder().addBuilder( + index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDefaultInstance()); + } + /** + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + */ + public java.util.List + getRemediationsBuilderList() { + return getRemediationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + getRemediationsFieldBuilder() { + if (remediationsBuilder_ == null) { + remediationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder>( + remediations_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + remediations_ = null; + } + return remediationsBuilder_; + } + + private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> justificationBuilder_; + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * @return Whether the justification field is set. + */ + public boolean hasJustification() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * @return The justification. + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() { + if (justificationBuilder_ == null) { + return justification_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; + } else { + return justificationBuilder_.getMessage(); + } + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + public Builder setJustification(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { + if (justificationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + justification_ = value; + } else { + justificationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + public Builder setJustification( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder builderForValue) { + if (justificationBuilder_ == null) { + justification_ = builderForValue.build(); + } else { + justificationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + public Builder mergeJustification(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { + if (justificationBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + justification_ != null && + justification_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance()) { + getJustificationBuilder().mergeFrom(value); + } else { + justification_ = value; + } + } else { + justificationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + public Builder clearJustification() { + bitField0_ = (bitField0_ & ~0x00000040); + justification_ = null; + if (justificationBuilder_ != null) { + justificationBuilder_.dispose(); + justificationBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder getJustificationBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getJustificationFieldBuilder().getBuilder(); + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder getJustificationOrBuilder() { + if (justificationBuilder_ != null) { + return justificationBuilder_.getMessageOrBuilder(); + } else { + return justification_ == null ? + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; + } + } + /** + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> + getJustificationFieldBuilder() { + if (justificationBuilder_ == null) { + justificationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder>( + getJustification(), + getParentForChildren(), + isClean()); + justification_ = null; + } + return justificationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityOccurrence.VexAssessment) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityOccurrence.VexAssessment) + private static final io.grafeas.v1.VulnerabilityOccurrence.VexAssessment DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityOccurrence.VexAssessment(); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VexAssessment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems, node.js
+   * packages, etc.).
+   * 
+ * + * string type = 1; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems, node.js
+   * packages, etc.).
+   * 
+ * + * string type = 1; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEVERITY_FIELD_NUMBER = 2; + private int severity_ = 0; + /** + *
+   * Output only. The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override public int getSeverityValue() { + return severity_; + } + /** + *
+   * Output only. The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + @java.lang.Override public io.grafeas.v1.Severity getSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + + public static final int CVSS_SCORE_FIELD_NUMBER = 3; + private float cvssScore_ = 0F; + /** + *
+   * Output only. The CVSS score of this vulnerability. CVSS score is on a
+   * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
+   * severity.
+   * 
+ * + * float cvss_score = 3; + * @return The cvssScore. + */ + @java.lang.Override + public float getCvssScore() { + return cvssScore_; + } + + public static final int CVSSV3_FIELD_NUMBER = 10; + private io.grafeas.v1.CVSS cvssv3_; + /** + *
+   * The cvss v3 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + * @return Whether the cvssv3 field is set. + */ + @java.lang.Override + public boolean hasCvssv3() { + return cvssv3_ != null; + } + /** + *
+   * The cvss v3 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + * @return The cvssv3. + */ + @java.lang.Override + public io.grafeas.v1.CVSS getCvssv3() { + return cvssv3_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; + } + /** + *
+   * The cvss v3 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + @java.lang.Override + public io.grafeas.v1.CVSSOrBuilder getCvssv3OrBuilder() { + return cvssv3_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; + } + + public static final int PACKAGE_ISSUE_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List packageIssue_; + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + @java.lang.Override + public java.util.List getPackageIssueList() { + return packageIssue_; + } + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + @java.lang.Override + public java.util.List + getPackageIssueOrBuilderList() { + return packageIssue_; + } + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + @java.lang.Override + public int getPackageIssueCount() { + return packageIssue_.size(); + } + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getPackageIssue(int index) { + return packageIssue_.get(index); + } + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder getPackageIssueOrBuilder( + int index) { + return packageIssue_.get(index); + } + + public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object shortDescription_ = ""; + /** + *
+   * Output only. A one sentence description of this vulnerability.
+   * 
+ * + * string short_description = 5; + * @return The shortDescription. + */ + @java.lang.Override + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } + } + /** + *
+   * Output only. A one sentence description of this vulnerability.
+   * 
+ * + * string short_description = 5; + * @return The bytes for shortDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LONG_DESCRIPTION_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object longDescription_ = ""; + /** + *
+   * Output only. A detailed description of this vulnerability.
+   * 
+ * + * string long_description = 6; + * @return The longDescription. + */ + @java.lang.Override + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } + } + /** + *
+   * Output only. A detailed description of this vulnerability.
+   * 
+ * + * string long_description = 6; + * @return The bytes for longDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATED_URLS_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private java.util.List relatedUrls_; + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + @java.lang.Override + public java.util.List getRelatedUrlsList() { + return relatedUrls_; + } + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + @java.lang.Override + public java.util.List + getRelatedUrlsOrBuilderList() { + return relatedUrls_; + } + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + @java.lang.Override + public int getRelatedUrlsCount() { + return relatedUrls_.size(); + } + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrl getRelatedUrls(int index) { + return relatedUrls_.get(index); + } + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlsOrBuilder( + int index) { + return relatedUrls_.get(index); + } + + public static final int EFFECTIVE_SEVERITY_FIELD_NUMBER = 8; + private int effectiveSeverity_ = 0; + /** + *
+   * The distro assigned severity for this vulnerability when it is available,
+   * otherwise this is the note provider assigned severity.
+   * When there are multiple PackageIssues for this vulnerability, they can have
+   * different effective severities because some might be provided by the distro
+   * while others are provided by the language ecosystem for a language pack.
+   * For this reason, it is advised to use the effective severity on the
+   * PackageIssue level. In the case where multiple PackageIssues have differing
+   * effective severities, this field should be the highest severity for any of
+   * the PackageIssues.
+   * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @return The enum numeric value on the wire for effectiveSeverity. + */ + @java.lang.Override public int getEffectiveSeverityValue() { + return effectiveSeverity_; + } + /** + *
+   * The distro assigned severity for this vulnerability when it is available,
+   * otherwise this is the note provider assigned severity.
+   * When there are multiple PackageIssues for this vulnerability, they can have
+   * different effective severities because some might be provided by the distro
+   * while others are provided by the language ecosystem for a language pack.
+   * For this reason, it is advised to use the effective severity on the
+   * PackageIssue level. In the case where multiple PackageIssues have differing
+   * effective severities, this field should be the highest severity for any of
+   * the PackageIssues.
+   * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @return The effectiveSeverity. + */ + @java.lang.Override public io.grafeas.v1.Severity getEffectiveSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + + public static final int FIX_AVAILABLE_FIELD_NUMBER = 9; + private boolean fixAvailable_ = false; + /** + *
+   * Output only. Whether at least one of the affected packages has a fix
+   * available.
+   * 
+ * + * bool fix_available = 9; + * @return The fixAvailable. + */ + @java.lang.Override + public boolean getFixAvailable() { + return fixAvailable_; + } + + public static final int CVSS_VERSION_FIELD_NUMBER = 11; + private int cvssVersion_ = 0; + /** + *
+   * Output only. CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @return The enum numeric value on the wire for cvssVersion. + */ + @java.lang.Override public int getCvssVersionValue() { + return cvssVersion_; + } + /** + *
+   * Output only. CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @return The cvssVersion. + */ + @java.lang.Override public io.grafeas.v1.CVSSVersion getCvssVersion() { + io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); + return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; + } + + public static final int CVSS_V2_FIELD_NUMBER = 12; + private io.grafeas.v1.CVSS cvssV2_; + /** + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * @return Whether the cvssV2 field is set. + */ + @java.lang.Override + public boolean hasCvssV2() { + return cvssV2_ != null; + } + /** + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * @return The cvssV2. + */ + @java.lang.Override + public io.grafeas.v1.CVSS getCvssV2() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + /** + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + @java.lang.Override + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + + public static final int VEX_ASSESSMENT_FIELD_NUMBER = 13; + private io.grafeas.v1.VulnerabilityOccurrence.VexAssessment vexAssessment_; + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * @return Whether the vexAssessment field is set. + */ + @java.lang.Override + public boolean hasVexAssessment() { + return vexAssessment_ != null; + } + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * @return The vexAssessment. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getVexAssessment() { + return vexAssessment_ == null ? io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() : vexAssessment_; + } + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder getVexAssessmentOrBuilder() { + return vexAssessment_ == null ? io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() : vexAssessment_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + output.writeEnum(2, severity_); + } + if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { + output.writeFloat(3, cvssScore_); + } + for (int i = 0; i < packageIssue_.size(); i++) { + output.writeMessage(4, packageIssue_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, longDescription_); + } + for (int i = 0; i < relatedUrls_.size(); i++) { + output.writeMessage(7, relatedUrls_.get(i)); + } + if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + output.writeEnum(8, effectiveSeverity_); + } + if (fixAvailable_ != false) { + output.writeBool(9, fixAvailable_); + } + if (cvssv3_ != null) { + output.writeMessage(10, getCvssv3()); + } + if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { + output.writeEnum(11, cvssVersion_); + } + if (cvssV2_ != null) { + output.writeMessage(12, getCvssV2()); + } + if (vexAssessment_ != null) { + output.writeMessage(13, getVexAssessment()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, severity_); + } + if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, cvssScore_); + } + for (int i = 0; i < packageIssue_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, packageIssue_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, longDescription_); + } + for (int i = 0; i < relatedUrls_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, relatedUrls_.get(i)); + } + if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, effectiveSeverity_); + } + if (fixAvailable_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, fixAvailable_); + } + if (cvssv3_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getCvssv3()); + } + if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, cvssVersion_); + } + if (cvssV2_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getCvssV2()); + } + if (vexAssessment_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getVexAssessment()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityOccurrence other = (io.grafeas.v1.VulnerabilityOccurrence) obj; + + if (!getType() + .equals(other.getType())) return false; + if (severity_ != other.severity_) return false; + if (java.lang.Float.floatToIntBits(getCvssScore()) + != java.lang.Float.floatToIntBits( + other.getCvssScore())) return false; + if (hasCvssv3() != other.hasCvssv3()) return false; + if (hasCvssv3()) { + if (!getCvssv3() + .equals(other.getCvssv3())) return false; + } + if (!getPackageIssueList() + .equals(other.getPackageIssueList())) return false; + if (!getShortDescription() + .equals(other.getShortDescription())) return false; + if (!getLongDescription() + .equals(other.getLongDescription())) return false; + if (!getRelatedUrlsList() + .equals(other.getRelatedUrlsList())) return false; + if (effectiveSeverity_ != other.effectiveSeverity_) return false; + if (getFixAvailable() + != other.getFixAvailable()) return false; + if (cvssVersion_ != other.cvssVersion_) return false; + if (hasCvssV2() != other.hasCvssV2()) return false; + if (hasCvssV2()) { + if (!getCvssV2() + .equals(other.getCvssV2())) return false; + } + if (hasVexAssessment() != other.hasVexAssessment()) return false; + if (hasVexAssessment()) { + if (!getVexAssessment() + .equals(other.getVexAssessment())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + severity_; + hash = (37 * hash) + CVSS_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getCvssScore()); + if (hasCvssv3()) { + hash = (37 * hash) + CVSSV3_FIELD_NUMBER; + hash = (53 * hash) + getCvssv3().hashCode(); + } + if (getPackageIssueCount() > 0) { + hash = (37 * hash) + PACKAGE_ISSUE_FIELD_NUMBER; + hash = (53 * hash) + getPackageIssueList().hashCode(); + } + hash = (37 * hash) + SHORT_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getShortDescription().hashCode(); + hash = (37 * hash) + LONG_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getLongDescription().hashCode(); + if (getRelatedUrlsCount() > 0) { + hash = (37 * hash) + RELATED_URLS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedUrlsList().hashCode(); + } + hash = (37 * hash) + EFFECTIVE_SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + effectiveSeverity_; + hash = (37 * hash) + FIX_AVAILABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFixAvailable()); + hash = (37 * hash) + CVSS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + cvssVersion_; + if (hasCvssV2()) { + hash = (37 * hash) + CVSS_V2_FIELD_NUMBER; + hash = (53 * hash) + getCvssV2().hashCode(); + } + if (hasVexAssessment()) { + hash = (37 * hash) + VEX_ASSESSMENT_FIELD_NUMBER; + hash = (53 * hash) + getVexAssessment().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityOccurrence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An occurrence of a severity vulnerability on a resource.
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityOccurrence) + io.grafeas.v1.VulnerabilityOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityOccurrence.class, io.grafeas.v1.VulnerabilityOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityOccurrence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + severity_ = 0; + cvssScore_ = 0F; + cvssv3_ = null; + if (cvssv3Builder_ != null) { + cvssv3Builder_.dispose(); + cvssv3Builder_ = null; + } + if (packageIssueBuilder_ == null) { + packageIssue_ = java.util.Collections.emptyList(); + } else { + packageIssue_ = null; + packageIssueBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + shortDescription_ = ""; + longDescription_ = ""; + if (relatedUrlsBuilder_ == null) { + relatedUrls_ = java.util.Collections.emptyList(); + } else { + relatedUrls_ = null; + relatedUrlsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + effectiveSeverity_ = 0; + fixAvailable_ = false; + cvssVersion_ = 0; + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } + vexAssessment_ = null; + if (vexAssessmentBuilder_ != null) { + vexAssessmentBuilder_.dispose(); + vexAssessmentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence build() { + io.grafeas.v1.VulnerabilityOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence buildPartial() { + io.grafeas.v1.VulnerabilityOccurrence result = new io.grafeas.v1.VulnerabilityOccurrence(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityOccurrence result) { + if (packageIssueBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + packageIssue_ = java.util.Collections.unmodifiableList(packageIssue_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.packageIssue_ = packageIssue_; + } else { + result.packageIssue_ = packageIssueBuilder_.build(); + } + if (relatedUrlsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + relatedUrls_ = java.util.Collections.unmodifiableList(relatedUrls_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.relatedUrls_ = relatedUrls_; + } else { + result.relatedUrls_ = relatedUrlsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityOccurrence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.severity_ = severity_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cvssScore_ = cvssScore_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cvssv3_ = cvssv3Builder_ == null + ? cvssv3_ + : cvssv3Builder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.shortDescription_ = shortDescription_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.longDescription_ = longDescription_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.effectiveSeverity_ = effectiveSeverity_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.fixAvailable_ = fixAvailable_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.cvssVersion_ = cvssVersion_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.cvssV2_ = cvssV2Builder_ == null + ? cvssV2_ + : cvssV2Builder_.build(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.vexAssessment_ = vexAssessmentBuilder_ == null + ? vexAssessment_ + : vexAssessmentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityOccurrence) { + return mergeFrom((io.grafeas.v1.VulnerabilityOccurrence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence other) { + if (other == io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.severity_ != 0) { + setSeverityValue(other.getSeverityValue()); + } + if (other.getCvssScore() != 0F) { + setCvssScore(other.getCvssScore()); + } + if (other.hasCvssv3()) { + mergeCvssv3(other.getCvssv3()); + } + if (packageIssueBuilder_ == null) { + if (!other.packageIssue_.isEmpty()) { + if (packageIssue_.isEmpty()) { + packageIssue_ = other.packageIssue_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensurePackageIssueIsMutable(); + packageIssue_.addAll(other.packageIssue_); + } + onChanged(); + } + } else { + if (!other.packageIssue_.isEmpty()) { + if (packageIssueBuilder_.isEmpty()) { + packageIssueBuilder_.dispose(); + packageIssueBuilder_ = null; + packageIssue_ = other.packageIssue_; + bitField0_ = (bitField0_ & ~0x00000010); + packageIssueBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPackageIssueFieldBuilder() : null; + } else { + packageIssueBuilder_.addAllMessages(other.packageIssue_); + } + } + } + if (!other.getShortDescription().isEmpty()) { + shortDescription_ = other.shortDescription_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getLongDescription().isEmpty()) { + longDescription_ = other.longDescription_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (relatedUrlsBuilder_ == null) { + if (!other.relatedUrls_.isEmpty()) { + if (relatedUrls_.isEmpty()) { + relatedUrls_ = other.relatedUrls_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureRelatedUrlsIsMutable(); + relatedUrls_.addAll(other.relatedUrls_); + } + onChanged(); + } + } else { + if (!other.relatedUrls_.isEmpty()) { + if (relatedUrlsBuilder_.isEmpty()) { + relatedUrlsBuilder_.dispose(); + relatedUrlsBuilder_ = null; + relatedUrls_ = other.relatedUrls_; + bitField0_ = (bitField0_ & ~0x00000080); + relatedUrlsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRelatedUrlsFieldBuilder() : null; + } else { + relatedUrlsBuilder_.addAllMessages(other.relatedUrls_); + } + } + } + if (other.effectiveSeverity_ != 0) { + setEffectiveSeverityValue(other.getEffectiveSeverityValue()); + } + if (other.getFixAvailable() != false) { + setFixAvailable(other.getFixAvailable()); + } + if (other.cvssVersion_ != 0) { + setCvssVersionValue(other.getCvssVersionValue()); + } + if (other.hasCvssV2()) { + mergeCvssV2(other.getCvssV2()); + } + if (other.hasVexAssessment()) { + mergeVexAssessment(other.getVexAssessment()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + severity_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 29: { + cvssScore_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 34: { + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue m = + input.readMessage( + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.parser(), + extensionRegistry); + if (packageIssueBuilder_ == null) { + ensurePackageIssueIsMutable(); + packageIssue_.add(m); + } else { + packageIssueBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + shortDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: { + longDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 58: { + io.grafeas.v1.RelatedUrl m = + input.readMessage( + io.grafeas.v1.RelatedUrl.parser(), + extensionRegistry); + if (relatedUrlsBuilder_ == null) { + ensureRelatedUrlsIsMutable(); + relatedUrls_.add(m); + } else { + relatedUrlsBuilder_.addMessage(m); + } + break; + } // case 58 + case 64: { + effectiveSeverity_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 64 + case 72: { + fixAvailable_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 72 + case 82: { + input.readMessage( + getCvssv3FieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 82 + case 88: { + cvssVersion_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 98: { + input.readMessage( + getCvssV2FieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: { + input.readMessage( + getVexAssessmentFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 106 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems, node.js
+     * packages, etc.).
+     * 
+ * + * string type = 1; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems, node.js
+     * packages, etc.).
+     * 
+ * + * string type = 1; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems, node.js
+     * packages, etc.).
+     * 
+ * + * string type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems, node.js
+     * packages, etc.).
+     * 
+ * + * string type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The type of package; whether native or non native (e.g., ruby gems, node.js
+     * packages, etc.).
+     * 
+ * + * string type = 1; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int severity_ = 0; + /** + *
+     * Output only. The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override public int getSeverityValue() { + return severity_; + } + /** + *
+     * Output only. The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @param value The enum numeric value on the wire for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityValue(int value) { + severity_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + @java.lang.Override + public io.grafeas.v1.Severity getSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity(io.grafeas.v1.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + severity_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The note provider assigned severity of this vulnerability.
+     * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return This builder for chaining. + */ + public Builder clearSeverity() { + bitField0_ = (bitField0_ & ~0x00000002); + severity_ = 0; + onChanged(); + return this; + } + + private float cvssScore_ ; + /** + *
+     * Output only. The CVSS score of this vulnerability. CVSS score is on a
+     * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
+     * severity.
+     * 
+ * + * float cvss_score = 3; + * @return The cvssScore. + */ + @java.lang.Override + public float getCvssScore() { + return cvssScore_; + } + /** + *
+     * Output only. The CVSS score of this vulnerability. CVSS score is on a
+     * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
+     * severity.
+     * 
+ * + * float cvss_score = 3; + * @param value The cvssScore to set. + * @return This builder for chaining. + */ + public Builder setCvssScore(float value) { + + cvssScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The CVSS score of this vulnerability. CVSS score is on a
+     * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
+     * severity.
+     * 
+ * + * float cvss_score = 3; + * @return This builder for chaining. + */ + public Builder clearCvssScore() { + bitField0_ = (bitField0_ & ~0x00000004); + cvssScore_ = 0F; + onChanged(); + return this; + } + + private io.grafeas.v1.CVSS cvssv3_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> cvssv3Builder_; + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + * @return Whether the cvssv3 field is set. + */ + public boolean hasCvssv3() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + * @return The cvssv3. + */ + public io.grafeas.v1.CVSS getCvssv3() { + if (cvssv3Builder_ == null) { + return cvssv3_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; + } else { + return cvssv3Builder_.getMessage(); + } + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + public Builder setCvssv3(io.grafeas.v1.CVSS value) { + if (cvssv3Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cvssv3_ = value; + } else { + cvssv3Builder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + public Builder setCvssv3( + io.grafeas.v1.CVSS.Builder builderForValue) { + if (cvssv3Builder_ == null) { + cvssv3_ = builderForValue.build(); + } else { + cvssv3Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + public Builder mergeCvssv3(io.grafeas.v1.CVSS value) { + if (cvssv3Builder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + cvssv3_ != null && + cvssv3_ != io.grafeas.v1.CVSS.getDefaultInstance()) { + getCvssv3Builder().mergeFrom(value); + } else { + cvssv3_ = value; + } + } else { + cvssv3Builder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + public Builder clearCvssv3() { + bitField0_ = (bitField0_ & ~0x00000008); + cvssv3_ = null; + if (cvssv3Builder_ != null) { + cvssv3Builder_.dispose(); + cvssv3Builder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + public io.grafeas.v1.CVSS.Builder getCvssv3Builder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCvssv3FieldBuilder().getBuilder(); + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + public io.grafeas.v1.CVSSOrBuilder getCvssv3OrBuilder() { + if (cvssv3Builder_ != null) { + return cvssv3Builder_.getMessageOrBuilder(); + } else { + return cvssv3_ == null ? + io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; + } + } + /** + *
+     * The cvss v3 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> + getCvssv3FieldBuilder() { + if (cvssv3Builder_ == null) { + cvssv3Builder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( + getCvssv3(), + getParentForChildren(), + isClean()); + cvssv3_ = null; + } + return cvssv3Builder_; + } + + private java.util.List packageIssue_ = + java.util.Collections.emptyList(); + private void ensurePackageIssueIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + packageIssue_ = new java.util.ArrayList(packageIssue_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder, io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder> packageIssueBuilder_; + + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public java.util.List getPackageIssueList() { + if (packageIssueBuilder_ == null) { + return java.util.Collections.unmodifiableList(packageIssue_); + } else { + return packageIssueBuilder_.getMessageList(); + } + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public int getPackageIssueCount() { + if (packageIssueBuilder_ == null) { + return packageIssue_.size(); + } else { + return packageIssueBuilder_.getCount(); + } + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getPackageIssue(int index) { + if (packageIssueBuilder_ == null) { + return packageIssue_.get(index); + } else { + return packageIssueBuilder_.getMessage(index); + } + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder setPackageIssue( + int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue value) { + if (packageIssueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageIssueIsMutable(); + packageIssue_.set(index, value); + onChanged(); + } else { + packageIssueBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder setPackageIssue( + int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder builderForValue) { + if (packageIssueBuilder_ == null) { + ensurePackageIssueIsMutable(); + packageIssue_.set(index, builderForValue.build()); + onChanged(); + } else { + packageIssueBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder addPackageIssue(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue value) { + if (packageIssueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageIssueIsMutable(); + packageIssue_.add(value); + onChanged(); + } else { + packageIssueBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder addPackageIssue( + int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue value) { + if (packageIssueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageIssueIsMutable(); + packageIssue_.add(index, value); + onChanged(); + } else { + packageIssueBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder addPackageIssue( + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder builderForValue) { + if (packageIssueBuilder_ == null) { + ensurePackageIssueIsMutable(); + packageIssue_.add(builderForValue.build()); + onChanged(); + } else { + packageIssueBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder addPackageIssue( + int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder builderForValue) { + if (packageIssueBuilder_ == null) { + ensurePackageIssueIsMutable(); + packageIssue_.add(index, builderForValue.build()); + onChanged(); + } else { + packageIssueBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder addAllPackageIssue( + java.lang.Iterable values) { + if (packageIssueBuilder_ == null) { + ensurePackageIssueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, packageIssue_); + onChanged(); + } else { + packageIssueBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder clearPackageIssue() { + if (packageIssueBuilder_ == null) { + packageIssue_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + packageIssueBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public Builder removePackageIssue(int index) { + if (packageIssueBuilder_ == null) { + ensurePackageIssueIsMutable(); + packageIssue_.remove(index); + onChanged(); + } else { + packageIssueBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder getPackageIssueBuilder( + int index) { + return getPackageIssueFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder getPackageIssueOrBuilder( + int index) { + if (packageIssueBuilder_ == null) { + return packageIssue_.get(index); } else { + return packageIssueBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public java.util.List + getPackageIssueOrBuilderList() { + if (packageIssueBuilder_ != null) { + return packageIssueBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(packageIssue_); + } + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder addPackageIssueBuilder() { + return getPackageIssueFieldBuilder().addBuilder( + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance()); + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder addPackageIssueBuilder( + int index) { + return getPackageIssueFieldBuilder().addBuilder( + index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance()); + } + /** + *
+     * Required. The set of affected locations and their fixes (if available)
+     * within the associated resource.
+     * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + public java.util.List + getPackageIssueBuilderList() { + return getPackageIssueFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder, io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder> + getPackageIssueFieldBuilder() { + if (packageIssueBuilder_ == null) { + packageIssueBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder, io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder>( + packageIssue_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + packageIssue_ = null; + } + return packageIssueBuilder_; + } + + private java.lang.Object shortDescription_ = ""; + /** + *
+     * Output only. A one sentence description of this vulnerability.
+     * 
+ * + * string short_description = 5; + * @return The shortDescription. + */ + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. A one sentence description of this vulnerability.
+     * 
+ * + * string short_description = 5; + * @return The bytes for shortDescription. + */ + public com.google.protobuf.ByteString + getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. A one sentence description of this vulnerability.
+     * 
+ * + * string short_description = 5; + * @param value The shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + shortDescription_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. A one sentence description of this vulnerability.
+     * 
+ * + * string short_description = 5; + * @return This builder for chaining. + */ + public Builder clearShortDescription() { + shortDescription_ = getDefaultInstance().getShortDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Output only. A one sentence description of this vulnerability.
+     * 
+ * + * string short_description = 5; + * @param value The bytes for shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + shortDescription_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object longDescription_ = ""; + /** + *
+     * Output only. A detailed description of this vulnerability.
+     * 
+ * + * string long_description = 6; + * @return The longDescription. + */ + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. A detailed description of this vulnerability.
+     * 
+ * + * string long_description = 6; + * @return The bytes for longDescription. + */ + public com.google.protobuf.ByteString + getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. A detailed description of this vulnerability.
+     * 
+ * + * string long_description = 6; + * @param value The longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + longDescription_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. A detailed description of this vulnerability.
+     * 
+ * + * string long_description = 6; + * @return This builder for chaining. + */ + public Builder clearLongDescription() { + longDescription_ = getDefaultInstance().getLongDescription(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * Output only. A detailed description of this vulnerability.
+     * 
+ * + * string long_description = 6; + * @param value The bytes for longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + longDescription_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.util.List relatedUrls_ = + java.util.Collections.emptyList(); + private void ensureRelatedUrlsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + relatedUrls_ = new java.util.ArrayList(relatedUrls_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> relatedUrlsBuilder_; + + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public java.util.List getRelatedUrlsList() { + if (relatedUrlsBuilder_ == null) { + return java.util.Collections.unmodifiableList(relatedUrls_); + } else { + return relatedUrlsBuilder_.getMessageList(); + } + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public int getRelatedUrlsCount() { + if (relatedUrlsBuilder_ == null) { + return relatedUrls_.size(); + } else { + return relatedUrlsBuilder_.getCount(); + } + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public io.grafeas.v1.RelatedUrl getRelatedUrls(int index) { + if (relatedUrlsBuilder_ == null) { + return relatedUrls_.get(index); + } else { + return relatedUrlsBuilder_.getMessage(index); + } + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder setRelatedUrls( + int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrlsIsMutable(); + relatedUrls_.set(index, value); + onChanged(); + } else { + relatedUrlsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder setRelatedUrls( + int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrlsBuilder_ == null) { + ensureRelatedUrlsIsMutable(); + relatedUrls_.set(index, builderForValue.build()); + onChanged(); + } else { + relatedUrlsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder addRelatedUrls(io.grafeas.v1.RelatedUrl value) { + if (relatedUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrlsIsMutable(); + relatedUrls_.add(value); + onChanged(); + } else { + relatedUrlsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder addRelatedUrls( + int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrlsIsMutable(); + relatedUrls_.add(index, value); + onChanged(); + } else { + relatedUrlsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder addRelatedUrls( + io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrlsBuilder_ == null) { + ensureRelatedUrlsIsMutable(); + relatedUrls_.add(builderForValue.build()); + onChanged(); + } else { + relatedUrlsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder addRelatedUrls( + int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrlsBuilder_ == null) { + ensureRelatedUrlsIsMutable(); + relatedUrls_.add(index, builderForValue.build()); + onChanged(); + } else { + relatedUrlsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder addAllRelatedUrls( + java.lang.Iterable values) { + if (relatedUrlsBuilder_ == null) { + ensureRelatedUrlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relatedUrls_); + onChanged(); + } else { + relatedUrlsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder clearRelatedUrls() { + if (relatedUrlsBuilder_ == null) { + relatedUrls_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + relatedUrlsBuilder_.clear(); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public Builder removeRelatedUrls(int index) { + if (relatedUrlsBuilder_ == null) { + ensureRelatedUrlsIsMutable(); + relatedUrls_.remove(index); + onChanged(); + } else { + relatedUrlsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public io.grafeas.v1.RelatedUrl.Builder getRelatedUrlsBuilder( + int index) { + return getRelatedUrlsFieldBuilder().getBuilder(index); + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlsOrBuilder( + int index) { + if (relatedUrlsBuilder_ == null) { + return relatedUrls_.get(index); } else { + return relatedUrlsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public java.util.List + getRelatedUrlsOrBuilderList() { + if (relatedUrlsBuilder_ != null) { + return relatedUrlsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relatedUrls_); + } + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlsBuilder() { + return getRelatedUrlsFieldBuilder().addBuilder( + io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlsBuilder( + int index) { + return getRelatedUrlsFieldBuilder().addBuilder( + index, io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + *
+     * Output only. URLs related to this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + public java.util.List + getRelatedUrlsBuilderList() { + return getRelatedUrlsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> + getRelatedUrlsFieldBuilder() { + if (relatedUrlsBuilder_ == null) { + relatedUrlsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder>( + relatedUrls_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + relatedUrls_ = null; + } + return relatedUrlsBuilder_; + } + + private int effectiveSeverity_ = 0; + /** + *
+     * The distro assigned severity for this vulnerability when it is available,
+     * otherwise this is the note provider assigned severity.
+     * When there are multiple PackageIssues for this vulnerability, they can have
+     * different effective severities because some might be provided by the distro
+     * while others are provided by the language ecosystem for a language pack.
+     * For this reason, it is advised to use the effective severity on the
+     * PackageIssue level. In the case where multiple PackageIssues have differing
+     * effective severities, this field should be the highest severity for any of
+     * the PackageIssues.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @return The enum numeric value on the wire for effectiveSeverity. + */ + @java.lang.Override public int getEffectiveSeverityValue() { + return effectiveSeverity_; + } + /** + *
+     * The distro assigned severity for this vulnerability when it is available,
+     * otherwise this is the note provider assigned severity.
+     * When there are multiple PackageIssues for this vulnerability, they can have
+     * different effective severities because some might be provided by the distro
+     * while others are provided by the language ecosystem for a language pack.
+     * For this reason, it is advised to use the effective severity on the
+     * PackageIssue level. In the case where multiple PackageIssues have differing
+     * effective severities, this field should be the highest severity for any of
+     * the PackageIssues.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @param value The enum numeric value on the wire for effectiveSeverity to set. + * @return This builder for chaining. + */ + public Builder setEffectiveSeverityValue(int value) { + effectiveSeverity_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * The distro assigned severity for this vulnerability when it is available,
+     * otherwise this is the note provider assigned severity.
+     * When there are multiple PackageIssues for this vulnerability, they can have
+     * different effective severities because some might be provided by the distro
+     * while others are provided by the language ecosystem for a language pack.
+     * For this reason, it is advised to use the effective severity on the
+     * PackageIssue level. In the case where multiple PackageIssues have differing
+     * effective severities, this field should be the highest severity for any of
+     * the PackageIssues.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @return The effectiveSeverity. + */ + @java.lang.Override + public io.grafeas.v1.Severity getEffectiveSeverity() { + io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); + return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; + } + /** + *
+     * The distro assigned severity for this vulnerability when it is available,
+     * otherwise this is the note provider assigned severity.
+     * When there are multiple PackageIssues for this vulnerability, they can have
+     * different effective severities because some might be provided by the distro
+     * while others are provided by the language ecosystem for a language pack.
+     * For this reason, it is advised to use the effective severity on the
+     * PackageIssue level. In the case where multiple PackageIssues have differing
+     * effective severities, this field should be the highest severity for any of
+     * the PackageIssues.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @param value The effectiveSeverity to set. + * @return This builder for chaining. + */ + public Builder setEffectiveSeverity(io.grafeas.v1.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + effectiveSeverity_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The distro assigned severity for this vulnerability when it is available,
+     * otherwise this is the note provider assigned severity.
+     * When there are multiple PackageIssues for this vulnerability, they can have
+     * different effective severities because some might be provided by the distro
+     * while others are provided by the language ecosystem for a language pack.
+     * For this reason, it is advised to use the effective severity on the
+     * PackageIssue level. In the case where multiple PackageIssues have differing
+     * effective severities, this field should be the highest severity for any of
+     * the PackageIssues.
+     * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @return This builder for chaining. + */ + public Builder clearEffectiveSeverity() { + bitField0_ = (bitField0_ & ~0x00000100); + effectiveSeverity_ = 0; + onChanged(); + return this; + } + + private boolean fixAvailable_ ; + /** + *
+     * Output only. Whether at least one of the affected packages has a fix
+     * available.
+     * 
+ * + * bool fix_available = 9; + * @return The fixAvailable. + */ + @java.lang.Override + public boolean getFixAvailable() { + return fixAvailable_; + } + /** + *
+     * Output only. Whether at least one of the affected packages has a fix
+     * available.
+     * 
+ * + * bool fix_available = 9; + * @param value The fixAvailable to set. + * @return This builder for chaining. + */ + public Builder setFixAvailable(boolean value) { + + fixAvailable_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Output only. Whether at least one of the affected packages has a fix
+     * available.
+     * 
+ * + * bool fix_available = 9; + * @return This builder for chaining. + */ + public Builder clearFixAvailable() { + bitField0_ = (bitField0_ & ~0x00000200); + fixAvailable_ = false; + onChanged(); + return this; + } + + private int cvssVersion_ = 0; + /** + *
+     * Output only. CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @return The enum numeric value on the wire for cvssVersion. + */ + @java.lang.Override public int getCvssVersionValue() { + return cvssVersion_; + } + /** + *
+     * Output only. CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @param value The enum numeric value on the wire for cvssVersion to set. + * @return This builder for chaining. + */ + public Builder setCvssVersionValue(int value) { + cvssVersion_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * Output only. CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @return The cvssVersion. + */ + @java.lang.Override + public io.grafeas.v1.CVSSVersion getCvssVersion() { + io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); + return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; + } + /** + *
+     * Output only. CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @param value The cvssVersion to set. + * @return This builder for chaining. + */ + public Builder setCvssVersion(io.grafeas.v1.CVSSVersion value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + cvssVersion_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. CVSS version used to populate cvss_score and severity.
+     * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @return This builder for chaining. + */ + public Builder clearCvssVersion() { + bitField0_ = (bitField0_ & ~0x00000400); + cvssVersion_ = 0; + onChanged(); + return this; + } + + private io.grafeas.v1.CVSS cvssV2_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> cvssV2Builder_; + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * @return Whether the cvssV2 field is set. + */ + public boolean hasCvssV2() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * @return The cvssV2. + */ + public io.grafeas.v1.CVSS getCvssV2() { + if (cvssV2Builder_ == null) { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } else { + return cvssV2Builder_.getMessage(); + } + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder setCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cvssV2_ = value; + } else { + cvssV2Builder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder setCvssV2( + io.grafeas.v1.CVSS.Builder builderForValue) { + if (cvssV2Builder_ == null) { + cvssV2_ = builderForValue.build(); + } else { + cvssV2Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder mergeCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (((bitField0_ & 0x00000800) != 0) && + cvssV2_ != null && + cvssV2_ != io.grafeas.v1.CVSS.getDefaultInstance()) { + getCvssV2Builder().mergeFrom(value); + } else { + cvssV2_ = value; + } + } else { + cvssV2Builder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder clearCvssV2() { + bitField0_ = (bitField0_ & ~0x00000800); + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public io.grafeas.v1.CVSS.Builder getCvssV2Builder() { + bitField0_ |= 0x00000800; + onChanged(); + return getCvssV2FieldBuilder().getBuilder(); + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + if (cvssV2Builder_ != null) { + return cvssV2Builder_.getMessageOrBuilder(); + } else { + return cvssV2_ == null ? + io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + } + /** + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> + getCvssV2FieldBuilder() { + if (cvssV2Builder_ == null) { + cvssV2Builder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( + getCvssV2(), + getParentForChildren(), + isClean()); + cvssV2_ = null; + } + return cvssV2Builder_; + } + + private io.grafeas.v1.VulnerabilityOccurrence.VexAssessment vexAssessment_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment, io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder, io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder> vexAssessmentBuilder_; + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * @return Whether the vexAssessment field is set. + */ + public boolean hasVexAssessment() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * @return The vexAssessment. + */ + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getVexAssessment() { + if (vexAssessmentBuilder_ == null) { + return vexAssessment_ == null ? io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() : vexAssessment_; + } else { + return vexAssessmentBuilder_.getMessage(); + } + } + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + */ + public Builder setVexAssessment(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment value) { + if (vexAssessmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vexAssessment_ = value; + } else { + vexAssessmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + */ + public Builder setVexAssessment( + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder builderForValue) { + if (vexAssessmentBuilder_ == null) { + vexAssessment_ = builderForValue.build(); + } else { + vexAssessmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + */ + public Builder mergeVexAssessment(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment value) { + if (vexAssessmentBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) && + vexAssessment_ != null && + vexAssessment_ != io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance()) { + getVexAssessmentBuilder().mergeFrom(value); + } else { + vexAssessment_ = value; + } + } else { + vexAssessmentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + */ + public Builder clearVexAssessment() { + bitField0_ = (bitField0_ & ~0x00001000); + vexAssessment_ = null; + if (vexAssessmentBuilder_ != null) { + vexAssessmentBuilder_.dispose(); + vexAssessmentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + */ + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder getVexAssessmentBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getVexAssessmentFieldBuilder().getBuilder(); + } + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + */ + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder getVexAssessmentOrBuilder() { + if (vexAssessmentBuilder_ != null) { + return vexAssessmentBuilder_.getMessageOrBuilder(); + } else { + return vexAssessment_ == null ? + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() : vexAssessment_; + } + } + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment, io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder, io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder> + getVexAssessmentFieldBuilder() { + if (vexAssessmentBuilder_ == null) { + vexAssessmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment, io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder, io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder>( + getVexAssessment(), + getParentForChildren(), + isClean()); + vexAssessment_ = null; + } + return vexAssessmentBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityOccurrence) + private static final io.grafeas.v1.VulnerabilityOccurrence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityOccurrence(); + } + + public static io.grafeas.v1.VulnerabilityOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VulnerabilityOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java new file mode 100644 index 000000000000..df2a8b1f74cc --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java @@ -0,0 +1,329 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vulnerability.proto + +package io.grafeas.v1; + +public interface VulnerabilityOccurrenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems, node.js
+   * packages, etc.).
+   * 
+ * + * string type = 1; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * The type of package; whether native or non native (e.g., ruby gems, node.js
+   * packages, etc.).
+   * 
+ * + * string type = 1; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+   * Output only. The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The enum numeric value on the wire for severity. + */ + int getSeverityValue(); + /** + *
+   * Output only. The note provider assigned severity of this vulnerability.
+   * 
+ * + * .grafeas.v1.Severity severity = 2; + * @return The severity. + */ + io.grafeas.v1.Severity getSeverity(); + + /** + *
+   * Output only. The CVSS score of this vulnerability. CVSS score is on a
+   * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
+   * severity.
+   * 
+ * + * float cvss_score = 3; + * @return The cvssScore. + */ + float getCvssScore(); + + /** + *
+   * The cvss v3 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + * @return Whether the cvssv3 field is set. + */ + boolean hasCvssv3(); + /** + *
+   * The cvss v3 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + * @return The cvssv3. + */ + io.grafeas.v1.CVSS getCvssv3(); + /** + *
+   * The cvss v3 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvssv3 = 10; + */ + io.grafeas.v1.CVSSOrBuilder getCvssv3OrBuilder(); + + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + java.util.List + getPackageIssueList(); + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getPackageIssue(int index); + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + int getPackageIssueCount(); + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + java.util.List + getPackageIssueOrBuilderList(); + /** + *
+   * Required. The set of affected locations and their fixes (if available)
+   * within the associated resource.
+   * 
+ * + * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder getPackageIssueOrBuilder( + int index); + + /** + *
+   * Output only. A one sentence description of this vulnerability.
+   * 
+ * + * string short_description = 5; + * @return The shortDescription. + */ + java.lang.String getShortDescription(); + /** + *
+   * Output only. A one sentence description of this vulnerability.
+   * 
+ * + * string short_description = 5; + * @return The bytes for shortDescription. + */ + com.google.protobuf.ByteString + getShortDescriptionBytes(); + + /** + *
+   * Output only. A detailed description of this vulnerability.
+   * 
+ * + * string long_description = 6; + * @return The longDescription. + */ + java.lang.String getLongDescription(); + /** + *
+   * Output only. A detailed description of this vulnerability.
+   * 
+ * + * string long_description = 6; + * @return The bytes for longDescription. + */ + com.google.protobuf.ByteString + getLongDescriptionBytes(); + + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + java.util.List + getRelatedUrlsList(); + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + io.grafeas.v1.RelatedUrl getRelatedUrls(int index); + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + int getRelatedUrlsCount(); + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + java.util.List + getRelatedUrlsOrBuilderList(); + /** + *
+   * Output only. URLs related to this vulnerability.
+   * 
+ * + * repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlsOrBuilder( + int index); + + /** + *
+   * The distro assigned severity for this vulnerability when it is available,
+   * otherwise this is the note provider assigned severity.
+   * When there are multiple PackageIssues for this vulnerability, they can have
+   * different effective severities because some might be provided by the distro
+   * while others are provided by the language ecosystem for a language pack.
+   * For this reason, it is advised to use the effective severity on the
+   * PackageIssue level. In the case where multiple PackageIssues have differing
+   * effective severities, this field should be the highest severity for any of
+   * the PackageIssues.
+   * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @return The enum numeric value on the wire for effectiveSeverity. + */ + int getEffectiveSeverityValue(); + /** + *
+   * The distro assigned severity for this vulnerability when it is available,
+   * otherwise this is the note provider assigned severity.
+   * When there are multiple PackageIssues for this vulnerability, they can have
+   * different effective severities because some might be provided by the distro
+   * while others are provided by the language ecosystem for a language pack.
+   * For this reason, it is advised to use the effective severity on the
+   * PackageIssue level. In the case where multiple PackageIssues have differing
+   * effective severities, this field should be the highest severity for any of
+   * the PackageIssues.
+   * 
+ * + * .grafeas.v1.Severity effective_severity = 8; + * @return The effectiveSeverity. + */ + io.grafeas.v1.Severity getEffectiveSeverity(); + + /** + *
+   * Output only. Whether at least one of the affected packages has a fix
+   * available.
+   * 
+ * + * bool fix_available = 9; + * @return The fixAvailable. + */ + boolean getFixAvailable(); + + /** + *
+   * Output only. CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @return The enum numeric value on the wire for cvssVersion. + */ + int getCvssVersionValue(); + /** + *
+   * Output only. CVSS version used to populate cvss_score and severity.
+   * 
+ * + * .grafeas.v1.CVSSVersion cvss_version = 11; + * @return The cvssVersion. + */ + io.grafeas.v1.CVSSVersion getCvssVersion(); + + /** + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * @return Whether the cvssV2 field is set. + */ + boolean hasCvssV2(); + /** + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * @return The cvssV2. + */ + io.grafeas.v1.CVSS getCvssV2(); + /** + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder(); + + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * @return Whether the vexAssessment field is set. + */ + boolean hasVexAssessment(); + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * @return The vexAssessment. + */ + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getVexAssessment(); + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + */ + io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder getVexAssessmentOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java new file mode 100644 index 000000000000..1491d466fd35 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java @@ -0,0 +1,3538 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +/** + *
+ * Windows Update represents the metadata about the update for the Windows
+ * operating system. The fields in this message come from the Windows Update API
+ * documented at
+ * https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate.
+ * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate} + */ +public final class WindowsUpdate extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.WindowsUpdate) + WindowsUpdateOrBuilder { +private static final long serialVersionUID = 0L; + // Use WindowsUpdate.newBuilder() to construct. + private WindowsUpdate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WindowsUpdate() { + title_ = ""; + description_ = ""; + categories_ = java.util.Collections.emptyList(); + kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + supportUrl_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WindowsUpdate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.class, io.grafeas.v1.WindowsUpdate.Builder.class); + } + + public interface IdentityOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.WindowsUpdate.Identity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The revision independent identifier of the update.
+     * 
+ * + * string update_id = 1; + * @return The updateId. + */ + java.lang.String getUpdateId(); + /** + *
+     * The revision independent identifier of the update.
+     * 
+ * + * string update_id = 1; + * @return The bytes for updateId. + */ + com.google.protobuf.ByteString + getUpdateIdBytes(); + + /** + *
+     * The revision number of the update.
+     * 
+ * + * int32 revision = 2; + * @return The revision. + */ + int getRevision(); + } + /** + *
+   * The unique identifier of the update.
+   * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate.Identity} + */ + public static final class Identity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.WindowsUpdate.Identity) + IdentityOrBuilder { + private static final long serialVersionUID = 0L; + // Use Identity.newBuilder() to construct. + private Identity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Identity() { + updateId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Identity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.Identity.class, io.grafeas.v1.WindowsUpdate.Identity.Builder.class); + } + + public static final int UPDATE_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object updateId_ = ""; + /** + *
+     * The revision independent identifier of the update.
+     * 
+ * + * string update_id = 1; + * @return The updateId. + */ + @java.lang.Override + public java.lang.String getUpdateId() { + java.lang.Object ref = updateId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + updateId_ = s; + return s; + } + } + /** + *
+     * The revision independent identifier of the update.
+     * 
+ * + * string update_id = 1; + * @return The bytes for updateId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUpdateIdBytes() { + java.lang.Object ref = updateId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + updateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_FIELD_NUMBER = 2; + private int revision_ = 0; + /** + *
+     * The revision number of the update.
+     * 
+ * + * int32 revision = 2; + * @return The revision. + */ + @java.lang.Override + public int getRevision() { + return revision_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, updateId_); + } + if (revision_ != 0) { + output.writeInt32(2, revision_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, updateId_); + } + if (revision_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, revision_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.WindowsUpdate.Identity)) { + return super.equals(obj); + } + io.grafeas.v1.WindowsUpdate.Identity other = (io.grafeas.v1.WindowsUpdate.Identity) obj; + + if (!getUpdateId() + .equals(other.getUpdateId())) return false; + if (getRevision() + != other.getRevision()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + UPDATE_ID_FIELD_NUMBER; + hash = (53 * hash) + getUpdateId().hashCode(); + hash = (37 * hash) + REVISION_FIELD_NUMBER; + hash = (53 * hash) + getRevision(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.WindowsUpdate.Identity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * The unique identifier of the update.
+     * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate.Identity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.WindowsUpdate.Identity) + io.grafeas.v1.WindowsUpdate.IdentityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.Identity.class, io.grafeas.v1.WindowsUpdate.Identity.Builder.class); + } + + // Construct using io.grafeas.v1.WindowsUpdate.Identity.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateId_ = ""; + revision_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Identity getDefaultInstanceForType() { + return io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Identity build() { + io.grafeas.v1.WindowsUpdate.Identity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Identity buildPartial() { + io.grafeas.v1.WindowsUpdate.Identity result = new io.grafeas.v1.WindowsUpdate.Identity(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.WindowsUpdate.Identity result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateId_ = updateId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.revision_ = revision_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.WindowsUpdate.Identity) { + return mergeFrom((io.grafeas.v1.WindowsUpdate.Identity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.WindowsUpdate.Identity other) { + if (other == io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance()) return this; + if (!other.getUpdateId().isEmpty()) { + updateId_ = other.updateId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getRevision() != 0) { + setRevision(other.getRevision()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + updateId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + revision_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object updateId_ = ""; + /** + *
+       * The revision independent identifier of the update.
+       * 
+ * + * string update_id = 1; + * @return The updateId. + */ + public java.lang.String getUpdateId() { + java.lang.Object ref = updateId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + updateId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The revision independent identifier of the update.
+       * 
+ * + * string update_id = 1; + * @return The bytes for updateId. + */ + public com.google.protobuf.ByteString + getUpdateIdBytes() { + java.lang.Object ref = updateId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + updateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The revision independent identifier of the update.
+       * 
+ * + * string update_id = 1; + * @param value The updateId to set. + * @return This builder for chaining. + */ + public Builder setUpdateId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + updateId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The revision independent identifier of the update.
+       * 
+ * + * string update_id = 1; + * @return This builder for chaining. + */ + public Builder clearUpdateId() { + updateId_ = getDefaultInstance().getUpdateId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The revision independent identifier of the update.
+       * 
+ * + * string update_id = 1; + * @param value The bytes for updateId to set. + * @return This builder for chaining. + */ + public Builder setUpdateIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + updateId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int revision_ ; + /** + *
+       * The revision number of the update.
+       * 
+ * + * int32 revision = 2; + * @return The revision. + */ + @java.lang.Override + public int getRevision() { + return revision_; + } + /** + *
+       * The revision number of the update.
+       * 
+ * + * int32 revision = 2; + * @param value The revision to set. + * @return This builder for chaining. + */ + public Builder setRevision(int value) { + + revision_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The revision number of the update.
+       * 
+ * + * int32 revision = 2; + * @return This builder for chaining. + */ + public Builder clearRevision() { + bitField0_ = (bitField0_ & ~0x00000002); + revision_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.WindowsUpdate.Identity) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate.Identity) + private static final io.grafeas.v1.WindowsUpdate.Identity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.WindowsUpdate.Identity(); + } + + public static io.grafeas.v1.WindowsUpdate.Identity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Identity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Identity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CategoryOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.WindowsUpdate.Category) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The identifier of the category.
+     * 
+ * + * string category_id = 1; + * @return The categoryId. + */ + java.lang.String getCategoryId(); + /** + *
+     * The identifier of the category.
+     * 
+ * + * string category_id = 1; + * @return The bytes for categoryId. + */ + com.google.protobuf.ByteString + getCategoryIdBytes(); + + /** + *
+     * The localized name of the category.
+     * 
+ * + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * The localized name of the category.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + } + /** + *
+   * The category to which the update belongs.
+   * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate.Category} + */ + public static final class Category extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grafeas.v1.WindowsUpdate.Category) + CategoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Category.newBuilder() to construct. + private Category(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Category() { + categoryId_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Category(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.Category.class, io.grafeas.v1.WindowsUpdate.Category.Builder.class); + } + + public static final int CATEGORY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object categoryId_ = ""; + /** + *
+     * The identifier of the category.
+     * 
+ * + * string category_id = 1; + * @return The categoryId. + */ + @java.lang.Override + public java.lang.String getCategoryId() { + java.lang.Object ref = categoryId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + categoryId_ = s; + return s; + } + } + /** + *
+     * The identifier of the category.
+     * 
+ * + * string category_id = 1; + * @return The bytes for categoryId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCategoryIdBytes() { + java.lang.Object ref = categoryId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + categoryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+     * The localized name of the category.
+     * 
+ * + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+     * The localized name of the category.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(categoryId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, categoryId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(categoryId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, categoryId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.WindowsUpdate.Category)) { + return super.equals(obj); + } + io.grafeas.v1.WindowsUpdate.Category other = (io.grafeas.v1.WindowsUpdate.Category) obj; + + if (!getCategoryId() + .equals(other.getCategoryId())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CATEGORY_ID_FIELD_NUMBER; + hash = (53 * hash) + getCategoryId().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Category parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate.Category parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.WindowsUpdate.Category prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * The category to which the update belongs.
+     * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate.Category} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.WindowsUpdate.Category) + io.grafeas.v1.WindowsUpdate.CategoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.Category.class, io.grafeas.v1.WindowsUpdate.Category.Builder.class); + } + + // Construct using io.grafeas.v1.WindowsUpdate.Category.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + categoryId_ = ""; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Category getDefaultInstanceForType() { + return io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Category build() { + io.grafeas.v1.WindowsUpdate.Category result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Category buildPartial() { + io.grafeas.v1.WindowsUpdate.Category result = new io.grafeas.v1.WindowsUpdate.Category(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.WindowsUpdate.Category result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.categoryId_ = categoryId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.WindowsUpdate.Category) { + return mergeFrom((io.grafeas.v1.WindowsUpdate.Category)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.WindowsUpdate.Category other) { + if (other == io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance()) return this; + if (!other.getCategoryId().isEmpty()) { + categoryId_ = other.categoryId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + categoryId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object categoryId_ = ""; + /** + *
+       * The identifier of the category.
+       * 
+ * + * string category_id = 1; + * @return The categoryId. + */ + public java.lang.String getCategoryId() { + java.lang.Object ref = categoryId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + categoryId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The identifier of the category.
+       * 
+ * + * string category_id = 1; + * @return The bytes for categoryId. + */ + public com.google.protobuf.ByteString + getCategoryIdBytes() { + java.lang.Object ref = categoryId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + categoryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The identifier of the category.
+       * 
+ * + * string category_id = 1; + * @param value The categoryId to set. + * @return This builder for chaining. + */ + public Builder setCategoryId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + categoryId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The identifier of the category.
+       * 
+ * + * string category_id = 1; + * @return This builder for chaining. + */ + public Builder clearCategoryId() { + categoryId_ = getDefaultInstance().getCategoryId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The identifier of the category.
+       * 
+ * + * string category_id = 1; + * @param value The bytes for categoryId to set. + * @return This builder for chaining. + */ + public Builder setCategoryIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + categoryId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * The localized name of the category.
+       * 
+ * + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The localized name of the category.
+       * 
+ * + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The localized name of the category.
+       * 
+ * + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The localized name of the category.
+       * 
+ * + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * The localized name of the category.
+       * 
+ * + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.WindowsUpdate.Category) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate.Category) + private static final io.grafeas.v1.WindowsUpdate.Category DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.WindowsUpdate.Category(); + } + + public static io.grafeas.v1.WindowsUpdate.Category getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Category parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Category getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int IDENTITY_FIELD_NUMBER = 1; + private io.grafeas.v1.WindowsUpdate.Identity identity_; + /** + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * @return Whether the identity field is set. + */ + @java.lang.Override + public boolean hasIdentity() { + return identity_ != null; + } + /** + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * @return The identity. + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Identity getIdentity() { + return identity_ == null ? io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; + } + /** + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.IdentityOrBuilder getIdentityOrBuilder() { + return identity_ == null ? io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; + } + + public static final int TITLE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + *
+   * The localized title of the update.
+   * 
+ * + * string title = 2; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + *
+   * The localized title of the update.
+   * 
+ * + * string title = 2; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * The localized description of the update.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The localized description of the update.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CATEGORIES_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List categories_; + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + @java.lang.Override + public java.util.List getCategoriesList() { + return categories_; + } + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + @java.lang.Override + public java.util.List + getCategoriesOrBuilderList() { + return categories_; + } + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + @java.lang.Override + public int getCategoriesCount() { + return categories_.size(); + } + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Category getCategories(int index) { + return categories_.get(index); + } + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.CategoryOrBuilder getCategoriesOrBuilder( + int index) { + return categories_.get(index); + } + + public static final int KB_ARTICLE_IDS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList kbArticleIds_; + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @return A list containing the kbArticleIds. + */ + public com.google.protobuf.ProtocolStringList + getKbArticleIdsList() { + return kbArticleIds_; + } + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @return The count of kbArticleIds. + */ + public int getKbArticleIdsCount() { + return kbArticleIds_.size(); + } + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @param index The index of the element to return. + * @return The kbArticleIds at the given index. + */ + public java.lang.String getKbArticleIds(int index) { + return kbArticleIds_.get(index); + } + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @param index The index of the value to return. + * @return The bytes of the kbArticleIds at the given index. + */ + public com.google.protobuf.ByteString + getKbArticleIdsBytes(int index) { + return kbArticleIds_.getByteString(index); + } + + public static final int SUPPORT_URL_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object supportUrl_ = ""; + /** + *
+   * The hyperlink to the support information for the update.
+   * 
+ * + * string support_url = 6; + * @return The supportUrl. + */ + @java.lang.Override + public java.lang.String getSupportUrl() { + java.lang.Object ref = supportUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + supportUrl_ = s; + return s; + } + } + /** + *
+   * The hyperlink to the support information for the update.
+   * 
+ * + * string support_url = 6; + * @return The bytes for supportUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSupportUrlBytes() { + java.lang.Object ref = supportUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + supportUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_PUBLISHED_TIMESTAMP_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp lastPublishedTimestamp_; + /** + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * @return Whether the lastPublishedTimestamp field is set. + */ + @java.lang.Override + public boolean hasLastPublishedTimestamp() { + return lastPublishedTimestamp_ != null; + } + /** + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * @return The lastPublishedTimestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastPublishedTimestamp() { + return lastPublishedTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; + } + /** + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastPublishedTimestampOrBuilder() { + return lastPublishedTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (identity_ != null) { + output.writeMessage(1, getIdentity()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + for (int i = 0; i < categories_.size(); i++) { + output.writeMessage(4, categories_.get(i)); + } + for (int i = 0; i < kbArticleIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, kbArticleIds_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(supportUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, supportUrl_); + } + if (lastPublishedTimestamp_ != null) { + output.writeMessage(7, getLastPublishedTimestamp()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (identity_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getIdentity()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + for (int i = 0; i < categories_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, categories_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < kbArticleIds_.size(); i++) { + dataSize += computeStringSizeNoTag(kbArticleIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getKbArticleIdsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(supportUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, supportUrl_); + } + if (lastPublishedTimestamp_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getLastPublishedTimestamp()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.WindowsUpdate)) { + return super.equals(obj); + } + io.grafeas.v1.WindowsUpdate other = (io.grafeas.v1.WindowsUpdate) obj; + + if (hasIdentity() != other.hasIdentity()) return false; + if (hasIdentity()) { + if (!getIdentity() + .equals(other.getIdentity())) return false; + } + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getCategoriesList() + .equals(other.getCategoriesList())) return false; + if (!getKbArticleIdsList() + .equals(other.getKbArticleIdsList())) return false; + if (!getSupportUrl() + .equals(other.getSupportUrl())) return false; + if (hasLastPublishedTimestamp() != other.hasLastPublishedTimestamp()) return false; + if (hasLastPublishedTimestamp()) { + if (!getLastPublishedTimestamp() + .equals(other.getLastPublishedTimestamp())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasIdentity()) { + hash = (37 * hash) + IDENTITY_FIELD_NUMBER; + hash = (53 * hash) + getIdentity().hashCode(); + } + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getCategoriesCount() > 0) { + hash = (37 * hash) + CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + getCategoriesList().hashCode(); + } + if (getKbArticleIdsCount() > 0) { + hash = (37 * hash) + KB_ARTICLE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getKbArticleIdsList().hashCode(); + } + hash = (37 * hash) + SUPPORT_URL_FIELD_NUMBER; + hash = (53 * hash) + getSupportUrl().hashCode(); + if (hasLastPublishedTimestamp()) { + hash = (37 * hash) + LAST_PUBLISHED_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getLastPublishedTimestamp().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.WindowsUpdate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grafeas.v1.WindowsUpdate parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grafeas.v1.WindowsUpdate parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grafeas.v1.WindowsUpdate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grafeas.v1.WindowsUpdate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Windows Update represents the metadata about the update for the Windows
+   * operating system. The fields in this message come from the Windows Update API
+   * documented at
+   * https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate.
+   * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.WindowsUpdate) + io.grafeas.v1.WindowsUpdateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.class, io.grafeas.v1.WindowsUpdate.Builder.class); + } + + // Construct using io.grafeas.v1.WindowsUpdate.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + identity_ = null; + if (identityBuilder_ != null) { + identityBuilder_.dispose(); + identityBuilder_ = null; + } + title_ = ""; + description_ = ""; + if (categoriesBuilder_ == null) { + categories_ = java.util.Collections.emptyList(); + } else { + categories_ = null; + categoriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + supportUrl_ = ""; + lastPublishedTimestamp_ = null; + if (lastPublishedTimestampBuilder_ != null) { + lastPublishedTimestampBuilder_.dispose(); + lastPublishedTimestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate getDefaultInstanceForType() { + return io.grafeas.v1.WindowsUpdate.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate build() { + io.grafeas.v1.WindowsUpdate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate buildPartial() { + io.grafeas.v1.WindowsUpdate result = new io.grafeas.v1.WindowsUpdate(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.grafeas.v1.WindowsUpdate result) { + if (categoriesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + categories_ = java.util.Collections.unmodifiableList(categories_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.categories_ = categories_; + } else { + result.categories_ = categoriesBuilder_.build(); + } + if (((bitField0_ & 0x00000010) != 0)) { + kbArticleIds_ = kbArticleIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.kbArticleIds_ = kbArticleIds_; + } + + private void buildPartial0(io.grafeas.v1.WindowsUpdate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.identity_ = identityBuilder_ == null + ? identity_ + : identityBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.supportUrl_ = supportUrl_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.lastPublishedTimestamp_ = lastPublishedTimestampBuilder_ == null + ? lastPublishedTimestamp_ + : lastPublishedTimestampBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.WindowsUpdate) { + return mergeFrom((io.grafeas.v1.WindowsUpdate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.WindowsUpdate other) { + if (other == io.grafeas.v1.WindowsUpdate.getDefaultInstance()) return this; + if (other.hasIdentity()) { + mergeIdentity(other.getIdentity()); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (categoriesBuilder_ == null) { + if (!other.categories_.isEmpty()) { + if (categories_.isEmpty()) { + categories_ = other.categories_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureCategoriesIsMutable(); + categories_.addAll(other.categories_); + } + onChanged(); + } + } else { + if (!other.categories_.isEmpty()) { + if (categoriesBuilder_.isEmpty()) { + categoriesBuilder_.dispose(); + categoriesBuilder_ = null; + categories_ = other.categories_; + bitField0_ = (bitField0_ & ~0x00000008); + categoriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCategoriesFieldBuilder() : null; + } else { + categoriesBuilder_.addAllMessages(other.categories_); + } + } + } + if (!other.kbArticleIds_.isEmpty()) { + if (kbArticleIds_.isEmpty()) { + kbArticleIds_ = other.kbArticleIds_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureKbArticleIdsIsMutable(); + kbArticleIds_.addAll(other.kbArticleIds_); + } + onChanged(); + } + if (!other.getSupportUrl().isEmpty()) { + supportUrl_ = other.supportUrl_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasLastPublishedTimestamp()) { + mergeLastPublishedTimestamp(other.getLastPublishedTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getIdentityFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + io.grafeas.v1.WindowsUpdate.Category m = + input.readMessage( + io.grafeas.v1.WindowsUpdate.Category.parser(), + extensionRegistry); + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.add(m); + } else { + categoriesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + ensureKbArticleIdsIsMutable(); + kbArticleIds_.add(s); + break; + } // case 42 + case 50: { + supportUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getLastPublishedTimestampFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.grafeas.v1.WindowsUpdate.Identity identity_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Identity, io.grafeas.v1.WindowsUpdate.Identity.Builder, io.grafeas.v1.WindowsUpdate.IdentityOrBuilder> identityBuilder_; + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * @return Whether the identity field is set. + */ + public boolean hasIdentity() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * @return The identity. + */ + public io.grafeas.v1.WindowsUpdate.Identity getIdentity() { + if (identityBuilder_ == null) { + return identity_ == null ? io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; + } else { + return identityBuilder_.getMessage(); + } + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public Builder setIdentity(io.grafeas.v1.WindowsUpdate.Identity value) { + if (identityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + identity_ = value; + } else { + identityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public Builder setIdentity( + io.grafeas.v1.WindowsUpdate.Identity.Builder builderForValue) { + if (identityBuilder_ == null) { + identity_ = builderForValue.build(); + } else { + identityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public Builder mergeIdentity(io.grafeas.v1.WindowsUpdate.Identity value) { + if (identityBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + identity_ != null && + identity_ != io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance()) { + getIdentityBuilder().mergeFrom(value); + } else { + identity_ = value; + } + } else { + identityBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public Builder clearIdentity() { + bitField0_ = (bitField0_ & ~0x00000001); + identity_ = null; + if (identityBuilder_ != null) { + identityBuilder_.dispose(); + identityBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public io.grafeas.v1.WindowsUpdate.Identity.Builder getIdentityBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getIdentityFieldBuilder().getBuilder(); + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public io.grafeas.v1.WindowsUpdate.IdentityOrBuilder getIdentityOrBuilder() { + if (identityBuilder_ != null) { + return identityBuilder_.getMessageOrBuilder(); + } else { + return identity_ == null ? + io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; + } + } + /** + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Identity, io.grafeas.v1.WindowsUpdate.Identity.Builder, io.grafeas.v1.WindowsUpdate.IdentityOrBuilder> + getIdentityFieldBuilder() { + if (identityBuilder_ == null) { + identityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Identity, io.grafeas.v1.WindowsUpdate.Identity.Builder, io.grafeas.v1.WindowsUpdate.IdentityOrBuilder>( + getIdentity(), + getParentForChildren(), + isClean()); + identity_ = null; + } + return identityBuilder_; + } + + private java.lang.Object title_ = ""; + /** + *
+     * The localized title of the update.
+     * 
+ * + * string title = 2; + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The localized title of the update.
+     * 
+ * + * string title = 2; + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The localized title of the update.
+     * 
+ * + * string title = 2; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The localized title of the update.
+     * 
+ * + * string title = 2; + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The localized title of the update.
+     * 
+ * + * string title = 2; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The localized description of the update.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The localized description of the update.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The localized description of the update.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The localized description of the update.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The localized description of the update.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List categories_ = + java.util.Collections.emptyList(); + private void ensureCategoriesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + categories_ = new java.util.ArrayList(categories_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Category, io.grafeas.v1.WindowsUpdate.Category.Builder, io.grafeas.v1.WindowsUpdate.CategoryOrBuilder> categoriesBuilder_; + + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public java.util.List getCategoriesList() { + if (categoriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(categories_); + } else { + return categoriesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public int getCategoriesCount() { + if (categoriesBuilder_ == null) { + return categories_.size(); + } else { + return categoriesBuilder_.getCount(); + } + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.Category getCategories(int index) { + if (categoriesBuilder_ == null) { + return categories_.get(index); + } else { + return categoriesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder setCategories( + int index, io.grafeas.v1.WindowsUpdate.Category value) { + if (categoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.set(index, value); + onChanged(); + } else { + categoriesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder setCategories( + int index, io.grafeas.v1.WindowsUpdate.Category.Builder builderForValue) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.set(index, builderForValue.build()); + onChanged(); + } else { + categoriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder addCategories(io.grafeas.v1.WindowsUpdate.Category value) { + if (categoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.add(value); + onChanged(); + } else { + categoriesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder addCategories( + int index, io.grafeas.v1.WindowsUpdate.Category value) { + if (categoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.add(index, value); + onChanged(); + } else { + categoriesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder addCategories( + io.grafeas.v1.WindowsUpdate.Category.Builder builderForValue) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.add(builderForValue.build()); + onChanged(); + } else { + categoriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder addCategories( + int index, io.grafeas.v1.WindowsUpdate.Category.Builder builderForValue) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.add(index, builderForValue.build()); + onChanged(); + } else { + categoriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder addAllCategories( + java.lang.Iterable values) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, categories_); + onChanged(); + } else { + categoriesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder clearCategories() { + if (categoriesBuilder_ == null) { + categories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + categoriesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder removeCategories(int index) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.remove(index); + onChanged(); + } else { + categoriesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.Category.Builder getCategoriesBuilder( + int index) { + return getCategoriesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.CategoryOrBuilder getCategoriesOrBuilder( + int index) { + if (categoriesBuilder_ == null) { + return categories_.get(index); } else { + return categoriesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public java.util.List + getCategoriesOrBuilderList() { + if (categoriesBuilder_ != null) { + return categoriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(categories_); + } + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.Category.Builder addCategoriesBuilder() { + return getCategoriesFieldBuilder().addBuilder( + io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance()); + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.Category.Builder addCategoriesBuilder( + int index) { + return getCategoriesFieldBuilder().addBuilder( + index, io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance()); + } + /** + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public java.util.List + getCategoriesBuilderList() { + return getCategoriesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Category, io.grafeas.v1.WindowsUpdate.Category.Builder, io.grafeas.v1.WindowsUpdate.CategoryOrBuilder> + getCategoriesFieldBuilder() { + if (categoriesBuilder_ == null) { + categoriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Category, io.grafeas.v1.WindowsUpdate.Category.Builder, io.grafeas.v1.WindowsUpdate.CategoryOrBuilder>( + categories_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + categories_ = null; + } + return categoriesBuilder_; + } + + private com.google.protobuf.LazyStringList kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureKbArticleIdsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + kbArticleIds_ = new com.google.protobuf.LazyStringArrayList(kbArticleIds_); + bitField0_ |= 0x00000010; + } + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @return A list containing the kbArticleIds. + */ + public com.google.protobuf.ProtocolStringList + getKbArticleIdsList() { + return kbArticleIds_.getUnmodifiableView(); + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @return The count of kbArticleIds. + */ + public int getKbArticleIdsCount() { + return kbArticleIds_.size(); + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @param index The index of the element to return. + * @return The kbArticleIds at the given index. + */ + public java.lang.String getKbArticleIds(int index) { + return kbArticleIds_.get(index); + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @param index The index of the value to return. + * @return The bytes of the kbArticleIds at the given index. + */ + public com.google.protobuf.ByteString + getKbArticleIdsBytes(int index) { + return kbArticleIds_.getByteString(index); + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @param index The index to set the value at. + * @param value The kbArticleIds to set. + * @return This builder for chaining. + */ + public Builder setKbArticleIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureKbArticleIdsIsMutable(); + kbArticleIds_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @param value The kbArticleIds to add. + * @return This builder for chaining. + */ + public Builder addKbArticleIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureKbArticleIdsIsMutable(); + kbArticleIds_.add(value); + onChanged(); + return this; + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @param values The kbArticleIds to add. + * @return This builder for chaining. + */ + public Builder addAllKbArticleIds( + java.lang.Iterable values) { + ensureKbArticleIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, kbArticleIds_); + onChanged(); + return this; + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @return This builder for chaining. + */ + public Builder clearKbArticleIds() { + kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * @param value The bytes of the kbArticleIds to add. + * @return This builder for chaining. + */ + public Builder addKbArticleIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureKbArticleIdsIsMutable(); + kbArticleIds_.add(value); + onChanged(); + return this; + } + + private java.lang.Object supportUrl_ = ""; + /** + *
+     * The hyperlink to the support information for the update.
+     * 
+ * + * string support_url = 6; + * @return The supportUrl. + */ + public java.lang.String getSupportUrl() { + java.lang.Object ref = supportUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + supportUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The hyperlink to the support information for the update.
+     * 
+ * + * string support_url = 6; + * @return The bytes for supportUrl. + */ + public com.google.protobuf.ByteString + getSupportUrlBytes() { + java.lang.Object ref = supportUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + supportUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The hyperlink to the support information for the update.
+     * 
+ * + * string support_url = 6; + * @param value The supportUrl to set. + * @return This builder for chaining. + */ + public Builder setSupportUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + supportUrl_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The hyperlink to the support information for the update.
+     * 
+ * + * string support_url = 6; + * @return This builder for chaining. + */ + public Builder clearSupportUrl() { + supportUrl_ = getDefaultInstance().getSupportUrl(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The hyperlink to the support information for the update.
+     * 
+ * + * string support_url = 6; + * @param value The bytes for supportUrl to set. + * @return This builder for chaining. + */ + public Builder setSupportUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + supportUrl_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastPublishedTimestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastPublishedTimestampBuilder_; + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * @return Whether the lastPublishedTimestamp field is set. + */ + public boolean hasLastPublishedTimestamp() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * @return The lastPublishedTimestamp. + */ + public com.google.protobuf.Timestamp getLastPublishedTimestamp() { + if (lastPublishedTimestampBuilder_ == null) { + return lastPublishedTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; + } else { + return lastPublishedTimestampBuilder_.getMessage(); + } + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public Builder setLastPublishedTimestamp(com.google.protobuf.Timestamp value) { + if (lastPublishedTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastPublishedTimestamp_ = value; + } else { + lastPublishedTimestampBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public Builder setLastPublishedTimestamp( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastPublishedTimestampBuilder_ == null) { + lastPublishedTimestamp_ = builderForValue.build(); + } else { + lastPublishedTimestampBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public Builder mergeLastPublishedTimestamp(com.google.protobuf.Timestamp value) { + if (lastPublishedTimestampBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + lastPublishedTimestamp_ != null && + lastPublishedTimestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLastPublishedTimestampBuilder().mergeFrom(value); + } else { + lastPublishedTimestamp_ = value; + } + } else { + lastPublishedTimestampBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public Builder clearLastPublishedTimestamp() { + bitField0_ = (bitField0_ & ~0x00000040); + lastPublishedTimestamp_ = null; + if (lastPublishedTimestampBuilder_ != null) { + lastPublishedTimestampBuilder_.dispose(); + lastPublishedTimestampBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public com.google.protobuf.Timestamp.Builder getLastPublishedTimestampBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getLastPublishedTimestampFieldBuilder().getBuilder(); + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public com.google.protobuf.TimestampOrBuilder getLastPublishedTimestampOrBuilder() { + if (lastPublishedTimestampBuilder_ != null) { + return lastPublishedTimestampBuilder_.getMessageOrBuilder(); + } else { + return lastPublishedTimestamp_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; + } + } + /** + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getLastPublishedTimestampFieldBuilder() { + if (lastPublishedTimestampBuilder_ == null) { + lastPublishedTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getLastPublishedTimestamp(), + getParentForChildren(), + isClean()); + lastPublishedTimestamp_ = null; + } + return lastPublishedTimestampBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grafeas.v1.WindowsUpdate) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate) + private static final io.grafeas.v1.WindowsUpdate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grafeas.v1.WindowsUpdate(); + } + + public static io.grafeas.v1.WindowsUpdate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WindowsUpdate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java new file mode 100644 index 000000000000..730df0265e64 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java @@ -0,0 +1,212 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/upgrade.proto + +package io.grafeas.v1; + +public interface WindowsUpdateOrBuilder extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.WindowsUpdate) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * @return Whether the identity field is set. + */ + boolean hasIdentity(); + /** + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * @return The identity. + */ + io.grafeas.v1.WindowsUpdate.Identity getIdentity(); + /** + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + io.grafeas.v1.WindowsUpdate.IdentityOrBuilder getIdentityOrBuilder(); + + /** + *
+   * The localized title of the update.
+   * 
+ * + * string title = 2; + * @return The title. + */ + java.lang.String getTitle(); + /** + *
+   * The localized title of the update.
+   * 
+ * + * string title = 2; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + *
+   * The localized description of the update.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The localized description of the update.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + java.util.List + getCategoriesList(); + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + io.grafeas.v1.WindowsUpdate.Category getCategories(int index); + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + int getCategoriesCount(); + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + java.util.List + getCategoriesOrBuilderList(); + /** + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + io.grafeas.v1.WindowsUpdate.CategoryOrBuilder getCategoriesOrBuilder( + int index); + + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @return A list containing the kbArticleIds. + */ + java.util.List + getKbArticleIdsList(); + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @return The count of kbArticleIds. + */ + int getKbArticleIdsCount(); + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @param index The index of the element to return. + * @return The kbArticleIds at the given index. + */ + java.lang.String getKbArticleIds(int index); + /** + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * @param index The index of the value to return. + * @return The bytes of the kbArticleIds at the given index. + */ + com.google.protobuf.ByteString + getKbArticleIdsBytes(int index); + + /** + *
+   * The hyperlink to the support information for the update.
+   * 
+ * + * string support_url = 6; + * @return The supportUrl. + */ + java.lang.String getSupportUrl(); + /** + *
+   * The hyperlink to the support information for the update.
+   * 
+ * + * string support_url = 6; + * @return The bytes for supportUrl. + */ + com.google.protobuf.ByteString + getSupportUrlBytes(); + + /** + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * @return Whether the lastPublishedTimestamp field is set. + */ + boolean hasLastPublishedTimestamp(); + /** + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * @return The lastPublishedTimestamp. + */ + com.google.protobuf.Timestamp getLastPublishedTimestamp(); + /** + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + com.google.protobuf.TimestampOrBuilder getLastPublishedTimestampOrBuilder(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json new file mode 100644 index 000000000000..2fad5f7d0feb --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json @@ -0,0 +1,60 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "grafeas.v1", + "libraryPackage": "io.grafeas.v1", + "services": { + "Grafeas": { + "clients": { + "grpc": { + "libraryClient": "GrafeasClient", + "rpcs": { + "BatchCreateNotes": { + "methods": ["batchCreateNotes", "batchCreateNotes", "batchCreateNotes", "batchCreateNotesCallable"] + }, + "BatchCreateOccurrences": { + "methods": ["batchCreateOccurrences", "batchCreateOccurrences", "batchCreateOccurrences", "batchCreateOccurrencesCallable"] + }, + "CreateNote": { + "methods": ["createNote", "createNote", "createNote", "createNoteCallable"] + }, + "CreateOccurrence": { + "methods": ["createOccurrence", "createOccurrence", "createOccurrence", "createOccurrenceCallable"] + }, + "DeleteNote": { + "methods": ["deleteNote", "deleteNote", "deleteNote", "deleteNoteCallable"] + }, + "DeleteOccurrence": { + "methods": ["deleteOccurrence", "deleteOccurrence", "deleteOccurrence", "deleteOccurrenceCallable"] + }, + "GetNote": { + "methods": ["getNote", "getNote", "getNote", "getNoteCallable"] + }, + "GetOccurrence": { + "methods": ["getOccurrence", "getOccurrence", "getOccurrence", "getOccurrenceCallable"] + }, + "GetOccurrenceNote": { + "methods": ["getOccurrenceNote", "getOccurrenceNote", "getOccurrenceNote", "getOccurrenceNoteCallable"] + }, + "ListNoteOccurrences": { + "methods": ["listNoteOccurrences", "listNoteOccurrences", "listNoteOccurrences", "listNoteOccurrencesPagedCallable", "listNoteOccurrencesCallable"] + }, + "ListNotes": { + "methods": ["listNotes", "listNotes", "listNotes", "listNotesPagedCallable", "listNotesCallable"] + }, + "ListOccurrences": { + "methods": ["listOccurrences", "listOccurrences", "listOccurrences", "listOccurrencesPagedCallable", "listOccurrencesCallable"] + }, + "UpdateNote": { + "methods": ["updateNote", "updateNote", "updateNote", "updateNoteCallable"] + }, + "UpdateOccurrence": { + "methods": ["updateOccurrence", "updateOccurrence", "updateOccurrence", "updateOccurrenceCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java new file mode 100644 index 000000000000..925587289f71 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Container Analysis API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= GrafeasClient ======================= + * + *

Service Description: [Grafeas](https://grafeas.io) API. + * + *

Retrieves analysis results of Cloud components such as Docker container images. + * + *

Analysis results are stored as a series of occurrences. An `Occurrence` contains information + * about a specific analysis instance on a resource. An occurrence refers to a `Note`. A note + * contains details describing the analysis and is generally stored in a separate project, called a + * `Provider`. Multiple occurrences can refer to the same note. + * + *

For example, an SSL vulnerability could affect multiple images. In this case, there would be + * one note for the vulnerability and an occurrence for each image with the vulnerability referring + * to that note. + * + *

Sample for GrafeasClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
+ *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
+ *   Occurrence response = grafeasClient.getOccurrence(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package io.grafeas.v1; + +import javax.annotation.Generated; diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java new file mode 100644 index 000000000000..671d1b9faa7c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java @@ -0,0 +1,133 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1.stub; + +import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protobuf.Empty; +import io.grafeas.v1.BatchCreateNotesRequest; +import io.grafeas.v1.BatchCreateNotesResponse; +import io.grafeas.v1.BatchCreateOccurrencesRequest; +import io.grafeas.v1.BatchCreateOccurrencesResponse; +import io.grafeas.v1.CreateNoteRequest; +import io.grafeas.v1.CreateOccurrenceRequest; +import io.grafeas.v1.DeleteNoteRequest; +import io.grafeas.v1.DeleteOccurrenceRequest; +import io.grafeas.v1.GetNoteRequest; +import io.grafeas.v1.GetOccurrenceNoteRequest; +import io.grafeas.v1.GetOccurrenceRequest; +import io.grafeas.v1.ListNoteOccurrencesRequest; +import io.grafeas.v1.ListNoteOccurrencesResponse; +import io.grafeas.v1.ListNotesRequest; +import io.grafeas.v1.ListNotesResponse; +import io.grafeas.v1.ListOccurrencesRequest; +import io.grafeas.v1.ListOccurrencesResponse; +import io.grafeas.v1.Note; +import io.grafeas.v1.Occurrence; +import io.grafeas.v1.UpdateNoteRequest; +import io.grafeas.v1.UpdateOccurrenceRequest; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Grafeas service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class GrafeasStub implements BackgroundResource { + + public UnaryCallable getOccurrenceCallable() { + throw new UnsupportedOperationException("Not implemented: getOccurrenceCallable()"); + } + + public UnaryCallable + listOccurrencesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listOccurrencesPagedCallable()"); + } + + public UnaryCallable listOccurrencesCallable() { + throw new UnsupportedOperationException("Not implemented: listOccurrencesCallable()"); + } + + public UnaryCallable deleteOccurrenceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteOccurrenceCallable()"); + } + + public UnaryCallable createOccurrenceCallable() { + throw new UnsupportedOperationException("Not implemented: createOccurrenceCallable()"); + } + + public UnaryCallable + batchCreateOccurrencesCallable() { + throw new UnsupportedOperationException("Not implemented: batchCreateOccurrencesCallable()"); + } + + public UnaryCallable updateOccurrenceCallable() { + throw new UnsupportedOperationException("Not implemented: updateOccurrenceCallable()"); + } + + public UnaryCallable getOccurrenceNoteCallable() { + throw new UnsupportedOperationException("Not implemented: getOccurrenceNoteCallable()"); + } + + public UnaryCallable getNoteCallable() { + throw new UnsupportedOperationException("Not implemented: getNoteCallable()"); + } + + public UnaryCallable listNotesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNotesPagedCallable()"); + } + + public UnaryCallable listNotesCallable() { + throw new UnsupportedOperationException("Not implemented: listNotesCallable()"); + } + + public UnaryCallable deleteNoteCallable() { + throw new UnsupportedOperationException("Not implemented: deleteNoteCallable()"); + } + + public UnaryCallable createNoteCallable() { + throw new UnsupportedOperationException("Not implemented: createNoteCallable()"); + } + + public UnaryCallable + batchCreateNotesCallable() { + throw new UnsupportedOperationException("Not implemented: batchCreateNotesCallable()"); + } + + public UnaryCallable updateNoteCallable() { + throw new UnsupportedOperationException("Not implemented: updateNoteCallable()"); + } + + public UnaryCallable + listNoteOccurrencesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNoteOccurrencesPagedCallable()"); + } + + public UnaryCallable + listNoteOccurrencesCallable() { + throw new UnsupportedOperationException("Not implemented: listNoteOccurrencesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java new file mode 100644 index 000000000000..e240f1e74096 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java @@ -0,0 +1,819 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1.stub; + +import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import io.grafeas.v1.BatchCreateNotesRequest; +import io.grafeas.v1.BatchCreateNotesResponse; +import io.grafeas.v1.BatchCreateOccurrencesRequest; +import io.grafeas.v1.BatchCreateOccurrencesResponse; +import io.grafeas.v1.CreateNoteRequest; +import io.grafeas.v1.CreateOccurrenceRequest; +import io.grafeas.v1.DeleteNoteRequest; +import io.grafeas.v1.DeleteOccurrenceRequest; +import io.grafeas.v1.GetNoteRequest; +import io.grafeas.v1.GetOccurrenceNoteRequest; +import io.grafeas.v1.GetOccurrenceRequest; +import io.grafeas.v1.ListNoteOccurrencesRequest; +import io.grafeas.v1.ListNoteOccurrencesResponse; +import io.grafeas.v1.ListNotesRequest; +import io.grafeas.v1.ListNotesResponse; +import io.grafeas.v1.ListOccurrencesRequest; +import io.grafeas.v1.ListOccurrencesResponse; +import io.grafeas.v1.Note; +import io.grafeas.v1.Occurrence; +import io.grafeas.v1.UpdateNoteRequest; +import io.grafeas.v1.UpdateOccurrenceRequest; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link GrafeasStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (containeranalysis.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getOccurrence to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * GrafeasStubSettings.Builder grafeasSettingsBuilder = GrafeasStubSettings.newBuilder();
+ * grafeasSettingsBuilder
+ *     .getOccurrenceSettings()
+ *     .setRetrySettings(
+ *         grafeasSettingsBuilder
+ *             .getOccurrenceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * GrafeasStubSettings grafeasSettings = grafeasSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class GrafeasStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().build(); + + private final UnaryCallSettings getOccurrenceSettings; + private final PagedCallSettings< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> + listOccurrencesSettings; + private final UnaryCallSettings deleteOccurrenceSettings; + private final UnaryCallSettings createOccurrenceSettings; + private final UnaryCallSettings + batchCreateOccurrencesSettings; + private final UnaryCallSettings updateOccurrenceSettings; + private final UnaryCallSettings getOccurrenceNoteSettings; + private final UnaryCallSettings getNoteSettings; + private final PagedCallSettings + listNotesSettings; + private final UnaryCallSettings deleteNoteSettings; + private final UnaryCallSettings createNoteSettings; + private final UnaryCallSettings + batchCreateNotesSettings; + private final UnaryCallSettings updateNoteSettings; + private final PagedCallSettings< + ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> + listNoteOccurrencesSettings; + + private static final PagedListDescriptor< + ListOccurrencesRequest, ListOccurrencesResponse, Occurrence> + LIST_OCCURRENCES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListOccurrencesRequest injectToken( + ListOccurrencesRequest payload, String token) { + return ListOccurrencesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListOccurrencesRequest injectPageSize( + ListOccurrencesRequest payload, int pageSize) { + return ListOccurrencesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListOccurrencesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListOccurrencesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListOccurrencesResponse payload) { + return payload.getOccurrencesList() == null + ? ImmutableList.of() + : payload.getOccurrencesList(); + } + }; + + private static final PagedListDescriptor + LIST_NOTES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNotesRequest injectToken(ListNotesRequest payload, String token) { + return ListNotesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListNotesRequest injectPageSize(ListNotesRequest payload, int pageSize) { + return ListNotesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListNotesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNotesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListNotesResponse payload) { + return payload.getNotesList() == null + ? ImmutableList.of() + : payload.getNotesList(); + } + }; + + private static final PagedListDescriptor< + ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, Occurrence> + LIST_NOTE_OCCURRENCES_PAGE_STR_DESC = + new PagedListDescriptor< + ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, Occurrence>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNoteOccurrencesRequest injectToken( + ListNoteOccurrencesRequest payload, String token) { + return ListNoteOccurrencesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListNoteOccurrencesRequest injectPageSize( + ListNoteOccurrencesRequest payload, int pageSize) { + return ListNoteOccurrencesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListNoteOccurrencesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNoteOccurrencesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListNoteOccurrencesResponse payload) { + return payload.getOccurrencesList() == null + ? ImmutableList.of() + : payload.getOccurrencesList(); + } + }; + + private static final PagedListResponseFactory< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> + LIST_OCCURRENCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListOccurrencesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_OCCURRENCES_PAGE_STR_DESC, request, context); + return ListOccurrencesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListNotesRequest, ListNotesResponse, ListNotesPagedResponse> + LIST_NOTES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNotesRequest, ListNotesResponse, ListNotesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListNotesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_NOTES_PAGE_STR_DESC, request, context); + return ListNotesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> + LIST_NOTE_OCCURRENCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNoteOccurrencesRequest, + ListNoteOccurrencesResponse, + ListNoteOccurrencesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListNoteOccurrencesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_NOTE_OCCURRENCES_PAGE_STR_DESC, request, context); + return ListNoteOccurrencesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to getOccurrence. */ + public UnaryCallSettings getOccurrenceSettings() { + return getOccurrenceSettings; + } + + /** Returns the object with the settings used for calls to listOccurrences. */ + public PagedCallSettings< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> + listOccurrencesSettings() { + return listOccurrencesSettings; + } + + /** Returns the object with the settings used for calls to deleteOccurrence. */ + public UnaryCallSettings deleteOccurrenceSettings() { + return deleteOccurrenceSettings; + } + + /** Returns the object with the settings used for calls to createOccurrence. */ + public UnaryCallSettings createOccurrenceSettings() { + return createOccurrenceSettings; + } + + /** Returns the object with the settings used for calls to batchCreateOccurrences. */ + public UnaryCallSettings + batchCreateOccurrencesSettings() { + return batchCreateOccurrencesSettings; + } + + /** Returns the object with the settings used for calls to updateOccurrence. */ + public UnaryCallSettings updateOccurrenceSettings() { + return updateOccurrenceSettings; + } + + /** Returns the object with the settings used for calls to getOccurrenceNote. */ + public UnaryCallSettings getOccurrenceNoteSettings() { + return getOccurrenceNoteSettings; + } + + /** Returns the object with the settings used for calls to getNote. */ + public UnaryCallSettings getNoteSettings() { + return getNoteSettings; + } + + /** Returns the object with the settings used for calls to listNotes. */ + public PagedCallSettings + listNotesSettings() { + return listNotesSettings; + } + + /** Returns the object with the settings used for calls to deleteNote. */ + public UnaryCallSettings deleteNoteSettings() { + return deleteNoteSettings; + } + + /** Returns the object with the settings used for calls to createNote. */ + public UnaryCallSettings createNoteSettings() { + return createNoteSettings; + } + + /** Returns the object with the settings used for calls to batchCreateNotes. */ + public UnaryCallSettings + batchCreateNotesSettings() { + return batchCreateNotesSettings; + } + + /** Returns the object with the settings used for calls to updateNote. */ + public UnaryCallSettings updateNoteSettings() { + return updateNoteSettings; + } + + /** Returns the object with the settings used for calls to listNoteOccurrences. */ + public PagedCallSettings< + ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> + listNoteOccurrencesSettings() { + return listNoteOccurrencesSettings; + } + + public GrafeasStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcGrafeasStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "containeranalysis.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "containeranalysis.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(GrafeasStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected GrafeasStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getOccurrenceSettings = settingsBuilder.getOccurrenceSettings().build(); + listOccurrencesSettings = settingsBuilder.listOccurrencesSettings().build(); + deleteOccurrenceSettings = settingsBuilder.deleteOccurrenceSettings().build(); + createOccurrenceSettings = settingsBuilder.createOccurrenceSettings().build(); + batchCreateOccurrencesSettings = settingsBuilder.batchCreateOccurrencesSettings().build(); + updateOccurrenceSettings = settingsBuilder.updateOccurrenceSettings().build(); + getOccurrenceNoteSettings = settingsBuilder.getOccurrenceNoteSettings().build(); + getNoteSettings = settingsBuilder.getNoteSettings().build(); + listNotesSettings = settingsBuilder.listNotesSettings().build(); + deleteNoteSettings = settingsBuilder.deleteNoteSettings().build(); + createNoteSettings = settingsBuilder.createNoteSettings().build(); + batchCreateNotesSettings = settingsBuilder.batchCreateNotesSettings().build(); + updateNoteSettings = settingsBuilder.updateNoteSettings().build(); + listNoteOccurrencesSettings = settingsBuilder.listNoteOccurrencesSettings().build(); + } + + /** Builder for GrafeasStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder getOccurrenceSettings; + private final PagedCallSettings.Builder< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> + listOccurrencesSettings; + private final UnaryCallSettings.Builder + deleteOccurrenceSettings; + private final UnaryCallSettings.Builder + createOccurrenceSettings; + private final UnaryCallSettings.Builder< + BatchCreateOccurrencesRequest, BatchCreateOccurrencesResponse> + batchCreateOccurrencesSettings; + private final UnaryCallSettings.Builder + updateOccurrenceSettings; + private final UnaryCallSettings.Builder + getOccurrenceNoteSettings; + private final UnaryCallSettings.Builder getNoteSettings; + private final PagedCallSettings.Builder< + ListNotesRequest, ListNotesResponse, ListNotesPagedResponse> + listNotesSettings; + private final UnaryCallSettings.Builder deleteNoteSettings; + private final UnaryCallSettings.Builder createNoteSettings; + private final UnaryCallSettings.Builder + batchCreateNotesSettings; + private final UnaryCallSettings.Builder updateNoteSettings; + private final PagedCallSettings.Builder< + ListNoteOccurrencesRequest, + ListNoteOccurrencesResponse, + ListNoteOccurrencesPagedResponse> + listNoteOccurrencesSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + getOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listOccurrencesSettings = PagedCallSettings.newBuilder(LIST_OCCURRENCES_PAGE_STR_FACT); + deleteOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchCreateOccurrencesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getOccurrenceNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listNotesSettings = PagedCallSettings.newBuilder(LIST_NOTES_PAGE_STR_FACT); + deleteNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchCreateNotesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listNoteOccurrencesSettings = + PagedCallSettings.newBuilder(LIST_NOTE_OCCURRENCES_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getOccurrenceSettings, + listOccurrencesSettings, + deleteOccurrenceSettings, + createOccurrenceSettings, + batchCreateOccurrencesSettings, + updateOccurrenceSettings, + getOccurrenceNoteSettings, + getNoteSettings, + listNotesSettings, + deleteNoteSettings, + createNoteSettings, + batchCreateNotesSettings, + updateNoteSettings, + listNoteOccurrencesSettings); + initDefaults(this); + } + + protected Builder(GrafeasStubSettings settings) { + super(settings); + + getOccurrenceSettings = settings.getOccurrenceSettings.toBuilder(); + listOccurrencesSettings = settings.listOccurrencesSettings.toBuilder(); + deleteOccurrenceSettings = settings.deleteOccurrenceSettings.toBuilder(); + createOccurrenceSettings = settings.createOccurrenceSettings.toBuilder(); + batchCreateOccurrencesSettings = settings.batchCreateOccurrencesSettings.toBuilder(); + updateOccurrenceSettings = settings.updateOccurrenceSettings.toBuilder(); + getOccurrenceNoteSettings = settings.getOccurrenceNoteSettings.toBuilder(); + getNoteSettings = settings.getNoteSettings.toBuilder(); + listNotesSettings = settings.listNotesSettings.toBuilder(); + deleteNoteSettings = settings.deleteNoteSettings.toBuilder(); + createNoteSettings = settings.createNoteSettings.toBuilder(); + batchCreateNotesSettings = settings.batchCreateNotesSettings.toBuilder(); + updateNoteSettings = settings.updateNoteSettings.toBuilder(); + listNoteOccurrencesSettings = settings.listNoteOccurrencesSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getOccurrenceSettings, + listOccurrencesSettings, + deleteOccurrenceSettings, + createOccurrenceSettings, + batchCreateOccurrencesSettings, + updateOccurrenceSettings, + getOccurrenceNoteSettings, + getNoteSettings, + listNotesSettings, + deleteNoteSettings, + createNoteSettings, + batchCreateNotesSettings, + updateNoteSettings, + listNoteOccurrencesSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getOccurrenceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listOccurrencesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteOccurrenceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createOccurrenceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .batchCreateOccurrencesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateOccurrenceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getOccurrenceNoteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getNoteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listNotesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteNoteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createNoteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .batchCreateNotesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateNoteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listNoteOccurrencesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getOccurrence. */ + public UnaryCallSettings.Builder getOccurrenceSettings() { + return getOccurrenceSettings; + } + + /** Returns the builder for the settings used for calls to listOccurrences. */ + public PagedCallSettings.Builder< + ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> + listOccurrencesSettings() { + return listOccurrencesSettings; + } + + /** Returns the builder for the settings used for calls to deleteOccurrence. */ + public UnaryCallSettings.Builder deleteOccurrenceSettings() { + return deleteOccurrenceSettings; + } + + /** Returns the builder for the settings used for calls to createOccurrence. */ + public UnaryCallSettings.Builder + createOccurrenceSettings() { + return createOccurrenceSettings; + } + + /** Returns the builder for the settings used for calls to batchCreateOccurrences. */ + public UnaryCallSettings.Builder + batchCreateOccurrencesSettings() { + return batchCreateOccurrencesSettings; + } + + /** Returns the builder for the settings used for calls to updateOccurrence. */ + public UnaryCallSettings.Builder + updateOccurrenceSettings() { + return updateOccurrenceSettings; + } + + /** Returns the builder for the settings used for calls to getOccurrenceNote. */ + public UnaryCallSettings.Builder getOccurrenceNoteSettings() { + return getOccurrenceNoteSettings; + } + + /** Returns the builder for the settings used for calls to getNote. */ + public UnaryCallSettings.Builder getNoteSettings() { + return getNoteSettings; + } + + /** Returns the builder for the settings used for calls to listNotes. */ + public PagedCallSettings.Builder + listNotesSettings() { + return listNotesSettings; + } + + /** Returns the builder for the settings used for calls to deleteNote. */ + public UnaryCallSettings.Builder deleteNoteSettings() { + return deleteNoteSettings; + } + + /** Returns the builder for the settings used for calls to createNote. */ + public UnaryCallSettings.Builder createNoteSettings() { + return createNoteSettings; + } + + /** Returns the builder for the settings used for calls to batchCreateNotes. */ + public UnaryCallSettings.Builder + batchCreateNotesSettings() { + return batchCreateNotesSettings; + } + + /** Returns the builder for the settings used for calls to updateNote. */ + public UnaryCallSettings.Builder updateNoteSettings() { + return updateNoteSettings; + } + + /** Returns the builder for the settings used for calls to listNoteOccurrences. */ + public PagedCallSettings.Builder< + ListNoteOccurrencesRequest, + ListNoteOccurrencesResponse, + ListNoteOccurrencesPagedResponse> + listNoteOccurrencesSettings() { + return listNoteOccurrencesSettings; + } + + @Override + public GrafeasStubSettings build() throws IOException { + return new GrafeasStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java new file mode 100644 index 000000000000..b5a6c1879d69 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Grafeas service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcGrafeasCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java new file mode 100644 index 000000000000..ef18c902d9f3 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java @@ -0,0 +1,607 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1.stub; + +import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grafeas.v1.BatchCreateNotesRequest; +import io.grafeas.v1.BatchCreateNotesResponse; +import io.grafeas.v1.BatchCreateOccurrencesRequest; +import io.grafeas.v1.BatchCreateOccurrencesResponse; +import io.grafeas.v1.CreateNoteRequest; +import io.grafeas.v1.CreateOccurrenceRequest; +import io.grafeas.v1.DeleteNoteRequest; +import io.grafeas.v1.DeleteOccurrenceRequest; +import io.grafeas.v1.GetNoteRequest; +import io.grafeas.v1.GetOccurrenceNoteRequest; +import io.grafeas.v1.GetOccurrenceRequest; +import io.grafeas.v1.ListNoteOccurrencesRequest; +import io.grafeas.v1.ListNoteOccurrencesResponse; +import io.grafeas.v1.ListNotesRequest; +import io.grafeas.v1.ListNotesResponse; +import io.grafeas.v1.ListOccurrencesRequest; +import io.grafeas.v1.ListOccurrencesResponse; +import io.grafeas.v1.Note; +import io.grafeas.v1.Occurrence; +import io.grafeas.v1.UpdateNoteRequest; +import io.grafeas.v1.UpdateOccurrenceRequest; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Grafeas service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcGrafeasStub extends GrafeasStub { + private static final MethodDescriptor + getOccurrenceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/GetOccurrence") + .setRequestMarshaller( + ProtoUtils.marshaller(GetOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Occurrence.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listOccurrencesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/ListOccurrences") + .setRequestMarshaller( + ProtoUtils.marshaller(ListOccurrencesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListOccurrencesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteOccurrenceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/DeleteOccurrence") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createOccurrenceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/CreateOccurrence") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Occurrence.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + BatchCreateOccurrencesRequest, BatchCreateOccurrencesResponse> + batchCreateOccurrencesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/BatchCreateOccurrences") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchCreateOccurrencesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchCreateOccurrencesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateOccurrenceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/UpdateOccurrence") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Occurrence.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getOccurrenceNoteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/GetOccurrenceNote") + .setRequestMarshaller( + ProtoUtils.marshaller(GetOccurrenceNoteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getNoteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/GetNote") + .setRequestMarshaller(ProtoUtils.marshaller(GetNoteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listNotesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/ListNotes") + .setRequestMarshaller(ProtoUtils.marshaller(ListNotesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListNotesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteNoteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/DeleteNote") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteNoteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createNoteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/CreateNote") + .setRequestMarshaller(ProtoUtils.marshaller(CreateNoteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchCreateNotesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/BatchCreateNotes") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchCreateNotesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchCreateNotesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateNoteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/UpdateNote") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateNoteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listNoteOccurrencesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("grafeas.v1.Grafeas/ListNoteOccurrences") + .setRequestMarshaller( + ProtoUtils.marshaller(ListNoteOccurrencesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNoteOccurrencesResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable getOccurrenceCallable; + private final UnaryCallable + listOccurrencesCallable; + private final UnaryCallable + listOccurrencesPagedCallable; + private final UnaryCallable deleteOccurrenceCallable; + private final UnaryCallable createOccurrenceCallable; + private final UnaryCallable + batchCreateOccurrencesCallable; + private final UnaryCallable updateOccurrenceCallable; + private final UnaryCallable getOccurrenceNoteCallable; + private final UnaryCallable getNoteCallable; + private final UnaryCallable listNotesCallable; + private final UnaryCallable listNotesPagedCallable; + private final UnaryCallable deleteNoteCallable; + private final UnaryCallable createNoteCallable; + private final UnaryCallable + batchCreateNotesCallable; + private final UnaryCallable updateNoteCallable; + private final UnaryCallable + listNoteOccurrencesCallable; + private final UnaryCallable + listNoteOccurrencesPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcGrafeasStub create(GrafeasStubSettings settings) throws IOException { + return new GrpcGrafeasStub(settings, ClientContext.create(settings)); + } + + public static final GrpcGrafeasStub create(ClientContext clientContext) throws IOException { + return new GrpcGrafeasStub(GrafeasStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcGrafeasStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcGrafeasStub( + GrafeasStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcGrafeasStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcGrafeasStub(GrafeasStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcGrafeasCallableFactory()); + } + + /** + * Constructs an instance of GrpcGrafeasStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcGrafeasStub( + GrafeasStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings getOccurrenceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getOccurrenceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listOccurrencesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listOccurrencesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteOccurrenceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteOccurrenceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createOccurrenceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createOccurrenceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + batchCreateOccurrencesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(batchCreateOccurrencesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateOccurrenceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateOccurrenceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getOccurrenceNoteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getOccurrenceNoteMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getNoteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNoteMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listNotesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNotesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteNoteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteNoteMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createNoteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createNoteMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + batchCreateNotesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchCreateNotesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateNoteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateNoteMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listNoteOccurrencesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNoteOccurrencesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.getOccurrenceCallable = + callableFactory.createUnaryCallable( + getOccurrenceTransportSettings, settings.getOccurrenceSettings(), clientContext); + this.listOccurrencesCallable = + callableFactory.createUnaryCallable( + listOccurrencesTransportSettings, settings.listOccurrencesSettings(), clientContext); + this.listOccurrencesPagedCallable = + callableFactory.createPagedCallable( + listOccurrencesTransportSettings, settings.listOccurrencesSettings(), clientContext); + this.deleteOccurrenceCallable = + callableFactory.createUnaryCallable( + deleteOccurrenceTransportSettings, settings.deleteOccurrenceSettings(), clientContext); + this.createOccurrenceCallable = + callableFactory.createUnaryCallable( + createOccurrenceTransportSettings, settings.createOccurrenceSettings(), clientContext); + this.batchCreateOccurrencesCallable = + callableFactory.createUnaryCallable( + batchCreateOccurrencesTransportSettings, + settings.batchCreateOccurrencesSettings(), + clientContext); + this.updateOccurrenceCallable = + callableFactory.createUnaryCallable( + updateOccurrenceTransportSettings, settings.updateOccurrenceSettings(), clientContext); + this.getOccurrenceNoteCallable = + callableFactory.createUnaryCallable( + getOccurrenceNoteTransportSettings, + settings.getOccurrenceNoteSettings(), + clientContext); + this.getNoteCallable = + callableFactory.createUnaryCallable( + getNoteTransportSettings, settings.getNoteSettings(), clientContext); + this.listNotesCallable = + callableFactory.createUnaryCallable( + listNotesTransportSettings, settings.listNotesSettings(), clientContext); + this.listNotesPagedCallable = + callableFactory.createPagedCallable( + listNotesTransportSettings, settings.listNotesSettings(), clientContext); + this.deleteNoteCallable = + callableFactory.createUnaryCallable( + deleteNoteTransportSettings, settings.deleteNoteSettings(), clientContext); + this.createNoteCallable = + callableFactory.createUnaryCallable( + createNoteTransportSettings, settings.createNoteSettings(), clientContext); + this.batchCreateNotesCallable = + callableFactory.createUnaryCallable( + batchCreateNotesTransportSettings, settings.batchCreateNotesSettings(), clientContext); + this.updateNoteCallable = + callableFactory.createUnaryCallable( + updateNoteTransportSettings, settings.updateNoteSettings(), clientContext); + this.listNoteOccurrencesCallable = + callableFactory.createUnaryCallable( + listNoteOccurrencesTransportSettings, + settings.listNoteOccurrencesSettings(), + clientContext); + this.listNoteOccurrencesPagedCallable = + callableFactory.createPagedCallable( + listNoteOccurrencesTransportSettings, + settings.listNoteOccurrencesSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getOccurrenceCallable() { + return getOccurrenceCallable; + } + + @Override + public UnaryCallable listOccurrencesCallable() { + return listOccurrencesCallable; + } + + @Override + public UnaryCallable + listOccurrencesPagedCallable() { + return listOccurrencesPagedCallable; + } + + @Override + public UnaryCallable deleteOccurrenceCallable() { + return deleteOccurrenceCallable; + } + + @Override + public UnaryCallable createOccurrenceCallable() { + return createOccurrenceCallable; + } + + @Override + public UnaryCallable + batchCreateOccurrencesCallable() { + return batchCreateOccurrencesCallable; + } + + @Override + public UnaryCallable updateOccurrenceCallable() { + return updateOccurrenceCallable; + } + + @Override + public UnaryCallable getOccurrenceNoteCallable() { + return getOccurrenceNoteCallable; + } + + @Override + public UnaryCallable getNoteCallable() { + return getNoteCallable; + } + + @Override + public UnaryCallable listNotesCallable() { + return listNotesCallable; + } + + @Override + public UnaryCallable listNotesPagedCallable() { + return listNotesPagedCallable; + } + + @Override + public UnaryCallable deleteNoteCallable() { + return deleteNoteCallable; + } + + @Override + public UnaryCallable createNoteCallable() { + return createNoteCallable; + } + + @Override + public UnaryCallable + batchCreateNotesCallable() { + return batchCreateNotesCallable; + } + + @Override + public UnaryCallable updateNoteCallable() { + return updateNoteCallable; + } + + @Override + public UnaryCallable + listNoteOccurrencesCallable() { + return listNoteOccurrencesCallable; + } + + @Override + public UnaryCallable + listNoteOccurrencesPagedCallable() { + return listNoteOccurrencesPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto new file mode 100644 index 000000000000..f2854fe686b2 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto @@ -0,0 +1,90 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "grafeas/v1/common.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// An attestation wrapper with a PGP-compatible signature. This message only +// supports `ATTACHED` signatures, where the payload that is signed is included +// alongside the signature itself in the same file. + +// Note kind that represents a logical attestation "role" or "authority". For +// example, an organization might have one `Authority` for "QA" and one for +// "build". This note is intended to act strictly as a grouping mechanism for +// the attached occurrences (Attestations). This grouping mechanism also +// provides a security boundary, since IAM ACLs gate the ability for a principle +// to attach an occurrence to a given note. It also provides a single point of +// lookup to find all attached attestation occurrences, even if they don't all +// live in the same project. +message AttestationNote { + // This submessage provides human-readable hints about the purpose of the + // authority. Because the name of a note acts as its resource reference, it is + // important to disambiguate the canonical name of the Note (which might be a + // UUID for security purposes) from "readable" names more suitable for debug + // output. Note that these hints should not be used to look up authorities in + // security sensitive contexts, such as when looking up attestations to + // verify. + message Hint { + // Required. The human readable name of this attestation authority, for + // example "qa". + string human_readable_name = 1; + } + + // Hint hints at the purpose of the attestation authority. + Hint hint = 1; +} + +message Jwt { + // The compact encoding of a JWS, which is always three base64 encoded strings + // joined by periods. For details, see: + // https://tools.ietf.org/html/rfc7515.html#section-3.1 + string compact_jwt = 1; +} + +// Occurrence that represents a single "attestation". The authenticity of an +// attestation can be verified using the attached signature. If the verifier +// trusts the public key of the signer, then verifying the signature is +// sufficient to establish trust. In this circumstance, the authority to which +// this attestation is attached is primarily useful for lookup (how to find +// this attestation if you already know the authority and artifact to be +// verified) and intent (for which authority this attestation was intended to +// sign. +message AttestationOccurrence { + // Required. The serialized payload that is verified by one or more + // `signatures`. + bytes serialized_payload = 1; + // One or more signatures over `serialized_payload`. Verifier implementations + // should consider this attestation message verified if at least one + // `signature` verifies `serialized_payload`. See `Signature` in common.proto + // for more details on signature structure and verification. + repeated Signature signatures = 2; + // One or more JWTs encoding a self-contained attestation. + // Each JWT encodes the payload that it verifies within the JWT itself. + // Verifier implementation SHOULD ignore the `serialized_payload` field + // when verifying these JWTs. + // If only JWTs are present on this AttestationOccurrence, then the + // `serialized_payload` SHOULD be left empty. + // Each JWT SHOULD encode a claim specific to the `resource_uri` of this + // Occurrence, but this is not validated by Grafeas metadata API + // implementations. The JWT itself is opaque to Grafeas. + repeated Jwt jwts = 3; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto new file mode 100644 index 000000000000..172637fd4596 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto @@ -0,0 +1,62 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "grafeas/v1/intoto_provenance.proto"; +import "grafeas/v1/intoto_statement.proto"; +import "grafeas/v1/provenance.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// Note holding the version of the provider's builder and the signature of the +// provenance message in the build details occurrence. +message BuildNote { + // Required. Immutable. Version of the builder which produced this build. + string builder_version = 1; +} + +// Details of a build occurrence. +message BuildOccurrence { + // The actual provenance for the build. + grafeas.v1.BuildProvenance provenance = 1; + + // Serialized JSON representation of the provenance, used in generating the + // build signature in the corresponding build note. After verifying the + // signature, `provenance_bytes` can be unmarshalled and compared to the + // provenance to confirm that it is unchanged. A base64-encoded string + // representation of the provenance bytes is used for the signature in order + // to interoperate with openssl which expects this format for signature + // verification. + // + // The serialized form is captured both to avoid ambiguity in how the + // provenance is marshalled to json as well to prevent incompatibilities with + // future changes. + string provenance_bytes = 2; + + // Deprecated. See InTotoStatement for the replacement. + // In-toto Provenance representation as defined in spec. + InTotoProvenance intoto_provenance = 3; + + // In-toto Statement representation as defined in spec. + // The intoto_statement can contain any type of provenance. The serialized + // payload of the statement can be stored and signed in the Occurrence's + // envelope. + InTotoStatement intoto_statement = 4; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto new file mode 100644 index 000000000000..1464ecc9be2d --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto @@ -0,0 +1,152 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// Kind represents the kinds of notes supported. +enum NoteKind { + // Default value. This value is unused. + NOTE_KIND_UNSPECIFIED = 0; + // The note and occurrence represent a package vulnerability. + VULNERABILITY = 1; + // The note and occurrence assert build provenance. + BUILD = 2; + // This represents an image basis relationship. + IMAGE = 3; + // This represents a package installed via a package manager. + PACKAGE = 4; + // The note and occurrence track deployment events. + DEPLOYMENT = 5; + // The note and occurrence track the initial discovery status of a resource. + DISCOVERY = 6; + // This represents a logical "role" that can attest to artifacts. + ATTESTATION = 7; + // This represents an available package upgrade. + UPGRADE = 8; + // This represents a Compliance Note + COMPLIANCE = 9; + // This represents a DSSE attestation Note + DSSE_ATTESTATION = 10; + // This represents a Vulnerability Assessment. + VULNERABILITY_ASSESSMENT = 11; +} + +// Metadata for any related URL information. +message RelatedUrl { + // Specific URL associated with the resource. + string url = 1; + // Label to describe usage of the URL. + string label = 2; +} + +// Verifiers (e.g. Kritis implementations) MUST verify signatures +// with respect to the trust anchors defined in policy (e.g. a Kritis policy). +// Typically this means that the verifier has been configured with a map from +// `public_key_id` to public key material (and any required parameters, e.g. +// signing algorithm). +// +// In particular, verification implementations MUST NOT treat the signature +// `public_key_id` as anything more than a key lookup hint. The `public_key_id` +// DOES NOT validate or authenticate a public key; it only provides a mechanism +// for quickly selecting a public key ALREADY CONFIGURED on the verifier through +// a trusted channel. Verification implementations MUST reject signatures in any +// of the following circumstances: +// * The `public_key_id` is not recognized by the verifier. +// * The public key that `public_key_id` refers to does not verify the +// signature with respect to the payload. +// +// The `signature` contents SHOULD NOT be "attached" (where the payload is +// included with the serialized `signature` bytes). Verifiers MUST ignore any +// "attached" payload and only verify signatures with respect to explicitly +// provided payload (e.g. a `payload` field on the proto message that holds +// this Signature, or the canonical serialization of the proto message that +// holds this signature). +message Signature { + // The content of the signature, an opaque bytestring. + // The payload that this signature verifies MUST be unambiguously provided + // with the Signature during verification. A wrapper message might provide + // the payload explicitly. Alternatively, a message might have a canonical + // serialization that can always be unambiguously computed to derive the + // payload. + bytes signature = 1; + + // The identifier for the public key that verifies this signature. + // * The `public_key_id` is required. + // * The `public_key_id` SHOULD be an RFC3986 conformant URI. + // * When possible, the `public_key_id` SHOULD be an immutable reference, + // such as a cryptographic digest. + // + // Examples of valid `public_key_id`s: + // + // OpenPGP V4 public key fingerprint: + // * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" + // See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more + // details on this scheme. + // + // RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER + // serialization): + // * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" + // * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" + string public_key_id = 2; +} + +// MUST match +// https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An +// authenticated message of arbitrary type. +message Envelope { + bytes payload = 1; + string payload_type = 2; + repeated EnvelopeSignature signatures = 3; +} + +message EnvelopeSignature { + bytes sig = 1; + string keyid = 2; +} + +// Indicates the location at which a package was found. +message FileLocation { + // For jars that are contained inside .war files, this filepath + // can indicate the path to war file combined with the path to jar file. + string file_path = 1; +} + +// License information. +message License { + // Often a single license can be used to represent the licensing terms. + // Sometimes it is necessary to include a choice of one or more licenses + // or some combination of license identifiers. + // Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", + // "GPL-2.0-or-later WITH Bison-exception-2.2". + string expression = 1; + + // Comments + string comments = 2; +} + +// Digest information. +message Digest { + // `SHA1`, `SHA512` etc. + string algo = 1; + + // Value of the digest. + bytes digest_bytes = 2; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto new file mode 100644 index 000000000000..688fa82596b1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto @@ -0,0 +1,82 @@ +// Copyright 2021 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "grafeas/v1/severity.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +message ComplianceNote { + // The title that identifies this compliance check. + string title = 1; + // A description about this compliance check. + string description = 2; + // The OS and config versions the benchmark applies to. + repeated grafeas.v1.ComplianceVersion version = 3; + // A rationale for the existence of this compliance check. + string rationale = 4; + // A description of remediation steps if the compliance check fails. + string remediation = 5; + // A compliance check that is a CIS benchmark. + message CisBenchmark { + int32 profile_level = 1; + grafeas.v1.Severity severity = 2; + } + oneof compliance_type { + CisBenchmark cis_benchmark = 6; + } + // Serialized scan instructions with a predefined format. + bytes scan_instructions = 7; +} + +// Describes the CIS benchmark version that is applicable to a given OS and +// os version. +message ComplianceVersion { + // The CPE URI (https://cpe.mitre.org/specification/) this benchmark is + // applicable to. + string cpe_uri = 1; + // The name of the document that defines this benchmark, e.g. "CIS + // Container-Optimized OS". + string benchmark_document = 3; + // The version of the benchmark. This is set to the version of the OS-specific + // CIS document the benchmark is defined in. + string version = 2; +} + +// An indication that the compliance checks in the associated ComplianceNote +// were not satisfied for particular resources or a specified reason. +message ComplianceOccurrence { + repeated NonCompliantFile non_compliant_files = 2; + string non_compliance_reason = 3; +} + +// Details about files that caused a compliance check to fail. +message NonCompliantFile { + // display_command is a single command that can be used to display a list of + // non compliant files. When there is no such command, we can also iterate a + // list of non compliant file using 'path'. + + // Empty if `display_command` is set. + string path = 1; + // Command to display the non-compliant files. + string display_command = 2; + // Explains why a file is non compliant for a CIS check. + string reason = 3; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto new file mode 100644 index 000000000000..181ec052fe42 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto @@ -0,0 +1,166 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; +option java_outer_classname = "CVSSProto"; + +// Common Vulnerability Scoring System version 3. +// For details, see https://www.first.org/cvss/specification-document +message CVSSv3 { + // The base score is a function of the base metric scores. + float base_score = 1; + + float exploitability_score = 2; + + float impact_score = 3; + + // Base Metrics + // Represents the intrinsic characteristics of a vulnerability that are + // constant over time and across user environments. + AttackVector attack_vector = 5; + AttackComplexity attack_complexity = 6; + PrivilegesRequired privileges_required = 7; + UserInteraction user_interaction = 8; + Scope scope = 9; + Impact confidentiality_impact = 10; + Impact integrity_impact = 11; + Impact availability_impact = 12; + + enum AttackVector { + ATTACK_VECTOR_UNSPECIFIED = 0; + ATTACK_VECTOR_NETWORK = 1; + ATTACK_VECTOR_ADJACENT = 2; + ATTACK_VECTOR_LOCAL = 3; + ATTACK_VECTOR_PHYSICAL = 4; + } + + enum AttackComplexity { + ATTACK_COMPLEXITY_UNSPECIFIED = 0; + ATTACK_COMPLEXITY_LOW = 1; + ATTACK_COMPLEXITY_HIGH = 2; + } + + enum PrivilegesRequired { + PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + PRIVILEGES_REQUIRED_NONE = 1; + PRIVILEGES_REQUIRED_LOW = 2; + PRIVILEGES_REQUIRED_HIGH = 3; + } + + enum UserInteraction { + USER_INTERACTION_UNSPECIFIED = 0; + USER_INTERACTION_NONE = 1; + USER_INTERACTION_REQUIRED = 2; + } + + enum Scope { + SCOPE_UNSPECIFIED = 0; + SCOPE_UNCHANGED = 1; + SCOPE_CHANGED = 2; + } + + enum Impact { + IMPACT_UNSPECIFIED = 0; + IMPACT_HIGH = 1; + IMPACT_LOW = 2; + IMPACT_NONE = 3; + } +} + +// Common Vulnerability Scoring System. +// For details, see https://www.first.org/cvss/specification-document +// This is a message we will try to use for storing various versions of CVSS +// rather than making a separate proto for storing a specific version. +message CVSS { + // The base score is a function of the base metric scores. + float base_score = 1; + + float exploitability_score = 2; + + float impact_score = 3; + + // Base Metrics + // Represents the intrinsic characteristics of a vulnerability that are + // constant over time and across user environments. + AttackVector attack_vector = 4; + AttackComplexity attack_complexity = 5; + Authentication authentication = 6; + PrivilegesRequired privileges_required = 7; + UserInteraction user_interaction = 8; + Scope scope = 9; + Impact confidentiality_impact = 10; + Impact integrity_impact = 11; + Impact availability_impact = 12; + + enum AttackVector { + ATTACK_VECTOR_UNSPECIFIED = 0; + ATTACK_VECTOR_NETWORK = 1; + ATTACK_VECTOR_ADJACENT = 2; + ATTACK_VECTOR_LOCAL = 3; + ATTACK_VECTOR_PHYSICAL = 4; + } + + enum AttackComplexity { + ATTACK_COMPLEXITY_UNSPECIFIED = 0; + ATTACK_COMPLEXITY_LOW = 1; + ATTACK_COMPLEXITY_HIGH = 2; + } + + enum Authentication { + AUTHENTICATION_UNSPECIFIED = 0; + AUTHENTICATION_MULTIPLE = 1; + AUTHENTICATION_SINGLE = 2; + AUTHENTICATION_NONE = 3; + } + + enum PrivilegesRequired { + PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + PRIVILEGES_REQUIRED_NONE = 1; + PRIVILEGES_REQUIRED_LOW = 2; + PRIVILEGES_REQUIRED_HIGH = 3; + } + + enum UserInteraction { + USER_INTERACTION_UNSPECIFIED = 0; + USER_INTERACTION_NONE = 1; + USER_INTERACTION_REQUIRED = 2; + } + + enum Scope { + SCOPE_UNSPECIFIED = 0; + SCOPE_UNCHANGED = 1; + SCOPE_CHANGED = 2; + } + + enum Impact { + IMPACT_UNSPECIFIED = 0; + IMPACT_HIGH = 1; + IMPACT_LOW = 2; + IMPACT_NONE = 3; + } +} + +// CVSS Version. +enum CVSSVersion { + CVSS_VERSION_UNSPECIFIED = 0; + CVSS_VERSION_2 = 1; + CVSS_VERSION_3 = 2; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto new file mode 100644 index 000000000000..5204004fd646 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto @@ -0,0 +1,66 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// An artifact that can be deployed in some runtime. +message DeploymentNote { + // Required. Resource URI for the artifact being deployed. + repeated string resource_uri = 1; +} + +// The period during which some deployable was active in a runtime. +message DeploymentOccurrence { + // Identity of the user that triggered this deployment. + string user_email = 1; + + // Required. Beginning of the lifetime of this deployment. + google.protobuf.Timestamp deploy_time = 2; + + // End of the lifetime of this deployment. + google.protobuf.Timestamp undeploy_time = 3; + + // Configuration used to create this deployment. + string config = 4; + + // Address of the runtime element hosting this deployment. + string address = 5; + + // Output only. Resource URI for the artifact being deployed taken from + // the deployable field with the same name. + repeated string resource_uri = 6; + + // Types of platforms. + enum Platform { + // Unknown. + PLATFORM_UNSPECIFIED = 0; + // Google Container Engine. + GKE = 1; + // Google App Engine: Flexible Environment. + FLEX = 2; + // Custom user-defined platform. + CUSTOM = 3; + } + // Platform hosting this deployment. + Platform platform = 7; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto new file mode 100644 index 000000000000..bfb94e4a3474 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto @@ -0,0 +1,104 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "grafeas/v1/common.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// A note that indicates a type of analysis a provider would perform. This note +// exists in a provider's project. A `Discovery` occurrence is created in a +// consumer's project at the start of analysis. +message DiscoveryNote { + // Required. Immutable. The kind of analysis that is handled by this + // discovery. + grafeas.v1.NoteKind analysis_kind = 1; +} + +// Provides information about the analysis status of a discovered resource. +message DiscoveryOccurrence { + // Whether the resource is continuously analyzed. + enum ContinuousAnalysis { + // Unknown. + CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; + // The resource is continuously analyzed. + ACTIVE = 1; + // The resource is ignored for continuous analysis. + INACTIVE = 2; + } + + // Whether the resource is continuously analyzed. + ContinuousAnalysis continuous_analysis = 1; + + // Analysis status for a resource. Currently for initial analysis only (not + // updated in continuous analysis). + enum AnalysisStatus { + option allow_alias = true; + + // Unknown. + ANALYSIS_STATUS_UNSPECIFIED = 0; + // Resource is known but no action has been taken yet. + PENDING = 1; + // Resource is being analyzed. + SCANNING = 2; + // Analysis has finished successfully. + FINISHED_SUCCESS = 3; + // Analysis has completed. + COMPLETE = 3; + // Analysis has finished unsuccessfully, the analysis itself is in a bad + // state. + FINISHED_FAILED = 4; + // The resource is known not to be supported. + FINISHED_UNSUPPORTED = 5; + } + + // The status of discovery for the resource. + AnalysisStatus analysis_status = 2; + + // Indicates which analysis completed successfully. Multiple types of + // analysis can be performed on a single resource. + message AnalysisCompleted { + repeated string analysis_type = 1; + } + + AnalysisCompleted analysis_completed = 7; + + // Indicates any errors encountered during analysis of a resource. There + // could be 0 or more of these errors. + repeated google.rpc.Status analysis_error = 8; + + // When an error is encountered this will contain a LocalizedMessage under + // details to show to the user. The LocalizedMessage is output only and + // populated by the API. + google.rpc.Status analysis_status_error = 3; + + // The CPE of the resource being scanned. + string cpe = 4; + + // The last time this resource was scanned. + google.protobuf.Timestamp last_scan_time = 5; + + // The time occurrences related to this discovery occurrence were archived. + google.protobuf.Timestamp archive_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto new file mode 100644 index 000000000000..34ba3df9f9be --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto @@ -0,0 +1,52 @@ +// Copyright 2021 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +syntax = "proto3"; + +package grafeas.v1; + +import "grafeas/v1/common.proto"; +import "grafeas/v1/intoto_statement.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +message DSSEAttestationNote { + // This submessage provides human-readable hints about the purpose of the + // authority. Because the name of a note acts as its resource reference, it is + // important to disambiguate the canonical name of the Note (which might be a + // UUID for security purposes) from "readable" names more suitable for debug + // output. Note that these hints should not be used to look up authorities in + // security sensitive contexts, such as when looking up attestations to + // verify. + message DSSEHint { + // Required. The human readable name of this attestation authority, for + // example "cloudbuild-prod". + string human_readable_name = 1; + } + // DSSEHint hints at the purpose of the attestation authority. + DSSEHint hint = 1; +} + +// Deprecated. Prefer to use a regular Occurrence, and populate the +// Envelope at the top level of the Occurrence. +message DSSEAttestationOccurrence { + // If doing something security critical, make sure to verify the signatures in + // this metadata. + Envelope envelope = 1; + oneof decoded_payload { + InTotoStatement statement = 2; + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto new file mode 100644 index 000000000000..5ec930e6ef3d --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto @@ -0,0 +1,547 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "grafeas/v1/attestation.proto"; +import "grafeas/v1/build.proto"; +import "grafeas/v1/common.proto"; +import "grafeas/v1/compliance.proto"; +import "grafeas/v1/deployment.proto"; +import "grafeas/v1/discovery.proto"; +import "grafeas/v1/dsse_attestation.proto"; +import "grafeas/v1/image.proto"; +import "grafeas/v1/package.proto"; +import "grafeas/v1/upgrade.proto"; +import "grafeas/v1/vex.proto"; +import "grafeas/v1/vulnerability.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; +option (google.api.resource_definition) = { + type: "grafeas.io/Project" + pattern: "projects/{project}" +}; + +// [Grafeas](https://grafeas.io) API. +// +// Retrieves analysis results of Cloud components such as Docker container +// images. +// +// Analysis results are stored as a series of occurrences. An `Occurrence` +// contains information about a specific analysis instance on a resource. An +// occurrence refers to a `Note`. A note contains details describing the +// analysis and is generally stored in a separate project, called a `Provider`. +// Multiple occurrences can refer to the same note. +// +// For example, an SSL vulnerability could affect multiple images. In this case, +// there would be one note for the vulnerability and an occurrence for each +// image with the vulnerability referring to that note. +service Grafeas { + option (google.api.default_host) = "containeranalysis.googleapis.com"; + + // Gets the specified occurrence. + rpc GetOccurrence(GetOccurrenceRequest) returns (Occurrence) { + option (google.api.http) = { + get: "/v1/{name=projects/*/occurrences/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists occurrences for the specified project. + rpc ListOccurrences(ListOccurrencesRequest) + returns (ListOccurrencesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/occurrences" + }; + option (google.api.method_signature) = "parent,filter"; + } + + // Deletes the specified occurrence. For example, use this method to delete an + // occurrence when the occurrence is no longer applicable for the given + // resource. + rpc DeleteOccurrence(DeleteOccurrenceRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/occurrences/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new occurrence. + rpc CreateOccurrence(CreateOccurrenceRequest) returns (Occurrence) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/occurrences" + body: "occurrence" + }; + option (google.api.method_signature) = "parent,occurrence"; + } + + // Creates new occurrences in batch. + rpc BatchCreateOccurrences(BatchCreateOccurrencesRequest) + returns (BatchCreateOccurrencesResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/occurrences:batchCreate" + body: "*" + }; + option (google.api.method_signature) = "parent,occurrences"; + } + + // Updates the specified occurrence. + rpc UpdateOccurrence(UpdateOccurrenceRequest) returns (Occurrence) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/occurrences/*}" + body: "occurrence" + }; + option (google.api.method_signature) = "name,occurrence,update_mask"; + } + + // Gets the note attached to the specified occurrence. Consumer projects can + // use this method to get a note that belongs to a provider project. + rpc GetOccurrenceNote(GetOccurrenceNoteRequest) returns (Note) { + option (google.api.http) = { + get: "/v1/{name=projects/*/occurrences/*}/notes" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the specified note. + rpc GetNote(GetNoteRequest) returns (Note) { + option (google.api.http) = { + get: "/v1/{name=projects/*/notes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists notes for the specified project. + rpc ListNotes(ListNotesRequest) returns (ListNotesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/notes" + }; + option (google.api.method_signature) = "parent,filter"; + } + + // Deletes the specified note. + rpc DeleteNote(DeleteNoteRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/notes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new note. + rpc CreateNote(CreateNoteRequest) returns (Note) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/notes" + body: "note" + }; + option (google.api.method_signature) = "parent,note_id,note"; + } + + // Creates new notes in batch. + rpc BatchCreateNotes(BatchCreateNotesRequest) + returns (BatchCreateNotesResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/notes:batchCreate" + body: "*" + }; + option (google.api.method_signature) = "parent,notes"; + } + + // Updates the specified note. + rpc UpdateNote(UpdateNoteRequest) returns (Note) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/notes/*}" + body: "note" + }; + option (google.api.method_signature) = "name,note,update_mask"; + } + + // Lists occurrences referencing the specified note. Provider projects can use + // this method to get all occurrences across consumer projects referencing the + // specified note. + rpc ListNoteOccurrences(ListNoteOccurrencesRequest) + returns (ListNoteOccurrencesResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/notes/*}/occurrences" + }; + option (google.api.method_signature) = "name,filter"; + } +} + +// An instance of an analysis type that has been found on a resource. +message Occurrence { + option (google.api.resource) = { + type: "grafeas.io/Occurrence" + pattern: "projects/{project}/occurrences/{occurrence}" + }; + + // Output only. The name of the occurrence in the form of + // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + string name = 1; + + // Required. Immutable. A URI that represents the resource for which the + // occurrence applies. For example, + // `https://gcr.io/project/image@sha256:123abc` for a Docker image. + string resource_uri = 2; + + // Required. Immutable. The analysis note associated with this occurrence, in + // the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be + // used as a filter in list requests. + string note_name = 3; + + // Output only. This explicitly denotes which of the occurrence details are + // specified. This field can be used as a filter in list requests. + grafeas.v1.NoteKind kind = 4; + + // A description of actions that can be taken to remedy the note. + string remediation = 5; + + // Output only. The time this occurrence was created. + google.protobuf.Timestamp create_time = 6; + + // Output only. The time this occurrence was last updated. + google.protobuf.Timestamp update_time = 7; + + // Required. Immutable. Describes the details of the note kind found on this + // resource. + oneof details { + // Describes a security vulnerability. + grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + // Describes a verifiable build. + grafeas.v1.BuildOccurrence build = 9; + // Describes how this resource derives from the basis in the associated + // note. + grafeas.v1.ImageOccurrence image = 10; + // Describes the installation of a package on the linked resource. + grafeas.v1.PackageOccurrence package = 11; + // Describes the deployment of an artifact on a runtime. + grafeas.v1.DeploymentOccurrence deployment = 12; + // Describes when a resource was discovered. + grafeas.v1.DiscoveryOccurrence discovery = 13; + // Describes an attestation of an artifact. + grafeas.v1.AttestationOccurrence attestation = 14; + // Describes an available package upgrade on the linked resource. + grafeas.v1.UpgradeOccurrence upgrade = 15; + // Describes a compliance violation on a linked resource. + grafeas.v1.ComplianceOccurrence compliance = 16; + // Describes an attestation of an artifact using dsse. + grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + } + + // https://github.com/secure-systems-lab/dsse + grafeas.v1.Envelope envelope = 18; +} + +// A type of analysis that can be done for a resource. +message Note { + option (google.api.resource) = { + type: "grafeas.io/Note" + pattern: "projects/{project}/notes/{note}" + }; + + // Output only. The name of the note in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1; + + // A one sentence description of this note. + string short_description = 2; + + // A detailed description of this note. + string long_description = 3; + + // Output only. The type of analysis. This field can be used as a filter in + // list requests. + grafeas.v1.NoteKind kind = 4; + + // URLs associated with this note. + repeated grafeas.v1.RelatedUrl related_url = 5; + + // Time of expiration for this note. Empty if note does not expire. + google.protobuf.Timestamp expiration_time = 6; + + // Output only. The time this note was created. This field can be used as a + // filter in list requests. + google.protobuf.Timestamp create_time = 7; + + // Output only. The time this note was last updated. This field can be used as + // a filter in list requests. + google.protobuf.Timestamp update_time = 8; + + // Other notes related to this note. + repeated string related_note_names = 9; + + // Required. Immutable. The type of analysis this note represents. + oneof type { + // A note describing a package vulnerability. + grafeas.v1.VulnerabilityNote vulnerability = 10; + // A note describing build provenance for a verifiable build. + grafeas.v1.BuildNote build = 11; + // A note describing a base image. + grafeas.v1.ImageNote image = 12; + // A note describing a package hosted by various package managers. + grafeas.v1.PackageNote package = 13; + // A note describing something that can be deployed. + grafeas.v1.DeploymentNote deployment = 14; + // A note describing the initial analysis of a resource. + grafeas.v1.DiscoveryNote discovery = 15; + // A note describing an attestation role. + grafeas.v1.AttestationNote attestation = 16; + // A note describing available package upgrades. + grafeas.v1.UpgradeNote upgrade = 17; + // A note describing a compliance check. + grafeas.v1.ComplianceNote compliance = 18; + // A note describing a dsse attestation note. + grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + // A note describing a vulnerability assessment. + grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + } +} + +// Request to get an occurrence. +message GetOccurrenceRequest { + // The name of the occurrence in the form of + // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; +} + +// Request to list occurrences. +message ListOccurrencesRequest { + // The name of the project to list occurrences for in the form of + // `projects/[PROJECT_ID]`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; + + // The filter expression. + string filter = 2; + + // Number of occurrences to return in the list. Must be positive. Max allowed + // page size is 1000. If not specified, page size defaults to 20. + int32 page_size = 3; + + // Token to provide to skip to a particular spot in the list. + string page_token = 4; +} + +// Response for listing occurrences. +message ListOccurrencesResponse { + // The occurrences requested. + repeated Occurrence occurrences = 1; + // The next pagination token in the list response. It should be used as + // `page_token` for the following request. An empty value means no more + // results. + string next_page_token = 2; +} + +// Request to delete an occurrence. +message DeleteOccurrenceRequest { + // The name of the occurrence in the form of + // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; +} + +// Request to create a new occurrence. +message CreateOccurrenceRequest { + // The name of the project in the form of `projects/[PROJECT_ID]`, under which + // the occurrence is to be created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; + // The occurrence to create. + Occurrence occurrence = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to update an occurrence. +message UpdateOccurrenceRequest { + // The name of the occurrence in the form of + // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; + // The updated occurrence. + Occurrence occurrence = 2 [(google.api.field_behavior) = REQUIRED]; + // The fields to update. + google.protobuf.FieldMask update_mask = 3; +} + +// Request to get a note. +message GetNoteRequest { + // The name of the note in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; +} + +// Request to get the note to which the specified occurrence is attached. +message GetOccurrenceNoteRequest { + // The name of the occurrence in the form of + // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; +} + +// Request to list notes. +message ListNotesRequest { + // The name of the project to list notes for in the form of + // `projects/[PROJECT_ID]`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; + + // The filter expression. + string filter = 2; + + // Number of notes to return in the list. Must be positive. Max allowed page + // size is 1000. If not specified, page size defaults to 20. + int32 page_size = 3; + + // Token to provide to skip to a particular spot in the list. + string page_token = 4; +} + +// Response for listing notes. +message ListNotesResponse { + // The notes requested. + repeated Note notes = 1; + // The next pagination token in the list response. It should be used as + // `page_token` for the following request. An empty value means no more + // results. + string next_page_token = 2; +} + +// Request to delete a note. +message DeleteNoteRequest { + // The name of the note in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; +} + +// Request to create a new note. +message CreateNoteRequest { + // The name of the project in the form of `projects/[PROJECT_ID]`, under which + // the note is to be created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; + // The ID to use for this note. + string note_id = 2 [(google.api.field_behavior) = REQUIRED]; + // The note to create. + Note note = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to update a note. +message UpdateNoteRequest { + // The name of the note in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; + // The updated note. + Note note = 2 [(google.api.field_behavior) = REQUIRED]; + // The fields to update. + google.protobuf.FieldMask update_mask = 3; +} + +// Request to list occurrences for a note. +message ListNoteOccurrencesRequest { + // The name of the note to list occurrences for in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; + // The filter expression. + string filter = 2; + // Number of occurrences to return in the list. + int32 page_size = 3; + // Token to provide to skip to a particular spot in the list. + string page_token = 4; +} + +// Response for listing occurrences for a note. +message ListNoteOccurrencesResponse { + // The occurrences attached to the specified note. + repeated Occurrence occurrences = 1; + // Token to provide to skip to a particular spot in the list. + string next_page_token = 2; +} + +// Request to create notes in batch. +message BatchCreateNotesRequest { + // The name of the project in the form of `projects/[PROJECT_ID]`, under which + // the notes are to be created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; + + // The notes to create. Max allowed length is 1000. + map notes = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response for creating notes in batch. +message BatchCreateNotesResponse { + // The notes that were created. + repeated Note notes = 1; +} + +// Request to create occurrences in batch. +message BatchCreateOccurrencesRequest { + // The name of the project in the form of `projects/[PROJECT_ID]`, under which + // the occurrences are to be created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Project" + ]; + + // The occurrences to create. Max allowed length is 1000. + repeated Occurrence occurrences = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response for creating occurrences in batch. +message BatchCreateOccurrencesResponse { + // The occurrences that were created. + repeated Occurrence occurrences = 1; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto new file mode 100644 index 000000000000..9ac162cec22f --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto @@ -0,0 +1,83 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// Layer holds metadata specific to a layer of a Docker image. +message Layer { + // Required. The recovered Dockerfile directive used to construct this layer. + // See https://docs.docker.com/engine/reference/builder/ for more information. + string directive = 1; + + // The recovered arguments to the Dockerfile directive. + string arguments = 2; +} + +// A set of properties that uniquely identify a given Docker image. +message Fingerprint { + // Required. The layer ID of the final layer in the Docker image's v1 + // representation. + string v1_name = 1; + + // Required. The ordered list of v2 blobs that represent a given image. + repeated string v2_blob = 2; + + // Output only. The name of the image's v2 blobs computed via: + // [bottom] := v2_blob[bottom] + // [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) + // Only the name of the final blob is kept. + string v2_name = 3; +} + +// Basis describes the base image portion (Note) of the DockerImage +// relationship. Linked occurrences are derived from this or an equivalent image +// via: +// FROM +// Or an equivalent reference, e.g., a tag of the resource_url. +message ImageNote { + // Required. Immutable. The resource_url for the resource representing the + // basis of associated occurrence images. + string resource_url = 1; + + // Required. Immutable. The fingerprint of the base image. + Fingerprint fingerprint = 2; +} + +// Details of the derived image portion of the DockerImage relationship. This +// image would be produced from a Dockerfile with FROM . +message ImageOccurrence { + // Required. The fingerprint of the derived image. + Fingerprint fingerprint = 1; + + // Output only. The number of layers by which this image differs from the + // associated image basis. + int32 distance = 2; + + // This contains layer-specific metadata, if populated it has length + // "distance" and is ordered with [distance] being the layer immediately + // following the base image and [1] being the final layer. + repeated Layer layer_info = 3; + + // Output only. This contains the base image URL for the derived image + // occurrence. + string base_resource_url = 4; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto new file mode 100644 index 000000000000..78886b66e487 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto @@ -0,0 +1,113 @@ +// Copyright 2021 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; +option java_outer_classname = "InTotoProvenanceProto"; + +// Spec defined at +// https://github.com/in-toto/attestation/blob/main/spec/predicates/provenance.md + +// Steps taken to build the artifact. +// For a TaskRun, typically each container corresponds to one step in the +// recipe. +message Recipe { + // URI indicating what type of recipe was performed. It determines the meaning + // of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. + string type = 1; + // Index in materials containing the recipe steps that are not implied by + // recipe.type. For example, if the recipe type were "make", then this would + // point to the source containing the Makefile, not the make program itself. + // Set to -1 if the recipe doesn't come from a material, as zero is default + // unset value for int64. + int64 defined_in_material = 2; + // String identifying the entry point into the build. + // This is often a path to a configuration file and/or a target label within + // that file. The syntax and meaning are defined by recipe.type. For example, + // if the recipe type were "make", then this would reference the directory in + // which to run make as well as which target to use. + string entry_point = 3; + // Collection of all external inputs that influenced the build on top of + // recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe + // type were "make", then this might be the flags passed to make aside from + // the target, which is captured in recipe.entryPoint. Since the arguments + // field can greatly vary in structure, depending on the builder and recipe + // type, this is of form "Any". + repeated google.protobuf.Any arguments = 4; + // Any other builder-controlled inputs necessary for correctly evaluating the + // recipe. Usually only needed for reproducing the build but not evaluated as + // part of policy. Since the environment field can greatly vary in structure, + // depending on the builder and recipe type, this is of form "Any". + repeated google.protobuf.Any environment = 5; +} + +// Indicates that the builder claims certain fields in this message to be +// complete. +message Completeness { + // If true, the builder claims that recipe.arguments is complete, meaning that + // all external inputs are properly captured in the recipe. + bool arguments = 1; + // If true, the builder claims that recipe.environment is claimed to be + // complete. + bool environment = 2; + // If true, the builder claims that materials are complete, usually through + // some controls to prevent network access. Sometimes called "hermetic". + bool materials = 3; +} + +// Other properties of the build. +message Metadata { + // Identifies the particular build invocation, which can be useful for finding + // associated logs or other ad-hoc analysis. The value SHOULD be globally + // unique, per in-toto Provenance spec. + string build_invocation_id = 1; + // The timestamp of when the build started. + google.protobuf.Timestamp build_started_on = 2; + // The timestamp of when the build completed. + google.protobuf.Timestamp build_finished_on = 3; + // Indicates that the builder claims certain fields in this message to be + // complete. + Completeness completeness = 4; + // If true, the builder claims that running the recipe on materials will + // produce bit-for-bit identical output. + bool reproducible = 5; +} + +message BuilderConfig { + string id = 1; +} + +message InTotoProvenance { + BuilderConfig builder_config = 1; // required + // Identifies the configuration used for the build. + // When combined with materials, this SHOULD fully describe the build, + // such that re-running this recipe results in bit-for-bit identical output + // (if the build is reproducible). + Recipe recipe = 2; // required + Metadata metadata = 3; + // The collection of artifacts that influenced the build including sources, + // dependencies, build tools, base images, and so on. This is considered to be + // incomplete unless metadata.completeness.materials is true. Unset or null is + // equivalent to empty. + repeated string materials = 4; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto new file mode 100644 index 000000000000..1f798d0d65f1 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto @@ -0,0 +1,52 @@ +// Copyright 2021 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "grafeas/v1/intoto_provenance.proto"; +import "grafeas/v1/slsa_provenance.proto"; +import "grafeas/v1/slsa_provenance_zero_two.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; +option java_outer_classname = "InTotoStatementProto"; + +// Spec defined at +// https://github.com/in-toto/attestation/tree/main/spec#statement The +// serialized InTotoStatement will be stored as Envelope.payload. +// Envelope.payloadType is always "application/vnd.in-toto+json". +message InTotoStatement { + // Always `https://in-toto.io/Statement/v0.1`. + string type = 1 [json_name = "_type"]; + repeated Subject subject = 2; + // `https://slsa.dev/provenance/v0.1` for SlsaProvenance. + string predicate_type = 3; + oneof predicate { + InTotoProvenance provenance = 4; + SlsaProvenance slsa_provenance = 5; + SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + } +} +message Subject { + string name = 1; + // `"": ""` + // Algorithms can be e.g. sha256, sha512 + // See + // https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet + map digest = 2; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto new file mode 100644 index 000000000000..61b21dbf0323 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto @@ -0,0 +1,192 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/api/field_behavior.proto"; +import "grafeas/v1/common.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// Instruction set architectures supported by various package managers. +enum Architecture { + // Unknown architecture. + ARCHITECTURE_UNSPECIFIED = 0; + // X86 architecture. + X86 = 1; + // X64 architecture. + X64 = 2; +} + +// This represents a particular channel of distribution for a given package. +// E.g., Debian's jessie-backports dpkg mirror. +message Distribution { + // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + // denoting the package manager version distributing a package. + string cpe_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // The CPU architecture for which packages in this distribution channel were + // built. + Architecture architecture = 2; + + // The latest available version of this package in this distribution channel. + Version latest_version = 3; + + // A freeform string denoting the maintainer of this package. + string maintainer = 4; + + // The distribution channel-specific homepage for this package. + string url = 5; + + // The distribution channel-specific description of this package. + string description = 6; +} + +// An occurrence of a particular package installation found within a system's +// filesystem. E.g., glibc was found in `/var/lib/dpkg/status`. +message Location { + // Deprecated. + // The CPE URI in [CPE format](https://cpe.mitre.org/specification/) + string cpe_uri = 1; + + // Deprecated. + // The version installed at this location. + Version version = 2; + + // The path from which we gathered that this package/version is installed. + string path = 3; +} + +// PackageNote represents a particular package version. +message PackageNote { + // The name of the package. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Deprecated. + // The various channels by which a package is distributed. + repeated Distribution distribution = 10; + + // The type of package; whether native or non native (e.g., ruby gems, + // node.js packages, etc.). + string package_type = 11; + + // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + // denoting the package manager version distributing a package. + // The cpe_uri will be blank for language packages. + string cpe_uri = 12; + + // The CPU architecture for which packages in this distribution channel were + // built. Architecture will be blank for language packages. + Architecture architecture = 13; + + // The version of the package. + Version version = 14; + + // A freeform text denoting the maintainer of this package. + string maintainer = 15; + + // The homepage for this package. + string url = 16; + + // The description of this package. + string description = 17; + + // Licenses that have been declared by the authors of the package. + License license = 18; + + // Hash value, typically a file digest, that allows unique + // identification a specific package. + repeated Digest digest = 19; +} + +// Details on how a particular software package was installed on a system. +message PackageOccurrence { + // The name of the installed package. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // All of the places within the filesystem versions of this package + // have been found. + repeated Location location = 2; + + // The type of package; whether native or non native (e.g., ruby gems, + // node.js packages, etc.). + string package_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + // denoting the package manager version distributing a package. + // The cpe_uri will be blank for language packages. + string cpe_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The CPU architecture for which packages in this distribution channel were + // built. Architecture will be blank for language packages. + Architecture architecture = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Licenses that have been declared by the authors of the package. + License license = 6; + + // The version of the package. + Version version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Version contains structured information about the version of a package. +message Version { + // Used to correct mistakes in the version numbering scheme. + int32 epoch = 1; + + // Required only when version kind is NORMAL. The main part of the version + // name. + string name = 2; + + // The iteration of the package build from the above version. + string revision = 3; + + // Whether this version is specifying part of an inclusive range. Grafeas + // does not have the capability to specify version ranges; instead we have + // fields that specify start version and end versions. At times this is + // insufficient - we also need to specify whether the version is included in + // the range or is excluded from the range. This boolean is expected to be set + // to true when the version is included in a range. + bool inclusive = 6; + + // Whether this is an ordinary package version or a sentinel MIN/MAX version. + enum VersionKind { + // Unknown. + VERSION_KIND_UNSPECIFIED = 0; + // A standard package version. + NORMAL = 1; + // A special version representing negative infinity. + MINIMUM = 2; + // A special version representing positive infinity. + MAXIMUM = 3; + } + + // Required. Distinguishes between sentinel MIN/MAX versions and normal + // versions. + VersionKind kind = 4; + + // Human readable version string. This string is of the form + // :- and is only set when kind is NORMAL. + string full_name = 5; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto new file mode 100644 index 000000000000..06b109785f8a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto @@ -0,0 +1,265 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// Provenance of a build. Contains all information needed to verify the full +// details about the build from source to completion. +message BuildProvenance { + // Required. Unique identifier of the build. + string id = 1; + + // ID of the project. + string project_id = 2; + + // Commands requested by the build. + repeated Command commands = 3; + + // Output of the build. + repeated Artifact built_artifacts = 4; + + // Time at which the build was created. + google.protobuf.Timestamp create_time = 5; + + // Time at which execution of the build was started. + google.protobuf.Timestamp start_time = 6; + + // Time at which execution of the build was finished. + google.protobuf.Timestamp end_time = 7; + + // E-mail address of the user who initiated this build. Note that this was the + // user's e-mail address at the time the build was initiated; this address may + // not represent the same end-user for all time. + string creator = 8; + + // URI where any logs for this provenance were written. + string logs_uri = 9; + + // Details of the Source input to the build. + Source source_provenance = 10; + + // Trigger identifier if the build was triggered automatically; empty if not. + string trigger_id = 11; + + // Special options applied to this build. This is a catch-all field where + // build providers can enter any desired additional details. + map build_options = 12; + + // Version string of the builder at the time this build was executed. + string builder_version = 13; +} + +// Source describes the location of the source used for the build. +message Source { + // If provided, the input binary artifacts for the build came from this + // location. + string artifact_storage_source_uri = 1; + + // Hash(es) of the build source, which can be used to verify that the original + // source integrity was maintained in the build. + // + // The keys to this map are file paths used as build source and the values + // contain the hash values for those files. + // + // If the build source came in a single package such as a gzipped tarfile + // (.tar.gz), the FileHash will be for the single path to that file. + map file_hashes = 2; + + // If provided, the source code used for the build came from this location. + SourceContext context = 3; + + // If provided, some of the source code used for the build may be found in + // these locations, in the case where the source repository had multiple + // remotes or submodules. This list will not include the context specified in + // the context field. + repeated SourceContext additional_contexts = 4; +} + +// Container message for hashes of byte content of files, used in source +// messages to verify integrity of source input to the build. +message FileHashes { + // Required. Collection of file hashes. + repeated Hash file_hash = 1; +} + +// Container message for hash values. +message Hash { + // Required. The type of hash that was performed, e.g. "SHA-256". + string type = 1; + // Required. The hash value. + bytes value = 2; +} + +// Command describes a step performed as part of the build pipeline. +message Command { + // Required. Name of the command, as presented on the command line, or if the + // command is packaged as a Docker container, as presented to `docker pull`. + string name = 1; + + // Environment variables set before running this command. + repeated string env = 2; + + // Command-line arguments used when executing this command. + repeated string args = 3; + + // Working directory (relative to project source root) used when running this + // command. + string dir = 4; + + // Optional unique identifier for this command, used in wait_for to reference + // this command as a dependency. + string id = 5; + + // The ID(s) of the command(s) that this command depends on. + repeated string wait_for = 6; +} + +// Artifact describes a build product. +message Artifact { + // Hash or checksum value of a binary, or Docker Registry 2.0 digest of a + // container. + string checksum = 1; + + // Artifact ID, if any; for container images, this will be a URL by digest + // like `gcr.io/projectID/imagename@sha256:123456`. + string id = 2; + + // Related artifact names. This may be the path to a binary or jar file, or in + // the case of a container build, the name used to push the container image to + // Google Container Registry, as presented to `docker push`. Note that a + // single Artifact ID can have multiple names, for example if two tags are + // applied to one image. + repeated string names = 3; +} + +// A SourceContext is a reference to a tree of files. A SourceContext together +// with a path point to a unique revision of a single file or directory. +message SourceContext { + // A SourceContext can refer any one of the following types of repositories. + oneof context { + // A SourceContext referring to a revision in a Google Cloud Source Repo. + CloudRepoSourceContext cloud_repo = 1; + + // A SourceContext referring to a Gerrit project. + GerritSourceContext gerrit = 2; + + // A SourceContext referring to any third party Git repo (e.g., GitHub). + GitSourceContext git = 3; + } + + // Labels with user defined metadata. + map labels = 4; +} + +// An alias to a repo revision. +message AliasContext { + // The type of an alias. + enum Kind { + // Unknown. + KIND_UNSPECIFIED = 0; + // Git tag. + FIXED = 1; + // Git branch. + MOVABLE = 2; + // Used to specify non-standard aliases. For example, if a Git repo has a + // ref named "refs/foo/bar". + OTHER = 4; + } + + // The alias kind. + Kind kind = 1; + + // The alias name. + string name = 2; +} + +// A CloudRepoSourceContext denotes a particular revision in a Google Cloud +// Source Repo. +message CloudRepoSourceContext { + // The ID of the repo. + RepoId repo_id = 1; + + // A revision in a Cloud Repo can be identified by either its revision ID or + // its alias. + oneof revision { + // A revision ID. + string revision_id = 2; + + // An alias, which may be a branch or tag. + AliasContext alias_context = 3; + } +} + +// A SourceContext referring to a Gerrit project. +message GerritSourceContext { + // The URI of a running Gerrit instance. + string host_uri = 1; + + // The full project name within the host. Projects may be nested, so + // "project/subproject" is a valid project name. The "repo name" is the + // hostURI/project. + string gerrit_project = 2; + + // A revision in a Gerrit project can be identified by either its revision ID + // or its alias. + oneof revision { + // A revision (commit) ID. + string revision_id = 3; + + // An alias, which may be a branch or tag. + AliasContext alias_context = 4; + } +} + +// A GitSourceContext denotes a particular revision in a third party Git +// repository (e.g., GitHub). +message GitSourceContext { + // Git repository URL. + string url = 1; + + // Git commit hash. + string revision_id = 2; +} + +// A unique identifier for a Cloud Repo. +message RepoId { + // A cloud repo can be identified by either its project ID and repository name + // combination, or its globally unique identifier. + oneof id { + // A combination of a project ID and a repo name. + ProjectRepoId project_repo_id = 1; + + // A server-assigned, globally unique identifier. + string uid = 2; + } +} + +// Selects a repo using a Google Cloud Platform project ID (e.g., +// winged-cargo-31) and a repo name within that project. +message ProjectRepoId { + // The ID of the project. + string project_id = 1; + + // The name of the repo. Leave empty for the default repo. + string repo_name = 2; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto new file mode 100644 index 000000000000..cc9cc384535a --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto @@ -0,0 +1,38 @@ +// Copyright 2021 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// Note provider assigned severity/impact ranking. +enum Severity { + // Unknown. + SEVERITY_UNSPECIFIED = 0; + // Minimal severity. + MINIMAL = 1; + // Low severity. + LOW = 2; + // Medium severity. + MEDIUM = 3; + // High severity. + HIGH = 4; + // Critical severity. + CRITICAL = 5; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto new file mode 100644 index 000000000000..c038af064e0e --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto @@ -0,0 +1,115 @@ +// Copyright 2021 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; +option java_outer_classname = "SlsaProvenanceProto"; + +message SlsaProvenance { + // Steps taken to build the artifact. + // For a TaskRun, typically each container corresponds to one step in the + // recipe. + message SlsaRecipe { + // URI indicating what type of recipe was performed. It determines the + // meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and + // materials. + string type = 1; + // Index in materials containing the recipe steps that are not implied by + // recipe.type. For example, if the recipe type were "make", then this would + // point to the source containing the Makefile, not the make program itself. + // Set to -1 if the recipe doesn't come from a material, as zero is default + // unset value for int64. + int64 defined_in_material = 2; + // String identifying the entry point into the build. + // This is often a path to a configuration file and/or a target label within + // that file. The syntax and meaning are defined by recipe.type. For + // example, if the recipe type were "make", then this would reference the + // directory in which to run make as well as which target to use. + string entry_point = 3; + // Collection of all external inputs that influenced the build on top of + // recipe.definedInMaterial and recipe.entryPoint. For example, if the + // recipe type were "make", then this might be the flags passed to make + // aside from the target, which is captured in recipe.entryPoint. Depending + // on the recipe Type, the structure may be different. + google.protobuf.Any arguments = 4; + // Any other builder-controlled inputs necessary for correctly evaluating + // the recipe. Usually only needed for reproducing the build but not + // evaluated as part of policy. Depending on the recipe Type, the structure + // may be different. + google.protobuf.Any environment = 5; + } + + // Indicates that the builder claims certain fields in this message to be + // complete. + message SlsaCompleteness { + // If true, the builder claims that recipe.arguments is complete, meaning + // that all external inputs are properly captured in the recipe. + bool arguments = 1; + // If true, the builder claims that recipe.environment is claimed to be + // complete. + bool environment = 2; + // If true, the builder claims that materials are complete, usually through + // some controls to prevent network access. Sometimes called "hermetic". + bool materials = 3; + } + + // Other properties of the build. + message SlsaMetadata { + // Identifies the particular build invocation, which can be useful for + // finding associated logs or other ad-hoc analysis. The value SHOULD be + // globally unique, per in-toto Provenance spec. + string build_invocation_id = 1; + // The timestamp of when the build started. + google.protobuf.Timestamp build_started_on = 2; + // The timestamp of when the build completed. + google.protobuf.Timestamp build_finished_on = 3; + // Indicates that the builder claims certain fields in this message to be + // complete. + SlsaCompleteness completeness = 4; + // If true, the builder claims that running the recipe on materials will + // produce bit-for-bit identical output. + bool reproducible = 5; + } + + message SlsaBuilder { + string id = 1; + } + + message Material { + string uri = 1; + map digest = 2; + } + + SlsaBuilder builder = 1; // required + // Identifies the configuration used for the build. + // When combined with materials, this SHOULD fully describe the build, + // such that re-running this recipe results in bit-for-bit identical output + // (if the build is reproducible). + SlsaRecipe recipe = 2; // required + SlsaMetadata metadata = 3; + // The collection of artifacts that influenced the build including sources, + // dependencies, build tools, base images, and so on. This is considered to be + // incomplete unless metadata.completeness.materials is true. Unset or null is + // equivalent to empty. + repeated Material materials = 4; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto new file mode 100644 index 000000000000..11cdd1c0ba59 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto @@ -0,0 +1,82 @@ +// Copyright 2021 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; +option java_outer_classname = "SlsaProvenanceZeroTwoProto"; + +message SlsaProvenanceZeroTwo { + // See full explanation of fields at slsa.dev/provenance/v0.2. + + // Identifies the entity that executed the recipe, which is trusted to have + // correctly performed the operation and populated this provenance. + message SlsaBuilder { + string id = 1; + } + + // The collection of artifacts that influenced the build including sources, + // dependencies, build tools, base images, and so on. + message SlsaMaterial { + string uri = 1; + map digest = 2; + } + + // Identifies the event that kicked off the build. + message SlsaInvocation { + SlsaConfigSource config_source = 1; + google.protobuf.Struct parameters = 2; + google.protobuf.Struct environment = 3; + } + + // Describes where the config file that kicked off the build came from. + // This is effectively a pointer to the source where buildConfig came from. + message SlsaConfigSource { + string uri = 1; + map digest = 2; + string entry_point = 3; + } + + // Other properties of the build. + message SlsaMetadata { + string build_invocation_id = 1; + google.protobuf.Timestamp build_started_on = 2; + google.protobuf.Timestamp build_finished_on = 3; + SlsaCompleteness completeness = 4; + bool reproducible = 5; + } + + // Indicates that the builder claims certain fields in this message to be + // complete. + message SlsaCompleteness { + bool parameters = 1; + bool environment = 2; + bool materials = 3; + } + + SlsaBuilder builder = 1; + string build_type = 2; + SlsaInvocation invocation = 3; + google.protobuf.Struct build_config = 4; + SlsaMetadata metadata = 5; + repeated SlsaMaterial materials = 6; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto new file mode 100644 index 000000000000..89d389299199 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto @@ -0,0 +1,114 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/protobuf/timestamp.proto"; +import "grafeas/v1/package.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// An Upgrade Note represents a potential upgrade of a package to a given +// version. For each package version combination (i.e. bash 4.0, bash 4.1, +// bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field +// represents the information related to the update. +message UpgradeNote { + // Required for non-Windows OS. The package this Upgrade is for. + string package = 1; + // Required for non-Windows OS. The version of the package in machine + human + // readable form. + grafeas.v1.Version version = 2; + // Metadata about the upgrade for each specific operating system. + repeated UpgradeDistribution distributions = 3; + // Required for Windows OS. Represents the metadata about the Windows update. + WindowsUpdate windows_update = 4; +} + +// The Upgrade Distribution represents metadata about the Upgrade for each +// operating system (CPE). Some distributions have additional metadata around +// updates, classifying them into various categories and severities. +message UpgradeDistribution { + // Required - The specific operating system this metadata applies to. See + // https://cpe.mitre.org/specification/. + string cpe_uri = 1; + // The operating system classification of this Upgrade, as specified by the + // upstream operating system upgrade feed. For Windows the classification is + // one of the category_ids listed at + // https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) + string classification = 2; + // The severity as specified by the upstream operating system. + string severity = 3; + // The cve tied to this Upgrade. + repeated string cve = 4; +} + +// Windows Update represents the metadata about the update for the Windows +// operating system. The fields in this message come from the Windows Update API +// documented at +// https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate. +message WindowsUpdate { + // The unique identifier of the update. + message Identity { + // The revision independent identifier of the update. + string update_id = 1; + // The revision number of the update. + int32 revision = 2; + } + // Required - The unique identifier for the update. + Identity identity = 1; + // The localized title of the update. + string title = 2; + // The localized description of the update. + string description = 3; + // The category to which the update belongs. + message Category { + // The identifier of the category. + string category_id = 1; + // The localized name of the category. + string name = 2; + } + // The list of categories to which the update belongs. + repeated Category categories = 4; + // The Microsoft Knowledge Base article IDs that are associated with the + // update. + repeated string kb_article_ids = 5; + // The hyperlink to the support information for the update. + string support_url = 6; + // The last published timestamp of the update. + google.protobuf.Timestamp last_published_timestamp = 7; +} + +// An Upgrade Occurrence represents that a specific resource_url could install a +// specific upgrade. This presence is supplied via local sources (i.e. it is +// present in the mirror and the running system has noticed its availability). +// For Windows, both distribution and windows_update contain information for the +// Windows update. +message UpgradeOccurrence { + // Required for non-Windows OS. The package this Upgrade is for. + string package = 1; + // Required for non-Windows OS. The version of the package in a machine + + // human readable form. + grafeas.v1.Version parsed_version = 3; + // Metadata about the upgrade for available for the specific operating system + // for the resource_url. This allows efficient filtering, as well as + // making it easier to use the occurrence. + UpgradeDistribution distribution = 4; + // Required for Windows OS. Represents the metadata about the Windows update. + WindowsUpdate windows_update = 5; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vex.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vex.proto new file mode 100644 index 000000000000..ba53a8438ff8 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vex.proto @@ -0,0 +1,203 @@ +// Copyright 2023 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "grafeas/v1/common.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// A single VulnerabilityAssessmentNote represents +// one particular product's vulnerability assessment for one CVE. +message VulnerabilityAssessmentNote { + // The title of the note. E.g. `Vex-Debian-11.4` + string title = 1; + + // A one sentence description of this Vex. + string short_description = 2; + + // A detailed description of this Vex. + string long_description = 3; + + // Identifies the language used by this document, + // corresponding to IETF BCP 47 / RFC 5646. + string language_code = 4; + + // Publisher contains information about the publisher of + // this Note. + // (-- api-linter: core::0123::resource-annotation=disabled + // aip.dev/not-precedent: Publisher is not a separate resource. --) + message Publisher { + // Name of the publisher. + // Examples: 'Google', 'Google Cloud Platform'. + string name = 1; + + // Provides information about the authority of the issuing party to + // release the document, in particular, the party's constituency and + // responsibilities or other obligations. + string issuing_authority = 2; + + // The context or namespace. + // Contains a URL which is under control of the issuing party and can + // be used as a globally unique identifier for that issuing party. + // Example: https://csaf.io + string publisher_namespace = 3; + } + + // Publisher details of this Note. + Publisher publisher = 5; + + // Product contains information about a product and how to uniquely identify + // it. + // (-- api-linter: core::0123::resource-annotation=disabled + // aip.dev/not-precedent: Product is not a separate resource. --) + message Product { + // Name of the product. + string name = 1; + + // Token that identifies a product so that it can be referred to from other + // parts in the document. There is no predefined format as long as it + // uniquely identifies a group in the context of the current document. + string id = 2; + + oneof identifier { + // Contains a URI which is vendor-specific. + // Example: The artifact repository URL of an image. + string generic_uri = 3; + } + } + + // The product affected by this vex. + Product product = 6; + + // Assessment provides all information that is related to a single + // vulnerability for this product. + message Assessment { + // Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) + // tracking number for the vulnerability. + string cve = 1; + + // A one sentence description of this Vex. + string short_description = 2; + + // A detailed description of this Vex. + string long_description = 3; + + // Holds a list of references associated with this vulnerability item and + // assessment. These uris have additional information about the + // vulnerability and the assessment itself. E.g. Link to a document which + // details how this assessment concluded the state of this vulnerability. + repeated grafeas.v1.RelatedUrl related_uris = 4; + + // Provides the state of this Vulnerability assessment. + enum State { + // No state is specified. + STATE_UNSPECIFIED = 0; + // This product is known to be affected by this vulnerability. + AFFECTED = 1; + // This product is known to be not affected by this vulnerability. + NOT_AFFECTED = 2; + // This product contains a fix for this vulnerability. + FIXED = 3; + // It is not known yet whether these versions are or are not affected + // by the vulnerability. However, it is still under investigation. + UNDER_INVESTIGATION = 4; + } + + // Provides the state of this Vulnerability assessment. + State state = 5; + + // Contains information about the impact of this vulnerability, + // this will change with time. + repeated string impacts = 6; + + // Justification provides the justification when the state of the + // assessment if NOT_AFFECTED. + message Justification { + // Provides the type of justification. + enum JustificationType { + // JUSTIFICATION_TYPE_UNSPECIFIED. + JUSTIFICATION_TYPE_UNSPECIFIED = 0; + // The vulnerable component is not present in the product. + COMPONENT_NOT_PRESENT = 1; + // The vulnerable code is not present. Typically this case + // occurs when source code is configured or built in a way that excludes + // the vulnerable code. + VULNERABLE_CODE_NOT_PRESENT = 2; + // The vulnerable code can not be executed. + // Typically this case occurs when the product includes the vulnerable + // code but does not call or use the vulnerable code. + VULNERABLE_CODE_NOT_IN_EXECUTE_PATH = 3; + // The vulnerable code cannot be controlled by an attacker to exploit + // the vulnerability. + VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY = 4; + // The product includes built-in protections or features that prevent + // exploitation of the vulnerability. These built-in protections cannot + // be subverted by the attacker and cannot be configured or disabled by + // the user. These mitigations completely prevent exploitation based on + // known attack vectors. + INLINE_MITIGATIONS_ALREADY_EXIST = 5; + } + + // The justification type for this vulnerability. + JustificationType justification_type = 1; + + // Additional details on why this justification was chosen. + string details = 2; + } + + // Justification provides the justification when the state of the + // assessment if NOT_AFFECTED. + Justification justification = 7; + + // Specifies details on how to handle (and presumably, fix) a vulnerability. + message Remediation { + // The type of remediation that can be applied. + enum RemediationType { + // No remediation type specified. + REMEDIATION_TYPE_UNSPECIFIED = 0; + // A MITIGATION is available. + MITIGATION = 1; + // No fix is planned. + NO_FIX_PLANNED = 2; + // Not available. + NONE_AVAILABLE = 3; + // A vendor fix is available. + VENDOR_FIX = 4; + // A workaround is available. + WORKAROUND = 5; + } + + // The type of remediation that can be applied. + RemediationType remediation_type = 1; + + // Contains a comprehensive human-readable discussion of the remediation. + string details = 2; + + // Contains the URL where to obtain the remediation. + grafeas.v1.RelatedUrl remediation_uri = 3; + } + + // Specifies details on how to handle (and presumably, fix) a vulnerability. + repeated Remediation remediations = 8; + } + + // Represents a vulnerability assessment for the product. + Assessment assessment = 7; +} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto new file mode 100644 index 000000000000..3b316eb8dd37 --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto @@ -0,0 +1,297 @@ +// Copyright 2019 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; +import "grafeas/v1/common.proto"; +import "grafeas/v1/cvss.proto"; +import "grafeas/v1/package.proto"; +import "grafeas/v1/severity.proto"; +import "grafeas/v1/vex.proto"; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// A security vulnerability that can be found in resources. +message VulnerabilityNote { + // The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 + // where 0 indicates low severity and 10 indicates high severity. + float cvss_score = 1; + + // The note provider assigned severity of this vulnerability. + grafeas.v1.Severity severity = 2; + + // Details of all known distros and packages affected by this vulnerability. + repeated Detail details = 3; + + // A detail for a distro and package affected by this vulnerability and its + // associated fix (if one is available). + message Detail { + // The distro assigned severity of this vulnerability. + string severity_name = 1; + + // A vendor-specific description of this vulnerability. + string description = 2; + + // The type of package; whether native or non native (e.g., ruby gems, + // node.js packages, etc.). + string package_type = 3; + + // Required. The [CPE URI](https://cpe.mitre.org/specification/) this + // vulnerability affects. + string affected_cpe_uri = 4; + + // Required. The package this vulnerability affects. + string affected_package = 5; + + // The version number at the start of an interval in which this + // vulnerability exists. A vulnerability can affect a package between + // version numbers that are disjoint sets of intervals (example: + // [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be + // represented in its own Detail. If a specific affected version is provided + // by a vulnerability database, affected_version_start and + // affected_version_end will be the same in that Detail. + grafeas.v1.Version affected_version_start = 6; + + // The version number at the end of an interval in which this vulnerability + // exists. A vulnerability can affect a package between version numbers + // that are disjoint sets of intervals (example: [1.0.0-1.1.0], + // [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its + // own Detail. If a specific affected version is provided by a vulnerability + // database, affected_version_start and affected_version_end will be the + // same in that Detail. + grafeas.v1.Version affected_version_end = 7; + + // The distro recommended [CPE URI](https://cpe.mitre.org/specification/) + // to update to that contains a fix for this vulnerability. It is possible + // for this to be different from the affected_cpe_uri. + string fixed_cpe_uri = 8; + + // The distro recommended package to update to that contains a fix for this + // vulnerability. It is possible for this to be different from the + // affected_package. + string fixed_package = 9; + + // The distro recommended version to update to that contains a + // fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no + // such version is yet available. + grafeas.v1.Version fixed_version = 10; + + // Whether this detail is obsolete. Occurrences are expected not to point to + // obsolete details. + bool is_obsolete = 11; + + // The time this information was last changed at the source. This is an + // upstream timestamp from the underlying information source - e.g. Ubuntu + // security tracker. + google.protobuf.Timestamp source_update_time = 12; + + // The source from which the information in this Detail was obtained. + string source = 13; + + // The name of the vendor of the product. + string vendor = 14; + } + + // The full description of the CVSSv3 for this vulnerability. + CVSSv3 cvss_v3 = 4; + + // Windows details get their own format because the information format and + // model don't match a normal detail. Specifically Windows updates are done as + // patches, thus Windows vulnerabilities really are a missing package, rather + // than a package being at an incorrect version. + repeated WindowsDetail windows_details = 5; + + message WindowsDetail { + // Required. The [CPE URI](https://cpe.mitre.org/specification/) this + // vulnerability affects. + string cpe_uri = 1; + + // Required. The name of this vulnerability. + string name = 2; + + // The description of this vulnerability. + string description = 3; + + // Required. The names of the KBs which have hotfixes to mitigate this + // vulnerability. Note that there may be multiple hotfixes (and thus + // multiple KBs) that mitigate a given vulnerability. Currently any listed + // KBs presence is considered a fix. + repeated KnowledgeBase fixing_kbs = 4; + + message KnowledgeBase { + // The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). + string name = 1; + // A link to the KB in the [Windows update catalog] + // (https://www.catalog.update.microsoft.com/). + string url = 2; + } + } + + // The time this information was last changed at the source. This is an + // upstream timestamp from the underlying information source - e.g. Ubuntu + // security tracker. + google.protobuf.Timestamp source_update_time = 6; + + // CVSS version used to populate cvss_score and severity. + grafeas.v1.CVSSVersion cvss_version = 7; + + // The full description of the v2 CVSS for this vulnerability. + CVSS cvss_v2 = 8; + + // Next free ID is 9. +} + +// An occurrence of a severity vulnerability on a resource. +message VulnerabilityOccurrence { + // The type of package; whether native or non native (e.g., ruby gems, node.js + // packages, etc.). + string type = 1; + + // Output only. The note provider assigned severity of this vulnerability. + grafeas.v1.Severity severity = 2; + + // Output only. The CVSS score of this vulnerability. CVSS score is on a + // scale of 0 - 10 where 0 indicates low severity and 10 indicates high + // severity. + float cvss_score = 3; + + // The cvss v3 score for the vulnerability. + CVSS cvssv3 = 10; + + // Required. The set of affected locations and their fixes (if available) + // within the associated resource. + repeated PackageIssue package_issue = 4; + + // A detail for a distro and package this vulnerability occurrence was found + // in and its associated fix (if one is available). + message PackageIssue { + // Required. The [CPE URI](https://cpe.mitre.org/specification/) this + // vulnerability was found in. + string affected_cpe_uri = 1; + + // Required. The package this vulnerability was found in. + string affected_package = 2; + + // Required. The version of the package that is installed on the resource + // affected by this vulnerability. + grafeas.v1.Version affected_version = 3; + + // The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability + // was fixed in. It is possible for this to be different from the + // affected_cpe_uri. + string fixed_cpe_uri = 4; + + // The package this vulnerability was fixed in. It is possible for this to + // be different from the affected_package. + string fixed_package = 5; + + // Required. The version of the package this vulnerability was fixed in. + // Setting this to VersionKind.MAXIMUM means no fix is yet available. + grafeas.v1.Version fixed_version = 6; + + // Output only. Whether a fix is available for this package. + bool fix_available = 7; + + // The type of package (e.g. OS, MAVEN, GO). + string package_type = 8; + + // The distro or language system assigned severity for this vulnerability + // when that is available and note provider assigned severity when it is not + // available. + grafeas.v1.Severity effective_severity = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The location at which this package was found. + repeated FileLocation file_location = 10; + } + + // Output only. A one sentence description of this vulnerability. + string short_description = 5; + + // Output only. A detailed description of this vulnerability. + string long_description = 6; + + // Output only. URLs related to this vulnerability. + repeated grafeas.v1.RelatedUrl related_urls = 7; + + // The distro assigned severity for this vulnerability when it is available, + // otherwise this is the note provider assigned severity. + // + // When there are multiple PackageIssues for this vulnerability, they can have + // different effective severities because some might be provided by the distro + // while others are provided by the language ecosystem for a language pack. + // For this reason, it is advised to use the effective severity on the + // PackageIssue level. In the case where multiple PackageIssues have differing + // effective severities, this field should be the highest severity for any of + // the PackageIssues. + grafeas.v1.Severity effective_severity = 8; + + // Output only. Whether at least one of the affected packages has a fix + // available. + bool fix_available = 9; + + // Output only. CVSS version used to populate cvss_score and severity. + grafeas.v1.CVSSVersion cvss_version = 11; + + // The cvss v2 score for the vulnerability. + CVSS cvss_v2 = 12; + + // VexAssessment provides all publisher provided Vex information that is + // related to this vulnerability. + message VexAssessment { + // Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) + // tracking number for the vulnerability. + string cve = 1; + + // Holds a list of references associated with this vulnerability item and + // assessment. + repeated grafeas.v1.RelatedUrl related_uris = 2; + + // The VulnerabilityAssessment note from which this VexAssessment was + // generated. + // This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`. + // (-- api-linter: core::0122::name-suffix=disabled + // aip.dev/not-precedent: The suffix is kept for consistency. --) + string note_name = 3; + + // Provides the state of this Vulnerability assessment. + grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + + // Contains information about the impact of this vulnerability, + // this will change with time. + repeated string impacts = 5; + + // Specifies details on how to handle (and presumably, fix) a vulnerability. + repeated grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + remediations = 6; + + // Justification provides the justification when the state of the + // assessment if NOT_AFFECTED. + grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + justification = 7; + + // Next ID: 8 + } + + VexAssessment vex_assessment = 13; + + // Next free ID is 14. +} diff --git a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java new file mode 100644 index 000000000000..e13560330bca --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java @@ -0,0 +1,1350 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; +import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class GrafeasClientTest { + private static MockGrafeas mockGrafeas; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private GrafeasClient client; + + @BeforeClass + public static void startStaticServer() { + mockGrafeas = new MockGrafeas(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockGrafeas)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + GrafeasSettings settings = + GrafeasSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = GrafeasClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getOccurrenceTest() throws Exception { + Occurrence expectedResponse = + Occurrence.newBuilder() + .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) + .setResourceUri("resourceUri1234527870") + .setNoteName("noteName1580946845") + .setKind(NoteKind.forNumber(0)) + .setRemediation("remediation779381797") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEnvelope(Envelope.newBuilder().build()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + + Occurrence actualResponse = client.getOccurrence(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOccurrenceRequest actualRequest = ((GetOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOccurrenceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + client.getOccurrence(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOccurrenceTest2() throws Exception { + Occurrence expectedResponse = + Occurrence.newBuilder() + .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) + .setResourceUri("resourceUri1234527870") + .setNoteName("noteName1580946845") + .setKind(NoteKind.forNumber(0)) + .setRemediation("remediation779381797") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEnvelope(Envelope.newBuilder().build()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + + Occurrence actualResponse = client.getOccurrence(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOccurrenceRequest actualRequest = ((GetOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOccurrenceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + client.getOccurrence(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOccurrencesTest() throws Exception { + Occurrence responsesElement = Occurrence.newBuilder().build(); + ListOccurrencesResponse expectedResponse = + ListOccurrencesResponse.newBuilder() + .setNextPageToken("") + .addAllOccurrences(Arrays.asList(responsesElement)) + .build(); + mockGrafeas.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + String filter = "filter-1274492040"; + + ListOccurrencesPagedResponse pagedListResponse = client.listOccurrences(parent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOccurrencesRequest actualRequest = ((ListOccurrencesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOccurrencesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + String filter = "filter-1274492040"; + client.listOccurrences(parent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOccurrencesTest2() throws Exception { + Occurrence responsesElement = Occurrence.newBuilder().build(); + ListOccurrencesResponse expectedResponse = + ListOccurrencesResponse.newBuilder() + .setNextPageToken("") + .addAllOccurrences(Arrays.asList(responsesElement)) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String parent = "parent-995424086"; + String filter = "filter-1274492040"; + + ListOccurrencesPagedResponse pagedListResponse = client.listOccurrences(parent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOccurrencesRequest actualRequest = ((ListOccurrencesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOccurrencesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String parent = "parent-995424086"; + String filter = "filter-1274492040"; + client.listOccurrences(parent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteOccurrenceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockGrafeas.addResponse(expectedResponse); + + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + + client.deleteOccurrence(name); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteOccurrenceRequest actualRequest = ((DeleteOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteOccurrenceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + client.deleteOccurrence(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteOccurrenceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteOccurrence(name); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteOccurrenceRequest actualRequest = ((DeleteOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteOccurrenceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + client.deleteOccurrence(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createOccurrenceTest() throws Exception { + Occurrence expectedResponse = + Occurrence.newBuilder() + .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) + .setResourceUri("resourceUri1234527870") + .setNoteName("noteName1580946845") + .setKind(NoteKind.forNumber(0)) + .setRemediation("remediation779381797") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEnvelope(Envelope.newBuilder().build()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + Occurrence occurrence = Occurrence.newBuilder().build(); + + Occurrence actualResponse = client.createOccurrence(parent, occurrence); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateOccurrenceRequest actualRequest = ((CreateOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(occurrence, actualRequest.getOccurrence()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createOccurrenceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + Occurrence occurrence = Occurrence.newBuilder().build(); + client.createOccurrence(parent, occurrence); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createOccurrenceTest2() throws Exception { + Occurrence expectedResponse = + Occurrence.newBuilder() + .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) + .setResourceUri("resourceUri1234527870") + .setNoteName("noteName1580946845") + .setKind(NoteKind.forNumber(0)) + .setRemediation("remediation779381797") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEnvelope(Envelope.newBuilder().build()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Occurrence occurrence = Occurrence.newBuilder().build(); + + Occurrence actualResponse = client.createOccurrence(parent, occurrence); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateOccurrenceRequest actualRequest = ((CreateOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(occurrence, actualRequest.getOccurrence()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createOccurrenceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String parent = "parent-995424086"; + Occurrence occurrence = Occurrence.newBuilder().build(); + client.createOccurrence(parent, occurrence); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchCreateOccurrencesTest() throws Exception { + BatchCreateOccurrencesResponse expectedResponse = + BatchCreateOccurrencesResponse.newBuilder() + .addAllOccurrences(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + List occurrences = new ArrayList<>(); + + BatchCreateOccurrencesResponse actualResponse = + client.batchCreateOccurrences(parent, occurrences); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateOccurrencesRequest actualRequest = + ((BatchCreateOccurrencesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(occurrences, actualRequest.getOccurrencesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchCreateOccurrencesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + List occurrences = new ArrayList<>(); + client.batchCreateOccurrences(parent, occurrences); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchCreateOccurrencesTest2() throws Exception { + BatchCreateOccurrencesResponse expectedResponse = + BatchCreateOccurrencesResponse.newBuilder() + .addAllOccurrences(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String parent = "parent-995424086"; + List occurrences = new ArrayList<>(); + + BatchCreateOccurrencesResponse actualResponse = + client.batchCreateOccurrences(parent, occurrences); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateOccurrencesRequest actualRequest = + ((BatchCreateOccurrencesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(occurrences, actualRequest.getOccurrencesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchCreateOccurrencesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String parent = "parent-995424086"; + List occurrences = new ArrayList<>(); + client.batchCreateOccurrences(parent, occurrences); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateOccurrenceTest() throws Exception { + Occurrence expectedResponse = + Occurrence.newBuilder() + .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) + .setResourceUri("resourceUri1234527870") + .setNoteName("noteName1580946845") + .setKind(NoteKind.forNumber(0)) + .setRemediation("remediation779381797") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEnvelope(Envelope.newBuilder().build()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + Occurrence occurrence = Occurrence.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Occurrence actualResponse = client.updateOccurrence(name, occurrence, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateOccurrenceRequest actualRequest = ((UpdateOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(occurrence, actualRequest.getOccurrence()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateOccurrenceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + Occurrence occurrence = Occurrence.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateOccurrence(name, occurrence, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateOccurrenceTest2() throws Exception { + Occurrence expectedResponse = + Occurrence.newBuilder() + .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) + .setResourceUri("resourceUri1234527870") + .setNoteName("noteName1580946845") + .setKind(NoteKind.forNumber(0)) + .setRemediation("remediation779381797") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEnvelope(Envelope.newBuilder().build()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + Occurrence occurrence = Occurrence.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Occurrence actualResponse = client.updateOccurrence(name, occurrence, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateOccurrenceRequest actualRequest = ((UpdateOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(occurrence, actualRequest.getOccurrence()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateOccurrenceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + Occurrence occurrence = Occurrence.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateOccurrence(name, occurrence, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOccurrenceNoteTest() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + + Note actualResponse = client.getOccurrenceNote(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOccurrenceNoteRequest actualRequest = ((GetOccurrenceNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOccurrenceNoteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); + client.getOccurrenceNote(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOccurrenceNoteTest2() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + + Note actualResponse = client.getOccurrenceNote(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOccurrenceNoteRequest actualRequest = ((GetOccurrenceNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOccurrenceNoteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + client.getOccurrenceNote(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNoteTest() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + + Note actualResponse = client.getNote(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNoteRequest actualRequest = ((GetNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNoteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + client.getNote(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNoteTest2() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + + Note actualResponse = client.getNote(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNoteRequest actualRequest = ((GetNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNoteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + client.getNote(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotesTest() throws Exception { + Note responsesElement = Note.newBuilder().build(); + ListNotesResponse expectedResponse = + ListNotesResponse.newBuilder() + .setNextPageToken("") + .addAllNotes(Arrays.asList(responsesElement)) + .build(); + mockGrafeas.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + String filter = "filter-1274492040"; + + ListNotesPagedResponse pagedListResponse = client.listNotes(parent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotesList().get(0), resources.get(0)); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotesRequest actualRequest = ((ListNotesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + String filter = "filter-1274492040"; + client.listNotes(parent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotesTest2() throws Exception { + Note responsesElement = Note.newBuilder().build(); + ListNotesResponse expectedResponse = + ListNotesResponse.newBuilder() + .setNextPageToken("") + .addAllNotes(Arrays.asList(responsesElement)) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String parent = "parent-995424086"; + String filter = "filter-1274492040"; + + ListNotesPagedResponse pagedListResponse = client.listNotes(parent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotesList().get(0), resources.get(0)); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotesRequest actualRequest = ((ListNotesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String parent = "parent-995424086"; + String filter = "filter-1274492040"; + client.listNotes(parent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteNoteTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockGrafeas.addResponse(expectedResponse); + + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + + client.deleteNote(name); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNoteRequest actualRequest = ((DeleteNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNoteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + client.deleteNote(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteNoteTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteNote(name); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNoteRequest actualRequest = ((DeleteNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNoteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + client.deleteNote(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNoteTest() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + String noteId = "noteId-1039694675"; + Note note = Note.newBuilder().build(); + + Note actualResponse = client.createNote(parent, noteId, note); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNoteRequest actualRequest = ((CreateNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(noteId, actualRequest.getNoteId()); + Assert.assertEquals(note, actualRequest.getNote()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNoteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + String noteId = "noteId-1039694675"; + Note note = Note.newBuilder().build(); + client.createNote(parent, noteId, note); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNoteTest2() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String parent = "parent-995424086"; + String noteId = "noteId-1039694675"; + Note note = Note.newBuilder().build(); + + Note actualResponse = client.createNote(parent, noteId, note); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNoteRequest actualRequest = ((CreateNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(noteId, actualRequest.getNoteId()); + Assert.assertEquals(note, actualRequest.getNote()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNoteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String parent = "parent-995424086"; + String noteId = "noteId-1039694675"; + Note note = Note.newBuilder().build(); + client.createNote(parent, noteId, note); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchCreateNotesTest() throws Exception { + BatchCreateNotesResponse expectedResponse = + BatchCreateNotesResponse.newBuilder().addAllNotes(new ArrayList()).build(); + mockGrafeas.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + Map notes = new HashMap<>(); + + BatchCreateNotesResponse actualResponse = client.batchCreateNotes(parent, notes); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateNotesRequest actualRequest = ((BatchCreateNotesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(notes, actualRequest.getNotesMap()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchCreateNotesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + Map notes = new HashMap<>(); + client.batchCreateNotes(parent, notes); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchCreateNotesTest2() throws Exception { + BatchCreateNotesResponse expectedResponse = + BatchCreateNotesResponse.newBuilder().addAllNotes(new ArrayList()).build(); + mockGrafeas.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Map notes = new HashMap<>(); + + BatchCreateNotesResponse actualResponse = client.batchCreateNotes(parent, notes); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateNotesRequest actualRequest = ((BatchCreateNotesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(notes, actualRequest.getNotesMap()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchCreateNotesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String parent = "parent-995424086"; + Map notes = new HashMap<>(); + client.batchCreateNotes(parent, notes); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateNoteTest() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + Note note = Note.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Note actualResponse = client.updateNote(name, note, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateNoteRequest actualRequest = ((UpdateNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(note, actualRequest.getNote()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateNoteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + Note note = Note.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateNote(name, note, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateNoteTest2() throws Exception { + Note expectedResponse = + Note.newBuilder() + .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) + .setShortDescription("shortDescription1951089120") + .setLongDescription("longDescription1763753952") + .setKind(NoteKind.forNumber(0)) + .addAllRelatedUrl(new ArrayList()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRelatedNoteNames(new ArrayList()) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + Note note = Note.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Note actualResponse = client.updateNote(name, note, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateNoteRequest actualRequest = ((UpdateNoteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(note, actualRequest.getNote()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateNoteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + Note note = Note.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateNote(name, note, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNoteOccurrencesTest() throws Exception { + Occurrence responsesElement = Occurrence.newBuilder().build(); + ListNoteOccurrencesResponse expectedResponse = + ListNoteOccurrencesResponse.newBuilder() + .setNextPageToken("") + .addAllOccurrences(Arrays.asList(responsesElement)) + .build(); + mockGrafeas.addResponse(expectedResponse); + + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + String filter = "filter-1274492040"; + + ListNoteOccurrencesPagedResponse pagedListResponse = client.listNoteOccurrences(name, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNoteOccurrencesRequest actualRequest = ((ListNoteOccurrencesRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNoteOccurrencesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); + String filter = "filter-1274492040"; + client.listNoteOccurrences(name, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNoteOccurrencesTest2() throws Exception { + Occurrence responsesElement = Occurrence.newBuilder().build(); + ListNoteOccurrencesResponse expectedResponse = + ListNoteOccurrencesResponse.newBuilder() + .setNextPageToken("") + .addAllOccurrences(Arrays.asList(responsesElement)) + .build(); + mockGrafeas.addResponse(expectedResponse); + + String name = "name3373707"; + String filter = "filter-1274492040"; + + ListNoteOccurrencesPagedResponse pagedListResponse = client.listNoteOccurrences(name, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); + + List actualRequests = mockGrafeas.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNoteOccurrencesRequest actualRequest = ((ListNoteOccurrencesRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNoteOccurrencesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGrafeas.addException(exception); + + try { + String name = "name3373707"; + String filter = "filter-1274492040"; + client.listNoteOccurrences(name, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java new file mode 100644 index 000000000000..bf0f38182e4c --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockGrafeas implements MockGrpcService { + private final MockGrafeasImpl serviceImpl; + + public MockGrafeas() { + serviceImpl = new MockGrafeasImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java new file mode 100644 index 000000000000..66cfa3460def --- /dev/null +++ b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java @@ -0,0 +1,353 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.grafeas.v1; + +import com.google.api.core.BetaApi; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grafeas.v1.GrafeasGrpc.GrafeasImplBase; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockGrafeasImpl extends GrafeasImplBase { + private List requests; + private Queue responses; + + public MockGrafeasImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void getOccurrence( + GetOccurrenceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Occurrence) { + requests.add(request); + responseObserver.onNext(((Occurrence) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetOccurrence, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Occurrence.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listOccurrences( + ListOccurrencesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListOccurrencesResponse) { + requests.add(request); + responseObserver.onNext(((ListOccurrencesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListOccurrences, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListOccurrencesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteOccurrence( + DeleteOccurrenceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteOccurrence, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createOccurrence( + CreateOccurrenceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Occurrence) { + requests.add(request); + responseObserver.onNext(((Occurrence) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateOccurrence, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Occurrence.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchCreateOccurrences( + BatchCreateOccurrencesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchCreateOccurrencesResponse) { + requests.add(request); + responseObserver.onNext(((BatchCreateOccurrencesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchCreateOccurrences, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchCreateOccurrencesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateOccurrence( + UpdateOccurrenceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Occurrence) { + requests.add(request); + responseObserver.onNext(((Occurrence) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateOccurrence, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Occurrence.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getOccurrenceNote( + GetOccurrenceNoteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Note) { + requests.add(request); + responseObserver.onNext(((Note) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetOccurrenceNote, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Note.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getNote(GetNoteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Note) { + requests.add(request); + responseObserver.onNext(((Note) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetNote, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Note.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listNotes( + ListNotesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNotesResponse) { + requests.add(request); + responseObserver.onNext(((ListNotesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListNotes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNotesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteNote(DeleteNoteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteNote, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createNote(CreateNoteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Note) { + requests.add(request); + responseObserver.onNext(((Note) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateNote, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Note.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchCreateNotes( + BatchCreateNotesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchCreateNotesResponse) { + requests.add(request); + responseObserver.onNext(((BatchCreateNotesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchCreateNotes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchCreateNotesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateNote(UpdateNoteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Note) { + requests.add(request); + responseObserver.onNext(((Note) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateNote, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Note.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listNoteOccurrences( + ListNoteOccurrencesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNoteOccurrencesResponse) { + requests.add(request); + responseObserver.onNext(((ListNoteOccurrencesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListNoteOccurrences, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNoteOccurrencesResponse.class.getName(), + Exception.class.getName()))); + } + } +} From 3611053a6717d31a35cab671e7378a8c26b69200 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 11 Mar 2023 00:24:12 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../src/main/java/io/grafeas/v1/Common.java | 9 +- .../java/io/grafeas/v1/GrafeasOuterClass.java | 306 +- .../src/main/java/io/grafeas/v1/Note.java | 297 + .../src/main/java/io/grafeas/v1/NoteKind.java | 22 + .../java/io/grafeas/v1/NoteOrBuilder.java | 35 + .../src/main/java/io/grafeas/v1/Vex.java | 187 + .../java/io/grafeas/v1/Vulnerability.java | 124 +- .../v1/VulnerabilityAssessmentNote.java | 4522 +++++---- .../VulnerabilityAssessmentNoteOrBuilder.java | 79 +- .../grafeas/v1/VulnerabilityOccurrence.java | 3149 +++++++ .../v1/VulnerabilityOccurrenceOrBuilder.java | 15 + .../src/main/proto/grafeas/v1/common.proto | 2 + .../src/main/proto/grafeas/v1/grafeas.proto | 3 + .../src/main/proto/grafeas/v1/vex.proto | 0 .../main/proto/grafeas/v1/vulnerability.proto | 42 +- .../main/java/io/grafeas/v1/AliasContext.java | 866 -- .../io/grafeas/v1/AliasContextOrBuilder.java | 48 - .../main/java/io/grafeas/v1/Architecture.java | 150 - .../src/main/java/io/grafeas/v1/Artifact.java | 1047 --- .../java/io/grafeas/v1/ArtifactOrBuilder.java | 110 - .../main/java/io/grafeas/v1/Attestation.java | 91 - .../java/io/grafeas/v1/AttestationNote.java | 1279 --- .../grafeas/v1/AttestationNoteOrBuilder.java | 36 - .../io/grafeas/v1/AttestationOccurrence.java | 1658 ---- .../v1/AttestationOccurrenceOrBuilder.java | 163 - .../grafeas/v1/BatchCreateNotesRequest.java | 910 -- .../v1/BatchCreateNotesRequestOrBuilder.java | 85 - .../grafeas/v1/BatchCreateNotesResponse.java | 862 -- .../v1/BatchCreateNotesResponseOrBuilder.java | 53 - .../v1/BatchCreateOccurrencesRequest.java | 1033 --- ...atchCreateOccurrencesRequestOrBuilder.java | 75 - .../v1/BatchCreateOccurrencesResponse.java | 862 -- ...tchCreateOccurrencesResponseOrBuilder.java | 53 - .../v1/src/main/java/io/grafeas/v1/Build.java | 74 - .../main/java/io/grafeas/v1/BuildNote.java | 582 -- .../io/grafeas/v1/BuildNoteOrBuilder.java | 29 - .../java/io/grafeas/v1/BuildOccurrence.java | 1378 --- .../grafeas/v1/BuildOccurrenceOrBuilder.java | 140 - .../java/io/grafeas/v1/BuildProvenance.java | 3554 ------- .../grafeas/v1/BuildProvenanceOrBuilder.java | 388 - .../java/io/grafeas/v1/BuilderConfig.java | 544 -- .../io/grafeas/v1/BuilderConfigOrBuilder.java | 21 - .../v1/src/main/java/io/grafeas/v1/CVSS.java | 2394 ----- .../java/io/grafeas/v1/CVSSOrBuilder.java | 142 - .../main/java/io/grafeas/v1/CVSSProto.java | 128 - .../main/java/io/grafeas/v1/CVSSVersion.java | 126 - .../src/main/java/io/grafeas/v1/CVSSv3.java | 2170 ----- .../java/io/grafeas/v1/CVSSv3OrBuilder.java | 131 - .../io/grafeas/v1/CloudRepoSourceContext.java | 1186 --- .../v1/CloudRepoSourceContextOrBuilder.java | 94 - .../src/main/java/io/grafeas/v1/Command.java | 1632 ---- .../java/io/grafeas/v1/CommandOrBuilder.java | 198 - .../src/main/java/io/grafeas/v1/Common.java | 130 - .../main/java/io/grafeas/v1/Completeness.java | 679 -- .../io/grafeas/v1/CompletenessOrBuilder.java | 42 - .../main/java/io/grafeas/v1/Compliance.java | 111 - .../java/io/grafeas/v1/ComplianceNote.java | 2467 ----- .../grafeas/v1/ComplianceNoteOrBuilder.java | 160 - .../io/grafeas/v1/ComplianceOccurrence.java | 908 -- .../v1/ComplianceOccurrenceOrBuilder.java | 45 - .../java/io/grafeas/v1/ComplianceVersion.java | 931 -- .../v1/ComplianceVersionOrBuilder.java | 75 - .../java/io/grafeas/v1/CreateNoteRequest.java | 980 -- .../v1/CreateNoteRequestOrBuilder.java | 78 - .../grafeas/v1/CreateOccurrenceRequest.java | 816 -- .../v1/CreateOccurrenceRequestOrBuilder.java | 58 - .../io/grafeas/v1/DSSEAttestationNote.java | 1257 --- .../v1/DSSEAttestationNoteOrBuilder.java | 36 - .../grafeas/v1/DSSEAttestationOccurrence.java | 941 -- .../DSSEAttestationOccurrenceOrBuilder.java | 56 - .../java/io/grafeas/v1/DeleteNoteRequest.java | 587 -- .../v1/DeleteNoteRequestOrBuilder.java | 31 - .../grafeas/v1/DeleteOccurrenceRequest.java | 587 -- .../v1/DeleteOccurrenceRequestOrBuilder.java | 31 - .../main/java/io/grafeas/v1/Deployment.java | 72 - .../java/io/grafeas/v1/DeploymentNote.java | 653 -- .../grafeas/v1/DeploymentNoteOrBuilder.java | 50 - .../io/grafeas/v1/DeploymentOccurrence.java | 1900 ---- .../v1/DeploymentOccurrenceOrBuilder.java | 187 - .../src/main/java/io/grafeas/v1/Digest.java | 663 -- .../java/io/grafeas/v1/DigestOrBuilder.java | 39 - .../main/java/io/grafeas/v1/Discovery.java | 107 - .../java/io/grafeas/v1/DiscoveryNote.java | 549 -- .../io/grafeas/v1/DiscoveryNoteOrBuilder.java | 30 - .../io/grafeas/v1/DiscoveryOccurrence.java | 3178 ------- .../v1/DiscoveryOccurrenceOrBuilder.java | 218 - .../main/java/io/grafeas/v1/Distribution.java | 1439 --- .../io/grafeas/v1/DistributionOrBuilder.java | 139 - .../java/io/grafeas/v1/DsseAttestation.java | 83 - .../src/main/java/io/grafeas/v1/Envelope.java | 977 -- .../java/io/grafeas/v1/EnvelopeOrBuilder.java | 51 - .../java/io/grafeas/v1/EnvelopeSignature.java | 611 -- .../v1/EnvelopeSignatureOrBuilder.java | 27 - .../main/java/io/grafeas/v1/FileHashes.java | 864 -- .../io/grafeas/v1/FileHashesOrBuilder.java | 53 - .../main/java/io/grafeas/v1/FileLocation.java | 587 -- .../io/grafeas/v1/FileLocationOrBuilder.java | 31 - .../main/java/io/grafeas/v1/Fingerprint.java | 1009 -- .../io/grafeas/v1/FingerprintOrBuilder.java | 98 - .../io/grafeas/v1/GerritSourceContext.java | 1297 --- .../v1/GerritSourceContextOrBuilder.java | 111 - .../java/io/grafeas/v1/GetNoteRequest.java | 587 -- .../grafeas/v1/GetNoteRequestOrBuilder.java | 31 - .../grafeas/v1/GetOccurrenceNoteRequest.java | 587 -- .../v1/GetOccurrenceNoteRequestOrBuilder.java | 31 - .../io/grafeas/v1/GetOccurrenceRequest.java | 587 -- .../v1/GetOccurrenceRequestOrBuilder.java | 31 - .../java/io/grafeas/v1/GitSourceContext.java | 746 -- .../grafeas/v1/GitSourceContextOrBuilder.java | 49 - .../java/io/grafeas/v1/GrafeasClient.java | 2264 ----- .../main/java/io/grafeas/v1/GrafeasGrpc.java | 1491 --- .../java/io/grafeas/v1/GrafeasOuterClass.java | 492 - .../java/io/grafeas/v1/GrafeasSettings.java | 340 - .../v1/src/main/java/io/grafeas/v1/Hash.java | 663 -- .../java/io/grafeas/v1/HashOrBuilder.java | 39 - .../v1/src/main/java/io/grafeas/v1/Image.java | 90 - .../main/java/io/grafeas/v1/ImageNote.java | 824 -- .../io/grafeas/v1/ImageNoteOrBuilder.java | 58 - .../java/io/grafeas/v1/ImageOccurrence.java | 1398 --- .../grafeas/v1/ImageOccurrenceOrBuilder.java | 123 - .../java/io/grafeas/v1/InTotoProvenance.java | 1359 --- .../grafeas/v1/InTotoProvenanceOrBuilder.java | 140 - .../io/grafeas/v1/InTotoProvenanceProto.java | 115 - .../java/io/grafeas/v1/InTotoStatement.java | 1802 ---- .../grafeas/v1/InTotoStatementOrBuilder.java | 120 - .../io/grafeas/v1/InTotoStatementProto.java | 91 - .../v1/src/main/java/io/grafeas/v1/Jwt.java | 586 -- .../main/java/io/grafeas/v1/JwtOrBuilder.java | 33 - .../v1/src/main/java/io/grafeas/v1/Layer.java | 751 -- .../java/io/grafeas/v1/LayerOrBuilder.java | 51 - .../src/main/java/io/grafeas/v1/License.java | 772 -- .../java/io/grafeas/v1/LicenseOrBuilder.java | 57 - .../v1/ListNoteOccurrencesRequest.java | 997 -- .../ListNoteOccurrencesRequestOrBuilder.java | 81 - .../v1/ListNoteOccurrencesResponse.java | 1026 -- .../ListNoteOccurrencesResponseOrBuilder.java | 73 - .../java/io/grafeas/v1/ListNotesRequest.java | 1001 -- .../grafeas/v1/ListNotesRequestOrBuilder.java | 82 - .../java/io/grafeas/v1/ListNotesResponse.java | 1040 --- .../v1/ListNotesResponseOrBuilder.java | 77 - .../io/grafeas/v1/ListOccurrencesRequest.java | 1001 -- .../v1/ListOccurrencesRequestOrBuilder.java | 82 - .../grafeas/v1/ListOccurrencesResponse.java | 1040 --- .../v1/ListOccurrencesResponseOrBuilder.java | 77 - .../src/main/java/io/grafeas/v1/Location.java | 994 -- .../java/io/grafeas/v1/LocationOrBuilder.java | 81 - .../src/main/java/io/grafeas/v1/Metadata.java | 1380 --- .../java/io/grafeas/v1/MetadataOrBuilder.java | 128 - .../java/io/grafeas/v1/NonCompliantFile.java | 908 -- .../grafeas/v1/NonCompliantFileOrBuilder.java | 69 - .../v1/src/main/java/io/grafeas/v1/Note.java | 5324 ----------- .../src/main/java/io/grafeas/v1/NoteKind.java | 303 - .../src/main/java/io/grafeas/v1/NoteName.java | 191 - .../java/io/grafeas/v1/NoteOrBuilder.java | 563 -- .../main/java/io/grafeas/v1/Occurrence.java | 4569 --------- .../java/io/grafeas/v1/OccurrenceName.java | 192 - .../io/grafeas/v1/OccurrenceOrBuilder.java | 476 - .../src/main/java/io/grafeas/v1/Package.java | 132 - .../main/java/io/grafeas/v1/PackageNote.java | 2942 ------ .../io/grafeas/v1/PackageNoteOrBuilder.java | 308 - .../java/io/grafeas/v1/PackageOccurrence.java | 1985 ---- .../v1/PackageOccurrenceOrBuilder.java | 199 - .../main/java/io/grafeas/v1/ProjectName.java | 168 - .../java/io/grafeas/v1/ProjectRepoId.java | 746 -- .../io/grafeas/v1/ProjectRepoIdOrBuilder.java | 49 - .../main/java/io/grafeas/v1/Provenance.java | 266 - .../src/main/java/io/grafeas/v1/Recipe.java | 1954 ---- .../java/io/grafeas/v1/RecipeOrBuilder.java | 201 - .../main/java/io/grafeas/v1/RelatedUrl.java | 744 -- .../io/grafeas/v1/RelatedUrlOrBuilder.java | 49 - .../src/main/java/io/grafeas/v1/RepoId.java | 955 -- .../java/io/grafeas/v1/RepoIdOrBuilder.java | 67 - .../src/main/java/io/grafeas/v1/Severity.java | 201 - .../io/grafeas/v1/SeverityOuterClass.java | 40 - .../main/java/io/grafeas/v1/Signature.java | 812 -- .../io/grafeas/v1/SignatureOrBuilder.java | 70 - .../java/io/grafeas/v1/SlsaProvenance.java | 6801 -------------- .../grafeas/v1/SlsaProvenanceOrBuilder.java | 146 - .../io/grafeas/v1/SlsaProvenanceProto.java | 143 - .../io/grafeas/v1/SlsaProvenanceZeroTwo.java | 6962 -------------- .../v1/SlsaProvenanceZeroTwoOrBuilder.java | 105 - .../v1/SlsaProvenanceZeroTwoProto.java | 174 - .../src/main/java/io/grafeas/v1/Source.java | 1709 ---- .../java/io/grafeas/v1/SourceContext.java | 1583 ---- .../io/grafeas/v1/SourceContextOrBuilder.java | 146 - .../java/io/grafeas/v1/SourceOrBuilder.java | 196 - .../src/main/java/io/grafeas/v1/Subject.java | 900 -- .../java/io/grafeas/v1/SubjectOrBuilder.java | 90 - .../java/io/grafeas/v1/UpdateNoteRequest.java | 1045 --- .../v1/UpdateNoteRequestOrBuilder.java | 85 - .../grafeas/v1/UpdateOccurrenceRequest.java | 1045 --- .../v1/UpdateOccurrenceRequestOrBuilder.java | 85 - .../src/main/java/io/grafeas/v1/Upgrade.java | 130 - .../io/grafeas/v1/UpgradeDistribution.java | 1177 --- .../v1/UpgradeDistributionOrBuilder.java | 118 - .../main/java/io/grafeas/v1/UpgradeNote.java | 1502 --- .../io/grafeas/v1/UpgradeNoteOrBuilder.java | 130 - .../java/io/grafeas/v1/UpgradeOccurrence.java | 1311 --- .../v1/UpgradeOccurrenceOrBuilder.java | 119 - .../src/main/java/io/grafeas/v1/Version.java | 1398 --- .../java/io/grafeas/v1/VersionOrBuilder.java | 119 - .../v1/src/main/java/io/grafeas/v1/Vex.java | 149 - .../java/io/grafeas/v1/Vulnerability.java | 195 - .../java/io/grafeas/v1/VulnerabilityNote.java | 8231 ---------------- .../v1/VulnerabilityNoteOrBuilder.java | 248 - .../grafeas/v1/VulnerabilityOccurrence.java | 8260 ----------------- .../v1/VulnerabilityOccurrenceOrBuilder.java | 329 - .../java/io/grafeas/v1/WindowsUpdate.java | 3538 ------- .../io/grafeas/v1/WindowsUpdateOrBuilder.java | 212 - .../java/io/grafeas/v1/gapic_metadata.json | 60 - .../main/java/io/grafeas/v1/package-info.java | 54 - .../java/io/grafeas/v1/stub/GrafeasStub.java | 133 - .../grafeas/v1/stub/GrafeasStubSettings.java | 819 -- .../v1/stub/GrpcGrafeasCallableFactory.java | 113 - .../io/grafeas/v1/stub/GrpcGrafeasStub.java | 607 -- .../main/proto/grafeas/v1/attestation.proto | 90 - .../v1/src/main/proto/grafeas/v1/build.proto | 62 - .../v1/src/main/proto/grafeas/v1/common.proto | 152 - .../main/proto/grafeas/v1/compliance.proto | 82 - .../v1/src/main/proto/grafeas/v1/cvss.proto | 166 - .../main/proto/grafeas/v1/deployment.proto | 66 - .../src/main/proto/grafeas/v1/discovery.proto | 104 - .../proto/grafeas/v1/dsse_attestation.proto | 52 - .../src/main/proto/grafeas/v1/grafeas.proto | 547 -- .../v1/src/main/proto/grafeas/v1/image.proto | 83 - .../proto/grafeas/v1/intoto_provenance.proto | 113 - .../proto/grafeas/v1/intoto_statement.proto | 52 - .../src/main/proto/grafeas/v1/package.proto | 192 - .../main/proto/grafeas/v1/provenance.proto | 265 - .../src/main/proto/grafeas/v1/severity.proto | 38 - .../proto/grafeas/v1/slsa_provenance.proto | 115 - .../grafeas/v1/slsa_provenance_zero_two.proto | 82 - .../src/main/proto/grafeas/v1/upgrade.proto | 114 - .../main/proto/grafeas/v1/vulnerability.proto | 297 - .../java/io/grafeas/v1/GrafeasClientTest.java | 1350 --- .../test/java/io/grafeas/v1/MockGrafeas.java | 59 - .../java/io/grafeas/v1/MockGrafeasImpl.java | 353 - 237 files changed, 6950 insertions(+), 156715 deletions(-) create mode 100644 java-grafeas/src/main/java/io/grafeas/v1/Vex.java rename {owl-bot-staging/java-grafeas/v1 => java-grafeas}/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNote.java (72%) rename {owl-bot-staging/java-grafeas/v1 => java-grafeas}/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNoteOrBuilder.java (78%) rename {owl-bot-staging/java-grafeas/v1 => java-grafeas}/src/main/proto/grafeas/v1/vex.proto (100%) delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vex.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto delete mode 100644 owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java delete mode 100644 owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java diff --git a/java-grafeas/src/main/java/io/grafeas/v1/Common.java b/java-grafeas/src/main/java/io/grafeas/v1/Common.java index f7c01d6e2d84..1a42d02d24cf 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/Common.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/Common.java @@ -75,14 +75,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\002 \001(\t\"!\n\014FileLocation\022\021\n\tfile_path\030\001 \001(\t" + "\"/\n\007License\022\022\n\nexpression\030\001 \001(\t\022\020\n\010comme" + "nts\030\002 \001(\t\",\n\006Digest\022\014\n\004algo\030\001 \001(\t\022\024\n\014dig" - + "est_bytes\030\002 \001(\014*\276\001\n\010NoteKind\022\031\n\025NOTE_KIN" + + "est_bytes\030\002 \001(\014*\334\001\n\010NoteKind\022\031\n\025NOTE_KIN" + "D_UNSPECIFIED\020\000\022\021\n\rVULNERABILITY\020\001\022\t\n\005BU" + "ILD\020\002\022\t\n\005IMAGE\020\003\022\013\n\007PACKAGE\020\004\022\016\n\nDEPLOYM" + "ENT\020\005\022\r\n\tDISCOVERY\020\006\022\017\n\013ATTESTATION\020\007\022\013\n" + "\007UPGRADE\020\010\022\016\n\nCOMPLIANCE\020\t\022\024\n\020DSSE_ATTES" - + "TATION\020\nBQ\n\rio.grafeas.v1P\001Z8google.gola" - + "ng.org/genproto/googleapis/grafeas/v1;gr" - + "afeas\242\002\003GRAb\006proto3" + + "TATION\020\n\022\034\n\030VULNERABILITY_ASSESSMENT\020\013BQ" + + "\n\rio.grafeas.v1P\001Z8google.golang.org/gen" + + "proto/googleapis/grafeas/v1;grafeas\242\002\003GR" + + "Ab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-grafeas/src/main/java/io/grafeas/v1/GrafeasOuterClass.java b/java-grafeas/src/main/java/io/grafeas/v1/GrafeasOuterClass.java index 6be00a97e2c3..fd399c121f80 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/GrafeasOuterClass.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/GrafeasOuterClass.java @@ -138,157 +138,160 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "iscovery.proto\032!grafeas/v1/dsse_attestat" + "ion.proto\032\026grafeas/v1/image.proto\032\030grafe" + "as/v1/package.proto\032\030grafeas/v1/upgrade." - + "proto\032\036grafeas/v1/vulnerability.proto\"\373\006" - + "\n\nOccurrence\022\014\n\004name\030\001 \001(\t\022\024\n\014resource_u" - + "ri\030\002 \001(\t\022\021\n\tnote_name\030\003 \001(\t\022\"\n\004kind\030\004 \001(" - + "\0162\024.grafeas.v1.NoteKind\022\023\n\013remediation\030\005" - + " \001(\t\022/\n\013create_time\030\006 \001(\0132\032.google.proto" - + "buf.Timestamp\022/\n\013update_time\030\007 \001(\0132\032.goo" - + "gle.protobuf.Timestamp\022<\n\rvulnerability\030" - + "\010 \001(\0132#.grafeas.v1.VulnerabilityOccurren" - + "ceH\000\022,\n\005build\030\t \001(\0132\033.grafeas.v1.BuildOc" - + "currenceH\000\022,\n\005image\030\n \001(\0132\033.grafeas.v1.I" - + "mageOccurrenceH\000\0220\n\007package\030\013 \001(\0132\035.graf" - + "eas.v1.PackageOccurrenceH\000\0226\n\ndeployment" - + "\030\014 \001(\0132 .grafeas.v1.DeploymentOccurrence" - + "H\000\0224\n\tdiscovery\030\r \001(\0132\037.grafeas.v1.Disco" - + "veryOccurrenceH\000\0228\n\013attestation\030\016 \001(\0132!." - + "grafeas.v1.AttestationOccurrenceH\000\0220\n\007up" - + "grade\030\017 \001(\0132\035.grafeas.v1.UpgradeOccurren" - + "ceH\000\0226\n\ncompliance\030\020 \001(\0132 .grafeas.v1.Co" - + "mplianceOccurrenceH\000\022A\n\020dsse_attestation" - + "\030\021 \001(\0132%.grafeas.v1.DSSEAttestationOccur" - + "renceH\000\022&\n\010envelope\030\022 \001(\0132\024.grafeas.v1.E" - + "nvelope:G\352AD\n\025grafeas.io/Occurrence\022+pro" - + "jects/{project}/occurrences/{occurrence}" - + "B\t\n\007details\"\361\006\n\004Note\022\014\n\004name\030\001 \001(\t\022\031\n\021sh" - + "ort_description\030\002 \001(\t\022\030\n\020long_descriptio" - + "n\030\003 \001(\t\022\"\n\004kind\030\004 \001(\0162\024.grafeas.v1.NoteK" - + "ind\022+\n\013related_url\030\005 \003(\0132\026.grafeas.v1.Re" - + "latedUrl\0223\n\017expiration_time\030\006 \001(\0132\032.goog" - + "le.protobuf.Timestamp\022/\n\013create_time\030\007 \001" - + "(\0132\032.google.protobuf.Timestamp\022/\n\013update" - + "_time\030\010 \001(\0132\032.google.protobuf.Timestamp\022" - + "\032\n\022related_note_names\030\t \003(\t\0226\n\rvulnerabi" - + "lity\030\n \001(\0132\035.grafeas.v1.VulnerabilityNot" - + "eH\000\022&\n\005build\030\013 \001(\0132\025.grafeas.v1.BuildNot" - + "eH\000\022&\n\005image\030\014 \001(\0132\025.grafeas.v1.ImageNot" - + "eH\000\022*\n\007package\030\r \001(\0132\027.grafeas.v1.Packag" - + "eNoteH\000\0220\n\ndeployment\030\016 \001(\0132\032.grafeas.v1" - + ".DeploymentNoteH\000\022.\n\tdiscovery\030\017 \001(\0132\031.g" - + "rafeas.v1.DiscoveryNoteH\000\0222\n\013attestation" - + "\030\020 \001(\0132\033.grafeas.v1.AttestationNoteH\000\022*\n" - + "\007upgrade\030\021 \001(\0132\027.grafeas.v1.UpgradeNoteH" - + "\000\0220\n\ncompliance\030\022 \001(\0132\032.grafeas.v1.Compl" - + "ianceNoteH\000\022;\n\020dsse_attestation\030\023 \001(\0132\037." - + "grafeas.v1.DSSEAttestationNoteH\000:5\352A2\n\017g" - + "rafeas.io/Note\022\037projects/{project}/notes" - + "/{note}B\006\n\004type\"C\n\024GetOccurrenceRequest\022" - + "+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io/Occurr" - + "ence\"{\n\026ListOccurrencesRequest\022*\n\006parent" - + "\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Project\022\016\n\006fi" - + "lter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_to" - + "ken\030\004 \001(\t\"_\n\027ListOccurrencesResponse\022+\n\013" - + "occurrences\030\001 \003(\0132\026.grafeas.v1.Occurrenc" - + "e\022\027\n\017next_page_token\030\002 \001(\t\"F\n\027DeleteOccu" - + "rrenceRequest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025gra" - + "feas.io/Occurrence\"v\n\027CreateOccurrenceRe" - + "quest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.i" - + "o/Project\022/\n\noccurrence\030\002 \001(\0132\026.grafeas." - + "v1.OccurrenceB\003\340A\002\"\250\001\n\027UpdateOccurrenceR" - + "equest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io" - + "/Occurrence\022/\n\noccurrence\030\002 \001(\0132\026.grafea" - + "s.v1.OccurrenceB\003\340A\002\022/\n\013update_mask\030\003 \001(" - + "\0132\032.google.protobuf.FieldMask\"7\n\016GetNote" - + "Request\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.i" - + "o/Note\"G\n\030GetOccurrenceNoteRequest\022+\n\004na" - + "me\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io/Occurrence\"" - + "u\n\020ListNotesRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002" - + "\372A\024\n\022grafeas.io/Project\022\016\n\006filter\030\002 \001(\t\022" - + "\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"M" - + "\n\021ListNotesResponse\022\037\n\005notes\030\001 \003(\0132\020.gra" - + "feas.v1.Note\022\027\n\017next_page_token\030\002 \001(\t\":\n" - + "\021DeleteNoteRequest\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021" - + "\n\017grafeas.io/Note\"z\n\021CreateNoteRequest\022*" - + "\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Proje" - + "ct\022\024\n\007note_id\030\002 \001(\tB\003\340A\002\022#\n\004note\030\003 \001(\0132\020" - + ".grafeas.v1.NoteB\003\340A\002\"\220\001\n\021UpdateNoteRequ" - + "est\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.io/No" - + "te\022#\n\004note\030\002 \001(\0132\020.grafeas.v1.NoteB\003\340A\002\022" + + "proto\032\024grafeas/v1/vex.proto\032\036grafeas/v1/" + + "vulnerability.proto\"\373\006\n\nOccurrence\022\014\n\004na" + + "me\030\001 \001(\t\022\024\n\014resource_uri\030\002 \001(\t\022\021\n\tnote_n" + + "ame\030\003 \001(\t\022\"\n\004kind\030\004 \001(\0162\024.grafeas.v1.Not" + + "eKind\022\023\n\013remediation\030\005 \001(\t\022/\n\013create_tim" + + "e\030\006 \001(\0132\032.google.protobuf.Timestamp\022/\n\013u" + + "pdate_time\030\007 \001(\0132\032.google.protobuf.Times" + + "tamp\022<\n\rvulnerability\030\010 \001(\0132#.grafeas.v1" + + ".VulnerabilityOccurrenceH\000\022,\n\005build\030\t \001(" + + "\0132\033.grafeas.v1.BuildOccurrenceH\000\022,\n\005imag" + + "e\030\n \001(\0132\033.grafeas.v1.ImageOccurrenceH\000\0220" + + "\n\007package\030\013 \001(\0132\035.grafeas.v1.PackageOccu" + + "rrenceH\000\0226\n\ndeployment\030\014 \001(\0132 .grafeas.v" + + "1.DeploymentOccurrenceH\000\0224\n\tdiscovery\030\r " + + "\001(\0132\037.grafeas.v1.DiscoveryOccurrenceH\000\0228" + + "\n\013attestation\030\016 \001(\0132!.grafeas.v1.Attesta" + + "tionOccurrenceH\000\0220\n\007upgrade\030\017 \001(\0132\035.graf" + + "eas.v1.UpgradeOccurrenceH\000\0226\n\ncompliance" + + "\030\020 \001(\0132 .grafeas.v1.ComplianceOccurrence" + + "H\000\022A\n\020dsse_attestation\030\021 \001(\0132%.grafeas.v" + + "1.DSSEAttestationOccurrenceH\000\022&\n\010envelop" + + "e\030\022 \001(\0132\024.grafeas.v1.Envelope:G\352AD\n\025graf" + + "eas.io/Occurrence\022+projects/{project}/oc" + + "currences/{occurrence}B\t\n\007details\"\276\007\n\004No" + + "te\022\014\n\004name\030\001 \001(\t\022\031\n\021short_description\030\002 " + + "\001(\t\022\030\n\020long_description\030\003 \001(\t\022\"\n\004kind\030\004 " + + "\001(\0162\024.grafeas.v1.NoteKind\022+\n\013related_url" + + "\030\005 \003(\0132\026.grafeas.v1.RelatedUrl\0223\n\017expira" + + "tion_time\030\006 \001(\0132\032.google.protobuf.Timest" + + "amp\022/\n\013create_time\030\007 \001(\0132\032.google.protob" + + "uf.Timestamp\022/\n\013update_time\030\010 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022\032\n\022related_note_na" + + "mes\030\t \003(\t\0226\n\rvulnerability\030\n \001(\0132\035.grafe" + + "as.v1.VulnerabilityNoteH\000\022&\n\005build\030\013 \001(\013" + + "2\025.grafeas.v1.BuildNoteH\000\022&\n\005image\030\014 \001(\013" + + "2\025.grafeas.v1.ImageNoteH\000\022*\n\007package\030\r \001" + + "(\0132\027.grafeas.v1.PackageNoteH\000\0220\n\ndeploym" + + "ent\030\016 \001(\0132\032.grafeas.v1.DeploymentNoteH\000\022" + + ".\n\tdiscovery\030\017 \001(\0132\031.grafeas.v1.Discover" + + "yNoteH\000\0222\n\013attestation\030\020 \001(\0132\033.grafeas.v" + + "1.AttestationNoteH\000\022*\n\007upgrade\030\021 \001(\0132\027.g" + + "rafeas.v1.UpgradeNoteH\000\0220\n\ncompliance\030\022 " + + "\001(\0132\032.grafeas.v1.ComplianceNoteH\000\022;\n\020dss" + + "e_attestation\030\023 \001(\0132\037.grafeas.v1.DSSEAtt" + + "estationNoteH\000\022K\n\030vulnerability_assessme" + + "nt\030\024 \001(\0132\'.grafeas.v1.VulnerabilityAsses" + + "smentNoteH\000:5\352A2\n\017grafeas.io/Note\022\037proje" + + "cts/{project}/notes/{note}B\006\n\004type\"C\n\024Ge" + + "tOccurrenceRequest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027" + + "\n\025grafeas.io/Occurrence\"{\n\026ListOccurrenc" + + "esRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafe" + + "as.io/Project\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_si" + + "ze\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"_\n\027ListOccu" + + "rrencesResponse\022+\n\013occurrences\030\001 \003(\0132\026.g" + + "rafeas.v1.Occurrence\022\027\n\017next_page_token\030" + + "\002 \001(\t\"F\n\027DeleteOccurrenceRequest\022+\n\004name" + + "\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io/Occurrence\"v\n" + + "\027CreateOccurrenceRequest\022*\n\006parent\030\001 \001(\t" + + "B\032\340A\002\372A\024\n\022grafeas.io/Project\022/\n\noccurren" + + "ce\030\002 \001(\0132\026.grafeas.v1.OccurrenceB\003\340A\002\"\250\001" + + "\n\027UpdateOccurrenceRequest\022+\n\004name\030\001 \001(\tB" + + "\035\340A\002\372A\027\n\025grafeas.io/Occurrence\022/\n\noccurr" + + "ence\030\002 \001(\0132\026.grafeas.v1.OccurrenceB\003\340A\002\022" + "/\n\013update_mask\030\003 \001(\0132\032.google.protobuf.F" - + "ieldMask\"z\n\032ListNoteOccurrencesRequest\022%" - + "\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.io/Note\022\016\n" - + "\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage" - + "_token\030\004 \001(\t\"c\n\033ListNoteOccurrencesRespo" - + "nse\022+\n\013occurrences\030\001 \003(\0132\026.grafeas.v1.Oc" - + "currence\022\027\n\017next_page_token\030\002 \001(\t\"\311\001\n\027Ba" - + "tchCreateNotesRequest\022*\n\006parent\030\001 \001(\tB\032\340" - + "A\002\372A\024\n\022grafeas.io/Project\022B\n\005notes\030\002 \003(\013" - + "2..grafeas.v1.BatchCreateNotesRequest.No" - + "tesEntryB\003\340A\002\032>\n\nNotesEntry\022\013\n\003key\030\001 \001(\t" - + "\022\037\n\005value\030\002 \001(\0132\020.grafeas.v1.Note:\0028\001\";\n" - + "\030BatchCreateNotesResponse\022\037\n\005notes\030\001 \003(\013" - + "2\020.grafeas.v1.Note\"}\n\035BatchCreateOccurre" - + "ncesRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022gra" - + "feas.io/Project\0220\n\013occurrences\030\002 \003(\0132\026.g" - + "rafeas.v1.OccurrenceB\003\340A\002\"M\n\036BatchCreate" - + "OccurrencesResponse\022+\n\013occurrences\030\001 \003(\013" - + "2\026.grafeas.v1.Occurrence2\222\020\n\007Grafeas\022}\n\r" - + "GetOccurrence\022 .grafeas.v1.GetOccurrence" - + "Request\032\026.grafeas.v1.Occurrence\"2\202\323\344\223\002%\022" - + "#/v1/{name=projects/*/occurrences/*}\332A\004n" - + "ame\022\227\001\n\017ListOccurrences\022\".grafeas.v1.Lis" - + "tOccurrencesRequest\032#.grafeas.v1.ListOcc" - + "urrencesResponse\";\202\323\344\223\002%\022#/v1/{parent=pr" - + "ojects/*}/occurrences\332A\rparent,filter\022\203\001" - + "\n\020DeleteOccurrence\022#.grafeas.v1.DeleteOc" - + "currenceRequest\032\026.google.protobuf.Empty\"" - + "2\202\323\344\223\002%*#/v1/{name=projects/*/occurrence" - + "s/*}\332A\004name\022\234\001\n\020CreateOccurrence\022#.grafe" - + "as.v1.CreateOccurrenceRequest\032\026.grafeas." - + "v1.Occurrence\"K\202\323\344\223\0021\"#/v1/{parent=proje" - + "cts/*}/occurrences:\noccurrence\332A\021parent," - + "occurrence\022\300\001\n\026BatchCreateOccurrences\022)." - + "grafeas.v1.BatchCreateOccurrencesRequest" - + "\032*.grafeas.v1.BatchCreateOccurrencesResp" - + "onse\"O\202\323\344\223\0024\"//v1/{parent=projects/*}/oc" - + "currences:batchCreate:\001*\332A\022parent,occurr" - + "ences\022\246\001\n\020UpdateOccurrence\022#.grafeas.v1." - + "UpdateOccurrenceRequest\032\026.grafeas.v1.Occ" - + "urrence\"U\202\323\344\223\00212#/v1/{name=projects/*/oc" - + "currences/*}:\noccurrence\332A\033name,occurren" - + "ce,update_mask\022\205\001\n\021GetOccurrenceNote\022$.g" - + "rafeas.v1.GetOccurrenceNoteRequest\032\020.gra" - + "feas.v1.Note\"8\202\323\344\223\002+\022)/v1/{name=projects" - + "/*/occurrences/*}/notes\332A\004name\022e\n\007GetNot" - + "e\022\032.grafeas.v1.GetNoteRequest\032\020.grafeas." - + "v1.Note\",\202\323\344\223\002\037\022\035/v1/{name=projects/*/no" - + "tes/*}\332A\004name\022\177\n\tListNotes\022\034.grafeas.v1." - + "ListNotesRequest\032\035.grafeas.v1.ListNotesR" - + "esponse\"5\202\323\344\223\002\037\022\035/v1/{parent=projects/*}" - + "/notes\332A\rparent,filter\022q\n\nDeleteNote\022\035.g" - + "rafeas.v1.DeleteNoteRequest\032\026.google.pro" - + "tobuf.Empty\",\202\323\344\223\002\037*\035/v1/{name=projects/" - + "*/notes/*}\332A\004name\022\200\001\n\nCreateNote\022\035.grafe" - + "as.v1.CreateNoteRequest\032\020.grafeas.v1.Not" - + "e\"A\202\323\344\223\002%\"\035/v1/{parent=projects/*}/notes" - + ":\004note\332A\023parent,note_id,note\022\242\001\n\020BatchCr" - + "eateNotes\022#.grafeas.v1.BatchCreateNotesR" - + "equest\032$.grafeas.v1.BatchCreateNotesResp" - + "onse\"C\202\323\344\223\002.\")/v1/{parent=projects/*}/no" - + "tes:batchCreate:\001*\332A\014parent,notes\022\202\001\n\nUp" - + "dateNote\022\035.grafeas.v1.UpdateNoteRequest\032" - + "\020.grafeas.v1.Note\"C\202\323\344\223\002%2\035/v1/{name=pro" - + "jects/*/notes/*}:\004note\332A\025name,note,updat" - + "e_mask\022\247\001\n\023ListNoteOccurrences\022&.grafeas" - + ".v1.ListNoteOccurrencesRequest\032\'.grafeas" - + ".v1.ListNoteOccurrencesResponse\"?\202\323\344\223\002+\022" - + ")/v1/{name=projects/*/notes/*}/occurrenc" - + "es\332A\013name,filter\032#\312A containeranalysis.g" - + "oogleapis.comB|\n\rio.grafeas.v1P\001Z8google" - + ".golang.org/genproto/googleapis/grafeas/" - + "v1;grafeas\242\002\003GRA\352A(\n\022grafeas.io/Project\022" - + "\022projects/{project}b\006proto3" + + "ieldMask\"7\n\016GetNoteRequest\022%\n\004name\030\001 \001(\t" + + "B\027\340A\002\372A\021\n\017grafeas.io/Note\"G\n\030GetOccurren" + + "ceNoteRequest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025gra" + + "feas.io/Occurrence\"u\n\020ListNotesRequest\022*" + + "\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Proje" + + "ct\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n" + + "\npage_token\030\004 \001(\t\"M\n\021ListNotesResponse\022\037" + + "\n\005notes\030\001 \003(\0132\020.grafeas.v1.Note\022\027\n\017next_" + + "page_token\030\002 \001(\t\":\n\021DeleteNoteRequest\022%\n" + + "\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.io/Note\"z\n\021" + + "CreateNoteRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A" + + "\024\n\022grafeas.io/Project\022\024\n\007note_id\030\002 \001(\tB\003" + + "\340A\002\022#\n\004note\030\003 \001(\0132\020.grafeas.v1.NoteB\003\340A\002" + + "\"\220\001\n\021UpdateNoteRequest\022%\n\004name\030\001 \001(\tB\027\340A" + + "\002\372A\021\n\017grafeas.io/Note\022#\n\004note\030\002 \001(\0132\020.gr" + + "afeas.v1.NoteB\003\340A\002\022/\n\013update_mask\030\003 \001(\0132" + + "\032.google.protobuf.FieldMask\"z\n\032ListNoteO" + + "ccurrencesRequest\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n" + + "\017grafeas.io/Note\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage" + + "_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"c\n\033ListN" + + "oteOccurrencesResponse\022+\n\013occurrences\030\001 " + + "\003(\0132\026.grafeas.v1.Occurrence\022\027\n\017next_page" + + "_token\030\002 \001(\t\"\311\001\n\027BatchCreateNotesRequest" + + "\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Pro" + + "ject\022B\n\005notes\030\002 \003(\0132..grafeas.v1.BatchCr" + + "eateNotesRequest.NotesEntryB\003\340A\002\032>\n\nNote" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\037\n\005value\030\002 \001(\0132\020.gra" + + "feas.v1.Note:\0028\001\";\n\030BatchCreateNotesResp" + + "onse\022\037\n\005notes\030\001 \003(\0132\020.grafeas.v1.Note\"}\n" + + "\035BatchCreateOccurrencesRequest\022*\n\006parent" + + "\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Project\0220\n\013oc" + + "currences\030\002 \003(\0132\026.grafeas.v1.OccurrenceB" + + "\003\340A\002\"M\n\036BatchCreateOccurrencesResponse\022+" + + "\n\013occurrences\030\001 \003(\0132\026.grafeas.v1.Occurre" + + "nce2\222\020\n\007Grafeas\022}\n\rGetOccurrence\022 .grafe" + + "as.v1.GetOccurrenceRequest\032\026.grafeas.v1." + + "Occurrence\"2\202\323\344\223\002%\022#/v1/{name=projects/*" + + "/occurrences/*}\332A\004name\022\227\001\n\017ListOccurrenc" + + "es\022\".grafeas.v1.ListOccurrencesRequest\032#" + + ".grafeas.v1.ListOccurrencesResponse\";\202\323\344" + + "\223\002%\022#/v1/{parent=projects/*}/occurrences" + + "\332A\rparent,filter\022\203\001\n\020DeleteOccurrence\022#." + + "grafeas.v1.DeleteOccurrenceRequest\032\026.goo" + + "gle.protobuf.Empty\"2\202\323\344\223\002%*#/v1/{name=pr" + + "ojects/*/occurrences/*}\332A\004name\022\234\001\n\020Creat" + + "eOccurrence\022#.grafeas.v1.CreateOccurrenc" + + "eRequest\032\026.grafeas.v1.Occurrence\"K\202\323\344\223\0021" + + "\"#/v1/{parent=projects/*}/occurrences:\no" + + "ccurrence\332A\021parent,occurrence\022\300\001\n\026BatchC" + + "reateOccurrences\022).grafeas.v1.BatchCreat" + + "eOccurrencesRequest\032*.grafeas.v1.BatchCr" + + "eateOccurrencesResponse\"O\202\323\344\223\0024\"//v1/{pa" + + "rent=projects/*}/occurrences:batchCreate" + + ":\001*\332A\022parent,occurrences\022\246\001\n\020UpdateOccur" + + "rence\022#.grafeas.v1.UpdateOccurrenceReque" + + "st\032\026.grafeas.v1.Occurrence\"U\202\323\344\223\00212#/v1/" + + "{name=projects/*/occurrences/*}:\noccurre" + + "nce\332A\033name,occurrence,update_mask\022\205\001\n\021Ge" + + "tOccurrenceNote\022$.grafeas.v1.GetOccurren" + + "ceNoteRequest\032\020.grafeas.v1.Note\"8\202\323\344\223\002+\022" + + ")/v1/{name=projects/*/occurrences/*}/not" + + "es\332A\004name\022e\n\007GetNote\022\032.grafeas.v1.GetNot" + + "eRequest\032\020.grafeas.v1.Note\",\202\323\344\223\002\037\022\035/v1/" + + "{name=projects/*/notes/*}\332A\004name\022\177\n\tList" + + "Notes\022\034.grafeas.v1.ListNotesRequest\032\035.gr" + + "afeas.v1.ListNotesResponse\"5\202\323\344\223\002\037\022\035/v1/" + + "{parent=projects/*}/notes\332A\rparent,filte" + + "r\022q\n\nDeleteNote\022\035.grafeas.v1.DeleteNoteR" + + "equest\032\026.google.protobuf.Empty\",\202\323\344\223\002\037*\035" + + "/v1/{name=projects/*/notes/*}\332A\004name\022\200\001\n" + + "\nCreateNote\022\035.grafeas.v1.CreateNoteReque" + + "st\032\020.grafeas.v1.Note\"A\202\323\344\223\002%\"\035/v1/{paren" + + "t=projects/*}/notes:\004note\332A\023parent,note_" + + "id,note\022\242\001\n\020BatchCreateNotes\022#.grafeas.v" + + "1.BatchCreateNotesRequest\032$.grafeas.v1.B" + + "atchCreateNotesResponse\"C\202\323\344\223\002.\")/v1/{pa" + + "rent=projects/*}/notes:batchCreate:\001*\332A\014" + + "parent,notes\022\202\001\n\nUpdateNote\022\035.grafeas.v1" + + ".UpdateNoteRequest\032\020.grafeas.v1.Note\"C\202\323" + + "\344\223\002%2\035/v1/{name=projects/*/notes/*}:\004not" + + "e\332A\025name,note,update_mask\022\247\001\n\023ListNoteOc" + + "currences\022&.grafeas.v1.ListNoteOccurrenc" + + "esRequest\032\'.grafeas.v1.ListNoteOccurrenc" + + "esResponse\"?\202\323\344\223\002+\022)/v1/{name=projects/*" + + "/notes/*}/occurrences\332A\013name,filter\032#\312A " + + "containeranalysis.googleapis.comB|\n\rio.g" + + "rafeas.v1P\001Z8google.golang.org/genproto/" + + "googleapis/grafeas/v1;grafeas\242\002\003GRA\352A(\n\022" + + "grafeas.io/Project\022\022projects/{project}b\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -311,6 +314,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { io.grafeas.v1.Image.getDescriptor(), io.grafeas.v1.Package.getDescriptor(), io.grafeas.v1.Upgrade.getDescriptor(), + io.grafeas.v1.Vex.getDescriptor(), io.grafeas.v1.Vulnerability.getDescriptor(), }); internal_static_grafeas_v1_Occurrence_descriptor = getDescriptor().getMessageTypes().get(0); @@ -362,6 +366,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Upgrade", "Compliance", "DsseAttestation", + "VulnerabilityAssessment", "Type", }); internal_static_grafeas_v1_GetOccurrenceRequest_descriptor = @@ -551,6 +556,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { io.grafeas.v1.Image.getDescriptor(); io.grafeas.v1.Package.getDescriptor(); io.grafeas.v1.Upgrade.getDescriptor(); + io.grafeas.v1.Vex.getDescriptor(); io.grafeas.v1.Vulnerability.getDescriptor(); } diff --git a/java-grafeas/src/main/java/io/grafeas/v1/Note.java b/java-grafeas/src/main/java/io/grafeas/v1/Note.java index 3eaf0e457bf8..9f8e76eb5192 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/Note.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/Note.java @@ -87,6 +87,7 @@ public enum TypeCase UPGRADE(17), COMPLIANCE(18), DSSE_ATTESTATION(19), + VULNERABILITY_ASSESSMENT(20), TYPE_NOT_SET(0); private final int value; @@ -125,6 +126,8 @@ public static TypeCase forNumber(int value) { return COMPLIANCE; case 19: return DSSE_ATTESTATION; + case 20: + return VULNERABILITY_ASSESSMENT; case 0: return TYPE_NOT_SET; default: @@ -1123,6 +1126,57 @@ public io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder() return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); } + public static final int VULNERABILITY_ASSESSMENT_FIELD_NUMBER = 20; + /** + * + * + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * + * @return Whether the vulnerabilityAssessment field is set. + */ + @java.lang.Override + public boolean hasVulnerabilityAssessment() { + return typeCase_ == 20; + } + /** + * + * + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * + * @return The vulnerabilityAssessment. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote getVulnerabilityAssessment() { + if (typeCase_ == 20) { + return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; + } + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + /** + * + * + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder getVulnerabilityAssessmentOrBuilder() { + if (typeCase_ == 20) { + return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; + } + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1194,6 +1248,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (typeCase_ == 19) { output.writeMessage(19, (io.grafeas.v1.DSSEAttestationNote) type_); } + if (typeCase_ == 20) { + output.writeMessage(20, (io.grafeas.v1.VulnerabilityAssessmentNote) type_); + } getUnknownFields().writeTo(output); } @@ -1285,6 +1342,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 19, (io.grafeas.v1.DSSEAttestationNote) type_); } + if (typeCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, (io.grafeas.v1.VulnerabilityAssessmentNote) type_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1350,6 +1412,9 @@ public boolean equals(final java.lang.Object obj) { case 19: if (!getDsseAttestation().equals(other.getDsseAttestation())) return false; break; + case 20: + if (!getVulnerabilityAssessment().equals(other.getVulnerabilityAssessment())) return false; + break; case 0: default: } @@ -1433,6 +1498,10 @@ public int hashCode() { hash = (37 * hash) + DSSE_ATTESTATION_FIELD_NUMBER; hash = (53 * hash) + getDsseAttestation().hashCode(); break; + case 20: + hash = (37 * hash) + VULNERABILITY_ASSESSMENT_FIELD_NUMBER; + hash = (53 * hash) + getVulnerabilityAssessment().hashCode(); + break; case 0: default: } @@ -1628,6 +1697,9 @@ public Builder clear() { if (dsseAttestationBuilder_ != null) { dsseAttestationBuilder_.clear(); } + if (vulnerabilityAssessmentBuilder_ != null) { + vulnerabilityAssessmentBuilder_.clear(); + } typeCase_ = 0; type_ = null; return this; @@ -1740,6 +1812,9 @@ private void buildPartialOneofs(io.grafeas.v1.Note result) { if (typeCase_ == 19 && dsseAttestationBuilder_ != null) { result.type_ = dsseAttestationBuilder_.build(); } + if (typeCase_ == 20 && vulnerabilityAssessmentBuilder_ != null) { + result.type_ = vulnerabilityAssessmentBuilder_.build(); + } } @java.lang.Override @@ -1902,6 +1977,11 @@ public Builder mergeFrom(io.grafeas.v1.Note other) { mergeDsseAttestation(other.getDsseAttestation()); break; } + case VULNERABILITY_ASSESSMENT: + { + mergeVulnerabilityAssessment(other.getVulnerabilityAssessment()); + break; + } case TYPE_NOT_SET: { break; @@ -2054,6 +2134,13 @@ public Builder mergeFrom( typeCase_ = 19; break; } // case 154 + case 162: + { + input.readMessage( + getVulnerabilityAssessmentFieldBuilder().getBuilder(), extensionRegistry); + typeCase_ = 20; + break; + } // case 162 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5624,6 +5711,216 @@ public io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder() return dsseAttestationBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote, + io.grafeas.v1.VulnerabilityAssessmentNote.Builder, + io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder> + vulnerabilityAssessmentBuilder_; + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * + * @return Whether the vulnerabilityAssessment field is set. + */ + @java.lang.Override + public boolean hasVulnerabilityAssessment() { + return typeCase_ == 20; + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * + * @return The vulnerabilityAssessment. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote getVulnerabilityAssessment() { + if (vulnerabilityAssessmentBuilder_ == null) { + if (typeCase_ == 20) { + return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; + } + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } else { + if (typeCase_ == 20) { + return vulnerabilityAssessmentBuilder_.getMessage(); + } + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + public Builder setVulnerabilityAssessment(io.grafeas.v1.VulnerabilityAssessmentNote value) { + if (vulnerabilityAssessmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + vulnerabilityAssessmentBuilder_.setMessage(value); + } + typeCase_ = 20; + return this; + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + public Builder setVulnerabilityAssessment( + io.grafeas.v1.VulnerabilityAssessmentNote.Builder builderForValue) { + if (vulnerabilityAssessmentBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + vulnerabilityAssessmentBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 20; + return this; + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + public Builder mergeVulnerabilityAssessment(io.grafeas.v1.VulnerabilityAssessmentNote value) { + if (vulnerabilityAssessmentBuilder_ == null) { + if (typeCase_ == 20 + && type_ != io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance()) { + type_ = + io.grafeas.v1.VulnerabilityAssessmentNote.newBuilder( + (io.grafeas.v1.VulnerabilityAssessmentNote) type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 20) { + vulnerabilityAssessmentBuilder_.mergeFrom(value); + } else { + vulnerabilityAssessmentBuilder_.setMessage(value); + } + } + typeCase_ = 20; + return this; + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + public Builder clearVulnerabilityAssessment() { + if (vulnerabilityAssessmentBuilder_ == null) { + if (typeCase_ == 20) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 20) { + typeCase_ = 0; + type_ = null; + } + vulnerabilityAssessmentBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Builder getVulnerabilityAssessmentBuilder() { + return getVulnerabilityAssessmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder + getVulnerabilityAssessmentOrBuilder() { + if ((typeCase_ == 20) && (vulnerabilityAssessmentBuilder_ != null)) { + return vulnerabilityAssessmentBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 20) { + return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; + } + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote, + io.grafeas.v1.VulnerabilityAssessmentNote.Builder, + io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder> + getVulnerabilityAssessmentFieldBuilder() { + if (vulnerabilityAssessmentBuilder_ == null) { + if (!(typeCase_ == 20)) { + type_ = io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + vulnerabilityAssessmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote, + io.grafeas.v1.VulnerabilityAssessmentNote.Builder, + io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder>( + (io.grafeas.v1.VulnerabilityAssessmentNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 20; + onChanged(); + return vulnerabilityAssessmentBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-grafeas/src/main/java/io/grafeas/v1/NoteKind.java b/java-grafeas/src/main/java/io/grafeas/v1/NoteKind.java index d21eac6e8e86..acced9ba551b 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/NoteKind.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/NoteKind.java @@ -139,6 +139,16 @@ public enum NoteKind implements com.google.protobuf.ProtocolMessageEnum { * DSSE_ATTESTATION = 10; */ DSSE_ATTESTATION(10), + /** + * + * + *
+   * This represents a Vulnerability Assessment.
+   * 
+ * + * VULNERABILITY_ASSESSMENT = 11; + */ + VULNERABILITY_ASSESSMENT(11), UNRECOGNIZED(-1), ; @@ -252,6 +262,16 @@ public enum NoteKind implements com.google.protobuf.ProtocolMessageEnum { * DSSE_ATTESTATION = 10; */ public static final int DSSE_ATTESTATION_VALUE = 10; + /** + * + * + *
+   * This represents a Vulnerability Assessment.
+   * 
+ * + * VULNERABILITY_ASSESSMENT = 11; + */ + public static final int VULNERABILITY_ASSESSMENT_VALUE = 11; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -299,6 +319,8 @@ public static NoteKind forNumber(int value) { return COMPLIANCE; case 10: return DSSE_ATTESTATION; + case 11: + return VULNERABILITY_ASSESSMENT; default: return null; } diff --git a/java-grafeas/src/main/java/io/grafeas/v1/NoteOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/NoteOrBuilder.java index 7bbaf91e1d3d..8a9e6800c60e 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/NoteOrBuilder.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/NoteOrBuilder.java @@ -691,5 +691,40 @@ public interface NoteOrBuilder */ io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder(); + /** + * + * + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * + * @return Whether the vulnerabilityAssessment field is set. + */ + boolean hasVulnerabilityAssessment(); + /** + * + * + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * + * @return The vulnerabilityAssessment. + */ + io.grafeas.v1.VulnerabilityAssessmentNote getVulnerabilityAssessment(); + /** + * + * + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder getVulnerabilityAssessmentOrBuilder(); + public io.grafeas.v1.Note.TypeCase getTypeCase(); } diff --git a/java-grafeas/src/main/java/io/grafeas/v1/Vex.java b/java-grafeas/src/main/java/io/grafeas/v1/Vex.java new file mode 100644 index 000000000000..ca88e4697d34 --- /dev/null +++ b/java-grafeas/src/main/java/io/grafeas/v1/Vex.java @@ -0,0 +1,187 @@ +/* + * Copyright 2019 The Grafeas Authors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vex.proto + +package io.grafeas.v1; + +public final class Vex { + private Vex() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\024grafeas/v1/vex.proto\022\ngrafeas.v1\032\027graf" + + "eas/v1/common.proto\"\252\r\n\033VulnerabilityAss" + + "essmentNote\022\r\n\005title\030\001 \001(\t\022\031\n\021short_desc" + + "ription\030\002 \001(\t\022\030\n\020long_description\030\003 \001(\t\022" + + "\025\n\rlanguage_code\030\004 \001(\t\022D\n\tpublisher\030\005 \001(" + + "\01321.grafeas.v1.VulnerabilityAssessmentNo" + + "te.Publisher\022@\n\007product\030\006 \001(\0132/.grafeas." + + "v1.VulnerabilityAssessmentNote.Product\022F" + + "\n\nassessment\030\007 \001(\01322.grafeas.v1.Vulnerab" + + "ilityAssessmentNote.Assessment\032Q\n\tPublis" + + "her\022\014\n\004name\030\001 \001(\t\022\031\n\021issuing_authority\030\002" + + " \001(\t\022\033\n\023publisher_namespace\030\003 \001(\t\032H\n\007Pro" + + "duct\022\014\n\004name\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\025\n\013generi" + + "c_uri\030\003 \001(\tH\000B\014\n\nidentifier\032\302\t\n\nAssessme" + + "nt\022\013\n\003cve\030\001 \001(\t\022\031\n\021short_description\030\002 \001" + + "(\t\022\030\n\020long_description\030\003 \001(\t\022,\n\014related_" + + "uris\030\004 \003(\0132\026.grafeas.v1.RelatedUrl\022G\n\005st" + + "ate\030\005 \001(\01628.grafeas.v1.VulnerabilityAsse" + + "ssmentNote.Assessment.State\022\017\n\007impacts\030\006" + + " \003(\t\022W\n\rjustification\030\007 \001(\0132@.grafeas.v1" + + ".VulnerabilityAssessmentNote.Assessment." + + "Justification\022T\n\014remediations\030\010 \003(\0132>.gr" + + "afeas.v1.VulnerabilityAssessmentNote.Ass" + + "essment.Remediation\032\214\003\n\rJustification\022n\n" + + "\022justification_type\030\001 \001(\0162R.grafeas.v1.V" + + "ulnerabilityAssessmentNote.Assessment.Ju" + + "stification.JustificationType\022\017\n\007details" + + "\030\002 \001(\t\"\371\001\n\021JustificationType\022\"\n\036JUSTIFIC" + + "ATION_TYPE_UNSPECIFIED\020\000\022\031\n\025COMPONENT_NO" + + "T_PRESENT\020\001\022\037\n\033VULNERABLE_CODE_NOT_PRESE" + + "NT\020\002\022\'\n#VULNERABLE_CODE_NOT_IN_EXECUTE_P" + + "ATH\020\003\0225\n1VULNERABLE_CODE_CANNOT_BE_CONTR" + + "OLLED_BY_ADVERSARY\020\004\022$\n INLINE_MITIGATIO" + + "NS_ALREADY_EXIST\020\005\032\307\002\n\013Remediation\022h\n\020re" + + "mediation_type\030\001 \001(\0162N.grafeas.v1.Vulner" + + "abilityAssessmentNote.Assessment.Remedia" + + "tion.RemediationType\022\017\n\007details\030\002 \001(\t\022/\n" + + "\017remediation_uri\030\003 \001(\0132\026.grafeas.v1.Rela" + + "tedUrl\"\213\001\n\017RemediationType\022 \n\034REMEDIATIO" + + "N_TYPE_UNSPECIFIED\020\000\022\016\n\nMITIGATION\020\001\022\022\n\016" + + "NO_FIX_PLANNED\020\002\022\022\n\016NONE_AVAILABLE\020\003\022\016\n\n" + + "VENDOR_FIX\020\004\022\016\n\nWORKAROUND\020\005\"b\n\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n\010AFFECTED\020\001\022\020\n\014NO" + + "T_AFFECTED\020\002\022\t\n\005FIXED\020\003\022\027\n\023UNDER_INVESTI" + + "GATION\020\004BQ\n\rio.grafeas.v1P\001Z8google.gola" + + "ng.org/genproto/googleapis/grafeas/v1;gr" + + "afeas\242\002\003GRAb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grafeas.v1.Common.getDescriptor(), + }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor, + new java.lang.String[] { + "Title", + "ShortDescription", + "LongDescription", + "LanguageCode", + "Publisher", + "Product", + "Assessment", + }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor = + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor, + new java.lang.String[] { + "Name", "IssuingAuthority", "PublisherNamespace", + }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor = + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor, + new java.lang.String[] { + "Name", "Id", "GenericUri", "Identifier", + }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor = + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor.getNestedTypes().get(2); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor, + new java.lang.String[] { + "Cve", + "ShortDescription", + "LongDescription", + "RelatedUris", + "State", + "Impacts", + "Justification", + "Remediations", + }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor = + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor + .getNestedTypes() + .get(0); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor, + new java.lang.String[] { + "JustificationType", "Details", + }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor = + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor + .getNestedTypes() + .get(1); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor, + new java.lang.String[] { + "RemediationType", "Details", "RemediationUri", + }); + io.grafeas.v1.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java b/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java index ace76866c42a..73b1f566a6fc 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java @@ -52,6 +52,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -66,55 +70,66 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oogle/protobuf/timestamp.proto\032\027grafeas/" + "v1/common.proto\032\025grafeas/v1/cvss.proto\032\030" + "grafeas/v1/package.proto\032\031grafeas/v1/sev" - + "erity.proto\"\354\007\n\021VulnerabilityNote\022\022\n\ncvs" - + "s_score\030\001 \001(\002\022&\n\010severity\030\002 \001(\0162\024.grafea" - + "s.v1.Severity\0225\n\007details\030\003 \003(\0132$.grafeas" - + ".v1.VulnerabilityNote.Detail\022#\n\007cvss_v3\030" - + "\004 \001(\0132\022.grafeas.v1.CVSSv3\022D\n\017windows_det" - + "ails\030\005 \003(\0132+.grafeas.v1.VulnerabilityNot" - + "e.WindowsDetail\0226\n\022source_update_time\030\006 " - + "\001(\0132\032.google.protobuf.Timestamp\022-\n\014cvss_" - + "version\030\007 \001(\0162\027.grafeas.v1.CVSSVersion\022!" - + "\n\007cvss_v2\030\010 \001(\0132\020.grafeas.v1.CVSS\032\255\003\n\006De" - + "tail\022\025\n\rseverity_name\030\001 \001(\t\022\023\n\013descripti" - + "on\030\002 \001(\t\022\024\n\014package_type\030\003 \001(\t\022\030\n\020affect" - + "ed_cpe_uri\030\004 \001(\t\022\030\n\020affected_package\030\005 \001" - + "(\t\0223\n\026affected_version_start\030\006 \001(\0132\023.gra" - + "feas.v1.Version\0221\n\024affected_version_end\030" - + "\007 \001(\0132\023.grafeas.v1.Version\022\025\n\rfixed_cpe_" - + "uri\030\010 \001(\t\022\025\n\rfixed_package\030\t \001(\t\022*\n\rfixe" - + "d_version\030\n \001(\0132\023.grafeas.v1.Version\022\023\n\013" - + "is_obsolete\030\013 \001(\010\0226\n\022source_update_time\030" - + "\014 \001(\0132\032.google.protobuf.Timestamp\022\016\n\006sou" - + "rce\030\r \001(\t\022\016\n\006vendor\030\016 \001(\t\032\276\001\n\rWindowsDet" - + "ail\022\017\n\007cpe_uri\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\023\n\013de" - + "scription\030\003 \001(\t\022M\n\nfixing_kbs\030\004 \003(\01329.gr" - + "afeas.v1.VulnerabilityNote.WindowsDetail" - + ".KnowledgeBase\032*\n\rKnowledgeBase\022\014\n\004name\030" - + "\001 \001(\t\022\013\n\003url\030\002 \001(\t\"\257\006\n\027VulnerabilityOccu" - + "rrence\022\014\n\004type\030\001 \001(\t\022&\n\010severity\030\002 \001(\0162\024" - + ".grafeas.v1.Severity\022\022\n\ncvss_score\030\003 \001(\002" - + "\022 \n\006cvssv3\030\n \001(\0132\020.grafeas.v1.CVSS\022G\n\rpa" - + "ckage_issue\030\004 \003(\01320.grafeas.v1.Vulnerabi" - + "lityOccurrence.PackageIssue\022\031\n\021short_des" - + "cription\030\005 \001(\t\022\030\n\020long_description\030\006 \001(\t" - + "\022,\n\014related_urls\030\007 \003(\0132\026.grafeas.v1.Rela" - + "tedUrl\0220\n\022effective_severity\030\010 \001(\0162\024.gra" - + "feas.v1.Severity\022\025\n\rfix_available\030\t \001(\010\022" - + "-\n\014cvss_version\030\013 \001(\0162\027.grafeas.v1.CVSSV" - + "ersion\022!\n\007cvss_v2\030\014 \001(\0132\020.grafeas.v1.CVS" - + "S\032\340\002\n\014PackageIssue\022\030\n\020affected_cpe_uri\030\001" - + " \001(\t\022\030\n\020affected_package\030\002 \001(\t\022-\n\020affect" - + "ed_version\030\003 \001(\0132\023.grafeas.v1.Version\022\025\n" - + "\rfixed_cpe_uri\030\004 \001(\t\022\025\n\rfixed_package\030\005 " - + "\001(\t\022*\n\rfixed_version\030\006 \001(\0132\023.grafeas.v1." - + "Version\022\025\n\rfix_available\030\007 \001(\010\022\024\n\014packag" - + "e_type\030\010 \001(\t\0225\n\022effective_severity\030\t \001(\016" - + "2\024.grafeas.v1.SeverityB\003\340A\003\022/\n\rfile_loca" - + "tion\030\n \003(\0132\030.grafeas.v1.FileLocationBQ\n\r" - + "io.grafeas.v1P\001Z8google.golang.org/genpr" - + "oto/googleapis/grafeas/v1;grafeas\242\002\003GRAb" - + "\006proto3" + + "erity.proto\032\024grafeas/v1/vex.proto\"\354\007\n\021Vu" + + "lnerabilityNote\022\022\n\ncvss_score\030\001 \001(\002\022&\n\010s" + + "everity\030\002 \001(\0162\024.grafeas.v1.Severity\0225\n\007d" + + "etails\030\003 \003(\0132$.grafeas.v1.VulnerabilityN" + + "ote.Detail\022#\n\007cvss_v3\030\004 \001(\0132\022.grafeas.v1" + + ".CVSSv3\022D\n\017windows_details\030\005 \003(\0132+.grafe" + + "as.v1.VulnerabilityNote.WindowsDetail\0226\n" + + "\022source_update_time\030\006 \001(\0132\032.google.proto" + + "buf.Timestamp\022-\n\014cvss_version\030\007 \001(\0162\027.gr" + + "afeas.v1.CVSSVersion\022!\n\007cvss_v2\030\010 \001(\0132\020." + + "grafeas.v1.CVSS\032\255\003\n\006Detail\022\025\n\rseverity_n" + + "ame\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\024\n\014packag" + + "e_type\030\003 \001(\t\022\030\n\020affected_cpe_uri\030\004 \001(\t\022\030" + + "\n\020affected_package\030\005 \001(\t\0223\n\026affected_ver" + + "sion_start\030\006 \001(\0132\023.grafeas.v1.Version\0221\n" + + "\024affected_version_end\030\007 \001(\0132\023.grafeas.v1" + + ".Version\022\025\n\rfixed_cpe_uri\030\010 \001(\t\022\025\n\rfixed" + + "_package\030\t \001(\t\022*\n\rfixed_version\030\n \001(\0132\023." + + "grafeas.v1.Version\022\023\n\013is_obsolete\030\013 \001(\010\022" + + "6\n\022source_update_time\030\014 \001(\0132\032.google.pro" + + "tobuf.Timestamp\022\016\n\006source\030\r \001(\t\022\016\n\006vendo" + + "r\030\016 \001(\t\032\276\001\n\rWindowsDetail\022\017\n\007cpe_uri\030\001 \001" + + "(\t\022\014\n\004name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022M\n" + + "\nfixing_kbs\030\004 \003(\01329.grafeas.v1.Vulnerabi" + + "lityNote.WindowsDetail.KnowledgeBase\032*\n\r" + + "KnowledgeBase\022\014\n\004name\030\001 \001(\t\022\013\n\003url\030\002 \001(\t" + + "\"\343\t\n\027VulnerabilityOccurrence\022\014\n\004type\030\001 \001" + + "(\t\022&\n\010severity\030\002 \001(\0162\024.grafeas.v1.Severi" + + "ty\022\022\n\ncvss_score\030\003 \001(\002\022 \n\006cvssv3\030\n \001(\0132\020" + + ".grafeas.v1.CVSS\022G\n\rpackage_issue\030\004 \003(\0132" + + "0.grafeas.v1.VulnerabilityOccurrence.Pac" + + "kageIssue\022\031\n\021short_description\030\005 \001(\t\022\030\n\020" + + "long_description\030\006 \001(\t\022,\n\014related_urls\030\007" + + " \003(\0132\026.grafeas.v1.RelatedUrl\0220\n\022effectiv" + + "e_severity\030\010 \001(\0162\024.grafeas.v1.Severity\022\025" + + "\n\rfix_available\030\t \001(\010\022-\n\014cvss_version\030\013 " + + "\001(\0162\027.grafeas.v1.CVSSVersion\022!\n\007cvss_v2\030" + + "\014 \001(\0132\020.grafeas.v1.CVSS\022I\n\016vex_assessmen" + + "t\030\r \001(\01321.grafeas.v1.VulnerabilityOccurr" + + "ence.VexAssessment\032\340\002\n\014PackageIssue\022\030\n\020a" + + "ffected_cpe_uri\030\001 \001(\t\022\030\n\020affected_packag" + + "e\030\002 \001(\t\022-\n\020affected_version\030\003 \001(\0132\023.graf" + + "eas.v1.Version\022\025\n\rfixed_cpe_uri\030\004 \001(\t\022\025\n" + + "\rfixed_package\030\005 \001(\t\022*\n\rfixed_version\030\006 " + + "\001(\0132\023.grafeas.v1.Version\022\025\n\rfix_availabl" + + "e\030\007 \001(\010\022\024\n\014package_type\030\010 \001(\t\0225\n\022effecti" + + "ve_severity\030\t \001(\0162\024.grafeas.v1.SeverityB" + + "\003\340A\003\022/\n\rfile_location\030\n \003(\0132\030.grafeas.v1" + + ".FileLocation\032\346\002\n\rVexAssessment\022\013\n\003cve\030\001" + + " \001(\t\022,\n\014related_uris\030\002 \003(\0132\026.grafeas.v1." + + "RelatedUrl\022\021\n\tnote_name\030\003 \001(\t\022G\n\005state\030\004" + + " \001(\01628.grafeas.v1.VulnerabilityAssessmen" + + "tNote.Assessment.State\022\017\n\007impacts\030\005 \003(\t\022" + + "T\n\014remediations\030\006 \003(\0132>.grafeas.v1.Vulne" + + "rabilityAssessmentNote.Assessment.Remedi" + + "ation\022W\n\rjustification\030\007 \001(\0132@.grafeas.v" + + "1.VulnerabilityAssessmentNote.Assessment" + + ".JustificationBQ\n\rio.grafeas.v1P\001Z8googl" + + "e.golang.org/genproto/googleapis/grafeas" + + "/v1;grafeas\242\002\003GRAb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -126,6 +141,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { io.grafeas.v1.CVSSProto.getDescriptor(), io.grafeas.v1.Package.getDescriptor(), io.grafeas.v1.SeverityOuterClass.getDescriptor(), + io.grafeas.v1.Vex.getDescriptor(), }); internal_static_grafeas_v1_VulnerabilityNote_descriptor = getDescriptor().getMessageTypes().get(0); @@ -199,6 +215,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FixAvailable", "CvssVersion", "CvssV2", + "VexAssessment", }); internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor = internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor.getNestedTypes().get(0); @@ -217,6 +234,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EffectiveSeverity", "FileLocation", }); + internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor = + internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor, + new java.lang.String[] { + "Cve", "RelatedUris", "NoteName", "State", "Impacts", "Remediations", "Justification", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); @@ -228,6 +253,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { io.grafeas.v1.CVSSProto.getDescriptor(); io.grafeas.v1.Package.getDescriptor(); io.grafeas.v1.SeverityOuterClass.getDescriptor(); + io.grafeas.v1.Vex.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNote.java b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNote.java similarity index 72% rename from owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNote.java rename to java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNote.java index 6c16dc7ffc43..7c06d0a8409e 100644 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNote.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNote.java @@ -1,9 +1,27 @@ +/* + * Copyright 2019 The Grafeas Authors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // Generated by the protocol buffer compiler. DO NOT EDIT! // source: grafeas/v1/vex.proto package io.grafeas.v1; /** + * + * *
  * A single VulnerabilityAssessmentNote represents
  * one particular product's vulnerability assessment for one CVE.
@@ -11,15 +29,16 @@
  *
  * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote}
  */
-public final class VulnerabilityAssessmentNote extends
-    com.google.protobuf.GeneratedMessageV3 implements
+public final class VulnerabilityAssessmentNote extends com.google.protobuf.GeneratedMessageV3
+    implements
     // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote)
     VulnerabilityAssessmentNoteOrBuilder {
-private static final long serialVersionUID = 0L;
+  private static final long serialVersionUID = 0L;
   // Use VulnerabilityAssessmentNote.newBuilder() to construct.
   private VulnerabilityAssessmentNote(com.google.protobuf.GeneratedMessageV3.Builder builder) {
     super(builder);
   }
+
   private VulnerabilityAssessmentNote() {
     title_ = "";
     shortDescription_ = "";
@@ -29,56 +48,64 @@ private VulnerabilityAssessmentNote() {
 
   @java.lang.Override
   @SuppressWarnings({"unused"})
-  protected java.lang.Object newInstance(
-      UnusedPrivateParameter unused) {
+  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
     return new VulnerabilityAssessmentNote();
   }
 
   @java.lang.Override
-  public final com.google.protobuf.UnknownFieldSet
-  getUnknownFields() {
+  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
     return this.unknownFields;
   }
-  public static final com.google.protobuf.Descriptors.Descriptor
-      getDescriptor() {
+
+  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor;
   }
 
   @java.lang.Override
   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internalGetFieldAccessorTable() {
-    return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable
+    return io.grafeas.v1.Vex
+        .internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable
         .ensureFieldAccessorsInitialized(
-            io.grafeas.v1.VulnerabilityAssessmentNote.class, io.grafeas.v1.VulnerabilityAssessmentNote.Builder.class);
+            io.grafeas.v1.VulnerabilityAssessmentNote.class,
+            io.grafeas.v1.VulnerabilityAssessmentNote.Builder.class);
   }
 
-  public interface PublisherOrBuilder extends
+  public interface PublisherOrBuilder
+      extends
       // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Publisher)
       com.google.protobuf.MessageOrBuilder {
 
     /**
+     *
+     *
      * 
      * Name of the publisher.
      * Examples: 'Google', 'Google Cloud Platform'.
      * 
* * string name = 1; + * * @return The name. */ java.lang.String getName(); /** + * + * *
      * Name of the publisher.
      * Examples: 'Google', 'Google Cloud Platform'.
      * 
* * string name = 1; + * * @return The bytes for name. */ - com.google.protobuf.ByteString - getNameBytes(); + com.google.protobuf.ByteString getNameBytes(); /** + * + * *
      * Provides information about the authority of the issuing party to
      * release the document, in particular, the party's constituency and
@@ -86,10 +113,13 @@ public interface PublisherOrBuilder extends
      * 
* * string issuing_authority = 2; + * * @return The issuingAuthority. */ java.lang.String getIssuingAuthority(); /** + * + * *
      * Provides information about the authority of the issuing party to
      * release the document, in particular, the party's constituency and
@@ -97,12 +127,14 @@ public interface PublisherOrBuilder extends
      * 
* * string issuing_authority = 2; + * * @return The bytes for issuingAuthority. */ - com.google.protobuf.ByteString - getIssuingAuthorityBytes(); + com.google.protobuf.ByteString getIssuingAuthorityBytes(); /** + * + * *
      * The context or namespace.
      * Contains a URL which is under control of the issuing party and can
@@ -111,10 +143,13 @@ public interface PublisherOrBuilder extends
      * 
* * string publisher_namespace = 3; + * * @return The publisherNamespace. */ java.lang.String getPublisherNamespace(); /** + * + * *
      * The context or namespace.
      * Contains a URL which is under control of the issuing party and can
@@ -123,12 +158,14 @@ public interface PublisherOrBuilder extends
      * 
* * string publisher_namespace = 3; + * * @return The bytes for publisherNamespace. */ - com.google.protobuf.ByteString - getPublisherNamespaceBytes(); + com.google.protobuf.ByteString getPublisherNamespaceBytes(); } /** + * + * *
    * Publisher contains information about the publisher of
    * this Note.
@@ -138,15 +175,16 @@ public interface PublisherOrBuilder extends
    *
    * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Publisher}
    */
-  public static final class Publisher extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public static final class Publisher extends com.google.protobuf.GeneratedMessageV3
+      implements
       // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Publisher)
       PublisherOrBuilder {
-  private static final long serialVersionUID = 0L;
+    private static final long serialVersionUID = 0L;
     // Use Publisher.newBuilder() to construct.
     private Publisher(com.google.protobuf.GeneratedMessageV3.Builder builder) {
       super(builder);
     }
+
     private Publisher() {
       name_ = "";
       issuingAuthority_ = "";
@@ -155,39 +193,44 @@ private Publisher() {
 
     @java.lang.Override
     @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
+    protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
       return new Publisher();
     }
 
     @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
+    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
       return this.unknownFields;
     }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor;
+
+    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+      return io.grafeas.v1.Vex
+          .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor;
     }
 
     @java.lang.Override
     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable
+      return io.grafeas.v1.Vex
+          .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
-              io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.class, io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder.class);
+              io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.class,
+              io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder.class);
     }
 
     public static final int NAME_FIELD_NUMBER = 1;
+
     @SuppressWarnings("serial")
     private volatile java.lang.Object name_ = "";
     /**
+     *
+     *
      * 
      * Name of the publisher.
      * Examples: 'Google', 'Google Cloud Platform'.
      * 
* * string name = 1; + * * @return The name. */ @java.lang.Override @@ -196,30 +239,30 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** + * + * *
      * Name of the publisher.
      * Examples: 'Google', 'Google Cloud Platform'.
      * 
* * string name = 1; + * * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { + public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { @@ -228,9 +271,12 @@ public java.lang.String getName() { } public static final int ISSUING_AUTHORITY_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private volatile java.lang.Object issuingAuthority_ = ""; /** + * + * *
      * Provides information about the authority of the issuing party to
      * release the document, in particular, the party's constituency and
@@ -238,6 +284,7 @@ public java.lang.String getName() {
      * 
* * string issuing_authority = 2; + * * @return The issuingAuthority. */ @java.lang.Override @@ -246,14 +293,15 @@ public java.lang.String getIssuingAuthority() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); issuingAuthority_ = s; return s; } } /** + * + * *
      * Provides information about the authority of the issuing party to
      * release the document, in particular, the party's constituency and
@@ -261,16 +309,15 @@ public java.lang.String getIssuingAuthority() {
      * 
* * string issuing_authority = 2; + * * @return The bytes for issuingAuthority. */ @java.lang.Override - public com.google.protobuf.ByteString - getIssuingAuthorityBytes() { + public com.google.protobuf.ByteString getIssuingAuthorityBytes() { java.lang.Object ref = issuingAuthority_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); issuingAuthority_ = b; return b; } else { @@ -279,9 +326,12 @@ public java.lang.String getIssuingAuthority() { } public static final int PUBLISHER_NAMESPACE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private volatile java.lang.Object publisherNamespace_ = ""; /** + * + * *
      * The context or namespace.
      * Contains a URL which is under control of the issuing party and can
@@ -290,6 +340,7 @@ public java.lang.String getIssuingAuthority() {
      * 
* * string publisher_namespace = 3; + * * @return The publisherNamespace. */ @java.lang.Override @@ -298,14 +349,15 @@ public java.lang.String getPublisherNamespace() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); publisherNamespace_ = s; return s; } } /** + * + * *
      * The context or namespace.
      * Contains a URL which is under control of the issuing party and can
@@ -314,16 +366,15 @@ public java.lang.String getPublisherNamespace() {
      * 
* * string publisher_namespace = 3; + * * @return The bytes for publisherNamespace. */ @java.lang.Override - public com.google.protobuf.ByteString - getPublisherNamespaceBytes() { + public com.google.protobuf.ByteString getPublisherNamespaceBytes() { java.lang.Object ref = publisherNamespace_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); publisherNamespace_ = b; return b; } else { @@ -332,6 +383,7 @@ public java.lang.String getPublisherNamespace() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -343,8 +395,7 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -380,19 +431,17 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Publisher)) { return super.equals(obj); } - io.grafeas.v1.VulnerabilityAssessmentNote.Publisher other = (io.grafeas.v1.VulnerabilityAssessmentNote.Publisher) obj; + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher other = + (io.grafeas.v1.VulnerabilityAssessmentNote.Publisher) obj; - if (!getName() - .equals(other.getName())) return false; - if (!getIssuingAuthority() - .equals(other.getIssuingAuthority())) return false; - if (!getPublisherNamespace() - .equals(other.getPublisherNamespace())) return false; + if (!getName().equals(other.getName())) return false; + if (!getIssuingAuthority().equals(other.getIssuingAuthority())) return false; + if (!getPublisherNamespace().equals(other.getPublisherNamespace())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -416,87 +465,94 @@ public int hashCode() { } public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher prototype) { + + public static Builder newBuilder( + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override @@ -506,6 +562,8 @@ protected Builder newBuilderForType( return builder; } /** + * + * *
      * Publisher contains information about the publisher of
      * this Note.
@@ -515,33 +573,33 @@ protected Builder newBuilderForType(
      *
      * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Publisher}
      */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+    public static final class Builder
+        extends com.google.protobuf.GeneratedMessageV3.Builder
+        implements
         // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote.Publisher)
         io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor;
+      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+        return io.grafeas.v1.Vex
+            .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor;
       }
 
       @java.lang.Override
       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
           internalGetFieldAccessorTable() {
-        return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable
+        return io.grafeas.v1.Vex
+            .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
-                io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.class, io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder.class);
+                io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.class,
+                io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder.class);
       }
 
       // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.newBuilder()
-      private Builder() {
+      private Builder() {}
 
-      }
-
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+      private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
       }
+
       @java.lang.Override
       public Builder clear() {
         super.clear();
@@ -553,9 +611,9 @@ public Builder clear() {
       }
 
       @java.lang.Override
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor;
+      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+        return io.grafeas.v1.Vex
+            .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor;
       }
 
       @java.lang.Override
@@ -574,8 +632,11 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher build() {
 
       @java.lang.Override
       public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher buildPartial() {
-        io.grafeas.v1.VulnerabilityAssessmentNote.Publisher result = new io.grafeas.v1.VulnerabilityAssessmentNote.Publisher(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        io.grafeas.v1.VulnerabilityAssessmentNote.Publisher result =
+            new io.grafeas.v1.VulnerabilityAssessmentNote.Publisher(this);
+        if (bitField0_ != 0) {
+          buildPartial0(result);
+        }
         onBuilt();
         return result;
       }
@@ -597,38 +658,41 @@ private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher r
       public Builder clone() {
         return super.clone();
       }
+
       @java.lang.Override
       public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
+          com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
         return super.setField(field, value);
       }
+
       @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
+      public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
         return super.clearField(field);
       }
+
       @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+      public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
         return super.clearOneof(oneof);
       }
+
       @java.lang.Override
       public Builder setRepeatedField(
           com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
+          int index,
+          java.lang.Object value) {
         return super.setRepeatedField(field, index, value);
       }
+
       @java.lang.Override
       public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
+          com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
         return super.addRepeatedField(field, value);
       }
+
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Publisher) {
-          return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Publisher)other);
+          return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Publisher) other);
         } else {
           super.mergeFrom(other);
           return this;
@@ -636,7 +700,8 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
       }
 
       public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher other) {
-        if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance()) return this;
+        if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance())
+          return this;
         if (!other.getName().isEmpty()) {
           name_ = other.name_;
           bitField0_ |= 0x00000001;
@@ -678,27 +743,31 @@ public Builder mergeFrom(
               case 0:
                 done = true;
                 break;
-              case 10: {
-                name_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                issuingAuthority_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              case 26: {
-                publisherNamespace_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000004;
-                break;
-              } // case 26
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
+              case 10:
+                {
+                  name_ = input.readStringRequireUtf8();
+                  bitField0_ |= 0x00000001;
+                  break;
+                } // case 10
+              case 18:
+                {
+                  issuingAuthority_ = input.readStringRequireUtf8();
+                  bitField0_ |= 0x00000002;
+                  break;
+                } // case 18
+              case 26:
+                {
+                  publisherNamespace_ = input.readStringRequireUtf8();
+                  bitField0_ |= 0x00000004;
+                  break;
+                } // case 26
+              default:
+                {
+                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                    done = true; // was an endgroup tag
+                  }
+                  break;
+                } // default:
             } // switch (tag)
           } // while (!done)
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -708,23 +777,26 @@ public Builder mergeFrom(
         } // finally
         return this;
       }
+
       private int bitField0_;
 
       private java.lang.Object name_ = "";
       /**
+       *
+       *
        * 
        * Name of the publisher.
        * Examples: 'Google', 'Google Cloud Platform'.
        * 
* * string name = 1; + * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -733,21 +805,22 @@ public java.lang.String getName() { } } /** + * + * *
        * Name of the publisher.
        * Examples: 'Google', 'Google Cloud Platform'.
        * 
* * string name = 1; + * * @return The bytes for name. */ - public com.google.protobuf.ByteString - getNameBytes() { + public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { @@ -755,30 +828,37 @@ public java.lang.String getName() { } } /** + * + * *
        * Name of the publisher.
        * Examples: 'Google', 'Google Cloud Platform'.
        * 
* * string name = 1; + * * @param value The name to set. * @return This builder for chaining. */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** + * + * *
        * Name of the publisher.
        * Examples: 'Google', 'Google Cloud Platform'.
        * 
* * string name = 1; + * * @return This builder for chaining. */ public Builder clearName() { @@ -788,18 +868,22 @@ public Builder clearName() { return this; } /** + * + * *
        * Name of the publisher.
        * Examples: 'Google', 'Google Cloud Platform'.
        * 
* * string name = 1; + * * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); name_ = value; bitField0_ |= 0x00000001; @@ -809,6 +893,8 @@ public Builder setNameBytes( private java.lang.Object issuingAuthority_ = ""; /** + * + * *
        * Provides information about the authority of the issuing party to
        * release the document, in particular, the party's constituency and
@@ -816,13 +902,13 @@ public Builder setNameBytes(
        * 
* * string issuing_authority = 2; + * * @return The issuingAuthority. */ public java.lang.String getIssuingAuthority() { java.lang.Object ref = issuingAuthority_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); issuingAuthority_ = s; return s; @@ -831,6 +917,8 @@ public java.lang.String getIssuingAuthority() { } } /** + * + * *
        * Provides information about the authority of the issuing party to
        * release the document, in particular, the party's constituency and
@@ -838,15 +926,14 @@ public java.lang.String getIssuingAuthority() {
        * 
* * string issuing_authority = 2; + * * @return The bytes for issuingAuthority. */ - public com.google.protobuf.ByteString - getIssuingAuthorityBytes() { + public com.google.protobuf.ByteString getIssuingAuthorityBytes() { java.lang.Object ref = issuingAuthority_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); issuingAuthority_ = b; return b; } else { @@ -854,6 +941,8 @@ public java.lang.String getIssuingAuthority() { } } /** + * + * *
        * Provides information about the authority of the issuing party to
        * release the document, in particular, the party's constituency and
@@ -861,18 +950,22 @@ public java.lang.String getIssuingAuthority() {
        * 
* * string issuing_authority = 2; + * * @param value The issuingAuthority to set. * @return This builder for chaining. */ - public Builder setIssuingAuthority( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setIssuingAuthority(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } issuingAuthority_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** + * + * *
        * Provides information about the authority of the issuing party to
        * release the document, in particular, the party's constituency and
@@ -880,6 +973,7 @@ public Builder setIssuingAuthority(
        * 
* * string issuing_authority = 2; + * * @return This builder for chaining. */ public Builder clearIssuingAuthority() { @@ -889,6 +983,8 @@ public Builder clearIssuingAuthority() { return this; } /** + * + * *
        * Provides information about the authority of the issuing party to
        * release the document, in particular, the party's constituency and
@@ -896,12 +992,14 @@ public Builder clearIssuingAuthority() {
        * 
* * string issuing_authority = 2; + * * @param value The bytes for issuingAuthority to set. * @return This builder for chaining. */ - public Builder setIssuingAuthorityBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder setIssuingAuthorityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); issuingAuthority_ = value; bitField0_ |= 0x00000002; @@ -911,6 +1009,8 @@ public Builder setIssuingAuthorityBytes( private java.lang.Object publisherNamespace_ = ""; /** + * + * *
        * The context or namespace.
        * Contains a URL which is under control of the issuing party and can
@@ -919,13 +1019,13 @@ public Builder setIssuingAuthorityBytes(
        * 
* * string publisher_namespace = 3; + * * @return The publisherNamespace. */ public java.lang.String getPublisherNamespace() { java.lang.Object ref = publisherNamespace_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); publisherNamespace_ = s; return s; @@ -934,6 +1034,8 @@ public java.lang.String getPublisherNamespace() { } } /** + * + * *
        * The context or namespace.
        * Contains a URL which is under control of the issuing party and can
@@ -942,15 +1044,14 @@ public java.lang.String getPublisherNamespace() {
        * 
* * string publisher_namespace = 3; + * * @return The bytes for publisherNamespace. */ - public com.google.protobuf.ByteString - getPublisherNamespaceBytes() { + public com.google.protobuf.ByteString getPublisherNamespaceBytes() { java.lang.Object ref = publisherNamespace_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); publisherNamespace_ = b; return b; } else { @@ -958,6 +1059,8 @@ public java.lang.String getPublisherNamespace() { } } /** + * + * *
        * The context or namespace.
        * Contains a URL which is under control of the issuing party and can
@@ -966,18 +1069,22 @@ public java.lang.String getPublisherNamespace() {
        * 
* * string publisher_namespace = 3; + * * @param value The publisherNamespace to set. * @return This builder for chaining. */ - public Builder setPublisherNamespace( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setPublisherNamespace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } publisherNamespace_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** + * + * *
        * The context or namespace.
        * Contains a URL which is under control of the issuing party and can
@@ -986,6 +1093,7 @@ public Builder setPublisherNamespace(
        * 
* * string publisher_namespace = 3; + * * @return This builder for chaining. */ public Builder clearPublisherNamespace() { @@ -995,6 +1103,8 @@ public Builder clearPublisherNamespace() { return this; } /** + * + * *
        * The context or namespace.
        * Contains a URL which is under control of the issuing party and can
@@ -1003,18 +1113,21 @@ public Builder clearPublisherNamespace() {
        * 
* * string publisher_namespace = 3; + * * @param value The bytes for publisherNamespace to set. * @return This builder for chaining. */ - public Builder setPublisherNamespaceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder setPublisherNamespaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); publisherNamespace_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -1027,12 +1140,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Publisher) } // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Publisher) private static final io.grafeas.v1.VulnerabilityAssessmentNote.Publisher DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Publisher(); } @@ -1041,27 +1154,28 @@ public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getDefaultInst return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Publisher parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Publisher parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1076,34 +1190,41 @@ public com.google.protobuf.Parser getParserForType() { public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - public interface ProductOrBuilder extends + public interface ProductOrBuilder + extends // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Product) com.google.protobuf.MessageOrBuilder { /** + * + * *
      * Name of the product.
      * 
* * string name = 1; + * * @return The name. */ java.lang.String getName(); /** + * + * *
      * Name of the product.
      * 
* * string name = 1; + * * @return The bytes for name. */ - com.google.protobuf.ByteString - getNameBytes(); + com.google.protobuf.ByteString getNameBytes(); /** + * + * *
      * Token that identifies a product so that it can be referred to from other
      * parts in the document. There is no predefined format as long as it
@@ -1111,10 +1232,13 @@ public interface ProductOrBuilder extends
      * 
* * string id = 2; + * * @return The id. */ java.lang.String getId(); /** + * + * *
      * Token that identifies a product so that it can be referred to from other
      * parts in the document. There is no predefined format as long as it
@@ -1122,46 +1246,56 @@ public interface ProductOrBuilder extends
      * 
* * string id = 2; + * * @return The bytes for id. */ - com.google.protobuf.ByteString - getIdBytes(); + com.google.protobuf.ByteString getIdBytes(); /** + * + * *
      * Contains a URI which is vendor-specific.
      * Example: The artifact repository URL of an image.
      * 
* * string generic_uri = 3; + * * @return Whether the genericUri field is set. */ boolean hasGenericUri(); /** + * + * *
      * Contains a URI which is vendor-specific.
      * Example: The artifact repository URL of an image.
      * 
* * string generic_uri = 3; + * * @return The genericUri. */ java.lang.String getGenericUri(); /** + * + * *
      * Contains a URI which is vendor-specific.
      * Example: The artifact repository URL of an image.
      * 
* * string generic_uri = 3; + * * @return The bytes for genericUri. */ - com.google.protobuf.ByteString - getGenericUriBytes(); + com.google.protobuf.ByteString getGenericUriBytes(); public io.grafeas.v1.VulnerabilityAssessmentNote.Product.IdentifierCase getIdentifierCase(); } /** + * + * *
    * Product contains information about a product and how to uniquely identify
    * it.
@@ -1171,15 +1305,16 @@ public interface ProductOrBuilder extends
    *
    * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Product}
    */
-  public static final class Product extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public static final class Product extends com.google.protobuf.GeneratedMessageV3
+      implements
       // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Product)
       ProductOrBuilder {
-  private static final long serialVersionUID = 0L;
+    private static final long serialVersionUID = 0L;
     // Use Product.newBuilder() to construct.
     private Product(com.google.protobuf.GeneratedMessageV3.Builder builder) {
       super(builder);
     }
+
     private Product() {
       name_ = "";
       id_ = "";
@@ -1187,37 +1322,41 @@ private Product() {
 
     @java.lang.Override
     @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
+    protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
       return new Product();
     }
 
     @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
+    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
       return this.unknownFields;
     }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor;
+
+    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+      return io.grafeas.v1.Vex
+          .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor;
     }
 
     @java.lang.Override
     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable
+      return io.grafeas.v1.Vex
+          .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
-              io.grafeas.v1.VulnerabilityAssessmentNote.Product.class, io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder.class);
+              io.grafeas.v1.VulnerabilityAssessmentNote.Product.class,
+              io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder.class);
     }
 
     private int identifierCase_ = 0;
     private java.lang.Object identifier_;
+
     public enum IdentifierCase
-        implements com.google.protobuf.Internal.EnumLite,
+        implements
+            com.google.protobuf.Internal.EnumLite,
             com.google.protobuf.AbstractMessage.InternalOneOfEnum {
       GENERIC_URI(3),
       IDENTIFIER_NOT_SET(0);
       private final int value;
+
       private IdentifierCase(int value) {
         this.value = value;
       }
@@ -1233,31 +1372,37 @@ public static IdentifierCase valueOf(int value) {
 
       public static IdentifierCase forNumber(int value) {
         switch (value) {
-          case 3: return GENERIC_URI;
-          case 0: return IDENTIFIER_NOT_SET;
-          default: return null;
+          case 3:
+            return GENERIC_URI;
+          case 0:
+            return IDENTIFIER_NOT_SET;
+          default:
+            return null;
         }
       }
+
       public int getNumber() {
         return this.value;
       }
     };
 
-    public IdentifierCase
-    getIdentifierCase() {
-      return IdentifierCase.forNumber(
-          identifierCase_);
+    public IdentifierCase getIdentifierCase() {
+      return IdentifierCase.forNumber(identifierCase_);
     }
 
     public static final int NAME_FIELD_NUMBER = 1;
+
     @SuppressWarnings("serial")
     private volatile java.lang.Object name_ = "";
     /**
+     *
+     *
      * 
      * Name of the product.
      * 
* * string name = 1; + * * @return The name. */ @java.lang.Override @@ -1266,29 +1411,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** + * + * *
      * Name of the product.
      * 
* * string name = 1; + * * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { + public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { @@ -1297,9 +1442,12 @@ public java.lang.String getName() { } public static final int ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; /** + * + * *
      * Token that identifies a product so that it can be referred to from other
      * parts in the document. There is no predefined format as long as it
@@ -1307,6 +1455,7 @@ public java.lang.String getName() {
      * 
* * string id = 2; + * * @return The id. */ @java.lang.Override @@ -1315,14 +1464,15 @@ public java.lang.String getId() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } } /** + * + * *
      * Token that identifies a product so that it can be referred to from other
      * parts in the document. There is no predefined format as long as it
@@ -1330,16 +1480,15 @@ public java.lang.String getId() {
      * 
* * string id = 2; + * * @return The bytes for id. */ @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { + public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); id_ = b; return b; } else { @@ -1349,24 +1498,30 @@ public java.lang.String getId() { public static final int GENERIC_URI_FIELD_NUMBER = 3; /** + * + * *
      * Contains a URI which is vendor-specific.
      * Example: The artifact repository URL of an image.
      * 
* * string generic_uri = 3; + * * @return Whether the genericUri field is set. */ public boolean hasGenericUri() { return identifierCase_ == 3; } /** - *
+     *
+     *
+     * 
      * Contains a URI which is vendor-specific.
      * Example: The artifact repository URL of an image.
      * 
* * string generic_uri = 3; + * * @return The genericUri. */ public java.lang.String getGenericUri() { @@ -1377,8 +1532,7 @@ public java.lang.String getGenericUri() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (identifierCase_ == 3) { identifier_ = s; @@ -1387,24 +1541,25 @@ public java.lang.String getGenericUri() { } } /** + * + * *
      * Contains a URI which is vendor-specific.
      * Example: The artifact repository URL of an image.
      * 
* * string generic_uri = 3; + * * @return The bytes for genericUri. */ - public com.google.protobuf.ByteString - getGenericUriBytes() { + public com.google.protobuf.ByteString getGenericUriBytes() { java.lang.Object ref = ""; if (identifierCase_ == 3) { ref = identifier_; } if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (identifierCase_ == 3) { identifier_ = b; } @@ -1415,6 +1570,7 @@ public java.lang.String getGenericUri() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -1426,8 +1582,7 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -1463,22 +1618,20 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Product)) { return super.equals(obj); } - io.grafeas.v1.VulnerabilityAssessmentNote.Product other = (io.grafeas.v1.VulnerabilityAssessmentNote.Product) obj; + io.grafeas.v1.VulnerabilityAssessmentNote.Product other = + (io.grafeas.v1.VulnerabilityAssessmentNote.Product) obj; - if (!getName() - .equals(other.getName())) return false; - if (!getId() - .equals(other.getId())) return false; + if (!getName().equals(other.getName())) return false; + if (!getId().equals(other.getId())) return false; if (!getIdentifierCase().equals(other.getIdentifierCase())) return false; switch (identifierCase_) { case 3: - if (!getGenericUri() - .equals(other.getGenericUri())) return false; + if (!getGenericUri().equals(other.getGenericUri())) return false; break; case 0: default: @@ -1512,87 +1665,93 @@ public int hashCode() { } public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote.Product prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override @@ -1602,6 +1761,8 @@ protected Builder newBuilderForType( return builder; } /** + * + * *
      * Product contains information about a product and how to uniquely identify
      * it.
@@ -1611,33 +1772,33 @@ protected Builder newBuilderForType(
      *
      * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Product}
      */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+    public static final class Builder
+        extends com.google.protobuf.GeneratedMessageV3.Builder
+        implements
         // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote.Product)
         io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor;
+      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+        return io.grafeas.v1.Vex
+            .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor;
       }
 
       @java.lang.Override
       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
           internalGetFieldAccessorTable() {
-        return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable
+        return io.grafeas.v1.Vex
+            .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
-                io.grafeas.v1.VulnerabilityAssessmentNote.Product.class, io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder.class);
+                io.grafeas.v1.VulnerabilityAssessmentNote.Product.class,
+                io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder.class);
       }
 
       // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.Product.newBuilder()
-      private Builder() {
-
-      }
+      private Builder() {}
 
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+      private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
       }
+
       @java.lang.Override
       public Builder clear() {
         super.clear();
@@ -1650,9 +1811,9 @@ public Builder clear() {
       }
 
       @java.lang.Override
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor;
+      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+        return io.grafeas.v1.Vex
+            .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor;
       }
 
       @java.lang.Override
@@ -1671,8 +1832,11 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.Product build() {
 
       @java.lang.Override
       public io.grafeas.v1.VulnerabilityAssessmentNote.Product buildPartial() {
-        io.grafeas.v1.VulnerabilityAssessmentNote.Product result = new io.grafeas.v1.VulnerabilityAssessmentNote.Product(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        io.grafeas.v1.VulnerabilityAssessmentNote.Product result =
+            new io.grafeas.v1.VulnerabilityAssessmentNote.Product(this);
+        if (bitField0_ != 0) {
+          buildPartial0(result);
+        }
         buildPartialOneofs(result);
         onBuilt();
         return result;
@@ -1697,38 +1861,41 @@ private void buildPartialOneofs(io.grafeas.v1.VulnerabilityAssessmentNote.Produc
       public Builder clone() {
         return super.clone();
       }
+
       @java.lang.Override
       public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
+          com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
         return super.setField(field, value);
       }
+
       @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
+      public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
         return super.clearField(field);
       }
+
       @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+      public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
         return super.clearOneof(oneof);
       }
+
       @java.lang.Override
       public Builder setRepeatedField(
           com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
+          int index,
+          java.lang.Object value) {
         return super.setRepeatedField(field, index, value);
       }
+
       @java.lang.Override
       public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
+          com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
         return super.addRepeatedField(field, value);
       }
+
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Product) {
-          return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Product)other);
+          return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Product) other);
         } else {
           super.mergeFrom(other);
           return this;
@@ -1736,7 +1903,8 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
       }
 
       public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Product other) {
-        if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance()) return this;
+        if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance())
+          return this;
         if (!other.getName().isEmpty()) {
           name_ = other.name_;
           bitField0_ |= 0x00000001;
@@ -1748,15 +1916,17 @@ public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Product other
           onChanged();
         }
         switch (other.getIdentifierCase()) {
-          case GENERIC_URI: {
-            identifierCase_ = 3;
-            identifier_ = other.identifier_;
-            onChanged();
-            break;
-          }
-          case IDENTIFIER_NOT_SET: {
-            break;
-          }
+          case GENERIC_URI:
+            {
+              identifierCase_ = 3;
+              identifier_ = other.identifier_;
+              onChanged();
+              break;
+            }
+          case IDENTIFIER_NOT_SET:
+            {
+              break;
+            }
         }
         this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
@@ -1784,28 +1954,32 @@ public Builder mergeFrom(
               case 0:
                 done = true;
                 break;
-              case 10: {
-                name_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                id_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              case 26: {
-                java.lang.String s = input.readStringRequireUtf8();
-                identifierCase_ = 3;
-                identifier_ = s;
-                break;
-              } // case 26
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
+              case 10:
+                {
+                  name_ = input.readStringRequireUtf8();
+                  bitField0_ |= 0x00000001;
+                  break;
+                } // case 10
+              case 18:
+                {
+                  id_ = input.readStringRequireUtf8();
+                  bitField0_ |= 0x00000002;
+                  break;
+                } // case 18
+              case 26:
+                {
+                  java.lang.String s = input.readStringRequireUtf8();
+                  identifierCase_ = 3;
+                  identifier_ = s;
+                  break;
+                } // case 26
+              default:
+                {
+                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                    done = true; // was an endgroup tag
+                  }
+                  break;
+                } // default:
             } // switch (tag)
           } // while (!done)
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -1815,12 +1989,12 @@ public Builder mergeFrom(
         } // finally
         return this;
       }
+
       private int identifierCase_ = 0;
       private java.lang.Object identifier_;
-      public IdentifierCase
-          getIdentifierCase() {
-        return IdentifierCase.forNumber(
-            identifierCase_);
+
+      public IdentifierCase getIdentifierCase() {
+        return IdentifierCase.forNumber(identifierCase_);
       }
 
       public Builder clearIdentifier() {
@@ -1834,18 +2008,20 @@ public Builder clearIdentifier() {
 
       private java.lang.Object name_ = "";
       /**
+       *
+       *
        * 
        * Name of the product.
        * 
* * string name = 1; + * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -1854,20 +2030,21 @@ public java.lang.String getName() { } } /** + * + * *
        * Name of the product.
        * 
* * string name = 1; + * * @return The bytes for name. */ - public com.google.protobuf.ByteString - getNameBytes() { + public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { @@ -1875,28 +2052,35 @@ public java.lang.String getName() { } } /** + * + * *
        * Name of the product.
        * 
* * string name = 1; + * * @param value The name to set. * @return This builder for chaining. */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** + * + * *
        * Name of the product.
        * 
* * string name = 1; + * * @return This builder for chaining. */ public Builder clearName() { @@ -1906,17 +2090,21 @@ public Builder clearName() { return this; } /** + * + * *
        * Name of the product.
        * 
* * string name = 1; + * * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); name_ = value; bitField0_ |= 0x00000001; @@ -1926,6 +2114,8 @@ public Builder setNameBytes( private java.lang.Object id_ = ""; /** + * + * *
        * Token that identifies a product so that it can be referred to from other
        * parts in the document. There is no predefined format as long as it
@@ -1933,13 +2123,13 @@ public Builder setNameBytes(
        * 
* * string id = 2; + * * @return The id. */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; @@ -1948,6 +2138,8 @@ public java.lang.String getId() { } } /** + * + * *
        * Token that identifies a product so that it can be referred to from other
        * parts in the document. There is no predefined format as long as it
@@ -1955,15 +2147,14 @@ public java.lang.String getId() {
        * 
* * string id = 2; + * * @return The bytes for id. */ - public com.google.protobuf.ByteString - getIdBytes() { + public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); id_ = b; return b; } else { @@ -1971,6 +2162,8 @@ public java.lang.String getId() { } } /** + * + * *
        * Token that identifies a product so that it can be referred to from other
        * parts in the document. There is no predefined format as long as it
@@ -1978,18 +2171,22 @@ public java.lang.String getId() {
        * 
* * string id = 2; + * * @param value The id to set. * @return This builder for chaining. */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } id_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** + * + * *
        * Token that identifies a product so that it can be referred to from other
        * parts in the document. There is no predefined format as long as it
@@ -1997,6 +2194,7 @@ public Builder setId(
        * 
* * string id = 2; + * * @return This builder for chaining. */ public Builder clearId() { @@ -2006,6 +2204,8 @@ public Builder clearId() { return this; } /** + * + * *
        * Token that identifies a product so that it can be referred to from other
        * parts in the document. There is no predefined format as long as it
@@ -2013,12 +2213,14 @@ public Builder clearId() {
        * 
* * string id = 2; + * * @param value The bytes for id to set. * @return This builder for chaining. */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); id_ = value; bitField0_ |= 0x00000002; @@ -2027,12 +2229,15 @@ public Builder setIdBytes( } /** + * + * *
        * Contains a URI which is vendor-specific.
        * Example: The artifact repository URL of an image.
        * 
* * string generic_uri = 3; + * * @return Whether the genericUri field is set. */ @java.lang.Override @@ -2040,12 +2245,15 @@ public boolean hasGenericUri() { return identifierCase_ == 3; } /** + * + * *
        * Contains a URI which is vendor-specific.
        * Example: The artifact repository URL of an image.
        * 
* * string generic_uri = 3; + * * @return The genericUri. */ @java.lang.Override @@ -2055,8 +2263,7 @@ public java.lang.String getGenericUri() { ref = identifier_; } if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (identifierCase_ == 3) { identifier_ = s; @@ -2067,25 +2274,26 @@ public java.lang.String getGenericUri() { } } /** + * + * *
        * Contains a URI which is vendor-specific.
        * Example: The artifact repository URL of an image.
        * 
* * string generic_uri = 3; + * * @return The bytes for genericUri. */ @java.lang.Override - public com.google.protobuf.ByteString - getGenericUriBytes() { + public com.google.protobuf.ByteString getGenericUriBytes() { java.lang.Object ref = ""; if (identifierCase_ == 3) { ref = identifier_; } if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (identifierCase_ == 3) { identifier_ = b; } @@ -2095,30 +2303,37 @@ public java.lang.String getGenericUri() { } } /** + * + * *
        * Contains a URI which is vendor-specific.
        * Example: The artifact repository URL of an image.
        * 
* * string generic_uri = 3; + * * @param value The genericUri to set. * @return This builder for chaining. */ - public Builder setGenericUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setGenericUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } identifierCase_ = 3; identifier_ = value; onChanged(); return this; } /** + * + * *
        * Contains a URI which is vendor-specific.
        * Example: The artifact repository URL of an image.
        * 
* * string generic_uri = 3; + * * @return This builder for chaining. */ public Builder clearGenericUri() { @@ -2130,24 +2345,29 @@ public Builder clearGenericUri() { return this; } /** + * + * *
        * Contains a URI which is vendor-specific.
        * Example: The artifact repository URL of an image.
        * 
* * string generic_uri = 3; + * * @param value The bytes for genericUri to set. * @return This builder for chaining. */ - public Builder setGenericUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder setGenericUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); identifierCase_ = 3; identifier_ = value; onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -2160,12 +2380,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Product) } // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Product) private static final io.grafeas.v1.VulnerabilityAssessmentNote.Product DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Product(); } @@ -2174,27 +2394,28 @@ public static io.grafeas.v1.VulnerabilityAssessmentNote.Product getDefaultInstan return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Product parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Product parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -2209,76 +2430,93 @@ public com.google.protobuf.Parser getParserForType() { public io.grafeas.v1.VulnerabilityAssessmentNote.Product getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - public interface AssessmentOrBuilder extends + public interface AssessmentOrBuilder + extends // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Assessment) com.google.protobuf.MessageOrBuilder { /** + * + * *
      * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
      * tracking number for the vulnerability.
      * 
* * string cve = 1; + * * @return The cve. */ java.lang.String getCve(); /** + * + * *
      * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
      * tracking number for the vulnerability.
      * 
* * string cve = 1; + * * @return The bytes for cve. */ - com.google.protobuf.ByteString - getCveBytes(); + com.google.protobuf.ByteString getCveBytes(); /** + * + * *
      * A one sentence description of this Vex.
      * 
* * string short_description = 2; + * * @return The shortDescription. */ java.lang.String getShortDescription(); /** + * + * *
      * A one sentence description of this Vex.
      * 
* * string short_description = 2; + * * @return The bytes for shortDescription. */ - com.google.protobuf.ByteString - getShortDescriptionBytes(); + com.google.protobuf.ByteString getShortDescriptionBytes(); /** + * + * *
      * A detailed description of this Vex.
      * 
* * string long_description = 3; + * * @return The longDescription. */ java.lang.String getLongDescription(); /** + * + * *
      * A detailed description of this Vex.
      * 
* * string long_description = 3; + * * @return The bytes for longDescription. */ - com.google.protobuf.ByteString - getLongDescriptionBytes(); + com.google.protobuf.ByteString getLongDescriptionBytes(); /** + * + * *
      * Holds a list of references associated with this vulnerability item and
      * assessment. These uris have additional information about the
@@ -2288,9 +2526,10 @@ public interface AssessmentOrBuilder extends
      *
      * repeated .grafeas.v1.RelatedUrl related_uris = 4;
      */
-    java.util.List 
-        getRelatedUrisList();
+    java.util.List getRelatedUrisList();
     /**
+     *
+     *
      * 
      * Holds a list of references associated with this vulnerability item and
      * assessment. These uris have additional information about the
@@ -2302,6 +2541,8 @@ public interface AssessmentOrBuilder extends
      */
     io.grafeas.v1.RelatedUrl getRelatedUris(int index);
     /**
+     *
+     *
      * 
      * Holds a list of references associated with this vulnerability item and
      * assessment. These uris have additional information about the
@@ -2313,6 +2554,8 @@ public interface AssessmentOrBuilder extends
      */
     int getRelatedUrisCount();
     /**
+     *
+     *
      * 
      * Holds a list of references associated with this vulnerability item and
      * assessment. These uris have additional information about the
@@ -2322,9 +2565,10 @@ public interface AssessmentOrBuilder extends
      *
      * repeated .grafeas.v1.RelatedUrl related_uris = 4;
      */
-    java.util.List 
-        getRelatedUrisOrBuilderList();
+    java.util.List getRelatedUrisOrBuilderList();
     /**
+     *
+     *
      * 
      * Holds a list of references associated with this vulnerability item and
      * assessment. These uris have additional information about the
@@ -2334,148 +2578,198 @@ public interface AssessmentOrBuilder extends
      *
      * repeated .grafeas.v1.RelatedUrl related_uris = 4;
      */
-    io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(
-        int index);
+    io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(int index);
 
     /**
+     *
+     *
      * 
      * Provides the state of this Vulnerability assessment.
      * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * * @return The enum numeric value on the wire for state. */ int getStateValue(); /** + * + * *
      * Provides the state of this Vulnerability assessment.
      * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * * @return The state. */ io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState(); /** + * + * *
      * Contains information about the impact of this vulnerability,
      * this will change with time.
      * 
* * repeated string impacts = 6; + * * @return A list containing the impacts. */ - java.util.List - getImpactsList(); + java.util.List getImpactsList(); /** + * + * *
      * Contains information about the impact of this vulnerability,
      * this will change with time.
      * 
* * repeated string impacts = 6; + * * @return The count of impacts. */ int getImpactsCount(); /** + * + * *
      * Contains information about the impact of this vulnerability,
      * this will change with time.
      * 
* * repeated string impacts = 6; + * * @param index The index of the element to return. * @return The impacts at the given index. */ java.lang.String getImpacts(int index); /** + * + * *
      * Contains information about the impact of this vulnerability,
      * this will change with time.
      * 
* * repeated string impacts = 6; + * * @param index The index of the value to return. * @return The bytes of the impacts at the given index. */ - com.google.protobuf.ByteString - getImpactsBytes(int index); + com.google.protobuf.ByteString getImpactsBytes(int index); /** + * + * *
      * Justification provides the justification when the state of the
      * assessment if NOT_AFFECTED.
      * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * * @return Whether the justification field is set. */ boolean hasJustification(); /** + * + * *
      * Justification provides the justification when the state of the
      * assessment if NOT_AFFECTED.
      * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * * @return The justification. */ io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification(); /** + * + * *
      * Justification provides the justification when the state of the
      * assessment if NOT_AFFECTED.
      * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * */ - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder getJustificationOrBuilder(); + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder + getJustificationOrBuilder(); /** + * + * *
      * Specifies details on how to handle (and presumably, fix) a vulnerability.
      * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ - java.util.List + java.util.List getRemediationsList(); /** + * + * *
      * Specifies details on how to handle (and presumably, fix) a vulnerability.
      * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index); /** + * + * *
      * Specifies details on how to handle (and presumably, fix) a vulnerability.
      * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ int getRemediationsCount(); /** + * + * *
      * Specifies details on how to handle (and presumably, fix) a vulnerability.
      * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ - java.util.List + java.util.List< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> getRemediationsOrBuilderList(); /** + * + * *
      * Specifies details on how to handle (and presumably, fix) a vulnerability.
      * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder getRemediationsOrBuilder( - int index); + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder + getRemediationsOrBuilder(int index); } /** + * + * *
    * Assessment provides all information that is related to a single
    * vulnerability for this product.
@@ -2483,15 +2777,16 @@ io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder getRem
    *
    * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment}
    */
-  public static final class Assessment extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public static final class Assessment extends com.google.protobuf.GeneratedMessageV3
+      implements
       // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment)
       AssessmentOrBuilder {
-  private static final long serialVersionUID = 0L;
+    private static final long serialVersionUID = 0L;
     // Use Assessment.newBuilder() to construct.
     private Assessment(com.google.protobuf.GeneratedMessageV3.Builder builder) {
       super(builder);
     }
+
     private Assessment() {
       cve_ = "";
       shortDescription_ = "";
@@ -2504,39 +2799,43 @@ private Assessment() {
 
     @java.lang.Override
     @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
+    protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
       return new Assessment();
     }
 
     @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
+    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
       return this.unknownFields;
     }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor;
+
+    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+      return io.grafeas.v1.Vex
+          .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor;
     }
 
     @java.lang.Override
     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable
+      return io.grafeas.v1.Vex
+          .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
-              io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.class, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder.class);
+              io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.class,
+              io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder.class);
     }
 
     /**
+     *
+     *
      * 
      * Provides the state of this Vulnerability assessment.
      * 
* * Protobuf enum {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.State} */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { + public enum State implements com.google.protobuf.ProtocolMessageEnum { /** + * + * *
        * No state is specified.
        * 
@@ -2545,6 +2844,8 @@ public enum State */ STATE_UNSPECIFIED(0), /** + * + * *
        * This product is known to be affected by this vulnerability.
        * 
@@ -2553,6 +2854,8 @@ public enum State */ AFFECTED(1), /** + * + * *
        * This product is known to be not affected by this vulnerability.
        * 
@@ -2561,6 +2864,8 @@ public enum State */ NOT_AFFECTED(2), /** + * + * *
        * This product contains a fix for this vulnerability.
        * 
@@ -2569,6 +2874,8 @@ public enum State */ FIXED(3), /** + * + * *
        * It is not known yet whether these versions are or are not affected
        * by the vulnerability. However, it is still under investigation.
@@ -2581,6 +2888,8 @@ public enum State
       ;
 
       /**
+       *
+       *
        * 
        * No state is specified.
        * 
@@ -2589,6 +2898,8 @@ public enum State */ public static final int STATE_UNSPECIFIED_VALUE = 0; /** + * + * *
        * This product is known to be affected by this vulnerability.
        * 
@@ -2597,6 +2908,8 @@ public enum State */ public static final int AFFECTED_VALUE = 1; /** + * + * *
        * This product is known to be not affected by this vulnerability.
        * 
@@ -2605,6 +2918,8 @@ public enum State */ public static final int NOT_AFFECTED_VALUE = 2; /** + * + * *
        * This product contains a fix for this vulnerability.
        * 
@@ -2613,6 +2928,8 @@ public enum State */ public static final int FIXED_VALUE = 3; /** + * + * *
        * It is not known yet whether these versions are or are not affected
        * by the vulnerability. However, it is still under investigation.
@@ -2622,7 +2939,6 @@ public enum State
        */
       public static final int UNDER_INVESTIGATION_VALUE = 4;
 
-
       public final int getNumber() {
         if (this == UNRECOGNIZED) {
           throw new java.lang.IllegalArgumentException(
@@ -2647,51 +2963,55 @@ public static State valueOf(int value) {
        */
       public static State forNumber(int value) {
         switch (value) {
-          case 0: return STATE_UNSPECIFIED;
-          case 1: return AFFECTED;
-          case 2: return NOT_AFFECTED;
-          case 3: return FIXED;
-          case 4: return UNDER_INVESTIGATION;
-          default: return null;
-        }
-      }
-
-      public static com.google.protobuf.Internal.EnumLiteMap
-          internalGetValueMap() {
+          case 0:
+            return STATE_UNSPECIFIED;
+          case 1:
+            return AFFECTED;
+          case 2:
+            return NOT_AFFECTED;
+          case 3:
+            return FIXED;
+          case 4:
+            return UNDER_INVESTIGATION;
+          default:
+            return null;
+        }
+      }
+
+      public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
         return internalValueMap;
       }
-      private static final com.google.protobuf.Internal.EnumLiteMap<
-          State> internalValueMap =
-            new com.google.protobuf.Internal.EnumLiteMap() {
-              public State findValueByNumber(int number) {
-                return State.forNumber(number);
-              }
-            };
 
-      public final com.google.protobuf.Descriptors.EnumValueDescriptor
-          getValueDescriptor() {
+      private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap() {
+            public State findValueByNumber(int number) {
+              return State.forNumber(number);
+            }
+          };
+
+      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
         if (this == UNRECOGNIZED) {
           throw new java.lang.IllegalStateException(
               "Can't get the descriptor of an unrecognized enum value.");
         }
         return getDescriptor().getValues().get(ordinal());
       }
-      public final com.google.protobuf.Descriptors.EnumDescriptor
-          getDescriptorForType() {
+
+      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
         return getDescriptor();
       }
-      public static final com.google.protobuf.Descriptors.EnumDescriptor
-          getDescriptor() {
-        return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDescriptor().getEnumTypes().get(0);
+
+      public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+        return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDescriptor()
+            .getEnumTypes()
+            .get(0);
       }
 
       private static final State[] VALUES = values();
 
-      public static State valueOf(
-          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+      public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
         if (desc.getType() != getDescriptor()) {
-          throw new java.lang.IllegalArgumentException(
-            "EnumValueDescriptor is not for this type.");
+          throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
         }
         if (desc.getIndex() == -1) {
           return UNRECOGNIZED;
@@ -2708,50 +3028,69 @@ private State(int value) {
       // @@protoc_insertion_point(enum_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.State)
     }
 
-    public interface JustificationOrBuilder extends
+    public interface JustificationOrBuilder
+        extends
         // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification)
         com.google.protobuf.MessageOrBuilder {
 
       /**
+       *
+       *
        * 
        * The justification type for this vulnerability.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * * @return The enum numeric value on the wire for justificationType. */ int getJustificationTypeValue(); /** + * + * *
        * The justification type for this vulnerability.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * * @return The justificationType. */ - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType getJustificationType(); + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + getJustificationType(); /** + * + * *
        * Additional details on why this justification was chosen.
        * 
* * string details = 2; + * * @return The details. */ java.lang.String getDetails(); /** + * + * *
        * Additional details on why this justification was chosen.
        * 
* * string details = 2; + * * @return The bytes for details. */ - com.google.protobuf.ByteString - getDetailsBytes(); + com.google.protobuf.ByteString getDetailsBytes(); } /** + * + * *
      * Justification provides the justification when the state of the
      * assessment if NOT_AFFECTED.
@@ -2759,15 +3098,16 @@ public interface JustificationOrBuilder extends
      *
      * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification}
      */
-    public static final class Justification extends
-        com.google.protobuf.GeneratedMessageV3 implements
+    public static final class Justification extends com.google.protobuf.GeneratedMessageV3
+        implements
         // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification)
         JustificationOrBuilder {
-    private static final long serialVersionUID = 0L;
+      private static final long serialVersionUID = 0L;
       // Use Justification.newBuilder() to construct.
       private Justification(com.google.protobuf.GeneratedMessageV3.Builder builder) {
         super(builder);
       }
+
       private Justification() {
         justificationType_ = 0;
         details_ = "";
@@ -2775,39 +3115,44 @@ private Justification() {
 
       @java.lang.Override
       @SuppressWarnings({"unused"})
-      protected java.lang.Object newInstance(
-          UnusedPrivateParameter unused) {
+      protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
         return new Justification();
       }
 
       @java.lang.Override
-      public final com.google.protobuf.UnknownFieldSet
-      getUnknownFields() {
+      public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
         return this.unknownFields;
       }
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor;
+
+      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+        return io.grafeas.v1.Vex
+            .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor;
       }
 
       @java.lang.Override
       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
           internalGetFieldAccessorTable() {
-        return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable
+        return io.grafeas.v1.Vex
+            .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
-                io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.class, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder.class);
+                io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.class,
+                io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder.class);
       }
 
       /**
+       *
+       *
        * 
        * Provides the type of justification.
        * 
* - * Protobuf enum {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType} + * Protobuf enum {@code + * grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType} */ - public enum JustificationType - implements com.google.protobuf.ProtocolMessageEnum { + public enum JustificationType implements com.google.protobuf.ProtocolMessageEnum { /** + * + * *
          * JUSTIFICATION_TYPE_UNSPECIFIED.
          * 
@@ -2816,6 +3161,8 @@ public enum JustificationType */ JUSTIFICATION_TYPE_UNSPECIFIED(0), /** + * + * *
          * The vulnerable component is not present in the product.
          * 
@@ -2824,6 +3171,8 @@ public enum JustificationType */ COMPONENT_NOT_PRESENT(1), /** + * + * *
          * The vulnerable code is not present. Typically this case
          * occurs when source code is configured or built in a way that excludes
@@ -2834,6 +3183,8 @@ public enum JustificationType
          */
         VULNERABLE_CODE_NOT_PRESENT(2),
         /**
+         *
+         *
          * 
          * The vulnerable code can not be executed.
          * Typically this case occurs when the product includes the vulnerable
@@ -2844,6 +3195,8 @@ public enum JustificationType
          */
         VULNERABLE_CODE_NOT_IN_EXECUTE_PATH(3),
         /**
+         *
+         *
          * 
          * The vulnerable code cannot be controlled by an attacker to exploit
          * the vulnerability.
@@ -2853,6 +3206,8 @@ public enum JustificationType
          */
         VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY(4),
         /**
+         *
+         *
          * 
          * The product includes built-in protections or features that prevent
          * exploitation of the vulnerability. These built-in protections cannot
@@ -2868,6 +3223,8 @@ public enum JustificationType
         ;
 
         /**
+         *
+         *
          * 
          * JUSTIFICATION_TYPE_UNSPECIFIED.
          * 
@@ -2876,6 +3233,8 @@ public enum JustificationType */ public static final int JUSTIFICATION_TYPE_UNSPECIFIED_VALUE = 0; /** + * + * *
          * The vulnerable component is not present in the product.
          * 
@@ -2884,6 +3243,8 @@ public enum JustificationType */ public static final int COMPONENT_NOT_PRESENT_VALUE = 1; /** + * + * *
          * The vulnerable code is not present. Typically this case
          * occurs when source code is configured or built in a way that excludes
@@ -2894,6 +3255,8 @@ public enum JustificationType
          */
         public static final int VULNERABLE_CODE_NOT_PRESENT_VALUE = 2;
         /**
+         *
+         *
          * 
          * The vulnerable code can not be executed.
          * Typically this case occurs when the product includes the vulnerable
@@ -2904,6 +3267,8 @@ public enum JustificationType
          */
         public static final int VULNERABLE_CODE_NOT_IN_EXECUTE_PATH_VALUE = 3;
         /**
+         *
+         *
          * 
          * The vulnerable code cannot be controlled by an attacker to exploit
          * the vulnerability.
@@ -2913,6 +3278,8 @@ public enum JustificationType
          */
         public static final int VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY_VALUE = 4;
         /**
+         *
+         *
          * 
          * The product includes built-in protections or features that prevent
          * exploitation of the vulnerability. These built-in protections cannot
@@ -2925,7 +3292,6 @@ public enum JustificationType
          */
         public static final int INLINE_MITIGATIONS_ALREADY_EXIST_VALUE = 5;
 
-
         public final int getNumber() {
           if (this == UNRECOGNIZED) {
             throw new java.lang.IllegalArgumentException(
@@ -2950,13 +3316,20 @@ public static JustificationType valueOf(int value) {
          */
         public static JustificationType forNumber(int value) {
           switch (value) {
-            case 0: return JUSTIFICATION_TYPE_UNSPECIFIED;
-            case 1: return COMPONENT_NOT_PRESENT;
-            case 2: return VULNERABLE_CODE_NOT_PRESENT;
-            case 3: return VULNERABLE_CODE_NOT_IN_EXECUTE_PATH;
-            case 4: return VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY;
-            case 5: return INLINE_MITIGATIONS_ALREADY_EXIST;
-            default: return null;
+            case 0:
+              return JUSTIFICATION_TYPE_UNSPECIFIED;
+            case 1:
+              return COMPONENT_NOT_PRESENT;
+            case 2:
+              return VULNERABLE_CODE_NOT_PRESENT;
+            case 3:
+              return VULNERABLE_CODE_NOT_IN_EXECUTE_PATH;
+            case 4:
+              return VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY;
+            case 5:
+              return INLINE_MITIGATIONS_ALREADY_EXIST;
+            default:
+              return null;
           }
         }
 
@@ -2964,29 +3337,31 @@ public static JustificationType forNumber(int value) {
             internalGetValueMap() {
           return internalValueMap;
         }
-        private static final com.google.protobuf.Internal.EnumLiteMap<
-            JustificationType> internalValueMap =
-              new com.google.protobuf.Internal.EnumLiteMap() {
-                public JustificationType findValueByNumber(int number) {
-                  return JustificationType.forNumber(number);
-                }
-              };
 
-        public final com.google.protobuf.Descriptors.EnumValueDescriptor
-            getValueDescriptor() {
+        private static final com.google.protobuf.Internal.EnumLiteMap
+            internalValueMap =
+                new com.google.protobuf.Internal.EnumLiteMap() {
+                  public JustificationType findValueByNumber(int number) {
+                    return JustificationType.forNumber(number);
+                  }
+                };
+
+        public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
           if (this == UNRECOGNIZED) {
             throw new java.lang.IllegalStateException(
                 "Can't get the descriptor of an unrecognized enum value.");
           }
           return getDescriptor().getValues().get(ordinal());
         }
-        public final com.google.protobuf.Descriptors.EnumDescriptor
-            getDescriptorForType() {
+
+        public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
           return getDescriptor();
         }
-        public static final com.google.protobuf.Descriptors.EnumDescriptor
-            getDescriptor() {
-          return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDescriptor().getEnumTypes().get(0);
+
+        public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+          return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDescriptor()
+              .getEnumTypes()
+              .get(0);
         }
 
         private static final JustificationType[] VALUES = values();
@@ -2995,7 +3370,7 @@ public static JustificationType valueOf(
             com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
           if (desc.getType() != getDescriptor()) {
             throw new java.lang.IllegalArgumentException(
-              "EnumValueDescriptor is not for this type.");
+                "EnumValueDescriptor is not for this type.");
           }
           if (desc.getIndex() == -1) {
             return UNRECOGNIZED;
@@ -3015,38 +3390,61 @@ private JustificationType(int value) {
       public static final int JUSTIFICATION_TYPE_FIELD_NUMBER = 1;
       private int justificationType_ = 0;
       /**
+       *
+       *
        * 
        * The justification type for this vulnerability.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * * @return The enum numeric value on the wire for justificationType. */ - @java.lang.Override public int getJustificationTypeValue() { + @java.lang.Override + public int getJustificationTypeValue() { return justificationType_; } /** + * + * *
        * The justification type for this vulnerability.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * * @return The justificationType. */ - @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType getJustificationType() { - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType.forNumber(justificationType_); - return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType.UNRECOGNIZED : result; + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + getJustificationType() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + .forNumber(justificationType_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + .UNRECOGNIZED + : result; } public static final int DETAILS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private volatile java.lang.Object details_ = ""; /** + * + * *
        * Additional details on why this justification was chosen.
        * 
* * string details = 2; + * * @return The details. */ @java.lang.Override @@ -3055,29 +3453,29 @@ public java.lang.String getDetails() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); details_ = s; return s; } } /** + * + * *
        * Additional details on why this justification was chosen.
        * 
* * string details = 2; + * * @return The bytes for details. */ @java.lang.Override - public com.google.protobuf.ByteString - getDetailsBytes() { + public com.google.protobuf.ByteString getDetailsBytes() { java.lang.Object ref = details_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); details_ = b; return b; } else { @@ -3086,6 +3484,7 @@ public java.lang.String getDetails() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -3097,9 +3496,11 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (justificationType_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType.JUSTIFICATION_TYPE_UNSPECIFIED.getNumber()) { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (justificationType_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + .JUSTIFICATION_TYPE_UNSPECIFIED + .getNumber()) { output.writeEnum(1, justificationType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { @@ -3114,9 +3515,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (justificationType_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType.JUSTIFICATION_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, justificationType_); + if (justificationType_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + .JUSTIFICATION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, justificationType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, details_); @@ -3129,16 +3532,16 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification)) { return super.equals(obj); } - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification other = (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) obj; + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification other = + (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) obj; if (justificationType_ != other.justificationType_) return false; - if (!getDetails() - .equals(other.getDetails())) return false; + if (!getDetails().equals(other.getDetails())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3160,87 +3563,96 @@ public int hashCode() { } public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification prototype) { + + public static Builder newBuilder( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override @@ -3250,6 +3662,8 @@ protected Builder newBuilderForType( return builder; } /** + * + * *
        * Justification provides the justification when the state of the
        * assessment if NOT_AFFECTED.
@@ -3257,33 +3671,34 @@ protected Builder newBuilderForType(
        *
        * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification}
        */
-      public static final class Builder extends
-          com.google.protobuf.GeneratedMessageV3.Builder implements
+      public static final class Builder
+          extends com.google.protobuf.GeneratedMessageV3.Builder
+          implements
           // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification)
           io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder {
-        public static final com.google.protobuf.Descriptors.Descriptor
-            getDescriptor() {
-          return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor;
+        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+          return io.grafeas.v1.Vex
+              .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor;
         }
 
         @java.lang.Override
         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
             internalGetFieldAccessorTable() {
-          return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable
+          return io.grafeas.v1.Vex
+              .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
-                  io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.class, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder.class);
+                  io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.class,
+                  io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder.class);
         }
 
-        // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.newBuilder()
-        private Builder() {
-
-        }
+        // Construct using
+        // io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.newBuilder()
+        private Builder() {}
 
-        private Builder(
-            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
           super(parent);
-
         }
+
         @java.lang.Override
         public Builder clear() {
           super.clear();
@@ -3294,19 +3709,22 @@ public Builder clear() {
         }
 
         @java.lang.Override
-        public com.google.protobuf.Descriptors.Descriptor
-            getDescriptorForType() {
-          return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor;
+        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+          return io.grafeas.v1.Vex
+              .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor;
         }
 
         @java.lang.Override
-        public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getDefaultInstanceForType() {
-          return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance();
+        public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification
+            getDefaultInstanceForType() {
+          return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification
+              .getDefaultInstance();
         }
 
         @java.lang.Override
         public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification build() {
-          io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification result = buildPartial();
+          io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification result =
+              buildPartial();
           if (!result.isInitialized()) {
             throw newUninitializedMessageException(result);
           }
@@ -3315,13 +3733,17 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification build(
 
         @java.lang.Override
         public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification buildPartial() {
-          io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification result = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification(this);
-          if (bitField0_ != 0) { buildPartial0(result); }
+          io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification result =
+              new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification(this);
+          if (bitField0_ != 0) {
+            buildPartial0(result);
+          }
           onBuilt();
           return result;
         }
 
-        private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification result) {
+        private void buildPartial0(
+            io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification result) {
           int from_bitField0_ = bitField0_;
           if (((from_bitField0_ & 0x00000001) != 0)) {
             result.justificationType_ = justificationType_;
@@ -3335,46 +3757,53 @@ private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.
         public Builder clone() {
           return super.clone();
         }
+
         @java.lang.Override
         public Builder setField(
-            com.google.protobuf.Descriptors.FieldDescriptor field,
-            java.lang.Object value) {
+            com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
           return super.setField(field, value);
         }
+
         @java.lang.Override
-        public Builder clearField(
-            com.google.protobuf.Descriptors.FieldDescriptor field) {
+        public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
           return super.clearField(field);
         }
+
         @java.lang.Override
-        public Builder clearOneof(
-            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
           return super.clearOneof(oneof);
         }
+
         @java.lang.Override
         public Builder setRepeatedField(
             com.google.protobuf.Descriptors.FieldDescriptor field,
-            int index, java.lang.Object value) {
+            int index,
+            java.lang.Object value) {
           return super.setRepeatedField(field, index, value);
         }
+
         @java.lang.Override
         public Builder addRepeatedField(
-            com.google.protobuf.Descriptors.FieldDescriptor field,
-            java.lang.Object value) {
+            com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
           return super.addRepeatedField(field, value);
         }
+
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) {
-            return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification)other);
+            return mergeFrom(
+                (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) other);
           } else {
             super.mergeFrom(other);
             return this;
           }
         }
 
-        public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification other) {
-          if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance()) return this;
+        public Builder mergeFrom(
+            io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification other) {
+          if (other
+              == io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification
+                  .getDefaultInstance()) return this;
           if (other.justificationType_ != 0) {
             setJustificationTypeValue(other.getJustificationTypeValue());
           }
@@ -3409,22 +3838,25 @@ public Builder mergeFrom(
                 case 0:
                   done = true;
                   break;
-                case 8: {
-                  justificationType_ = input.readEnum();
-                  bitField0_ |= 0x00000001;
-                  break;
-                } // case 8
-                case 18: {
-                  details_ = input.readStringRequireUtf8();
-                  bitField0_ |= 0x00000002;
-                  break;
-                } // case 18
-                default: {
-                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                    done = true; // was an endgroup tag
-                  }
-                  break;
-                } // default:
+                case 8:
+                  {
+                    justificationType_ = input.readEnum();
+                    bitField0_ |= 0x00000001;
+                    break;
+                  } // case 8
+                case 18:
+                  {
+                    details_ = input.readStringRequireUtf8();
+                    bitField0_ |= 0x00000002;
+                    break;
+                  } // case 18
+                default:
+                  {
+                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                      done = true; // was an endgroup tag
+                    }
+                    break;
+                  } // default:
               } // switch (tag)
             } // while (!done)
           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -3434,26 +3866,38 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
+
         private int bitField0_;
 
         private int justificationType_ = 0;
         /**
+         *
+         *
          * 
          * The justification type for this vulnerability.
          * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * * @return The enum numeric value on the wire for justificationType. */ - @java.lang.Override public int getJustificationTypeValue() { + @java.lang.Override + public int getJustificationTypeValue() { return justificationType_; } /** + * + * *
          * The justification type for this vulnerability.
          * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * * @param value The enum numeric value on the wire for justificationType to set. * @return This builder for chaining. */ @@ -3464,28 +3908,47 @@ public Builder setJustificationTypeValue(int value) { return this; } /** + * + * *
          * The justification type for this vulnerability.
          * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * * @return The justificationType. */ @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType getJustificationType() { - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType.forNumber(justificationType_); - return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType.UNRECOGNIZED : result; + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + getJustificationType() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .JustificationType.forNumber(justificationType_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + .UNRECOGNIZED + : result; } /** + * + * *
          * The justification type for this vulnerability.
          * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * * @param value The justificationType to set. * @return This builder for chaining. */ - public Builder setJustificationType(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType value) { + public Builder setJustificationType( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + value) { if (value == null) { throw new NullPointerException(); } @@ -3495,11 +3958,16 @@ public Builder setJustificationType(io.grafeas.v1.VulnerabilityAssessmentNote.As return this; } /** + * + * *
          * The justification type for this vulnerability.
          * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * * @return This builder for chaining. */ public Builder clearJustificationType() { @@ -3511,18 +3979,20 @@ public Builder clearJustificationType() { private java.lang.Object details_ = ""; /** + * + * *
          * Additional details on why this justification was chosen.
          * 
* * string details = 2; + * * @return The details. */ public java.lang.String getDetails() { java.lang.Object ref = details_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); details_ = s; return s; @@ -3531,20 +4001,21 @@ public java.lang.String getDetails() { } } /** + * + * *
          * Additional details on why this justification was chosen.
          * 
* * string details = 2; + * * @return The bytes for details. */ - public com.google.protobuf.ByteString - getDetailsBytes() { + public com.google.protobuf.ByteString getDetailsBytes() { java.lang.Object ref = details_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); details_ = b; return b; } else { @@ -3552,28 +4023,35 @@ public java.lang.String getDetails() { } } /** + * + * *
          * Additional details on why this justification was chosen.
          * 
* * string details = 2; + * * @param value The details to set. * @return This builder for chaining. */ - public Builder setDetails( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setDetails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } details_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** + * + * *
          * Additional details on why this justification was chosen.
          * 
* * string details = 2; + * * @return This builder for chaining. */ public Builder clearDetails() { @@ -3583,23 +4061,28 @@ public Builder clearDetails() { return this; } /** + * + * *
          * Additional details on why this justification was chosen.
          * 
* * string details = 2; + * * @param value The bytes for details to set. * @return This builder for chaining. */ - public Builder setDetailsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder setDetailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); details_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -3612,41 +4095,44 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) } // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) - private static final io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification DEFAULT_INSTANCE; + private static final io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification(); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getDefaultInstance() { + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Justification parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Justification parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -3658,74 +4144,99 @@ public com.google.protobuf.Parser getParserForType() { } @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getDefaultInstanceForType() { + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - public interface RemediationOrBuilder extends + public interface RemediationOrBuilder + extends // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) com.google.protobuf.MessageOrBuilder { /** + * + * *
        * The type of remediation that can be applied.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * * @return The enum numeric value on the wire for remediationType. */ int getRemediationTypeValue(); /** + * + * *
        * The type of remediation that can be applied.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * * @return The remediationType. */ - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType getRemediationType(); + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + getRemediationType(); /** + * + * *
        * Contains a comprehensive human-readable discussion of the remediation.
        * 
* * string details = 2; + * * @return The details. */ java.lang.String getDetails(); /** + * + * *
        * Contains a comprehensive human-readable discussion of the remediation.
        * 
* * string details = 2; + * * @return The bytes for details. */ - com.google.protobuf.ByteString - getDetailsBytes(); + com.google.protobuf.ByteString getDetailsBytes(); /** + * + * *
        * Contains the URL where to obtain the remediation.
        * 
* * .grafeas.v1.RelatedUrl remediation_uri = 3; + * * @return Whether the remediationUri field is set. */ boolean hasRemediationUri(); /** + * + * *
        * Contains the URL where to obtain the remediation.
        * 
* * .grafeas.v1.RelatedUrl remediation_uri = 3; + * * @return The remediationUri. */ io.grafeas.v1.RelatedUrl getRemediationUri(); /** + * + * *
        * Contains the URL where to obtain the remediation.
        * 
@@ -3735,21 +4246,24 @@ public interface RemediationOrBuilder extends io.grafeas.v1.RelatedUrlOrBuilder getRemediationUriOrBuilder(); } /** + * + * *
      * Specifies details on how to handle (and presumably, fix) a vulnerability.
      * 
* * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation} */ - public static final class Remediation extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class Remediation extends com.google.protobuf.GeneratedMessageV3 + implements // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) RemediationOrBuilder { - private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use Remediation.newBuilder() to construct. private Remediation(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } + private Remediation() { remediationType_ = 0; details_ = ""; @@ -3757,39 +4271,44 @@ private Remediation() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Remediation(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.class, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder.class); + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.class, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder.class); } /** + * + * *
        * The type of remediation that can be applied.
        * 
* - * Protobuf enum {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType} + * Protobuf enum {@code + * grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType} */ - public enum RemediationType - implements com.google.protobuf.ProtocolMessageEnum { + public enum RemediationType implements com.google.protobuf.ProtocolMessageEnum { /** + * + * *
          * No remediation type specified.
          * 
@@ -3798,6 +4317,8 @@ public enum RemediationType */ REMEDIATION_TYPE_UNSPECIFIED(0), /** + * + * *
          * A MITIGATION is available.
          * 
@@ -3806,6 +4327,8 @@ public enum RemediationType */ MITIGATION(1), /** + * + * *
          * No fix is planned.
          * 
@@ -3814,6 +4337,8 @@ public enum RemediationType */ NO_FIX_PLANNED(2), /** + * + * *
          * Not available.
          * 
@@ -3822,6 +4347,8 @@ public enum RemediationType */ NONE_AVAILABLE(3), /** + * + * *
          * A vendor fix is available.
          * 
@@ -3830,6 +4357,8 @@ public enum RemediationType */ VENDOR_FIX(4), /** + * + * *
          * A workaround is available.
          * 
@@ -3841,6 +4370,8 @@ public enum RemediationType ; /** + * + * *
          * No remediation type specified.
          * 
@@ -3849,6 +4380,8 @@ public enum RemediationType */ public static final int REMEDIATION_TYPE_UNSPECIFIED_VALUE = 0; /** + * + * *
          * A MITIGATION is available.
          * 
@@ -3857,6 +4390,8 @@ public enum RemediationType */ public static final int MITIGATION_VALUE = 1; /** + * + * *
          * No fix is planned.
          * 
@@ -3865,6 +4400,8 @@ public enum RemediationType */ public static final int NO_FIX_PLANNED_VALUE = 2; /** + * + * *
          * Not available.
          * 
@@ -3873,6 +4410,8 @@ public enum RemediationType */ public static final int NONE_AVAILABLE_VALUE = 3; /** + * + * *
          * A vendor fix is available.
          * 
@@ -3881,6 +4420,8 @@ public enum RemediationType */ public static final int VENDOR_FIX_VALUE = 4; /** + * + * *
          * A workaround is available.
          * 
@@ -3889,7 +4430,6 @@ public enum RemediationType */ public static final int WORKAROUND_VALUE = 5; - public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -3914,13 +4454,20 @@ public static RemediationType valueOf(int value) { */ public static RemediationType forNumber(int value) { switch (value) { - case 0: return REMEDIATION_TYPE_UNSPECIFIED; - case 1: return MITIGATION; - case 2: return NO_FIX_PLANNED; - case 3: return NONE_AVAILABLE; - case 4: return VENDOR_FIX; - case 5: return WORKAROUND; - default: return null; + case 0: + return REMEDIATION_TYPE_UNSPECIFIED; + case 1: + return MITIGATION; + case 2: + return NO_FIX_PLANNED; + case 3: + return NONE_AVAILABLE; + case 4: + return VENDOR_FIX; + case 5: + return WORKAROUND; + default: + return null; } } @@ -3928,29 +4475,31 @@ public static RemediationType forNumber(int value) { internalGetValueMap() { return internalValueMap; } - private static final com.google.protobuf.Internal.EnumLiteMap< - RemediationType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public RemediationType findValueByNumber(int number) { - return RemediationType.forNumber(number); - } - }; - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RemediationType findValueByNumber(int number) { + return RemediationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDescriptor().getEnumTypes().get(0); + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDescriptor() + .getEnumTypes() + .get(0); } private static final RemediationType[] VALUES = values(); @@ -3959,7 +4508,7 @@ public static RemediationType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); + "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; @@ -3979,38 +4528,60 @@ private RemediationType(int value) { public static final int REMEDIATION_TYPE_FIELD_NUMBER = 1; private int remediationType_ = 0; /** + * + * *
        * The type of remediation that can be applied.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * * @return The enum numeric value on the wire for remediationType. */ - @java.lang.Override public int getRemediationTypeValue() { + @java.lang.Override + public int getRemediationTypeValue() { return remediationType_; } /** + * + * *
        * The type of remediation that can be applied.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * * @return The remediationType. */ - @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType getRemediationType() { - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType.forNumber(remediationType_); - return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType.UNRECOGNIZED : result; + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + getRemediationType() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + .forNumber(remediationType_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + .UNRECOGNIZED + : result; } public static final int DETAILS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private volatile java.lang.Object details_ = ""; /** + * + * *
        * Contains a comprehensive human-readable discussion of the remediation.
        * 
* * string details = 2; + * * @return The details. */ @java.lang.Override @@ -4019,29 +4590,29 @@ public java.lang.String getDetails() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); details_ = s; return s; } } /** + * + * *
        * Contains a comprehensive human-readable discussion of the remediation.
        * 
* * string details = 2; + * * @return The bytes for details. */ @java.lang.Override - public com.google.protobuf.ByteString - getDetailsBytes() { + public com.google.protobuf.ByteString getDetailsBytes() { java.lang.Object ref = details_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); details_ = b; return b; } else { @@ -4052,11 +4623,14 @@ public java.lang.String getDetails() { public static final int REMEDIATION_URI_FIELD_NUMBER = 3; private io.grafeas.v1.RelatedUrl remediationUri_; /** + * + * *
        * Contains the URL where to obtain the remediation.
        * 
* * .grafeas.v1.RelatedUrl remediation_uri = 3; + * * @return Whether the remediationUri field is set. */ @java.lang.Override @@ -4064,18 +4638,25 @@ public boolean hasRemediationUri() { return remediationUri_ != null; } /** + * + * *
        * Contains the URL where to obtain the remediation.
        * 
* * .grafeas.v1.RelatedUrl remediation_uri = 3; + * * @return The remediationUri. */ @java.lang.Override public io.grafeas.v1.RelatedUrl getRemediationUri() { - return remediationUri_ == null ? io.grafeas.v1.RelatedUrl.getDefaultInstance() : remediationUri_; + return remediationUri_ == null + ? io.grafeas.v1.RelatedUrl.getDefaultInstance() + : remediationUri_; } /** + * + * *
        * Contains the URL where to obtain the remediation.
        * 
@@ -4084,10 +4665,13 @@ public io.grafeas.v1.RelatedUrl getRemediationUri() { */ @java.lang.Override public io.grafeas.v1.RelatedUrlOrBuilder getRemediationUriOrBuilder() { - return remediationUri_ == null ? io.grafeas.v1.RelatedUrl.getDefaultInstance() : remediationUri_; + return remediationUri_ == null + ? io.grafeas.v1.RelatedUrl.getDefaultInstance() + : remediationUri_; } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -4099,9 +4683,11 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (remediationType_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType.REMEDIATION_TYPE_UNSPECIFIED.getNumber()) { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (remediationType_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + .REMEDIATION_TYPE_UNSPECIFIED + .getNumber()) { output.writeEnum(1, remediationType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { @@ -4119,16 +4705,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (remediationType_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType.REMEDIATION_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, remediationType_); + if (remediationType_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + .REMEDIATION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, remediationType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, details_); } if (remediationUri_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getRemediationUri()); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRemediationUri()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -4138,20 +4725,19 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation)) { return super.equals(obj); } - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation other = (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) obj; + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation other = + (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) obj; if (remediationType_ != other.remediationType_) return false; - if (!getDetails() - .equals(other.getDetails())) return false; + if (!getDetails().equals(other.getDetails())) return false; if (hasRemediationUri() != other.hasRemediationUri()) return false; if (hasRemediationUri()) { - if (!getRemediationUri() - .equals(other.getRemediationUri())) return false; + if (!getRemediationUri().equals(other.getRemediationUri())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -4178,87 +4764,96 @@ public int hashCode() { } public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation prototype) { + + public static Builder newBuilder( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override @@ -4268,39 +4863,42 @@ protected Builder newBuilderForType( return builder; } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.class, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder.class); + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.class, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder.class); } - // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.newBuilder() - private Builder() { - - } + // Construct using + // io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.newBuilder() + private Builder() {} - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - } + @java.lang.Override public Builder clear() { super.clear(); @@ -4316,14 +4914,16 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; } @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getDefaultInstanceForType() { - return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDefaultInstance(); + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + .getDefaultInstance(); } @java.lang.Override @@ -4337,13 +4937,17 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation build() @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation buildPartial() { - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation result = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation(this); - if (bitField0_ != 0) { buildPartial0(result); } + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation result = + new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation result) { + private void buildPartial0( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.remediationType_ = remediationType_; @@ -4352,9 +4956,8 @@ private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment. result.details_ = details_; } if (((from_bitField0_ & 0x00000004) != 0)) { - result.remediationUri_ = remediationUriBuilder_ == null - ? remediationUri_ - : remediationUriBuilder_.build(); + result.remediationUri_ = + remediationUriBuilder_ == null ? remediationUri_ : remediationUriBuilder_.build(); } } @@ -4362,46 +4965,53 @@ private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment. public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + int index, + java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) { - return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation)other); + return mergeFrom( + (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation other) { - if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDefaultInstance()) return this; + public Builder mergeFrom( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation other) { + if (other + == io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + .getDefaultInstance()) return this; if (other.remediationType_ != 0) { setRemediationTypeValue(other.getRemediationTypeValue()); } @@ -4439,29 +5049,32 @@ public Builder mergeFrom( case 0: done = true; break; - case 8: { - remediationType_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: { - details_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getRemediationUriFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 8: + { + remediationType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + details_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getRemediationUriFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -4471,26 +5084,38 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private int remediationType_ = 0; /** + * + * *
          * The type of remediation that can be applied.
          * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * * @return The enum numeric value on the wire for remediationType. */ - @java.lang.Override public int getRemediationTypeValue() { + @java.lang.Override + public int getRemediationTypeValue() { return remediationType_; } /** + * + * *
          * The type of remediation that can be applied.
          * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * * @param value The enum numeric value on the wire for remediationType to set. * @return This builder for chaining. */ @@ -4501,28 +5126,46 @@ public Builder setRemediationTypeValue(int value) { return this; } /** + * + * *
          * The type of remediation that can be applied.
          * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * * @return The remediationType. */ @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType getRemediationType() { - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType.forNumber(remediationType_); - return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType.UNRECOGNIZED : result; + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + getRemediationType() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + .forNumber(remediationType_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + .UNRECOGNIZED + : result; } /** + * + * *
          * The type of remediation that can be applied.
          * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * * @param value The remediationType to set. * @return This builder for chaining. */ - public Builder setRemediationType(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType value) { + public Builder setRemediationType( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + value) { if (value == null) { throw new NullPointerException(); } @@ -4532,11 +5175,16 @@ public Builder setRemediationType(io.grafeas.v1.VulnerabilityAssessmentNote.Asse return this; } /** + * + * *
          * The type of remediation that can be applied.
          * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * * @return This builder for chaining. */ public Builder clearRemediationType() { @@ -4548,18 +5196,20 @@ public Builder clearRemediationType() { private java.lang.Object details_ = ""; /** + * + * *
          * Contains a comprehensive human-readable discussion of the remediation.
          * 
* * string details = 2; + * * @return The details. */ public java.lang.String getDetails() { java.lang.Object ref = details_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); details_ = s; return s; @@ -4568,20 +5218,21 @@ public java.lang.String getDetails() { } } /** + * + * *
          * Contains a comprehensive human-readable discussion of the remediation.
          * 
* * string details = 2; + * * @return The bytes for details. */ - public com.google.protobuf.ByteString - getDetailsBytes() { + public com.google.protobuf.ByteString getDetailsBytes() { java.lang.Object ref = details_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); details_ = b; return b; } else { @@ -4589,28 +5240,35 @@ public java.lang.String getDetails() { } } /** + * + * *
          * Contains a comprehensive human-readable discussion of the remediation.
          * 
* * string details = 2; + * * @param value The details to set. * @return This builder for chaining. */ - public Builder setDetails( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setDetails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } details_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** + * + * *
          * Contains a comprehensive human-readable discussion of the remediation.
          * 
* * string details = 2; + * * @return This builder for chaining. */ public Builder clearDetails() { @@ -4620,17 +5278,21 @@ public Builder clearDetails() { return this; } /** + * + * *
          * Contains a comprehensive human-readable discussion of the remediation.
          * 
* * string details = 2; + * * @param value The bytes for details to set. * @return This builder for chaining. */ - public Builder setDetailsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder setDetailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); details_ = value; bitField0_ |= 0x00000002; @@ -4640,34 +5302,47 @@ public Builder setDetailsBytes( private io.grafeas.v1.RelatedUrl remediationUri_; private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> remediationUriBuilder_; + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder> + remediationUriBuilder_; /** + * + * *
          * Contains the URL where to obtain the remediation.
          * 
* * .grafeas.v1.RelatedUrl remediation_uri = 3; + * * @return Whether the remediationUri field is set. */ public boolean hasRemediationUri() { return ((bitField0_ & 0x00000004) != 0); } /** + * + * *
          * Contains the URL where to obtain the remediation.
          * 
* * .grafeas.v1.RelatedUrl remediation_uri = 3; + * * @return The remediationUri. */ public io.grafeas.v1.RelatedUrl getRemediationUri() { if (remediationUriBuilder_ == null) { - return remediationUri_ == null ? io.grafeas.v1.RelatedUrl.getDefaultInstance() : remediationUri_; + return remediationUri_ == null + ? io.grafeas.v1.RelatedUrl.getDefaultInstance() + : remediationUri_; } else { return remediationUriBuilder_.getMessage(); } } /** + * + * *
          * Contains the URL where to obtain the remediation.
          * 
@@ -4688,14 +5363,15 @@ public Builder setRemediationUri(io.grafeas.v1.RelatedUrl value) { return this; } /** + * + * *
          * Contains the URL where to obtain the remediation.
          * 
* * .grafeas.v1.RelatedUrl remediation_uri = 3; */ - public Builder setRemediationUri( - io.grafeas.v1.RelatedUrl.Builder builderForValue) { + public Builder setRemediationUri(io.grafeas.v1.RelatedUrl.Builder builderForValue) { if (remediationUriBuilder_ == null) { remediationUri_ = builderForValue.build(); } else { @@ -4706,6 +5382,8 @@ public Builder setRemediationUri( return this; } /** + * + * *
          * Contains the URL where to obtain the remediation.
          * 
@@ -4714,9 +5392,9 @@ public Builder setRemediationUri( */ public Builder mergeRemediationUri(io.grafeas.v1.RelatedUrl value) { if (remediationUriBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - remediationUri_ != null && - remediationUri_ != io.grafeas.v1.RelatedUrl.getDefaultInstance()) { + if (((bitField0_ & 0x00000004) != 0) + && remediationUri_ != null + && remediationUri_ != io.grafeas.v1.RelatedUrl.getDefaultInstance()) { getRemediationUriBuilder().mergeFrom(value); } else { remediationUri_ = value; @@ -4729,6 +5407,8 @@ public Builder mergeRemediationUri(io.grafeas.v1.RelatedUrl value) { return this; } /** + * + * *
          * Contains the URL where to obtain the remediation.
          * 
@@ -4746,6 +5426,8 @@ public Builder clearRemediationUri() { return this; } /** + * + * *
          * Contains the URL where to obtain the remediation.
          * 
@@ -4758,6 +5440,8 @@ public io.grafeas.v1.RelatedUrl.Builder getRemediationUriBuilder() { return getRemediationUriFieldBuilder().getBuilder(); } /** + * + * *
          * Contains the URL where to obtain the remediation.
          * 
@@ -4768,11 +5452,14 @@ public io.grafeas.v1.RelatedUrlOrBuilder getRemediationUriOrBuilder() { if (remediationUriBuilder_ != null) { return remediationUriBuilder_.getMessageOrBuilder(); } else { - return remediationUri_ == null ? - io.grafeas.v1.RelatedUrl.getDefaultInstance() : remediationUri_; + return remediationUri_ == null + ? io.grafeas.v1.RelatedUrl.getDefaultInstance() + : remediationUri_; } } /** + * + * *
          * Contains the URL where to obtain the remediation.
          * 
@@ -4780,18 +5467,22 @@ public io.grafeas.v1.RelatedUrlOrBuilder getRemediationUriOrBuilder() { * .grafeas.v1.RelatedUrl remediation_uri = 3; */ private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder> getRemediationUriFieldBuilder() { if (remediationUriBuilder_ == null) { - remediationUriBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder>( - getRemediationUri(), - getParentForChildren(), - isClean()); + remediationUriBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder>( + getRemediationUri(), getParentForChildren(), isClean()); remediationUri_ = null; } return remediationUriBuilder_; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -4804,41 +5495,44 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) } // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) - private static final io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation DEFAULT_INSTANCE; + private static final io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation(); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getDefaultInstance() { + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Remediation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Remediation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -4850,22 +5544,26 @@ public com.google.protobuf.Parser getParserForType() { } @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getDefaultInstanceForType() { + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } public static final int CVE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private volatile java.lang.Object cve_ = ""; /** + * + * *
      * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
      * tracking number for the vulnerability.
      * 
* * string cve = 1; + * * @return The cve. */ @java.lang.Override @@ -4874,30 +5572,30 @@ public java.lang.String getCve() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); cve_ = s; return s; } } /** + * + * *
      * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
      * tracking number for the vulnerability.
      * 
* * string cve = 1; + * * @return The bytes for cve. */ @java.lang.Override - public com.google.protobuf.ByteString - getCveBytes() { + public com.google.protobuf.ByteString getCveBytes() { java.lang.Object ref = cve_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); cve_ = b; return b; } else { @@ -4906,14 +5604,18 @@ public java.lang.String getCve() { } public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private volatile java.lang.Object shortDescription_ = ""; /** + * + * *
      * A one sentence description of this Vex.
      * 
* * string short_description = 2; + * * @return The shortDescription. */ @java.lang.Override @@ -4922,29 +5624,29 @@ public java.lang.String getShortDescription() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); shortDescription_ = s; return s; } } /** + * + * *
      * A one sentence description of this Vex.
      * 
* * string short_description = 2; + * * @return The bytes for shortDescription. */ @java.lang.Override - public com.google.protobuf.ByteString - getShortDescriptionBytes() { + public com.google.protobuf.ByteString getShortDescriptionBytes() { java.lang.Object ref = shortDescription_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); shortDescription_ = b; return b; } else { @@ -4953,14 +5655,18 @@ public java.lang.String getShortDescription() { } public static final int LONG_DESCRIPTION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private volatile java.lang.Object longDescription_ = ""; /** + * + * *
      * A detailed description of this Vex.
      * 
* * string long_description = 3; + * * @return The longDescription. */ @java.lang.Override @@ -4969,29 +5675,29 @@ public java.lang.String getLongDescription() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); longDescription_ = s; return s; } } /** + * + * *
      * A detailed description of this Vex.
      * 
* * string long_description = 3; + * * @return The bytes for longDescription. */ @java.lang.Override - public com.google.protobuf.ByteString - getLongDescriptionBytes() { + public com.google.protobuf.ByteString getLongDescriptionBytes() { java.lang.Object ref = longDescription_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); longDescription_ = b; return b; } else { @@ -5000,9 +5706,12 @@ public java.lang.String getLongDescription() { } public static final int RELATED_URIS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List relatedUris_; /** + * + * *
      * Holds a list of references associated with this vulnerability item and
      * assessment. These uris have additional information about the
@@ -5017,6 +5726,8 @@ public java.util.List getRelatedUrisList() {
       return relatedUris_;
     }
     /**
+     *
+     *
      * 
      * Holds a list of references associated with this vulnerability item and
      * assessment. These uris have additional information about the
@@ -5027,11 +5738,13 @@ public java.util.List getRelatedUrisList() {
      * repeated .grafeas.v1.RelatedUrl related_uris = 4;
      */
     @java.lang.Override
-    public java.util.List 
+    public java.util.List
         getRelatedUrisOrBuilderList() {
       return relatedUris_;
     }
     /**
+     *
+     *
      * 
      * Holds a list of references associated with this vulnerability item and
      * assessment. These uris have additional information about the
@@ -5046,6 +5759,8 @@ public int getRelatedUrisCount() {
       return relatedUris_.size();
     }
     /**
+     *
+     *
      * 
      * Holds a list of references associated with this vulnerability item and
      * assessment. These uris have additional information about the
@@ -5060,6 +5775,8 @@ public io.grafeas.v1.RelatedUrl getRelatedUris(int index) {
       return relatedUris_.get(index);
     }
     /**
+     *
+     *
      * 
      * Holds a list of references associated with this vulnerability item and
      * assessment. These uris have additional information about the
@@ -5070,72 +5787,91 @@ public io.grafeas.v1.RelatedUrl getRelatedUris(int index) {
      * repeated .grafeas.v1.RelatedUrl related_uris = 4;
      */
     @java.lang.Override
-    public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(
-        int index) {
+    public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(int index) {
       return relatedUris_.get(index);
     }
 
     public static final int STATE_FIELD_NUMBER = 5;
     private int state_ = 0;
     /**
+     *
+     *
      * 
      * Provides the state of this Vulnerability assessment.
      * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * * @return The enum numeric value on the wire for state. */ - @java.lang.Override public int getStateValue() { + @java.lang.Override + public int getStateValue() { return state_; } /** + * + * *
      * Provides the state of this Vulnerability assessment.
      * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * * @return The state. */ - @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() { - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); - return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED : result; + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED + : result; } public static final int IMPACTS_FIELD_NUMBER = 6; + @SuppressWarnings("serial") private com.google.protobuf.LazyStringList impacts_; /** + * + * *
      * Contains information about the impact of this vulnerability,
      * this will change with time.
      * 
* * repeated string impacts = 6; + * * @return A list containing the impacts. */ - public com.google.protobuf.ProtocolStringList - getImpactsList() { + public com.google.protobuf.ProtocolStringList getImpactsList() { return impacts_; } /** + * + * *
      * Contains information about the impact of this vulnerability,
      * this will change with time.
      * 
* * repeated string impacts = 6; + * * @return The count of impacts. */ public int getImpactsCount() { return impacts_.size(); } /** + * + * *
      * Contains information about the impact of this vulnerability,
      * this will change with time.
      * 
* * repeated string impacts = 6; + * * @param index The index of the element to return. * @return The impacts at the given index. */ @@ -5143,29 +5879,35 @@ public java.lang.String getImpacts(int index) { return impacts_.get(index); } /** + * + * *
      * Contains information about the impact of this vulnerability,
      * this will change with time.
      * 
* * repeated string impacts = 6; + * * @param index The index of the value to return. * @return The bytes of the impacts at the given index. */ - public com.google.protobuf.ByteString - getImpactsBytes(int index) { + public com.google.protobuf.ByteString getImpactsBytes(int index) { return impacts_.getByteString(index); } public static final int JUSTIFICATION_FIELD_NUMBER = 7; private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_; /** + * + * *
      * Justification provides the justification when the state of the
      * assessment if NOT_AFFECTED.
      * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * * @return Whether the justification field is set. */ @java.lang.Override @@ -5173,93 +5915,131 @@ public boolean hasJustification() { return justification_ != null; } /** + * + * *
      * Justification provides the justification when the state of the
      * assessment if NOT_AFFECTED.
      * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * * @return The justification. */ @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() { - return justification_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() + : justification_; } /** + * + * *
      * Justification provides the justification when the state of the
      * assessment if NOT_AFFECTED.
      * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * */ @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder getJustificationOrBuilder() { - return justification_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder + getJustificationOrBuilder() { + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() + : justification_; } public static final int REMEDIATIONS_FIELD_NUMBER = 8; + @SuppressWarnings("serial") - private java.util.List remediations_; + private java.util.List + remediations_; /** + * + * *
      * Specifies details on how to handle (and presumably, fix) a vulnerability.
      * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ @java.lang.Override - public java.util.List getRemediationsList() { + public java.util.List + getRemediationsList() { return remediations_; } /** + * + * *
      * Specifies details on how to handle (and presumably, fix) a vulnerability.
      * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ @java.lang.Override - public java.util.List + public java.util.List< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> getRemediationsOrBuilderList() { return remediations_; } /** + * + * *
      * Specifies details on how to handle (and presumably, fix) a vulnerability.
      * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ @java.lang.Override public int getRemediationsCount() { return remediations_.size(); } /** + * + * *
      * Specifies details on how to handle (and presumably, fix) a vulnerability.
      * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index) { + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations( + int index) { return remediations_.get(index); } /** + * + * *
      * Specifies details on how to handle (and presumably, fix) a vulnerability.
      * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder getRemediationsOrBuilder( - int index) { + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder + getRemediationsOrBuilder(int index) { return remediations_.get(index); } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -5271,8 +6051,7 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cve_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cve_); } @@ -5285,7 +6064,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < relatedUris_.size(); i++) { output.writeMessage(4, relatedUris_.get(i)); } - if (state_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED.getNumber()) { + if (state_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED + .getNumber()) { output.writeEnum(5, state_); } for (int i = 0; i < impacts_.size(); i++) { @@ -5316,12 +6097,12 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, longDescription_); } for (int i = 0; i < relatedUris_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, relatedUris_.get(i)); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, relatedUris_.get(i)); } - if (state_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, state_); + if (state_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); } { int dataSize = 0; @@ -5332,12 +6113,10 @@ public int getSerializedSize() { size += 1 * getImpactsList().size(); } if (justification_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getJustification()); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getJustification()); } for (int i = 0; i < remediations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, remediations_.get(i)); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, remediations_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -5347,31 +6126,25 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment)) { return super.equals(obj); } - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment other = (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment) obj; + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment other = + (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment) obj; - if (!getCve() - .equals(other.getCve())) return false; - if (!getShortDescription() - .equals(other.getShortDescription())) return false; - if (!getLongDescription() - .equals(other.getLongDescription())) return false; - if (!getRelatedUrisList() - .equals(other.getRelatedUrisList())) return false; + if (!getCve().equals(other.getCve())) return false; + if (!getShortDescription().equals(other.getShortDescription())) return false; + if (!getLongDescription().equals(other.getLongDescription())) return false; + if (!getRelatedUrisList().equals(other.getRelatedUrisList())) return false; if (state_ != other.state_) return false; - if (!getImpactsList() - .equals(other.getImpactsList())) return false; + if (!getImpactsList().equals(other.getImpactsList())) return false; if (hasJustification() != other.hasJustification()) return false; if (hasJustification()) { - if (!getJustification() - .equals(other.getJustification())) return false; + if (!getJustification().equals(other.getJustification())) return false; } - if (!getRemediationsList() - .equals(other.getRemediationsList())) return false; + if (!getRemediationsList().equals(other.getRemediationsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5413,87 +6186,94 @@ public int hashCode() { } public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment prototype) { + + public static Builder newBuilder( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override @@ -5503,6 +6283,8 @@ protected Builder newBuilderForType( return builder; } /** + * + * *
      * Assessment provides all information that is related to a single
      * vulnerability for this product.
@@ -5510,33 +6292,33 @@ protected Builder newBuilderForType(
      *
      * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment}
      */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+    public static final class Builder
+        extends com.google.protobuf.GeneratedMessageV3.Builder
+        implements
         // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment)
         io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor;
+      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+        return io.grafeas.v1.Vex
+            .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor;
       }
 
       @java.lang.Override
       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
           internalGetFieldAccessorTable() {
-        return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable
+        return io.grafeas.v1.Vex
+            .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
-                io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.class, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder.class);
+                io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.class,
+                io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder.class);
       }
 
       // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.newBuilder()
-      private Builder() {
-
-      }
+      private Builder() {}
 
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+      private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
       }
+
       @java.lang.Override
       public Builder clear() {
         super.clear();
@@ -5570,9 +6352,9 @@ public Builder clear() {
       }
 
       @java.lang.Override
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor;
+      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+        return io.grafeas.v1.Vex
+            .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor;
       }
 
       @java.lang.Override
@@ -5591,14 +6373,18 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment build() {
 
       @java.lang.Override
       public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment buildPartial() {
-        io.grafeas.v1.VulnerabilityAssessmentNote.Assessment result = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment(this);
+        io.grafeas.v1.VulnerabilityAssessmentNote.Assessment result =
+            new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment(this);
         buildPartialRepeatedFields(result);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        if (bitField0_ != 0) {
+          buildPartial0(result);
+        }
         onBuilt();
         return result;
       }
 
-      private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment result) {
+      private void buildPartialRepeatedFields(
+          io.grafeas.v1.VulnerabilityAssessmentNote.Assessment result) {
         if (relatedUrisBuilder_ == null) {
           if (((bitField0_ & 0x00000008) != 0)) {
             relatedUris_ = java.util.Collections.unmodifiableList(relatedUris_);
@@ -5639,9 +6425,8 @@ private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment
           result.state_ = state_;
         }
         if (((from_bitField0_ & 0x00000040) != 0)) {
-          result.justification_ = justificationBuilder_ == null
-              ? justification_
-              : justificationBuilder_.build();
+          result.justification_ =
+              justificationBuilder_ == null ? justification_ : justificationBuilder_.build();
         }
       }
 
@@ -5649,38 +6434,41 @@ private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment
       public Builder clone() {
         return super.clone();
       }
+
       @java.lang.Override
       public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
+          com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
         return super.setField(field, value);
       }
+
       @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
+      public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
         return super.clearField(field);
       }
+
       @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+      public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
         return super.clearOneof(oneof);
       }
+
       @java.lang.Override
       public Builder setRepeatedField(
           com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
+          int index,
+          java.lang.Object value) {
         return super.setRepeatedField(field, index, value);
       }
+
       @java.lang.Override
       public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
+          com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
         return super.addRepeatedField(field, value);
       }
+
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment) {
-          return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Assessment)other);
+          return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Assessment) other);
         } else {
           super.mergeFrom(other);
           return this;
@@ -5688,7 +6476,8 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
       }
 
       public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment other) {
-        if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance()) return this;
+        if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance())
+          return this;
         if (!other.getCve().isEmpty()) {
           cve_ = other.cve_;
           bitField0_ |= 0x00000001;
@@ -5722,9 +6511,10 @@ public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment ot
               relatedUrisBuilder_ = null;
               relatedUris_ = other.relatedUris_;
               bitField0_ = (bitField0_ & ~0x00000008);
-              relatedUrisBuilder_ = 
-                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
-                   getRelatedUrisFieldBuilder() : null;
+              relatedUrisBuilder_ =
+                  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
+                      ? getRelatedUrisFieldBuilder()
+                      : null;
             } else {
               relatedUrisBuilder_.addAllMessages(other.relatedUris_);
             }
@@ -5764,9 +6554,10 @@ public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment ot
               remediationsBuilder_ = null;
               remediations_ = other.remediations_;
               bitField0_ = (bitField0_ & ~0x00000080);
-              remediationsBuilder_ = 
-                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
-                   getRemediationsFieldBuilder() : null;
+              remediationsBuilder_ =
+                  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
+                      ? getRemediationsFieldBuilder()
+                      : null;
             } else {
               remediationsBuilder_.addAllMessages(other.remediations_);
             }
@@ -5798,71 +6589,76 @@ public Builder mergeFrom(
               case 0:
                 done = true;
                 break;
-              case 10: {
-                cve_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                shortDescription_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              case 26: {
-                longDescription_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000004;
-                break;
-              } // case 26
-              case 34: {
-                io.grafeas.v1.RelatedUrl m =
-                    input.readMessage(
-                        io.grafeas.v1.RelatedUrl.parser(),
-                        extensionRegistry);
-                if (relatedUrisBuilder_ == null) {
-                  ensureRelatedUrisIsMutable();
-                  relatedUris_.add(m);
-                } else {
-                  relatedUrisBuilder_.addMessage(m);
-                }
-                break;
-              } // case 34
-              case 40: {
-                state_ = input.readEnum();
-                bitField0_ |= 0x00000010;
-                break;
-              } // case 40
-              case 50: {
-                java.lang.String s = input.readStringRequireUtf8();
-                ensureImpactsIsMutable();
-                impacts_.add(s);
-                break;
-              } // case 50
-              case 58: {
-                input.readMessage(
-                    getJustificationFieldBuilder().getBuilder(),
-                    extensionRegistry);
-                bitField0_ |= 0x00000040;
-                break;
-              } // case 58
-              case 66: {
-                io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation m =
-                    input.readMessage(
-                        io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.parser(),
-                        extensionRegistry);
-                if (remediationsBuilder_ == null) {
-                  ensureRemediationsIsMutable();
-                  remediations_.add(m);
-                } else {
-                  remediationsBuilder_.addMessage(m);
-                }
-                break;
-              } // case 66
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
+              case 10:
+                {
+                  cve_ = input.readStringRequireUtf8();
+                  bitField0_ |= 0x00000001;
+                  break;
+                } // case 10
+              case 18:
+                {
+                  shortDescription_ = input.readStringRequireUtf8();
+                  bitField0_ |= 0x00000002;
+                  break;
+                } // case 18
+              case 26:
+                {
+                  longDescription_ = input.readStringRequireUtf8();
+                  bitField0_ |= 0x00000004;
+                  break;
+                } // case 26
+              case 34:
+                {
+                  io.grafeas.v1.RelatedUrl m =
+                      input.readMessage(io.grafeas.v1.RelatedUrl.parser(), extensionRegistry);
+                  if (relatedUrisBuilder_ == null) {
+                    ensureRelatedUrisIsMutable();
+                    relatedUris_.add(m);
+                  } else {
+                    relatedUrisBuilder_.addMessage(m);
+                  }
+                  break;
+                } // case 34
+              case 40:
+                {
+                  state_ = input.readEnum();
+                  bitField0_ |= 0x00000010;
+                  break;
+                } // case 40
+              case 50:
+                {
+                  java.lang.String s = input.readStringRequireUtf8();
+                  ensureImpactsIsMutable();
+                  impacts_.add(s);
+                  break;
+                } // case 50
+              case 58:
+                {
+                  input.readMessage(getJustificationFieldBuilder().getBuilder(), extensionRegistry);
+                  bitField0_ |= 0x00000040;
+                  break;
+                } // case 58
+              case 66:
+                {
+                  io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation m =
+                      input.readMessage(
+                          io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.parser(),
+                          extensionRegistry);
+                  if (remediationsBuilder_ == null) {
+                    ensureRemediationsIsMutable();
+                    remediations_.add(m);
+                  } else {
+                    remediationsBuilder_.addMessage(m);
+                  }
+                  break;
+                } // case 66
+              default:
+                {
+                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                    done = true; // was an endgroup tag
+                  }
+                  break;
+                } // default:
             } // switch (tag)
           } // while (!done)
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -5872,23 +6668,26 @@ public Builder mergeFrom(
         } // finally
         return this;
       }
+
       private int bitField0_;
 
       private java.lang.Object cve_ = "";
       /**
+       *
+       *
        * 
        * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
        * tracking number for the vulnerability.
        * 
* * string cve = 1; + * * @return The cve. */ public java.lang.String getCve() { java.lang.Object ref = cve_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); cve_ = s; return s; @@ -5897,21 +6696,22 @@ public java.lang.String getCve() { } } /** + * + * *
        * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
        * tracking number for the vulnerability.
        * 
* * string cve = 1; + * * @return The bytes for cve. */ - public com.google.protobuf.ByteString - getCveBytes() { + public com.google.protobuf.ByteString getCveBytes() { java.lang.Object ref = cve_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); cve_ = b; return b; } else { @@ -5919,30 +6719,37 @@ public java.lang.String getCve() { } } /** + * + * *
        * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
        * tracking number for the vulnerability.
        * 
* * string cve = 1; + * * @param value The cve to set. * @return This builder for chaining. */ - public Builder setCve( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setCve(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } cve_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** + * + * *
        * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
        * tracking number for the vulnerability.
        * 
* * string cve = 1; + * * @return This builder for chaining. */ public Builder clearCve() { @@ -5952,18 +6759,22 @@ public Builder clearCve() { return this; } /** + * + * *
        * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
        * tracking number for the vulnerability.
        * 
* * string cve = 1; + * * @param value The bytes for cve to set. * @return This builder for chaining. */ - public Builder setCveBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder setCveBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); cve_ = value; bitField0_ |= 0x00000001; @@ -5973,18 +6784,20 @@ public Builder setCveBytes( private java.lang.Object shortDescription_ = ""; /** + * + * *
        * A one sentence description of this Vex.
        * 
* * string short_description = 2; + * * @return The shortDescription. */ public java.lang.String getShortDescription() { java.lang.Object ref = shortDescription_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); shortDescription_ = s; return s; @@ -5993,20 +6806,21 @@ public java.lang.String getShortDescription() { } } /** + * + * *
        * A one sentence description of this Vex.
        * 
* * string short_description = 2; + * * @return The bytes for shortDescription. */ - public com.google.protobuf.ByteString - getShortDescriptionBytes() { + public com.google.protobuf.ByteString getShortDescriptionBytes() { java.lang.Object ref = shortDescription_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); shortDescription_ = b; return b; } else { @@ -6014,28 +6828,35 @@ public java.lang.String getShortDescription() { } } /** + * + * *
        * A one sentence description of this Vex.
        * 
* * string short_description = 2; + * * @param value The shortDescription to set. * @return This builder for chaining. */ - public Builder setShortDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setShortDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } shortDescription_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** + * + * *
        * A one sentence description of this Vex.
        * 
* * string short_description = 2; + * * @return This builder for chaining. */ public Builder clearShortDescription() { @@ -6045,17 +6866,21 @@ public Builder clearShortDescription() { return this; } /** + * + * *
        * A one sentence description of this Vex.
        * 
* * string short_description = 2; + * * @param value The bytes for shortDescription to set. * @return This builder for chaining. */ - public Builder setShortDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder setShortDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); shortDescription_ = value; bitField0_ |= 0x00000002; @@ -6065,18 +6890,20 @@ public Builder setShortDescriptionBytes( private java.lang.Object longDescription_ = ""; /** + * + * *
        * A detailed description of this Vex.
        * 
* * string long_description = 3; + * * @return The longDescription. */ public java.lang.String getLongDescription() { java.lang.Object ref = longDescription_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); longDescription_ = s; return s; @@ -6085,20 +6912,21 @@ public java.lang.String getLongDescription() { } } /** + * + * *
        * A detailed description of this Vex.
        * 
* * string long_description = 3; + * * @return The bytes for longDescription. */ - public com.google.protobuf.ByteString - getLongDescriptionBytes() { + public com.google.protobuf.ByteString getLongDescriptionBytes() { java.lang.Object ref = longDescription_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); longDescription_ = b; return b; } else { @@ -6106,28 +6934,35 @@ public java.lang.String getLongDescription() { } } /** + * + * *
        * A detailed description of this Vex.
        * 
* * string long_description = 3; + * * @param value The longDescription to set. * @return This builder for chaining. */ - public Builder setLongDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setLongDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } longDescription_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** + * + * *
        * A detailed description of this Vex.
        * 
* * string long_description = 3; + * * @return This builder for chaining. */ public Builder clearLongDescription() { @@ -6137,17 +6972,21 @@ public Builder clearLongDescription() { return this; } /** + * + * *
        * A detailed description of this Vex.
        * 
* * string long_description = 3; + * * @param value The bytes for longDescription to set. * @return This builder for chaining. */ - public Builder setLongDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder setLongDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); longDescription_ = value; bitField0_ |= 0x00000004; @@ -6156,18 +6995,24 @@ public Builder setLongDescriptionBytes( } private java.util.List relatedUris_ = - java.util.Collections.emptyList(); + java.util.Collections.emptyList(); + private void ensureRelatedUrisIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { relatedUris_ = new java.util.ArrayList(relatedUris_); bitField0_ |= 0x00000008; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> relatedUrisBuilder_; + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder> + relatedUrisBuilder_; /** + * + * *
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6185,6 +7030,8 @@ public java.util.List getRelatedUrisList() {
         }
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6202,6 +7049,8 @@ public int getRelatedUrisCount() {
         }
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6219,6 +7068,8 @@ public io.grafeas.v1.RelatedUrl getRelatedUris(int index) {
         }
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6228,8 +7079,7 @@ public io.grafeas.v1.RelatedUrl getRelatedUris(int index) {
        *
        * repeated .grafeas.v1.RelatedUrl related_uris = 4;
        */
-      public Builder setRelatedUris(
-          int index, io.grafeas.v1.RelatedUrl value) {
+      public Builder setRelatedUris(int index, io.grafeas.v1.RelatedUrl value) {
         if (relatedUrisBuilder_ == null) {
           if (value == null) {
             throw new NullPointerException();
@@ -6243,6 +7093,8 @@ public Builder setRelatedUris(
         return this;
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6252,8 +7104,7 @@ public Builder setRelatedUris(
        *
        * repeated .grafeas.v1.RelatedUrl related_uris = 4;
        */
-      public Builder setRelatedUris(
-          int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) {
+      public Builder setRelatedUris(int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) {
         if (relatedUrisBuilder_ == null) {
           ensureRelatedUrisIsMutable();
           relatedUris_.set(index, builderForValue.build());
@@ -6264,6 +7115,8 @@ public Builder setRelatedUris(
         return this;
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6287,6 +7140,8 @@ public Builder addRelatedUris(io.grafeas.v1.RelatedUrl value) {
         return this;
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6296,8 +7151,7 @@ public Builder addRelatedUris(io.grafeas.v1.RelatedUrl value) {
        *
        * repeated .grafeas.v1.RelatedUrl related_uris = 4;
        */
-      public Builder addRelatedUris(
-          int index, io.grafeas.v1.RelatedUrl value) {
+      public Builder addRelatedUris(int index, io.grafeas.v1.RelatedUrl value) {
         if (relatedUrisBuilder_ == null) {
           if (value == null) {
             throw new NullPointerException();
@@ -6311,6 +7165,8 @@ public Builder addRelatedUris(
         return this;
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6320,8 +7176,7 @@ public Builder addRelatedUris(
        *
        * repeated .grafeas.v1.RelatedUrl related_uris = 4;
        */
-      public Builder addRelatedUris(
-          io.grafeas.v1.RelatedUrl.Builder builderForValue) {
+      public Builder addRelatedUris(io.grafeas.v1.RelatedUrl.Builder builderForValue) {
         if (relatedUrisBuilder_ == null) {
           ensureRelatedUrisIsMutable();
           relatedUris_.add(builderForValue.build());
@@ -6332,6 +7187,8 @@ public Builder addRelatedUris(
         return this;
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6341,8 +7198,7 @@ public Builder addRelatedUris(
        *
        * repeated .grafeas.v1.RelatedUrl related_uris = 4;
        */
-      public Builder addRelatedUris(
-          int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) {
+      public Builder addRelatedUris(int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) {
         if (relatedUrisBuilder_ == null) {
           ensureRelatedUrisIsMutable();
           relatedUris_.add(index, builderForValue.build());
@@ -6353,6 +7209,8 @@ public Builder addRelatedUris(
         return this;
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6366,8 +7224,7 @@ public Builder addAllRelatedUris(
           java.lang.Iterable values) {
         if (relatedUrisBuilder_ == null) {
           ensureRelatedUrisIsMutable();
-          com.google.protobuf.AbstractMessageLite.Builder.addAll(
-              values, relatedUris_);
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relatedUris_);
           onChanged();
         } else {
           relatedUrisBuilder_.addAllMessages(values);
@@ -6375,6 +7232,8 @@ public Builder addAllRelatedUris(
         return this;
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6395,6 +7254,8 @@ public Builder clearRelatedUris() {
         return this;
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6415,6 +7276,8 @@ public Builder removeRelatedUris(int index) {
         return this;
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6424,11 +7287,12 @@ public Builder removeRelatedUris(int index) {
        *
        * repeated .grafeas.v1.RelatedUrl related_uris = 4;
        */
-      public io.grafeas.v1.RelatedUrl.Builder getRelatedUrisBuilder(
-          int index) {
+      public io.grafeas.v1.RelatedUrl.Builder getRelatedUrisBuilder(int index) {
         return getRelatedUrisFieldBuilder().getBuilder(index);
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6438,14 +7302,16 @@ public io.grafeas.v1.RelatedUrl.Builder getRelatedUrisBuilder(
        *
        * repeated .grafeas.v1.RelatedUrl related_uris = 4;
        */
-      public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(
-          int index) {
+      public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(int index) {
         if (relatedUrisBuilder_ == null) {
-          return relatedUris_.get(index);  } else {
+          return relatedUris_.get(index);
+        } else {
           return relatedUrisBuilder_.getMessageOrBuilder(index);
         }
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6455,8 +7321,8 @@ public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(
        *
        * repeated .grafeas.v1.RelatedUrl related_uris = 4;
        */
-      public java.util.List 
-           getRelatedUrisOrBuilderList() {
+      public java.util.List
+          getRelatedUrisOrBuilderList() {
         if (relatedUrisBuilder_ != null) {
           return relatedUrisBuilder_.getMessageOrBuilderList();
         } else {
@@ -6464,6 +7330,8 @@ public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(
         }
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6474,10 +7342,12 @@ public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(
        * repeated .grafeas.v1.RelatedUrl related_uris = 4;
        */
       public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder() {
-        return getRelatedUrisFieldBuilder().addBuilder(
-            io.grafeas.v1.RelatedUrl.getDefaultInstance());
+        return getRelatedUrisFieldBuilder()
+            .addBuilder(io.grafeas.v1.RelatedUrl.getDefaultInstance());
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6487,12 +7357,13 @@ public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder() {
        *
        * repeated .grafeas.v1.RelatedUrl related_uris = 4;
        */
-      public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder(
-          int index) {
-        return getRelatedUrisFieldBuilder().addBuilder(
-            index, io.grafeas.v1.RelatedUrl.getDefaultInstance());
+      public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder(int index) {
+        return getRelatedUrisFieldBuilder()
+            .addBuilder(index, io.grafeas.v1.RelatedUrl.getDefaultInstance());
       }
       /**
+       *
+       *
        * 
        * Holds a list of references associated with this vulnerability item and
        * assessment. These uris have additional information about the
@@ -6502,16 +7373,21 @@ public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder(
        *
        * repeated .grafeas.v1.RelatedUrl related_uris = 4;
        */
-      public java.util.List 
-           getRelatedUrisBuilderList() {
+      public java.util.List getRelatedUrisBuilderList() {
         return getRelatedUrisFieldBuilder().getBuilderList();
       }
+
       private com.google.protobuf.RepeatedFieldBuilderV3<
-          io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> 
+              io.grafeas.v1.RelatedUrl,
+              io.grafeas.v1.RelatedUrl.Builder,
+              io.grafeas.v1.RelatedUrlOrBuilder>
           getRelatedUrisFieldBuilder() {
         if (relatedUrisBuilder_ == null) {
-          relatedUrisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
-              io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder>(
+          relatedUrisBuilder_ =
+              new com.google.protobuf.RepeatedFieldBuilderV3<
+                  io.grafeas.v1.RelatedUrl,
+                  io.grafeas.v1.RelatedUrl.Builder,
+                  io.grafeas.v1.RelatedUrlOrBuilder>(
                   relatedUris_,
                   ((bitField0_ & 0x00000008) != 0),
                   getParentForChildren(),
@@ -6523,22 +7399,29 @@ public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder(
 
       private int state_ = 0;
       /**
+       *
+       *
        * 
        * Provides the state of this Vulnerability assessment.
        * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * * @return The enum numeric value on the wire for state. */ - @java.lang.Override public int getStateValue() { + @java.lang.Override + public int getStateValue() { return state_; } /** + * + * *
        * Provides the state of this Vulnerability assessment.
        * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * * @param value The enum numeric value on the wire for state to set. * @return This builder for chaining. */ @@ -6549,24 +7432,33 @@ public Builder setStateValue(int value) { return this; } /** + * + * *
        * Provides the state of this Vulnerability assessment.
        * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * * @return The state. */ @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() { - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); - return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED : result; + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED + : result; } /** + * + * *
        * Provides the state of this Vulnerability assessment.
        * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * * @param value The state to set. * @return This builder for chaining. */ @@ -6580,11 +7472,14 @@ public Builder setState(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Sta return this; } /** + * + * *
        * Provides the state of this Vulnerability assessment.
        * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * * @return This builder for chaining. */ public Builder clearState() { @@ -6594,45 +7489,55 @@ public Builder clearState() { return this; } - private com.google.protobuf.LazyStringList impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private com.google.protobuf.LazyStringList impacts_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureImpactsIsMutable() { if (!((bitField0_ & 0x00000020) != 0)) { impacts_ = new com.google.protobuf.LazyStringArrayList(impacts_); bitField0_ |= 0x00000020; - } + } } /** + * + * *
        * Contains information about the impact of this vulnerability,
        * this will change with time.
        * 
* * repeated string impacts = 6; + * * @return A list containing the impacts. */ - public com.google.protobuf.ProtocolStringList - getImpactsList() { + public com.google.protobuf.ProtocolStringList getImpactsList() { return impacts_.getUnmodifiableView(); } /** + * + * *
        * Contains information about the impact of this vulnerability,
        * this will change with time.
        * 
* * repeated string impacts = 6; + * * @return The count of impacts. */ public int getImpactsCount() { return impacts_.size(); } /** + * + * *
        * Contains information about the impact of this vulnerability,
        * this will change with time.
        * 
* * repeated string impacts = 6; + * * @param index The index of the element to return. * @return The impacts at the given index. */ @@ -6640,81 +7545,95 @@ public java.lang.String getImpacts(int index) { return impacts_.get(index); } /** + * + * *
        * Contains information about the impact of this vulnerability,
        * this will change with time.
        * 
* * repeated string impacts = 6; + * * @param index The index of the value to return. * @return The bytes of the impacts at the given index. */ - public com.google.protobuf.ByteString - getImpactsBytes(int index) { + public com.google.protobuf.ByteString getImpactsBytes(int index) { return impacts_.getByteString(index); } /** + * + * *
        * Contains information about the impact of this vulnerability,
        * this will change with time.
        * 
* * repeated string impacts = 6; + * * @param index The index to set the value at. * @param value The impacts to set. * @return This builder for chaining. */ - public Builder setImpacts( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setImpacts(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } ensureImpactsIsMutable(); impacts_.set(index, value); onChanged(); return this; } /** + * + * *
        * Contains information about the impact of this vulnerability,
        * this will change with time.
        * 
* * repeated string impacts = 6; + * * @param value The impacts to add. * @return This builder for chaining. */ - public Builder addImpacts( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder addImpacts(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } ensureImpactsIsMutable(); impacts_.add(value); onChanged(); return this; } /** + * + * *
        * Contains information about the impact of this vulnerability,
        * this will change with time.
        * 
* * repeated string impacts = 6; + * * @param values The impacts to add. * @return This builder for chaining. */ - public Builder addAllImpacts( - java.lang.Iterable values) { + public Builder addAllImpacts(java.lang.Iterable values) { ensureImpactsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, impacts_); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, impacts_); onChanged(); return this; } /** + * + * *
        * Contains information about the impact of this vulnerability,
        * this will change with time.
        * 
* * repeated string impacts = 6; + * * @return This builder for chaining. */ public Builder clearImpacts() { @@ -6724,18 +7643,22 @@ public Builder clearImpacts() { return this; } /** + * + * *
        * Contains information about the impact of this vulnerability,
        * this will change with time.
        * 
* * repeated string impacts = 6; + * * @param value The bytes of the impacts to add. * @return This builder for chaining. */ - public Builder addImpactsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder addImpactsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); ensureImpactsIsMutable(); impacts_.add(value); @@ -6745,44 +7668,62 @@ public Builder addImpactsBytes( private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_; private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> justificationBuilder_; + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> + justificationBuilder_; /** + * + * *
        * Justification provides the justification when the state of the
        * assessment if NOT_AFFECTED.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * * @return Whether the justification field is set. */ public boolean hasJustification() { return ((bitField0_ & 0x00000040) != 0); } /** + * + * *
        * Justification provides the justification when the state of the
        * assessment if NOT_AFFECTED.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * * @return The justification. */ public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() { if (justificationBuilder_ == null) { - return justification_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .getDefaultInstance() + : justification_; } else { return justificationBuilder_.getMessage(); } } /** + * + * *
        * Justification provides the justification when the state of the
        * assessment if NOT_AFFECTED.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * */ - public Builder setJustification(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { + public Builder setJustification( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { if (justificationBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -6796,15 +7737,19 @@ public Builder setJustification(io.grafeas.v1.VulnerabilityAssessmentNote.Assess return this; } /** + * + * *
        * Justification provides the justification when the state of the
        * assessment if NOT_AFFECTED.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * */ public Builder setJustification( - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder builderForValue) { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder + builderForValue) { if (justificationBuilder_ == null) { justification_ = builderForValue.build(); } else { @@ -6815,18 +7760,24 @@ public Builder setJustification( return this; } /** + * + * *
        * Justification provides the justification when the state of the
        * assessment if NOT_AFFECTED.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * */ - public Builder mergeJustification(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { + public Builder mergeJustification( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { if (justificationBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - justification_ != null && - justification_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance()) { + if (((bitField0_ & 0x00000040) != 0) + && justification_ != null + && justification_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .getDefaultInstance()) { getJustificationBuilder().mergeFrom(value); } else { justification_ = value; @@ -6839,12 +7790,15 @@ public Builder mergeJustification(io.grafeas.v1.VulnerabilityAssessmentNote.Asse return this; } /** + * + * *
        * Justification provides the justification when the state of the
        * assessment if NOT_AFFECTED.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * */ public Builder clearJustification() { bitField0_ = (bitField0_ & ~0x00000040); @@ -6857,76 +7811,103 @@ public Builder clearJustification() { return this; } /** + * + * *
        * Justification provides the justification when the state of the
        * assessment if NOT_AFFECTED.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder getJustificationBuilder() { + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder + getJustificationBuilder() { bitField0_ |= 0x00000040; onChanged(); return getJustificationFieldBuilder().getBuilder(); } /** + * + * *
        * Justification provides the justification when the state of the
        * assessment if NOT_AFFECTED.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder getJustificationOrBuilder() { + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder + getJustificationOrBuilder() { if (justificationBuilder_ != null) { return justificationBuilder_.getMessageOrBuilder(); } else { - return justification_ == null ? - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .getDefaultInstance() + : justification_; } } /** + * + * *
        * Justification provides the justification when the state of the
        * assessment if NOT_AFFECTED.
        * 
* - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * */ private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> getJustificationFieldBuilder() { if (justificationBuilder_ == null) { - justificationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder>( - getJustification(), - getParentForChildren(), - isClean()); + justificationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder>( + getJustification(), getParentForChildren(), isClean()); justification_ = null; } return justificationBuilder_; } - private java.util.List remediations_ = - java.util.Collections.emptyList(); + private java.util.List + remediations_ = java.util.Collections.emptyList(); + private void ensureRemediationsIsMutable() { if (!((bitField0_ & 0x00000080) != 0)) { - remediations_ = new java.util.ArrayList(remediations_); + remediations_ = + new java.util.ArrayList< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation>(remediations_); bitField0_ |= 0x00000080; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> remediationsBuilder_; + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + remediationsBuilder_; /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ - public java.util.List getRemediationsList() { + public java.util.List + getRemediationsList() { if (remediationsBuilder_ == null) { return java.util.Collections.unmodifiableList(remediations_); } else { @@ -6934,11 +7915,15 @@ public java.util.List * Specifies details on how to handle (and presumably, fix) a vulnerability. *
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ public int getRemediationsCount() { if (remediationsBuilder_ == null) { @@ -6948,13 +7933,18 @@ public int getRemediationsCount() { } } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index) { + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations( + int index) { if (remediationsBuilder_ == null) { return remediations_.get(index); } else { @@ -6962,11 +7952,15 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemed } } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ public Builder setRemediations( int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { @@ -6983,14 +7977,20 @@ public Builder setRemediations( return this; } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ public Builder setRemediations( - int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder builderForValue) { + int index, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + builderForValue) { if (remediationsBuilder_ == null) { ensureRemediationsIsMutable(); remediations_.set(index, builderForValue.build()); @@ -7001,13 +8001,18 @@ public Builder setRemediations( return this; } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ - public Builder addRemediations(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + public Builder addRemediations( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { if (remediationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -7021,11 +8026,15 @@ public Builder addRemediations(io.grafeas.v1.VulnerabilityAssessmentNote.Assessm return this; } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ public Builder addRemediations( int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { @@ -7042,14 +8051,19 @@ public Builder addRemediations( return this; } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ public Builder addRemediations( - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder builderForValue) { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + builderForValue) { if (remediationsBuilder_ == null) { ensureRemediationsIsMutable(); remediations_.add(builderForValue.build()); @@ -7060,14 +8074,20 @@ public Builder addRemediations( return this; } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ public Builder addRemediations( - int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder builderForValue) { + int index, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + builderForValue) { if (remediationsBuilder_ == null) { ensureRemediationsIsMutable(); remediations_.add(index, builderForValue.build()); @@ -7078,18 +8098,23 @@ public Builder addRemediations( return this; } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ public Builder addAllRemediations( - java.lang.Iterable values) { + java.lang.Iterable< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation> + values) { if (remediationsBuilder_ == null) { ensureRemediationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, remediations_); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, remediations_); onChanged(); } else { remediationsBuilder_.addAllMessages(values); @@ -7097,11 +8122,15 @@ public Builder addAllRemediations( return this; } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ public Builder clearRemediations() { if (remediationsBuilder_ == null) { @@ -7114,11 +8143,15 @@ public Builder clearRemediations() { return this; } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ public Builder removeRemediations(int index) { if (remediationsBuilder_ == null) { @@ -7131,39 +8164,53 @@ public Builder removeRemediations(int index) { return this; } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder getRemediationsBuilder( - int index) { + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + getRemediationsBuilder(int index) { return getRemediationsFieldBuilder().getBuilder(index); } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder getRemediationsOrBuilder( - int index) { + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder + getRemediationsOrBuilder(int index) { if (remediationsBuilder_ == null) { - return remediations_.get(index); } else { + return remediations_.get(index); + } else { return remediationsBuilder_.getMessageOrBuilder(index); } } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ - public java.util.List - getRemediationsOrBuilderList() { + public java.util.List< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + getRemediationsOrBuilderList() { if (remediationsBuilder_ != null) { return remediationsBuilder_.getMessageOrBuilderList(); } else { @@ -7171,45 +8218,70 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder } } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder addRemediationsBuilder() { - return getRemediationsFieldBuilder().addBuilder( - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDefaultInstance()); + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + addRemediationsBuilder() { + return getRemediationsFieldBuilder() + .addBuilder( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + .getDefaultInstance()); } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder addRemediationsBuilder( - int index) { - return getRemediationsFieldBuilder().addBuilder( - index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDefaultInstance()); + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + addRemediationsBuilder(int index) { + return getRemediationsFieldBuilder() + .addBuilder( + index, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + .getDefaultInstance()); } /** + * + * *
        * Specifies details on how to handle (and presumably, fix) a vulnerability.
        * 
* - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * */ - public java.util.List - getRemediationsBuilderList() { + public java.util.List< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder> + getRemediationsBuilderList() { return getRemediationsFieldBuilder().getBuilderList(); } + private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> getRemediationsFieldBuilder() { if (remediationsBuilder_ == null) { - remediationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder>( + remediationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder>( remediations_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), @@ -7218,6 +8290,7 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder } return remediationsBuilder_; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -7230,12 +8303,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment) } // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment) private static final io.grafeas.v1.VulnerabilityAssessmentNote.Assessment DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment(); } @@ -7244,27 +8317,28 @@ public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getDefaultIns return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Assessment parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Assessment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -7279,18 +8353,21 @@ public com.google.protobuf.Parser getParserForType() { public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } public static final int TITLE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private volatile java.lang.Object title_ = ""; /** + * + * *
    * The title of the note. E.g. `Vex-Debian-11.4`
    * 
* * string title = 1; + * * @return The title. */ @java.lang.Override @@ -7299,29 +8376,29 @@ public java.lang.String getTitle() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); title_ = s; return s; } } /** + * + * *
    * The title of the note. E.g. `Vex-Debian-11.4`
    * 
* * string title = 1; + * * @return The bytes for title. */ @java.lang.Override - public com.google.protobuf.ByteString - getTitleBytes() { + public com.google.protobuf.ByteString getTitleBytes() { java.lang.Object ref = title_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); title_ = b; return b; } else { @@ -7330,14 +8407,18 @@ public java.lang.String getTitle() { } public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private volatile java.lang.Object shortDescription_ = ""; /** + * + * *
    * A one sentence description of this Vex.
    * 
* * string short_description = 2; + * * @return The shortDescription. */ @java.lang.Override @@ -7346,29 +8427,29 @@ public java.lang.String getShortDescription() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); shortDescription_ = s; return s; } } /** + * + * *
    * A one sentence description of this Vex.
    * 
* * string short_description = 2; + * * @return The bytes for shortDescription. */ @java.lang.Override - public com.google.protobuf.ByteString - getShortDescriptionBytes() { + public com.google.protobuf.ByteString getShortDescriptionBytes() { java.lang.Object ref = shortDescription_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); shortDescription_ = b; return b; } else { @@ -7377,14 +8458,18 @@ public java.lang.String getShortDescription() { } public static final int LONG_DESCRIPTION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private volatile java.lang.Object longDescription_ = ""; /** + * + * *
    * A detailed description of this Vex.
    * 
* * string long_description = 3; + * * @return The longDescription. */ @java.lang.Override @@ -7393,29 +8478,29 @@ public java.lang.String getLongDescription() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); longDescription_ = s; return s; } } /** + * + * *
    * A detailed description of this Vex.
    * 
* * string long_description = 3; + * * @return The bytes for longDescription. */ @java.lang.Override - public com.google.protobuf.ByteString - getLongDescriptionBytes() { + public com.google.protobuf.ByteString getLongDescriptionBytes() { java.lang.Object ref = longDescription_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); longDescription_ = b; return b; } else { @@ -7424,15 +8509,19 @@ public java.lang.String getLongDescription() { } public static final int LANGUAGE_CODE_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private volatile java.lang.Object languageCode_ = ""; /** + * + * *
    * Identifies the language used by this document,
    * corresponding to IETF BCP 47 / RFC 5646.
    * 
* * string language_code = 4; + * * @return The languageCode. */ @java.lang.Override @@ -7441,30 +8530,30 @@ public java.lang.String getLanguageCode() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); languageCode_ = s; return s; } } /** + * + * *
    * Identifies the language used by this document,
    * corresponding to IETF BCP 47 / RFC 5646.
    * 
* * string language_code = 4; + * * @return The bytes for languageCode. */ @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { + public com.google.protobuf.ByteString getLanguageCodeBytes() { java.lang.Object ref = languageCode_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); languageCode_ = b; return b; } else { @@ -7475,11 +8564,14 @@ public java.lang.String getLanguageCode() { public static final int PUBLISHER_FIELD_NUMBER = 5; private io.grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher_; /** + * + * *
    * Publisher details of this Note.
    * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * * @return Whether the publisher field is set. */ @java.lang.Override @@ -7487,18 +8579,25 @@ public boolean hasPublisher() { return publisher_ != null; } /** + * + * *
    * Publisher details of this Note.
    * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * * @return The publisher. */ @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getPublisher() { - return publisher_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() : publisher_; + return publisher_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() + : publisher_; } /** + * + * *
    * Publisher details of this Note.
    * 
@@ -7507,17 +8606,22 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getPublisher() { */ @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder getPublisherOrBuilder() { - return publisher_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() : publisher_; + return publisher_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() + : publisher_; } public static final int PRODUCT_FIELD_NUMBER = 6; private io.grafeas.v1.VulnerabilityAssessmentNote.Product product_; /** + * + * *
    * The product affected by this vex.
    * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * * @return Whether the product field is set. */ @java.lang.Override @@ -7525,18 +8629,25 @@ public boolean hasProduct() { return product_ != null; } /** + * + * *
    * The product affected by this vex.
    * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * * @return The product. */ @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.Product getProduct() { - return product_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() : product_; + return product_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() + : product_; } /** + * + * *
    * The product affected by this vex.
    * 
@@ -7545,17 +8656,22 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.Product getProduct() { */ @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder getProductOrBuilder() { - return product_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() : product_; + return product_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() + : product_; } public static final int ASSESSMENT_FIELD_NUMBER = 7; private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment_; /** + * + * *
    * Represents a vulnerability assessment for the product.
    * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * * @return Whether the assessment field is set. */ @java.lang.Override @@ -7563,18 +8679,25 @@ public boolean hasAssessment() { return assessment_ != null; } /** + * + * *
    * Represents a vulnerability assessment for the product.
    * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * * @return The assessment. */ @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getAssessment() { - return assessment_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() : assessment_; + return assessment_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() + : assessment_; } /** + * + * *
    * Represents a vulnerability assessment for the product.
    * 
@@ -7583,10 +8706,13 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getAssessment() { */ @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder getAssessmentOrBuilder() { - return assessment_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() : assessment_; + return assessment_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() + : assessment_; } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -7598,8 +8724,7 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); } @@ -7643,16 +8768,13 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, languageCode_); } if (publisher_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getPublisher()); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getPublisher()); } if (product_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getProduct()); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getProduct()); } if (assessment_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getAssessment()); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAssessment()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -7662,35 +8784,29 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote)) { return super.equals(obj); } - io.grafeas.v1.VulnerabilityAssessmentNote other = (io.grafeas.v1.VulnerabilityAssessmentNote) obj; + io.grafeas.v1.VulnerabilityAssessmentNote other = + (io.grafeas.v1.VulnerabilityAssessmentNote) obj; - if (!getTitle() - .equals(other.getTitle())) return false; - if (!getShortDescription() - .equals(other.getShortDescription())) return false; - if (!getLongDescription() - .equals(other.getLongDescription())) return false; - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (!getShortDescription().equals(other.getShortDescription())) return false; + if (!getLongDescription().equals(other.getLongDescription())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; if (hasPublisher() != other.hasPublisher()) return false; if (hasPublisher()) { - if (!getPublisher() - .equals(other.getPublisher())) return false; + if (!getPublisher().equals(other.getPublisher())) return false; } if (hasProduct() != other.hasProduct()) return false; if (hasProduct()) { - if (!getProduct() - .equals(other.getProduct())) return false; + if (!getProduct().equals(other.getProduct())) return false; } if (hasAssessment() != other.hasAssessment()) return false; if (hasAssessment()) { - if (!getAssessment() - .equals(other.getAssessment())) return false; + if (!getAssessment().equals(other.getAssessment())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -7728,97 +8844,104 @@ public int hashCode() { return hash; } - public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( - java.nio.ByteBuffer data) + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static io.grafeas.v1.VulnerabilityAssessmentNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static io.grafeas.v1.VulnerabilityAssessmentNote parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } + public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** + * + * *
    * A single VulnerabilityAssessmentNote represents
    * one particular product's vulnerability assessment for one CVE.
@@ -7826,33 +8949,31 @@ protected Builder newBuilderForType(
    *
    * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote}
    */
-  public static final class Builder extends
-      com.google.protobuf.GeneratedMessageV3.Builder implements
+  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+      implements
       // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote)
       io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder {
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
+    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
       return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor;
     }
 
     @java.lang.Override
     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable
+      return io.grafeas.v1.Vex
+          .internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
-              io.grafeas.v1.VulnerabilityAssessmentNote.class, io.grafeas.v1.VulnerabilityAssessmentNote.Builder.class);
+              io.grafeas.v1.VulnerabilityAssessmentNote.class,
+              io.grafeas.v1.VulnerabilityAssessmentNote.Builder.class);
     }
 
     // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.newBuilder()
-    private Builder() {
-
-    }
+    private Builder() {}
 
-    private Builder(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
       super(parent);
-
     }
+
     @java.lang.Override
     public Builder clear() {
       super.clear();
@@ -7880,8 +9001,7 @@ public Builder clear() {
     }
 
     @java.lang.Override
-    public com.google.protobuf.Descriptors.Descriptor
-        getDescriptorForType() {
+    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
       return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor;
     }
 
@@ -7901,8 +9021,11 @@ public io.grafeas.v1.VulnerabilityAssessmentNote build() {
 
     @java.lang.Override
     public io.grafeas.v1.VulnerabilityAssessmentNote buildPartial() {
-      io.grafeas.v1.VulnerabilityAssessmentNote result = new io.grafeas.v1.VulnerabilityAssessmentNote(this);
-      if (bitField0_ != 0) { buildPartial0(result); }
+      io.grafeas.v1.VulnerabilityAssessmentNote result =
+          new io.grafeas.v1.VulnerabilityAssessmentNote(this);
+      if (bitField0_ != 0) {
+        buildPartial0(result);
+      }
       onBuilt();
       return result;
     }
@@ -7922,19 +9045,13 @@ private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote result) {
         result.languageCode_ = languageCode_;
       }
       if (((from_bitField0_ & 0x00000010) != 0)) {
-        result.publisher_ = publisherBuilder_ == null
-            ? publisher_
-            : publisherBuilder_.build();
+        result.publisher_ = publisherBuilder_ == null ? publisher_ : publisherBuilder_.build();
       }
       if (((from_bitField0_ & 0x00000020) != 0)) {
-        result.product_ = productBuilder_ == null
-            ? product_
-            : productBuilder_.build();
+        result.product_ = productBuilder_ == null ? product_ : productBuilder_.build();
       }
       if (((from_bitField0_ & 0x00000040) != 0)) {
-        result.assessment_ = assessmentBuilder_ == null
-            ? assessment_
-            : assessmentBuilder_.build();
+        result.assessment_ = assessmentBuilder_ == null ? assessment_ : assessmentBuilder_.build();
       }
     }
 
@@ -7942,38 +9059,39 @@ private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote result) {
     public Builder clone() {
       return super.clone();
     }
+
     @java.lang.Override
     public Builder setField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
       return super.setField(field, value);
     }
+
     @java.lang.Override
-    public Builder clearField(
-        com.google.protobuf.Descriptors.FieldDescriptor field) {
+    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
       return super.clearField(field);
     }
+
     @java.lang.Override
-    public Builder clearOneof(
-        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
       return super.clearOneof(oneof);
     }
+
     @java.lang.Override
     public Builder setRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        int index, java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
       return super.setRepeatedField(field, index, value);
     }
+
     @java.lang.Override
     public Builder addRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
       return super.addRepeatedField(field, value);
     }
+
     @java.lang.Override
     public Builder mergeFrom(com.google.protobuf.Message other) {
       if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote) {
-        return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote)other);
+        return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote) other);
       } else {
         super.mergeFrom(other);
         return this;
@@ -8037,53 +9155,55 @@ public Builder mergeFrom(
             case 0:
               done = true;
               break;
-            case 10: {
-              title_ = input.readStringRequireUtf8();
-              bitField0_ |= 0x00000001;
-              break;
-            } // case 10
-            case 18: {
-              shortDescription_ = input.readStringRequireUtf8();
-              bitField0_ |= 0x00000002;
-              break;
-            } // case 18
-            case 26: {
-              longDescription_ = input.readStringRequireUtf8();
-              bitField0_ |= 0x00000004;
-              break;
-            } // case 26
-            case 34: {
-              languageCode_ = input.readStringRequireUtf8();
-              bitField0_ |= 0x00000008;
-              break;
-            } // case 34
-            case 42: {
-              input.readMessage(
-                  getPublisherFieldBuilder().getBuilder(),
-                  extensionRegistry);
-              bitField0_ |= 0x00000010;
-              break;
-            } // case 42
-            case 50: {
-              input.readMessage(
-                  getProductFieldBuilder().getBuilder(),
-                  extensionRegistry);
-              bitField0_ |= 0x00000020;
-              break;
-            } // case 50
-            case 58: {
-              input.readMessage(
-                  getAssessmentFieldBuilder().getBuilder(),
-                  extensionRegistry);
-              bitField0_ |= 0x00000040;
-              break;
-            } // case 58
-            default: {
-              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                done = true; // was an endgroup tag
-              }
-              break;
-            } // default:
+            case 10:
+              {
+                title_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000001;
+                break;
+              } // case 10
+            case 18:
+              {
+                shortDescription_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000002;
+                break;
+              } // case 18
+            case 26:
+              {
+                longDescription_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000004;
+                break;
+              } // case 26
+            case 34:
+              {
+                languageCode_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000008;
+                break;
+              } // case 34
+            case 42:
+              {
+                input.readMessage(getPublisherFieldBuilder().getBuilder(), extensionRegistry);
+                bitField0_ |= 0x00000010;
+                break;
+              } // case 42
+            case 50:
+              {
+                input.readMessage(getProductFieldBuilder().getBuilder(), extensionRegistry);
+                bitField0_ |= 0x00000020;
+                break;
+              } // case 50
+            case 58:
+              {
+                input.readMessage(getAssessmentFieldBuilder().getBuilder(), extensionRegistry);
+                bitField0_ |= 0x00000040;
+                break;
+              } // case 58
+            default:
+              {
+                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                  done = true; // was an endgroup tag
+                }
+                break;
+              } // default:
           } // switch (tag)
         } // while (!done)
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -8093,22 +9213,25 @@ public Builder mergeFrom(
       } // finally
       return this;
     }
+
     private int bitField0_;
 
     private java.lang.Object title_ = "";
     /**
+     *
+     *
      * 
      * The title of the note. E.g. `Vex-Debian-11.4`
      * 
* * string title = 1; + * * @return The title. */ public java.lang.String getTitle() { java.lang.Object ref = title_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); title_ = s; return s; @@ -8117,20 +9240,21 @@ public java.lang.String getTitle() { } } /** + * + * *
      * The title of the note. E.g. `Vex-Debian-11.4`
      * 
* * string title = 1; + * * @return The bytes for title. */ - public com.google.protobuf.ByteString - getTitleBytes() { + public com.google.protobuf.ByteString getTitleBytes() { java.lang.Object ref = title_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); title_ = b; return b; } else { @@ -8138,28 +9262,35 @@ public java.lang.String getTitle() { } } /** + * + * *
      * The title of the note. E.g. `Vex-Debian-11.4`
      * 
* * string title = 1; + * * @param value The title to set. * @return This builder for chaining. */ - public Builder setTitle( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } title_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** + * + * *
      * The title of the note. E.g. `Vex-Debian-11.4`
      * 
* * string title = 1; + * * @return This builder for chaining. */ public Builder clearTitle() { @@ -8169,17 +9300,21 @@ public Builder clearTitle() { return this; } /** + * + * *
      * The title of the note. E.g. `Vex-Debian-11.4`
      * 
* * string title = 1; + * * @param value The bytes for title to set. * @return This builder for chaining. */ - public Builder setTitleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); title_ = value; bitField0_ |= 0x00000001; @@ -8189,18 +9324,20 @@ public Builder setTitleBytes( private java.lang.Object shortDescription_ = ""; /** + * + * *
      * A one sentence description of this Vex.
      * 
* * string short_description = 2; + * * @return The shortDescription. */ public java.lang.String getShortDescription() { java.lang.Object ref = shortDescription_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); shortDescription_ = s; return s; @@ -8209,20 +9346,21 @@ public java.lang.String getShortDescription() { } } /** + * + * *
      * A one sentence description of this Vex.
      * 
* * string short_description = 2; + * * @return The bytes for shortDescription. */ - public com.google.protobuf.ByteString - getShortDescriptionBytes() { + public com.google.protobuf.ByteString getShortDescriptionBytes() { java.lang.Object ref = shortDescription_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); shortDescription_ = b; return b; } else { @@ -8230,28 +9368,35 @@ public java.lang.String getShortDescription() { } } /** + * + * *
      * A one sentence description of this Vex.
      * 
* * string short_description = 2; + * * @param value The shortDescription to set. * @return This builder for chaining. */ - public Builder setShortDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setShortDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } shortDescription_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** + * + * *
      * A one sentence description of this Vex.
      * 
* * string short_description = 2; + * * @return This builder for chaining. */ public Builder clearShortDescription() { @@ -8261,17 +9406,21 @@ public Builder clearShortDescription() { return this; } /** + * + * *
      * A one sentence description of this Vex.
      * 
* * string short_description = 2; + * * @param value The bytes for shortDescription to set. * @return This builder for chaining. */ - public Builder setShortDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder setShortDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); shortDescription_ = value; bitField0_ |= 0x00000002; @@ -8281,18 +9430,20 @@ public Builder setShortDescriptionBytes( private java.lang.Object longDescription_ = ""; /** + * + * *
      * A detailed description of this Vex.
      * 
* * string long_description = 3; + * * @return The longDescription. */ public java.lang.String getLongDescription() { java.lang.Object ref = longDescription_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); longDescription_ = s; return s; @@ -8301,20 +9452,21 @@ public java.lang.String getLongDescription() { } } /** + * + * *
      * A detailed description of this Vex.
      * 
* * string long_description = 3; + * * @return The bytes for longDescription. */ - public com.google.protobuf.ByteString - getLongDescriptionBytes() { + public com.google.protobuf.ByteString getLongDescriptionBytes() { java.lang.Object ref = longDescription_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); longDescription_ = b; return b; } else { @@ -8322,28 +9474,35 @@ public java.lang.String getLongDescription() { } } /** + * + * *
      * A detailed description of this Vex.
      * 
* * string long_description = 3; + * * @param value The longDescription to set. * @return This builder for chaining. */ - public Builder setLongDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setLongDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } longDescription_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** + * + * *
      * A detailed description of this Vex.
      * 
* * string long_description = 3; + * * @return This builder for chaining. */ public Builder clearLongDescription() { @@ -8353,17 +9512,21 @@ public Builder clearLongDescription() { return this; } /** + * + * *
      * A detailed description of this Vex.
      * 
* * string long_description = 3; + * * @param value The bytes for longDescription to set. * @return This builder for chaining. */ - public Builder setLongDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder setLongDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); longDescription_ = value; bitField0_ |= 0x00000004; @@ -8373,19 +9536,21 @@ public Builder setLongDescriptionBytes( private java.lang.Object languageCode_ = ""; /** + * + * *
      * Identifies the language used by this document,
      * corresponding to IETF BCP 47 / RFC 5646.
      * 
* * string language_code = 4; + * * @return The languageCode. */ public java.lang.String getLanguageCode() { java.lang.Object ref = languageCode_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); languageCode_ = s; return s; @@ -8394,21 +9559,22 @@ public java.lang.String getLanguageCode() { } } /** + * + * *
      * Identifies the language used by this document,
      * corresponding to IETF BCP 47 / RFC 5646.
      * 
* * string language_code = 4; + * * @return The bytes for languageCode. */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { + public com.google.protobuf.ByteString getLanguageCodeBytes() { java.lang.Object ref = languageCode_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); languageCode_ = b; return b; } else { @@ -8416,30 +9582,37 @@ public java.lang.String getLanguageCode() { } } /** + * + * *
      * Identifies the language used by this document,
      * corresponding to IETF BCP 47 / RFC 5646.
      * 
* * string language_code = 4; + * * @param value The languageCode to set. * @return This builder for chaining. */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } languageCode_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** + * + * *
      * Identifies the language used by this document,
      * corresponding to IETF BCP 47 / RFC 5646.
      * 
* * string language_code = 4; + * * @return This builder for chaining. */ public Builder clearLanguageCode() { @@ -8449,18 +9622,22 @@ public Builder clearLanguageCode() { return this; } /** + * + * *
      * Identifies the language used by this document,
      * corresponding to IETF BCP 47 / RFC 5646.
      * 
* * string language_code = 4; + * * @param value The bytes for languageCode to set. * @return This builder for chaining. */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } checkByteStringIsUtf8(value); languageCode_ = value; bitField0_ |= 0x00000008; @@ -8470,34 +9647,47 @@ public Builder setLanguageCodeBytes( private io.grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher_; private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Publisher, io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder> publisherBuilder_; + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher, + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder> + publisherBuilder_; /** + * + * *
      * Publisher details of this Note.
      * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * * @return Whether the publisher field is set. */ public boolean hasPublisher() { return ((bitField0_ & 0x00000010) != 0); } /** + * + * *
      * Publisher details of this Note.
      * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * * @return The publisher. */ public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getPublisher() { if (publisherBuilder_ == null) { - return publisher_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() : publisher_; + return publisher_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() + : publisher_; } else { return publisherBuilder_.getMessage(); } } /** + * + * *
      * Publisher details of this Note.
      * 
@@ -8518,6 +9708,8 @@ public Builder setPublisher(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher return this; } /** + * + * *
      * Publisher details of this Note.
      * 
@@ -8536,6 +9728,8 @@ public Builder setPublisher( return this; } /** + * + * *
      * Publisher details of this Note.
      * 
@@ -8544,9 +9738,10 @@ public Builder setPublisher( */ public Builder mergePublisher(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher value) { if (publisherBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - publisher_ != null && - publisher_ != io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance()) { + if (((bitField0_ & 0x00000010) != 0) + && publisher_ != null + && publisher_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance()) { getPublisherBuilder().mergeFrom(value); } else { publisher_ = value; @@ -8559,6 +9754,8 @@ public Builder mergePublisher(io.grafeas.v1.VulnerabilityAssessmentNote.Publishe return this; } /** + * + * *
      * Publisher details of this Note.
      * 
@@ -8576,6 +9773,8 @@ public Builder clearPublisher() { return this; } /** + * + * *
      * Publisher details of this Note.
      * 
@@ -8588,6 +9787,8 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder getPublisherB return getPublisherFieldBuilder().getBuilder(); } /** + * + * *
      * Publisher details of this Note.
      * 
@@ -8598,11 +9799,14 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder getPublisher if (publisherBuilder_ != null) { return publisherBuilder_.getMessageOrBuilder(); } else { - return publisher_ == null ? - io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() : publisher_; + return publisher_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() + : publisher_; } } /** + * + * *
      * Publisher details of this Note.
      * 
@@ -8610,14 +9814,17 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder getPublisher * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; */ private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Publisher, io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder> + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher, + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder> getPublisherFieldBuilder() { if (publisherBuilder_ == null) { - publisherBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Publisher, io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder>( - getPublisher(), - getParentForChildren(), - isClean()); + publisherBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher, + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder>( + getPublisher(), getParentForChildren(), isClean()); publisher_ = null; } return publisherBuilder_; @@ -8625,34 +9832,47 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder getPublisher private io.grafeas.v1.VulnerabilityAssessmentNote.Product product_; private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Product, io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder> productBuilder_; + io.grafeas.v1.VulnerabilityAssessmentNote.Product, + io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder> + productBuilder_; /** + * + * *
      * The product affected by this vex.
      * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * * @return Whether the product field is set. */ public boolean hasProduct() { return ((bitField0_ & 0x00000020) != 0); } /** + * + * *
      * The product affected by this vex.
      * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * * @return The product. */ public io.grafeas.v1.VulnerabilityAssessmentNote.Product getProduct() { if (productBuilder_ == null) { - return product_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() : product_; + return product_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() + : product_; } else { return productBuilder_.getMessage(); } } /** + * + * *
      * The product affected by this vex.
      * 
@@ -8673,6 +9893,8 @@ public Builder setProduct(io.grafeas.v1.VulnerabilityAssessmentNote.Product valu return this; } /** + * + * *
      * The product affected by this vex.
      * 
@@ -8691,6 +9913,8 @@ public Builder setProduct( return this; } /** + * + * *
      * The product affected by this vex.
      * 
@@ -8699,9 +9923,9 @@ public Builder setProduct( */ public Builder mergeProduct(io.grafeas.v1.VulnerabilityAssessmentNote.Product value) { if (productBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - product_ != null && - product_ != io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance()) { + if (((bitField0_ & 0x00000020) != 0) + && product_ != null + && product_ != io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance()) { getProductBuilder().mergeFrom(value); } else { product_ = value; @@ -8714,6 +9938,8 @@ public Builder mergeProduct(io.grafeas.v1.VulnerabilityAssessmentNote.Product va return this; } /** + * + * *
      * The product affected by this vex.
      * 
@@ -8731,6 +9957,8 @@ public Builder clearProduct() { return this; } /** + * + * *
      * The product affected by this vex.
      * 
@@ -8743,6 +9971,8 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder getProductBuild return getProductFieldBuilder().getBuilder(); } /** + * + * *
      * The product affected by this vex.
      * 
@@ -8753,11 +9983,14 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder getProductOrBu if (productBuilder_ != null) { return productBuilder_.getMessageOrBuilder(); } else { - return product_ == null ? - io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() : product_; + return product_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() + : product_; } } /** + * + * *
      * The product affected by this vex.
      * 
@@ -8765,14 +9998,17 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder getProductOrBu * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; */ private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Product, io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder> + io.grafeas.v1.VulnerabilityAssessmentNote.Product, + io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder> getProductFieldBuilder() { if (productBuilder_ == null) { - productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Product, io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder>( - getProduct(), - getParentForChildren(), - isClean()); + productBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Product, + io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder>( + getProduct(), getParentForChildren(), isClean()); product_ = null; } return productBuilder_; @@ -8780,34 +10016,47 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder getProductOrBu private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment_; private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder> assessmentBuilder_; + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder> + assessmentBuilder_; /** + * + * *
      * Represents a vulnerability assessment for the product.
      * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * * @return Whether the assessment field is set. */ public boolean hasAssessment() { return ((bitField0_ & 0x00000040) != 0); } /** + * + * *
      * Represents a vulnerability assessment for the product.
      * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * * @return The assessment. */ public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getAssessment() { if (assessmentBuilder_ == null) { - return assessment_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() : assessment_; + return assessment_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() + : assessment_; } else { return assessmentBuilder_.getMessage(); } } /** + * + * *
      * Represents a vulnerability assessment for the product.
      * 
@@ -8828,6 +10077,8 @@ public Builder setAssessment(io.grafeas.v1.VulnerabilityAssessmentNote.Assessmen return this; } /** + * + * *
      * Represents a vulnerability assessment for the product.
      * 
@@ -8846,6 +10097,8 @@ public Builder setAssessment( return this; } /** + * + * *
      * Represents a vulnerability assessment for the product.
      * 
@@ -8854,9 +10107,10 @@ public Builder setAssessment( */ public Builder mergeAssessment(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment value) { if (assessmentBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - assessment_ != null && - assessment_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance()) { + if (((bitField0_ & 0x00000040) != 0) + && assessment_ != null + && assessment_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance()) { getAssessmentBuilder().mergeFrom(value); } else { assessment_ = value; @@ -8869,6 +10123,8 @@ public Builder mergeAssessment(io.grafeas.v1.VulnerabilityAssessmentNote.Assessm return this; } /** + * + * *
      * Represents a vulnerability assessment for the product.
      * 
@@ -8886,6 +10142,8 @@ public Builder clearAssessment() { return this; } /** + * + * *
      * Represents a vulnerability assessment for the product.
      * 
@@ -8898,6 +10156,8 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder getAssessmen return getAssessmentFieldBuilder().getBuilder(); } /** + * + * *
      * Represents a vulnerability assessment for the product.
      * 
@@ -8908,11 +10168,14 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder getAssessme if (assessmentBuilder_ != null) { return assessmentBuilder_.getMessageOrBuilder(); } else { - return assessment_ == null ? - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() : assessment_; + return assessment_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() + : assessment_; } } /** + * + * *
      * Represents a vulnerability assessment for the product.
      * 
@@ -8920,21 +10183,24 @@ public io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder getAssessme * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; */ private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder> + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder> getAssessmentFieldBuilder() { if (assessmentBuilder_ == null) { - assessmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder>( - getAssessment(), - getParentForChildren(), - isClean()); + assessmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder>( + getAssessment(), getParentForChildren(), isClean()); assessment_ = null; } return assessmentBuilder_; } + @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -8944,12 +10210,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote) } // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote) private static final io.grafeas.v1.VulnerabilityAssessmentNote DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote(); } @@ -8958,27 +10224,27 @@ public static io.grafeas.v1.VulnerabilityAssessmentNote getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VulnerabilityAssessmentNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VulnerabilityAssessmentNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -8993,6 +10259,4 @@ public com.google.protobuf.Parser getParserForType( public io.grafeas.v1.VulnerabilityAssessmentNote getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNoteOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNoteOrBuilder.java similarity index 78% rename from owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNoteOrBuilder.java rename to java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNoteOrBuilder.java index e2e96e109edc..32be78c74319 100644 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNoteOrBuilder.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNoteOrBuilder.java @@ -1,113 +1,158 @@ +/* + * Copyright 2019 The Grafeas Authors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // Generated by the protocol buffer compiler. DO NOT EDIT! // source: grafeas/v1/vex.proto package io.grafeas.v1; -public interface VulnerabilityAssessmentNoteOrBuilder extends +public interface VulnerabilityAssessmentNoteOrBuilder + extends // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote) com.google.protobuf.MessageOrBuilder { /** + * + * *
    * The title of the note. E.g. `Vex-Debian-11.4`
    * 
* * string title = 1; + * * @return The title. */ java.lang.String getTitle(); /** + * + * *
    * The title of the note. E.g. `Vex-Debian-11.4`
    * 
* * string title = 1; + * * @return The bytes for title. */ - com.google.protobuf.ByteString - getTitleBytes(); + com.google.protobuf.ByteString getTitleBytes(); /** + * + * *
    * A one sentence description of this Vex.
    * 
* * string short_description = 2; + * * @return The shortDescription. */ java.lang.String getShortDescription(); /** + * + * *
    * A one sentence description of this Vex.
    * 
* * string short_description = 2; + * * @return The bytes for shortDescription. */ - com.google.protobuf.ByteString - getShortDescriptionBytes(); + com.google.protobuf.ByteString getShortDescriptionBytes(); /** + * + * *
    * A detailed description of this Vex.
    * 
* * string long_description = 3; + * * @return The longDescription. */ java.lang.String getLongDescription(); /** + * + * *
    * A detailed description of this Vex.
    * 
* * string long_description = 3; + * * @return The bytes for longDescription. */ - com.google.protobuf.ByteString - getLongDescriptionBytes(); + com.google.protobuf.ByteString getLongDescriptionBytes(); /** + * + * *
    * Identifies the language used by this document,
    * corresponding to IETF BCP 47 / RFC 5646.
    * 
* * string language_code = 4; + * * @return The languageCode. */ java.lang.String getLanguageCode(); /** + * + * *
    * Identifies the language used by this document,
    * corresponding to IETF BCP 47 / RFC 5646.
    * 
* * string language_code = 4; + * * @return The bytes for languageCode. */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); + com.google.protobuf.ByteString getLanguageCodeBytes(); /** + * + * *
    * Publisher details of this Note.
    * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * * @return Whether the publisher field is set. */ boolean hasPublisher(); /** + * + * *
    * Publisher details of this Note.
    * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * * @return The publisher. */ io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getPublisher(); /** + * + * *
    * Publisher details of this Note.
    * 
@@ -117,24 +162,32 @@ public interface VulnerabilityAssessmentNoteOrBuilder extends io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder getPublisherOrBuilder(); /** + * + * *
    * The product affected by this vex.
    * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * * @return Whether the product field is set. */ boolean hasProduct(); /** + * + * *
    * The product affected by this vex.
    * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * * @return The product. */ io.grafeas.v1.VulnerabilityAssessmentNote.Product getProduct(); /** + * + * *
    * The product affected by this vex.
    * 
@@ -144,24 +197,32 @@ public interface VulnerabilityAssessmentNoteOrBuilder extends io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder getProductOrBuilder(); /** + * + * *
    * Represents a vulnerability assessment for the product.
    * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * * @return Whether the assessment field is set. */ boolean hasAssessment(); /** + * + * *
    * Represents a vulnerability assessment for the product.
    * 
* * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * * @return The assessment. */ io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getAssessment(); /** + * + * *
    * Represents a vulnerability assessment for the product.
    * 
diff --git a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java index 9ecfc24ee89f..e3f429df6ec7 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java @@ -3060,6 +3060,2975 @@ public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getDefaultInstanceForT } } + public interface VexAssessmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityOccurrence.VexAssessment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * + * @return The cve. + */ + java.lang.String getCve(); + /** + * + * + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * + * @return The bytes for cve. + */ + com.google.protobuf.ByteString getCveBytes(); + + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + java.util.List getRelatedUrisList(); + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + io.grafeas.v1.RelatedUrl getRelatedUris(int index); + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + int getRelatedUrisCount(); + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + java.util.List getRelatedUrisOrBuilderList(); + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(int index); + + /** + * + * + *
+     * The VulnerabilityAssessment note from which this VexAssessment was
+     * generated.
+     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+     * 
+ * + * string note_name = 3; + * + * @return The noteName. + */ + java.lang.String getNoteName(); + /** + * + * + *
+     * The VulnerabilityAssessment note from which this VexAssessment was
+     * generated.
+     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+     * 
+ * + * string note_name = 3; + * + * @return The bytes for noteName. + */ + com.google.protobuf.ByteString getNoteNameBytes(); + + /** + * + * + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @return The state. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState(); + + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @return A list containing the impacts. + */ + java.util.List getImpactsList(); + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @return The count of impacts. + */ + int getImpactsCount(); + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @param index The index of the element to return. + * @return The impacts at the given index. + */ + java.lang.String getImpacts(int index); + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @param index The index of the value to return. + * @return The bytes of the impacts at the given index. + */ + com.google.protobuf.ByteString getImpactsBytes(int index); + + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + java.util.List + getRemediationsList(); + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index); + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + int getRemediationsCount(); + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + java.util.List< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + getRemediationsOrBuilderList(); + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder + getRemediationsOrBuilder(int index); + + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return Whether the justification field is set. + */ + boolean hasJustification(); + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return The justification. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification(); + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder + getJustificationOrBuilder(); + } + /** + * + * + *
+   * VexAssessment provides all publisher provided Vex information that is
+   * related to this vulnerability.
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.VexAssessment} + */ + public static final class VexAssessment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityOccurrence.VexAssessment) + VexAssessmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use VexAssessment.newBuilder() to construct. + private VexAssessment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VexAssessment() { + cve_ = ""; + relatedUris_ = java.util.Collections.emptyList(); + noteName_ = ""; + state_ = 0; + impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + remediations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VexAssessment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vulnerability + .internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability + .internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.class, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder.class); + } + + public static final int CVE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object cve_ = ""; + /** + * + * + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * + * @return The cve. + */ + @java.lang.Override + public java.lang.String getCve() { + java.lang.Object ref = cve_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cve_ = s; + return s; + } + } + /** + * + * + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * + * @return The bytes for cve. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCveBytes() { + java.lang.Object ref = cve_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cve_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATED_URIS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List relatedUris_; + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + @java.lang.Override + public java.util.List getRelatedUrisList() { + return relatedUris_; + } + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + @java.lang.Override + public java.util.List + getRelatedUrisOrBuilderList() { + return relatedUris_; + } + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + @java.lang.Override + public int getRelatedUrisCount() { + return relatedUris_.size(); + } + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrl getRelatedUris(int index) { + return relatedUris_.get(index); + } + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(int index) { + return relatedUris_.get(index); + } + + public static final int NOTE_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object noteName_ = ""; + /** + * + * + *
+     * The VulnerabilityAssessment note from which this VexAssessment was
+     * generated.
+     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+     * 
+ * + * string note_name = 3; + * + * @return The noteName. + */ + @java.lang.Override + public java.lang.String getNoteName() { + java.lang.Object ref = noteName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteName_ = s; + return s; + } + } + /** + * + * + *
+     * The VulnerabilityAssessment note from which this VexAssessment was
+     * generated.
+     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+     * 
+ * + * string note_name = 3; + * + * @return The bytes for noteName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNoteNameBytes() { + java.lang.Object ref = noteName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + noteName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + /** + * + * + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED + : result; + } + + public static final int IMPACTS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList impacts_; + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @return A list containing the impacts. + */ + public com.google.protobuf.ProtocolStringList getImpactsList() { + return impacts_; + } + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @return The count of impacts. + */ + public int getImpactsCount() { + return impacts_.size(); + } + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @param index The index of the element to return. + * @return The impacts at the given index. + */ + public java.lang.String getImpacts(int index) { + return impacts_.get(index); + } + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @param index The index of the value to return. + * @return The bytes of the impacts at the given index. + */ + public com.google.protobuf.ByteString getImpactsBytes(int index) { + return impacts_.getByteString(index); + } + + public static final int REMEDIATIONS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List + remediations_; + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + @java.lang.Override + public java.util.List + getRemediationsList() { + return remediations_; + } + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + @java.lang.Override + public java.util.List< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + getRemediationsOrBuilderList() { + return remediations_; + } + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + @java.lang.Override + public int getRemediationsCount() { + return remediations_.size(); + } + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations( + int index) { + return remediations_.get(index); + } + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder + getRemediationsOrBuilder(int index) { + return remediations_.get(index); + } + + public static final int JUSTIFICATION_FIELD_NUMBER = 7; + private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_; + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return Whether the justification field is set. + */ + @java.lang.Override + public boolean hasJustification() { + return justification_ != null; + } + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return The justification. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() { + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() + : justification_; + } + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder + getJustificationOrBuilder() { + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() + : justification_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cve_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cve_); + } + for (int i = 0; i < relatedUris_.size(); i++) { + output.writeMessage(2, relatedUris_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, noteName_); + } + if (state_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, state_); + } + for (int i = 0; i < impacts_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, impacts_.getRaw(i)); + } + for (int i = 0; i < remediations_.size(); i++) { + output.writeMessage(6, remediations_.get(i)); + } + if (justification_ != null) { + output.writeMessage(7, getJustification()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cve_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cve_); + } + for (int i = 0; i < relatedUris_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, relatedUris_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, noteName_); + } + if (state_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + { + int dataSize = 0; + for (int i = 0; i < impacts_.size(); i++) { + dataSize += computeStringSizeNoTag(impacts_.getRaw(i)); + } + size += dataSize; + size += 1 * getImpactsList().size(); + } + for (int i = 0; i < remediations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, remediations_.get(i)); + } + if (justification_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getJustification()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityOccurrence.VexAssessment)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment other = + (io.grafeas.v1.VulnerabilityOccurrence.VexAssessment) obj; + + if (!getCve().equals(other.getCve())) return false; + if (!getRelatedUrisList().equals(other.getRelatedUrisList())) return false; + if (!getNoteName().equals(other.getNoteName())) return false; + if (state_ != other.state_) return false; + if (!getImpactsList().equals(other.getImpactsList())) return false; + if (!getRemediationsList().equals(other.getRemediationsList())) return false; + if (hasJustification() != other.hasJustification()) return false; + if (hasJustification()) { + if (!getJustification().equals(other.getJustification())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CVE_FIELD_NUMBER; + hash = (53 * hash) + getCve().hashCode(); + if (getRelatedUrisCount() > 0) { + hash = (37 * hash) + RELATED_URIS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedUrisList().hashCode(); + } + hash = (37 * hash) + NOTE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getNoteName().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getImpactsCount() > 0) { + hash = (37 * hash) + IMPACTS_FIELD_NUMBER; + hash = (53 * hash) + getImpactsList().hashCode(); + } + if (getRemediationsCount() > 0) { + hash = (37 * hash) + REMEDIATIONS_FIELD_NUMBER; + hash = (53 * hash) + getRemediationsList().hashCode(); + } + if (hasJustification()) { + hash = (37 * hash) + JUSTIFICATION_FIELD_NUMBER; + hash = (53 * hash) + getJustification().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * VexAssessment provides all publisher provided Vex information that is
+     * related to this vulnerability.
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.VexAssessment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityOccurrence.VexAssessment) + io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vulnerability + .internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability + .internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.class, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cve_ = ""; + if (relatedUrisBuilder_ == null) { + relatedUris_ = java.util.Collections.emptyList(); + } else { + relatedUris_ = null; + relatedUrisBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + noteName_ = ""; + state_ = 0; + impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + if (remediationsBuilder_ == null) { + remediations_ = java.util.Collections.emptyList(); + } else { + remediations_ = null; + remediationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + justification_ = null; + if (justificationBuilder_ != null) { + justificationBuilder_.dispose(); + justificationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.grafeas.v1.Vulnerability + .internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment build() { + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment buildPartial() { + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result = + new io.grafeas.v1.VulnerabilityOccurrence.VexAssessment(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result) { + if (relatedUrisBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + relatedUris_ = java.util.Collections.unmodifiableList(relatedUris_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.relatedUris_ = relatedUris_; + } else { + result.relatedUris_ = relatedUrisBuilder_.build(); + } + if (((bitField0_ & 0x00000010) != 0)) { + impacts_ = impacts_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.impacts_ = impacts_; + if (remediationsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + remediations_ = java.util.Collections.unmodifiableList(remediations_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.remediations_ = remediations_; + } else { + result.remediations_ = remediationsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cve_ = cve_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.noteName_ = noteName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.justification_ = + justificationBuilder_ == null ? justification_ : justificationBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityOccurrence.VexAssessment) { + return mergeFrom((io.grafeas.v1.VulnerabilityOccurrence.VexAssessment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment other) { + if (other == io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance()) + return this; + if (!other.getCve().isEmpty()) { + cve_ = other.cve_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (relatedUrisBuilder_ == null) { + if (!other.relatedUris_.isEmpty()) { + if (relatedUris_.isEmpty()) { + relatedUris_ = other.relatedUris_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRelatedUrisIsMutable(); + relatedUris_.addAll(other.relatedUris_); + } + onChanged(); + } + } else { + if (!other.relatedUris_.isEmpty()) { + if (relatedUrisBuilder_.isEmpty()) { + relatedUrisBuilder_.dispose(); + relatedUrisBuilder_ = null; + relatedUris_ = other.relatedUris_; + bitField0_ = (bitField0_ & ~0x00000002); + relatedUrisBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRelatedUrisFieldBuilder() + : null; + } else { + relatedUrisBuilder_.addAllMessages(other.relatedUris_); + } + } + } + if (!other.getNoteName().isEmpty()) { + noteName_ = other.noteName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.impacts_.isEmpty()) { + if (impacts_.isEmpty()) { + impacts_ = other.impacts_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureImpactsIsMutable(); + impacts_.addAll(other.impacts_); + } + onChanged(); + } + if (remediationsBuilder_ == null) { + if (!other.remediations_.isEmpty()) { + if (remediations_.isEmpty()) { + remediations_ = other.remediations_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureRemediationsIsMutable(); + remediations_.addAll(other.remediations_); + } + onChanged(); + } + } else { + if (!other.remediations_.isEmpty()) { + if (remediationsBuilder_.isEmpty()) { + remediationsBuilder_.dispose(); + remediationsBuilder_ = null; + remediations_ = other.remediations_; + bitField0_ = (bitField0_ & ~0x00000020); + remediationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRemediationsFieldBuilder() + : null; + } else { + remediationsBuilder_.addAllMessages(other.remediations_); + } + } + } + if (other.hasJustification()) { + mergeJustification(other.getJustification()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + cve_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + io.grafeas.v1.RelatedUrl m = + input.readMessage(io.grafeas.v1.RelatedUrl.parser(), extensionRegistry); + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.add(m); + } else { + relatedUrisBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + noteName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureImpactsIsMutable(); + impacts_.add(s); + break; + } // case 42 + case 50: + { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation m = + input.readMessage( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.parser(), + extensionRegistry); + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.add(m); + } else { + remediationsBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + input.readMessage(getJustificationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object cve_ = ""; + /** + * + * + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * + * @return The cve. + */ + public java.lang.String getCve() { + java.lang.Object ref = cve_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cve_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * + * @return The bytes for cve. + */ + public com.google.protobuf.ByteString getCveBytes() { + java.lang.Object ref = cve_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cve_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * + * @param value The cve to set. + * @return This builder for chaining. + */ + public Builder setCve(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cve_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * + * @return This builder for chaining. + */ + public Builder clearCve() { + cve_ = getDefaultInstance().getCve(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * + * @param value The bytes for cve to set. + * @return This builder for chaining. + */ + public Builder setCveBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cve_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List relatedUris_ = + java.util.Collections.emptyList(); + + private void ensureRelatedUrisIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + relatedUris_ = new java.util.ArrayList(relatedUris_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder> + relatedUrisBuilder_; + + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public java.util.List getRelatedUrisList() { + if (relatedUrisBuilder_ == null) { + return java.util.Collections.unmodifiableList(relatedUris_); + } else { + return relatedUrisBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public int getRelatedUrisCount() { + if (relatedUrisBuilder_ == null) { + return relatedUris_.size(); + } else { + return relatedUrisBuilder_.getCount(); + } + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public io.grafeas.v1.RelatedUrl getRelatedUris(int index) { + if (relatedUrisBuilder_ == null) { + return relatedUris_.get(index); + } else { + return relatedUrisBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder setRelatedUris(int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrisIsMutable(); + relatedUris_.set(index, value); + onChanged(); + } else { + relatedUrisBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder setRelatedUris(int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.set(index, builderForValue.build()); + onChanged(); + } else { + relatedUrisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder addRelatedUris(io.grafeas.v1.RelatedUrl value) { + if (relatedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrisIsMutable(); + relatedUris_.add(value); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder addRelatedUris(int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrisIsMutable(); + relatedUris_.add(index, value); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder addRelatedUris(io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.add(builderForValue.build()); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder addRelatedUris(int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.add(index, builderForValue.build()); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder addAllRelatedUris( + java.lang.Iterable values) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relatedUris_); + onChanged(); + } else { + relatedUrisBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder clearRelatedUris() { + if (relatedUrisBuilder_ == null) { + relatedUris_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + relatedUrisBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder removeRelatedUris(int index) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.remove(index); + onChanged(); + } else { + relatedUrisBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public io.grafeas.v1.RelatedUrl.Builder getRelatedUrisBuilder(int index) { + return getRelatedUrisFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(int index) { + if (relatedUrisBuilder_ == null) { + return relatedUris_.get(index); + } else { + return relatedUrisBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public java.util.List + getRelatedUrisOrBuilderList() { + if (relatedUrisBuilder_ != null) { + return relatedUrisBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relatedUris_); + } + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder() { + return getRelatedUrisFieldBuilder() + .addBuilder(io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder(int index) { + return getRelatedUrisFieldBuilder() + .addBuilder(index, io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public java.util.List getRelatedUrisBuilderList() { + return getRelatedUrisFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder> + getRelatedUrisFieldBuilder() { + if (relatedUrisBuilder_ == null) { + relatedUrisBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder>( + relatedUris_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + relatedUris_ = null; + } + return relatedUrisBuilder_; + } + + private java.lang.Object noteName_ = ""; + /** + * + * + *
+       * The VulnerabilityAssessment note from which this VexAssessment was
+       * generated.
+       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+       * 
+ * + * string note_name = 3; + * + * @return The noteName. + */ + public java.lang.String getNoteName() { + java.lang.Object ref = noteName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The VulnerabilityAssessment note from which this VexAssessment was
+       * generated.
+       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+       * 
+ * + * string note_name = 3; + * + * @return The bytes for noteName. + */ + public com.google.protobuf.ByteString getNoteNameBytes() { + java.lang.Object ref = noteName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + noteName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The VulnerabilityAssessment note from which this VexAssessment was
+       * generated.
+       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+       * 
+ * + * string note_name = 3; + * + * @param value The noteName to set. + * @return This builder for chaining. + */ + public Builder setNoteName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + noteName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The VulnerabilityAssessment note from which this VexAssessment was
+       * generated.
+       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+       * 
+ * + * string note_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearNoteName() { + noteName_ = getDefaultInstance().getNoteName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The VulnerabilityAssessment note from which this VexAssessment was
+       * generated.
+       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+       * 
+ * + * string note_name = 3; + * + * @param value The bytes for noteName to set. + * @return This builder for chaining. + */ + public Builder setNoteNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + noteName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList impacts_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureImpactsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + impacts_ = new com.google.protobuf.LazyStringArrayList(impacts_); + bitField0_ |= 0x00000010; + } + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @return A list containing the impacts. + */ + public com.google.protobuf.ProtocolStringList getImpactsList() { + return impacts_.getUnmodifiableView(); + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @return The count of impacts. + */ + public int getImpactsCount() { + return impacts_.size(); + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @param index The index of the element to return. + * @return The impacts at the given index. + */ + public java.lang.String getImpacts(int index) { + return impacts_.get(index); + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @param index The index of the value to return. + * @return The bytes of the impacts at the given index. + */ + public com.google.protobuf.ByteString getImpactsBytes(int index) { + return impacts_.getByteString(index); + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @param index The index to set the value at. + * @param value The impacts to set. + * @return This builder for chaining. + */ + public Builder setImpacts(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureImpactsIsMutable(); + impacts_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @param value The impacts to add. + * @return This builder for chaining. + */ + public Builder addImpacts(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureImpactsIsMutable(); + impacts_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @param values The impacts to add. + * @return This builder for chaining. + */ + public Builder addAllImpacts(java.lang.Iterable values) { + ensureImpactsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, impacts_); + onChanged(); + return this; + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @return This builder for chaining. + */ + public Builder clearImpacts() { + impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @param value The bytes of the impacts to add. + * @return This builder for chaining. + */ + public Builder addImpactsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureImpactsIsMutable(); + impacts_.add(value); + onChanged(); + return this; + } + + private java.util.List + remediations_ = java.util.Collections.emptyList(); + + private void ensureRemediationsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + remediations_ = + new java.util.ArrayList< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation>(remediations_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + remediationsBuilder_; + + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public java.util.List + getRemediationsList() { + if (remediationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(remediations_); + } else { + return remediationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public int getRemediationsCount() { + if (remediationsBuilder_ == null) { + return remediations_.size(); + } else { + return remediationsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations( + int index) { + if (remediationsBuilder_ == null) { + return remediations_.get(index); + } else { + return remediationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder setRemediations( + int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + if (remediationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemediationsIsMutable(); + remediations_.set(index, value); + onChanged(); + } else { + remediationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder setRemediations( + int index, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + builderForValue) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.set(index, builderForValue.build()); + onChanged(); + } else { + remediationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder addRemediations( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + if (remediationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemediationsIsMutable(); + remediations_.add(value); + onChanged(); + } else { + remediationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder addRemediations( + int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + if (remediationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemediationsIsMutable(); + remediations_.add(index, value); + onChanged(); + } else { + remediationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder addRemediations( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + builderForValue) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.add(builderForValue.build()); + onChanged(); + } else { + remediationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder addRemediations( + int index, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + builderForValue) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.add(index, builderForValue.build()); + onChanged(); + } else { + remediationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder addAllRemediations( + java.lang.Iterable< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation> + values) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, remediations_); + onChanged(); + } else { + remediationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder clearRemediations() { + if (remediationsBuilder_ == null) { + remediations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + remediationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder removeRemediations(int index) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.remove(index); + onChanged(); + } else { + remediationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + getRemediationsBuilder(int index) { + return getRemediationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder + getRemediationsOrBuilder(int index) { + if (remediationsBuilder_ == null) { + return remediations_.get(index); + } else { + return remediationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public java.util.List< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + getRemediationsOrBuilderList() { + if (remediationsBuilder_ != null) { + return remediationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(remediations_); + } + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + addRemediationsBuilder() { + return getRemediationsFieldBuilder() + .addBuilder( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + .getDefaultInstance()); + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + addRemediationsBuilder(int index) { + return getRemediationsFieldBuilder() + .addBuilder( + index, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + .getDefaultInstance()); + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public java.util.List< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder> + getRemediationsBuilderList() { + return getRemediationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + getRemediationsFieldBuilder() { + if (remediationsBuilder_ == null) { + remediationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder>( + remediations_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + remediations_ = null; + } + return remediationsBuilder_; + } + + private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> + justificationBuilder_; + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return Whether the justification field is set. + */ + public boolean hasJustification() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return The justification. + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() { + if (justificationBuilder_ == null) { + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .getDefaultInstance() + : justification_; + } else { + return justificationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public Builder setJustification( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { + if (justificationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + justification_ = value; + } else { + justificationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public Builder setJustification( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder + builderForValue) { + if (justificationBuilder_ == null) { + justification_ = builderForValue.build(); + } else { + justificationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public Builder mergeJustification( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { + if (justificationBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && justification_ != null + && justification_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .getDefaultInstance()) { + getJustificationBuilder().mergeFrom(value); + } else { + justification_ = value; + } + } else { + justificationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public Builder clearJustification() { + bitField0_ = (bitField0_ & ~0x00000040); + justification_ = null; + if (justificationBuilder_ != null) { + justificationBuilder_.dispose(); + justificationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder + getJustificationBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getJustificationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder + getJustificationOrBuilder() { + if (justificationBuilder_ != null) { + return justificationBuilder_.getMessageOrBuilder(); + } else { + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .getDefaultInstance() + : justification_; + } + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> + getJustificationFieldBuilder() { + if (justificationBuilder_ == null) { + justificationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder>( + getJustification(), getParentForChildren(), isClean()); + justification_ = null; + } + return justificationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityOccurrence.VexAssessment) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityOccurrence.VexAssessment) + private static final io.grafeas.v1.VulnerabilityOccurrence.VexAssessment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityOccurrence.VexAssessment(); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VexAssessment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public static final int TYPE_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -3611,6 +6580,36 @@ public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; } + public static final int VEX_ASSESSMENT_FIELD_NUMBER = 13; + private io.grafeas.v1.VulnerabilityOccurrence.VexAssessment vexAssessment_; + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * + * @return Whether the vexAssessment field is set. + */ + @java.lang.Override + public boolean hasVexAssessment() { + return vexAssessment_ != null; + } + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * + * @return The vexAssessment. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getVexAssessment() { + return vexAssessment_ == null + ? io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() + : vexAssessment_; + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder getVexAssessmentOrBuilder() { + return vexAssessment_ == null + ? io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() + : vexAssessment_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3661,6 +6660,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (cvssV2_ != null) { output.writeMessage(12, getCvssV2()); } + if (vexAssessment_ != null) { + output.writeMessage(13, getVexAssessment()); + } getUnknownFields().writeTo(output); } @@ -3706,6 +6708,9 @@ public int getSerializedSize() { if (cvssV2_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getCvssV2()); } + if (vexAssessment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getVexAssessment()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3740,6 +6745,10 @@ public boolean equals(final java.lang.Object obj) { if (hasCvssV2()) { if (!getCvssV2().equals(other.getCvssV2())) return false; } + if (hasVexAssessment() != other.hasVexAssessment()) return false; + if (hasVexAssessment()) { + if (!getVexAssessment().equals(other.getVexAssessment())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3783,6 +6792,10 @@ public int hashCode() { hash = (37 * hash) + CVSS_V2_FIELD_NUMBER; hash = (53 * hash) + getCvssV2().hashCode(); } + if (hasVexAssessment()) { + hash = (37 * hash) + VEX_ASSESSMENT_FIELD_NUMBER; + hash = (53 * hash) + getVexAssessment().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -3953,6 +6966,11 @@ public Builder clear() { cvssV2Builder_.dispose(); cvssV2Builder_ = null; } + vexAssessment_ = null; + if (vexAssessmentBuilder_ != null) { + vexAssessmentBuilder_.dispose(); + vexAssessmentBuilder_ = null; + } return this; } @@ -4041,6 +7059,10 @@ private void buildPartial0(io.grafeas.v1.VulnerabilityOccurrence result) { if (((from_bitField0_ & 0x00000800) != 0)) { result.cvssV2_ = cvssV2Builder_ == null ? cvssV2_ : cvssV2Builder_.build(); } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.vexAssessment_ = + vexAssessmentBuilder_ == null ? vexAssessment_ : vexAssessmentBuilder_.build(); + } } @java.lang.Override @@ -4178,6 +7200,9 @@ public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence other) { if (other.hasCvssV2()) { mergeCvssV2(other.getCvssV2()); } + if (other.hasVexAssessment()) { + mergeVexAssessment(other.getVexAssessment()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -4290,6 +7315,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000800; break; } // case 98 + case 106: + { + input.readMessage(getVexAssessmentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6122,6 +9153,124 @@ public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { return cvssV2Builder_; } + private io.grafeas.v1.VulnerabilityOccurrence.VexAssessment vexAssessment_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder> + vexAssessmentBuilder_; + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * + * @return Whether the vexAssessment field is set. + */ + public boolean hasVexAssessment() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * + * @return The vexAssessment. + */ + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getVexAssessment() { + if (vexAssessmentBuilder_ == null) { + return vexAssessment_ == null + ? io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() + : vexAssessment_; + } else { + return vexAssessmentBuilder_.getMessage(); + } + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + public Builder setVexAssessment(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment value) { + if (vexAssessmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vexAssessment_ = value; + } else { + vexAssessmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + public Builder setVexAssessment( + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder builderForValue) { + if (vexAssessmentBuilder_ == null) { + vexAssessment_ = builderForValue.build(); + } else { + vexAssessmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + public Builder mergeVexAssessment(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment value) { + if (vexAssessmentBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && vexAssessment_ != null + && vexAssessment_ + != io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance()) { + getVexAssessmentBuilder().mergeFrom(value); + } else { + vexAssessment_ = value; + } + } else { + vexAssessmentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + public Builder clearVexAssessment() { + bitField0_ = (bitField0_ & ~0x00001000); + vexAssessment_ = null; + if (vexAssessmentBuilder_ != null) { + vexAssessmentBuilder_.dispose(); + vexAssessmentBuilder_ = null; + } + onChanged(); + return this; + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder getVexAssessmentBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getVexAssessmentFieldBuilder().getBuilder(); + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder + getVexAssessmentOrBuilder() { + if (vexAssessmentBuilder_ != null) { + return vexAssessmentBuilder_.getMessageOrBuilder(); + } else { + return vexAssessment_ == null + ? io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() + : vexAssessment_; + } + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder> + getVexAssessmentFieldBuilder() { + if (vexAssessmentBuilder_ == null) { + vexAssessmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder>( + getVexAssessment(), getParentForChildren(), isClean()); + vexAssessment_ = null; + } + return vexAssessmentBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java index 307f94b67cdf..550f31d4b9e4 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java @@ -398,4 +398,19 @@ public interface VulnerabilityOccurrenceOrBuilder * .grafeas.v1.CVSS cvss_v2 = 12; */ io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder(); + + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * + * @return Whether the vexAssessment field is set. + */ + boolean hasVexAssessment(); + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * + * @return The vexAssessment. + */ + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getVexAssessment(); + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder getVexAssessmentOrBuilder(); } diff --git a/java-grafeas/src/main/proto/grafeas/v1/common.proto b/java-grafeas/src/main/proto/grafeas/v1/common.proto index 80bd7869968a..1464ecc9be2d 100644 --- a/java-grafeas/src/main/proto/grafeas/v1/common.proto +++ b/java-grafeas/src/main/proto/grafeas/v1/common.proto @@ -45,6 +45,8 @@ enum NoteKind { COMPLIANCE = 9; // This represents a DSSE attestation Note DSSE_ATTESTATION = 10; + // This represents a Vulnerability Assessment. + VULNERABILITY_ASSESSMENT = 11; } // Metadata for any related URL information. diff --git a/java-grafeas/src/main/proto/grafeas/v1/grafeas.proto b/java-grafeas/src/main/proto/grafeas/v1/grafeas.proto index 5665fe3623e6..5ec930e6ef3d 100644 --- a/java-grafeas/src/main/proto/grafeas/v1/grafeas.proto +++ b/java-grafeas/src/main/proto/grafeas/v1/grafeas.proto @@ -33,6 +33,7 @@ import "grafeas/v1/dsse_attestation.proto"; import "grafeas/v1/image.proto"; import "grafeas/v1/package.proto"; import "grafeas/v1/upgrade.proto"; +import "grafeas/v1/vex.proto"; import "grafeas/v1/vulnerability.proto"; option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; @@ -314,6 +315,8 @@ message Note { grafeas.v1.ComplianceNote compliance = 18; // A note describing a dsse attestation note. grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + // A note describing a vulnerability assessment. + grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; } } diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vex.proto b/java-grafeas/src/main/proto/grafeas/v1/vex.proto similarity index 100% rename from owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vex.proto rename to java-grafeas/src/main/proto/grafeas/v1/vex.proto diff --git a/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto b/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto index 99abf3be7a23..3b316eb8dd37 100644 --- a/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto +++ b/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto @@ -22,6 +22,7 @@ import "grafeas/v1/common.proto"; import "grafeas/v1/cvss.proto"; import "grafeas/v1/package.proto"; import "grafeas/v1/severity.proto"; +import "grafeas/v1/vex.proto"; option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; option java_multiple_files = true; @@ -253,5 +254,44 @@ message VulnerabilityOccurrence { // The cvss v2 score for the vulnerability. CVSS cvss_v2 = 12; - // Next free ID is 13. + // VexAssessment provides all publisher provided Vex information that is + // related to this vulnerability. + message VexAssessment { + // Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) + // tracking number for the vulnerability. + string cve = 1; + + // Holds a list of references associated with this vulnerability item and + // assessment. + repeated grafeas.v1.RelatedUrl related_uris = 2; + + // The VulnerabilityAssessment note from which this VexAssessment was + // generated. + // This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`. + // (-- api-linter: core::0122::name-suffix=disabled + // aip.dev/not-precedent: The suffix is kept for consistency. --) + string note_name = 3; + + // Provides the state of this Vulnerability assessment. + grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + + // Contains information about the impact of this vulnerability, + // this will change with time. + repeated string impacts = 5; + + // Specifies details on how to handle (and presumably, fix) a vulnerability. + repeated grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + remediations = 6; + + // Justification provides the justification when the state of the + // assessment if NOT_AFFECTED. + grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + justification = 7; + + // Next ID: 8 + } + + VexAssessment vex_assessment = 13; + + // Next free ID is 14. } diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java deleted file mode 100644 index 12e573038b9c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContext.java +++ /dev/null @@ -1,866 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * An alias to a repo revision.
- * 
- * - * Protobuf type {@code grafeas.v1.AliasContext} - */ -public final class AliasContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.AliasContext) - AliasContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use AliasContext.newBuilder() to construct. - private AliasContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AliasContext() { - kind_ = 0; - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AliasContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AliasContext.class, io.grafeas.v1.AliasContext.Builder.class); - } - - /** - *
-   * The type of an alias.
-   * 
- * - * Protobuf enum {@code grafeas.v1.AliasContext.Kind} - */ - public enum Kind - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown.
-     * 
- * - * KIND_UNSPECIFIED = 0; - */ - KIND_UNSPECIFIED(0), - /** - *
-     * Git tag.
-     * 
- * - * FIXED = 1; - */ - FIXED(1), - /** - *
-     * Git branch.
-     * 
- * - * MOVABLE = 2; - */ - MOVABLE(2), - /** - *
-     * Used to specify non-standard aliases. For example, if a Git repo has a
-     * ref named "refs/foo/bar".
-     * 
- * - * OTHER = 4; - */ - OTHER(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unknown.
-     * 
- * - * KIND_UNSPECIFIED = 0; - */ - public static final int KIND_UNSPECIFIED_VALUE = 0; - /** - *
-     * Git tag.
-     * 
- * - * FIXED = 1; - */ - public static final int FIXED_VALUE = 1; - /** - *
-     * Git branch.
-     * 
- * - * MOVABLE = 2; - */ - public static final int MOVABLE_VALUE = 2; - /** - *
-     * Used to specify non-standard aliases. For example, if a Git repo has a
-     * ref named "refs/foo/bar".
-     * 
- * - * OTHER = 4; - */ - public static final int OTHER_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Kind valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Kind forNumber(int value) { - switch (value) { - case 0: return KIND_UNSPECIFIED; - case 1: return FIXED; - case 2: return MOVABLE; - case 4: return OTHER; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Kind> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Kind findValueByNumber(int number) { - return Kind.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.AliasContext.getDescriptor().getEnumTypes().get(0); - } - - private static final Kind[] VALUES = values(); - - public static Kind valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Kind(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.AliasContext.Kind) - } - - public static final int KIND_FIELD_NUMBER = 1; - private int kind_ = 0; - /** - *
-   * The alias kind.
-   * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-   * The alias kind.
-   * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @return The kind. - */ - @java.lang.Override public io.grafeas.v1.AliasContext.Kind getKind() { - io.grafeas.v1.AliasContext.Kind result = io.grafeas.v1.AliasContext.Kind.forNumber(kind_); - return result == null ? io.grafeas.v1.AliasContext.Kind.UNRECOGNIZED : result; - } - - public static final int NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The alias name.
-   * 
- * - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The alias name.
-   * 
- * - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kind_ != io.grafeas.v1.AliasContext.Kind.KIND_UNSPECIFIED.getNumber()) { - output.writeEnum(1, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kind_ != io.grafeas.v1.AliasContext.Kind.KIND_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.AliasContext)) { - return super.equals(obj); - } - io.grafeas.v1.AliasContext other = (io.grafeas.v1.AliasContext) obj; - - if (kind_ != other.kind_) return false; - if (!getName() - .equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + KIND_FIELD_NUMBER; - hash = (53 * hash) + kind_; - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.AliasContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AliasContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AliasContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AliasContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AliasContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AliasContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AliasContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AliasContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AliasContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.AliasContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AliasContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AliasContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.AliasContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An alias to a repo revision.
-   * 
- * - * Protobuf type {@code grafeas.v1.AliasContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.AliasContext) - io.grafeas.v1.AliasContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AliasContext.class, io.grafeas.v1.AliasContext.Builder.class); - } - - // Construct using io.grafeas.v1.AliasContext.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - kind_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.AliasContext getDefaultInstanceForType() { - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.AliasContext build() { - io.grafeas.v1.AliasContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.AliasContext buildPartial() { - io.grafeas.v1.AliasContext result = new io.grafeas.v1.AliasContext(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.AliasContext result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.kind_ = kind_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.AliasContext) { - return mergeFrom((io.grafeas.v1.AliasContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.AliasContext other) { - if (other == io.grafeas.v1.AliasContext.getDefaultInstance()) return this; - if (other.kind_ != 0) { - setKindValue(other.getKindValue()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - kind_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int kind_ = 0; - /** - *
-     * The alias kind.
-     * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-     * The alias kind.
-     * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @param value The enum numeric value on the wire for kind to set. - * @return This builder for chaining. - */ - public Builder setKindValue(int value) { - kind_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The alias kind.
-     * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @return The kind. - */ - @java.lang.Override - public io.grafeas.v1.AliasContext.Kind getKind() { - io.grafeas.v1.AliasContext.Kind result = io.grafeas.v1.AliasContext.Kind.forNumber(kind_); - return result == null ? io.grafeas.v1.AliasContext.Kind.UNRECOGNIZED : result; - } - /** - *
-     * The alias kind.
-     * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @param value The kind to set. - * @return This builder for chaining. - */ - public Builder setKind(io.grafeas.v1.AliasContext.Kind value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - kind_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The alias kind.
-     * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @return This builder for chaining. - */ - public Builder clearKind() { - bitField0_ = (bitField0_ & ~0x00000001); - kind_ = 0; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * The alias name.
-     * 
- * - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The alias name.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The alias name.
-     * 
- * - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The alias name.
-     * 
- * - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The alias name.
-     * 
- * - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.AliasContext) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.AliasContext) - private static final io.grafeas.v1.AliasContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.AliasContext(); - } - - public static io.grafeas.v1.AliasContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AliasContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.AliasContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java deleted file mode 100644 index 18b16f1a420a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AliasContextOrBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface AliasContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.AliasContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The alias kind.
-   * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @return The enum numeric value on the wire for kind. - */ - int getKindValue(); - /** - *
-   * The alias kind.
-   * 
- * - * .grafeas.v1.AliasContext.Kind kind = 1; - * @return The kind. - */ - io.grafeas.v1.AliasContext.Kind getKind(); - - /** - *
-   * The alias name.
-   * 
- * - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The alias name.
-   * 
- * - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java deleted file mode 100644 index 740aa9f3ebd0..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Architecture.java +++ /dev/null @@ -1,150 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -/** - *
- * Instruction set architectures supported by various package managers.
- * 
- * - * Protobuf enum {@code grafeas.v1.Architecture} - */ -public enum Architecture - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unknown architecture.
-   * 
- * - * ARCHITECTURE_UNSPECIFIED = 0; - */ - ARCHITECTURE_UNSPECIFIED(0), - /** - *
-   * X86 architecture.
-   * 
- * - * X86 = 1; - */ - X86(1), - /** - *
-   * X64 architecture.
-   * 
- * - * X64 = 2; - */ - X64(2), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unknown architecture.
-   * 
- * - * ARCHITECTURE_UNSPECIFIED = 0; - */ - public static final int ARCHITECTURE_UNSPECIFIED_VALUE = 0; - /** - *
-   * X86 architecture.
-   * 
- * - * X86 = 1; - */ - public static final int X86_VALUE = 1; - /** - *
-   * X64 architecture.
-   * 
- * - * X64 = 2; - */ - public static final int X64_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Architecture valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Architecture forNumber(int value) { - switch (value) { - case 0: return ARCHITECTURE_UNSPECIFIED; - case 1: return X86; - case 2: return X64; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Architecture> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Architecture findValueByNumber(int number) { - return Architecture.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.Package.getDescriptor().getEnumTypes().get(0); - } - - private static final Architecture[] VALUES = values(); - - public static Architecture valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Architecture(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.Architecture) -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java deleted file mode 100644 index f1fec349b1e6..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Artifact.java +++ /dev/null @@ -1,1047 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * Artifact describes a build product.
- * 
- * - * Protobuf type {@code grafeas.v1.Artifact} - */ -public final class Artifact extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Artifact) - ArtifactOrBuilder { -private static final long serialVersionUID = 0L; - // Use Artifact.newBuilder() to construct. - private Artifact(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Artifact() { - checksum_ = ""; - id_ = ""; - names_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Artifact(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Artifact.class, io.grafeas.v1.Artifact.Builder.class); - } - - public static final int CHECKSUM_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object checksum_ = ""; - /** - *
-   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-   * container.
-   * 
- * - * string checksum = 1; - * @return The checksum. - */ - @java.lang.Override - public java.lang.String getChecksum() { - java.lang.Object ref = checksum_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - checksum_ = s; - return s; - } - } - /** - *
-   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-   * container.
-   * 
- * - * string checksum = 1; - * @return The bytes for checksum. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getChecksumBytes() { - java.lang.Object ref = checksum_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - checksum_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * Artifact ID, if any; for container images, this will be a URL by digest
-   * like `gcr.io/projectID/imagename@sha256:123456`.
-   * 
- * - * string id = 2; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * Artifact ID, if any; for container images, this will be a URL by digest
-   * like `gcr.io/projectID/imagename@sha256:123456`.
-   * 
- * - * string id = 2; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAMES_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList names_; - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @return A list containing the names. - */ - public com.google.protobuf.ProtocolStringList - getNamesList() { - return names_; - } - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @return The count of names. - */ - public int getNamesCount() { - return names_.size(); - } - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @param index The index of the element to return. - * @return The names at the given index. - */ - public java.lang.String getNames(int index) { - return names_.get(index); - } - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @param index The index of the value to return. - * @return The bytes of the names at the given index. - */ - public com.google.protobuf.ByteString - getNamesBytes(int index) { - return names_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(checksum_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, checksum_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); - } - for (int i = 0; i < names_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, names_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(checksum_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, checksum_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); - } - { - int dataSize = 0; - for (int i = 0; i < names_.size(); i++) { - dataSize += computeStringSizeNoTag(names_.getRaw(i)); - } - size += dataSize; - size += 1 * getNamesList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Artifact)) { - return super.equals(obj); - } - io.grafeas.v1.Artifact other = (io.grafeas.v1.Artifact) obj; - - if (!getChecksum() - .equals(other.getChecksum())) return false; - if (!getId() - .equals(other.getId())) return false; - if (!getNamesList() - .equals(other.getNamesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CHECKSUM_FIELD_NUMBER; - hash = (53 * hash) + getChecksum().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (getNamesCount() > 0) { - hash = (37 * hash) + NAMES_FIELD_NUMBER; - hash = (53 * hash) + getNamesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Artifact parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Artifact parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Artifact parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Artifact parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Artifact parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Artifact parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Artifact parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Artifact parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Artifact parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Artifact parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Artifact parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Artifact parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Artifact prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Artifact describes a build product.
-   * 
- * - * Protobuf type {@code grafeas.v1.Artifact} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Artifact) - io.grafeas.v1.ArtifactOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Artifact.class, io.grafeas.v1.Artifact.Builder.class); - } - - // Construct using io.grafeas.v1.Artifact.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - checksum_ = ""; - id_ = ""; - names_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Artifact_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Artifact getDefaultInstanceForType() { - return io.grafeas.v1.Artifact.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Artifact build() { - io.grafeas.v1.Artifact result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Artifact buildPartial() { - io.grafeas.v1.Artifact result = new io.grafeas.v1.Artifact(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.Artifact result) { - if (((bitField0_ & 0x00000004) != 0)) { - names_ = names_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.names_ = names_; - } - - private void buildPartial0(io.grafeas.v1.Artifact result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.checksum_ = checksum_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Artifact) { - return mergeFrom((io.grafeas.v1.Artifact)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Artifact other) { - if (other == io.grafeas.v1.Artifact.getDefaultInstance()) return this; - if (!other.getChecksum().isEmpty()) { - checksum_ = other.checksum_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.names_.isEmpty()) { - if (names_.isEmpty()) { - names_ = other.names_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureNamesIsMutable(); - names_.addAll(other.names_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - checksum_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - ensureNamesIsMutable(); - names_.add(s); - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object checksum_ = ""; - /** - *
-     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-     * container.
-     * 
- * - * string checksum = 1; - * @return The checksum. - */ - public java.lang.String getChecksum() { - java.lang.Object ref = checksum_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - checksum_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-     * container.
-     * 
- * - * string checksum = 1; - * @return The bytes for checksum. - */ - public com.google.protobuf.ByteString - getChecksumBytes() { - java.lang.Object ref = checksum_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - checksum_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-     * container.
-     * 
- * - * string checksum = 1; - * @param value The checksum to set. - * @return This builder for chaining. - */ - public Builder setChecksum( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - checksum_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-     * container.
-     * 
- * - * string checksum = 1; - * @return This builder for chaining. - */ - public Builder clearChecksum() { - checksum_ = getDefaultInstance().getChecksum(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-     * container.
-     * 
- * - * string checksum = 1; - * @param value The bytes for checksum to set. - * @return This builder for chaining. - */ - public Builder setChecksumBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - checksum_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object id_ = ""; - /** - *
-     * Artifact ID, if any; for container images, this will be a URL by digest
-     * like `gcr.io/projectID/imagename@sha256:123456`.
-     * 
- * - * string id = 2; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Artifact ID, if any; for container images, this will be a URL by digest
-     * like `gcr.io/projectID/imagename@sha256:123456`.
-     * 
- * - * string id = 2; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Artifact ID, if any; for container images, this will be a URL by digest
-     * like `gcr.io/projectID/imagename@sha256:123456`.
-     * 
- * - * string id = 2; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Artifact ID, if any; for container images, this will be a URL by digest
-     * like `gcr.io/projectID/imagename@sha256:123456`.
-     * 
- * - * string id = 2; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Artifact ID, if any; for container images, this will be a URL by digest
-     * like `gcr.io/projectID/imagename@sha256:123456`.
-     * 
- * - * string id = 2; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList names_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureNamesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - names_ = new com.google.protobuf.LazyStringArrayList(names_); - bitField0_ |= 0x00000004; - } - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @return A list containing the names. - */ - public com.google.protobuf.ProtocolStringList - getNamesList() { - return names_.getUnmodifiableView(); - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @return The count of names. - */ - public int getNamesCount() { - return names_.size(); - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @param index The index of the element to return. - * @return The names at the given index. - */ - public java.lang.String getNames(int index) { - return names_.get(index); - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @param index The index of the value to return. - * @return The bytes of the names at the given index. - */ - public com.google.protobuf.ByteString - getNamesBytes(int index) { - return names_.getByteString(index); - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @param index The index to set the value at. - * @param value The names to set. - * @return This builder for chaining. - */ - public Builder setNames( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureNamesIsMutable(); - names_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @param value The names to add. - * @return This builder for chaining. - */ - public Builder addNames( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureNamesIsMutable(); - names_.add(value); - onChanged(); - return this; - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @param values The names to add. - * @return This builder for chaining. - */ - public Builder addAllNames( - java.lang.Iterable values) { - ensureNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, names_); - onChanged(); - return this; - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @return This builder for chaining. - */ - public Builder clearNames() { - names_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * Related artifact names. This may be the path to a binary or jar file, or in
-     * the case of a container build, the name used to push the container image to
-     * Google Container Registry, as presented to `docker push`. Note that a
-     * single Artifact ID can have multiple names, for example if two tags are
-     * applied to one image.
-     * 
- * - * repeated string names = 3; - * @param value The bytes of the names to add. - * @return This builder for chaining. - */ - public Builder addNamesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureNamesIsMutable(); - names_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Artifact) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Artifact) - private static final io.grafeas.v1.Artifact DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Artifact(); - } - - public static io.grafeas.v1.Artifact getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Artifact parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Artifact getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java deleted file mode 100644 index c60add69d210..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ArtifactOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface ArtifactOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Artifact) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-   * container.
-   * 
- * - * string checksum = 1; - * @return The checksum. - */ - java.lang.String getChecksum(); - /** - *
-   * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
-   * container.
-   * 
- * - * string checksum = 1; - * @return The bytes for checksum. - */ - com.google.protobuf.ByteString - getChecksumBytes(); - - /** - *
-   * Artifact ID, if any; for container images, this will be a URL by digest
-   * like `gcr.io/projectID/imagename@sha256:123456`.
-   * 
- * - * string id = 2; - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * Artifact ID, if any; for container images, this will be a URL by digest
-   * like `gcr.io/projectID/imagename@sha256:123456`.
-   * 
- * - * string id = 2; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @return A list containing the names. - */ - java.util.List - getNamesList(); - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @return The count of names. - */ - int getNamesCount(); - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @param index The index of the element to return. - * @return The names at the given index. - */ - java.lang.String getNames(int index); - /** - *
-   * Related artifact names. This may be the path to a binary or jar file, or in
-   * the case of a container build, the name used to push the container image to
-   * Google Container Registry, as presented to `docker push`. Note that a
-   * single Artifact ID can have multiple names, for example if two tags are
-   * applied to one image.
-   * 
- * - * repeated string names = 3; - * @param index The index of the value to return. - * @return The bytes of the names at the given index. - */ - com.google.protobuf.ByteString - getNamesBytes(int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java deleted file mode 100644 index ba5a83c6bff3..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Attestation.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/attestation.proto - -package io.grafeas.v1; - -public final class Attestation { - private Attestation() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_AttestationNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_AttestationNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_AttestationNote_Hint_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Jwt_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Jwt_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_AttestationOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\034grafeas/v1/attestation.proto\022\ngrafeas." + - "v1\032\027grafeas/v1/common.proto\"f\n\017Attestati" + - "onNote\022.\n\004hint\030\001 \001(\0132 .grafeas.v1.Attest" + - "ationNote.Hint\032#\n\004Hint\022\033\n\023human_readable" + - "_name\030\001 \001(\t\"\032\n\003Jwt\022\023\n\013compact_jwt\030\001 \001(\t\"" + - "}\n\025AttestationOccurrence\022\032\n\022serialized_p" + - "ayload\030\001 \001(\014\022)\n\nsignatures\030\002 \003(\0132\025.grafe" + - "as.v1.Signature\022\035\n\004jwts\030\003 \003(\0132\017.grafeas." + - "v1.JwtBQ\n\rio.grafeas.v1P\001Z8google.golang" + - ".org/genproto/googleapis/grafeas/v1;graf" + - "eas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.grafeas.v1.Common.getDescriptor(), - }); - internal_static_grafeas_v1_AttestationNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_AttestationNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_AttestationNote_descriptor, - new java.lang.String[] { "Hint", }); - internal_static_grafeas_v1_AttestationNote_Hint_descriptor = - internal_static_grafeas_v1_AttestationNote_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_AttestationNote_Hint_descriptor, - new java.lang.String[] { "HumanReadableName", }); - internal_static_grafeas_v1_Jwt_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Jwt_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Jwt_descriptor, - new java.lang.String[] { "CompactJwt", }); - internal_static_grafeas_v1_AttestationOccurrence_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_AttestationOccurrence_descriptor, - new java.lang.String[] { "SerializedPayload", "Signatures", "Jwts", }); - io.grafeas.v1.Common.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java deleted file mode 100644 index 05af36fada4c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNote.java +++ /dev/null @@ -1,1279 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/attestation.proto - -package io.grafeas.v1; - -/** - *
- * Note kind that represents a logical attestation "role" or "authority". For
- * example, an organization might have one `Authority` for "QA" and one for
- * "build". This note is intended to act strictly as a grouping mechanism for
- * the attached occurrences (Attestations). This grouping mechanism also
- * provides a security boundary, since IAM ACLs gate the ability for a principle
- * to attach an occurrence to a given note. It also provides a single point of
- * lookup to find all attached attestation occurrences, even if they don't all
- * live in the same project.
- * 
- * - * Protobuf type {@code grafeas.v1.AttestationNote} - */ -public final class AttestationNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.AttestationNote) - AttestationNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use AttestationNote.newBuilder() to construct. - private AttestationNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AttestationNote() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AttestationNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AttestationNote.class, io.grafeas.v1.AttestationNote.Builder.class); - } - - public interface HintOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.AttestationNote.Hint) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "qa".
-     * 
- * - * string human_readable_name = 1; - * @return The humanReadableName. - */ - java.lang.String getHumanReadableName(); - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "qa".
-     * 
- * - * string human_readable_name = 1; - * @return The bytes for humanReadableName. - */ - com.google.protobuf.ByteString - getHumanReadableNameBytes(); - } - /** - *
-   * This submessage provides human-readable hints about the purpose of the
-   * authority. Because the name of a note acts as its resource reference, it is
-   * important to disambiguate the canonical name of the Note (which might be a
-   * UUID for security purposes) from "readable" names more suitable for debug
-   * output. Note that these hints should not be used to look up authorities in
-   * security sensitive contexts, such as when looking up attestations to
-   * verify.
-   * 
- * - * Protobuf type {@code grafeas.v1.AttestationNote.Hint} - */ - public static final class Hint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.AttestationNote.Hint) - HintOrBuilder { - private static final long serialVersionUID = 0L; - // Use Hint.newBuilder() to construct. - private Hint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Hint() { - humanReadableName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Hint(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AttestationNote.Hint.class, io.grafeas.v1.AttestationNote.Hint.Builder.class); - } - - public static final int HUMAN_READABLE_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object humanReadableName_ = ""; - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "qa".
-     * 
- * - * string human_readable_name = 1; - * @return The humanReadableName. - */ - @java.lang.Override - public java.lang.String getHumanReadableName() { - java.lang.Object ref = humanReadableName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - humanReadableName_ = s; - return s; - } - } - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "qa".
-     * 
- * - * string human_readable_name = 1; - * @return The bytes for humanReadableName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getHumanReadableNameBytes() { - java.lang.Object ref = humanReadableName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - humanReadableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, humanReadableName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, humanReadableName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.AttestationNote.Hint)) { - return super.equals(obj); - } - io.grafeas.v1.AttestationNote.Hint other = (io.grafeas.v1.AttestationNote.Hint) obj; - - if (!getHumanReadableName() - .equals(other.getHumanReadableName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HUMAN_READABLE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getHumanReadableName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote.Hint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationNote.Hint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationNote.Hint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.AttestationNote.Hint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * This submessage provides human-readable hints about the purpose of the
-     * authority. Because the name of a note acts as its resource reference, it is
-     * important to disambiguate the canonical name of the Note (which might be a
-     * UUID for security purposes) from "readable" names more suitable for debug
-     * output. Note that these hints should not be used to look up authorities in
-     * security sensitive contexts, such as when looking up attestations to
-     * verify.
-     * 
- * - * Protobuf type {@code grafeas.v1.AttestationNote.Hint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.AttestationNote.Hint) - io.grafeas.v1.AttestationNote.HintOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AttestationNote.Hint.class, io.grafeas.v1.AttestationNote.Hint.Builder.class); - } - - // Construct using io.grafeas.v1.AttestationNote.Hint.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - humanReadableName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_Hint_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote.Hint getDefaultInstanceForType() { - return io.grafeas.v1.AttestationNote.Hint.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote.Hint build() { - io.grafeas.v1.AttestationNote.Hint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote.Hint buildPartial() { - io.grafeas.v1.AttestationNote.Hint result = new io.grafeas.v1.AttestationNote.Hint(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.AttestationNote.Hint result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.humanReadableName_ = humanReadableName_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.AttestationNote.Hint) { - return mergeFrom((io.grafeas.v1.AttestationNote.Hint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.AttestationNote.Hint other) { - if (other == io.grafeas.v1.AttestationNote.Hint.getDefaultInstance()) return this; - if (!other.getHumanReadableName().isEmpty()) { - humanReadableName_ = other.humanReadableName_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - humanReadableName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object humanReadableName_ = ""; - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "qa".
-       * 
- * - * string human_readable_name = 1; - * @return The humanReadableName. - */ - public java.lang.String getHumanReadableName() { - java.lang.Object ref = humanReadableName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - humanReadableName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "qa".
-       * 
- * - * string human_readable_name = 1; - * @return The bytes for humanReadableName. - */ - public com.google.protobuf.ByteString - getHumanReadableNameBytes() { - java.lang.Object ref = humanReadableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - humanReadableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "qa".
-       * 
- * - * string human_readable_name = 1; - * @param value The humanReadableName to set. - * @return This builder for chaining. - */ - public Builder setHumanReadableName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - humanReadableName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "qa".
-       * 
- * - * string human_readable_name = 1; - * @return This builder for chaining. - */ - public Builder clearHumanReadableName() { - humanReadableName_ = getDefaultInstance().getHumanReadableName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "qa".
-       * 
- * - * string human_readable_name = 1; - * @param value The bytes for humanReadableName to set. - * @return This builder for chaining. - */ - public Builder setHumanReadableNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - humanReadableName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.AttestationNote.Hint) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.AttestationNote.Hint) - private static final io.grafeas.v1.AttestationNote.Hint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.AttestationNote.Hint(); - } - - public static io.grafeas.v1.AttestationNote.Hint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Hint parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote.Hint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int HINT_FIELD_NUMBER = 1; - private io.grafeas.v1.AttestationNote.Hint hint_; - /** - *
-   * Hint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - * @return Whether the hint field is set. - */ - @java.lang.Override - public boolean hasHint() { - return hint_ != null; - } - /** - *
-   * Hint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - * @return The hint. - */ - @java.lang.Override - public io.grafeas.v1.AttestationNote.Hint getHint() { - return hint_ == null ? io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; - } - /** - *
-   * Hint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - @java.lang.Override - public io.grafeas.v1.AttestationNote.HintOrBuilder getHintOrBuilder() { - return hint_ == null ? io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (hint_ != null) { - output.writeMessage(1, getHint()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (hint_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getHint()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.AttestationNote)) { - return super.equals(obj); - } - io.grafeas.v1.AttestationNote other = (io.grafeas.v1.AttestationNote) obj; - - if (hasHint() != other.hasHint()) return false; - if (hasHint()) { - if (!getHint() - .equals(other.getHint())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasHint()) { - hash = (37 * hash) + HINT_FIELD_NUMBER; - hash = (53 * hash) + getHint().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.AttestationNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AttestationNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.AttestationNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Note kind that represents a logical attestation "role" or "authority". For
-   * example, an organization might have one `Authority` for "QA" and one for
-   * "build". This note is intended to act strictly as a grouping mechanism for
-   * the attached occurrences (Attestations). This grouping mechanism also
-   * provides a security boundary, since IAM ACLs gate the ability for a principle
-   * to attach an occurrence to a given note. It also provides a single point of
-   * lookup to find all attached attestation occurrences, even if they don't all
-   * live in the same project.
-   * 
- * - * Protobuf type {@code grafeas.v1.AttestationNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.AttestationNote) - io.grafeas.v1.AttestationNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AttestationNote.class, io.grafeas.v1.AttestationNote.Builder.class); - } - - // Construct using io.grafeas.v1.AttestationNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - hint_ = null; - if (hintBuilder_ != null) { - hintBuilder_.dispose(); - hintBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote getDefaultInstanceForType() { - return io.grafeas.v1.AttestationNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote build() { - io.grafeas.v1.AttestationNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote buildPartial() { - io.grafeas.v1.AttestationNote result = new io.grafeas.v1.AttestationNote(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.AttestationNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.hint_ = hintBuilder_ == null - ? hint_ - : hintBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.AttestationNote) { - return mergeFrom((io.grafeas.v1.AttestationNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.AttestationNote other) { - if (other == io.grafeas.v1.AttestationNote.getDefaultInstance()) return this; - if (other.hasHint()) { - mergeHint(other.getHint()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getHintFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.AttestationNote.Hint hint_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationNote.Hint, io.grafeas.v1.AttestationNote.Hint.Builder, io.grafeas.v1.AttestationNote.HintOrBuilder> hintBuilder_; - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - * @return Whether the hint field is set. - */ - public boolean hasHint() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - * @return The hint. - */ - public io.grafeas.v1.AttestationNote.Hint getHint() { - if (hintBuilder_ == null) { - return hint_ == null ? io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; - } else { - return hintBuilder_.getMessage(); - } - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - public Builder setHint(io.grafeas.v1.AttestationNote.Hint value) { - if (hintBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hint_ = value; - } else { - hintBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - public Builder setHint( - io.grafeas.v1.AttestationNote.Hint.Builder builderForValue) { - if (hintBuilder_ == null) { - hint_ = builderForValue.build(); - } else { - hintBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - public Builder mergeHint(io.grafeas.v1.AttestationNote.Hint value) { - if (hintBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - hint_ != null && - hint_ != io.grafeas.v1.AttestationNote.Hint.getDefaultInstance()) { - getHintBuilder().mergeFrom(value); - } else { - hint_ = value; - } - } else { - hintBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - public Builder clearHint() { - bitField0_ = (bitField0_ & ~0x00000001); - hint_ = null; - if (hintBuilder_ != null) { - hintBuilder_.dispose(); - hintBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - public io.grafeas.v1.AttestationNote.Hint.Builder getHintBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getHintFieldBuilder().getBuilder(); - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - public io.grafeas.v1.AttestationNote.HintOrBuilder getHintOrBuilder() { - if (hintBuilder_ != null) { - return hintBuilder_.getMessageOrBuilder(); - } else { - return hint_ == null ? - io.grafeas.v1.AttestationNote.Hint.getDefaultInstance() : hint_; - } - } - /** - *
-     * Hint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationNote.Hint, io.grafeas.v1.AttestationNote.Hint.Builder, io.grafeas.v1.AttestationNote.HintOrBuilder> - getHintFieldBuilder() { - if (hintBuilder_ == null) { - hintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationNote.Hint, io.grafeas.v1.AttestationNote.Hint.Builder, io.grafeas.v1.AttestationNote.HintOrBuilder>( - getHint(), - getParentForChildren(), - isClean()); - hint_ = null; - } - return hintBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.AttestationNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.AttestationNote) - private static final io.grafeas.v1.AttestationNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.AttestationNote(); - } - - public static io.grafeas.v1.AttestationNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AttestationNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.AttestationNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java deleted file mode 100644 index 202623bd6817..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/attestation.proto - -package io.grafeas.v1; - -public interface AttestationNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.AttestationNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Hint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - * @return Whether the hint field is set. - */ - boolean hasHint(); - /** - *
-   * Hint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - * @return The hint. - */ - io.grafeas.v1.AttestationNote.Hint getHint(); - /** - *
-   * Hint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.AttestationNote.Hint hint = 1; - */ - io.grafeas.v1.AttestationNote.HintOrBuilder getHintOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java deleted file mode 100644 index 20b2893ff31b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrence.java +++ /dev/null @@ -1,1658 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/attestation.proto - -package io.grafeas.v1; - -/** - *
- * Occurrence that represents a single "attestation". The authenticity of an
- * attestation can be verified using the attached signature. If the verifier
- * trusts the public key of the signer, then verifying the signature is
- * sufficient to establish trust. In this circumstance, the authority to which
- * this attestation is attached is primarily useful for lookup (how to find
- * this attestation if you already know the authority and artifact to be
- * verified) and intent (for which authority this attestation was intended to
- * sign.
- * 
- * - * Protobuf type {@code grafeas.v1.AttestationOccurrence} - */ -public final class AttestationOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.AttestationOccurrence) - AttestationOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use AttestationOccurrence.newBuilder() to construct. - private AttestationOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AttestationOccurrence() { - serializedPayload_ = com.google.protobuf.ByteString.EMPTY; - signatures_ = java.util.Collections.emptyList(); - jwts_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AttestationOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AttestationOccurrence.class, io.grafeas.v1.AttestationOccurrence.Builder.class); - } - - public static final int SERIALIZED_PAYLOAD_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString serializedPayload_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-   * Required. The serialized payload that is verified by one or more
-   * `signatures`.
-   * 
- * - * bytes serialized_payload = 1; - * @return The serializedPayload. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSerializedPayload() { - return serializedPayload_; - } - - public static final int SIGNATURES_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List signatures_; - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - @java.lang.Override - public java.util.List getSignaturesList() { - return signatures_; - } - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - @java.lang.Override - public java.util.List - getSignaturesOrBuilderList() { - return signatures_; - } - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - @java.lang.Override - public int getSignaturesCount() { - return signatures_.size(); - } - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - @java.lang.Override - public io.grafeas.v1.Signature getSignatures(int index) { - return signatures_.get(index); - } - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - @java.lang.Override - public io.grafeas.v1.SignatureOrBuilder getSignaturesOrBuilder( - int index) { - return signatures_.get(index); - } - - public static final int JWTS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List jwts_; - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - @java.lang.Override - public java.util.List getJwtsList() { - return jwts_; - } - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - @java.lang.Override - public java.util.List - getJwtsOrBuilderList() { - return jwts_; - } - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - @java.lang.Override - public int getJwtsCount() { - return jwts_.size(); - } - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - @java.lang.Override - public io.grafeas.v1.Jwt getJwts(int index) { - return jwts_.get(index); - } - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - @java.lang.Override - public io.grafeas.v1.JwtOrBuilder getJwtsOrBuilder( - int index) { - return jwts_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!serializedPayload_.isEmpty()) { - output.writeBytes(1, serializedPayload_); - } - for (int i = 0; i < signatures_.size(); i++) { - output.writeMessage(2, signatures_.get(i)); - } - for (int i = 0; i < jwts_.size(); i++) { - output.writeMessage(3, jwts_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!serializedPayload_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, serializedPayload_); - } - for (int i = 0; i < signatures_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, signatures_.get(i)); - } - for (int i = 0; i < jwts_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, jwts_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.AttestationOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.AttestationOccurrence other = (io.grafeas.v1.AttestationOccurrence) obj; - - if (!getSerializedPayload() - .equals(other.getSerializedPayload())) return false; - if (!getSignaturesList() - .equals(other.getSignaturesList())) return false; - if (!getJwtsList() - .equals(other.getJwtsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERIALIZED_PAYLOAD_FIELD_NUMBER; - hash = (53 * hash) + getSerializedPayload().hashCode(); - if (getSignaturesCount() > 0) { - hash = (37 * hash) + SIGNATURES_FIELD_NUMBER; - hash = (53 * hash) + getSignaturesList().hashCode(); - } - if (getJwtsCount() > 0) { - hash = (37 * hash) + JWTS_FIELD_NUMBER; - hash = (53 * hash) + getJwtsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.AttestationOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AttestationOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.AttestationOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.AttestationOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Occurrence that represents a single "attestation". The authenticity of an
-   * attestation can be verified using the attached signature. If the verifier
-   * trusts the public key of the signer, then verifying the signature is
-   * sufficient to establish trust. In this circumstance, the authority to which
-   * this attestation is attached is primarily useful for lookup (how to find
-   * this attestation if you already know the authority and artifact to be
-   * verified) and intent (for which authority this attestation was intended to
-   * sign.
-   * 
- * - * Protobuf type {@code grafeas.v1.AttestationOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.AttestationOccurrence) - io.grafeas.v1.AttestationOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.AttestationOccurrence.class, io.grafeas.v1.AttestationOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.AttestationOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - serializedPayload_ = com.google.protobuf.ByteString.EMPTY; - if (signaturesBuilder_ == null) { - signatures_ = java.util.Collections.emptyList(); - } else { - signatures_ = null; - signaturesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - if (jwtsBuilder_ == null) { - jwts_ = java.util.Collections.emptyList(); - } else { - jwts_ = null; - jwtsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_AttestationOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.AttestationOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.AttestationOccurrence build() { - io.grafeas.v1.AttestationOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.AttestationOccurrence buildPartial() { - io.grafeas.v1.AttestationOccurrence result = new io.grafeas.v1.AttestationOccurrence(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.AttestationOccurrence result) { - if (signaturesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - signatures_ = java.util.Collections.unmodifiableList(signatures_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.signatures_ = signatures_; - } else { - result.signatures_ = signaturesBuilder_.build(); - } - if (jwtsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - jwts_ = java.util.Collections.unmodifiableList(jwts_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.jwts_ = jwts_; - } else { - result.jwts_ = jwtsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.AttestationOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.serializedPayload_ = serializedPayload_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.AttestationOccurrence) { - return mergeFrom((io.grafeas.v1.AttestationOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.AttestationOccurrence other) { - if (other == io.grafeas.v1.AttestationOccurrence.getDefaultInstance()) return this; - if (other.getSerializedPayload() != com.google.protobuf.ByteString.EMPTY) { - setSerializedPayload(other.getSerializedPayload()); - } - if (signaturesBuilder_ == null) { - if (!other.signatures_.isEmpty()) { - if (signatures_.isEmpty()) { - signatures_ = other.signatures_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSignaturesIsMutable(); - signatures_.addAll(other.signatures_); - } - onChanged(); - } - } else { - if (!other.signatures_.isEmpty()) { - if (signaturesBuilder_.isEmpty()) { - signaturesBuilder_.dispose(); - signaturesBuilder_ = null; - signatures_ = other.signatures_; - bitField0_ = (bitField0_ & ~0x00000002); - signaturesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSignaturesFieldBuilder() : null; - } else { - signaturesBuilder_.addAllMessages(other.signatures_); - } - } - } - if (jwtsBuilder_ == null) { - if (!other.jwts_.isEmpty()) { - if (jwts_.isEmpty()) { - jwts_ = other.jwts_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureJwtsIsMutable(); - jwts_.addAll(other.jwts_); - } - onChanged(); - } - } else { - if (!other.jwts_.isEmpty()) { - if (jwtsBuilder_.isEmpty()) { - jwtsBuilder_.dispose(); - jwtsBuilder_ = null; - jwts_ = other.jwts_; - bitField0_ = (bitField0_ & ~0x00000004); - jwtsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getJwtsFieldBuilder() : null; - } else { - jwtsBuilder_.addAllMessages(other.jwts_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - serializedPayload_ = input.readBytes(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - io.grafeas.v1.Signature m = - input.readMessage( - io.grafeas.v1.Signature.parser(), - extensionRegistry); - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.add(m); - } else { - signaturesBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: { - io.grafeas.v1.Jwt m = - input.readMessage( - io.grafeas.v1.Jwt.parser(), - extensionRegistry); - if (jwtsBuilder_ == null) { - ensureJwtsIsMutable(); - jwts_.add(m); - } else { - jwtsBuilder_.addMessage(m); - } - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.ByteString serializedPayload_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Required. The serialized payload that is verified by one or more
-     * `signatures`.
-     * 
- * - * bytes serialized_payload = 1; - * @return The serializedPayload. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSerializedPayload() { - return serializedPayload_; - } - /** - *
-     * Required. The serialized payload that is verified by one or more
-     * `signatures`.
-     * 
- * - * bytes serialized_payload = 1; - * @param value The serializedPayload to set. - * @return This builder for chaining. - */ - public Builder setSerializedPayload(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - serializedPayload_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. The serialized payload that is verified by one or more
-     * `signatures`.
-     * 
- * - * bytes serialized_payload = 1; - * @return This builder for chaining. - */ - public Builder clearSerializedPayload() { - bitField0_ = (bitField0_ & ~0x00000001); - serializedPayload_ = getDefaultInstance().getSerializedPayload(); - onChanged(); - return this; - } - - private java.util.List signatures_ = - java.util.Collections.emptyList(); - private void ensureSignaturesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - signatures_ = new java.util.ArrayList(signatures_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Signature, io.grafeas.v1.Signature.Builder, io.grafeas.v1.SignatureOrBuilder> signaturesBuilder_; - - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public java.util.List getSignaturesList() { - if (signaturesBuilder_ == null) { - return java.util.Collections.unmodifiableList(signatures_); - } else { - return signaturesBuilder_.getMessageList(); - } - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public int getSignaturesCount() { - if (signaturesBuilder_ == null) { - return signatures_.size(); - } else { - return signaturesBuilder_.getCount(); - } - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public io.grafeas.v1.Signature getSignatures(int index) { - if (signaturesBuilder_ == null) { - return signatures_.get(index); - } else { - return signaturesBuilder_.getMessage(index); - } - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder setSignatures( - int index, io.grafeas.v1.Signature value) { - if (signaturesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignaturesIsMutable(); - signatures_.set(index, value); - onChanged(); - } else { - signaturesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder setSignatures( - int index, io.grafeas.v1.Signature.Builder builderForValue) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.set(index, builderForValue.build()); - onChanged(); - } else { - signaturesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder addSignatures(io.grafeas.v1.Signature value) { - if (signaturesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignaturesIsMutable(); - signatures_.add(value); - onChanged(); - } else { - signaturesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder addSignatures( - int index, io.grafeas.v1.Signature value) { - if (signaturesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignaturesIsMutable(); - signatures_.add(index, value); - onChanged(); - } else { - signaturesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder addSignatures( - io.grafeas.v1.Signature.Builder builderForValue) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.add(builderForValue.build()); - onChanged(); - } else { - signaturesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder addSignatures( - int index, io.grafeas.v1.Signature.Builder builderForValue) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.add(index, builderForValue.build()); - onChanged(); - } else { - signaturesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder addAllSignatures( - java.lang.Iterable values) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, signatures_); - onChanged(); - } else { - signaturesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder clearSignatures() { - if (signaturesBuilder_ == null) { - signatures_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - signaturesBuilder_.clear(); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public Builder removeSignatures(int index) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.remove(index); - onChanged(); - } else { - signaturesBuilder_.remove(index); - } - return this; - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public io.grafeas.v1.Signature.Builder getSignaturesBuilder( - int index) { - return getSignaturesFieldBuilder().getBuilder(index); - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public io.grafeas.v1.SignatureOrBuilder getSignaturesOrBuilder( - int index) { - if (signaturesBuilder_ == null) { - return signatures_.get(index); } else { - return signaturesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public java.util.List - getSignaturesOrBuilderList() { - if (signaturesBuilder_ != null) { - return signaturesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(signatures_); - } - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public io.grafeas.v1.Signature.Builder addSignaturesBuilder() { - return getSignaturesFieldBuilder().addBuilder( - io.grafeas.v1.Signature.getDefaultInstance()); - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public io.grafeas.v1.Signature.Builder addSignaturesBuilder( - int index) { - return getSignaturesFieldBuilder().addBuilder( - index, io.grafeas.v1.Signature.getDefaultInstance()); - } - /** - *
-     * One or more signatures over `serialized_payload`.  Verifier implementations
-     * should consider this attestation message verified if at least one
-     * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-     * for more details on signature structure and verification.
-     * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - public java.util.List - getSignaturesBuilderList() { - return getSignaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Signature, io.grafeas.v1.Signature.Builder, io.grafeas.v1.SignatureOrBuilder> - getSignaturesFieldBuilder() { - if (signaturesBuilder_ == null) { - signaturesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Signature, io.grafeas.v1.Signature.Builder, io.grafeas.v1.SignatureOrBuilder>( - signatures_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - signatures_ = null; - } - return signaturesBuilder_; - } - - private java.util.List jwts_ = - java.util.Collections.emptyList(); - private void ensureJwtsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - jwts_ = new java.util.ArrayList(jwts_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Jwt, io.grafeas.v1.Jwt.Builder, io.grafeas.v1.JwtOrBuilder> jwtsBuilder_; - - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public java.util.List getJwtsList() { - if (jwtsBuilder_ == null) { - return java.util.Collections.unmodifiableList(jwts_); - } else { - return jwtsBuilder_.getMessageList(); - } - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public int getJwtsCount() { - if (jwtsBuilder_ == null) { - return jwts_.size(); - } else { - return jwtsBuilder_.getCount(); - } - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public io.grafeas.v1.Jwt getJwts(int index) { - if (jwtsBuilder_ == null) { - return jwts_.get(index); - } else { - return jwtsBuilder_.getMessage(index); - } - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder setJwts( - int index, io.grafeas.v1.Jwt value) { - if (jwtsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJwtsIsMutable(); - jwts_.set(index, value); - onChanged(); - } else { - jwtsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder setJwts( - int index, io.grafeas.v1.Jwt.Builder builderForValue) { - if (jwtsBuilder_ == null) { - ensureJwtsIsMutable(); - jwts_.set(index, builderForValue.build()); - onChanged(); - } else { - jwtsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder addJwts(io.grafeas.v1.Jwt value) { - if (jwtsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJwtsIsMutable(); - jwts_.add(value); - onChanged(); - } else { - jwtsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder addJwts( - int index, io.grafeas.v1.Jwt value) { - if (jwtsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJwtsIsMutable(); - jwts_.add(index, value); - onChanged(); - } else { - jwtsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder addJwts( - io.grafeas.v1.Jwt.Builder builderForValue) { - if (jwtsBuilder_ == null) { - ensureJwtsIsMutable(); - jwts_.add(builderForValue.build()); - onChanged(); - } else { - jwtsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder addJwts( - int index, io.grafeas.v1.Jwt.Builder builderForValue) { - if (jwtsBuilder_ == null) { - ensureJwtsIsMutable(); - jwts_.add(index, builderForValue.build()); - onChanged(); - } else { - jwtsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder addAllJwts( - java.lang.Iterable values) { - if (jwtsBuilder_ == null) { - ensureJwtsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, jwts_); - onChanged(); - } else { - jwtsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder clearJwts() { - if (jwtsBuilder_ == null) { - jwts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - jwtsBuilder_.clear(); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public Builder removeJwts(int index) { - if (jwtsBuilder_ == null) { - ensureJwtsIsMutable(); - jwts_.remove(index); - onChanged(); - } else { - jwtsBuilder_.remove(index); - } - return this; - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public io.grafeas.v1.Jwt.Builder getJwtsBuilder( - int index) { - return getJwtsFieldBuilder().getBuilder(index); - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public io.grafeas.v1.JwtOrBuilder getJwtsOrBuilder( - int index) { - if (jwtsBuilder_ == null) { - return jwts_.get(index); } else { - return jwtsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public java.util.List - getJwtsOrBuilderList() { - if (jwtsBuilder_ != null) { - return jwtsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(jwts_); - } - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public io.grafeas.v1.Jwt.Builder addJwtsBuilder() { - return getJwtsFieldBuilder().addBuilder( - io.grafeas.v1.Jwt.getDefaultInstance()); - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public io.grafeas.v1.Jwt.Builder addJwtsBuilder( - int index) { - return getJwtsFieldBuilder().addBuilder( - index, io.grafeas.v1.Jwt.getDefaultInstance()); - } - /** - *
-     * One or more JWTs encoding a self-contained attestation.
-     * Each JWT encodes the payload that it verifies within the JWT itself.
-     * Verifier implementation SHOULD ignore the `serialized_payload` field
-     * when verifying these JWTs.
-     * If only JWTs are present on this AttestationOccurrence, then the
-     * `serialized_payload` SHOULD be left empty.
-     * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-     * Occurrence, but this is not validated by Grafeas metadata API
-     * implementations.  The JWT itself is opaque to Grafeas.
-     * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - public java.util.List - getJwtsBuilderList() { - return getJwtsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Jwt, io.grafeas.v1.Jwt.Builder, io.grafeas.v1.JwtOrBuilder> - getJwtsFieldBuilder() { - if (jwtsBuilder_ == null) { - jwtsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Jwt, io.grafeas.v1.Jwt.Builder, io.grafeas.v1.JwtOrBuilder>( - jwts_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - jwts_ = null; - } - return jwtsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.AttestationOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.AttestationOccurrence) - private static final io.grafeas.v1.AttestationOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.AttestationOccurrence(); - } - - public static io.grafeas.v1.AttestationOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AttestationOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.AttestationOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java deleted file mode 100644 index 771f03145fc8..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java +++ /dev/null @@ -1,163 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/attestation.proto - -package io.grafeas.v1; - -public interface AttestationOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.AttestationOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The serialized payload that is verified by one or more
-   * `signatures`.
-   * 
- * - * bytes serialized_payload = 1; - * @return The serializedPayload. - */ - com.google.protobuf.ByteString getSerializedPayload(); - - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - java.util.List - getSignaturesList(); - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - io.grafeas.v1.Signature getSignatures(int index); - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - int getSignaturesCount(); - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - java.util.List - getSignaturesOrBuilderList(); - /** - *
-   * One or more signatures over `serialized_payload`.  Verifier implementations
-   * should consider this attestation message verified if at least one
-   * `signature` verifies `serialized_payload`.  See `Signature` in common.proto
-   * for more details on signature structure and verification.
-   * 
- * - * repeated .grafeas.v1.Signature signatures = 2; - */ - io.grafeas.v1.SignatureOrBuilder getSignaturesOrBuilder( - int index); - - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - java.util.List - getJwtsList(); - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - io.grafeas.v1.Jwt getJwts(int index); - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - int getJwtsCount(); - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - java.util.List - getJwtsOrBuilderList(); - /** - *
-   * One or more JWTs encoding a self-contained attestation.
-   * Each JWT encodes the payload that it verifies within the JWT itself.
-   * Verifier implementation SHOULD ignore the `serialized_payload` field
-   * when verifying these JWTs.
-   * If only JWTs are present on this AttestationOccurrence, then the
-   * `serialized_payload` SHOULD be left empty.
-   * Each JWT SHOULD encode a claim specific to the `resource_uri` of this
-   * Occurrence, but this is not validated by Grafeas metadata API
-   * implementations.  The JWT itself is opaque to Grafeas.
-   * 
- * - * repeated .grafeas.v1.Jwt jwts = 3; - */ - io.grafeas.v1.JwtOrBuilder getJwtsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java deleted file mode 100644 index 0024b9c1f607..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java +++ /dev/null @@ -1,910 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to create notes in batch.
- * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateNotesRequest} - */ -public final class BatchCreateNotesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateNotesRequest) - BatchCreateNotesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchCreateNotesRequest.newBuilder() to construct. - private BatchCreateNotesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchCreateNotesRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchCreateNotesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetNotes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateNotesRequest.class, io.grafeas.v1.BatchCreateNotesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the notes are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the notes are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NOTES_FIELD_NUMBER = 2; - private static final class NotesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, io.grafeas.v1.Note> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - io.grafeas.v1.Note.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, io.grafeas.v1.Note> notes_; - private com.google.protobuf.MapField - internalGetNotes() { - if (notes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - NotesDefaultEntryHolder.defaultEntry); - } - return notes_; - } - public int getNotesCount() { - return internalGetNotes().getMap().size(); - } - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public boolean containsNotes( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetNotes().getMap().containsKey(key); - } - /** - * Use {@link #getNotesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getNotes() { - return getNotesMap(); - } - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.Map getNotesMap() { - return internalGetNotes().getMap(); - } - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public /* nullable */ -io.grafeas.v1.Note getNotesOrDefault( - java.lang.String key, - /* nullable */ -io.grafeas.v1.Note defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetNotes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.Note getNotesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetNotes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetNotes(), - NotesDefaultEntryHolder.defaultEntry, - 2); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - for (java.util.Map.Entry entry - : internalGetNotes().getMap().entrySet()) { - com.google.protobuf.MapEntry - notes__ = NotesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, notes__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BatchCreateNotesRequest)) { - return super.equals(obj); - } - io.grafeas.v1.BatchCreateNotesRequest other = (io.grafeas.v1.BatchCreateNotesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!internalGetNotes().equals( - other.internalGetNotes())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (!internalGetNotes().getMap().isEmpty()) { - hash = (37 * hash) + NOTES_FIELD_NUMBER; - hash = (53 * hash) + internalGetNotes().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateNotesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BatchCreateNotesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to create notes in batch.
-   * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateNotesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateNotesRequest) - io.grafeas.v1.BatchCreateNotesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetNotes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableNotes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateNotesRequest.class, io.grafeas.v1.BatchCreateNotesRequest.Builder.class); - } - - // Construct using io.grafeas.v1.BatchCreateNotesRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - internalGetMutableNotes().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesRequest getDefaultInstanceForType() { - return io.grafeas.v1.BatchCreateNotesRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesRequest build() { - io.grafeas.v1.BatchCreateNotesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesRequest buildPartial() { - io.grafeas.v1.BatchCreateNotesRequest result = new io.grafeas.v1.BatchCreateNotesRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.BatchCreateNotesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.notes_ = internalGetNotes(); - result.notes_.makeImmutable(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BatchCreateNotesRequest) { - return mergeFrom((io.grafeas.v1.BatchCreateNotesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BatchCreateNotesRequest other) { - if (other == io.grafeas.v1.BatchCreateNotesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableNotes().mergeFrom( - other.internalGetNotes()); - bitField0_ |= 0x00000002; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - com.google.protobuf.MapEntry - notes__ = input.readMessage( - NotesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableNotes().getMutableMap().put( - notes__.getKey(), notes__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the notes are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the notes are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the notes are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the notes are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the notes are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, io.grafeas.v1.Note> notes_; - private com.google.protobuf.MapField - internalGetNotes() { - if (notes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - NotesDefaultEntryHolder.defaultEntry); - } - return notes_; - } - private com.google.protobuf.MapField - internalGetMutableNotes() { - if (notes_ == null) { - notes_ = com.google.protobuf.MapField.newMapField( - NotesDefaultEntryHolder.defaultEntry); - } - if (!notes_.isMutable()) { - notes_ = notes_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return notes_; - } - public int getNotesCount() { - return internalGetNotes().getMap().size(); - } - /** - *
-     * The notes to create. Max allowed length is 1000.
-     * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public boolean containsNotes( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetNotes().getMap().containsKey(key); - } - /** - * Use {@link #getNotesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getNotes() { - return getNotesMap(); - } - /** - *
-     * The notes to create. Max allowed length is 1000.
-     * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.Map getNotesMap() { - return internalGetNotes().getMap(); - } - /** - *
-     * The notes to create. Max allowed length is 1000.
-     * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public /* nullable */ -io.grafeas.v1.Note getNotesOrDefault( - java.lang.String key, - /* nullable */ -io.grafeas.v1.Note defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetNotes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * The notes to create. Max allowed length is 1000.
-     * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.Note getNotesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetNotes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearNotes() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableNotes().getMutableMap() - .clear(); - return this; - } - /** - *
-     * The notes to create. Max allowed length is 1000.
-     * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeNotes( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableNotes().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableNotes() { - bitField0_ |= 0x00000002; - return internalGetMutableNotes().getMutableMap(); - } - /** - *
-     * The notes to create. Max allowed length is 1000.
-     * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder putNotes( - java.lang.String key, - io.grafeas.v1.Note value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableNotes().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - *
-     * The notes to create. Max allowed length is 1000.
-     * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder putAllNotes( - java.util.Map values) { - internalGetMutableNotes().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000002; - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateNotesRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateNotesRequest) - private static final io.grafeas.v1.BatchCreateNotesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateNotesRequest(); - } - - public static io.grafeas.v1.BatchCreateNotesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchCreateNotesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java deleted file mode 100644 index 912f5e4cb609..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface BatchCreateNotesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateNotesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the notes are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the notes are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - int getNotesCount(); - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - boolean containsNotes( - java.lang.String key); - /** - * Use {@link #getNotesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getNotes(); - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.Map - getNotesMap(); - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - /* nullable */ -io.grafeas.v1.Note getNotesOrDefault( - java.lang.String key, - /* nullable */ -io.grafeas.v1.Note defaultValue); - /** - *
-   * The notes to create. Max allowed length is 1000.
-   * 
- * - * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - io.grafeas.v1.Note getNotesOrThrow( - java.lang.String key); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java deleted file mode 100644 index 6066cf15b94f..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java +++ /dev/null @@ -1,862 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Response for creating notes in batch.
- * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateNotesResponse} - */ -public final class BatchCreateNotesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateNotesResponse) - BatchCreateNotesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchCreateNotesResponse.newBuilder() to construct. - private BatchCreateNotesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchCreateNotesResponse() { - notes_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchCreateNotesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateNotesResponse.class, io.grafeas.v1.BatchCreateNotesResponse.Builder.class); - } - - public static final int NOTES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List notes_; - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public java.util.List getNotesList() { - return notes_; - } - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public java.util.List - getNotesOrBuilderList() { - return notes_; - } - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public int getNotesCount() { - return notes_.size(); - } - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public io.grafeas.v1.Note getNotes(int index) { - return notes_.get(index); - } - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( - int index) { - return notes_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < notes_.size(); i++) { - output.writeMessage(1, notes_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < notes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, notes_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BatchCreateNotesResponse)) { - return super.equals(obj); - } - io.grafeas.v1.BatchCreateNotesResponse other = (io.grafeas.v1.BatchCreateNotesResponse) obj; - - if (!getNotesList() - .equals(other.getNotesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getNotesCount() > 0) { - hash = (37 * hash) + NOTES_FIELD_NUMBER; - hash = (53 * hash) + getNotesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateNotesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BatchCreateNotesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response for creating notes in batch.
-   * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateNotesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateNotesResponse) - io.grafeas.v1.BatchCreateNotesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateNotesResponse.class, io.grafeas.v1.BatchCreateNotesResponse.Builder.class); - } - - // Construct using io.grafeas.v1.BatchCreateNotesResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (notesBuilder_ == null) { - notes_ = java.util.Collections.emptyList(); - } else { - notes_ = null; - notesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesResponse getDefaultInstanceForType() { - return io.grafeas.v1.BatchCreateNotesResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesResponse build() { - io.grafeas.v1.BatchCreateNotesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesResponse buildPartial() { - io.grafeas.v1.BatchCreateNotesResponse result = new io.grafeas.v1.BatchCreateNotesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.BatchCreateNotesResponse result) { - if (notesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - notes_ = java.util.Collections.unmodifiableList(notes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.notes_ = notes_; - } else { - result.notes_ = notesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.BatchCreateNotesResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BatchCreateNotesResponse) { - return mergeFrom((io.grafeas.v1.BatchCreateNotesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BatchCreateNotesResponse other) { - if (other == io.grafeas.v1.BatchCreateNotesResponse.getDefaultInstance()) return this; - if (notesBuilder_ == null) { - if (!other.notes_.isEmpty()) { - if (notes_.isEmpty()) { - notes_ = other.notes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNotesIsMutable(); - notes_.addAll(other.notes_); - } - onChanged(); - } - } else { - if (!other.notes_.isEmpty()) { - if (notesBuilder_.isEmpty()) { - notesBuilder_.dispose(); - notesBuilder_ = null; - notes_ = other.notes_; - bitField0_ = (bitField0_ & ~0x00000001); - notesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNotesFieldBuilder() : null; - } else { - notesBuilder_.addAllMessages(other.notes_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.grafeas.v1.Note m = - input.readMessage( - io.grafeas.v1.Note.parser(), - extensionRegistry); - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.add(m); - } else { - notesBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List notes_ = - java.util.Collections.emptyList(); - private void ensureNotesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - notes_ = new java.util.ArrayList(notes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> notesBuilder_; - - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public java.util.List getNotesList() { - if (notesBuilder_ == null) { - return java.util.Collections.unmodifiableList(notes_); - } else { - return notesBuilder_.getMessageList(); - } - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public int getNotesCount() { - if (notesBuilder_ == null) { - return notes_.size(); - } else { - return notesBuilder_.getCount(); - } - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note getNotes(int index) { - if (notesBuilder_ == null) { - return notes_.get(index); - } else { - return notesBuilder_.getMessage(index); - } - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder setNotes( - int index, io.grafeas.v1.Note value) { - if (notesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotesIsMutable(); - notes_.set(index, value); - onChanged(); - } else { - notesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder setNotes( - int index, io.grafeas.v1.Note.Builder builderForValue) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.set(index, builderForValue.build()); - onChanged(); - } else { - notesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes(io.grafeas.v1.Note value) { - if (notesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotesIsMutable(); - notes_.add(value); - onChanged(); - } else { - notesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes( - int index, io.grafeas.v1.Note value) { - if (notesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotesIsMutable(); - notes_.add(index, value); - onChanged(); - } else { - notesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes( - io.grafeas.v1.Note.Builder builderForValue) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.add(builderForValue.build()); - onChanged(); - } else { - notesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes( - int index, io.grafeas.v1.Note.Builder builderForValue) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.add(index, builderForValue.build()); - onChanged(); - } else { - notesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addAllNotes( - java.lang.Iterable values) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notes_); - onChanged(); - } else { - notesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder clearNotes() { - if (notesBuilder_ == null) { - notes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - notesBuilder_.clear(); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder removeNotes(int index) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.remove(index); - onChanged(); - } else { - notesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note.Builder getNotesBuilder( - int index) { - return getNotesFieldBuilder().getBuilder(index); - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( - int index) { - if (notesBuilder_ == null) { - return notes_.get(index); } else { - return notesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public java.util.List - getNotesOrBuilderList() { - if (notesBuilder_ != null) { - return notesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(notes_); - } - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note.Builder addNotesBuilder() { - return getNotesFieldBuilder().addBuilder( - io.grafeas.v1.Note.getDefaultInstance()); - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note.Builder addNotesBuilder( - int index) { - return getNotesFieldBuilder().addBuilder( - index, io.grafeas.v1.Note.getDefaultInstance()); - } - /** - *
-     * The notes that were created.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public java.util.List - getNotesBuilderList() { - return getNotesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> - getNotesFieldBuilder() { - if (notesBuilder_ == null) { - notesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( - notes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - notes_ = null; - } - return notesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateNotesResponse) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateNotesResponse) - private static final io.grafeas.v1.BatchCreateNotesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateNotesResponse(); - } - - public static io.grafeas.v1.BatchCreateNotesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchCreateNotesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateNotesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java deleted file mode 100644 index d59c13740d4a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface BatchCreateNotesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateNotesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - java.util.List - getNotesList(); - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - io.grafeas.v1.Note getNotes(int index); - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - int getNotesCount(); - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - java.util.List - getNotesOrBuilderList(); - /** - *
-   * The notes that were created.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java deleted file mode 100644 index 26827deffd40..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java +++ /dev/null @@ -1,1033 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to create occurrences in batch.
- * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesRequest} - */ -public final class BatchCreateOccurrencesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateOccurrencesRequest) - BatchCreateOccurrencesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchCreateOccurrencesRequest.newBuilder() to construct. - private BatchCreateOccurrencesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchCreateOccurrencesRequest() { - parent_ = ""; - occurrences_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchCreateOccurrencesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateOccurrencesRequest.class, io.grafeas.v1.BatchCreateOccurrencesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrences are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrences are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OCCURRENCES_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List occurrences_; - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getOccurrencesList() { - return occurrences_; - } - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getOccurrencesOrBuilderList() { - return occurrences_; - } - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getOccurrencesCount() { - return occurrences_.size(); - } - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.Occurrence getOccurrences(int index) { - return occurrences_.get(index); - } - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - return occurrences_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - for (int i = 0; i < occurrences_.size(); i++) { - output.writeMessage(2, occurrences_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - for (int i = 0; i < occurrences_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, occurrences_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BatchCreateOccurrencesRequest)) { - return super.equals(obj); - } - io.grafeas.v1.BatchCreateOccurrencesRequest other = (io.grafeas.v1.BatchCreateOccurrencesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getOccurrencesList() - .equals(other.getOccurrencesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (getOccurrencesCount() > 0) { - hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; - hash = (53 * hash) + getOccurrencesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateOccurrencesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BatchCreateOccurrencesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to create occurrences in batch.
-   * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateOccurrencesRequest) - io.grafeas.v1.BatchCreateOccurrencesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateOccurrencesRequest.class, io.grafeas.v1.BatchCreateOccurrencesRequest.Builder.class); - } - - // Construct using io.grafeas.v1.BatchCreateOccurrencesRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - } else { - occurrences_ = null; - occurrencesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesRequest getDefaultInstanceForType() { - return io.grafeas.v1.BatchCreateOccurrencesRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesRequest build() { - io.grafeas.v1.BatchCreateOccurrencesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesRequest buildPartial() { - io.grafeas.v1.BatchCreateOccurrencesRequest result = new io.grafeas.v1.BatchCreateOccurrencesRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.BatchCreateOccurrencesRequest result) { - if (occurrencesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - occurrences_ = java.util.Collections.unmodifiableList(occurrences_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.occurrences_ = occurrences_; - } else { - result.occurrences_ = occurrencesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.BatchCreateOccurrencesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BatchCreateOccurrencesRequest) { - return mergeFrom((io.grafeas.v1.BatchCreateOccurrencesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BatchCreateOccurrencesRequest other) { - if (other == io.grafeas.v1.BatchCreateOccurrencesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (occurrencesBuilder_ == null) { - if (!other.occurrences_.isEmpty()) { - if (occurrences_.isEmpty()) { - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureOccurrencesIsMutable(); - occurrences_.addAll(other.occurrences_); - } - onChanged(); - } - } else { - if (!other.occurrences_.isEmpty()) { - if (occurrencesBuilder_.isEmpty()) { - occurrencesBuilder_.dispose(); - occurrencesBuilder_ = null; - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000002); - occurrencesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getOccurrencesFieldBuilder() : null; - } else { - occurrencesBuilder_.addAllMessages(other.occurrences_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - io.grafeas.v1.Occurrence m = - input.readMessage( - io.grafeas.v1.Occurrence.parser(), - extensionRegistry); - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(m); - } else { - occurrencesBuilder_.addMessage(m); - } - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrences are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrences are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrences are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrences are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrences are to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List occurrences_ = - java.util.Collections.emptyList(); - private void ensureOccurrencesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - occurrences_ = new java.util.ArrayList(occurrences_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; - - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getOccurrencesList() { - if (occurrencesBuilder_ == null) { - return java.util.Collections.unmodifiableList(occurrences_); - } else { - return occurrencesBuilder_.getMessageList(); - } - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getOccurrencesCount() { - if (occurrencesBuilder_ == null) { - return occurrences_.size(); - } else { - return occurrencesBuilder_.getCount(); - } - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Occurrence getOccurrences(int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); - } else { - return occurrencesBuilder_.getMessage(index); - } - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.set(index, value); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.set(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addOccurrences(io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(index, value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addOccurrences( - io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllOccurrences( - java.lang.Iterable values) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, occurrences_); - onChanged(); - } else { - occurrencesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearOccurrences() { - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - occurrencesBuilder_.clear(); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeOccurrences(int index) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.remove(index); - onChanged(); - } else { - occurrencesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().getBuilder(index); - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); } else { - return occurrencesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getOccurrencesOrBuilderList() { - if (occurrencesBuilder_ != null) { - return occurrencesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(occurrences_); - } - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { - return getOccurrencesFieldBuilder().addBuilder( - io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().addBuilder( - index, io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences to create. Max allowed length is 1000.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getOccurrencesBuilderList() { - return getOccurrencesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> - getOccurrencesFieldBuilder() { - if (occurrencesBuilder_ == null) { - occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( - occurrences_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - occurrences_ = null; - } - return occurrencesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateOccurrencesRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateOccurrencesRequest) - private static final io.grafeas.v1.BatchCreateOccurrencesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateOccurrencesRequest(); - } - - public static io.grafeas.v1.BatchCreateOccurrencesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchCreateOccurrencesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java deleted file mode 100644 index 34f9b79bdd4e..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface BatchCreateOccurrencesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateOccurrencesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrences are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrences are to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getOccurrencesList(); - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - io.grafeas.v1.Occurrence getOccurrences(int index); - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - int getOccurrencesCount(); - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getOccurrencesOrBuilderList(); - /** - *
-   * The occurrences to create. Max allowed length is 1000.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java deleted file mode 100644 index db2c5a911e7b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java +++ /dev/null @@ -1,862 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Response for creating occurrences in batch.
- * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesResponse} - */ -public final class BatchCreateOccurrencesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BatchCreateOccurrencesResponse) - BatchCreateOccurrencesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchCreateOccurrencesResponse.newBuilder() to construct. - private BatchCreateOccurrencesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchCreateOccurrencesResponse() { - occurrences_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchCreateOccurrencesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateOccurrencesResponse.class, io.grafeas.v1.BatchCreateOccurrencesResponse.Builder.class); - } - - public static final int OCCURRENCES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List occurrences_; - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public java.util.List getOccurrencesList() { - return occurrences_; - } - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public java.util.List - getOccurrencesOrBuilderList() { - return occurrences_; - } - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public int getOccurrencesCount() { - return occurrences_.size(); - } - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public io.grafeas.v1.Occurrence getOccurrences(int index) { - return occurrences_.get(index); - } - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - return occurrences_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < occurrences_.size(); i++) { - output.writeMessage(1, occurrences_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < occurrences_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, occurrences_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BatchCreateOccurrencesResponse)) { - return super.equals(obj); - } - io.grafeas.v1.BatchCreateOccurrencesResponse other = (io.grafeas.v1.BatchCreateOccurrencesResponse) obj; - - if (!getOccurrencesList() - .equals(other.getOccurrencesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getOccurrencesCount() > 0) { - hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; - hash = (53 * hash) + getOccurrencesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BatchCreateOccurrencesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BatchCreateOccurrencesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response for creating occurrences in batch.
-   * 
- * - * Protobuf type {@code grafeas.v1.BatchCreateOccurrencesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BatchCreateOccurrencesResponse) - io.grafeas.v1.BatchCreateOccurrencesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BatchCreateOccurrencesResponse.class, io.grafeas.v1.BatchCreateOccurrencesResponse.Builder.class); - } - - // Construct using io.grafeas.v1.BatchCreateOccurrencesResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - } else { - occurrences_ = null; - occurrencesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesResponse getDefaultInstanceForType() { - return io.grafeas.v1.BatchCreateOccurrencesResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesResponse build() { - io.grafeas.v1.BatchCreateOccurrencesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesResponse buildPartial() { - io.grafeas.v1.BatchCreateOccurrencesResponse result = new io.grafeas.v1.BatchCreateOccurrencesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.BatchCreateOccurrencesResponse result) { - if (occurrencesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - occurrences_ = java.util.Collections.unmodifiableList(occurrences_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.occurrences_ = occurrences_; - } else { - result.occurrences_ = occurrencesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.BatchCreateOccurrencesResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BatchCreateOccurrencesResponse) { - return mergeFrom((io.grafeas.v1.BatchCreateOccurrencesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BatchCreateOccurrencesResponse other) { - if (other == io.grafeas.v1.BatchCreateOccurrencesResponse.getDefaultInstance()) return this; - if (occurrencesBuilder_ == null) { - if (!other.occurrences_.isEmpty()) { - if (occurrences_.isEmpty()) { - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOccurrencesIsMutable(); - occurrences_.addAll(other.occurrences_); - } - onChanged(); - } - } else { - if (!other.occurrences_.isEmpty()) { - if (occurrencesBuilder_.isEmpty()) { - occurrencesBuilder_.dispose(); - occurrencesBuilder_ = null; - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000001); - occurrencesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getOccurrencesFieldBuilder() : null; - } else { - occurrencesBuilder_.addAllMessages(other.occurrences_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.grafeas.v1.Occurrence m = - input.readMessage( - io.grafeas.v1.Occurrence.parser(), - extensionRegistry); - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(m); - } else { - occurrencesBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List occurrences_ = - java.util.Collections.emptyList(); - private void ensureOccurrencesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - occurrences_ = new java.util.ArrayList(occurrences_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; - - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List getOccurrencesList() { - if (occurrencesBuilder_ == null) { - return java.util.Collections.unmodifiableList(occurrences_); - } else { - return occurrencesBuilder_.getMessageList(); - } - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public int getOccurrencesCount() { - if (occurrencesBuilder_ == null) { - return occurrences_.size(); - } else { - return occurrencesBuilder_.getCount(); - } - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence getOccurrences(int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); - } else { - return occurrencesBuilder_.getMessage(index); - } - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.set(index, value); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.set(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences(io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(index, value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addAllOccurrences( - java.lang.Iterable values) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, occurrences_); - onChanged(); - } else { - occurrencesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder clearOccurrences() { - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - occurrencesBuilder_.clear(); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder removeOccurrences(int index) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.remove(index); - onChanged(); - } else { - occurrencesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().getBuilder(index); - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); } else { - return occurrencesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List - getOccurrencesOrBuilderList() { - if (occurrencesBuilder_ != null) { - return occurrencesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(occurrences_); - } - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { - return getOccurrencesFieldBuilder().addBuilder( - io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().addBuilder( - index, io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences that were created.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List - getOccurrencesBuilderList() { - return getOccurrencesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> - getOccurrencesFieldBuilder() { - if (occurrencesBuilder_ == null) { - occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( - occurrences_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - occurrences_ = null; - } - return occurrencesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BatchCreateOccurrencesResponse) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateOccurrencesResponse) - private static final io.grafeas.v1.BatchCreateOccurrencesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BatchCreateOccurrencesResponse(); - } - - public static io.grafeas.v1.BatchCreateOccurrencesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchCreateOccurrencesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BatchCreateOccurrencesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java deleted file mode 100644 index 90337438be46..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface BatchCreateOccurrencesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BatchCreateOccurrencesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - java.util.List - getOccurrencesList(); - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - io.grafeas.v1.Occurrence getOccurrences(int index); - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - int getOccurrencesCount(); - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - java.util.List - getOccurrencesOrBuilderList(); - /** - *
-   * The occurrences that were created.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java deleted file mode 100644 index 090e954f45ef..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Build.java +++ /dev/null @@ -1,74 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/build.proto - -package io.grafeas.v1; - -public final class Build { - private Build() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BuildNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BuildNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BuildOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\026grafeas/v1/build.proto\022\ngrafeas.v1\032\"gr" + - "afeas/v1/intoto_provenance.proto\032!grafea" + - "s/v1/intoto_statement.proto\032\033grafeas/v1/" + - "provenance.proto\"$\n\tBuildNote\022\027\n\017builder" + - "_version\030\001 \001(\t\"\314\001\n\017BuildOccurrence\022/\n\npr" + - "ovenance\030\001 \001(\0132\033.grafeas.v1.BuildProvena" + - "nce\022\030\n\020provenance_bytes\030\002 \001(\t\0227\n\021intoto_" + - "provenance\030\003 \001(\0132\034.grafeas.v1.InTotoProv" + - "enance\0225\n\020intoto_statement\030\004 \001(\0132\033.grafe" + - "as.v1.InTotoStatementBQ\n\rio.grafeas.v1P\001" + - "Z8google.golang.org/genproto/googleapis/" + - "grafeas/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.grafeas.v1.InTotoProvenanceProto.getDescriptor(), - io.grafeas.v1.InTotoStatementProto.getDescriptor(), - io.grafeas.v1.Provenance.getDescriptor(), - }); - internal_static_grafeas_v1_BuildNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_BuildNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BuildNote_descriptor, - new java.lang.String[] { "BuilderVersion", }); - internal_static_grafeas_v1_BuildOccurrence_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BuildOccurrence_descriptor, - new java.lang.String[] { "Provenance", "ProvenanceBytes", "IntotoProvenance", "IntotoStatement", }); - io.grafeas.v1.InTotoProvenanceProto.getDescriptor(); - io.grafeas.v1.InTotoStatementProto.getDescriptor(); - io.grafeas.v1.Provenance.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java deleted file mode 100644 index cefe7d8ac0e8..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNote.java +++ /dev/null @@ -1,582 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/build.proto - -package io.grafeas.v1; - -/** - *
- * Note holding the version of the provider's builder and the signature of the
- * provenance message in the build details occurrence.
- * 
- * - * Protobuf type {@code grafeas.v1.BuildNote} - */ -public final class BuildNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BuildNote) - BuildNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use BuildNote.newBuilder() to construct. - private BuildNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BuildNote() { - builderVersion_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BuildNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuildNote.class, io.grafeas.v1.BuildNote.Builder.class); - } - - public static final int BUILDER_VERSION_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object builderVersion_ = ""; - /** - *
-   * Required. Immutable. Version of the builder which produced this build.
-   * 
- * - * string builder_version = 1; - * @return The builderVersion. - */ - @java.lang.Override - public java.lang.String getBuilderVersion() { - java.lang.Object ref = builderVersion_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - builderVersion_ = s; - return s; - } - } - /** - *
-   * Required. Immutable. Version of the builder which produced this build.
-   * 
- * - * string builder_version = 1; - * @return The bytes for builderVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBuilderVersionBytes() { - java.lang.Object ref = builderVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - builderVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, builderVersion_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, builderVersion_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BuildNote)) { - return super.equals(obj); - } - io.grafeas.v1.BuildNote other = (io.grafeas.v1.BuildNote) obj; - - if (!getBuilderVersion() - .equals(other.getBuilderVersion())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BUILDER_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getBuilderVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BuildNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuildNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuildNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BuildNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Note holding the version of the provider's builder and the signature of the
-   * provenance message in the build details occurrence.
-   * 
- * - * Protobuf type {@code grafeas.v1.BuildNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BuildNote) - io.grafeas.v1.BuildNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuildNote.class, io.grafeas.v1.BuildNote.Builder.class); - } - - // Construct using io.grafeas.v1.BuildNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - builderVersion_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BuildNote getDefaultInstanceForType() { - return io.grafeas.v1.BuildNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BuildNote build() { - io.grafeas.v1.BuildNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BuildNote buildPartial() { - io.grafeas.v1.BuildNote result = new io.grafeas.v1.BuildNote(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.BuildNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.builderVersion_ = builderVersion_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BuildNote) { - return mergeFrom((io.grafeas.v1.BuildNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BuildNote other) { - if (other == io.grafeas.v1.BuildNote.getDefaultInstance()) return this; - if (!other.getBuilderVersion().isEmpty()) { - builderVersion_ = other.builderVersion_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - builderVersion_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object builderVersion_ = ""; - /** - *
-     * Required. Immutable. Version of the builder which produced this build.
-     * 
- * - * string builder_version = 1; - * @return The builderVersion. - */ - public java.lang.String getBuilderVersion() { - java.lang.Object ref = builderVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - builderVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Immutable. Version of the builder which produced this build.
-     * 
- * - * string builder_version = 1; - * @return The bytes for builderVersion. - */ - public com.google.protobuf.ByteString - getBuilderVersionBytes() { - java.lang.Object ref = builderVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - builderVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Immutable. Version of the builder which produced this build.
-     * 
- * - * string builder_version = 1; - * @param value The builderVersion to set. - * @return This builder for chaining. - */ - public Builder setBuilderVersion( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - builderVersion_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. Version of the builder which produced this build.
-     * 
- * - * string builder_version = 1; - * @return This builder for chaining. - */ - public Builder clearBuilderVersion() { - builderVersion_ = getDefaultInstance().getBuilderVersion(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. Version of the builder which produced this build.
-     * 
- * - * string builder_version = 1; - * @param value The bytes for builderVersion to set. - * @return This builder for chaining. - */ - public Builder setBuilderVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - builderVersion_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BuildNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BuildNote) - private static final io.grafeas.v1.BuildNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BuildNote(); - } - - public static io.grafeas.v1.BuildNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BuildNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BuildNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java deleted file mode 100644 index bdd0c0e77f13..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/build.proto - -package io.grafeas.v1; - -public interface BuildNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BuildNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Immutable. Version of the builder which produced this build.
-   * 
- * - * string builder_version = 1; - * @return The builderVersion. - */ - java.lang.String getBuilderVersion(); - /** - *
-   * Required. Immutable. Version of the builder which produced this build.
-   * 
- * - * string builder_version = 1; - * @return The bytes for builderVersion. - */ - com.google.protobuf.ByteString - getBuilderVersionBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java deleted file mode 100644 index b026a2175e92..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrence.java +++ /dev/null @@ -1,1378 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/build.proto - -package io.grafeas.v1; - -/** - *
- * Details of a build occurrence.
- * 
- * - * Protobuf type {@code grafeas.v1.BuildOccurrence} - */ -public final class BuildOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BuildOccurrence) - BuildOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use BuildOccurrence.newBuilder() to construct. - private BuildOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BuildOccurrence() { - provenanceBytes_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BuildOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuildOccurrence.class, io.grafeas.v1.BuildOccurrence.Builder.class); - } - - public static final int PROVENANCE_FIELD_NUMBER = 1; - private io.grafeas.v1.BuildProvenance provenance_; - /** - *
-   * The actual provenance for the build.
-   * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - * @return Whether the provenance field is set. - */ - @java.lang.Override - public boolean hasProvenance() { - return provenance_ != null; - } - /** - *
-   * The actual provenance for the build.
-   * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - * @return The provenance. - */ - @java.lang.Override - public io.grafeas.v1.BuildProvenance getProvenance() { - return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; - } - /** - *
-   * The actual provenance for the build.
-   * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - @java.lang.Override - public io.grafeas.v1.BuildProvenanceOrBuilder getProvenanceOrBuilder() { - return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; - } - - public static final int PROVENANCE_BYTES_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object provenanceBytes_ = ""; - /** - *
-   * Serialized JSON representation of the provenance, used in generating the
-   * build signature in the corresponding build note. After verifying the
-   * signature, `provenance_bytes` can be unmarshalled and compared to the
-   * provenance to confirm that it is unchanged. A base64-encoded string
-   * representation of the provenance bytes is used for the signature in order
-   * to interoperate with openssl which expects this format for signature
-   * verification.
-   * The serialized form is captured both to avoid ambiguity in how the
-   * provenance is marshalled to json as well to prevent incompatibilities with
-   * future changes.
-   * 
- * - * string provenance_bytes = 2; - * @return The provenanceBytes. - */ - @java.lang.Override - public java.lang.String getProvenanceBytes() { - java.lang.Object ref = provenanceBytes_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - provenanceBytes_ = s; - return s; - } - } - /** - *
-   * Serialized JSON representation of the provenance, used in generating the
-   * build signature in the corresponding build note. After verifying the
-   * signature, `provenance_bytes` can be unmarshalled and compared to the
-   * provenance to confirm that it is unchanged. A base64-encoded string
-   * representation of the provenance bytes is used for the signature in order
-   * to interoperate with openssl which expects this format for signature
-   * verification.
-   * The serialized form is captured both to avoid ambiguity in how the
-   * provenance is marshalled to json as well to prevent incompatibilities with
-   * future changes.
-   * 
- * - * string provenance_bytes = 2; - * @return The bytes for provenanceBytes. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProvenanceBytesBytes() { - java.lang.Object ref = provenanceBytes_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - provenanceBytes_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INTOTO_PROVENANCE_FIELD_NUMBER = 3; - private io.grafeas.v1.InTotoProvenance intotoProvenance_; - /** - *
-   * Deprecated. See InTotoStatement for the replacement.
-   * In-toto Provenance representation as defined in spec.
-   * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @return Whether the intotoProvenance field is set. - */ - @java.lang.Override - public boolean hasIntotoProvenance() { - return intotoProvenance_ != null; - } - /** - *
-   * Deprecated. See InTotoStatement for the replacement.
-   * In-toto Provenance representation as defined in spec.
-   * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @return The intotoProvenance. - */ - @java.lang.Override - public io.grafeas.v1.InTotoProvenance getIntotoProvenance() { - return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; - } - /** - *
-   * Deprecated. See InTotoStatement for the replacement.
-   * In-toto Provenance representation as defined in spec.
-   * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - @java.lang.Override - public io.grafeas.v1.InTotoProvenanceOrBuilder getIntotoProvenanceOrBuilder() { - return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; - } - - public static final int INTOTO_STATEMENT_FIELD_NUMBER = 4; - private io.grafeas.v1.InTotoStatement intotoStatement_; - /** - *
-   * In-toto Statement representation as defined in spec.
-   * The intoto_statement can contain any type of provenance. The serialized
-   * payload of the statement can be stored and signed in the Occurrence's
-   * envelope.
-   * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - * @return Whether the intotoStatement field is set. - */ - @java.lang.Override - public boolean hasIntotoStatement() { - return intotoStatement_ != null; - } - /** - *
-   * In-toto Statement representation as defined in spec.
-   * The intoto_statement can contain any type of provenance. The serialized
-   * payload of the statement can be stored and signed in the Occurrence's
-   * envelope.
-   * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - * @return The intotoStatement. - */ - @java.lang.Override - public io.grafeas.v1.InTotoStatement getIntotoStatement() { - return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; - } - /** - *
-   * In-toto Statement representation as defined in spec.
-   * The intoto_statement can contain any type of provenance. The serialized
-   * payload of the statement can be stored and signed in the Occurrence's
-   * envelope.
-   * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - @java.lang.Override - public io.grafeas.v1.InTotoStatementOrBuilder getIntotoStatementOrBuilder() { - return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (provenance_ != null) { - output.writeMessage(1, getProvenance()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provenanceBytes_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, provenanceBytes_); - } - if (intotoProvenance_ != null) { - output.writeMessage(3, getIntotoProvenance()); - } - if (intotoStatement_ != null) { - output.writeMessage(4, getIntotoStatement()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (provenance_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProvenance()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provenanceBytes_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, provenanceBytes_); - } - if (intotoProvenance_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getIntotoProvenance()); - } - if (intotoStatement_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getIntotoStatement()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BuildOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.BuildOccurrence other = (io.grafeas.v1.BuildOccurrence) obj; - - if (hasProvenance() != other.hasProvenance()) return false; - if (hasProvenance()) { - if (!getProvenance() - .equals(other.getProvenance())) return false; - } - if (!getProvenanceBytes() - .equals(other.getProvenanceBytes())) return false; - if (hasIntotoProvenance() != other.hasIntotoProvenance()) return false; - if (hasIntotoProvenance()) { - if (!getIntotoProvenance() - .equals(other.getIntotoProvenance())) return false; - } - if (hasIntotoStatement() != other.hasIntotoStatement()) return false; - if (hasIntotoStatement()) { - if (!getIntotoStatement() - .equals(other.getIntotoStatement())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProvenance()) { - hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; - hash = (53 * hash) + getProvenance().hashCode(); - } - hash = (37 * hash) + PROVENANCE_BYTES_FIELD_NUMBER; - hash = (53 * hash) + getProvenanceBytes().hashCode(); - if (hasIntotoProvenance()) { - hash = (37 * hash) + INTOTO_PROVENANCE_FIELD_NUMBER; - hash = (53 * hash) + getIntotoProvenance().hashCode(); - } - if (hasIntotoStatement()) { - hash = (37 * hash) + INTOTO_STATEMENT_FIELD_NUMBER; - hash = (53 * hash) + getIntotoStatement().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BuildOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuildOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuildOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BuildOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Details of a build occurrence.
-   * 
- * - * Protobuf type {@code grafeas.v1.BuildOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BuildOccurrence) - io.grafeas.v1.BuildOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuildOccurrence.class, io.grafeas.v1.BuildOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.BuildOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - provenance_ = null; - if (provenanceBuilder_ != null) { - provenanceBuilder_.dispose(); - provenanceBuilder_ = null; - } - provenanceBytes_ = ""; - intotoProvenance_ = null; - if (intotoProvenanceBuilder_ != null) { - intotoProvenanceBuilder_.dispose(); - intotoProvenanceBuilder_ = null; - } - intotoStatement_ = null; - if (intotoStatementBuilder_ != null) { - intotoStatementBuilder_.dispose(); - intotoStatementBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BuildOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BuildOccurrence build() { - io.grafeas.v1.BuildOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BuildOccurrence buildPartial() { - io.grafeas.v1.BuildOccurrence result = new io.grafeas.v1.BuildOccurrence(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.BuildOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.provenance_ = provenanceBuilder_ == null - ? provenance_ - : provenanceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.provenanceBytes_ = provenanceBytes_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.intotoProvenance_ = intotoProvenanceBuilder_ == null - ? intotoProvenance_ - : intotoProvenanceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.intotoStatement_ = intotoStatementBuilder_ == null - ? intotoStatement_ - : intotoStatementBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BuildOccurrence) { - return mergeFrom((io.grafeas.v1.BuildOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BuildOccurrence other) { - if (other == io.grafeas.v1.BuildOccurrence.getDefaultInstance()) return this; - if (other.hasProvenance()) { - mergeProvenance(other.getProvenance()); - } - if (!other.getProvenanceBytes().isEmpty()) { - provenanceBytes_ = other.provenanceBytes_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasIntotoProvenance()) { - mergeIntotoProvenance(other.getIntotoProvenance()); - } - if (other.hasIntotoStatement()) { - mergeIntotoStatement(other.getIntotoStatement()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getProvenanceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - provenanceBytes_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getIntotoProvenanceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getIntotoStatementFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.BuildProvenance provenance_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildProvenance, io.grafeas.v1.BuildProvenance.Builder, io.grafeas.v1.BuildProvenanceOrBuilder> provenanceBuilder_; - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - * @return Whether the provenance field is set. - */ - public boolean hasProvenance() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - * @return The provenance. - */ - public io.grafeas.v1.BuildProvenance getProvenance() { - if (provenanceBuilder_ == null) { - return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; - } else { - return provenanceBuilder_.getMessage(); - } - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - public Builder setProvenance(io.grafeas.v1.BuildProvenance value) { - if (provenanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - provenance_ = value; - } else { - provenanceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - public Builder setProvenance( - io.grafeas.v1.BuildProvenance.Builder builderForValue) { - if (provenanceBuilder_ == null) { - provenance_ = builderForValue.build(); - } else { - provenanceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - public Builder mergeProvenance(io.grafeas.v1.BuildProvenance value) { - if (provenanceBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - provenance_ != null && - provenance_ != io.grafeas.v1.BuildProvenance.getDefaultInstance()) { - getProvenanceBuilder().mergeFrom(value); - } else { - provenance_ = value; - } - } else { - provenanceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - public Builder clearProvenance() { - bitField0_ = (bitField0_ & ~0x00000001); - provenance_ = null; - if (provenanceBuilder_ != null) { - provenanceBuilder_.dispose(); - provenanceBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - public io.grafeas.v1.BuildProvenance.Builder getProvenanceBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getProvenanceFieldBuilder().getBuilder(); - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - public io.grafeas.v1.BuildProvenanceOrBuilder getProvenanceOrBuilder() { - if (provenanceBuilder_ != null) { - return provenanceBuilder_.getMessageOrBuilder(); - } else { - return provenance_ == null ? - io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; - } - } - /** - *
-     * The actual provenance for the build.
-     * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildProvenance, io.grafeas.v1.BuildProvenance.Builder, io.grafeas.v1.BuildProvenanceOrBuilder> - getProvenanceFieldBuilder() { - if (provenanceBuilder_ == null) { - provenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildProvenance, io.grafeas.v1.BuildProvenance.Builder, io.grafeas.v1.BuildProvenanceOrBuilder>( - getProvenance(), - getParentForChildren(), - isClean()); - provenance_ = null; - } - return provenanceBuilder_; - } - - private java.lang.Object provenanceBytes_ = ""; - /** - *
-     * Serialized JSON representation of the provenance, used in generating the
-     * build signature in the corresponding build note. After verifying the
-     * signature, `provenance_bytes` can be unmarshalled and compared to the
-     * provenance to confirm that it is unchanged. A base64-encoded string
-     * representation of the provenance bytes is used for the signature in order
-     * to interoperate with openssl which expects this format for signature
-     * verification.
-     * The serialized form is captured both to avoid ambiguity in how the
-     * provenance is marshalled to json as well to prevent incompatibilities with
-     * future changes.
-     * 
- * - * string provenance_bytes = 2; - * @return The provenanceBytes. - */ - public java.lang.String getProvenanceBytes() { - java.lang.Object ref = provenanceBytes_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - provenanceBytes_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Serialized JSON representation of the provenance, used in generating the
-     * build signature in the corresponding build note. After verifying the
-     * signature, `provenance_bytes` can be unmarshalled and compared to the
-     * provenance to confirm that it is unchanged. A base64-encoded string
-     * representation of the provenance bytes is used for the signature in order
-     * to interoperate with openssl which expects this format for signature
-     * verification.
-     * The serialized form is captured both to avoid ambiguity in how the
-     * provenance is marshalled to json as well to prevent incompatibilities with
-     * future changes.
-     * 
- * - * string provenance_bytes = 2; - * @return The bytes for provenanceBytes. - */ - public com.google.protobuf.ByteString - getProvenanceBytesBytes() { - java.lang.Object ref = provenanceBytes_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - provenanceBytes_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Serialized JSON representation of the provenance, used in generating the
-     * build signature in the corresponding build note. After verifying the
-     * signature, `provenance_bytes` can be unmarshalled and compared to the
-     * provenance to confirm that it is unchanged. A base64-encoded string
-     * representation of the provenance bytes is used for the signature in order
-     * to interoperate with openssl which expects this format for signature
-     * verification.
-     * The serialized form is captured both to avoid ambiguity in how the
-     * provenance is marshalled to json as well to prevent incompatibilities with
-     * future changes.
-     * 
- * - * string provenance_bytes = 2; - * @param value The provenanceBytes to set. - * @return This builder for chaining. - */ - public Builder setProvenanceBytes( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - provenanceBytes_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Serialized JSON representation of the provenance, used in generating the
-     * build signature in the corresponding build note. After verifying the
-     * signature, `provenance_bytes` can be unmarshalled and compared to the
-     * provenance to confirm that it is unchanged. A base64-encoded string
-     * representation of the provenance bytes is used for the signature in order
-     * to interoperate with openssl which expects this format for signature
-     * verification.
-     * The serialized form is captured both to avoid ambiguity in how the
-     * provenance is marshalled to json as well to prevent incompatibilities with
-     * future changes.
-     * 
- * - * string provenance_bytes = 2; - * @return This builder for chaining. - */ - public Builder clearProvenanceBytes() { - provenanceBytes_ = getDefaultInstance().getProvenanceBytes(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Serialized JSON representation of the provenance, used in generating the
-     * build signature in the corresponding build note. After verifying the
-     * signature, `provenance_bytes` can be unmarshalled and compared to the
-     * provenance to confirm that it is unchanged. A base64-encoded string
-     * representation of the provenance bytes is used for the signature in order
-     * to interoperate with openssl which expects this format for signature
-     * verification.
-     * The serialized form is captured both to avoid ambiguity in how the
-     * provenance is marshalled to json as well to prevent incompatibilities with
-     * future changes.
-     * 
- * - * string provenance_bytes = 2; - * @param value The bytes for provenanceBytes to set. - * @return This builder for chaining. - */ - public Builder setProvenanceBytesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - provenanceBytes_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private io.grafeas.v1.InTotoProvenance intotoProvenance_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> intotoProvenanceBuilder_; - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @return Whether the intotoProvenance field is set. - */ - public boolean hasIntotoProvenance() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @return The intotoProvenance. - */ - public io.grafeas.v1.InTotoProvenance getIntotoProvenance() { - if (intotoProvenanceBuilder_ == null) { - return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; - } else { - return intotoProvenanceBuilder_.getMessage(); - } - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - public Builder setIntotoProvenance(io.grafeas.v1.InTotoProvenance value) { - if (intotoProvenanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - intotoProvenance_ = value; - } else { - intotoProvenanceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - public Builder setIntotoProvenance( - io.grafeas.v1.InTotoProvenance.Builder builderForValue) { - if (intotoProvenanceBuilder_ == null) { - intotoProvenance_ = builderForValue.build(); - } else { - intotoProvenanceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - public Builder mergeIntotoProvenance(io.grafeas.v1.InTotoProvenance value) { - if (intotoProvenanceBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - intotoProvenance_ != null && - intotoProvenance_ != io.grafeas.v1.InTotoProvenance.getDefaultInstance()) { - getIntotoProvenanceBuilder().mergeFrom(value); - } else { - intotoProvenance_ = value; - } - } else { - intotoProvenanceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - public Builder clearIntotoProvenance() { - bitField0_ = (bitField0_ & ~0x00000004); - intotoProvenance_ = null; - if (intotoProvenanceBuilder_ != null) { - intotoProvenanceBuilder_.dispose(); - intotoProvenanceBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - public io.grafeas.v1.InTotoProvenance.Builder getIntotoProvenanceBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getIntotoProvenanceFieldBuilder().getBuilder(); - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - public io.grafeas.v1.InTotoProvenanceOrBuilder getIntotoProvenanceOrBuilder() { - if (intotoProvenanceBuilder_ != null) { - return intotoProvenanceBuilder_.getMessageOrBuilder(); - } else { - return intotoProvenance_ == null ? - io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; - } - } - /** - *
-     * Deprecated. See InTotoStatement for the replacement.
-     * In-toto Provenance representation as defined in spec.
-     * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> - getIntotoProvenanceFieldBuilder() { - if (intotoProvenanceBuilder_ == null) { - intotoProvenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder>( - getIntotoProvenance(), - getParentForChildren(), - isClean()); - intotoProvenance_ = null; - } - return intotoProvenanceBuilder_; - } - - private io.grafeas.v1.InTotoStatement intotoStatement_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> intotoStatementBuilder_; - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - * @return Whether the intotoStatement field is set. - */ - public boolean hasIntotoStatement() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - * @return The intotoStatement. - */ - public io.grafeas.v1.InTotoStatement getIntotoStatement() { - if (intotoStatementBuilder_ == null) { - return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; - } else { - return intotoStatementBuilder_.getMessage(); - } - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - public Builder setIntotoStatement(io.grafeas.v1.InTotoStatement value) { - if (intotoStatementBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - intotoStatement_ = value; - } else { - intotoStatementBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - public Builder setIntotoStatement( - io.grafeas.v1.InTotoStatement.Builder builderForValue) { - if (intotoStatementBuilder_ == null) { - intotoStatement_ = builderForValue.build(); - } else { - intotoStatementBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - public Builder mergeIntotoStatement(io.grafeas.v1.InTotoStatement value) { - if (intotoStatementBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - intotoStatement_ != null && - intotoStatement_ != io.grafeas.v1.InTotoStatement.getDefaultInstance()) { - getIntotoStatementBuilder().mergeFrom(value); - } else { - intotoStatement_ = value; - } - } else { - intotoStatementBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - public Builder clearIntotoStatement() { - bitField0_ = (bitField0_ & ~0x00000008); - intotoStatement_ = null; - if (intotoStatementBuilder_ != null) { - intotoStatementBuilder_.dispose(); - intotoStatementBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - public io.grafeas.v1.InTotoStatement.Builder getIntotoStatementBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getIntotoStatementFieldBuilder().getBuilder(); - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - public io.grafeas.v1.InTotoStatementOrBuilder getIntotoStatementOrBuilder() { - if (intotoStatementBuilder_ != null) { - return intotoStatementBuilder_.getMessageOrBuilder(); - } else { - return intotoStatement_ == null ? - io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; - } - } - /** - *
-     * In-toto Statement representation as defined in spec.
-     * The intoto_statement can contain any type of provenance. The serialized
-     * payload of the statement can be stored and signed in the Occurrence's
-     * envelope.
-     * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> - getIntotoStatementFieldBuilder() { - if (intotoStatementBuilder_ == null) { - intotoStatementBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder>( - getIntotoStatement(), - getParentForChildren(), - isClean()); - intotoStatement_ = null; - } - return intotoStatementBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BuildOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BuildOccurrence) - private static final io.grafeas.v1.BuildOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BuildOccurrence(); - } - - public static io.grafeas.v1.BuildOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BuildOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BuildOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java deleted file mode 100644 index ee7da49a9992..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java +++ /dev/null @@ -1,140 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/build.proto - -package io.grafeas.v1; - -public interface BuildOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BuildOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The actual provenance for the build.
-   * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - * @return Whether the provenance field is set. - */ - boolean hasProvenance(); - /** - *
-   * The actual provenance for the build.
-   * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - * @return The provenance. - */ - io.grafeas.v1.BuildProvenance getProvenance(); - /** - *
-   * The actual provenance for the build.
-   * 
- * - * .grafeas.v1.BuildProvenance provenance = 1; - */ - io.grafeas.v1.BuildProvenanceOrBuilder getProvenanceOrBuilder(); - - /** - *
-   * Serialized JSON representation of the provenance, used in generating the
-   * build signature in the corresponding build note. After verifying the
-   * signature, `provenance_bytes` can be unmarshalled and compared to the
-   * provenance to confirm that it is unchanged. A base64-encoded string
-   * representation of the provenance bytes is used for the signature in order
-   * to interoperate with openssl which expects this format for signature
-   * verification.
-   * The serialized form is captured both to avoid ambiguity in how the
-   * provenance is marshalled to json as well to prevent incompatibilities with
-   * future changes.
-   * 
- * - * string provenance_bytes = 2; - * @return The provenanceBytes. - */ - java.lang.String getProvenanceBytes(); - /** - *
-   * Serialized JSON representation of the provenance, used in generating the
-   * build signature in the corresponding build note. After verifying the
-   * signature, `provenance_bytes` can be unmarshalled and compared to the
-   * provenance to confirm that it is unchanged. A base64-encoded string
-   * representation of the provenance bytes is used for the signature in order
-   * to interoperate with openssl which expects this format for signature
-   * verification.
-   * The serialized form is captured both to avoid ambiguity in how the
-   * provenance is marshalled to json as well to prevent incompatibilities with
-   * future changes.
-   * 
- * - * string provenance_bytes = 2; - * @return The bytes for provenanceBytes. - */ - com.google.protobuf.ByteString - getProvenanceBytesBytes(); - - /** - *
-   * Deprecated. See InTotoStatement for the replacement.
-   * In-toto Provenance representation as defined in spec.
-   * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @return Whether the intotoProvenance field is set. - */ - boolean hasIntotoProvenance(); - /** - *
-   * Deprecated. See InTotoStatement for the replacement.
-   * In-toto Provenance representation as defined in spec.
-   * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @return The intotoProvenance. - */ - io.grafeas.v1.InTotoProvenance getIntotoProvenance(); - /** - *
-   * Deprecated. See InTotoStatement for the replacement.
-   * In-toto Provenance representation as defined in spec.
-   * 
- * - * .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - io.grafeas.v1.InTotoProvenanceOrBuilder getIntotoProvenanceOrBuilder(); - - /** - *
-   * In-toto Statement representation as defined in spec.
-   * The intoto_statement can contain any type of provenance. The serialized
-   * payload of the statement can be stored and signed in the Occurrence's
-   * envelope.
-   * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - * @return Whether the intotoStatement field is set. - */ - boolean hasIntotoStatement(); - /** - *
-   * In-toto Statement representation as defined in spec.
-   * The intoto_statement can contain any type of provenance. The serialized
-   * payload of the statement can be stored and signed in the Occurrence's
-   * envelope.
-   * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - * @return The intotoStatement. - */ - io.grafeas.v1.InTotoStatement getIntotoStatement(); - /** - *
-   * In-toto Statement representation as defined in spec.
-   * The intoto_statement can contain any type of provenance. The serialized
-   * payload of the statement can be stored and signed in the Occurrence's
-   * envelope.
-   * 
- * - * .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - io.grafeas.v1.InTotoStatementOrBuilder getIntotoStatementOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java deleted file mode 100644 index 1359a5f8fcfb..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenance.java +++ /dev/null @@ -1,3554 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * Provenance of a build. Contains all information needed to verify the full
- * details about the build from source to completion.
- * 
- * - * Protobuf type {@code grafeas.v1.BuildProvenance} - */ -public final class BuildProvenance extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BuildProvenance) - BuildProvenanceOrBuilder { -private static final long serialVersionUID = 0L; - // Use BuildProvenance.newBuilder() to construct. - private BuildProvenance(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BuildProvenance() { - id_ = ""; - projectId_ = ""; - commands_ = java.util.Collections.emptyList(); - builtArtifacts_ = java.util.Collections.emptyList(); - creator_ = ""; - logsUri_ = ""; - triggerId_ = ""; - builderVersion_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BuildProvenance(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 12: - return internalGetBuildOptions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuildProvenance.class, io.grafeas.v1.BuildProvenance.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * Required. Unique identifier of the build.
-   * 
- * - * string id = 1; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * Required. Unique identifier of the build.
-   * 
- * - * string id = 1; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROJECT_ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object projectId_ = ""; - /** - *
-   * ID of the project.
-   * 
- * - * string project_id = 2; - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - *
-   * ID of the project.
-   * 
- * - * string project_id = 2; - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int COMMANDS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List commands_; - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - @java.lang.Override - public java.util.List getCommandsList() { - return commands_; - } - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - @java.lang.Override - public java.util.List - getCommandsOrBuilderList() { - return commands_; - } - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - @java.lang.Override - public int getCommandsCount() { - return commands_.size(); - } - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - @java.lang.Override - public io.grafeas.v1.Command getCommands(int index) { - return commands_.get(index); - } - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - @java.lang.Override - public io.grafeas.v1.CommandOrBuilder getCommandsOrBuilder( - int index) { - return commands_.get(index); - } - - public static final int BUILT_ARTIFACTS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List builtArtifacts_; - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - @java.lang.Override - public java.util.List getBuiltArtifactsList() { - return builtArtifacts_; - } - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - @java.lang.Override - public java.util.List - getBuiltArtifactsOrBuilderList() { - return builtArtifacts_; - } - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - @java.lang.Override - public int getBuiltArtifactsCount() { - return builtArtifacts_.size(); - } - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - @java.lang.Override - public io.grafeas.v1.Artifact getBuiltArtifacts(int index) { - return builtArtifacts_.get(index); - } - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - @java.lang.Override - public io.grafeas.v1.ArtifactOrBuilder getBuiltArtifactsOrBuilder( - int index) { - return builtArtifacts_.get(index); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Time at which the build was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Time at which the build was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Time at which the build was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int START_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp startTime_; - /** - *
-   * Time at which execution of the build was started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 6; - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - *
-   * Time at which execution of the build was started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 6; - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - *
-   * Time at which execution of the build was started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp endTime_; - /** - *
-   * Time at which execution of the build was finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7; - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - *
-   * Time at which execution of the build was finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7; - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - *
-   * Time at which execution of the build was finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int CREATOR_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private volatile java.lang.Object creator_ = ""; - /** - *
-   * E-mail address of the user who initiated this build. Note that this was the
-   * user's e-mail address at the time the build was initiated; this address may
-   * not represent the same end-user for all time.
-   * 
- * - * string creator = 8; - * @return The creator. - */ - @java.lang.Override - public java.lang.String getCreator() { - java.lang.Object ref = creator_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - creator_ = s; - return s; - } - } - /** - *
-   * E-mail address of the user who initiated this build. Note that this was the
-   * user's e-mail address at the time the build was initiated; this address may
-   * not represent the same end-user for all time.
-   * 
- * - * string creator = 8; - * @return The bytes for creator. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCreatorBytes() { - java.lang.Object ref = creator_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - creator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOGS_URI_FIELD_NUMBER = 9; - @SuppressWarnings("serial") - private volatile java.lang.Object logsUri_ = ""; - /** - *
-   * URI where any logs for this provenance were written.
-   * 
- * - * string logs_uri = 9; - * @return The logsUri. - */ - @java.lang.Override - public java.lang.String getLogsUri() { - java.lang.Object ref = logsUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - logsUri_ = s; - return s; - } - } - /** - *
-   * URI where any logs for this provenance were written.
-   * 
- * - * string logs_uri = 9; - * @return The bytes for logsUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLogsUriBytes() { - java.lang.Object ref = logsUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - logsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_PROVENANCE_FIELD_NUMBER = 10; - private io.grafeas.v1.Source sourceProvenance_; - /** - *
-   * Details of the Source input to the build.
-   * 
- * - * .grafeas.v1.Source source_provenance = 10; - * @return Whether the sourceProvenance field is set. - */ - @java.lang.Override - public boolean hasSourceProvenance() { - return sourceProvenance_ != null; - } - /** - *
-   * Details of the Source input to the build.
-   * 
- * - * .grafeas.v1.Source source_provenance = 10; - * @return The sourceProvenance. - */ - @java.lang.Override - public io.grafeas.v1.Source getSourceProvenance() { - return sourceProvenance_ == null ? io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; - } - /** - *
-   * Details of the Source input to the build.
-   * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - @java.lang.Override - public io.grafeas.v1.SourceOrBuilder getSourceProvenanceOrBuilder() { - return sourceProvenance_ == null ? io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; - } - - public static final int TRIGGER_ID_FIELD_NUMBER = 11; - @SuppressWarnings("serial") - private volatile java.lang.Object triggerId_ = ""; - /** - *
-   * Trigger identifier if the build was triggered automatically; empty if not.
-   * 
- * - * string trigger_id = 11; - * @return The triggerId. - */ - @java.lang.Override - public java.lang.String getTriggerId() { - java.lang.Object ref = triggerId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - triggerId_ = s; - return s; - } - } - /** - *
-   * Trigger identifier if the build was triggered automatically; empty if not.
-   * 
- * - * string trigger_id = 11; - * @return The bytes for triggerId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTriggerIdBytes() { - java.lang.Object ref = triggerId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - triggerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BUILD_OPTIONS_FIELD_NUMBER = 12; - private static final class BuildOptionsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> buildOptions_; - private com.google.protobuf.MapField - internalGetBuildOptions() { - if (buildOptions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - BuildOptionsDefaultEntryHolder.defaultEntry); - } - return buildOptions_; - } - public int getBuildOptionsCount() { - return internalGetBuildOptions().getMap().size(); - } - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public boolean containsBuildOptions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetBuildOptions().getMap().containsKey(key); - } - /** - * Use {@link #getBuildOptionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getBuildOptions() { - return getBuildOptionsMap(); - } - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public java.util.Map getBuildOptionsMap() { - return internalGetBuildOptions().getMap(); - } - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getBuildOptionsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetBuildOptions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public java.lang.String getBuildOptionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetBuildOptions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int BUILDER_VERSION_FIELD_NUMBER = 13; - @SuppressWarnings("serial") - private volatile java.lang.Object builderVersion_ = ""; - /** - *
-   * Version string of the builder at the time this build was executed.
-   * 
- * - * string builder_version = 13; - * @return The builderVersion. - */ - @java.lang.Override - public java.lang.String getBuilderVersion() { - java.lang.Object ref = builderVersion_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - builderVersion_ = s; - return s; - } - } - /** - *
-   * Version string of the builder at the time this build was executed.
-   * 
- * - * string builder_version = 13; - * @return The bytes for builderVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBuilderVersionBytes() { - java.lang.Object ref = builderVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - builderVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); - } - for (int i = 0; i < commands_.size(); i++) { - output.writeMessage(3, commands_.get(i)); - } - for (int i = 0; i < builtArtifacts_.size(); i++) { - output.writeMessage(4, builtArtifacts_.get(i)); - } - if (createTime_ != null) { - output.writeMessage(5, getCreateTime()); - } - if (startTime_ != null) { - output.writeMessage(6, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(7, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, creator_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logsUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, logsUri_); - } - if (sourceProvenance_ != null) { - output.writeMessage(10, getSourceProvenance()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, triggerId_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetBuildOptions(), - BuildOptionsDefaultEntryHolder.defaultEntry, - 12); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, builderVersion_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); - } - for (int i = 0; i < commands_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, commands_.get(i)); - } - for (int i = 0; i < builtArtifacts_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, builtArtifacts_.get(i)); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getCreateTime()); - } - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, creator_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logsUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, logsUri_); - } - if (sourceProvenance_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getSourceProvenance()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, triggerId_); - } - for (java.util.Map.Entry entry - : internalGetBuildOptions().getMap().entrySet()) { - com.google.protobuf.MapEntry - buildOptions__ = BuildOptionsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, buildOptions__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(builderVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, builderVersion_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BuildProvenance)) { - return super.equals(obj); - } - io.grafeas.v1.BuildProvenance other = (io.grafeas.v1.BuildProvenance) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getProjectId() - .equals(other.getProjectId())) return false; - if (!getCommandsList() - .equals(other.getCommandsList())) return false; - if (!getBuiltArtifactsList() - .equals(other.getBuiltArtifactsList())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime() - .equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime() - .equals(other.getEndTime())) return false; - } - if (!getCreator() - .equals(other.getCreator())) return false; - if (!getLogsUri() - .equals(other.getLogsUri())) return false; - if (hasSourceProvenance() != other.hasSourceProvenance()) return false; - if (hasSourceProvenance()) { - if (!getSourceProvenance() - .equals(other.getSourceProvenance())) return false; - } - if (!getTriggerId() - .equals(other.getTriggerId())) return false; - if (!internalGetBuildOptions().equals( - other.internalGetBuildOptions())) return false; - if (!getBuilderVersion() - .equals(other.getBuilderVersion())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - if (getCommandsCount() > 0) { - hash = (37 * hash) + COMMANDS_FIELD_NUMBER; - hash = (53 * hash) + getCommandsList().hashCode(); - } - if (getBuiltArtifactsCount() > 0) { - hash = (37 * hash) + BUILT_ARTIFACTS_FIELD_NUMBER; - hash = (53 * hash) + getBuiltArtifactsList().hashCode(); - } - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + CREATOR_FIELD_NUMBER; - hash = (53 * hash) + getCreator().hashCode(); - hash = (37 * hash) + LOGS_URI_FIELD_NUMBER; - hash = (53 * hash) + getLogsUri().hashCode(); - if (hasSourceProvenance()) { - hash = (37 * hash) + SOURCE_PROVENANCE_FIELD_NUMBER; - hash = (53 * hash) + getSourceProvenance().hashCode(); - } - hash = (37 * hash) + TRIGGER_ID_FIELD_NUMBER; - hash = (53 * hash) + getTriggerId().hashCode(); - if (!internalGetBuildOptions().getMap().isEmpty()) { - hash = (37 * hash) + BUILD_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetBuildOptions().hashCode(); - } - hash = (37 * hash) + BUILDER_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getBuilderVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BuildProvenance parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildProvenance parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildProvenance parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildProvenance parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildProvenance parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuildProvenance parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuildProvenance parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildProvenance parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuildProvenance parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildProvenance parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuildProvenance parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuildProvenance parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BuildProvenance prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Provenance of a build. Contains all information needed to verify the full
-   * details about the build from source to completion.
-   * 
- * - * Protobuf type {@code grafeas.v1.BuildProvenance} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BuildProvenance) - io.grafeas.v1.BuildProvenanceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 12: - return internalGetBuildOptions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 12: - return internalGetMutableBuildOptions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuildProvenance.class, io.grafeas.v1.BuildProvenance.Builder.class); - } - - // Construct using io.grafeas.v1.BuildProvenance.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - projectId_ = ""; - if (commandsBuilder_ == null) { - commands_ = java.util.Collections.emptyList(); - } else { - commands_ = null; - commandsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - if (builtArtifactsBuilder_ == null) { - builtArtifacts_ = java.util.Collections.emptyList(); - } else { - builtArtifacts_ = null; - builtArtifactsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - creator_ = ""; - logsUri_ = ""; - sourceProvenance_ = null; - if (sourceProvenanceBuilder_ != null) { - sourceProvenanceBuilder_.dispose(); - sourceProvenanceBuilder_ = null; - } - triggerId_ = ""; - internalGetMutableBuildOptions().clear(); - builderVersion_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_BuildProvenance_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BuildProvenance getDefaultInstanceForType() { - return io.grafeas.v1.BuildProvenance.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BuildProvenance build() { - io.grafeas.v1.BuildProvenance result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BuildProvenance buildPartial() { - io.grafeas.v1.BuildProvenance result = new io.grafeas.v1.BuildProvenance(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.BuildProvenance result) { - if (commandsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - commands_ = java.util.Collections.unmodifiableList(commands_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.commands_ = commands_; - } else { - result.commands_ = commandsBuilder_.build(); - } - if (builtArtifactsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - builtArtifacts_ = java.util.Collections.unmodifiableList(builtArtifacts_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.builtArtifacts_ = builtArtifacts_; - } else { - result.builtArtifacts_ = builtArtifactsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.BuildProvenance result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.projectId_ = projectId_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.createTime_ = createTimeBuilder_ == null - ? createTime_ - : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.startTime_ = startTimeBuilder_ == null - ? startTime_ - : startTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.endTime_ = endTimeBuilder_ == null - ? endTime_ - : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.creator_ = creator_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.logsUri_ = logsUri_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.sourceProvenance_ = sourceProvenanceBuilder_ == null - ? sourceProvenance_ - : sourceProvenanceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.triggerId_ = triggerId_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.buildOptions_ = internalGetBuildOptions(); - result.buildOptions_.makeImmutable(); - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.builderVersion_ = builderVersion_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BuildProvenance) { - return mergeFrom((io.grafeas.v1.BuildProvenance)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BuildProvenance other) { - if (other == io.grafeas.v1.BuildProvenance.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (commandsBuilder_ == null) { - if (!other.commands_.isEmpty()) { - if (commands_.isEmpty()) { - commands_ = other.commands_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureCommandsIsMutable(); - commands_.addAll(other.commands_); - } - onChanged(); - } - } else { - if (!other.commands_.isEmpty()) { - if (commandsBuilder_.isEmpty()) { - commandsBuilder_.dispose(); - commandsBuilder_ = null; - commands_ = other.commands_; - bitField0_ = (bitField0_ & ~0x00000004); - commandsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getCommandsFieldBuilder() : null; - } else { - commandsBuilder_.addAllMessages(other.commands_); - } - } - } - if (builtArtifactsBuilder_ == null) { - if (!other.builtArtifacts_.isEmpty()) { - if (builtArtifacts_.isEmpty()) { - builtArtifacts_ = other.builtArtifacts_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.addAll(other.builtArtifacts_); - } - onChanged(); - } - } else { - if (!other.builtArtifacts_.isEmpty()) { - if (builtArtifactsBuilder_.isEmpty()) { - builtArtifactsBuilder_.dispose(); - builtArtifactsBuilder_ = null; - builtArtifacts_ = other.builtArtifacts_; - bitField0_ = (bitField0_ & ~0x00000008); - builtArtifactsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBuiltArtifactsFieldBuilder() : null; - } else { - builtArtifactsBuilder_.addAllMessages(other.builtArtifacts_); - } - } - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (!other.getCreator().isEmpty()) { - creator_ = other.creator_; - bitField0_ |= 0x00000080; - onChanged(); - } - if (!other.getLogsUri().isEmpty()) { - logsUri_ = other.logsUri_; - bitField0_ |= 0x00000100; - onChanged(); - } - if (other.hasSourceProvenance()) { - mergeSourceProvenance(other.getSourceProvenance()); - } - if (!other.getTriggerId().isEmpty()) { - triggerId_ = other.triggerId_; - bitField0_ |= 0x00000400; - onChanged(); - } - internalGetMutableBuildOptions().mergeFrom( - other.internalGetBuildOptions()); - bitField0_ |= 0x00000800; - if (!other.getBuilderVersion().isEmpty()) { - builderVersion_ = other.builderVersion_; - bitField0_ |= 0x00001000; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - projectId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - io.grafeas.v1.Command m = - input.readMessage( - io.grafeas.v1.Command.parser(), - extensionRegistry); - if (commandsBuilder_ == null) { - ensureCommandsIsMutable(); - commands_.add(m); - } else { - commandsBuilder_.addMessage(m); - } - break; - } // case 26 - case 34: { - io.grafeas.v1.Artifact m = - input.readMessage( - io.grafeas.v1.Artifact.parser(), - extensionRegistry); - if (builtArtifactsBuilder_ == null) { - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.add(m); - } else { - builtArtifactsBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: { - input.readMessage( - getCreateTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - input.readMessage( - getStartTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - input.readMessage( - getEndTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: { - creator_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 66 - case 74: { - logsUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - break; - } // case 74 - case 82: { - input.readMessage( - getSourceProvenanceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 82 - case 90: { - triggerId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - break; - } // case 90 - case 98: { - com.google.protobuf.MapEntry - buildOptions__ = input.readMessage( - BuildOptionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableBuildOptions().getMutableMap().put( - buildOptions__.getKey(), buildOptions__.getValue()); - bitField0_ |= 0x00000800; - break; - } // case 98 - case 106: { - builderVersion_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - break; - } // case 106 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - *
-     * Required. Unique identifier of the build.
-     * 
- * - * string id = 1; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Unique identifier of the build.
-     * 
- * - * string id = 1; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Unique identifier of the build.
-     * 
- * - * string id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. Unique identifier of the build.
-     * 
- * - * string id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. Unique identifier of the build.
-     * 
- * - * string id = 1; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object projectId_ = ""; - /** - *
-     * ID of the project.
-     * 
- * - * string project_id = 2; - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * ID of the project.
-     * 
- * - * string project_id = 2; - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * ID of the project.
-     * 
- * - * string project_id = 2; - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - projectId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * ID of the project.
-     * 
- * - * string project_id = 2; - * @return This builder for chaining. - */ - public Builder clearProjectId() { - projectId_ = getDefaultInstance().getProjectId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * ID of the project.
-     * 
- * - * string project_id = 2; - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - projectId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.util.List commands_ = - java.util.Collections.emptyList(); - private void ensureCommandsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - commands_ = new java.util.ArrayList(commands_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Command, io.grafeas.v1.Command.Builder, io.grafeas.v1.CommandOrBuilder> commandsBuilder_; - - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public java.util.List getCommandsList() { - if (commandsBuilder_ == null) { - return java.util.Collections.unmodifiableList(commands_); - } else { - return commandsBuilder_.getMessageList(); - } - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public int getCommandsCount() { - if (commandsBuilder_ == null) { - return commands_.size(); - } else { - return commandsBuilder_.getCount(); - } - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public io.grafeas.v1.Command getCommands(int index) { - if (commandsBuilder_ == null) { - return commands_.get(index); - } else { - return commandsBuilder_.getMessage(index); - } - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder setCommands( - int index, io.grafeas.v1.Command value) { - if (commandsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCommandsIsMutable(); - commands_.set(index, value); - onChanged(); - } else { - commandsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder setCommands( - int index, io.grafeas.v1.Command.Builder builderForValue) { - if (commandsBuilder_ == null) { - ensureCommandsIsMutable(); - commands_.set(index, builderForValue.build()); - onChanged(); - } else { - commandsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder addCommands(io.grafeas.v1.Command value) { - if (commandsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCommandsIsMutable(); - commands_.add(value); - onChanged(); - } else { - commandsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder addCommands( - int index, io.grafeas.v1.Command value) { - if (commandsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCommandsIsMutable(); - commands_.add(index, value); - onChanged(); - } else { - commandsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder addCommands( - io.grafeas.v1.Command.Builder builderForValue) { - if (commandsBuilder_ == null) { - ensureCommandsIsMutable(); - commands_.add(builderForValue.build()); - onChanged(); - } else { - commandsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder addCommands( - int index, io.grafeas.v1.Command.Builder builderForValue) { - if (commandsBuilder_ == null) { - ensureCommandsIsMutable(); - commands_.add(index, builderForValue.build()); - onChanged(); - } else { - commandsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder addAllCommands( - java.lang.Iterable values) { - if (commandsBuilder_ == null) { - ensureCommandsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, commands_); - onChanged(); - } else { - commandsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder clearCommands() { - if (commandsBuilder_ == null) { - commands_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - commandsBuilder_.clear(); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public Builder removeCommands(int index) { - if (commandsBuilder_ == null) { - ensureCommandsIsMutable(); - commands_.remove(index); - onChanged(); - } else { - commandsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public io.grafeas.v1.Command.Builder getCommandsBuilder( - int index) { - return getCommandsFieldBuilder().getBuilder(index); - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public io.grafeas.v1.CommandOrBuilder getCommandsOrBuilder( - int index) { - if (commandsBuilder_ == null) { - return commands_.get(index); } else { - return commandsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public java.util.List - getCommandsOrBuilderList() { - if (commandsBuilder_ != null) { - return commandsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(commands_); - } - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public io.grafeas.v1.Command.Builder addCommandsBuilder() { - return getCommandsFieldBuilder().addBuilder( - io.grafeas.v1.Command.getDefaultInstance()); - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public io.grafeas.v1.Command.Builder addCommandsBuilder( - int index) { - return getCommandsFieldBuilder().addBuilder( - index, io.grafeas.v1.Command.getDefaultInstance()); - } - /** - *
-     * Commands requested by the build.
-     * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - public java.util.List - getCommandsBuilderList() { - return getCommandsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Command, io.grafeas.v1.Command.Builder, io.grafeas.v1.CommandOrBuilder> - getCommandsFieldBuilder() { - if (commandsBuilder_ == null) { - commandsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Command, io.grafeas.v1.Command.Builder, io.grafeas.v1.CommandOrBuilder>( - commands_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - commands_ = null; - } - return commandsBuilder_; - } - - private java.util.List builtArtifacts_ = - java.util.Collections.emptyList(); - private void ensureBuiltArtifactsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - builtArtifacts_ = new java.util.ArrayList(builtArtifacts_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Artifact, io.grafeas.v1.Artifact.Builder, io.grafeas.v1.ArtifactOrBuilder> builtArtifactsBuilder_; - - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public java.util.List getBuiltArtifactsList() { - if (builtArtifactsBuilder_ == null) { - return java.util.Collections.unmodifiableList(builtArtifacts_); - } else { - return builtArtifactsBuilder_.getMessageList(); - } - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public int getBuiltArtifactsCount() { - if (builtArtifactsBuilder_ == null) { - return builtArtifacts_.size(); - } else { - return builtArtifactsBuilder_.getCount(); - } - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public io.grafeas.v1.Artifact getBuiltArtifacts(int index) { - if (builtArtifactsBuilder_ == null) { - return builtArtifacts_.get(index); - } else { - return builtArtifactsBuilder_.getMessage(index); - } - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder setBuiltArtifacts( - int index, io.grafeas.v1.Artifact value) { - if (builtArtifactsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.set(index, value); - onChanged(); - } else { - builtArtifactsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder setBuiltArtifacts( - int index, io.grafeas.v1.Artifact.Builder builderForValue) { - if (builtArtifactsBuilder_ == null) { - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.set(index, builderForValue.build()); - onChanged(); - } else { - builtArtifactsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder addBuiltArtifacts(io.grafeas.v1.Artifact value) { - if (builtArtifactsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.add(value); - onChanged(); - } else { - builtArtifactsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder addBuiltArtifacts( - int index, io.grafeas.v1.Artifact value) { - if (builtArtifactsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.add(index, value); - onChanged(); - } else { - builtArtifactsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder addBuiltArtifacts( - io.grafeas.v1.Artifact.Builder builderForValue) { - if (builtArtifactsBuilder_ == null) { - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.add(builderForValue.build()); - onChanged(); - } else { - builtArtifactsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder addBuiltArtifacts( - int index, io.grafeas.v1.Artifact.Builder builderForValue) { - if (builtArtifactsBuilder_ == null) { - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.add(index, builderForValue.build()); - onChanged(); - } else { - builtArtifactsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder addAllBuiltArtifacts( - java.lang.Iterable values) { - if (builtArtifactsBuilder_ == null) { - ensureBuiltArtifactsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, builtArtifacts_); - onChanged(); - } else { - builtArtifactsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder clearBuiltArtifacts() { - if (builtArtifactsBuilder_ == null) { - builtArtifacts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - builtArtifactsBuilder_.clear(); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public Builder removeBuiltArtifacts(int index) { - if (builtArtifactsBuilder_ == null) { - ensureBuiltArtifactsIsMutable(); - builtArtifacts_.remove(index); - onChanged(); - } else { - builtArtifactsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public io.grafeas.v1.Artifact.Builder getBuiltArtifactsBuilder( - int index) { - return getBuiltArtifactsFieldBuilder().getBuilder(index); - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public io.grafeas.v1.ArtifactOrBuilder getBuiltArtifactsOrBuilder( - int index) { - if (builtArtifactsBuilder_ == null) { - return builtArtifacts_.get(index); } else { - return builtArtifactsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public java.util.List - getBuiltArtifactsOrBuilderList() { - if (builtArtifactsBuilder_ != null) { - return builtArtifactsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(builtArtifacts_); - } - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public io.grafeas.v1.Artifact.Builder addBuiltArtifactsBuilder() { - return getBuiltArtifactsFieldBuilder().addBuilder( - io.grafeas.v1.Artifact.getDefaultInstance()); - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public io.grafeas.v1.Artifact.Builder addBuiltArtifactsBuilder( - int index) { - return getBuiltArtifactsFieldBuilder().addBuilder( - index, io.grafeas.v1.Artifact.getDefaultInstance()); - } - /** - *
-     * Output of the build.
-     * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - public java.util.List - getBuiltArtifactsBuilderList() { - return getBuiltArtifactsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Artifact, io.grafeas.v1.Artifact.Builder, io.grafeas.v1.ArtifactOrBuilder> - getBuiltArtifactsFieldBuilder() { - if (builtArtifactsBuilder_ == null) { - builtArtifactsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Artifact, io.grafeas.v1.Artifact.Builder, io.grafeas.v1.ArtifactOrBuilder>( - builtArtifacts_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - builtArtifacts_ = null; - } - return builtArtifactsBuilder_; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - createTime_ != null && - createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000010); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Time at which the build was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - } else { - startTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - public Builder setStartTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - startTime_ != null && - startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getStartTimeBuilder().mergeFrom(value); - } else { - startTime_ = value; - } - } else { - startTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - public Builder clearStartTime() { - bitField0_ = (bitField0_ & ~0x00000020); - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - *
-     * Time at which execution of the build was started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getStartTime(), - getParentForChildren(), - isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - public Builder setEndTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - endTime_ != null && - endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000040); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - *
-     * Time at which execution of the build was finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getEndTime(), - getParentForChildren(), - isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private java.lang.Object creator_ = ""; - /** - *
-     * E-mail address of the user who initiated this build. Note that this was the
-     * user's e-mail address at the time the build was initiated; this address may
-     * not represent the same end-user for all time.
-     * 
- * - * string creator = 8; - * @return The creator. - */ - public java.lang.String getCreator() { - java.lang.Object ref = creator_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - creator_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * E-mail address of the user who initiated this build. Note that this was the
-     * user's e-mail address at the time the build was initiated; this address may
-     * not represent the same end-user for all time.
-     * 
- * - * string creator = 8; - * @return The bytes for creator. - */ - public com.google.protobuf.ByteString - getCreatorBytes() { - java.lang.Object ref = creator_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - creator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * E-mail address of the user who initiated this build. Note that this was the
-     * user's e-mail address at the time the build was initiated; this address may
-     * not represent the same end-user for all time.
-     * 
- * - * string creator = 8; - * @param value The creator to set. - * @return This builder for chaining. - */ - public Builder setCreator( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - creator_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * E-mail address of the user who initiated this build. Note that this was the
-     * user's e-mail address at the time the build was initiated; this address may
-     * not represent the same end-user for all time.
-     * 
- * - * string creator = 8; - * @return This builder for chaining. - */ - public Builder clearCreator() { - creator_ = getDefaultInstance().getCreator(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - /** - *
-     * E-mail address of the user who initiated this build. Note that this was the
-     * user's e-mail address at the time the build was initiated; this address may
-     * not represent the same end-user for all time.
-     * 
- * - * string creator = 8; - * @param value The bytes for creator to set. - * @return This builder for chaining. - */ - public Builder setCreatorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - creator_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - private java.lang.Object logsUri_ = ""; - /** - *
-     * URI where any logs for this provenance were written.
-     * 
- * - * string logs_uri = 9; - * @return The logsUri. - */ - public java.lang.String getLogsUri() { - java.lang.Object ref = logsUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - logsUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * URI where any logs for this provenance were written.
-     * 
- * - * string logs_uri = 9; - * @return The bytes for logsUri. - */ - public com.google.protobuf.ByteString - getLogsUriBytes() { - java.lang.Object ref = logsUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - logsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * URI where any logs for this provenance were written.
-     * 
- * - * string logs_uri = 9; - * @param value The logsUri to set. - * @return This builder for chaining. - */ - public Builder setLogsUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - logsUri_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * URI where any logs for this provenance were written.
-     * 
- * - * string logs_uri = 9; - * @return This builder for chaining. - */ - public Builder clearLogsUri() { - logsUri_ = getDefaultInstance().getLogsUri(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - *
-     * URI where any logs for this provenance were written.
-     * 
- * - * string logs_uri = 9; - * @param value The bytes for logsUri to set. - * @return This builder for chaining. - */ - public Builder setLogsUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - logsUri_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - private io.grafeas.v1.Source sourceProvenance_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Source, io.grafeas.v1.Source.Builder, io.grafeas.v1.SourceOrBuilder> sourceProvenanceBuilder_; - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - * @return Whether the sourceProvenance field is set. - */ - public boolean hasSourceProvenance() { - return ((bitField0_ & 0x00000200) != 0); - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - * @return The sourceProvenance. - */ - public io.grafeas.v1.Source getSourceProvenance() { - if (sourceProvenanceBuilder_ == null) { - return sourceProvenance_ == null ? io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; - } else { - return sourceProvenanceBuilder_.getMessage(); - } - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - public Builder setSourceProvenance(io.grafeas.v1.Source value) { - if (sourceProvenanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sourceProvenance_ = value; - } else { - sourceProvenanceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - public Builder setSourceProvenance( - io.grafeas.v1.Source.Builder builderForValue) { - if (sourceProvenanceBuilder_ == null) { - sourceProvenance_ = builderForValue.build(); - } else { - sourceProvenanceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - public Builder mergeSourceProvenance(io.grafeas.v1.Source value) { - if (sourceProvenanceBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) && - sourceProvenance_ != null && - sourceProvenance_ != io.grafeas.v1.Source.getDefaultInstance()) { - getSourceProvenanceBuilder().mergeFrom(value); - } else { - sourceProvenance_ = value; - } - } else { - sourceProvenanceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - public Builder clearSourceProvenance() { - bitField0_ = (bitField0_ & ~0x00000200); - sourceProvenance_ = null; - if (sourceProvenanceBuilder_ != null) { - sourceProvenanceBuilder_.dispose(); - sourceProvenanceBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - public io.grafeas.v1.Source.Builder getSourceProvenanceBuilder() { - bitField0_ |= 0x00000200; - onChanged(); - return getSourceProvenanceFieldBuilder().getBuilder(); - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - public io.grafeas.v1.SourceOrBuilder getSourceProvenanceOrBuilder() { - if (sourceProvenanceBuilder_ != null) { - return sourceProvenanceBuilder_.getMessageOrBuilder(); - } else { - return sourceProvenance_ == null ? - io.grafeas.v1.Source.getDefaultInstance() : sourceProvenance_; - } - } - /** - *
-     * Details of the Source input to the build.
-     * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Source, io.grafeas.v1.Source.Builder, io.grafeas.v1.SourceOrBuilder> - getSourceProvenanceFieldBuilder() { - if (sourceProvenanceBuilder_ == null) { - sourceProvenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Source, io.grafeas.v1.Source.Builder, io.grafeas.v1.SourceOrBuilder>( - getSourceProvenance(), - getParentForChildren(), - isClean()); - sourceProvenance_ = null; - } - return sourceProvenanceBuilder_; - } - - private java.lang.Object triggerId_ = ""; - /** - *
-     * Trigger identifier if the build was triggered automatically; empty if not.
-     * 
- * - * string trigger_id = 11; - * @return The triggerId. - */ - public java.lang.String getTriggerId() { - java.lang.Object ref = triggerId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - triggerId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Trigger identifier if the build was triggered automatically; empty if not.
-     * 
- * - * string trigger_id = 11; - * @return The bytes for triggerId. - */ - public com.google.protobuf.ByteString - getTriggerIdBytes() { - java.lang.Object ref = triggerId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - triggerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Trigger identifier if the build was triggered automatically; empty if not.
-     * 
- * - * string trigger_id = 11; - * @param value The triggerId to set. - * @return This builder for chaining. - */ - public Builder setTriggerId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - triggerId_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - *
-     * Trigger identifier if the build was triggered automatically; empty if not.
-     * 
- * - * string trigger_id = 11; - * @return This builder for chaining. - */ - public Builder clearTriggerId() { - triggerId_ = getDefaultInstance().getTriggerId(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - return this; - } - /** - *
-     * Trigger identifier if the build was triggered automatically; empty if not.
-     * 
- * - * string trigger_id = 11; - * @param value The bytes for triggerId to set. - * @return This builder for chaining. - */ - public Builder setTriggerIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - triggerId_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> buildOptions_; - private com.google.protobuf.MapField - internalGetBuildOptions() { - if (buildOptions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - BuildOptionsDefaultEntryHolder.defaultEntry); - } - return buildOptions_; - } - private com.google.protobuf.MapField - internalGetMutableBuildOptions() { - if (buildOptions_ == null) { - buildOptions_ = com.google.protobuf.MapField.newMapField( - BuildOptionsDefaultEntryHolder.defaultEntry); - } - if (!buildOptions_.isMutable()) { - buildOptions_ = buildOptions_.copy(); - } - bitField0_ |= 0x00000800; - onChanged(); - return buildOptions_; - } - public int getBuildOptionsCount() { - return internalGetBuildOptions().getMap().size(); - } - /** - *
-     * Special options applied to this build. This is a catch-all field where
-     * build providers can enter any desired additional details.
-     * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public boolean containsBuildOptions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetBuildOptions().getMap().containsKey(key); - } - /** - * Use {@link #getBuildOptionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getBuildOptions() { - return getBuildOptionsMap(); - } - /** - *
-     * Special options applied to this build. This is a catch-all field where
-     * build providers can enter any desired additional details.
-     * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public java.util.Map getBuildOptionsMap() { - return internalGetBuildOptions().getMap(); - } - /** - *
-     * Special options applied to this build. This is a catch-all field where
-     * build providers can enter any desired additional details.
-     * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getBuildOptionsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetBuildOptions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Special options applied to this build. This is a catch-all field where
-     * build providers can enter any desired additional details.
-     * 
- * - * map<string, string> build_options = 12; - */ - @java.lang.Override - public java.lang.String getBuildOptionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetBuildOptions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearBuildOptions() { - bitField0_ = (bitField0_ & ~0x00000800); - internalGetMutableBuildOptions().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Special options applied to this build. This is a catch-all field where
-     * build providers can enter any desired additional details.
-     * 
- * - * map<string, string> build_options = 12; - */ - public Builder removeBuildOptions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableBuildOptions().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableBuildOptions() { - bitField0_ |= 0x00000800; - return internalGetMutableBuildOptions().getMutableMap(); - } - /** - *
-     * Special options applied to this build. This is a catch-all field where
-     * build providers can enter any desired additional details.
-     * 
- * - * map<string, string> build_options = 12; - */ - public Builder putBuildOptions( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableBuildOptions().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000800; - return this; - } - /** - *
-     * Special options applied to this build. This is a catch-all field where
-     * build providers can enter any desired additional details.
-     * 
- * - * map<string, string> build_options = 12; - */ - public Builder putAllBuildOptions( - java.util.Map values) { - internalGetMutableBuildOptions().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000800; - return this; - } - - private java.lang.Object builderVersion_ = ""; - /** - *
-     * Version string of the builder at the time this build was executed.
-     * 
- * - * string builder_version = 13; - * @return The builderVersion. - */ - public java.lang.String getBuilderVersion() { - java.lang.Object ref = builderVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - builderVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Version string of the builder at the time this build was executed.
-     * 
- * - * string builder_version = 13; - * @return The bytes for builderVersion. - */ - public com.google.protobuf.ByteString - getBuilderVersionBytes() { - java.lang.Object ref = builderVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - builderVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Version string of the builder at the time this build was executed.
-     * 
- * - * string builder_version = 13; - * @param value The builderVersion to set. - * @return This builder for chaining. - */ - public Builder setBuilderVersion( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - builderVersion_ = value; - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - *
-     * Version string of the builder at the time this build was executed.
-     * 
- * - * string builder_version = 13; - * @return This builder for chaining. - */ - public Builder clearBuilderVersion() { - builderVersion_ = getDefaultInstance().getBuilderVersion(); - bitField0_ = (bitField0_ & ~0x00001000); - onChanged(); - return this; - } - /** - *
-     * Version string of the builder at the time this build was executed.
-     * 
- * - * string builder_version = 13; - * @param value The bytes for builderVersion to set. - * @return This builder for chaining. - */ - public Builder setBuilderVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - builderVersion_ = value; - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BuildProvenance) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BuildProvenance) - private static final io.grafeas.v1.BuildProvenance DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BuildProvenance(); - } - - public static io.grafeas.v1.BuildProvenance getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BuildProvenance parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BuildProvenance getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java deleted file mode 100644 index 9ee96a48e05b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java +++ /dev/null @@ -1,388 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface BuildProvenanceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BuildProvenance) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Unique identifier of the build.
-   * 
- * - * string id = 1; - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * Required. Unique identifier of the build.
-   * 
- * - * string id = 1; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * ID of the project.
-   * 
- * - * string project_id = 2; - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - *
-   * ID of the project.
-   * 
- * - * string project_id = 2; - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString - getProjectIdBytes(); - - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - java.util.List - getCommandsList(); - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - io.grafeas.v1.Command getCommands(int index); - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - int getCommandsCount(); - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - java.util.List - getCommandsOrBuilderList(); - /** - *
-   * Commands requested by the build.
-   * 
- * - * repeated .grafeas.v1.Command commands = 3; - */ - io.grafeas.v1.CommandOrBuilder getCommandsOrBuilder( - int index); - - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - java.util.List - getBuiltArtifactsList(); - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - io.grafeas.v1.Artifact getBuiltArtifacts(int index); - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - int getBuiltArtifactsCount(); - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - java.util.List - getBuiltArtifactsOrBuilderList(); - /** - *
-   * Output of the build.
-   * 
- * - * repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - io.grafeas.v1.ArtifactOrBuilder getBuiltArtifactsOrBuilder( - int index); - - /** - *
-   * Time at which the build was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Time at which the build was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Time at which the build was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Time at which execution of the build was started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 6; - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - *
-   * Time at which execution of the build was started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 6; - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - *
-   * Time at which execution of the build was started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 6; - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - *
-   * Time at which execution of the build was finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7; - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - *
-   * Time at which execution of the build was finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7; - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - *
-   * Time at which execution of the build was finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - *
-   * E-mail address of the user who initiated this build. Note that this was the
-   * user's e-mail address at the time the build was initiated; this address may
-   * not represent the same end-user for all time.
-   * 
- * - * string creator = 8; - * @return The creator. - */ - java.lang.String getCreator(); - /** - *
-   * E-mail address of the user who initiated this build. Note that this was the
-   * user's e-mail address at the time the build was initiated; this address may
-   * not represent the same end-user for all time.
-   * 
- * - * string creator = 8; - * @return The bytes for creator. - */ - com.google.protobuf.ByteString - getCreatorBytes(); - - /** - *
-   * URI where any logs for this provenance were written.
-   * 
- * - * string logs_uri = 9; - * @return The logsUri. - */ - java.lang.String getLogsUri(); - /** - *
-   * URI where any logs for this provenance were written.
-   * 
- * - * string logs_uri = 9; - * @return The bytes for logsUri. - */ - com.google.protobuf.ByteString - getLogsUriBytes(); - - /** - *
-   * Details of the Source input to the build.
-   * 
- * - * .grafeas.v1.Source source_provenance = 10; - * @return Whether the sourceProvenance field is set. - */ - boolean hasSourceProvenance(); - /** - *
-   * Details of the Source input to the build.
-   * 
- * - * .grafeas.v1.Source source_provenance = 10; - * @return The sourceProvenance. - */ - io.grafeas.v1.Source getSourceProvenance(); - /** - *
-   * Details of the Source input to the build.
-   * 
- * - * .grafeas.v1.Source source_provenance = 10; - */ - io.grafeas.v1.SourceOrBuilder getSourceProvenanceOrBuilder(); - - /** - *
-   * Trigger identifier if the build was triggered automatically; empty if not.
-   * 
- * - * string trigger_id = 11; - * @return The triggerId. - */ - java.lang.String getTriggerId(); - /** - *
-   * Trigger identifier if the build was triggered automatically; empty if not.
-   * 
- * - * string trigger_id = 11; - * @return The bytes for triggerId. - */ - com.google.protobuf.ByteString - getTriggerIdBytes(); - - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - int getBuildOptionsCount(); - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - boolean containsBuildOptions( - java.lang.String key); - /** - * Use {@link #getBuildOptionsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getBuildOptions(); - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - java.util.Map - getBuildOptionsMap(); - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - /* nullable */ -java.lang.String getBuildOptionsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Special options applied to this build. This is a catch-all field where
-   * build providers can enter any desired additional details.
-   * 
- * - * map<string, string> build_options = 12; - */ - java.lang.String getBuildOptionsOrThrow( - java.lang.String key); - - /** - *
-   * Version string of the builder at the time this build was executed.
-   * 
- * - * string builder_version = 13; - * @return The builderVersion. - */ - java.lang.String getBuilderVersion(); - /** - *
-   * Version string of the builder at the time this build was executed.
-   * 
- * - * string builder_version = 13; - * @return The bytes for builderVersion. - */ - com.google.protobuf.ByteString - getBuilderVersionBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java deleted file mode 100644 index 0d9adb96567b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfig.java +++ /dev/null @@ -1,544 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.BuilderConfig} - */ -public final class BuilderConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.BuilderConfig) - BuilderConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use BuilderConfig.newBuilder() to construct. - private BuilderConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BuilderConfig() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BuilderConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuilderConfig.class, io.grafeas.v1.BuilderConfig.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.BuilderConfig)) { - return super.equals(obj); - } - io.grafeas.v1.BuilderConfig other = (io.grafeas.v1.BuilderConfig) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.BuilderConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuilderConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuilderConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuilderConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuilderConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.BuilderConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.BuilderConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuilderConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuilderConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuilderConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.BuilderConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.BuilderConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.BuilderConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.BuilderConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.BuilderConfig) - io.grafeas.v1.BuilderConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.BuilderConfig.class, io.grafeas.v1.BuilderConfig.Builder.class); - } - - // Construct using io.grafeas.v1.BuilderConfig.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_BuilderConfig_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.BuilderConfig getDefaultInstanceForType() { - return io.grafeas.v1.BuilderConfig.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.BuilderConfig build() { - io.grafeas.v1.BuilderConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.BuilderConfig buildPartial() { - io.grafeas.v1.BuilderConfig result = new io.grafeas.v1.BuilderConfig(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.BuilderConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.BuilderConfig) { - return mergeFrom((io.grafeas.v1.BuilderConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.BuilderConfig other) { - if (other == io.grafeas.v1.BuilderConfig.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.BuilderConfig) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.BuilderConfig) - private static final io.grafeas.v1.BuilderConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.BuilderConfig(); - } - - public static io.grafeas.v1.BuilderConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BuilderConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.BuilderConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java deleted file mode 100644 index 99554d4313c0..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/BuilderConfigOrBuilder.java +++ /dev/null @@ -1,21 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -public interface BuilderConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.BuilderConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1; - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java deleted file mode 100644 index e426740de2e1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSS.java +++ /dev/null @@ -1,2394 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/cvss.proto - -package io.grafeas.v1; - -/** - *
- * Common Vulnerability Scoring System.
- * For details, see https://www.first.org/cvss/specification-document
- * This is a message we will try to use for storing various versions of CVSS
- * rather than making a separate proto for storing a specific version.
- * 
- * - * Protobuf type {@code grafeas.v1.CVSS} - */ -public final class CVSS extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.CVSS) - CVSSOrBuilder { -private static final long serialVersionUID = 0L; - // Use CVSS.newBuilder() to construct. - private CVSS(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CVSS() { - attackVector_ = 0; - attackComplexity_ = 0; - authentication_ = 0; - privilegesRequired_ = 0; - userInteraction_ = 0; - scope_ = 0; - confidentialityImpact_ = 0; - integrityImpact_ = 0; - availabilityImpact_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CVSS(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CVSS.class, io.grafeas.v1.CVSS.Builder.class); - } - - /** - * Protobuf enum {@code grafeas.v1.CVSS.AttackVector} - */ - public enum AttackVector - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ATTACK_VECTOR_UNSPECIFIED = 0; - */ - ATTACK_VECTOR_UNSPECIFIED(0), - /** - * ATTACK_VECTOR_NETWORK = 1; - */ - ATTACK_VECTOR_NETWORK(1), - /** - * ATTACK_VECTOR_ADJACENT = 2; - */ - ATTACK_VECTOR_ADJACENT(2), - /** - * ATTACK_VECTOR_LOCAL = 3; - */ - ATTACK_VECTOR_LOCAL(3), - /** - * ATTACK_VECTOR_PHYSICAL = 4; - */ - ATTACK_VECTOR_PHYSICAL(4), - UNRECOGNIZED(-1), - ; - - /** - * ATTACK_VECTOR_UNSPECIFIED = 0; - */ - public static final int ATTACK_VECTOR_UNSPECIFIED_VALUE = 0; - /** - * ATTACK_VECTOR_NETWORK = 1; - */ - public static final int ATTACK_VECTOR_NETWORK_VALUE = 1; - /** - * ATTACK_VECTOR_ADJACENT = 2; - */ - public static final int ATTACK_VECTOR_ADJACENT_VALUE = 2; - /** - * ATTACK_VECTOR_LOCAL = 3; - */ - public static final int ATTACK_VECTOR_LOCAL_VALUE = 3; - /** - * ATTACK_VECTOR_PHYSICAL = 4; - */ - public static final int ATTACK_VECTOR_PHYSICAL_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AttackVector valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AttackVector forNumber(int value) { - switch (value) { - case 0: return ATTACK_VECTOR_UNSPECIFIED; - case 1: return ATTACK_VECTOR_NETWORK; - case 2: return ATTACK_VECTOR_ADJACENT; - case 3: return ATTACK_VECTOR_LOCAL; - case 4: return ATTACK_VECTOR_PHYSICAL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AttackVector> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AttackVector findValueByNumber(int number) { - return AttackVector.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(0); - } - - private static final AttackVector[] VALUES = values(); - - public static AttackVector valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AttackVector(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.AttackVector) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSS.AttackComplexity} - */ - public enum AttackComplexity - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - ATTACK_COMPLEXITY_UNSPECIFIED(0), - /** - * ATTACK_COMPLEXITY_LOW = 1; - */ - ATTACK_COMPLEXITY_LOW(1), - /** - * ATTACK_COMPLEXITY_HIGH = 2; - */ - ATTACK_COMPLEXITY_HIGH(2), - UNRECOGNIZED(-1), - ; - - /** - * ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - public static final int ATTACK_COMPLEXITY_UNSPECIFIED_VALUE = 0; - /** - * ATTACK_COMPLEXITY_LOW = 1; - */ - public static final int ATTACK_COMPLEXITY_LOW_VALUE = 1; - /** - * ATTACK_COMPLEXITY_HIGH = 2; - */ - public static final int ATTACK_COMPLEXITY_HIGH_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AttackComplexity valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AttackComplexity forNumber(int value) { - switch (value) { - case 0: return ATTACK_COMPLEXITY_UNSPECIFIED; - case 1: return ATTACK_COMPLEXITY_LOW; - case 2: return ATTACK_COMPLEXITY_HIGH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AttackComplexity> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AttackComplexity findValueByNumber(int number) { - return AttackComplexity.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(1); - } - - private static final AttackComplexity[] VALUES = values(); - - public static AttackComplexity valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AttackComplexity(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.AttackComplexity) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSS.Authentication} - */ - public enum Authentication - implements com.google.protobuf.ProtocolMessageEnum { - /** - * AUTHENTICATION_UNSPECIFIED = 0; - */ - AUTHENTICATION_UNSPECIFIED(0), - /** - * AUTHENTICATION_MULTIPLE = 1; - */ - AUTHENTICATION_MULTIPLE(1), - /** - * AUTHENTICATION_SINGLE = 2; - */ - AUTHENTICATION_SINGLE(2), - /** - * AUTHENTICATION_NONE = 3; - */ - AUTHENTICATION_NONE(3), - UNRECOGNIZED(-1), - ; - - /** - * AUTHENTICATION_UNSPECIFIED = 0; - */ - public static final int AUTHENTICATION_UNSPECIFIED_VALUE = 0; - /** - * AUTHENTICATION_MULTIPLE = 1; - */ - public static final int AUTHENTICATION_MULTIPLE_VALUE = 1; - /** - * AUTHENTICATION_SINGLE = 2; - */ - public static final int AUTHENTICATION_SINGLE_VALUE = 2; - /** - * AUTHENTICATION_NONE = 3; - */ - public static final int AUTHENTICATION_NONE_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Authentication valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Authentication forNumber(int value) { - switch (value) { - case 0: return AUTHENTICATION_UNSPECIFIED; - case 1: return AUTHENTICATION_MULTIPLE; - case 2: return AUTHENTICATION_SINGLE; - case 3: return AUTHENTICATION_NONE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Authentication> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Authentication findValueByNumber(int number) { - return Authentication.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(2); - } - - private static final Authentication[] VALUES = values(); - - public static Authentication valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Authentication(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.Authentication) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSS.PrivilegesRequired} - */ - public enum PrivilegesRequired - implements com.google.protobuf.ProtocolMessageEnum { - /** - * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - PRIVILEGES_REQUIRED_UNSPECIFIED(0), - /** - * PRIVILEGES_REQUIRED_NONE = 1; - */ - PRIVILEGES_REQUIRED_NONE(1), - /** - * PRIVILEGES_REQUIRED_LOW = 2; - */ - PRIVILEGES_REQUIRED_LOW(2), - /** - * PRIVILEGES_REQUIRED_HIGH = 3; - */ - PRIVILEGES_REQUIRED_HIGH(3), - UNRECOGNIZED(-1), - ; - - /** - * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - public static final int PRIVILEGES_REQUIRED_UNSPECIFIED_VALUE = 0; - /** - * PRIVILEGES_REQUIRED_NONE = 1; - */ - public static final int PRIVILEGES_REQUIRED_NONE_VALUE = 1; - /** - * PRIVILEGES_REQUIRED_LOW = 2; - */ - public static final int PRIVILEGES_REQUIRED_LOW_VALUE = 2; - /** - * PRIVILEGES_REQUIRED_HIGH = 3; - */ - public static final int PRIVILEGES_REQUIRED_HIGH_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PrivilegesRequired valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static PrivilegesRequired forNumber(int value) { - switch (value) { - case 0: return PRIVILEGES_REQUIRED_UNSPECIFIED; - case 1: return PRIVILEGES_REQUIRED_NONE; - case 2: return PRIVILEGES_REQUIRED_LOW; - case 3: return PRIVILEGES_REQUIRED_HIGH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PrivilegesRequired> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PrivilegesRequired findValueByNumber(int number) { - return PrivilegesRequired.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(3); - } - - private static final PrivilegesRequired[] VALUES = values(); - - public static PrivilegesRequired valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private PrivilegesRequired(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.PrivilegesRequired) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSS.UserInteraction} - */ - public enum UserInteraction - implements com.google.protobuf.ProtocolMessageEnum { - /** - * USER_INTERACTION_UNSPECIFIED = 0; - */ - USER_INTERACTION_UNSPECIFIED(0), - /** - * USER_INTERACTION_NONE = 1; - */ - USER_INTERACTION_NONE(1), - /** - * USER_INTERACTION_REQUIRED = 2; - */ - USER_INTERACTION_REQUIRED(2), - UNRECOGNIZED(-1), - ; - - /** - * USER_INTERACTION_UNSPECIFIED = 0; - */ - public static final int USER_INTERACTION_UNSPECIFIED_VALUE = 0; - /** - * USER_INTERACTION_NONE = 1; - */ - public static final int USER_INTERACTION_NONE_VALUE = 1; - /** - * USER_INTERACTION_REQUIRED = 2; - */ - public static final int USER_INTERACTION_REQUIRED_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static UserInteraction valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static UserInteraction forNumber(int value) { - switch (value) { - case 0: return USER_INTERACTION_UNSPECIFIED; - case 1: return USER_INTERACTION_NONE; - case 2: return USER_INTERACTION_REQUIRED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - UserInteraction> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public UserInteraction findValueByNumber(int number) { - return UserInteraction.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(4); - } - - private static final UserInteraction[] VALUES = values(); - - public static UserInteraction valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private UserInteraction(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.UserInteraction) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSS.Scope} - */ - public enum Scope - implements com.google.protobuf.ProtocolMessageEnum { - /** - * SCOPE_UNSPECIFIED = 0; - */ - SCOPE_UNSPECIFIED(0), - /** - * SCOPE_UNCHANGED = 1; - */ - SCOPE_UNCHANGED(1), - /** - * SCOPE_CHANGED = 2; - */ - SCOPE_CHANGED(2), - UNRECOGNIZED(-1), - ; - - /** - * SCOPE_UNSPECIFIED = 0; - */ - public static final int SCOPE_UNSPECIFIED_VALUE = 0; - /** - * SCOPE_UNCHANGED = 1; - */ - public static final int SCOPE_UNCHANGED_VALUE = 1; - /** - * SCOPE_CHANGED = 2; - */ - public static final int SCOPE_CHANGED_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Scope valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Scope forNumber(int value) { - switch (value) { - case 0: return SCOPE_UNSPECIFIED; - case 1: return SCOPE_UNCHANGED; - case 2: return SCOPE_CHANGED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Scope> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Scope findValueByNumber(int number) { - return Scope.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(5); - } - - private static final Scope[] VALUES = values(); - - public static Scope valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Scope(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.Scope) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSS.Impact} - */ - public enum Impact - implements com.google.protobuf.ProtocolMessageEnum { - /** - * IMPACT_UNSPECIFIED = 0; - */ - IMPACT_UNSPECIFIED(0), - /** - * IMPACT_HIGH = 1; - */ - IMPACT_HIGH(1), - /** - * IMPACT_LOW = 2; - */ - IMPACT_LOW(2), - /** - * IMPACT_NONE = 3; - */ - IMPACT_NONE(3), - UNRECOGNIZED(-1), - ; - - /** - * IMPACT_UNSPECIFIED = 0; - */ - public static final int IMPACT_UNSPECIFIED_VALUE = 0; - /** - * IMPACT_HIGH = 1; - */ - public static final int IMPACT_HIGH_VALUE = 1; - /** - * IMPACT_LOW = 2; - */ - public static final int IMPACT_LOW_VALUE = 2; - /** - * IMPACT_NONE = 3; - */ - public static final int IMPACT_NONE_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Impact valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Impact forNumber(int value) { - switch (value) { - case 0: return IMPACT_UNSPECIFIED; - case 1: return IMPACT_HIGH; - case 2: return IMPACT_LOW; - case 3: return IMPACT_NONE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Impact> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Impact findValueByNumber(int number) { - return Impact.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSS.getDescriptor().getEnumTypes().get(6); - } - - private static final Impact[] VALUES = values(); - - public static Impact valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Impact(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSS.Impact) - } - - public static final int BASE_SCORE_FIELD_NUMBER = 1; - private float baseScore_ = 0F; - /** - *
-   * The base score is a function of the base metric scores.
-   * 
- * - * float base_score = 1; - * @return The baseScore. - */ - @java.lang.Override - public float getBaseScore() { - return baseScore_; - } - - public static final int EXPLOITABILITY_SCORE_FIELD_NUMBER = 2; - private float exploitabilityScore_ = 0F; - /** - * float exploitability_score = 2; - * @return The exploitabilityScore. - */ - @java.lang.Override - public float getExploitabilityScore() { - return exploitabilityScore_; - } - - public static final int IMPACT_SCORE_FIELD_NUMBER = 3; - private float impactScore_ = 0F; - /** - * float impact_score = 3; - * @return The impactScore. - */ - @java.lang.Override - public float getImpactScore() { - return impactScore_; - } - - public static final int ATTACK_VECTOR_FIELD_NUMBER = 4; - private int attackVector_ = 0; - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return The enum numeric value on the wire for attackVector. - */ - @java.lang.Override public int getAttackVectorValue() { - return attackVector_; - } - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return The attackVector. - */ - @java.lang.Override public io.grafeas.v1.CVSS.AttackVector getAttackVector() { - io.grafeas.v1.CVSS.AttackVector result = io.grafeas.v1.CVSS.AttackVector.forNumber(attackVector_); - return result == null ? io.grafeas.v1.CVSS.AttackVector.UNRECOGNIZED : result; - } - - public static final int ATTACK_COMPLEXITY_FIELD_NUMBER = 5; - private int attackComplexity_ = 0; - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return The enum numeric value on the wire for attackComplexity. - */ - @java.lang.Override public int getAttackComplexityValue() { - return attackComplexity_; - } - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return The attackComplexity. - */ - @java.lang.Override public io.grafeas.v1.CVSS.AttackComplexity getAttackComplexity() { - io.grafeas.v1.CVSS.AttackComplexity result = io.grafeas.v1.CVSS.AttackComplexity.forNumber(attackComplexity_); - return result == null ? io.grafeas.v1.CVSS.AttackComplexity.UNRECOGNIZED : result; - } - - public static final int AUTHENTICATION_FIELD_NUMBER = 6; - private int authentication_ = 0; - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @return The enum numeric value on the wire for authentication. - */ - @java.lang.Override public int getAuthenticationValue() { - return authentication_; - } - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @return The authentication. - */ - @java.lang.Override public io.grafeas.v1.CVSS.Authentication getAuthentication() { - io.grafeas.v1.CVSS.Authentication result = io.grafeas.v1.CVSS.Authentication.forNumber(authentication_); - return result == null ? io.grafeas.v1.CVSS.Authentication.UNRECOGNIZED : result; - } - - public static final int PRIVILEGES_REQUIRED_FIELD_NUMBER = 7; - private int privilegesRequired_ = 0; - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return The enum numeric value on the wire for privilegesRequired. - */ - @java.lang.Override public int getPrivilegesRequiredValue() { - return privilegesRequired_; - } - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return The privilegesRequired. - */ - @java.lang.Override public io.grafeas.v1.CVSS.PrivilegesRequired getPrivilegesRequired() { - io.grafeas.v1.CVSS.PrivilegesRequired result = io.grafeas.v1.CVSS.PrivilegesRequired.forNumber(privilegesRequired_); - return result == null ? io.grafeas.v1.CVSS.PrivilegesRequired.UNRECOGNIZED : result; - } - - public static final int USER_INTERACTION_FIELD_NUMBER = 8; - private int userInteraction_ = 0; - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return The enum numeric value on the wire for userInteraction. - */ - @java.lang.Override public int getUserInteractionValue() { - return userInteraction_; - } - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return The userInteraction. - */ - @java.lang.Override public io.grafeas.v1.CVSS.UserInteraction getUserInteraction() { - io.grafeas.v1.CVSS.UserInteraction result = io.grafeas.v1.CVSS.UserInteraction.forNumber(userInteraction_); - return result == null ? io.grafeas.v1.CVSS.UserInteraction.UNRECOGNIZED : result; - } - - public static final int SCOPE_FIELD_NUMBER = 9; - private int scope_ = 0; - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @return The enum numeric value on the wire for scope. - */ - @java.lang.Override public int getScopeValue() { - return scope_; - } - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @return The scope. - */ - @java.lang.Override public io.grafeas.v1.CVSS.Scope getScope() { - io.grafeas.v1.CVSS.Scope result = io.grafeas.v1.CVSS.Scope.forNumber(scope_); - return result == null ? io.grafeas.v1.CVSS.Scope.UNRECOGNIZED : result; - } - - public static final int CONFIDENTIALITY_IMPACT_FIELD_NUMBER = 10; - private int confidentialityImpact_ = 0; - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return The enum numeric value on the wire for confidentialityImpact. - */ - @java.lang.Override public int getConfidentialityImpactValue() { - return confidentialityImpact_; - } - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return The confidentialityImpact. - */ - @java.lang.Override public io.grafeas.v1.CVSS.Impact getConfidentialityImpact() { - io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(confidentialityImpact_); - return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; - } - - public static final int INTEGRITY_IMPACT_FIELD_NUMBER = 11; - private int integrityImpact_ = 0; - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return The enum numeric value on the wire for integrityImpact. - */ - @java.lang.Override public int getIntegrityImpactValue() { - return integrityImpact_; - } - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return The integrityImpact. - */ - @java.lang.Override public io.grafeas.v1.CVSS.Impact getIntegrityImpact() { - io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(integrityImpact_); - return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; - } - - public static final int AVAILABILITY_IMPACT_FIELD_NUMBER = 12; - private int availabilityImpact_ = 0; - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return The enum numeric value on the wire for availabilityImpact. - */ - @java.lang.Override public int getAvailabilityImpactValue() { - return availabilityImpact_; - } - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return The availabilityImpact. - */ - @java.lang.Override public io.grafeas.v1.CVSS.Impact getAvailabilityImpact() { - io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(availabilityImpact_); - return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { - output.writeFloat(1, baseScore_); - } - if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { - output.writeFloat(2, exploitabilityScore_); - } - if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { - output.writeFloat(3, impactScore_); - } - if (attackVector_ != io.grafeas.v1.CVSS.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { - output.writeEnum(4, attackVector_); - } - if (attackComplexity_ != io.grafeas.v1.CVSS.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { - output.writeEnum(5, attackComplexity_); - } - if (authentication_ != io.grafeas.v1.CVSS.Authentication.AUTHENTICATION_UNSPECIFIED.getNumber()) { - output.writeEnum(6, authentication_); - } - if (privilegesRequired_ != io.grafeas.v1.CVSS.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { - output.writeEnum(7, privilegesRequired_); - } - if (userInteraction_ != io.grafeas.v1.CVSS.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { - output.writeEnum(8, userInteraction_); - } - if (scope_ != io.grafeas.v1.CVSS.Scope.SCOPE_UNSPECIFIED.getNumber()) { - output.writeEnum(9, scope_); - } - if (confidentialityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { - output.writeEnum(10, confidentialityImpact_); - } - if (integrityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { - output.writeEnum(11, integrityImpact_); - } - if (availabilityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { - output.writeEnum(12, availabilityImpact_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, baseScore_); - } - if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, exploitabilityScore_); - } - if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, impactScore_); - } - if (attackVector_ != io.grafeas.v1.CVSS.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, attackVector_); - } - if (attackComplexity_ != io.grafeas.v1.CVSS.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, attackComplexity_); - } - if (authentication_ != io.grafeas.v1.CVSS.Authentication.AUTHENTICATION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(6, authentication_); - } - if (privilegesRequired_ != io.grafeas.v1.CVSS.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(7, privilegesRequired_); - } - if (userInteraction_ != io.grafeas.v1.CVSS.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(8, userInteraction_); - } - if (scope_ != io.grafeas.v1.CVSS.Scope.SCOPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, scope_); - } - if (confidentialityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(10, confidentialityImpact_); - } - if (integrityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, integrityImpact_); - } - if (availabilityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(12, availabilityImpact_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.CVSS)) { - return super.equals(obj); - } - io.grafeas.v1.CVSS other = (io.grafeas.v1.CVSS) obj; - - if (java.lang.Float.floatToIntBits(getBaseScore()) - != java.lang.Float.floatToIntBits( - other.getBaseScore())) return false; - if (java.lang.Float.floatToIntBits(getExploitabilityScore()) - != java.lang.Float.floatToIntBits( - other.getExploitabilityScore())) return false; - if (java.lang.Float.floatToIntBits(getImpactScore()) - != java.lang.Float.floatToIntBits( - other.getImpactScore())) return false; - if (attackVector_ != other.attackVector_) return false; - if (attackComplexity_ != other.attackComplexity_) return false; - if (authentication_ != other.authentication_) return false; - if (privilegesRequired_ != other.privilegesRequired_) return false; - if (userInteraction_ != other.userInteraction_) return false; - if (scope_ != other.scope_) return false; - if (confidentialityImpact_ != other.confidentialityImpact_) return false; - if (integrityImpact_ != other.integrityImpact_) return false; - if (availabilityImpact_ != other.availabilityImpact_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BASE_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getBaseScore()); - hash = (37 * hash) + EXPLOITABILITY_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getExploitabilityScore()); - hash = (37 * hash) + IMPACT_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getImpactScore()); - hash = (37 * hash) + ATTACK_VECTOR_FIELD_NUMBER; - hash = (53 * hash) + attackVector_; - hash = (37 * hash) + ATTACK_COMPLEXITY_FIELD_NUMBER; - hash = (53 * hash) + attackComplexity_; - hash = (37 * hash) + AUTHENTICATION_FIELD_NUMBER; - hash = (53 * hash) + authentication_; - hash = (37 * hash) + PRIVILEGES_REQUIRED_FIELD_NUMBER; - hash = (53 * hash) + privilegesRequired_; - hash = (37 * hash) + USER_INTERACTION_FIELD_NUMBER; - hash = (53 * hash) + userInteraction_; - hash = (37 * hash) + SCOPE_FIELD_NUMBER; - hash = (53 * hash) + scope_; - hash = (37 * hash) + CONFIDENTIALITY_IMPACT_FIELD_NUMBER; - hash = (53 * hash) + confidentialityImpact_; - hash = (37 * hash) + INTEGRITY_IMPACT_FIELD_NUMBER; - hash = (53 * hash) + integrityImpact_; - hash = (37 * hash) + AVAILABILITY_IMPACT_FIELD_NUMBER; - hash = (53 * hash) + availabilityImpact_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.CVSS parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CVSS parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CVSS parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CVSS parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CVSS parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CVSS parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CVSS parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CVSS parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CVSS parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.CVSS parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CVSS parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CVSS parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.CVSS prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Common Vulnerability Scoring System.
-   * For details, see https://www.first.org/cvss/specification-document
-   * This is a message we will try to use for storing various versions of CVSS
-   * rather than making a separate proto for storing a specific version.
-   * 
- * - * Protobuf type {@code grafeas.v1.CVSS} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.CVSS) - io.grafeas.v1.CVSSOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CVSS.class, io.grafeas.v1.CVSS.Builder.class); - } - - // Construct using io.grafeas.v1.CVSS.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - baseScore_ = 0F; - exploitabilityScore_ = 0F; - impactScore_ = 0F; - attackVector_ = 0; - attackComplexity_ = 0; - authentication_ = 0; - privilegesRequired_ = 0; - userInteraction_ = 0; - scope_ = 0; - confidentialityImpact_ = 0; - integrityImpact_ = 0; - availabilityImpact_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.CVSS getDefaultInstanceForType() { - return io.grafeas.v1.CVSS.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.CVSS build() { - io.grafeas.v1.CVSS result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.CVSS buildPartial() { - io.grafeas.v1.CVSS result = new io.grafeas.v1.CVSS(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.CVSS result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.baseScore_ = baseScore_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.exploitabilityScore_ = exploitabilityScore_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.impactScore_ = impactScore_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.attackVector_ = attackVector_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.attackComplexity_ = attackComplexity_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.authentication_ = authentication_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.privilegesRequired_ = privilegesRequired_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.userInteraction_ = userInteraction_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.scope_ = scope_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.confidentialityImpact_ = confidentialityImpact_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.integrityImpact_ = integrityImpact_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.availabilityImpact_ = availabilityImpact_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.CVSS) { - return mergeFrom((io.grafeas.v1.CVSS)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.CVSS other) { - if (other == io.grafeas.v1.CVSS.getDefaultInstance()) return this; - if (other.getBaseScore() != 0F) { - setBaseScore(other.getBaseScore()); - } - if (other.getExploitabilityScore() != 0F) { - setExploitabilityScore(other.getExploitabilityScore()); - } - if (other.getImpactScore() != 0F) { - setImpactScore(other.getImpactScore()); - } - if (other.attackVector_ != 0) { - setAttackVectorValue(other.getAttackVectorValue()); - } - if (other.attackComplexity_ != 0) { - setAttackComplexityValue(other.getAttackComplexityValue()); - } - if (other.authentication_ != 0) { - setAuthenticationValue(other.getAuthenticationValue()); - } - if (other.privilegesRequired_ != 0) { - setPrivilegesRequiredValue(other.getPrivilegesRequiredValue()); - } - if (other.userInteraction_ != 0) { - setUserInteractionValue(other.getUserInteractionValue()); - } - if (other.scope_ != 0) { - setScopeValue(other.getScopeValue()); - } - if (other.confidentialityImpact_ != 0) { - setConfidentialityImpactValue(other.getConfidentialityImpactValue()); - } - if (other.integrityImpact_ != 0) { - setIntegrityImpactValue(other.getIntegrityImpactValue()); - } - if (other.availabilityImpact_ != 0) { - setAvailabilityImpactValue(other.getAvailabilityImpactValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - baseScore_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - case 21: { - exploitabilityScore_ = input.readFloat(); - bitField0_ |= 0x00000002; - break; - } // case 21 - case 29: { - impactScore_ = input.readFloat(); - bitField0_ |= 0x00000004; - break; - } // case 29 - case 32: { - attackVector_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 40: { - attackComplexity_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 48: { - authentication_ = input.readEnum(); - bitField0_ |= 0x00000020; - break; - } // case 48 - case 56: { - privilegesRequired_ = input.readEnum(); - bitField0_ |= 0x00000040; - break; - } // case 56 - case 64: { - userInteraction_ = input.readEnum(); - bitField0_ |= 0x00000080; - break; - } // case 64 - case 72: { - scope_ = input.readEnum(); - bitField0_ |= 0x00000100; - break; - } // case 72 - case 80: { - confidentialityImpact_ = input.readEnum(); - bitField0_ |= 0x00000200; - break; - } // case 80 - case 88: { - integrityImpact_ = input.readEnum(); - bitField0_ |= 0x00000400; - break; - } // case 88 - case 96: { - availabilityImpact_ = input.readEnum(); - bitField0_ |= 0x00000800; - break; - } // case 96 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private float baseScore_ ; - /** - *
-     * The base score is a function of the base metric scores.
-     * 
- * - * float base_score = 1; - * @return The baseScore. - */ - @java.lang.Override - public float getBaseScore() { - return baseScore_; - } - /** - *
-     * The base score is a function of the base metric scores.
-     * 
- * - * float base_score = 1; - * @param value The baseScore to set. - * @return This builder for chaining. - */ - public Builder setBaseScore(float value) { - - baseScore_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The base score is a function of the base metric scores.
-     * 
- * - * float base_score = 1; - * @return This builder for chaining. - */ - public Builder clearBaseScore() { - bitField0_ = (bitField0_ & ~0x00000001); - baseScore_ = 0F; - onChanged(); - return this; - } - - private float exploitabilityScore_ ; - /** - * float exploitability_score = 2; - * @return The exploitabilityScore. - */ - @java.lang.Override - public float getExploitabilityScore() { - return exploitabilityScore_; - } - /** - * float exploitability_score = 2; - * @param value The exploitabilityScore to set. - * @return This builder for chaining. - */ - public Builder setExploitabilityScore(float value) { - - exploitabilityScore_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * float exploitability_score = 2; - * @return This builder for chaining. - */ - public Builder clearExploitabilityScore() { - bitField0_ = (bitField0_ & ~0x00000002); - exploitabilityScore_ = 0F; - onChanged(); - return this; - } - - private float impactScore_ ; - /** - * float impact_score = 3; - * @return The impactScore. - */ - @java.lang.Override - public float getImpactScore() { - return impactScore_; - } - /** - * float impact_score = 3; - * @param value The impactScore to set. - * @return This builder for chaining. - */ - public Builder setImpactScore(float value) { - - impactScore_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * float impact_score = 3; - * @return This builder for chaining. - */ - public Builder clearImpactScore() { - bitField0_ = (bitField0_ & ~0x00000004); - impactScore_ = 0F; - onChanged(); - return this; - } - - private int attackVector_ = 0; - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return The enum numeric value on the wire for attackVector. - */ - @java.lang.Override public int getAttackVectorValue() { - return attackVector_; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @param value The enum numeric value on the wire for attackVector to set. - * @return This builder for chaining. - */ - public Builder setAttackVectorValue(int value) { - attackVector_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return The attackVector. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.AttackVector getAttackVector() { - io.grafeas.v1.CVSS.AttackVector result = io.grafeas.v1.CVSS.AttackVector.forNumber(attackVector_); - return result == null ? io.grafeas.v1.CVSS.AttackVector.UNRECOGNIZED : result; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @param value The attackVector to set. - * @return This builder for chaining. - */ - public Builder setAttackVector(io.grafeas.v1.CVSS.AttackVector value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - attackVector_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return This builder for chaining. - */ - public Builder clearAttackVector() { - bitField0_ = (bitField0_ & ~0x00000008); - attackVector_ = 0; - onChanged(); - return this; - } - - private int attackComplexity_ = 0; - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return The enum numeric value on the wire for attackComplexity. - */ - @java.lang.Override public int getAttackComplexityValue() { - return attackComplexity_; - } - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @param value The enum numeric value on the wire for attackComplexity to set. - * @return This builder for chaining. - */ - public Builder setAttackComplexityValue(int value) { - attackComplexity_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return The attackComplexity. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.AttackComplexity getAttackComplexity() { - io.grafeas.v1.CVSS.AttackComplexity result = io.grafeas.v1.CVSS.AttackComplexity.forNumber(attackComplexity_); - return result == null ? io.grafeas.v1.CVSS.AttackComplexity.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @param value The attackComplexity to set. - * @return This builder for chaining. - */ - public Builder setAttackComplexity(io.grafeas.v1.CVSS.AttackComplexity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - attackComplexity_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return This builder for chaining. - */ - public Builder clearAttackComplexity() { - bitField0_ = (bitField0_ & ~0x00000010); - attackComplexity_ = 0; - onChanged(); - return this; - } - - private int authentication_ = 0; - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @return The enum numeric value on the wire for authentication. - */ - @java.lang.Override public int getAuthenticationValue() { - return authentication_; - } - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @param value The enum numeric value on the wire for authentication to set. - * @return This builder for chaining. - */ - public Builder setAuthenticationValue(int value) { - authentication_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @return The authentication. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.Authentication getAuthentication() { - io.grafeas.v1.CVSS.Authentication result = io.grafeas.v1.CVSS.Authentication.forNumber(authentication_); - return result == null ? io.grafeas.v1.CVSS.Authentication.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @param value The authentication to set. - * @return This builder for chaining. - */ - public Builder setAuthentication(io.grafeas.v1.CVSS.Authentication value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - authentication_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @return This builder for chaining. - */ - public Builder clearAuthentication() { - bitField0_ = (bitField0_ & ~0x00000020); - authentication_ = 0; - onChanged(); - return this; - } - - private int privilegesRequired_ = 0; - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return The enum numeric value on the wire for privilegesRequired. - */ - @java.lang.Override public int getPrivilegesRequiredValue() { - return privilegesRequired_; - } - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @param value The enum numeric value on the wire for privilegesRequired to set. - * @return This builder for chaining. - */ - public Builder setPrivilegesRequiredValue(int value) { - privilegesRequired_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return The privilegesRequired. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.PrivilegesRequired getPrivilegesRequired() { - io.grafeas.v1.CVSS.PrivilegesRequired result = io.grafeas.v1.CVSS.PrivilegesRequired.forNumber(privilegesRequired_); - return result == null ? io.grafeas.v1.CVSS.PrivilegesRequired.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @param value The privilegesRequired to set. - * @return This builder for chaining. - */ - public Builder setPrivilegesRequired(io.grafeas.v1.CVSS.PrivilegesRequired value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - privilegesRequired_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return This builder for chaining. - */ - public Builder clearPrivilegesRequired() { - bitField0_ = (bitField0_ & ~0x00000040); - privilegesRequired_ = 0; - onChanged(); - return this; - } - - private int userInteraction_ = 0; - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return The enum numeric value on the wire for userInteraction. - */ - @java.lang.Override public int getUserInteractionValue() { - return userInteraction_; - } - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @param value The enum numeric value on the wire for userInteraction to set. - * @return This builder for chaining. - */ - public Builder setUserInteractionValue(int value) { - userInteraction_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return The userInteraction. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.UserInteraction getUserInteraction() { - io.grafeas.v1.CVSS.UserInteraction result = io.grafeas.v1.CVSS.UserInteraction.forNumber(userInteraction_); - return result == null ? io.grafeas.v1.CVSS.UserInteraction.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @param value The userInteraction to set. - * @return This builder for chaining. - */ - public Builder setUserInteraction(io.grafeas.v1.CVSS.UserInteraction value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - userInteraction_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return This builder for chaining. - */ - public Builder clearUserInteraction() { - bitField0_ = (bitField0_ & ~0x00000080); - userInteraction_ = 0; - onChanged(); - return this; - } - - private int scope_ = 0; - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @return The enum numeric value on the wire for scope. - */ - @java.lang.Override public int getScopeValue() { - return scope_; - } - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @param value The enum numeric value on the wire for scope to set. - * @return This builder for chaining. - */ - public Builder setScopeValue(int value) { - scope_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @return The scope. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.Scope getScope() { - io.grafeas.v1.CVSS.Scope result = io.grafeas.v1.CVSS.Scope.forNumber(scope_); - return result == null ? io.grafeas.v1.CVSS.Scope.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @param value The scope to set. - * @return This builder for chaining. - */ - public Builder setScope(io.grafeas.v1.CVSS.Scope value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - scope_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @return This builder for chaining. - */ - public Builder clearScope() { - bitField0_ = (bitField0_ & ~0x00000100); - scope_ = 0; - onChanged(); - return this; - } - - private int confidentialityImpact_ = 0; - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return The enum numeric value on the wire for confidentialityImpact. - */ - @java.lang.Override public int getConfidentialityImpactValue() { - return confidentialityImpact_; - } - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @param value The enum numeric value on the wire for confidentialityImpact to set. - * @return This builder for chaining. - */ - public Builder setConfidentialityImpactValue(int value) { - confidentialityImpact_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return The confidentialityImpact. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.Impact getConfidentialityImpact() { - io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(confidentialityImpact_); - return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @param value The confidentialityImpact to set. - * @return This builder for chaining. - */ - public Builder setConfidentialityImpact(io.grafeas.v1.CVSS.Impact value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; - confidentialityImpact_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return This builder for chaining. - */ - public Builder clearConfidentialityImpact() { - bitField0_ = (bitField0_ & ~0x00000200); - confidentialityImpact_ = 0; - onChanged(); - return this; - } - - private int integrityImpact_ = 0; - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return The enum numeric value on the wire for integrityImpact. - */ - @java.lang.Override public int getIntegrityImpactValue() { - return integrityImpact_; - } - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @param value The enum numeric value on the wire for integrityImpact to set. - * @return This builder for chaining. - */ - public Builder setIntegrityImpactValue(int value) { - integrityImpact_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return The integrityImpact. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.Impact getIntegrityImpact() { - io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(integrityImpact_); - return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @param value The integrityImpact to set. - * @return This builder for chaining. - */ - public Builder setIntegrityImpact(io.grafeas.v1.CVSS.Impact value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - integrityImpact_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return This builder for chaining. - */ - public Builder clearIntegrityImpact() { - bitField0_ = (bitField0_ & ~0x00000400); - integrityImpact_ = 0; - onChanged(); - return this; - } - - private int availabilityImpact_ = 0; - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return The enum numeric value on the wire for availabilityImpact. - */ - @java.lang.Override public int getAvailabilityImpactValue() { - return availabilityImpact_; - } - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @param value The enum numeric value on the wire for availabilityImpact to set. - * @return This builder for chaining. - */ - public Builder setAvailabilityImpactValue(int value) { - availabilityImpact_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return The availabilityImpact. - */ - @java.lang.Override - public io.grafeas.v1.CVSS.Impact getAvailabilityImpact() { - io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(availabilityImpact_); - return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @param value The availabilityImpact to set. - * @return This builder for chaining. - */ - public Builder setAvailabilityImpact(io.grafeas.v1.CVSS.Impact value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000800; - availabilityImpact_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return This builder for chaining. - */ - public Builder clearAvailabilityImpact() { - bitField0_ = (bitField0_ & ~0x00000800); - availabilityImpact_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.CVSS) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.CVSS) - private static final io.grafeas.v1.CVSS DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.CVSS(); - } - - public static io.grafeas.v1.CVSS getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CVSS parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.CVSS getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java deleted file mode 100644 index 2e8db76424dc..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSOrBuilder.java +++ /dev/null @@ -1,142 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/cvss.proto - -package io.grafeas.v1; - -public interface CVSSOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.CVSS) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The base score is a function of the base metric scores.
-   * 
- * - * float base_score = 1; - * @return The baseScore. - */ - float getBaseScore(); - - /** - * float exploitability_score = 2; - * @return The exploitabilityScore. - */ - float getExploitabilityScore(); - - /** - * float impact_score = 3; - * @return The impactScore. - */ - float getImpactScore(); - - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return The enum numeric value on the wire for attackVector. - */ - int getAttackVectorValue(); - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return The attackVector. - */ - io.grafeas.v1.CVSS.AttackVector getAttackVector(); - - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return The enum numeric value on the wire for attackComplexity. - */ - int getAttackComplexityValue(); - /** - * .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return The attackComplexity. - */ - io.grafeas.v1.CVSS.AttackComplexity getAttackComplexity(); - - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @return The enum numeric value on the wire for authentication. - */ - int getAuthenticationValue(); - /** - * .grafeas.v1.CVSS.Authentication authentication = 6; - * @return The authentication. - */ - io.grafeas.v1.CVSS.Authentication getAuthentication(); - - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return The enum numeric value on the wire for privilegesRequired. - */ - int getPrivilegesRequiredValue(); - /** - * .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return The privilegesRequired. - */ - io.grafeas.v1.CVSS.PrivilegesRequired getPrivilegesRequired(); - - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return The enum numeric value on the wire for userInteraction. - */ - int getUserInteractionValue(); - /** - * .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return The userInteraction. - */ - io.grafeas.v1.CVSS.UserInteraction getUserInteraction(); - - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @return The enum numeric value on the wire for scope. - */ - int getScopeValue(); - /** - * .grafeas.v1.CVSS.Scope scope = 9; - * @return The scope. - */ - io.grafeas.v1.CVSS.Scope getScope(); - - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return The enum numeric value on the wire for confidentialityImpact. - */ - int getConfidentialityImpactValue(); - /** - * .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return The confidentialityImpact. - */ - io.grafeas.v1.CVSS.Impact getConfidentialityImpact(); - - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return The enum numeric value on the wire for integrityImpact. - */ - int getIntegrityImpactValue(); - /** - * .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return The integrityImpact. - */ - io.grafeas.v1.CVSS.Impact getIntegrityImpact(); - - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return The enum numeric value on the wire for availabilityImpact. - */ - int getAvailabilityImpactValue(); - /** - * .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return The availabilityImpact. - */ - io.grafeas.v1.CVSS.Impact getAvailabilityImpact(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java deleted file mode 100644 index 45bcae84cede..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSProto.java +++ /dev/null @@ -1,128 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/cvss.proto - -package io.grafeas.v1; - -public final class CVSSProto { - private CVSSProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_CVSSv3_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_CVSSv3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_CVSS_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_CVSS_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\025grafeas/v1/cvss.proto\022\ngrafeas.v1\"\305\t\n\006" + - "CVSSv3\022\022\n\nbase_score\030\001 \001(\002\022\034\n\024exploitabi" + - "lity_score\030\002 \001(\002\022\024\n\014impact_score\030\003 \001(\002\0226" + - "\n\rattack_vector\030\005 \001(\0162\037.grafeas.v1.CVSSv" + - "3.AttackVector\022>\n\021attack_complexity\030\006 \001(" + - "\0162#.grafeas.v1.CVSSv3.AttackComplexity\022B" + - "\n\023privileges_required\030\007 \001(\0162%.grafeas.v1" + - ".CVSSv3.PrivilegesRequired\022<\n\020user_inter" + - "action\030\010 \001(\0162\".grafeas.v1.CVSSv3.UserInt" + - "eraction\022\'\n\005scope\030\t \001(\0162\030.grafeas.v1.CVS" + - "Sv3.Scope\0229\n\026confidentiality_impact\030\n \001(" + - "\0162\031.grafeas.v1.CVSSv3.Impact\0223\n\020integrit" + - "y_impact\030\013 \001(\0162\031.grafeas.v1.CVSSv3.Impac" + - "t\0226\n\023availability_impact\030\014 \001(\0162\031.grafeas" + - ".v1.CVSSv3.Impact\"\231\001\n\014AttackVector\022\035\n\031AT" + - "TACK_VECTOR_UNSPECIFIED\020\000\022\031\n\025ATTACK_VECT" + - "OR_NETWORK\020\001\022\032\n\026ATTACK_VECTOR_ADJACENT\020\002" + - "\022\027\n\023ATTACK_VECTOR_LOCAL\020\003\022\032\n\026ATTACK_VECT" + - "OR_PHYSICAL\020\004\"l\n\020AttackComplexity\022!\n\035ATT" + - "ACK_COMPLEXITY_UNSPECIFIED\020\000\022\031\n\025ATTACK_C" + - "OMPLEXITY_LOW\020\001\022\032\n\026ATTACK_COMPLEXITY_HIG" + - "H\020\002\"\222\001\n\022PrivilegesRequired\022#\n\037PRIVILEGES" + - "_REQUIRED_UNSPECIFIED\020\000\022\034\n\030PRIVILEGES_RE" + - "QUIRED_NONE\020\001\022\033\n\027PRIVILEGES_REQUIRED_LOW" + - "\020\002\022\034\n\030PRIVILEGES_REQUIRED_HIGH\020\003\"m\n\017User" + - "Interaction\022 \n\034USER_INTERACTION_UNSPECIF" + - "IED\020\000\022\031\n\025USER_INTERACTION_NONE\020\001\022\035\n\031USER" + - "_INTERACTION_REQUIRED\020\002\"F\n\005Scope\022\025\n\021SCOP" + - "E_UNSPECIFIED\020\000\022\023\n\017SCOPE_UNCHANGED\020\001\022\021\n\r" + - "SCOPE_CHANGED\020\002\"R\n\006Impact\022\026\n\022IMPACT_UNSP" + - "ECIFIED\020\000\022\017\n\013IMPACT_HIGH\020\001\022\016\n\nIMPACT_LOW" + - "\020\002\022\017\n\013IMPACT_NONE\020\003\"\360\n\n\004CVSS\022\022\n\nbase_sco" + - "re\030\001 \001(\002\022\034\n\024exploitability_score\030\002 \001(\002\022\024" + - "\n\014impact_score\030\003 \001(\002\0224\n\rattack_vector\030\004 " + - "\001(\0162\035.grafeas.v1.CVSS.AttackVector\022<\n\021at" + - "tack_complexity\030\005 \001(\0162!.grafeas.v1.CVSS." + - "AttackComplexity\0227\n\016authentication\030\006 \001(\016" + - "2\037.grafeas.v1.CVSS.Authentication\022@\n\023pri" + - "vileges_required\030\007 \001(\0162#.grafeas.v1.CVSS" + - ".PrivilegesRequired\022:\n\020user_interaction\030" + - "\010 \001(\0162 .grafeas.v1.CVSS.UserInteraction\022" + - "%\n\005scope\030\t \001(\0162\026.grafeas.v1.CVSS.Scope\0227" + - "\n\026confidentiality_impact\030\n \001(\0162\027.grafeas" + - ".v1.CVSS.Impact\0221\n\020integrity_impact\030\013 \001(" + - "\0162\027.grafeas.v1.CVSS.Impact\0224\n\023availabili" + - "ty_impact\030\014 \001(\0162\027.grafeas.v1.CVSS.Impact" + - "\"\231\001\n\014AttackVector\022\035\n\031ATTACK_VECTOR_UNSPE" + - "CIFIED\020\000\022\031\n\025ATTACK_VECTOR_NETWORK\020\001\022\032\n\026A" + - "TTACK_VECTOR_ADJACENT\020\002\022\027\n\023ATTACK_VECTOR" + - "_LOCAL\020\003\022\032\n\026ATTACK_VECTOR_PHYSICAL\020\004\"l\n\020" + - "AttackComplexity\022!\n\035ATTACK_COMPLEXITY_UN" + - "SPECIFIED\020\000\022\031\n\025ATTACK_COMPLEXITY_LOW\020\001\022\032" + - "\n\026ATTACK_COMPLEXITY_HIGH\020\002\"\201\001\n\016Authentic" + - "ation\022\036\n\032AUTHENTICATION_UNSPECIFIED\020\000\022\033\n" + - "\027AUTHENTICATION_MULTIPLE\020\001\022\031\n\025AUTHENTICA" + - "TION_SINGLE\020\002\022\027\n\023AUTHENTICATION_NONE\020\003\"\222" + - "\001\n\022PrivilegesRequired\022#\n\037PRIVILEGES_REQU" + - "IRED_UNSPECIFIED\020\000\022\034\n\030PRIVILEGES_REQUIRE" + - "D_NONE\020\001\022\033\n\027PRIVILEGES_REQUIRED_LOW\020\002\022\034\n" + - "\030PRIVILEGES_REQUIRED_HIGH\020\003\"m\n\017UserInter" + - "action\022 \n\034USER_INTERACTION_UNSPECIFIED\020\000" + - "\022\031\n\025USER_INTERACTION_NONE\020\001\022\035\n\031USER_INTE" + - "RACTION_REQUIRED\020\002\"F\n\005Scope\022\025\n\021SCOPE_UNS" + - "PECIFIED\020\000\022\023\n\017SCOPE_UNCHANGED\020\001\022\021\n\rSCOPE" + - "_CHANGED\020\002\"R\n\006Impact\022\026\n\022IMPACT_UNSPECIFI" + - "ED\020\000\022\017\n\013IMPACT_HIGH\020\001\022\016\n\nIMPACT_LOW\020\002\022\017\n" + - "\013IMPACT_NONE\020\003*S\n\013CVSSVersion\022\034\n\030CVSS_VE" + - "RSION_UNSPECIFIED\020\000\022\022\n\016CVSS_VERSION_2\020\001\022" + - "\022\n\016CVSS_VERSION_3\020\002B\\\n\rio.grafeas.v1B\tCV" + - "SSProtoP\001Z8google.golang.org/genproto/go" + - "ogleapis/grafeas/v1;grafeas\242\002\003GRAb\006proto" + - "3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_grafeas_v1_CVSSv3_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_CVSSv3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_CVSSv3_descriptor, - new java.lang.String[] { "BaseScore", "ExploitabilityScore", "ImpactScore", "AttackVector", "AttackComplexity", "PrivilegesRequired", "UserInteraction", "Scope", "ConfidentialityImpact", "IntegrityImpact", "AvailabilityImpact", }); - internal_static_grafeas_v1_CVSS_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_CVSS_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_CVSS_descriptor, - new java.lang.String[] { "BaseScore", "ExploitabilityScore", "ImpactScore", "AttackVector", "AttackComplexity", "Authentication", "PrivilegesRequired", "UserInteraction", "Scope", "ConfidentialityImpact", "IntegrityImpact", "AvailabilityImpact", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java deleted file mode 100644 index ce2a2a054bb1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSVersion.java +++ /dev/null @@ -1,126 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/cvss.proto - -package io.grafeas.v1; - -/** - *
- * CVSS Version.
- * 
- * - * Protobuf enum {@code grafeas.v1.CVSSVersion} - */ -public enum CVSSVersion - implements com.google.protobuf.ProtocolMessageEnum { - /** - * CVSS_VERSION_UNSPECIFIED = 0; - */ - CVSS_VERSION_UNSPECIFIED(0), - /** - * CVSS_VERSION_2 = 1; - */ - CVSS_VERSION_2(1), - /** - * CVSS_VERSION_3 = 2; - */ - CVSS_VERSION_3(2), - UNRECOGNIZED(-1), - ; - - /** - * CVSS_VERSION_UNSPECIFIED = 0; - */ - public static final int CVSS_VERSION_UNSPECIFIED_VALUE = 0; - /** - * CVSS_VERSION_2 = 1; - */ - public static final int CVSS_VERSION_2_VALUE = 1; - /** - * CVSS_VERSION_3 = 2; - */ - public static final int CVSS_VERSION_3_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static CVSSVersion valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static CVSSVersion forNumber(int value) { - switch (value) { - case 0: return CVSS_VERSION_UNSPECIFIED; - case 1: return CVSS_VERSION_2; - case 2: return CVSS_VERSION_3; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - CVSSVersion> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public CVSSVersion findValueByNumber(int number) { - return CVSSVersion.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSSProto.getDescriptor().getEnumTypes().get(0); - } - - private static final CVSSVersion[] VALUES = values(); - - public static CVSSVersion valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private CVSSVersion(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSVersion) -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java deleted file mode 100644 index d23be5609fd1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3.java +++ /dev/null @@ -1,2170 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/cvss.proto - -package io.grafeas.v1; - -/** - *
- * Common Vulnerability Scoring System version 3.
- * For details, see https://www.first.org/cvss/specification-document
- * 
- * - * Protobuf type {@code grafeas.v1.CVSSv3} - */ -public final class CVSSv3 extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.CVSSv3) - CVSSv3OrBuilder { -private static final long serialVersionUID = 0L; - // Use CVSSv3.newBuilder() to construct. - private CVSSv3(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CVSSv3() { - attackVector_ = 0; - attackComplexity_ = 0; - privilegesRequired_ = 0; - userInteraction_ = 0; - scope_ = 0; - confidentialityImpact_ = 0; - integrityImpact_ = 0; - availabilityImpact_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CVSSv3(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CVSSv3.class, io.grafeas.v1.CVSSv3.Builder.class); - } - - /** - * Protobuf enum {@code grafeas.v1.CVSSv3.AttackVector} - */ - public enum AttackVector - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ATTACK_VECTOR_UNSPECIFIED = 0; - */ - ATTACK_VECTOR_UNSPECIFIED(0), - /** - * ATTACK_VECTOR_NETWORK = 1; - */ - ATTACK_VECTOR_NETWORK(1), - /** - * ATTACK_VECTOR_ADJACENT = 2; - */ - ATTACK_VECTOR_ADJACENT(2), - /** - * ATTACK_VECTOR_LOCAL = 3; - */ - ATTACK_VECTOR_LOCAL(3), - /** - * ATTACK_VECTOR_PHYSICAL = 4; - */ - ATTACK_VECTOR_PHYSICAL(4), - UNRECOGNIZED(-1), - ; - - /** - * ATTACK_VECTOR_UNSPECIFIED = 0; - */ - public static final int ATTACK_VECTOR_UNSPECIFIED_VALUE = 0; - /** - * ATTACK_VECTOR_NETWORK = 1; - */ - public static final int ATTACK_VECTOR_NETWORK_VALUE = 1; - /** - * ATTACK_VECTOR_ADJACENT = 2; - */ - public static final int ATTACK_VECTOR_ADJACENT_VALUE = 2; - /** - * ATTACK_VECTOR_LOCAL = 3; - */ - public static final int ATTACK_VECTOR_LOCAL_VALUE = 3; - /** - * ATTACK_VECTOR_PHYSICAL = 4; - */ - public static final int ATTACK_VECTOR_PHYSICAL_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AttackVector valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AttackVector forNumber(int value) { - switch (value) { - case 0: return ATTACK_VECTOR_UNSPECIFIED; - case 1: return ATTACK_VECTOR_NETWORK; - case 2: return ATTACK_VECTOR_ADJACENT; - case 3: return ATTACK_VECTOR_LOCAL; - case 4: return ATTACK_VECTOR_PHYSICAL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AttackVector> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AttackVector findValueByNumber(int number) { - return AttackVector.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(0); - } - - private static final AttackVector[] VALUES = values(); - - public static AttackVector valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AttackVector(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.AttackVector) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSSv3.AttackComplexity} - */ - public enum AttackComplexity - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - ATTACK_COMPLEXITY_UNSPECIFIED(0), - /** - * ATTACK_COMPLEXITY_LOW = 1; - */ - ATTACK_COMPLEXITY_LOW(1), - /** - * ATTACK_COMPLEXITY_HIGH = 2; - */ - ATTACK_COMPLEXITY_HIGH(2), - UNRECOGNIZED(-1), - ; - - /** - * ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - public static final int ATTACK_COMPLEXITY_UNSPECIFIED_VALUE = 0; - /** - * ATTACK_COMPLEXITY_LOW = 1; - */ - public static final int ATTACK_COMPLEXITY_LOW_VALUE = 1; - /** - * ATTACK_COMPLEXITY_HIGH = 2; - */ - public static final int ATTACK_COMPLEXITY_HIGH_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AttackComplexity valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AttackComplexity forNumber(int value) { - switch (value) { - case 0: return ATTACK_COMPLEXITY_UNSPECIFIED; - case 1: return ATTACK_COMPLEXITY_LOW; - case 2: return ATTACK_COMPLEXITY_HIGH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AttackComplexity> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AttackComplexity findValueByNumber(int number) { - return AttackComplexity.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(1); - } - - private static final AttackComplexity[] VALUES = values(); - - public static AttackComplexity valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AttackComplexity(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.AttackComplexity) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSSv3.PrivilegesRequired} - */ - public enum PrivilegesRequired - implements com.google.protobuf.ProtocolMessageEnum { - /** - * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - PRIVILEGES_REQUIRED_UNSPECIFIED(0), - /** - * PRIVILEGES_REQUIRED_NONE = 1; - */ - PRIVILEGES_REQUIRED_NONE(1), - /** - * PRIVILEGES_REQUIRED_LOW = 2; - */ - PRIVILEGES_REQUIRED_LOW(2), - /** - * PRIVILEGES_REQUIRED_HIGH = 3; - */ - PRIVILEGES_REQUIRED_HIGH(3), - UNRECOGNIZED(-1), - ; - - /** - * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - public static final int PRIVILEGES_REQUIRED_UNSPECIFIED_VALUE = 0; - /** - * PRIVILEGES_REQUIRED_NONE = 1; - */ - public static final int PRIVILEGES_REQUIRED_NONE_VALUE = 1; - /** - * PRIVILEGES_REQUIRED_LOW = 2; - */ - public static final int PRIVILEGES_REQUIRED_LOW_VALUE = 2; - /** - * PRIVILEGES_REQUIRED_HIGH = 3; - */ - public static final int PRIVILEGES_REQUIRED_HIGH_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PrivilegesRequired valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static PrivilegesRequired forNumber(int value) { - switch (value) { - case 0: return PRIVILEGES_REQUIRED_UNSPECIFIED; - case 1: return PRIVILEGES_REQUIRED_NONE; - case 2: return PRIVILEGES_REQUIRED_LOW; - case 3: return PRIVILEGES_REQUIRED_HIGH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PrivilegesRequired> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PrivilegesRequired findValueByNumber(int number) { - return PrivilegesRequired.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(2); - } - - private static final PrivilegesRequired[] VALUES = values(); - - public static PrivilegesRequired valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private PrivilegesRequired(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.PrivilegesRequired) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSSv3.UserInteraction} - */ - public enum UserInteraction - implements com.google.protobuf.ProtocolMessageEnum { - /** - * USER_INTERACTION_UNSPECIFIED = 0; - */ - USER_INTERACTION_UNSPECIFIED(0), - /** - * USER_INTERACTION_NONE = 1; - */ - USER_INTERACTION_NONE(1), - /** - * USER_INTERACTION_REQUIRED = 2; - */ - USER_INTERACTION_REQUIRED(2), - UNRECOGNIZED(-1), - ; - - /** - * USER_INTERACTION_UNSPECIFIED = 0; - */ - public static final int USER_INTERACTION_UNSPECIFIED_VALUE = 0; - /** - * USER_INTERACTION_NONE = 1; - */ - public static final int USER_INTERACTION_NONE_VALUE = 1; - /** - * USER_INTERACTION_REQUIRED = 2; - */ - public static final int USER_INTERACTION_REQUIRED_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static UserInteraction valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static UserInteraction forNumber(int value) { - switch (value) { - case 0: return USER_INTERACTION_UNSPECIFIED; - case 1: return USER_INTERACTION_NONE; - case 2: return USER_INTERACTION_REQUIRED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - UserInteraction> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public UserInteraction findValueByNumber(int number) { - return UserInteraction.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(3); - } - - private static final UserInteraction[] VALUES = values(); - - public static UserInteraction valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private UserInteraction(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.UserInteraction) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSSv3.Scope} - */ - public enum Scope - implements com.google.protobuf.ProtocolMessageEnum { - /** - * SCOPE_UNSPECIFIED = 0; - */ - SCOPE_UNSPECIFIED(0), - /** - * SCOPE_UNCHANGED = 1; - */ - SCOPE_UNCHANGED(1), - /** - * SCOPE_CHANGED = 2; - */ - SCOPE_CHANGED(2), - UNRECOGNIZED(-1), - ; - - /** - * SCOPE_UNSPECIFIED = 0; - */ - public static final int SCOPE_UNSPECIFIED_VALUE = 0; - /** - * SCOPE_UNCHANGED = 1; - */ - public static final int SCOPE_UNCHANGED_VALUE = 1; - /** - * SCOPE_CHANGED = 2; - */ - public static final int SCOPE_CHANGED_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Scope valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Scope forNumber(int value) { - switch (value) { - case 0: return SCOPE_UNSPECIFIED; - case 1: return SCOPE_UNCHANGED; - case 2: return SCOPE_CHANGED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Scope> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Scope findValueByNumber(int number) { - return Scope.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(4); - } - - private static final Scope[] VALUES = values(); - - public static Scope valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Scope(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.Scope) - } - - /** - * Protobuf enum {@code grafeas.v1.CVSSv3.Impact} - */ - public enum Impact - implements com.google.protobuf.ProtocolMessageEnum { - /** - * IMPACT_UNSPECIFIED = 0; - */ - IMPACT_UNSPECIFIED(0), - /** - * IMPACT_HIGH = 1; - */ - IMPACT_HIGH(1), - /** - * IMPACT_LOW = 2; - */ - IMPACT_LOW(2), - /** - * IMPACT_NONE = 3; - */ - IMPACT_NONE(3), - UNRECOGNIZED(-1), - ; - - /** - * IMPACT_UNSPECIFIED = 0; - */ - public static final int IMPACT_UNSPECIFIED_VALUE = 0; - /** - * IMPACT_HIGH = 1; - */ - public static final int IMPACT_HIGH_VALUE = 1; - /** - * IMPACT_LOW = 2; - */ - public static final int IMPACT_LOW_VALUE = 2; - /** - * IMPACT_NONE = 3; - */ - public static final int IMPACT_NONE_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Impact valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Impact forNumber(int value) { - switch (value) { - case 0: return IMPACT_UNSPECIFIED; - case 1: return IMPACT_HIGH; - case 2: return IMPACT_LOW; - case 3: return IMPACT_NONE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Impact> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Impact findValueByNumber(int number) { - return Impact.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(5); - } - - private static final Impact[] VALUES = values(); - - public static Impact valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Impact(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.Impact) - } - - public static final int BASE_SCORE_FIELD_NUMBER = 1; - private float baseScore_ = 0F; - /** - *
-   * The base score is a function of the base metric scores.
-   * 
- * - * float base_score = 1; - * @return The baseScore. - */ - @java.lang.Override - public float getBaseScore() { - return baseScore_; - } - - public static final int EXPLOITABILITY_SCORE_FIELD_NUMBER = 2; - private float exploitabilityScore_ = 0F; - /** - * float exploitability_score = 2; - * @return The exploitabilityScore. - */ - @java.lang.Override - public float getExploitabilityScore() { - return exploitabilityScore_; - } - - public static final int IMPACT_SCORE_FIELD_NUMBER = 3; - private float impactScore_ = 0F; - /** - * float impact_score = 3; - * @return The impactScore. - */ - @java.lang.Override - public float getImpactScore() { - return impactScore_; - } - - public static final int ATTACK_VECTOR_FIELD_NUMBER = 5; - private int attackVector_ = 0; - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return The enum numeric value on the wire for attackVector. - */ - @java.lang.Override public int getAttackVectorValue() { - return attackVector_; - } - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return The attackVector. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.AttackVector getAttackVector() { - io.grafeas.v1.CVSSv3.AttackVector result = io.grafeas.v1.CVSSv3.AttackVector.forNumber(attackVector_); - return result == null ? io.grafeas.v1.CVSSv3.AttackVector.UNRECOGNIZED : result; - } - - public static final int ATTACK_COMPLEXITY_FIELD_NUMBER = 6; - private int attackComplexity_ = 0; - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return The enum numeric value on the wire for attackComplexity. - */ - @java.lang.Override public int getAttackComplexityValue() { - return attackComplexity_; - } - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return The attackComplexity. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.AttackComplexity getAttackComplexity() { - io.grafeas.v1.CVSSv3.AttackComplexity result = io.grafeas.v1.CVSSv3.AttackComplexity.forNumber(attackComplexity_); - return result == null ? io.grafeas.v1.CVSSv3.AttackComplexity.UNRECOGNIZED : result; - } - - public static final int PRIVILEGES_REQUIRED_FIELD_NUMBER = 7; - private int privilegesRequired_ = 0; - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return The enum numeric value on the wire for privilegesRequired. - */ - @java.lang.Override public int getPrivilegesRequiredValue() { - return privilegesRequired_; - } - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return The privilegesRequired. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.PrivilegesRequired getPrivilegesRequired() { - io.grafeas.v1.CVSSv3.PrivilegesRequired result = io.grafeas.v1.CVSSv3.PrivilegesRequired.forNumber(privilegesRequired_); - return result == null ? io.grafeas.v1.CVSSv3.PrivilegesRequired.UNRECOGNIZED : result; - } - - public static final int USER_INTERACTION_FIELD_NUMBER = 8; - private int userInteraction_ = 0; - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return The enum numeric value on the wire for userInteraction. - */ - @java.lang.Override public int getUserInteractionValue() { - return userInteraction_; - } - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return The userInteraction. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.UserInteraction getUserInteraction() { - io.grafeas.v1.CVSSv3.UserInteraction result = io.grafeas.v1.CVSSv3.UserInteraction.forNumber(userInteraction_); - return result == null ? io.grafeas.v1.CVSSv3.UserInteraction.UNRECOGNIZED : result; - } - - public static final int SCOPE_FIELD_NUMBER = 9; - private int scope_ = 0; - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @return The enum numeric value on the wire for scope. - */ - @java.lang.Override public int getScopeValue() { - return scope_; - } - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @return The scope. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.Scope getScope() { - io.grafeas.v1.CVSSv3.Scope result = io.grafeas.v1.CVSSv3.Scope.forNumber(scope_); - return result == null ? io.grafeas.v1.CVSSv3.Scope.UNRECOGNIZED : result; - } - - public static final int CONFIDENTIALITY_IMPACT_FIELD_NUMBER = 10; - private int confidentialityImpact_ = 0; - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return The enum numeric value on the wire for confidentialityImpact. - */ - @java.lang.Override public int getConfidentialityImpactValue() { - return confidentialityImpact_; - } - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return The confidentialityImpact. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.Impact getConfidentialityImpact() { - io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(confidentialityImpact_); - return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; - } - - public static final int INTEGRITY_IMPACT_FIELD_NUMBER = 11; - private int integrityImpact_ = 0; - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return The enum numeric value on the wire for integrityImpact. - */ - @java.lang.Override public int getIntegrityImpactValue() { - return integrityImpact_; - } - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return The integrityImpact. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.Impact getIntegrityImpact() { - io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(integrityImpact_); - return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; - } - - public static final int AVAILABILITY_IMPACT_FIELD_NUMBER = 12; - private int availabilityImpact_ = 0; - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return The enum numeric value on the wire for availabilityImpact. - */ - @java.lang.Override public int getAvailabilityImpactValue() { - return availabilityImpact_; - } - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return The availabilityImpact. - */ - @java.lang.Override public io.grafeas.v1.CVSSv3.Impact getAvailabilityImpact() { - io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(availabilityImpact_); - return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { - output.writeFloat(1, baseScore_); - } - if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { - output.writeFloat(2, exploitabilityScore_); - } - if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { - output.writeFloat(3, impactScore_); - } - if (attackVector_ != io.grafeas.v1.CVSSv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { - output.writeEnum(5, attackVector_); - } - if (attackComplexity_ != io.grafeas.v1.CVSSv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { - output.writeEnum(6, attackComplexity_); - } - if (privilegesRequired_ != io.grafeas.v1.CVSSv3.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { - output.writeEnum(7, privilegesRequired_); - } - if (userInteraction_ != io.grafeas.v1.CVSSv3.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { - output.writeEnum(8, userInteraction_); - } - if (scope_ != io.grafeas.v1.CVSSv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { - output.writeEnum(9, scope_); - } - if (confidentialityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - output.writeEnum(10, confidentialityImpact_); - } - if (integrityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - output.writeEnum(11, integrityImpact_); - } - if (availabilityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - output.writeEnum(12, availabilityImpact_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, baseScore_); - } - if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, exploitabilityScore_); - } - if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, impactScore_); - } - if (attackVector_ != io.grafeas.v1.CVSSv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, attackVector_); - } - if (attackComplexity_ != io.grafeas.v1.CVSSv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(6, attackComplexity_); - } - if (privilegesRequired_ != io.grafeas.v1.CVSSv3.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(7, privilegesRequired_); - } - if (userInteraction_ != io.grafeas.v1.CVSSv3.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(8, userInteraction_); - } - if (scope_ != io.grafeas.v1.CVSSv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, scope_); - } - if (confidentialityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(10, confidentialityImpact_); - } - if (integrityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, integrityImpact_); - } - if (availabilityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(12, availabilityImpact_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.CVSSv3)) { - return super.equals(obj); - } - io.grafeas.v1.CVSSv3 other = (io.grafeas.v1.CVSSv3) obj; - - if (java.lang.Float.floatToIntBits(getBaseScore()) - != java.lang.Float.floatToIntBits( - other.getBaseScore())) return false; - if (java.lang.Float.floatToIntBits(getExploitabilityScore()) - != java.lang.Float.floatToIntBits( - other.getExploitabilityScore())) return false; - if (java.lang.Float.floatToIntBits(getImpactScore()) - != java.lang.Float.floatToIntBits( - other.getImpactScore())) return false; - if (attackVector_ != other.attackVector_) return false; - if (attackComplexity_ != other.attackComplexity_) return false; - if (privilegesRequired_ != other.privilegesRequired_) return false; - if (userInteraction_ != other.userInteraction_) return false; - if (scope_ != other.scope_) return false; - if (confidentialityImpact_ != other.confidentialityImpact_) return false; - if (integrityImpact_ != other.integrityImpact_) return false; - if (availabilityImpact_ != other.availabilityImpact_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BASE_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getBaseScore()); - hash = (37 * hash) + EXPLOITABILITY_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getExploitabilityScore()); - hash = (37 * hash) + IMPACT_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getImpactScore()); - hash = (37 * hash) + ATTACK_VECTOR_FIELD_NUMBER; - hash = (53 * hash) + attackVector_; - hash = (37 * hash) + ATTACK_COMPLEXITY_FIELD_NUMBER; - hash = (53 * hash) + attackComplexity_; - hash = (37 * hash) + PRIVILEGES_REQUIRED_FIELD_NUMBER; - hash = (53 * hash) + privilegesRequired_; - hash = (37 * hash) + USER_INTERACTION_FIELD_NUMBER; - hash = (53 * hash) + userInteraction_; - hash = (37 * hash) + SCOPE_FIELD_NUMBER; - hash = (53 * hash) + scope_; - hash = (37 * hash) + CONFIDENTIALITY_IMPACT_FIELD_NUMBER; - hash = (53 * hash) + confidentialityImpact_; - hash = (37 * hash) + INTEGRITY_IMPACT_FIELD_NUMBER; - hash = (53 * hash) + integrityImpact_; - hash = (37 * hash) + AVAILABILITY_IMPACT_FIELD_NUMBER; - hash = (53 * hash) + availabilityImpact_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.CVSSv3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CVSSv3 parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CVSSv3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CVSSv3 parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CVSSv3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CVSSv3 parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CVSSv3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CVSSv3 parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CVSSv3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.CVSSv3 parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CVSSv3 parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CVSSv3 parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.CVSSv3 prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Common Vulnerability Scoring System version 3.
-   * For details, see https://www.first.org/cvss/specification-document
-   * 
- * - * Protobuf type {@code grafeas.v1.CVSSv3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.CVSSv3) - io.grafeas.v1.CVSSv3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CVSSv3.class, io.grafeas.v1.CVSSv3.Builder.class); - } - - // Construct using io.grafeas.v1.CVSSv3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - baseScore_ = 0F; - exploitabilityScore_ = 0F; - impactScore_ = 0F; - attackVector_ = 0; - attackComplexity_ = 0; - privilegesRequired_ = 0; - userInteraction_ = 0; - scope_ = 0; - confidentialityImpact_ = 0; - integrityImpact_ = 0; - availabilityImpact_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.CVSSv3 getDefaultInstanceForType() { - return io.grafeas.v1.CVSSv3.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.CVSSv3 build() { - io.grafeas.v1.CVSSv3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.CVSSv3 buildPartial() { - io.grafeas.v1.CVSSv3 result = new io.grafeas.v1.CVSSv3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.CVSSv3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.baseScore_ = baseScore_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.exploitabilityScore_ = exploitabilityScore_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.impactScore_ = impactScore_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.attackVector_ = attackVector_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.attackComplexity_ = attackComplexity_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.privilegesRequired_ = privilegesRequired_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.userInteraction_ = userInteraction_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.scope_ = scope_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.confidentialityImpact_ = confidentialityImpact_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.integrityImpact_ = integrityImpact_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.availabilityImpact_ = availabilityImpact_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.CVSSv3) { - return mergeFrom((io.grafeas.v1.CVSSv3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.CVSSv3 other) { - if (other == io.grafeas.v1.CVSSv3.getDefaultInstance()) return this; - if (other.getBaseScore() != 0F) { - setBaseScore(other.getBaseScore()); - } - if (other.getExploitabilityScore() != 0F) { - setExploitabilityScore(other.getExploitabilityScore()); - } - if (other.getImpactScore() != 0F) { - setImpactScore(other.getImpactScore()); - } - if (other.attackVector_ != 0) { - setAttackVectorValue(other.getAttackVectorValue()); - } - if (other.attackComplexity_ != 0) { - setAttackComplexityValue(other.getAttackComplexityValue()); - } - if (other.privilegesRequired_ != 0) { - setPrivilegesRequiredValue(other.getPrivilegesRequiredValue()); - } - if (other.userInteraction_ != 0) { - setUserInteractionValue(other.getUserInteractionValue()); - } - if (other.scope_ != 0) { - setScopeValue(other.getScopeValue()); - } - if (other.confidentialityImpact_ != 0) { - setConfidentialityImpactValue(other.getConfidentialityImpactValue()); - } - if (other.integrityImpact_ != 0) { - setIntegrityImpactValue(other.getIntegrityImpactValue()); - } - if (other.availabilityImpact_ != 0) { - setAvailabilityImpactValue(other.getAvailabilityImpactValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - baseScore_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - case 21: { - exploitabilityScore_ = input.readFloat(); - bitField0_ |= 0x00000002; - break; - } // case 21 - case 29: { - impactScore_ = input.readFloat(); - bitField0_ |= 0x00000004; - break; - } // case 29 - case 40: { - attackVector_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 40 - case 48: { - attackComplexity_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 48 - case 56: { - privilegesRequired_ = input.readEnum(); - bitField0_ |= 0x00000020; - break; - } // case 56 - case 64: { - userInteraction_ = input.readEnum(); - bitField0_ |= 0x00000040; - break; - } // case 64 - case 72: { - scope_ = input.readEnum(); - bitField0_ |= 0x00000080; - break; - } // case 72 - case 80: { - confidentialityImpact_ = input.readEnum(); - bitField0_ |= 0x00000100; - break; - } // case 80 - case 88: { - integrityImpact_ = input.readEnum(); - bitField0_ |= 0x00000200; - break; - } // case 88 - case 96: { - availabilityImpact_ = input.readEnum(); - bitField0_ |= 0x00000400; - break; - } // case 96 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private float baseScore_ ; - /** - *
-     * The base score is a function of the base metric scores.
-     * 
- * - * float base_score = 1; - * @return The baseScore. - */ - @java.lang.Override - public float getBaseScore() { - return baseScore_; - } - /** - *
-     * The base score is a function of the base metric scores.
-     * 
- * - * float base_score = 1; - * @param value The baseScore to set. - * @return This builder for chaining. - */ - public Builder setBaseScore(float value) { - - baseScore_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The base score is a function of the base metric scores.
-     * 
- * - * float base_score = 1; - * @return This builder for chaining. - */ - public Builder clearBaseScore() { - bitField0_ = (bitField0_ & ~0x00000001); - baseScore_ = 0F; - onChanged(); - return this; - } - - private float exploitabilityScore_ ; - /** - * float exploitability_score = 2; - * @return The exploitabilityScore. - */ - @java.lang.Override - public float getExploitabilityScore() { - return exploitabilityScore_; - } - /** - * float exploitability_score = 2; - * @param value The exploitabilityScore to set. - * @return This builder for chaining. - */ - public Builder setExploitabilityScore(float value) { - - exploitabilityScore_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * float exploitability_score = 2; - * @return This builder for chaining. - */ - public Builder clearExploitabilityScore() { - bitField0_ = (bitField0_ & ~0x00000002); - exploitabilityScore_ = 0F; - onChanged(); - return this; - } - - private float impactScore_ ; - /** - * float impact_score = 3; - * @return The impactScore. - */ - @java.lang.Override - public float getImpactScore() { - return impactScore_; - } - /** - * float impact_score = 3; - * @param value The impactScore to set. - * @return This builder for chaining. - */ - public Builder setImpactScore(float value) { - - impactScore_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * float impact_score = 3; - * @return This builder for chaining. - */ - public Builder clearImpactScore() { - bitField0_ = (bitField0_ & ~0x00000004); - impactScore_ = 0F; - onChanged(); - return this; - } - - private int attackVector_ = 0; - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return The enum numeric value on the wire for attackVector. - */ - @java.lang.Override public int getAttackVectorValue() { - return attackVector_; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @param value The enum numeric value on the wire for attackVector to set. - * @return This builder for chaining. - */ - public Builder setAttackVectorValue(int value) { - attackVector_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return The attackVector. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.AttackVector getAttackVector() { - io.grafeas.v1.CVSSv3.AttackVector result = io.grafeas.v1.CVSSv3.AttackVector.forNumber(attackVector_); - return result == null ? io.grafeas.v1.CVSSv3.AttackVector.UNRECOGNIZED : result; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @param value The attackVector to set. - * @return This builder for chaining. - */ - public Builder setAttackVector(io.grafeas.v1.CVSSv3.AttackVector value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - attackVector_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return This builder for chaining. - */ - public Builder clearAttackVector() { - bitField0_ = (bitField0_ & ~0x00000008); - attackVector_ = 0; - onChanged(); - return this; - } - - private int attackComplexity_ = 0; - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return The enum numeric value on the wire for attackComplexity. - */ - @java.lang.Override public int getAttackComplexityValue() { - return attackComplexity_; - } - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @param value The enum numeric value on the wire for attackComplexity to set. - * @return This builder for chaining. - */ - public Builder setAttackComplexityValue(int value) { - attackComplexity_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return The attackComplexity. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.AttackComplexity getAttackComplexity() { - io.grafeas.v1.CVSSv3.AttackComplexity result = io.grafeas.v1.CVSSv3.AttackComplexity.forNumber(attackComplexity_); - return result == null ? io.grafeas.v1.CVSSv3.AttackComplexity.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @param value The attackComplexity to set. - * @return This builder for chaining. - */ - public Builder setAttackComplexity(io.grafeas.v1.CVSSv3.AttackComplexity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - attackComplexity_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return This builder for chaining. - */ - public Builder clearAttackComplexity() { - bitField0_ = (bitField0_ & ~0x00000010); - attackComplexity_ = 0; - onChanged(); - return this; - } - - private int privilegesRequired_ = 0; - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return The enum numeric value on the wire for privilegesRequired. - */ - @java.lang.Override public int getPrivilegesRequiredValue() { - return privilegesRequired_; - } - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @param value The enum numeric value on the wire for privilegesRequired to set. - * @return This builder for chaining. - */ - public Builder setPrivilegesRequiredValue(int value) { - privilegesRequired_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return The privilegesRequired. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.PrivilegesRequired getPrivilegesRequired() { - io.grafeas.v1.CVSSv3.PrivilegesRequired result = io.grafeas.v1.CVSSv3.PrivilegesRequired.forNumber(privilegesRequired_); - return result == null ? io.grafeas.v1.CVSSv3.PrivilegesRequired.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @param value The privilegesRequired to set. - * @return This builder for chaining. - */ - public Builder setPrivilegesRequired(io.grafeas.v1.CVSSv3.PrivilegesRequired value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - privilegesRequired_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return This builder for chaining. - */ - public Builder clearPrivilegesRequired() { - bitField0_ = (bitField0_ & ~0x00000020); - privilegesRequired_ = 0; - onChanged(); - return this; - } - - private int userInteraction_ = 0; - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return The enum numeric value on the wire for userInteraction. - */ - @java.lang.Override public int getUserInteractionValue() { - return userInteraction_; - } - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @param value The enum numeric value on the wire for userInteraction to set. - * @return This builder for chaining. - */ - public Builder setUserInteractionValue(int value) { - userInteraction_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return The userInteraction. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.UserInteraction getUserInteraction() { - io.grafeas.v1.CVSSv3.UserInteraction result = io.grafeas.v1.CVSSv3.UserInteraction.forNumber(userInteraction_); - return result == null ? io.grafeas.v1.CVSSv3.UserInteraction.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @param value The userInteraction to set. - * @return This builder for chaining. - */ - public Builder setUserInteraction(io.grafeas.v1.CVSSv3.UserInteraction value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - userInteraction_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return This builder for chaining. - */ - public Builder clearUserInteraction() { - bitField0_ = (bitField0_ & ~0x00000040); - userInteraction_ = 0; - onChanged(); - return this; - } - - private int scope_ = 0; - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @return The enum numeric value on the wire for scope. - */ - @java.lang.Override public int getScopeValue() { - return scope_; - } - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @param value The enum numeric value on the wire for scope to set. - * @return This builder for chaining. - */ - public Builder setScopeValue(int value) { - scope_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @return The scope. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.Scope getScope() { - io.grafeas.v1.CVSSv3.Scope result = io.grafeas.v1.CVSSv3.Scope.forNumber(scope_); - return result == null ? io.grafeas.v1.CVSSv3.Scope.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @param value The scope to set. - * @return This builder for chaining. - */ - public Builder setScope(io.grafeas.v1.CVSSv3.Scope value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - scope_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @return This builder for chaining. - */ - public Builder clearScope() { - bitField0_ = (bitField0_ & ~0x00000080); - scope_ = 0; - onChanged(); - return this; - } - - private int confidentialityImpact_ = 0; - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return The enum numeric value on the wire for confidentialityImpact. - */ - @java.lang.Override public int getConfidentialityImpactValue() { - return confidentialityImpact_; - } - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @param value The enum numeric value on the wire for confidentialityImpact to set. - * @return This builder for chaining. - */ - public Builder setConfidentialityImpactValue(int value) { - confidentialityImpact_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return The confidentialityImpact. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.Impact getConfidentialityImpact() { - io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(confidentialityImpact_); - return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @param value The confidentialityImpact to set. - * @return This builder for chaining. - */ - public Builder setConfidentialityImpact(io.grafeas.v1.CVSSv3.Impact value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - confidentialityImpact_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return This builder for chaining. - */ - public Builder clearConfidentialityImpact() { - bitField0_ = (bitField0_ & ~0x00000100); - confidentialityImpact_ = 0; - onChanged(); - return this; - } - - private int integrityImpact_ = 0; - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return The enum numeric value on the wire for integrityImpact. - */ - @java.lang.Override public int getIntegrityImpactValue() { - return integrityImpact_; - } - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @param value The enum numeric value on the wire for integrityImpact to set. - * @return This builder for chaining. - */ - public Builder setIntegrityImpactValue(int value) { - integrityImpact_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return The integrityImpact. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.Impact getIntegrityImpact() { - io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(integrityImpact_); - return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @param value The integrityImpact to set. - * @return This builder for chaining. - */ - public Builder setIntegrityImpact(io.grafeas.v1.CVSSv3.Impact value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; - integrityImpact_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return This builder for chaining. - */ - public Builder clearIntegrityImpact() { - bitField0_ = (bitField0_ & ~0x00000200); - integrityImpact_ = 0; - onChanged(); - return this; - } - - private int availabilityImpact_ = 0; - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return The enum numeric value on the wire for availabilityImpact. - */ - @java.lang.Override public int getAvailabilityImpactValue() { - return availabilityImpact_; - } - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @param value The enum numeric value on the wire for availabilityImpact to set. - * @return This builder for chaining. - */ - public Builder setAvailabilityImpactValue(int value) { - availabilityImpact_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return The availabilityImpact. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3.Impact getAvailabilityImpact() { - io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(availabilityImpact_); - return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @param value The availabilityImpact to set. - * @return This builder for chaining. - */ - public Builder setAvailabilityImpact(io.grafeas.v1.CVSSv3.Impact value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - availabilityImpact_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return This builder for chaining. - */ - public Builder clearAvailabilityImpact() { - bitField0_ = (bitField0_ & ~0x00000400); - availabilityImpact_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.CVSSv3) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.CVSSv3) - private static final io.grafeas.v1.CVSSv3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.CVSSv3(); - } - - public static io.grafeas.v1.CVSSv3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CVSSv3 parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.CVSSv3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java deleted file mode 100644 index f171b18e246c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java +++ /dev/null @@ -1,131 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/cvss.proto - -package io.grafeas.v1; - -public interface CVSSv3OrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.CVSSv3) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The base score is a function of the base metric scores.
-   * 
- * - * float base_score = 1; - * @return The baseScore. - */ - float getBaseScore(); - - /** - * float exploitability_score = 2; - * @return The exploitabilityScore. - */ - float getExploitabilityScore(); - - /** - * float impact_score = 3; - * @return The impactScore. - */ - float getImpactScore(); - - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return The enum numeric value on the wire for attackVector. - */ - int getAttackVectorValue(); - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * 
- * - * .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return The attackVector. - */ - io.grafeas.v1.CVSSv3.AttackVector getAttackVector(); - - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return The enum numeric value on the wire for attackComplexity. - */ - int getAttackComplexityValue(); - /** - * .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return The attackComplexity. - */ - io.grafeas.v1.CVSSv3.AttackComplexity getAttackComplexity(); - - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return The enum numeric value on the wire for privilegesRequired. - */ - int getPrivilegesRequiredValue(); - /** - * .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return The privilegesRequired. - */ - io.grafeas.v1.CVSSv3.PrivilegesRequired getPrivilegesRequired(); - - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return The enum numeric value on the wire for userInteraction. - */ - int getUserInteractionValue(); - /** - * .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return The userInteraction. - */ - io.grafeas.v1.CVSSv3.UserInteraction getUserInteraction(); - - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @return The enum numeric value on the wire for scope. - */ - int getScopeValue(); - /** - * .grafeas.v1.CVSSv3.Scope scope = 9; - * @return The scope. - */ - io.grafeas.v1.CVSSv3.Scope getScope(); - - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return The enum numeric value on the wire for confidentialityImpact. - */ - int getConfidentialityImpactValue(); - /** - * .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return The confidentialityImpact. - */ - io.grafeas.v1.CVSSv3.Impact getConfidentialityImpact(); - - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return The enum numeric value on the wire for integrityImpact. - */ - int getIntegrityImpactValue(); - /** - * .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return The integrityImpact. - */ - io.grafeas.v1.CVSSv3.Impact getIntegrityImpact(); - - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return The enum numeric value on the wire for availabilityImpact. - */ - int getAvailabilityImpactValue(); - /** - * .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return The availabilityImpact. - */ - io.grafeas.v1.CVSSv3.Impact getAvailabilityImpact(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java deleted file mode 100644 index 8839140816d8..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContext.java +++ /dev/null @@ -1,1186 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * A CloudRepoSourceContext denotes a particular revision in a Google Cloud
- * Source Repo.
- * 
- * - * Protobuf type {@code grafeas.v1.CloudRepoSourceContext} - */ -public final class CloudRepoSourceContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.CloudRepoSourceContext) - CloudRepoSourceContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use CloudRepoSourceContext.newBuilder() to construct. - private CloudRepoSourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CloudRepoSourceContext() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CloudRepoSourceContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CloudRepoSourceContext.class, io.grafeas.v1.CloudRepoSourceContext.Builder.class); - } - - private int revisionCase_ = 0; - private java.lang.Object revision_; - public enum RevisionCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - REVISION_ID(2), - ALIAS_CONTEXT(3), - REVISION_NOT_SET(0); - private final int value; - private RevisionCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static RevisionCase valueOf(int value) { - return forNumber(value); - } - - public static RevisionCase forNumber(int value) { - switch (value) { - case 2: return REVISION_ID; - case 3: return ALIAS_CONTEXT; - case 0: return REVISION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public RevisionCase - getRevisionCase() { - return RevisionCase.forNumber( - revisionCase_); - } - - public static final int REPO_ID_FIELD_NUMBER = 1; - private io.grafeas.v1.RepoId repoId_; - /** - *
-   * The ID of the repo.
-   * 
- * - * .grafeas.v1.RepoId repo_id = 1; - * @return Whether the repoId field is set. - */ - @java.lang.Override - public boolean hasRepoId() { - return repoId_ != null; - } - /** - *
-   * The ID of the repo.
-   * 
- * - * .grafeas.v1.RepoId repo_id = 1; - * @return The repoId. - */ - @java.lang.Override - public io.grafeas.v1.RepoId getRepoId() { - return repoId_ == null ? io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; - } - /** - *
-   * The ID of the repo.
-   * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - @java.lang.Override - public io.grafeas.v1.RepoIdOrBuilder getRepoIdOrBuilder() { - return repoId_ == null ? io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; - } - - public static final int REVISION_ID_FIELD_NUMBER = 2; - /** - *
-   * A revision ID.
-   * 
- * - * string revision_id = 2; - * @return Whether the revisionId field is set. - */ - public boolean hasRevisionId() { - return revisionCase_ == 2; - } - /** - *
-   * A revision ID.
-   * 
- * - * string revision_id = 2; - * @return The revisionId. - */ - public java.lang.String getRevisionId() { - java.lang.Object ref = ""; - if (revisionCase_ == 2) { - ref = revision_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (revisionCase_ == 2) { - revision_ = s; - } - return s; - } - } - /** - *
-   * A revision ID.
-   * 
- * - * string revision_id = 2; - * @return The bytes for revisionId. - */ - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = ""; - if (revisionCase_ == 2) { - ref = revision_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (revisionCase_ == 2) { - revision_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ALIAS_CONTEXT_FIELD_NUMBER = 3; - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - * @return Whether the aliasContext field is set. - */ - @java.lang.Override - public boolean hasAliasContext() { - return revisionCase_ == 3; - } - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - * @return The aliasContext. - */ - @java.lang.Override - public io.grafeas.v1.AliasContext getAliasContext() { - if (revisionCase_ == 3) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - @java.lang.Override - public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { - if (revisionCase_ == 3) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (repoId_ != null) { - output.writeMessage(1, getRepoId()); - } - if (revisionCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, revision_); - } - if (revisionCase_ == 3) { - output.writeMessage(3, (io.grafeas.v1.AliasContext) revision_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (repoId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getRepoId()); - } - if (revisionCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, revision_); - } - if (revisionCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (io.grafeas.v1.AliasContext) revision_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.CloudRepoSourceContext)) { - return super.equals(obj); - } - io.grafeas.v1.CloudRepoSourceContext other = (io.grafeas.v1.CloudRepoSourceContext) obj; - - if (hasRepoId() != other.hasRepoId()) return false; - if (hasRepoId()) { - if (!getRepoId() - .equals(other.getRepoId())) return false; - } - if (!getRevisionCase().equals(other.getRevisionCase())) return false; - switch (revisionCase_) { - case 2: - if (!getRevisionId() - .equals(other.getRevisionId())) return false; - break; - case 3: - if (!getAliasContext() - .equals(other.getAliasContext())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasRepoId()) { - hash = (37 * hash) + REPO_ID_FIELD_NUMBER; - hash = (53 * hash) + getRepoId().hashCode(); - } - switch (revisionCase_) { - case 2: - hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; - hash = (53 * hash) + getRevisionId().hashCode(); - break; - case 3: - hash = (37 * hash) + ALIAS_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getAliasContext().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CloudRepoSourceContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.CloudRepoSourceContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CloudRepoSourceContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.CloudRepoSourceContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A CloudRepoSourceContext denotes a particular revision in a Google Cloud
-   * Source Repo.
-   * 
- * - * Protobuf type {@code grafeas.v1.CloudRepoSourceContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.CloudRepoSourceContext) - io.grafeas.v1.CloudRepoSourceContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CloudRepoSourceContext.class, io.grafeas.v1.CloudRepoSourceContext.Builder.class); - } - - // Construct using io.grafeas.v1.CloudRepoSourceContext.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - repoId_ = null; - if (repoIdBuilder_ != null) { - repoIdBuilder_.dispose(); - repoIdBuilder_ = null; - } - if (aliasContextBuilder_ != null) { - aliasContextBuilder_.clear(); - } - revisionCase_ = 0; - revision_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContext getDefaultInstanceForType() { - return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContext build() { - io.grafeas.v1.CloudRepoSourceContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContext buildPartial() { - io.grafeas.v1.CloudRepoSourceContext result = new io.grafeas.v1.CloudRepoSourceContext(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.CloudRepoSourceContext result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.repoId_ = repoIdBuilder_ == null - ? repoId_ - : repoIdBuilder_.build(); - } - } - - private void buildPartialOneofs(io.grafeas.v1.CloudRepoSourceContext result) { - result.revisionCase_ = revisionCase_; - result.revision_ = this.revision_; - if (revisionCase_ == 3 && - aliasContextBuilder_ != null) { - result.revision_ = aliasContextBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.CloudRepoSourceContext) { - return mergeFrom((io.grafeas.v1.CloudRepoSourceContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.CloudRepoSourceContext other) { - if (other == io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance()) return this; - if (other.hasRepoId()) { - mergeRepoId(other.getRepoId()); - } - switch (other.getRevisionCase()) { - case REVISION_ID: { - revisionCase_ = 2; - revision_ = other.revision_; - onChanged(); - break; - } - case ALIAS_CONTEXT: { - mergeAliasContext(other.getAliasContext()); - break; - } - case REVISION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getRepoIdFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - revisionCase_ = 2; - revision_ = s; - break; - } // case 18 - case 26: { - input.readMessage( - getAliasContextFieldBuilder().getBuilder(), - extensionRegistry); - revisionCase_ = 3; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int revisionCase_ = 0; - private java.lang.Object revision_; - public RevisionCase - getRevisionCase() { - return RevisionCase.forNumber( - revisionCase_); - } - - public Builder clearRevision() { - revisionCase_ = 0; - revision_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private io.grafeas.v1.RepoId repoId_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.RepoId, io.grafeas.v1.RepoId.Builder, io.grafeas.v1.RepoIdOrBuilder> repoIdBuilder_; - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - * @return Whether the repoId field is set. - */ - public boolean hasRepoId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - * @return The repoId. - */ - public io.grafeas.v1.RepoId getRepoId() { - if (repoIdBuilder_ == null) { - return repoId_ == null ? io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; - } else { - return repoIdBuilder_.getMessage(); - } - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - public Builder setRepoId(io.grafeas.v1.RepoId value) { - if (repoIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - repoId_ = value; - } else { - repoIdBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - public Builder setRepoId( - io.grafeas.v1.RepoId.Builder builderForValue) { - if (repoIdBuilder_ == null) { - repoId_ = builderForValue.build(); - } else { - repoIdBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - public Builder mergeRepoId(io.grafeas.v1.RepoId value) { - if (repoIdBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - repoId_ != null && - repoId_ != io.grafeas.v1.RepoId.getDefaultInstance()) { - getRepoIdBuilder().mergeFrom(value); - } else { - repoId_ = value; - } - } else { - repoIdBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - public Builder clearRepoId() { - bitField0_ = (bitField0_ & ~0x00000001); - repoId_ = null; - if (repoIdBuilder_ != null) { - repoIdBuilder_.dispose(); - repoIdBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - public io.grafeas.v1.RepoId.Builder getRepoIdBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getRepoIdFieldBuilder().getBuilder(); - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - public io.grafeas.v1.RepoIdOrBuilder getRepoIdOrBuilder() { - if (repoIdBuilder_ != null) { - return repoIdBuilder_.getMessageOrBuilder(); - } else { - return repoId_ == null ? - io.grafeas.v1.RepoId.getDefaultInstance() : repoId_; - } - } - /** - *
-     * The ID of the repo.
-     * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.RepoId, io.grafeas.v1.RepoId.Builder, io.grafeas.v1.RepoIdOrBuilder> - getRepoIdFieldBuilder() { - if (repoIdBuilder_ == null) { - repoIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.RepoId, io.grafeas.v1.RepoId.Builder, io.grafeas.v1.RepoIdOrBuilder>( - getRepoId(), - getParentForChildren(), - isClean()); - repoId_ = null; - } - return repoIdBuilder_; - } - - /** - *
-     * A revision ID.
-     * 
- * - * string revision_id = 2; - * @return Whether the revisionId field is set. - */ - @java.lang.Override - public boolean hasRevisionId() { - return revisionCase_ == 2; - } - /** - *
-     * A revision ID.
-     * 
- * - * string revision_id = 2; - * @return The revisionId. - */ - @java.lang.Override - public java.lang.String getRevisionId() { - java.lang.Object ref = ""; - if (revisionCase_ == 2) { - ref = revision_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (revisionCase_ == 2) { - revision_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A revision ID.
-     * 
- * - * string revision_id = 2; - * @return The bytes for revisionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = ""; - if (revisionCase_ == 2) { - ref = revision_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (revisionCase_ == 2) { - revision_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A revision ID.
-     * 
- * - * string revision_id = 2; - * @param value The revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - revisionCase_ = 2; - revision_ = value; - onChanged(); - return this; - } - /** - *
-     * A revision ID.
-     * 
- * - * string revision_id = 2; - * @return This builder for chaining. - */ - public Builder clearRevisionId() { - if (revisionCase_ == 2) { - revisionCase_ = 0; - revision_ = null; - onChanged(); - } - return this; - } - /** - *
-     * A revision ID.
-     * 
- * - * string revision_id = 2; - * @param value The bytes for revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - revisionCase_ = 2; - revision_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> aliasContextBuilder_; - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - * @return Whether the aliasContext field is set. - */ - @java.lang.Override - public boolean hasAliasContext() { - return revisionCase_ == 3; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - * @return The aliasContext. - */ - @java.lang.Override - public io.grafeas.v1.AliasContext getAliasContext() { - if (aliasContextBuilder_ == null) { - if (revisionCase_ == 3) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } else { - if (revisionCase_ == 3) { - return aliasContextBuilder_.getMessage(); - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - public Builder setAliasContext(io.grafeas.v1.AliasContext value) { - if (aliasContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - revision_ = value; - onChanged(); - } else { - aliasContextBuilder_.setMessage(value); - } - revisionCase_ = 3; - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - public Builder setAliasContext( - io.grafeas.v1.AliasContext.Builder builderForValue) { - if (aliasContextBuilder_ == null) { - revision_ = builderForValue.build(); - onChanged(); - } else { - aliasContextBuilder_.setMessage(builderForValue.build()); - } - revisionCase_ = 3; - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - public Builder mergeAliasContext(io.grafeas.v1.AliasContext value) { - if (aliasContextBuilder_ == null) { - if (revisionCase_ == 3 && - revision_ != io.grafeas.v1.AliasContext.getDefaultInstance()) { - revision_ = io.grafeas.v1.AliasContext.newBuilder((io.grafeas.v1.AliasContext) revision_) - .mergeFrom(value).buildPartial(); - } else { - revision_ = value; - } - onChanged(); - } else { - if (revisionCase_ == 3) { - aliasContextBuilder_.mergeFrom(value); - } else { - aliasContextBuilder_.setMessage(value); - } - } - revisionCase_ = 3; - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - public Builder clearAliasContext() { - if (aliasContextBuilder_ == null) { - if (revisionCase_ == 3) { - revisionCase_ = 0; - revision_ = null; - onChanged(); - } - } else { - if (revisionCase_ == 3) { - revisionCase_ = 0; - revision_ = null; - } - aliasContextBuilder_.clear(); - } - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - public io.grafeas.v1.AliasContext.Builder getAliasContextBuilder() { - return getAliasContextFieldBuilder().getBuilder(); - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - @java.lang.Override - public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { - if ((revisionCase_ == 3) && (aliasContextBuilder_ != null)) { - return aliasContextBuilder_.getMessageOrBuilder(); - } else { - if (revisionCase_ == 3) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> - getAliasContextFieldBuilder() { - if (aliasContextBuilder_ == null) { - if (!(revisionCase_ == 3)) { - revision_ = io.grafeas.v1.AliasContext.getDefaultInstance(); - } - aliasContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder>( - (io.grafeas.v1.AliasContext) revision_, - getParentForChildren(), - isClean()); - revision_ = null; - } - revisionCase_ = 3; - onChanged(); - return aliasContextBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.CloudRepoSourceContext) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.CloudRepoSourceContext) - private static final io.grafeas.v1.CloudRepoSourceContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.CloudRepoSourceContext(); - } - - public static io.grafeas.v1.CloudRepoSourceContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CloudRepoSourceContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java deleted file mode 100644 index adebca3e3ee9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java +++ /dev/null @@ -1,94 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface CloudRepoSourceContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.CloudRepoSourceContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The ID of the repo.
-   * 
- * - * .grafeas.v1.RepoId repo_id = 1; - * @return Whether the repoId field is set. - */ - boolean hasRepoId(); - /** - *
-   * The ID of the repo.
-   * 
- * - * .grafeas.v1.RepoId repo_id = 1; - * @return The repoId. - */ - io.grafeas.v1.RepoId getRepoId(); - /** - *
-   * The ID of the repo.
-   * 
- * - * .grafeas.v1.RepoId repo_id = 1; - */ - io.grafeas.v1.RepoIdOrBuilder getRepoIdOrBuilder(); - - /** - *
-   * A revision ID.
-   * 
- * - * string revision_id = 2; - * @return Whether the revisionId field is set. - */ - boolean hasRevisionId(); - /** - *
-   * A revision ID.
-   * 
- * - * string revision_id = 2; - * @return The revisionId. - */ - java.lang.String getRevisionId(); - /** - *
-   * A revision ID.
-   * 
- * - * string revision_id = 2; - * @return The bytes for revisionId. - */ - com.google.protobuf.ByteString - getRevisionIdBytes(); - - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - * @return Whether the aliasContext field is set. - */ - boolean hasAliasContext(); - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - * @return The aliasContext. - */ - io.grafeas.v1.AliasContext getAliasContext(); - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 3; - */ - io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder(); - - public io.grafeas.v1.CloudRepoSourceContext.RevisionCase getRevisionCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java deleted file mode 100644 index b1027d8a00bd..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Command.java +++ /dev/null @@ -1,1632 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * Command describes a step performed as part of the build pipeline.
- * 
- * - * Protobuf type {@code grafeas.v1.Command} - */ -public final class Command extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Command) - CommandOrBuilder { -private static final long serialVersionUID = 0L; - // Use Command.newBuilder() to construct. - private Command(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Command() { - name_ = ""; - env_ = com.google.protobuf.LazyStringArrayList.EMPTY; - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - dir_ = ""; - id_ = ""; - waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Command(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Command.class, io.grafeas.v1.Command.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * Required. Name of the command, as presented on the command line, or if the
-   * command is packaged as a Docker container, as presented to `docker pull`.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Name of the command, as presented on the command line, or if the
-   * command is packaged as a Docker container, as presented to `docker pull`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ENV_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList env_; - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @return A list containing the env. - */ - public com.google.protobuf.ProtocolStringList - getEnvList() { - return env_; - } - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @return The count of env. - */ - public int getEnvCount() { - return env_.size(); - } - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @param index The index of the element to return. - * @return The env at the given index. - */ - public java.lang.String getEnv(int index) { - return env_.get(index); - } - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @param index The index of the value to return. - * @return The bytes of the env at the given index. - */ - public com.google.protobuf.ByteString - getEnvBytes(int index) { - return env_.getByteString(index); - } - - public static final int ARGS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList args_; - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList - getArgsList() { - return args_; - } - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString - getArgsBytes(int index) { - return args_.getByteString(index); - } - - public static final int DIR_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object dir_ = ""; - /** - *
-   * Working directory (relative to project source root) used when running this
-   * command.
-   * 
- * - * string dir = 4; - * @return The dir. - */ - @java.lang.Override - public java.lang.String getDir() { - java.lang.Object ref = dir_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dir_ = s; - return s; - } - } - /** - *
-   * Working directory (relative to project source root) used when running this
-   * command.
-   * 
- * - * string dir = 4; - * @return The bytes for dir. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDirBytes() { - java.lang.Object ref = dir_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dir_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ID_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * Optional unique identifier for this command, used in wait_for to reference
-   * this command as a dependency.
-   * 
- * - * string id = 5; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * Optional unique identifier for this command, used in wait_for to reference
-   * this command as a dependency.
-   * 
- * - * string id = 5; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int WAIT_FOR_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList waitFor_; - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @return A list containing the waitFor. - */ - public com.google.protobuf.ProtocolStringList - getWaitForList() { - return waitFor_; - } - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @return The count of waitFor. - */ - public int getWaitForCount() { - return waitFor_.size(); - } - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @param index The index of the element to return. - * @return The waitFor at the given index. - */ - public java.lang.String getWaitFor(int index) { - return waitFor_.get(index); - } - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @param index The index of the value to return. - * @return The bytes of the waitFor at the given index. - */ - public com.google.protobuf.ByteString - getWaitForBytes(int index) { - return waitFor_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < env_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, env_.getRaw(i)); - } - for (int i = 0; i < args_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, args_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dir_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dir_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, id_); - } - for (int i = 0; i < waitFor_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, waitFor_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - { - int dataSize = 0; - for (int i = 0; i < env_.size(); i++) { - dataSize += computeStringSizeNoTag(env_.getRaw(i)); - } - size += dataSize; - size += 1 * getEnvList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < args_.size(); i++) { - dataSize += computeStringSizeNoTag(args_.getRaw(i)); - } - size += dataSize; - size += 1 * getArgsList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dir_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dir_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, id_); - } - { - int dataSize = 0; - for (int i = 0; i < waitFor_.size(); i++) { - dataSize += computeStringSizeNoTag(waitFor_.getRaw(i)); - } - size += dataSize; - size += 1 * getWaitForList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Command)) { - return super.equals(obj); - } - io.grafeas.v1.Command other = (io.grafeas.v1.Command) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getEnvList() - .equals(other.getEnvList())) return false; - if (!getArgsList() - .equals(other.getArgsList())) return false; - if (!getDir() - .equals(other.getDir())) return false; - if (!getId() - .equals(other.getId())) return false; - if (!getWaitForList() - .equals(other.getWaitForList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getEnvCount() > 0) { - hash = (37 * hash) + ENV_FIELD_NUMBER; - hash = (53 * hash) + getEnvList().hashCode(); - } - if (getArgsCount() > 0) { - hash = (37 * hash) + ARGS_FIELD_NUMBER; - hash = (53 * hash) + getArgsList().hashCode(); - } - hash = (37 * hash) + DIR_FIELD_NUMBER; - hash = (53 * hash) + getDir().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (getWaitForCount() > 0) { - hash = (37 * hash) + WAIT_FOR_FIELD_NUMBER; - hash = (53 * hash) + getWaitForList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Command parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Command parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Command parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Command parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Command parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Command parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Command parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Command parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Command parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Command parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Command parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Command parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Command prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Command describes a step performed as part of the build pipeline.
-   * 
- * - * Protobuf type {@code grafeas.v1.Command} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Command) - io.grafeas.v1.CommandOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Command.class, io.grafeas.v1.Command.Builder.class); - } - - // Construct using io.grafeas.v1.Command.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - env_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - dir_ = ""; - id_ = ""; - waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Command getDefaultInstanceForType() { - return io.grafeas.v1.Command.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Command build() { - io.grafeas.v1.Command result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Command buildPartial() { - io.grafeas.v1.Command result = new io.grafeas.v1.Command(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.Command result) { - if (((bitField0_ & 0x00000002) != 0)) { - env_ = env_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.env_ = env_; - if (((bitField0_ & 0x00000004) != 0)) { - args_ = args_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.args_ = args_; - if (((bitField0_ & 0x00000020) != 0)) { - waitFor_ = waitFor_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.waitFor_ = waitFor_; - } - - private void buildPartial0(io.grafeas.v1.Command result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.dir_ = dir_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Command) { - return mergeFrom((io.grafeas.v1.Command)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Command other) { - if (other == io.grafeas.v1.Command.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.env_.isEmpty()) { - if (env_.isEmpty()) { - env_ = other.env_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureEnvIsMutable(); - env_.addAll(other.env_); - } - onChanged(); - } - if (!other.args_.isEmpty()) { - if (args_.isEmpty()) { - args_ = other.args_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureArgsIsMutable(); - args_.addAll(other.args_); - } - onChanged(); - } - if (!other.getDir().isEmpty()) { - dir_ = other.dir_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (!other.waitFor_.isEmpty()) { - if (waitFor_.isEmpty()) { - waitFor_ = other.waitFor_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureWaitForIsMutable(); - waitFor_.addAll(other.waitFor_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - ensureEnvIsMutable(); - env_.add(s); - break; - } // case 18 - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - ensureArgsIsMutable(); - args_.add(s); - break; - } // case 26 - case 34: { - dir_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - ensureWaitForIsMutable(); - waitFor_.add(s); - break; - } // case 50 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Name of the command, as presented on the command line, or if the
-     * command is packaged as a Docker container, as presented to `docker pull`.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the command, as presented on the command line, or if the
-     * command is packaged as a Docker container, as presented to `docker pull`.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the command, as presented on the command line, or if the
-     * command is packaged as a Docker container, as presented to `docker pull`.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the command, as presented on the command line, or if the
-     * command is packaged as a Docker container, as presented to `docker pull`.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the command, as presented on the command line, or if the
-     * command is packaged as a Docker container, as presented to `docker pull`.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList env_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureEnvIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - env_ = new com.google.protobuf.LazyStringArrayList(env_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @return A list containing the env. - */ - public com.google.protobuf.ProtocolStringList - getEnvList() { - return env_.getUnmodifiableView(); - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @return The count of env. - */ - public int getEnvCount() { - return env_.size(); - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @param index The index of the element to return. - * @return The env at the given index. - */ - public java.lang.String getEnv(int index) { - return env_.get(index); - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @param index The index of the value to return. - * @return The bytes of the env at the given index. - */ - public com.google.protobuf.ByteString - getEnvBytes(int index) { - return env_.getByteString(index); - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @param index The index to set the value at. - * @param value The env to set. - * @return This builder for chaining. - */ - public Builder setEnv( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureEnvIsMutable(); - env_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @param value The env to add. - * @return This builder for chaining. - */ - public Builder addEnv( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureEnvIsMutable(); - env_.add(value); - onChanged(); - return this; - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @param values The env to add. - * @return This builder for chaining. - */ - public Builder addAllEnv( - java.lang.Iterable values) { - ensureEnvIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, env_); - onChanged(); - return this; - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @return This builder for chaining. - */ - public Builder clearEnv() { - env_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Environment variables set before running this command.
-     * 
- * - * repeated string env = 2; - * @param value The bytes of the env to add. - * @return This builder for chaining. - */ - public Builder addEnvBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureEnvIsMutable(); - env_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureArgsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(args_); - bitField0_ |= 0x00000004; - } - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList - getArgsList() { - return args_.getUnmodifiableView(); - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString - getArgsBytes(int index) { - return args_.getByteString(index); - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @param index The index to set the value at. - * @param value The args to set. - * @return This builder for chaining. - */ - public Builder setArgs( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureArgsIsMutable(); - args_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @param value The args to add. - * @return This builder for chaining. - */ - public Builder addArgs( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @param values The args to add. - * @return This builder for chaining. - */ - public Builder addAllArgs( - java.lang.Iterable values) { - ensureArgsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, args_); - onChanged(); - return this; - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @return This builder for chaining. - */ - public Builder clearArgs() { - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * Command-line arguments used when executing this command.
-     * 
- * - * repeated string args = 3; - * @param value The bytes of the args to add. - * @return This builder for chaining. - */ - public Builder addArgsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - - private java.lang.Object dir_ = ""; - /** - *
-     * Working directory (relative to project source root) used when running this
-     * command.
-     * 
- * - * string dir = 4; - * @return The dir. - */ - public java.lang.String getDir() { - java.lang.Object ref = dir_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dir_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Working directory (relative to project source root) used when running this
-     * command.
-     * 
- * - * string dir = 4; - * @return The bytes for dir. - */ - public com.google.protobuf.ByteString - getDirBytes() { - java.lang.Object ref = dir_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dir_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Working directory (relative to project source root) used when running this
-     * command.
-     * 
- * - * string dir = 4; - * @param value The dir to set. - * @return This builder for chaining. - */ - public Builder setDir( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - dir_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Working directory (relative to project source root) used when running this
-     * command.
-     * 
- * - * string dir = 4; - * @return This builder for chaining. - */ - public Builder clearDir() { - dir_ = getDefaultInstance().getDir(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * Working directory (relative to project source root) used when running this
-     * command.
-     * 
- * - * string dir = 4; - * @param value The bytes for dir to set. - * @return This builder for chaining. - */ - public Builder setDirBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - dir_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object id_ = ""; - /** - *
-     * Optional unique identifier for this command, used in wait_for to reference
-     * this command as a dependency.
-     * 
- * - * string id = 5; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional unique identifier for this command, used in wait_for to reference
-     * this command as a dependency.
-     * 
- * - * string id = 5; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional unique identifier for this command, used in wait_for to reference
-     * this command as a dependency.
-     * 
- * - * string id = 5; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Optional unique identifier for this command, used in wait_for to reference
-     * this command as a dependency.
-     * 
- * - * string id = 5; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * Optional unique identifier for this command, used in wait_for to reference
-     * this command as a dependency.
-     * 
- * - * string id = 5; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureWaitForIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - waitFor_ = new com.google.protobuf.LazyStringArrayList(waitFor_); - bitField0_ |= 0x00000020; - } - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @return A list containing the waitFor. - */ - public com.google.protobuf.ProtocolStringList - getWaitForList() { - return waitFor_.getUnmodifiableView(); - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @return The count of waitFor. - */ - public int getWaitForCount() { - return waitFor_.size(); - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @param index The index of the element to return. - * @return The waitFor at the given index. - */ - public java.lang.String getWaitFor(int index) { - return waitFor_.get(index); - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @param index The index of the value to return. - * @return The bytes of the waitFor at the given index. - */ - public com.google.protobuf.ByteString - getWaitForBytes(int index) { - return waitFor_.getByteString(index); - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @param index The index to set the value at. - * @param value The waitFor to set. - * @return This builder for chaining. - */ - public Builder setWaitFor( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureWaitForIsMutable(); - waitFor_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @param value The waitFor to add. - * @return This builder for chaining. - */ - public Builder addWaitFor( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureWaitForIsMutable(); - waitFor_.add(value); - onChanged(); - return this; - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @param values The waitFor to add. - * @return This builder for chaining. - */ - public Builder addAllWaitFor( - java.lang.Iterable values) { - ensureWaitForIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, waitFor_); - onChanged(); - return this; - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @return This builder for chaining. - */ - public Builder clearWaitFor() { - waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * The ID(s) of the command(s) that this command depends on.
-     * 
- * - * repeated string wait_for = 6; - * @param value The bytes of the waitFor to add. - * @return This builder for chaining. - */ - public Builder addWaitForBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureWaitForIsMutable(); - waitFor_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Command) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Command) - private static final io.grafeas.v1.Command DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Command(); - } - - public static io.grafeas.v1.Command getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Command parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Command getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java deleted file mode 100644 index 0eb0023c4121..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CommandOrBuilder.java +++ /dev/null @@ -1,198 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface CommandOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Command) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Name of the command, as presented on the command line, or if the
-   * command is packaged as a Docker container, as presented to `docker pull`.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Name of the command, as presented on the command line, or if the
-   * command is packaged as a Docker container, as presented to `docker pull`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @return A list containing the env. - */ - java.util.List - getEnvList(); - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @return The count of env. - */ - int getEnvCount(); - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @param index The index of the element to return. - * @return The env at the given index. - */ - java.lang.String getEnv(int index); - /** - *
-   * Environment variables set before running this command.
-   * 
- * - * repeated string env = 2; - * @param index The index of the value to return. - * @return The bytes of the env at the given index. - */ - com.google.protobuf.ByteString - getEnvBytes(int index); - - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @return A list containing the args. - */ - java.util.List - getArgsList(); - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @return The count of args. - */ - int getArgsCount(); - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @param index The index of the element to return. - * @return The args at the given index. - */ - java.lang.String getArgs(int index); - /** - *
-   * Command-line arguments used when executing this command.
-   * 
- * - * repeated string args = 3; - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - com.google.protobuf.ByteString - getArgsBytes(int index); - - /** - *
-   * Working directory (relative to project source root) used when running this
-   * command.
-   * 
- * - * string dir = 4; - * @return The dir. - */ - java.lang.String getDir(); - /** - *
-   * Working directory (relative to project source root) used when running this
-   * command.
-   * 
- * - * string dir = 4; - * @return The bytes for dir. - */ - com.google.protobuf.ByteString - getDirBytes(); - - /** - *
-   * Optional unique identifier for this command, used in wait_for to reference
-   * this command as a dependency.
-   * 
- * - * string id = 5; - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * Optional unique identifier for this command, used in wait_for to reference
-   * this command as a dependency.
-   * 
- * - * string id = 5; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @return A list containing the waitFor. - */ - java.util.List - getWaitForList(); - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @return The count of waitFor. - */ - int getWaitForCount(); - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @param index The index of the element to return. - * @return The waitFor at the given index. - */ - java.lang.String getWaitFor(int index); - /** - *
-   * The ID(s) of the command(s) that this command depends on.
-   * 
- * - * repeated string wait_for = 6; - * @param index The index of the value to return. - * @return The bytes of the waitFor at the given index. - */ - com.google.protobuf.ByteString - getWaitForBytes(int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java deleted file mode 100644 index 0bb812582051..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Common.java +++ /dev/null @@ -1,130 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public final class Common { - private Common() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_RelatedUrl_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Signature_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Signature_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Envelope_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Envelope_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_EnvelopeSignature_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_FileLocation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_FileLocation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_License_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_License_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Digest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Digest_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\027grafeas/v1/common.proto\022\ngrafeas.v1\"(\n" + - "\nRelatedUrl\022\013\n\003url\030\001 \001(\t\022\r\n\005label\030\002 \001(\t\"" + - "5\n\tSignature\022\021\n\tsignature\030\001 \001(\014\022\025\n\rpubli" + - "c_key_id\030\002 \001(\t\"d\n\010Envelope\022\017\n\007payload\030\001 " + - "\001(\014\022\024\n\014payload_type\030\002 \001(\t\0221\n\nsignatures\030" + - "\003 \003(\0132\035.grafeas.v1.EnvelopeSignature\"/\n\021" + - "EnvelopeSignature\022\013\n\003sig\030\001 \001(\014\022\r\n\005keyid\030" + - "\002 \001(\t\"!\n\014FileLocation\022\021\n\tfile_path\030\001 \001(\t" + - "\"/\n\007License\022\022\n\nexpression\030\001 \001(\t\022\020\n\010comme" + - "nts\030\002 \001(\t\",\n\006Digest\022\014\n\004algo\030\001 \001(\t\022\024\n\014dig" + - "est_bytes\030\002 \001(\014*\334\001\n\010NoteKind\022\031\n\025NOTE_KIN" + - "D_UNSPECIFIED\020\000\022\021\n\rVULNERABILITY\020\001\022\t\n\005BU" + - "ILD\020\002\022\t\n\005IMAGE\020\003\022\013\n\007PACKAGE\020\004\022\016\n\nDEPLOYM" + - "ENT\020\005\022\r\n\tDISCOVERY\020\006\022\017\n\013ATTESTATION\020\007\022\013\n" + - "\007UPGRADE\020\010\022\016\n\nCOMPLIANCE\020\t\022\024\n\020DSSE_ATTES" + - "TATION\020\n\022\034\n\030VULNERABILITY_ASSESSMENT\020\013BQ" + - "\n\rio.grafeas.v1P\001Z8google.golang.org/gen" + - "proto/googleapis/grafeas/v1;grafeas\242\002\003GR" + - "Ab\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_grafeas_v1_RelatedUrl_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_RelatedUrl_descriptor, - new java.lang.String[] { "Url", "Label", }); - internal_static_grafeas_v1_Signature_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Signature_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Signature_descriptor, - new java.lang.String[] { "Signature", "PublicKeyId", }); - internal_static_grafeas_v1_Envelope_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_Envelope_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Envelope_descriptor, - new java.lang.String[] { "Payload", "PayloadType", "Signatures", }); - internal_static_grafeas_v1_EnvelopeSignature_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_EnvelopeSignature_descriptor, - new java.lang.String[] { "Sig", "Keyid", }); - internal_static_grafeas_v1_FileLocation_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_grafeas_v1_FileLocation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_FileLocation_descriptor, - new java.lang.String[] { "FilePath", }); - internal_static_grafeas_v1_License_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_grafeas_v1_License_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_License_descriptor, - new java.lang.String[] { "Expression", "Comments", }); - internal_static_grafeas_v1_Digest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_grafeas_v1_Digest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Digest_descriptor, - new java.lang.String[] { "Algo", "DigestBytes", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java deleted file mode 100644 index 89490dc99bcb..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Completeness.java +++ /dev/null @@ -1,679 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -/** - *
- * Indicates that the builder claims certain fields in this message to be
- * complete.
- * 
- * - * Protobuf type {@code grafeas.v1.Completeness} - */ -public final class Completeness extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Completeness) - CompletenessOrBuilder { -private static final long serialVersionUID = 0L; - // Use Completeness.newBuilder() to construct. - private Completeness(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Completeness() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Completeness(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Completeness.class, io.grafeas.v1.Completeness.Builder.class); - } - - public static final int ARGUMENTS_FIELD_NUMBER = 1; - private boolean arguments_ = false; - /** - *
-   * If true, the builder claims that recipe.arguments is complete, meaning that
-   * all external inputs are properly captured in the recipe.
-   * 
- * - * bool arguments = 1; - * @return The arguments. - */ - @java.lang.Override - public boolean getArguments() { - return arguments_; - } - - public static final int ENVIRONMENT_FIELD_NUMBER = 2; - private boolean environment_ = false; - /** - *
-   * If true, the builder claims that recipe.environment is claimed to be
-   * complete.
-   * 
- * - * bool environment = 2; - * @return The environment. - */ - @java.lang.Override - public boolean getEnvironment() { - return environment_; - } - - public static final int MATERIALS_FIELD_NUMBER = 3; - private boolean materials_ = false; - /** - *
-   * If true, the builder claims that materials are complete, usually through
-   * some controls to prevent network access. Sometimes called "hermetic".
-   * 
- * - * bool materials = 3; - * @return The materials. - */ - @java.lang.Override - public boolean getMaterials() { - return materials_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (arguments_ != false) { - output.writeBool(1, arguments_); - } - if (environment_ != false) { - output.writeBool(2, environment_); - } - if (materials_ != false) { - output.writeBool(3, materials_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (arguments_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, arguments_); - } - if (environment_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, environment_); - } - if (materials_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, materials_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Completeness)) { - return super.equals(obj); - } - io.grafeas.v1.Completeness other = (io.grafeas.v1.Completeness) obj; - - if (getArguments() - != other.getArguments()) return false; - if (getEnvironment() - != other.getEnvironment()) return false; - if (getMaterials() - != other.getMaterials()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getArguments()); - hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getEnvironment()); - hash = (37 * hash) + MATERIALS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getMaterials()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Completeness parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Completeness parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Completeness parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Completeness parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Completeness parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Completeness parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Completeness parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Completeness parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Completeness parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Completeness parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Completeness parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Completeness parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Completeness prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * Protobuf type {@code grafeas.v1.Completeness} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Completeness) - io.grafeas.v1.CompletenessOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Completeness.class, io.grafeas.v1.Completeness.Builder.class); - } - - // Construct using io.grafeas.v1.Completeness.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - arguments_ = false; - environment_ = false; - materials_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Completeness_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Completeness getDefaultInstanceForType() { - return io.grafeas.v1.Completeness.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Completeness build() { - io.grafeas.v1.Completeness result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Completeness buildPartial() { - io.grafeas.v1.Completeness result = new io.grafeas.v1.Completeness(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Completeness result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.arguments_ = arguments_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.environment_ = environment_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.materials_ = materials_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Completeness) { - return mergeFrom((io.grafeas.v1.Completeness)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Completeness other) { - if (other == io.grafeas.v1.Completeness.getDefaultInstance()) return this; - if (other.getArguments() != false) { - setArguments(other.getArguments()); - } - if (other.getEnvironment() != false) { - setEnvironment(other.getEnvironment()); - } - if (other.getMaterials() != false) { - setMaterials(other.getMaterials()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - arguments_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - environment_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: { - materials_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private boolean arguments_ ; - /** - *
-     * If true, the builder claims that recipe.arguments is complete, meaning that
-     * all external inputs are properly captured in the recipe.
-     * 
- * - * bool arguments = 1; - * @return The arguments. - */ - @java.lang.Override - public boolean getArguments() { - return arguments_; - } - /** - *
-     * If true, the builder claims that recipe.arguments is complete, meaning that
-     * all external inputs are properly captured in the recipe.
-     * 
- * - * bool arguments = 1; - * @param value The arguments to set. - * @return This builder for chaining. - */ - public Builder setArguments(boolean value) { - - arguments_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * If true, the builder claims that recipe.arguments is complete, meaning that
-     * all external inputs are properly captured in the recipe.
-     * 
- * - * bool arguments = 1; - * @return This builder for chaining. - */ - public Builder clearArguments() { - bitField0_ = (bitField0_ & ~0x00000001); - arguments_ = false; - onChanged(); - return this; - } - - private boolean environment_ ; - /** - *
-     * If true, the builder claims that recipe.environment is claimed to be
-     * complete.
-     * 
- * - * bool environment = 2; - * @return The environment. - */ - @java.lang.Override - public boolean getEnvironment() { - return environment_; - } - /** - *
-     * If true, the builder claims that recipe.environment is claimed to be
-     * complete.
-     * 
- * - * bool environment = 2; - * @param value The environment to set. - * @return This builder for chaining. - */ - public Builder setEnvironment(boolean value) { - - environment_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * If true, the builder claims that recipe.environment is claimed to be
-     * complete.
-     * 
- * - * bool environment = 2; - * @return This builder for chaining. - */ - public Builder clearEnvironment() { - bitField0_ = (bitField0_ & ~0x00000002); - environment_ = false; - onChanged(); - return this; - } - - private boolean materials_ ; - /** - *
-     * If true, the builder claims that materials are complete, usually through
-     * some controls to prevent network access. Sometimes called "hermetic".
-     * 
- * - * bool materials = 3; - * @return The materials. - */ - @java.lang.Override - public boolean getMaterials() { - return materials_; - } - /** - *
-     * If true, the builder claims that materials are complete, usually through
-     * some controls to prevent network access. Sometimes called "hermetic".
-     * 
- * - * bool materials = 3; - * @param value The materials to set. - * @return This builder for chaining. - */ - public Builder setMaterials(boolean value) { - - materials_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * If true, the builder claims that materials are complete, usually through
-     * some controls to prevent network access. Sometimes called "hermetic".
-     * 
- * - * bool materials = 3; - * @return This builder for chaining. - */ - public Builder clearMaterials() { - bitField0_ = (bitField0_ & ~0x00000004); - materials_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Completeness) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Completeness) - private static final io.grafeas.v1.Completeness DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Completeness(); - } - - public static io.grafeas.v1.Completeness getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Completeness parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Completeness getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java deleted file mode 100644 index 4c8b606b7d03..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CompletenessOrBuilder.java +++ /dev/null @@ -1,42 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -public interface CompletenessOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Completeness) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If true, the builder claims that recipe.arguments is complete, meaning that
-   * all external inputs are properly captured in the recipe.
-   * 
- * - * bool arguments = 1; - * @return The arguments. - */ - boolean getArguments(); - - /** - *
-   * If true, the builder claims that recipe.environment is claimed to be
-   * complete.
-   * 
- * - * bool environment = 2; - * @return The environment. - */ - boolean getEnvironment(); - - /** - *
-   * If true, the builder claims that materials are complete, usually through
-   * some controls to prevent network access. Sometimes called "hermetic".
-   * 
- * - * bool materials = 3; - * @return The materials. - */ - boolean getMaterials(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java deleted file mode 100644 index 7d4fd429aa29..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Compliance.java +++ /dev/null @@ -1,111 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -public final class Compliance { - private Compliance() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ComplianceNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ComplianceVersion_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ComplianceOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_NonCompliantFile_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\033grafeas/v1/compliance.proto\022\ngrafeas.v" + - "1\032\031grafeas/v1/severity.proto\"\313\002\n\016Complia" + - "nceNote\022\r\n\005title\030\001 \001(\t\022\023\n\013description\030\002 " + - "\001(\t\022.\n\007version\030\003 \003(\0132\035.grafeas.v1.Compli" + - "anceVersion\022\021\n\trationale\030\004 \001(\t\022\023\n\013remedi" + - "ation\030\005 \001(\t\022@\n\rcis_benchmark\030\006 \001(\0132\'.gra" + - "feas.v1.ComplianceNote.CisBenchmarkH\000\022\031\n" + - "\021scan_instructions\030\007 \001(\014\032M\n\014CisBenchmark" + - "\022\025\n\rprofile_level\030\001 \001(\005\022&\n\010severity\030\002 \001(" + - "\0162\024.grafeas.v1.SeverityB\021\n\017compliance_ty" + - "pe\"Q\n\021ComplianceVersion\022\017\n\007cpe_uri\030\001 \001(\t" + - "\022\032\n\022benchmark_document\030\003 \001(\t\022\017\n\007version\030" + - "\002 \001(\t\"p\n\024ComplianceOccurrence\0229\n\023non_com" + - "pliant_files\030\002 \003(\0132\034.grafeas.v1.NonCompl" + - "iantFile\022\035\n\025non_compliance_reason\030\003 \001(\t\"" + - "I\n\020NonCompliantFile\022\014\n\004path\030\001 \001(\t\022\027\n\017dis" + - "play_command\030\002 \001(\t\022\016\n\006reason\030\003 \001(\tBQ\n\rio" + - ".grafeas.v1P\001Z8google.golang.org/genprot" + - "o/googleapis/grafeas/v1;grafeas\242\002\003GRAb\006p" + - "roto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.grafeas.v1.SeverityOuterClass.getDescriptor(), - }); - internal_static_grafeas_v1_ComplianceNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ComplianceNote_descriptor, - new java.lang.String[] { "Title", "Description", "Version", "Rationale", "Remediation", "CisBenchmark", "ScanInstructions", "ComplianceType", }); - internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor = - internal_static_grafeas_v1_ComplianceNote_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor, - new java.lang.String[] { "ProfileLevel", "Severity", }); - internal_static_grafeas_v1_ComplianceVersion_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ComplianceVersion_descriptor, - new java.lang.String[] { "CpeUri", "BenchmarkDocument", "Version", }); - internal_static_grafeas_v1_ComplianceOccurrence_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ComplianceOccurrence_descriptor, - new java.lang.String[] { "NonCompliantFiles", "NonComplianceReason", }); - internal_static_grafeas_v1_NonCompliantFile_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_NonCompliantFile_descriptor, - new java.lang.String[] { "Path", "DisplayCommand", "Reason", }); - io.grafeas.v1.SeverityOuterClass.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java deleted file mode 100644 index d58e1ea6bb90..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNote.java +++ /dev/null @@ -1,2467 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.ComplianceNote} - */ -public final class ComplianceNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceNote) - ComplianceNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use ComplianceNote.newBuilder() to construct. - private ComplianceNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ComplianceNote() { - title_ = ""; - description_ = ""; - version_ = java.util.Collections.emptyList(); - rationale_ = ""; - remediation_ = ""; - scanInstructions_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ComplianceNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceNote.class, io.grafeas.v1.ComplianceNote.Builder.class); - } - - public interface CisBenchmarkOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceNote.CisBenchmark) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 profile_level = 1; - * @return The profileLevel. - */ - int getProfileLevel(); - - /** - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - int getSeverityValue(); - /** - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - io.grafeas.v1.Severity getSeverity(); - } - /** - *
-   * A compliance check that is a CIS benchmark.
-   * 
- * - * Protobuf type {@code grafeas.v1.ComplianceNote.CisBenchmark} - */ - public static final class CisBenchmark extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceNote.CisBenchmark) - CisBenchmarkOrBuilder { - private static final long serialVersionUID = 0L; - // Use CisBenchmark.newBuilder() to construct. - private CisBenchmark(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CisBenchmark() { - severity_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CisBenchmark(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceNote.CisBenchmark.class, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder.class); - } - - public static final int PROFILE_LEVEL_FIELD_NUMBER = 1; - private int profileLevel_ = 0; - /** - * int32 profile_level = 1; - * @return The profileLevel. - */ - @java.lang.Override - public int getProfileLevel() { - return profileLevel_; - } - - public static final int SEVERITY_FIELD_NUMBER = 2; - private int severity_ = 0; - /** - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override public int getSeverityValue() { - return severity_; - } - /** - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - @java.lang.Override public io.grafeas.v1.Severity getSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (profileLevel_ != 0) { - output.writeInt32(1, profileLevel_); - } - if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - output.writeEnum(2, severity_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (profileLevel_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, profileLevel_); - } - if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, severity_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ComplianceNote.CisBenchmark)) { - return super.equals(obj); - } - io.grafeas.v1.ComplianceNote.CisBenchmark other = (io.grafeas.v1.ComplianceNote.CisBenchmark) obj; - - if (getProfileLevel() - != other.getProfileLevel()) return false; - if (severity_ != other.severity_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PROFILE_LEVEL_FIELD_NUMBER; - hash = (53 * hash) + getProfileLevel(); - hash = (37 * hash) + SEVERITY_FIELD_NUMBER; - hash = (53 * hash) + severity_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceNote.CisBenchmark parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ComplianceNote.CisBenchmark prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A compliance check that is a CIS benchmark.
-     * 
- * - * Protobuf type {@code grafeas.v1.ComplianceNote.CisBenchmark} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceNote.CisBenchmark) - io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceNote.CisBenchmark.class, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder.class); - } - - // Construct using io.grafeas.v1.ComplianceNote.CisBenchmark.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - profileLevel_ = 0; - severity_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_CisBenchmark_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmark getDefaultInstanceForType() { - return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmark build() { - io.grafeas.v1.ComplianceNote.CisBenchmark result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmark buildPartial() { - io.grafeas.v1.ComplianceNote.CisBenchmark result = new io.grafeas.v1.ComplianceNote.CisBenchmark(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.ComplianceNote.CisBenchmark result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.profileLevel_ = profileLevel_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.severity_ = severity_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ComplianceNote.CisBenchmark) { - return mergeFrom((io.grafeas.v1.ComplianceNote.CisBenchmark)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ComplianceNote.CisBenchmark other) { - if (other == io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance()) return this; - if (other.getProfileLevel() != 0) { - setProfileLevel(other.getProfileLevel()); - } - if (other.severity_ != 0) { - setSeverityValue(other.getSeverityValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - profileLevel_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - severity_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int profileLevel_ ; - /** - * int32 profile_level = 1; - * @return The profileLevel. - */ - @java.lang.Override - public int getProfileLevel() { - return profileLevel_; - } - /** - * int32 profile_level = 1; - * @param value The profileLevel to set. - * @return This builder for chaining. - */ - public Builder setProfileLevel(int value) { - - profileLevel_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 profile_level = 1; - * @return This builder for chaining. - */ - public Builder clearProfileLevel() { - bitField0_ = (bitField0_ & ~0x00000001); - profileLevel_ = 0; - onChanged(); - return this; - } - - private int severity_ = 0; - /** - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override public int getSeverityValue() { - return severity_; - } - /** - * .grafeas.v1.Severity severity = 2; - * @param value The enum numeric value on the wire for severity to set. - * @return This builder for chaining. - */ - public Builder setSeverityValue(int value) { - severity_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - @java.lang.Override - public io.grafeas.v1.Severity getSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - /** - * .grafeas.v1.Severity severity = 2; - * @param value The severity to set. - * @return This builder for chaining. - */ - public Builder setSeverity(io.grafeas.v1.Severity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - severity_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grafeas.v1.Severity severity = 2; - * @return This builder for chaining. - */ - public Builder clearSeverity() { - bitField0_ = (bitField0_ & ~0x00000002); - severity_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceNote.CisBenchmark) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceNote.CisBenchmark) - private static final io.grafeas.v1.ComplianceNote.CisBenchmark DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceNote.CisBenchmark(); - } - - public static io.grafeas.v1.ComplianceNote.CisBenchmark getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CisBenchmark parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmark getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int complianceTypeCase_ = 0; - private java.lang.Object complianceType_; - public enum ComplianceTypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CIS_BENCHMARK(6), - COMPLIANCETYPE_NOT_SET(0); - private final int value; - private ComplianceTypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ComplianceTypeCase valueOf(int value) { - return forNumber(value); - } - - public static ComplianceTypeCase forNumber(int value) { - switch (value) { - case 6: return CIS_BENCHMARK; - case 0: return COMPLIANCETYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ComplianceTypeCase - getComplianceTypeCase() { - return ComplianceTypeCase.forNumber( - complianceTypeCase_); - } - - public static final int TITLE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; - /** - *
-   * The title that identifies this compliance check.
-   * 
- * - * string title = 1; - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } - } - /** - *
-   * The title that identifies this compliance check.
-   * 
- * - * string title = 1; - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * A description about this compliance check.
-   * 
- * - * string description = 2; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * A description about this compliance check.
-   * 
- * - * string description = 2; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List version_; - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - @java.lang.Override - public java.util.List getVersionList() { - return version_; - } - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - @java.lang.Override - public java.util.List - getVersionOrBuilderList() { - return version_; - } - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - @java.lang.Override - public int getVersionCount() { - return version_.size(); - } - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceVersion getVersion(int index) { - return version_.get(index); - } - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceVersionOrBuilder getVersionOrBuilder( - int index) { - return version_.get(index); - } - - public static final int RATIONALE_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object rationale_ = ""; - /** - *
-   * A rationale for the existence of this compliance check.
-   * 
- * - * string rationale = 4; - * @return The rationale. - */ - @java.lang.Override - public java.lang.String getRationale() { - java.lang.Object ref = rationale_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - rationale_ = s; - return s; - } - } - /** - *
-   * A rationale for the existence of this compliance check.
-   * 
- * - * string rationale = 4; - * @return The bytes for rationale. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRationaleBytes() { - java.lang.Object ref = rationale_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - rationale_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REMEDIATION_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object remediation_ = ""; - /** - *
-   * A description of remediation steps if the compliance check fails.
-   * 
- * - * string remediation = 5; - * @return The remediation. - */ - @java.lang.Override - public java.lang.String getRemediation() { - java.lang.Object ref = remediation_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - remediation_ = s; - return s; - } - } - /** - *
-   * A description of remediation steps if the compliance check fails.
-   * 
- * - * string remediation = 5; - * @return The bytes for remediation. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRemediationBytes() { - java.lang.Object ref = remediation_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - remediation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CIS_BENCHMARK_FIELD_NUMBER = 6; - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @return Whether the cisBenchmark field is set. - */ - @java.lang.Override - public boolean hasCisBenchmark() { - return complianceTypeCase_ == 6; - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @return The cisBenchmark. - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmark getCisBenchmark() { - if (complianceTypeCase_ == 6) { - return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; - } - return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder getCisBenchmarkOrBuilder() { - if (complianceTypeCase_ == 6) { - return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; - } - return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); - } - - public static final int SCAN_INSTRUCTIONS_FIELD_NUMBER = 7; - private com.google.protobuf.ByteString scanInstructions_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-   * Serialized scan instructions with a predefined format.
-   * 
- * - * bytes scan_instructions = 7; - * @return The scanInstructions. - */ - @java.lang.Override - public com.google.protobuf.ByteString getScanInstructions() { - return scanInstructions_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - for (int i = 0; i < version_.size(); i++) { - output.writeMessage(3, version_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rationale_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, rationale_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remediation_); - } - if (complianceTypeCase_ == 6) { - output.writeMessage(6, (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_); - } - if (!scanInstructions_.isEmpty()) { - output.writeBytes(7, scanInstructions_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - for (int i = 0; i < version_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, version_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rationale_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, rationale_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remediation_); - } - if (complianceTypeCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_); - } - if (!scanInstructions_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(7, scanInstructions_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ComplianceNote)) { - return super.equals(obj); - } - io.grafeas.v1.ComplianceNote other = (io.grafeas.v1.ComplianceNote) obj; - - if (!getTitle() - .equals(other.getTitle())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getVersionList() - .equals(other.getVersionList())) return false; - if (!getRationale() - .equals(other.getRationale())) return false; - if (!getRemediation() - .equals(other.getRemediation())) return false; - if (!getScanInstructions() - .equals(other.getScanInstructions())) return false; - if (!getComplianceTypeCase().equals(other.getComplianceTypeCase())) return false; - switch (complianceTypeCase_) { - case 6: - if (!getCisBenchmark() - .equals(other.getCisBenchmark())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (getVersionCount() > 0) { - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersionList().hashCode(); - } - hash = (37 * hash) + RATIONALE_FIELD_NUMBER; - hash = (53 * hash) + getRationale().hashCode(); - hash = (37 * hash) + REMEDIATION_FIELD_NUMBER; - hash = (53 * hash) + getRemediation().hashCode(); - hash = (37 * hash) + SCAN_INSTRUCTIONS_FIELD_NUMBER; - hash = (53 * hash) + getScanInstructions().hashCode(); - switch (complianceTypeCase_) { - case 6: - hash = (37 * hash) + CIS_BENCHMARK_FIELD_NUMBER; - hash = (53 * hash) + getCisBenchmark().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ComplianceNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ComplianceNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.ComplianceNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceNote) - io.grafeas.v1.ComplianceNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceNote.class, io.grafeas.v1.ComplianceNote.Builder.class); - } - - // Construct using io.grafeas.v1.ComplianceNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - title_ = ""; - description_ = ""; - if (versionBuilder_ == null) { - version_ = java.util.Collections.emptyList(); - } else { - version_ = null; - versionBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - rationale_ = ""; - remediation_ = ""; - if (cisBenchmarkBuilder_ != null) { - cisBenchmarkBuilder_.clear(); - } - scanInstructions_ = com.google.protobuf.ByteString.EMPTY; - complianceTypeCase_ = 0; - complianceType_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote getDefaultInstanceForType() { - return io.grafeas.v1.ComplianceNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote build() { - io.grafeas.v1.ComplianceNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote buildPartial() { - io.grafeas.v1.ComplianceNote result = new io.grafeas.v1.ComplianceNote(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.ComplianceNote result) { - if (versionBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - version_ = java.util.Collections.unmodifiableList(version_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.version_ = version_; - } else { - result.version_ = versionBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.ComplianceNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.title_ = title_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.rationale_ = rationale_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.remediation_ = remediation_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.scanInstructions_ = scanInstructions_; - } - } - - private void buildPartialOneofs(io.grafeas.v1.ComplianceNote result) { - result.complianceTypeCase_ = complianceTypeCase_; - result.complianceType_ = this.complianceType_; - if (complianceTypeCase_ == 6 && - cisBenchmarkBuilder_ != null) { - result.complianceType_ = cisBenchmarkBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ComplianceNote) { - return mergeFrom((io.grafeas.v1.ComplianceNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ComplianceNote other) { - if (other == io.grafeas.v1.ComplianceNote.getDefaultInstance()) return this; - if (!other.getTitle().isEmpty()) { - title_ = other.title_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (versionBuilder_ == null) { - if (!other.version_.isEmpty()) { - if (version_.isEmpty()) { - version_ = other.version_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureVersionIsMutable(); - version_.addAll(other.version_); - } - onChanged(); - } - } else { - if (!other.version_.isEmpty()) { - if (versionBuilder_.isEmpty()) { - versionBuilder_.dispose(); - versionBuilder_ = null; - version_ = other.version_; - bitField0_ = (bitField0_ & ~0x00000004); - versionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVersionFieldBuilder() : null; - } else { - versionBuilder_.addAllMessages(other.version_); - } - } - } - if (!other.getRationale().isEmpty()) { - rationale_ = other.rationale_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getRemediation().isEmpty()) { - remediation_ = other.remediation_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.getScanInstructions() != com.google.protobuf.ByteString.EMPTY) { - setScanInstructions(other.getScanInstructions()); - } - switch (other.getComplianceTypeCase()) { - case CIS_BENCHMARK: { - mergeCisBenchmark(other.getCisBenchmark()); - break; - } - case COMPLIANCETYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - io.grafeas.v1.ComplianceVersion m = - input.readMessage( - io.grafeas.v1.ComplianceVersion.parser(), - extensionRegistry); - if (versionBuilder_ == null) { - ensureVersionIsMutable(); - version_.add(m); - } else { - versionBuilder_.addMessage(m); - } - break; - } // case 26 - case 34: { - rationale_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - remediation_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - input.readMessage( - getCisBenchmarkFieldBuilder().getBuilder(), - extensionRegistry); - complianceTypeCase_ = 6; - break; - } // case 50 - case 58: { - scanInstructions_ = input.readBytes(); - bitField0_ |= 0x00000040; - break; - } // case 58 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int complianceTypeCase_ = 0; - private java.lang.Object complianceType_; - public ComplianceTypeCase - getComplianceTypeCase() { - return ComplianceTypeCase.forNumber( - complianceTypeCase_); - } - - public Builder clearComplianceType() { - complianceTypeCase_ = 0; - complianceType_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object title_ = ""; - /** - *
-     * The title that identifies this compliance check.
-     * 
- * - * string title = 1; - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The title that identifies this compliance check.
-     * 
- * - * string title = 1; - * @return The bytes for title. - */ - public com.google.protobuf.ByteString - getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The title that identifies this compliance check.
-     * 
- * - * string title = 1; - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - title_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The title that identifies this compliance check.
-     * 
- * - * string title = 1; - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The title that identifies this compliance check.
-     * 
- * - * string title = 1; - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * A description about this compliance check.
-     * 
- * - * string description = 2; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A description about this compliance check.
-     * 
- * - * string description = 2; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A description about this compliance check.
-     * 
- * - * string description = 2; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * A description about this compliance check.
-     * 
- * - * string description = 2; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * A description about this compliance check.
-     * 
- * - * string description = 2; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.util.List version_ = - java.util.Collections.emptyList(); - private void ensureVersionIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - version_ = new java.util.ArrayList(version_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.ComplianceVersion, io.grafeas.v1.ComplianceVersion.Builder, io.grafeas.v1.ComplianceVersionOrBuilder> versionBuilder_; - - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public java.util.List getVersionList() { - if (versionBuilder_ == null) { - return java.util.Collections.unmodifiableList(version_); - } else { - return versionBuilder_.getMessageList(); - } - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public int getVersionCount() { - if (versionBuilder_ == null) { - return version_.size(); - } else { - return versionBuilder_.getCount(); - } - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public io.grafeas.v1.ComplianceVersion getVersion(int index) { - if (versionBuilder_ == null) { - return version_.get(index); - } else { - return versionBuilder_.getMessage(index); - } - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder setVersion( - int index, io.grafeas.v1.ComplianceVersion value) { - if (versionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionIsMutable(); - version_.set(index, value); - onChanged(); - } else { - versionBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder setVersion( - int index, io.grafeas.v1.ComplianceVersion.Builder builderForValue) { - if (versionBuilder_ == null) { - ensureVersionIsMutable(); - version_.set(index, builderForValue.build()); - onChanged(); - } else { - versionBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder addVersion(io.grafeas.v1.ComplianceVersion value) { - if (versionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionIsMutable(); - version_.add(value); - onChanged(); - } else { - versionBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder addVersion( - int index, io.grafeas.v1.ComplianceVersion value) { - if (versionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionIsMutable(); - version_.add(index, value); - onChanged(); - } else { - versionBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder addVersion( - io.grafeas.v1.ComplianceVersion.Builder builderForValue) { - if (versionBuilder_ == null) { - ensureVersionIsMutable(); - version_.add(builderForValue.build()); - onChanged(); - } else { - versionBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder addVersion( - int index, io.grafeas.v1.ComplianceVersion.Builder builderForValue) { - if (versionBuilder_ == null) { - ensureVersionIsMutable(); - version_.add(index, builderForValue.build()); - onChanged(); - } else { - versionBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder addAllVersion( - java.lang.Iterable values) { - if (versionBuilder_ == null) { - ensureVersionIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, version_); - onChanged(); - } else { - versionBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder clearVersion() { - if (versionBuilder_ == null) { - version_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - versionBuilder_.clear(); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public Builder removeVersion(int index) { - if (versionBuilder_ == null) { - ensureVersionIsMutable(); - version_.remove(index); - onChanged(); - } else { - versionBuilder_.remove(index); - } - return this; - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public io.grafeas.v1.ComplianceVersion.Builder getVersionBuilder( - int index) { - return getVersionFieldBuilder().getBuilder(index); - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public io.grafeas.v1.ComplianceVersionOrBuilder getVersionOrBuilder( - int index) { - if (versionBuilder_ == null) { - return version_.get(index); } else { - return versionBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public java.util.List - getVersionOrBuilderList() { - if (versionBuilder_ != null) { - return versionBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(version_); - } - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public io.grafeas.v1.ComplianceVersion.Builder addVersionBuilder() { - return getVersionFieldBuilder().addBuilder( - io.grafeas.v1.ComplianceVersion.getDefaultInstance()); - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public io.grafeas.v1.ComplianceVersion.Builder addVersionBuilder( - int index) { - return getVersionFieldBuilder().addBuilder( - index, io.grafeas.v1.ComplianceVersion.getDefaultInstance()); - } - /** - *
-     * The OS and config versions the benchmark applies to.
-     * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - public java.util.List - getVersionBuilderList() { - return getVersionFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.ComplianceVersion, io.grafeas.v1.ComplianceVersion.Builder, io.grafeas.v1.ComplianceVersionOrBuilder> - getVersionFieldBuilder() { - if (versionBuilder_ == null) { - versionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.ComplianceVersion, io.grafeas.v1.ComplianceVersion.Builder, io.grafeas.v1.ComplianceVersionOrBuilder>( - version_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - version_ = null; - } - return versionBuilder_; - } - - private java.lang.Object rationale_ = ""; - /** - *
-     * A rationale for the existence of this compliance check.
-     * 
- * - * string rationale = 4; - * @return The rationale. - */ - public java.lang.String getRationale() { - java.lang.Object ref = rationale_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - rationale_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A rationale for the existence of this compliance check.
-     * 
- * - * string rationale = 4; - * @return The bytes for rationale. - */ - public com.google.protobuf.ByteString - getRationaleBytes() { - java.lang.Object ref = rationale_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - rationale_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A rationale for the existence of this compliance check.
-     * 
- * - * string rationale = 4; - * @param value The rationale to set. - * @return This builder for chaining. - */ - public Builder setRationale( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - rationale_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * A rationale for the existence of this compliance check.
-     * 
- * - * string rationale = 4; - * @return This builder for chaining. - */ - public Builder clearRationale() { - rationale_ = getDefaultInstance().getRationale(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * A rationale for the existence of this compliance check.
-     * 
- * - * string rationale = 4; - * @param value The bytes for rationale to set. - * @return This builder for chaining. - */ - public Builder setRationaleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - rationale_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object remediation_ = ""; - /** - *
-     * A description of remediation steps if the compliance check fails.
-     * 
- * - * string remediation = 5; - * @return The remediation. - */ - public java.lang.String getRemediation() { - java.lang.Object ref = remediation_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - remediation_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A description of remediation steps if the compliance check fails.
-     * 
- * - * string remediation = 5; - * @return The bytes for remediation. - */ - public com.google.protobuf.ByteString - getRemediationBytes() { - java.lang.Object ref = remediation_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - remediation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A description of remediation steps if the compliance check fails.
-     * 
- * - * string remediation = 5; - * @param value The remediation to set. - * @return This builder for chaining. - */ - public Builder setRemediation( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - remediation_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * A description of remediation steps if the compliance check fails.
-     * 
- * - * string remediation = 5; - * @return This builder for chaining. - */ - public Builder clearRemediation() { - remediation_ = getDefaultInstance().getRemediation(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * A description of remediation steps if the compliance check fails.
-     * 
- * - * string remediation = 5; - * @param value The bytes for remediation to set. - * @return This builder for chaining. - */ - public Builder setRemediationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - remediation_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceNote.CisBenchmark, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder, io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder> cisBenchmarkBuilder_; - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @return Whether the cisBenchmark field is set. - */ - @java.lang.Override - public boolean hasCisBenchmark() { - return complianceTypeCase_ == 6; - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @return The cisBenchmark. - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmark getCisBenchmark() { - if (cisBenchmarkBuilder_ == null) { - if (complianceTypeCase_ == 6) { - return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; - } - return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); - } else { - if (complianceTypeCase_ == 6) { - return cisBenchmarkBuilder_.getMessage(); - } - return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); - } - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - public Builder setCisBenchmark(io.grafeas.v1.ComplianceNote.CisBenchmark value) { - if (cisBenchmarkBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - complianceType_ = value; - onChanged(); - } else { - cisBenchmarkBuilder_.setMessage(value); - } - complianceTypeCase_ = 6; - return this; - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - public Builder setCisBenchmark( - io.grafeas.v1.ComplianceNote.CisBenchmark.Builder builderForValue) { - if (cisBenchmarkBuilder_ == null) { - complianceType_ = builderForValue.build(); - onChanged(); - } else { - cisBenchmarkBuilder_.setMessage(builderForValue.build()); - } - complianceTypeCase_ = 6; - return this; - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - public Builder mergeCisBenchmark(io.grafeas.v1.ComplianceNote.CisBenchmark value) { - if (cisBenchmarkBuilder_ == null) { - if (complianceTypeCase_ == 6 && - complianceType_ != io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance()) { - complianceType_ = io.grafeas.v1.ComplianceNote.CisBenchmark.newBuilder((io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_) - .mergeFrom(value).buildPartial(); - } else { - complianceType_ = value; - } - onChanged(); - } else { - if (complianceTypeCase_ == 6) { - cisBenchmarkBuilder_.mergeFrom(value); - } else { - cisBenchmarkBuilder_.setMessage(value); - } - } - complianceTypeCase_ = 6; - return this; - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - public Builder clearCisBenchmark() { - if (cisBenchmarkBuilder_ == null) { - if (complianceTypeCase_ == 6) { - complianceTypeCase_ = 0; - complianceType_ = null; - onChanged(); - } - } else { - if (complianceTypeCase_ == 6) { - complianceTypeCase_ = 0; - complianceType_ = null; - } - cisBenchmarkBuilder_.clear(); - } - return this; - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - public io.grafeas.v1.ComplianceNote.CisBenchmark.Builder getCisBenchmarkBuilder() { - return getCisBenchmarkFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder getCisBenchmarkOrBuilder() { - if ((complianceTypeCase_ == 6) && (cisBenchmarkBuilder_ != null)) { - return cisBenchmarkBuilder_.getMessageOrBuilder(); - } else { - if (complianceTypeCase_ == 6) { - return (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_; - } - return io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); - } - } - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceNote.CisBenchmark, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder, io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder> - getCisBenchmarkFieldBuilder() { - if (cisBenchmarkBuilder_ == null) { - if (!(complianceTypeCase_ == 6)) { - complianceType_ = io.grafeas.v1.ComplianceNote.CisBenchmark.getDefaultInstance(); - } - cisBenchmarkBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceNote.CisBenchmark, io.grafeas.v1.ComplianceNote.CisBenchmark.Builder, io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder>( - (io.grafeas.v1.ComplianceNote.CisBenchmark) complianceType_, - getParentForChildren(), - isClean()); - complianceType_ = null; - } - complianceTypeCase_ = 6; - onChanged(); - return cisBenchmarkBuilder_; - } - - private com.google.protobuf.ByteString scanInstructions_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Serialized scan instructions with a predefined format.
-     * 
- * - * bytes scan_instructions = 7; - * @return The scanInstructions. - */ - @java.lang.Override - public com.google.protobuf.ByteString getScanInstructions() { - return scanInstructions_; - } - /** - *
-     * Serialized scan instructions with a predefined format.
-     * 
- * - * bytes scan_instructions = 7; - * @param value The scanInstructions to set. - * @return This builder for chaining. - */ - public Builder setScanInstructions(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - scanInstructions_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Serialized scan instructions with a predefined format.
-     * 
- * - * bytes scan_instructions = 7; - * @return This builder for chaining. - */ - public Builder clearScanInstructions() { - bitField0_ = (bitField0_ & ~0x00000040); - scanInstructions_ = getDefaultInstance().getScanInstructions(); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceNote) - private static final io.grafeas.v1.ComplianceNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceNote(); - } - - public static io.grafeas.v1.ComplianceNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ComplianceNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java deleted file mode 100644 index 8015d00f3627..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceNoteOrBuilder.java +++ /dev/null @@ -1,160 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -public interface ComplianceNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The title that identifies this compliance check.
-   * 
- * - * string title = 1; - * @return The title. - */ - java.lang.String getTitle(); - /** - *
-   * The title that identifies this compliance check.
-   * 
- * - * string title = 1; - * @return The bytes for title. - */ - com.google.protobuf.ByteString - getTitleBytes(); - - /** - *
-   * A description about this compliance check.
-   * 
- * - * string description = 2; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A description about this compliance check.
-   * 
- * - * string description = 2; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - java.util.List - getVersionList(); - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - io.grafeas.v1.ComplianceVersion getVersion(int index); - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - int getVersionCount(); - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - java.util.List - getVersionOrBuilderList(); - /** - *
-   * The OS and config versions the benchmark applies to.
-   * 
- * - * repeated .grafeas.v1.ComplianceVersion version = 3; - */ - io.grafeas.v1.ComplianceVersionOrBuilder getVersionOrBuilder( - int index); - - /** - *
-   * A rationale for the existence of this compliance check.
-   * 
- * - * string rationale = 4; - * @return The rationale. - */ - java.lang.String getRationale(); - /** - *
-   * A rationale for the existence of this compliance check.
-   * 
- * - * string rationale = 4; - * @return The bytes for rationale. - */ - com.google.protobuf.ByteString - getRationaleBytes(); - - /** - *
-   * A description of remediation steps if the compliance check fails.
-   * 
- * - * string remediation = 5; - * @return The remediation. - */ - java.lang.String getRemediation(); - /** - *
-   * A description of remediation steps if the compliance check fails.
-   * 
- * - * string remediation = 5; - * @return The bytes for remediation. - */ - com.google.protobuf.ByteString - getRemediationBytes(); - - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @return Whether the cisBenchmark field is set. - */ - boolean hasCisBenchmark(); - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @return The cisBenchmark. - */ - io.grafeas.v1.ComplianceNote.CisBenchmark getCisBenchmark(); - /** - * .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - */ - io.grafeas.v1.ComplianceNote.CisBenchmarkOrBuilder getCisBenchmarkOrBuilder(); - - /** - *
-   * Serialized scan instructions with a predefined format.
-   * 
- * - * bytes scan_instructions = 7; - * @return The scanInstructions. - */ - com.google.protobuf.ByteString getScanInstructions(); - - public io.grafeas.v1.ComplianceNote.ComplianceTypeCase getComplianceTypeCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java deleted file mode 100644 index 1c25dcc2f406..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrence.java +++ /dev/null @@ -1,908 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -/** - *
- * An indication that the compliance checks in the associated ComplianceNote
- * were not satisfied for particular resources or a specified reason.
- * 
- * - * Protobuf type {@code grafeas.v1.ComplianceOccurrence} - */ -public final class ComplianceOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceOccurrence) - ComplianceOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use ComplianceOccurrence.newBuilder() to construct. - private ComplianceOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ComplianceOccurrence() { - nonCompliantFiles_ = java.util.Collections.emptyList(); - nonComplianceReason_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ComplianceOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceOccurrence.class, io.grafeas.v1.ComplianceOccurrence.Builder.class); - } - - public static final int NON_COMPLIANT_FILES_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List nonCompliantFiles_; - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - @java.lang.Override - public java.util.List getNonCompliantFilesList() { - return nonCompliantFiles_; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - @java.lang.Override - public java.util.List - getNonCompliantFilesOrBuilderList() { - return nonCompliantFiles_; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - @java.lang.Override - public int getNonCompliantFilesCount() { - return nonCompliantFiles_.size(); - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - @java.lang.Override - public io.grafeas.v1.NonCompliantFile getNonCompliantFiles(int index) { - return nonCompliantFiles_.get(index); - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - @java.lang.Override - public io.grafeas.v1.NonCompliantFileOrBuilder getNonCompliantFilesOrBuilder( - int index) { - return nonCompliantFiles_.get(index); - } - - public static final int NON_COMPLIANCE_REASON_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object nonComplianceReason_ = ""; - /** - * string non_compliance_reason = 3; - * @return The nonComplianceReason. - */ - @java.lang.Override - public java.lang.String getNonComplianceReason() { - java.lang.Object ref = nonComplianceReason_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nonComplianceReason_ = s; - return s; - } - } - /** - * string non_compliance_reason = 3; - * @return The bytes for nonComplianceReason. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNonComplianceReasonBytes() { - java.lang.Object ref = nonComplianceReason_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nonComplianceReason_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < nonCompliantFiles_.size(); i++) { - output.writeMessage(2, nonCompliantFiles_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nonComplianceReason_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nonComplianceReason_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < nonCompliantFiles_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, nonCompliantFiles_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nonComplianceReason_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nonComplianceReason_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ComplianceOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.ComplianceOccurrence other = (io.grafeas.v1.ComplianceOccurrence) obj; - - if (!getNonCompliantFilesList() - .equals(other.getNonCompliantFilesList())) return false; - if (!getNonComplianceReason() - .equals(other.getNonComplianceReason())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getNonCompliantFilesCount() > 0) { - hash = (37 * hash) + NON_COMPLIANT_FILES_FIELD_NUMBER; - hash = (53 * hash) + getNonCompliantFilesList().hashCode(); - } - hash = (37 * hash) + NON_COMPLIANCE_REASON_FIELD_NUMBER; - hash = (53 * hash) + getNonComplianceReason().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ComplianceOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An indication that the compliance checks in the associated ComplianceNote
-   * were not satisfied for particular resources or a specified reason.
-   * 
- * - * Protobuf type {@code grafeas.v1.ComplianceOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceOccurrence) - io.grafeas.v1.ComplianceOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceOccurrence.class, io.grafeas.v1.ComplianceOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.ComplianceOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (nonCompliantFilesBuilder_ == null) { - nonCompliantFiles_ = java.util.Collections.emptyList(); - } else { - nonCompliantFiles_ = null; - nonCompliantFilesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nonComplianceReason_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrence build() { - io.grafeas.v1.ComplianceOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrence buildPartial() { - io.grafeas.v1.ComplianceOccurrence result = new io.grafeas.v1.ComplianceOccurrence(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.ComplianceOccurrence result) { - if (nonCompliantFilesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - nonCompliantFiles_ = java.util.Collections.unmodifiableList(nonCompliantFiles_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.nonCompliantFiles_ = nonCompliantFiles_; - } else { - result.nonCompliantFiles_ = nonCompliantFilesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.ComplianceOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nonComplianceReason_ = nonComplianceReason_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ComplianceOccurrence) { - return mergeFrom((io.grafeas.v1.ComplianceOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ComplianceOccurrence other) { - if (other == io.grafeas.v1.ComplianceOccurrence.getDefaultInstance()) return this; - if (nonCompliantFilesBuilder_ == null) { - if (!other.nonCompliantFiles_.isEmpty()) { - if (nonCompliantFiles_.isEmpty()) { - nonCompliantFiles_ = other.nonCompliantFiles_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.addAll(other.nonCompliantFiles_); - } - onChanged(); - } - } else { - if (!other.nonCompliantFiles_.isEmpty()) { - if (nonCompliantFilesBuilder_.isEmpty()) { - nonCompliantFilesBuilder_.dispose(); - nonCompliantFilesBuilder_ = null; - nonCompliantFiles_ = other.nonCompliantFiles_; - bitField0_ = (bitField0_ & ~0x00000001); - nonCompliantFilesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNonCompliantFilesFieldBuilder() : null; - } else { - nonCompliantFilesBuilder_.addAllMessages(other.nonCompliantFiles_); - } - } - } - if (!other.getNonComplianceReason().isEmpty()) { - nonComplianceReason_ = other.nonComplianceReason_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: { - io.grafeas.v1.NonCompliantFile m = - input.readMessage( - io.grafeas.v1.NonCompliantFile.parser(), - extensionRegistry); - if (nonCompliantFilesBuilder_ == null) { - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.add(m); - } else { - nonCompliantFilesBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: { - nonComplianceReason_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List nonCompliantFiles_ = - java.util.Collections.emptyList(); - private void ensureNonCompliantFilesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - nonCompliantFiles_ = new java.util.ArrayList(nonCompliantFiles_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.NonCompliantFile, io.grafeas.v1.NonCompliantFile.Builder, io.grafeas.v1.NonCompliantFileOrBuilder> nonCompliantFilesBuilder_; - - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public java.util.List getNonCompliantFilesList() { - if (nonCompliantFilesBuilder_ == null) { - return java.util.Collections.unmodifiableList(nonCompliantFiles_); - } else { - return nonCompliantFilesBuilder_.getMessageList(); - } - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public int getNonCompliantFilesCount() { - if (nonCompliantFilesBuilder_ == null) { - return nonCompliantFiles_.size(); - } else { - return nonCompliantFilesBuilder_.getCount(); - } - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public io.grafeas.v1.NonCompliantFile getNonCompliantFiles(int index) { - if (nonCompliantFilesBuilder_ == null) { - return nonCompliantFiles_.get(index); - } else { - return nonCompliantFilesBuilder_.getMessage(index); - } - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder setNonCompliantFiles( - int index, io.grafeas.v1.NonCompliantFile value) { - if (nonCompliantFilesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.set(index, value); - onChanged(); - } else { - nonCompliantFilesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder setNonCompliantFiles( - int index, io.grafeas.v1.NonCompliantFile.Builder builderForValue) { - if (nonCompliantFilesBuilder_ == null) { - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.set(index, builderForValue.build()); - onChanged(); - } else { - nonCompliantFilesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder addNonCompliantFiles(io.grafeas.v1.NonCompliantFile value) { - if (nonCompliantFilesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.add(value); - onChanged(); - } else { - nonCompliantFilesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder addNonCompliantFiles( - int index, io.grafeas.v1.NonCompliantFile value) { - if (nonCompliantFilesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.add(index, value); - onChanged(); - } else { - nonCompliantFilesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder addNonCompliantFiles( - io.grafeas.v1.NonCompliantFile.Builder builderForValue) { - if (nonCompliantFilesBuilder_ == null) { - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.add(builderForValue.build()); - onChanged(); - } else { - nonCompliantFilesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder addNonCompliantFiles( - int index, io.grafeas.v1.NonCompliantFile.Builder builderForValue) { - if (nonCompliantFilesBuilder_ == null) { - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.add(index, builderForValue.build()); - onChanged(); - } else { - nonCompliantFilesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder addAllNonCompliantFiles( - java.lang.Iterable values) { - if (nonCompliantFilesBuilder_ == null) { - ensureNonCompliantFilesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, nonCompliantFiles_); - onChanged(); - } else { - nonCompliantFilesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder clearNonCompliantFiles() { - if (nonCompliantFilesBuilder_ == null) { - nonCompliantFiles_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - nonCompliantFilesBuilder_.clear(); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public Builder removeNonCompliantFiles(int index) { - if (nonCompliantFilesBuilder_ == null) { - ensureNonCompliantFilesIsMutable(); - nonCompliantFiles_.remove(index); - onChanged(); - } else { - nonCompliantFilesBuilder_.remove(index); - } - return this; - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public io.grafeas.v1.NonCompliantFile.Builder getNonCompliantFilesBuilder( - int index) { - return getNonCompliantFilesFieldBuilder().getBuilder(index); - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public io.grafeas.v1.NonCompliantFileOrBuilder getNonCompliantFilesOrBuilder( - int index) { - if (nonCompliantFilesBuilder_ == null) { - return nonCompliantFiles_.get(index); } else { - return nonCompliantFilesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public java.util.List - getNonCompliantFilesOrBuilderList() { - if (nonCompliantFilesBuilder_ != null) { - return nonCompliantFilesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(nonCompliantFiles_); - } - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public io.grafeas.v1.NonCompliantFile.Builder addNonCompliantFilesBuilder() { - return getNonCompliantFilesFieldBuilder().addBuilder( - io.grafeas.v1.NonCompliantFile.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public io.grafeas.v1.NonCompliantFile.Builder addNonCompliantFilesBuilder( - int index) { - return getNonCompliantFilesFieldBuilder().addBuilder( - index, io.grafeas.v1.NonCompliantFile.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - public java.util.List - getNonCompliantFilesBuilderList() { - return getNonCompliantFilesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.NonCompliantFile, io.grafeas.v1.NonCompliantFile.Builder, io.grafeas.v1.NonCompliantFileOrBuilder> - getNonCompliantFilesFieldBuilder() { - if (nonCompliantFilesBuilder_ == null) { - nonCompliantFilesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.NonCompliantFile, io.grafeas.v1.NonCompliantFile.Builder, io.grafeas.v1.NonCompliantFileOrBuilder>( - nonCompliantFiles_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - nonCompliantFiles_ = null; - } - return nonCompliantFilesBuilder_; - } - - private java.lang.Object nonComplianceReason_ = ""; - /** - * string non_compliance_reason = 3; - * @return The nonComplianceReason. - */ - public java.lang.String getNonComplianceReason() { - java.lang.Object ref = nonComplianceReason_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nonComplianceReason_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string non_compliance_reason = 3; - * @return The bytes for nonComplianceReason. - */ - public com.google.protobuf.ByteString - getNonComplianceReasonBytes() { - java.lang.Object ref = nonComplianceReason_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nonComplianceReason_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string non_compliance_reason = 3; - * @param value The nonComplianceReason to set. - * @return This builder for chaining. - */ - public Builder setNonComplianceReason( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - nonComplianceReason_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string non_compliance_reason = 3; - * @return This builder for chaining. - */ - public Builder clearNonComplianceReason() { - nonComplianceReason_ = getDefaultInstance().getNonComplianceReason(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string non_compliance_reason = 3; - * @param value The bytes for nonComplianceReason to set. - * @return This builder for chaining. - */ - public Builder setNonComplianceReasonBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - nonComplianceReason_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceOccurrence) - private static final io.grafeas.v1.ComplianceOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceOccurrence(); - } - - public static io.grafeas.v1.ComplianceOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ComplianceOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java deleted file mode 100644 index 695ccc5a7661..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceOccurrenceOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -public interface ComplianceOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - java.util.List - getNonCompliantFilesList(); - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - io.grafeas.v1.NonCompliantFile getNonCompliantFiles(int index); - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - int getNonCompliantFilesCount(); - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - java.util.List - getNonCompliantFilesOrBuilderList(); - /** - * repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - io.grafeas.v1.NonCompliantFileOrBuilder getNonCompliantFilesOrBuilder( - int index); - - /** - * string non_compliance_reason = 3; - * @return The nonComplianceReason. - */ - java.lang.String getNonComplianceReason(); - /** - * string non_compliance_reason = 3; - * @return The bytes for nonComplianceReason. - */ - com.google.protobuf.ByteString - getNonComplianceReasonBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java deleted file mode 100644 index 05e789e67a8f..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersion.java +++ /dev/null @@ -1,931 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -/** - *
- * Describes the CIS benchmark version that is applicable to a given OS and
- * os version.
- * 
- * - * Protobuf type {@code grafeas.v1.ComplianceVersion} - */ -public final class ComplianceVersion extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ComplianceVersion) - ComplianceVersionOrBuilder { -private static final long serialVersionUID = 0L; - // Use ComplianceVersion.newBuilder() to construct. - private ComplianceVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ComplianceVersion() { - cpeUri_ = ""; - benchmarkDocument_ = ""; - version_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ComplianceVersion(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceVersion.class, io.grafeas.v1.ComplianceVersion.Builder.class); - } - - public static final int CPE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object cpeUri_ = ""; - /** - *
-   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-   * applicable to.
-   * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - @java.lang.Override - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } - } - /** - *
-   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-   * applicable to.
-   * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BENCHMARK_DOCUMENT_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object benchmarkDocument_ = ""; - /** - *
-   * The name of the document that defines this benchmark, e.g. "CIS
-   * Container-Optimized OS".
-   * 
- * - * string benchmark_document = 3; - * @return The benchmarkDocument. - */ - @java.lang.Override - public java.lang.String getBenchmarkDocument() { - java.lang.Object ref = benchmarkDocument_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - benchmarkDocument_ = s; - return s; - } - } - /** - *
-   * The name of the document that defines this benchmark, e.g. "CIS
-   * Container-Optimized OS".
-   * 
- * - * string benchmark_document = 3; - * @return The bytes for benchmarkDocument. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBenchmarkDocumentBytes() { - java.lang.Object ref = benchmarkDocument_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - benchmarkDocument_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - *
-   * The version of the benchmark. This is set to the version of the OS-specific
-   * CIS document the benchmark is defined in.
-   * 
- * - * string version = 2; - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - *
-   * The version of the benchmark. This is set to the version of the OS-specific
-   * CIS document the benchmark is defined in.
-   * 
- * - * string version = 2; - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(benchmarkDocument_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, benchmarkDocument_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(benchmarkDocument_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, benchmarkDocument_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ComplianceVersion)) { - return super.equals(obj); - } - io.grafeas.v1.ComplianceVersion other = (io.grafeas.v1.ComplianceVersion) obj; - - if (!getCpeUri() - .equals(other.getCpeUri())) return false; - if (!getBenchmarkDocument() - .equals(other.getBenchmarkDocument())) return false; - if (!getVersion() - .equals(other.getVersion())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCpeUri().hashCode(); - hash = (37 * hash) + BENCHMARK_DOCUMENT_FIELD_NUMBER; - hash = (53 * hash) + getBenchmarkDocument().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ComplianceVersion parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceVersion parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceVersion parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceVersion parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceVersion parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ComplianceVersion parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ComplianceVersion parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceVersion parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceVersion parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceVersion parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ComplianceVersion parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ComplianceVersion parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ComplianceVersion prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Describes the CIS benchmark version that is applicable to a given OS and
-   * os version.
-   * 
- * - * Protobuf type {@code grafeas.v1.ComplianceVersion} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ComplianceVersion) - io.grafeas.v1.ComplianceVersionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ComplianceVersion.class, io.grafeas.v1.ComplianceVersion.Builder.class); - } - - // Construct using io.grafeas.v1.ComplianceVersion.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - cpeUri_ = ""; - benchmarkDocument_ = ""; - version_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_ComplianceVersion_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceVersion getDefaultInstanceForType() { - return io.grafeas.v1.ComplianceVersion.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ComplianceVersion build() { - io.grafeas.v1.ComplianceVersion result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceVersion buildPartial() { - io.grafeas.v1.ComplianceVersion result = new io.grafeas.v1.ComplianceVersion(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.ComplianceVersion result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.cpeUri_ = cpeUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.benchmarkDocument_ = benchmarkDocument_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.version_ = version_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ComplianceVersion) { - return mergeFrom((io.grafeas.v1.ComplianceVersion)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ComplianceVersion other) { - if (other == io.grafeas.v1.ComplianceVersion.getDefaultInstance()) return this; - if (!other.getCpeUri().isEmpty()) { - cpeUri_ = other.cpeUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getBenchmarkDocument().isEmpty()) { - benchmarkDocument_ = other.benchmarkDocument_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - cpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 18 - case 26: { - benchmarkDocument_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object cpeUri_ = ""; - /** - *
-     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-     * applicable to.
-     * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-     * applicable to.
-     * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-     * applicable to.
-     * 
- * - * string cpe_uri = 1; - * @param value The cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-     * applicable to.
-     * 
- * - * string cpe_uri = 1; - * @return This builder for chaining. - */ - public Builder clearCpeUri() { - cpeUri_ = getDefaultInstance().getCpeUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-     * applicable to.
-     * 
- * - * string cpe_uri = 1; - * @param value The bytes for cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object benchmarkDocument_ = ""; - /** - *
-     * The name of the document that defines this benchmark, e.g. "CIS
-     * Container-Optimized OS".
-     * 
- * - * string benchmark_document = 3; - * @return The benchmarkDocument. - */ - public java.lang.String getBenchmarkDocument() { - java.lang.Object ref = benchmarkDocument_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - benchmarkDocument_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the document that defines this benchmark, e.g. "CIS
-     * Container-Optimized OS".
-     * 
- * - * string benchmark_document = 3; - * @return The bytes for benchmarkDocument. - */ - public com.google.protobuf.ByteString - getBenchmarkDocumentBytes() { - java.lang.Object ref = benchmarkDocument_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - benchmarkDocument_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the document that defines this benchmark, e.g. "CIS
-     * Container-Optimized OS".
-     * 
- * - * string benchmark_document = 3; - * @param value The benchmarkDocument to set. - * @return This builder for chaining. - */ - public Builder setBenchmarkDocument( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - benchmarkDocument_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The name of the document that defines this benchmark, e.g. "CIS
-     * Container-Optimized OS".
-     * 
- * - * string benchmark_document = 3; - * @return This builder for chaining. - */ - public Builder clearBenchmarkDocument() { - benchmarkDocument_ = getDefaultInstance().getBenchmarkDocument(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The name of the document that defines this benchmark, e.g. "CIS
-     * Container-Optimized OS".
-     * 
- * - * string benchmark_document = 3; - * @param value The bytes for benchmarkDocument to set. - * @return This builder for chaining. - */ - public Builder setBenchmarkDocumentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - benchmarkDocument_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object version_ = ""; - /** - *
-     * The version of the benchmark. This is set to the version of the OS-specific
-     * CIS document the benchmark is defined in.
-     * 
- * - * string version = 2; - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The version of the benchmark. This is set to the version of the OS-specific
-     * CIS document the benchmark is defined in.
-     * 
- * - * string version = 2; - * @return The bytes for version. - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The version of the benchmark. This is set to the version of the OS-specific
-     * CIS document the benchmark is defined in.
-     * 
- * - * string version = 2; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - version_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The version of the benchmark. This is set to the version of the OS-specific
-     * CIS document the benchmark is defined in.
-     * 
- * - * string version = 2; - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The version of the benchmark. This is set to the version of the OS-specific
-     * CIS document the benchmark is defined in.
-     * 
- * - * string version = 2; - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ComplianceVersion) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ComplianceVersion) - private static final io.grafeas.v1.ComplianceVersion DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ComplianceVersion(); - } - - public static io.grafeas.v1.ComplianceVersion getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ComplianceVersion parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ComplianceVersion getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java deleted file mode 100644 index 3cdbaf8994ed..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -public interface ComplianceVersionOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ComplianceVersion) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-   * applicable to.
-   * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - java.lang.String getCpeUri(); - /** - *
-   * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
-   * applicable to.
-   * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - com.google.protobuf.ByteString - getCpeUriBytes(); - - /** - *
-   * The name of the document that defines this benchmark, e.g. "CIS
-   * Container-Optimized OS".
-   * 
- * - * string benchmark_document = 3; - * @return The benchmarkDocument. - */ - java.lang.String getBenchmarkDocument(); - /** - *
-   * The name of the document that defines this benchmark, e.g. "CIS
-   * Container-Optimized OS".
-   * 
- * - * string benchmark_document = 3; - * @return The bytes for benchmarkDocument. - */ - com.google.protobuf.ByteString - getBenchmarkDocumentBytes(); - - /** - *
-   * The version of the benchmark. This is set to the version of the OS-specific
-   * CIS document the benchmark is defined in.
-   * 
- * - * string version = 2; - * @return The version. - */ - java.lang.String getVersion(); - /** - *
-   * The version of the benchmark. This is set to the version of the OS-specific
-   * CIS document the benchmark is defined in.
-   * 
- * - * string version = 2; - * @return The bytes for version. - */ - com.google.protobuf.ByteString - getVersionBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java deleted file mode 100644 index aa37c98eeb01..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequest.java +++ /dev/null @@ -1,980 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to create a new note.
- * 
- * - * Protobuf type {@code grafeas.v1.CreateNoteRequest} - */ -public final class CreateNoteRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.CreateNoteRequest) - CreateNoteRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateNoteRequest.newBuilder() to construct. - private CreateNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateNoteRequest() { - parent_ = ""; - noteId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateNoteRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CreateNoteRequest.class, io.grafeas.v1.CreateNoteRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the note is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the note is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NOTE_ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object noteId_ = ""; - /** - *
-   * The ID to use for this note.
-   * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The noteId. - */ - @java.lang.Override - public java.lang.String getNoteId() { - java.lang.Object ref = noteId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - noteId_ = s; - return s; - } - } - /** - *
-   * The ID to use for this note.
-   * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for noteId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNoteIdBytes() { - java.lang.Object ref = noteId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - noteId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NOTE_FIELD_NUMBER = 3; - private io.grafeas.v1.Note note_; - /** - *
-   * The note to create.
-   * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the note field is set. - */ - @java.lang.Override - public boolean hasNote() { - return note_ != null; - } - /** - *
-   * The note to create.
-   * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The note. - */ - @java.lang.Override - public io.grafeas.v1.Note getNote() { - return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; - } - /** - *
-   * The note to create.
-   * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { - return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, noteId_); - } - if (note_ != null) { - output.writeMessage(3, getNote()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, noteId_); - } - if (note_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getNote()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.CreateNoteRequest)) { - return super.equals(obj); - } - io.grafeas.v1.CreateNoteRequest other = (io.grafeas.v1.CreateNoteRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getNoteId() - .equals(other.getNoteId())) return false; - if (hasNote() != other.hasNote()) return false; - if (hasNote()) { - if (!getNote() - .equals(other.getNote())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + NOTE_ID_FIELD_NUMBER; - hash = (53 * hash) + getNoteId().hashCode(); - if (hasNote()) { - hash = (37 * hash) + NOTE_FIELD_NUMBER; - hash = (53 * hash) + getNote().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.CreateNoteRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CreateNoteRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.CreateNoteRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CreateNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.CreateNoteRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to create a new note.
-   * 
- * - * Protobuf type {@code grafeas.v1.CreateNoteRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.CreateNoteRequest) - io.grafeas.v1.CreateNoteRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CreateNoteRequest.class, io.grafeas.v1.CreateNoteRequest.Builder.class); - } - - // Construct using io.grafeas.v1.CreateNoteRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - noteId_ = ""; - note_ = null; - if (noteBuilder_ != null) { - noteBuilder_.dispose(); - noteBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateNoteRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.CreateNoteRequest getDefaultInstanceForType() { - return io.grafeas.v1.CreateNoteRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.CreateNoteRequest build() { - io.grafeas.v1.CreateNoteRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.CreateNoteRequest buildPartial() { - io.grafeas.v1.CreateNoteRequest result = new io.grafeas.v1.CreateNoteRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.CreateNoteRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.noteId_ = noteId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.note_ = noteBuilder_ == null - ? note_ - : noteBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.CreateNoteRequest) { - return mergeFrom((io.grafeas.v1.CreateNoteRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.CreateNoteRequest other) { - if (other == io.grafeas.v1.CreateNoteRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getNoteId().isEmpty()) { - noteId_ = other.noteId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasNote()) { - mergeNote(other.getNote()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - noteId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getNoteFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the note is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the note is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the note is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the note is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the note is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object noteId_ = ""; - /** - *
-     * The ID to use for this note.
-     * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The noteId. - */ - public java.lang.String getNoteId() { - java.lang.Object ref = noteId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - noteId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The ID to use for this note.
-     * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for noteId. - */ - public com.google.protobuf.ByteString - getNoteIdBytes() { - java.lang.Object ref = noteId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - noteId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The ID to use for this note.
-     * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The noteId to set. - * @return This builder for chaining. - */ - public Builder setNoteId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - noteId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The ID to use for this note.
-     * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearNoteId() { - noteId_ = getDefaultInstance().getNoteId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The ID to use for this note.
-     * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for noteId to set. - * @return This builder for chaining. - */ - public Builder setNoteIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - noteId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private io.grafeas.v1.Note note_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> noteBuilder_; - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the note field is set. - */ - public boolean hasNote() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The note. - */ - public io.grafeas.v1.Note getNote() { - if (noteBuilder_ == null) { - return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; - } else { - return noteBuilder_.getMessage(); - } - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setNote(io.grafeas.v1.Note value) { - if (noteBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - note_ = value; - } else { - noteBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setNote( - io.grafeas.v1.Note.Builder builderForValue) { - if (noteBuilder_ == null) { - note_ = builderForValue.build(); - } else { - noteBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeNote(io.grafeas.v1.Note value) { - if (noteBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - note_ != null && - note_ != io.grafeas.v1.Note.getDefaultInstance()) { - getNoteBuilder().mergeFrom(value); - } else { - note_ = value; - } - } else { - noteBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearNote() { - bitField0_ = (bitField0_ & ~0x00000004); - note_ = null; - if (noteBuilder_ != null) { - noteBuilder_.dispose(); - noteBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Note.Builder getNoteBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getNoteFieldBuilder().getBuilder(); - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { - if (noteBuilder_ != null) { - return noteBuilder_.getMessageOrBuilder(); - } else { - return note_ == null ? - io.grafeas.v1.Note.getDefaultInstance() : note_; - } - } - /** - *
-     * The note to create.
-     * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> - getNoteFieldBuilder() { - if (noteBuilder_ == null) { - noteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( - getNote(), - getParentForChildren(), - isClean()); - note_ = null; - } - return noteBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.CreateNoteRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.CreateNoteRequest) - private static final io.grafeas.v1.CreateNoteRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.CreateNoteRequest(); - } - - public static io.grafeas.v1.CreateNoteRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateNoteRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.CreateNoteRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java deleted file mode 100644 index e5c14a7948a8..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface CreateNoteRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.CreateNoteRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the note is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the note is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The ID to use for this note.
-   * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The noteId. - */ - java.lang.String getNoteId(); - /** - *
-   * The ID to use for this note.
-   * 
- * - * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for noteId. - */ - com.google.protobuf.ByteString - getNoteIdBytes(); - - /** - *
-   * The note to create.
-   * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the note field is set. - */ - boolean hasNote(); - /** - *
-   * The note to create.
-   * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The note. - */ - io.grafeas.v1.Note getNote(); - /** - *
-   * The note to create.
-   * 
- * - * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - io.grafeas.v1.NoteOrBuilder getNoteOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java deleted file mode 100644 index 0748ea7f5513..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java +++ /dev/null @@ -1,816 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to create a new occurrence.
- * 
- * - * Protobuf type {@code grafeas.v1.CreateOccurrenceRequest} - */ -public final class CreateOccurrenceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.CreateOccurrenceRequest) - CreateOccurrenceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateOccurrenceRequest.newBuilder() to construct. - private CreateOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateOccurrenceRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateOccurrenceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CreateOccurrenceRequest.class, io.grafeas.v1.CreateOccurrenceRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrence is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrence is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OCCURRENCE_FIELD_NUMBER = 2; - private io.grafeas.v1.Occurrence occurrence_; - /** - *
-   * The occurrence to create.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the occurrence field is set. - */ - @java.lang.Override - public boolean hasOccurrence() { - return occurrence_ != null; - } - /** - *
-   * The occurrence to create.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The occurrence. - */ - @java.lang.Override - public io.grafeas.v1.Occurrence getOccurrence() { - return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } - /** - *
-   * The occurrence to create.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { - return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (occurrence_ != null) { - output.writeMessage(2, getOccurrence()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (occurrence_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getOccurrence()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.CreateOccurrenceRequest)) { - return super.equals(obj); - } - io.grafeas.v1.CreateOccurrenceRequest other = (io.grafeas.v1.CreateOccurrenceRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasOccurrence() != other.hasOccurrence()) return false; - if (hasOccurrence()) { - if (!getOccurrence() - .equals(other.getOccurrence())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasOccurrence()) { - hash = (37 * hash) + OCCURRENCE_FIELD_NUMBER; - hash = (53 * hash) + getOccurrence().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.CreateOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.CreateOccurrenceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to create a new occurrence.
-   * 
- * - * Protobuf type {@code grafeas.v1.CreateOccurrenceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.CreateOccurrenceRequest) - io.grafeas.v1.CreateOccurrenceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.CreateOccurrenceRequest.class, io.grafeas.v1.CreateOccurrenceRequest.Builder.class); - } - - // Construct using io.grafeas.v1.CreateOccurrenceRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - occurrence_ = null; - if (occurrenceBuilder_ != null) { - occurrenceBuilder_.dispose(); - occurrenceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.CreateOccurrenceRequest getDefaultInstanceForType() { - return io.grafeas.v1.CreateOccurrenceRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.CreateOccurrenceRequest build() { - io.grafeas.v1.CreateOccurrenceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.CreateOccurrenceRequest buildPartial() { - io.grafeas.v1.CreateOccurrenceRequest result = new io.grafeas.v1.CreateOccurrenceRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.CreateOccurrenceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.occurrence_ = occurrenceBuilder_ == null - ? occurrence_ - : occurrenceBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.CreateOccurrenceRequest) { - return mergeFrom((io.grafeas.v1.CreateOccurrenceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.CreateOccurrenceRequest other) { - if (other == io.grafeas.v1.CreateOccurrenceRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasOccurrence()) { - mergeOccurrence(other.getOccurrence()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getOccurrenceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrence is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrence is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrence is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrence is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-     * the occurrence is to be created.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.grafeas.v1.Occurrence occurrence_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrenceBuilder_; - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the occurrence field is set. - */ - public boolean hasOccurrence() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The occurrence. - */ - public io.grafeas.v1.Occurrence getOccurrence() { - if (occurrenceBuilder_ == null) { - return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } else { - return occurrenceBuilder_.getMessage(); - } - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOccurrence(io.grafeas.v1.Occurrence value) { - if (occurrenceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - occurrence_ = value; - } else { - occurrenceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOccurrence( - io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrenceBuilder_ == null) { - occurrence_ = builderForValue.build(); - } else { - occurrenceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeOccurrence(io.grafeas.v1.Occurrence value) { - if (occurrenceBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - occurrence_ != null && - occurrence_ != io.grafeas.v1.Occurrence.getDefaultInstance()) { - getOccurrenceBuilder().mergeFrom(value); - } else { - occurrence_ = value; - } - } else { - occurrenceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearOccurrence() { - bitField0_ = (bitField0_ & ~0x00000002); - occurrence_ = null; - if (occurrenceBuilder_ != null) { - occurrenceBuilder_.dispose(); - occurrenceBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Occurrence.Builder getOccurrenceBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getOccurrenceFieldBuilder().getBuilder(); - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { - if (occurrenceBuilder_ != null) { - return occurrenceBuilder_.getMessageOrBuilder(); - } else { - return occurrence_ == null ? - io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } - } - /** - *
-     * The occurrence to create.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> - getOccurrenceFieldBuilder() { - if (occurrenceBuilder_ == null) { - occurrenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( - getOccurrence(), - getParentForChildren(), - isClean()); - occurrence_ = null; - } - return occurrenceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.CreateOccurrenceRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.CreateOccurrenceRequest) - private static final io.grafeas.v1.CreateOccurrenceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.CreateOccurrenceRequest(); - } - - public static io.grafeas.v1.CreateOccurrenceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateOccurrenceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.CreateOccurrenceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java deleted file mode 100644 index 6e3a891dbb49..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface CreateOccurrenceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.CreateOccurrenceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrence is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The name of the project in the form of `projects/[PROJECT_ID]`, under which
-   * the occurrence is to be created.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The occurrence to create.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the occurrence field is set. - */ - boolean hasOccurrence(); - /** - *
-   * The occurrence to create.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The occurrence. - */ - io.grafeas.v1.Occurrence getOccurrence(); - /** - *
-   * The occurrence to create.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java deleted file mode 100644 index f8cbe4710cbd..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNote.java +++ /dev/null @@ -1,1257 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/dsse_attestation.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.DSSEAttestationNote} - */ -public final class DSSEAttestationNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DSSEAttestationNote) - DSSEAttestationNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use DSSEAttestationNote.newBuilder() to construct. - private DSSEAttestationNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DSSEAttestationNote() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DSSEAttestationNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DSSEAttestationNote.class, io.grafeas.v1.DSSEAttestationNote.Builder.class); - } - - public interface DSSEHintOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DSSEAttestationNote.DSSEHint) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "cloudbuild-prod".
-     * 
- * - * string human_readable_name = 1; - * @return The humanReadableName. - */ - java.lang.String getHumanReadableName(); - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "cloudbuild-prod".
-     * 
- * - * string human_readable_name = 1; - * @return The bytes for humanReadableName. - */ - com.google.protobuf.ByteString - getHumanReadableNameBytes(); - } - /** - *
-   * This submessage provides human-readable hints about the purpose of the
-   * authority. Because the name of a note acts as its resource reference, it is
-   * important to disambiguate the canonical name of the Note (which might be a
-   * UUID for security purposes) from "readable" names more suitable for debug
-   * output. Note that these hints should not be used to look up authorities in
-   * security sensitive contexts, such as when looking up attestations to
-   * verify.
-   * 
- * - * Protobuf type {@code grafeas.v1.DSSEAttestationNote.DSSEHint} - */ - public static final class DSSEHint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DSSEAttestationNote.DSSEHint) - DSSEHintOrBuilder { - private static final long serialVersionUID = 0L; - // Use DSSEHint.newBuilder() to construct. - private DSSEHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DSSEHint() { - humanReadableName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DSSEHint(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DSSEAttestationNote.DSSEHint.class, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder.class); - } - - public static final int HUMAN_READABLE_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object humanReadableName_ = ""; - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "cloudbuild-prod".
-     * 
- * - * string human_readable_name = 1; - * @return The humanReadableName. - */ - @java.lang.Override - public java.lang.String getHumanReadableName() { - java.lang.Object ref = humanReadableName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - humanReadableName_ = s; - return s; - } - } - /** - *
-     * Required. The human readable name of this attestation authority, for
-     * example "cloudbuild-prod".
-     * 
- * - * string human_readable_name = 1; - * @return The bytes for humanReadableName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getHumanReadableNameBytes() { - java.lang.Object ref = humanReadableName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - humanReadableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, humanReadableName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(humanReadableName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, humanReadableName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DSSEAttestationNote.DSSEHint)) { - return super.equals(obj); - } - io.grafeas.v1.DSSEAttestationNote.DSSEHint other = (io.grafeas.v1.DSSEAttestationNote.DSSEHint) obj; - - if (!getHumanReadableName() - .equals(other.getHumanReadableName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HUMAN_READABLE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getHumanReadableName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DSSEAttestationNote.DSSEHint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * This submessage provides human-readable hints about the purpose of the
-     * authority. Because the name of a note acts as its resource reference, it is
-     * important to disambiguate the canonical name of the Note (which might be a
-     * UUID for security purposes) from "readable" names more suitable for debug
-     * output. Note that these hints should not be used to look up authorities in
-     * security sensitive contexts, such as when looking up attestations to
-     * verify.
-     * 
- * - * Protobuf type {@code grafeas.v1.DSSEAttestationNote.DSSEHint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DSSEAttestationNote.DSSEHint) - io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DSSEAttestationNote.DSSEHint.class, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder.class); - } - - // Construct using io.grafeas.v1.DSSEAttestationNote.DSSEHint.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - humanReadableName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote.DSSEHint getDefaultInstanceForType() { - return io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote.DSSEHint build() { - io.grafeas.v1.DSSEAttestationNote.DSSEHint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote.DSSEHint buildPartial() { - io.grafeas.v1.DSSEAttestationNote.DSSEHint result = new io.grafeas.v1.DSSEAttestationNote.DSSEHint(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.DSSEAttestationNote.DSSEHint result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.humanReadableName_ = humanReadableName_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DSSEAttestationNote.DSSEHint) { - return mergeFrom((io.grafeas.v1.DSSEAttestationNote.DSSEHint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DSSEAttestationNote.DSSEHint other) { - if (other == io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance()) return this; - if (!other.getHumanReadableName().isEmpty()) { - humanReadableName_ = other.humanReadableName_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - humanReadableName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object humanReadableName_ = ""; - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "cloudbuild-prod".
-       * 
- * - * string human_readable_name = 1; - * @return The humanReadableName. - */ - public java.lang.String getHumanReadableName() { - java.lang.Object ref = humanReadableName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - humanReadableName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "cloudbuild-prod".
-       * 
- * - * string human_readable_name = 1; - * @return The bytes for humanReadableName. - */ - public com.google.protobuf.ByteString - getHumanReadableNameBytes() { - java.lang.Object ref = humanReadableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - humanReadableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "cloudbuild-prod".
-       * 
- * - * string human_readable_name = 1; - * @param value The humanReadableName to set. - * @return This builder for chaining. - */ - public Builder setHumanReadableName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - humanReadableName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "cloudbuild-prod".
-       * 
- * - * string human_readable_name = 1; - * @return This builder for chaining. - */ - public Builder clearHumanReadableName() { - humanReadableName_ = getDefaultInstance().getHumanReadableName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * Required. The human readable name of this attestation authority, for
-       * example "cloudbuild-prod".
-       * 
- * - * string human_readable_name = 1; - * @param value The bytes for humanReadableName to set. - * @return This builder for chaining. - */ - public Builder setHumanReadableNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - humanReadableName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DSSEAttestationNote.DSSEHint) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DSSEAttestationNote.DSSEHint) - private static final io.grafeas.v1.DSSEAttestationNote.DSSEHint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DSSEAttestationNote.DSSEHint(); - } - - public static io.grafeas.v1.DSSEAttestationNote.DSSEHint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DSSEHint parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote.DSSEHint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int HINT_FIELD_NUMBER = 1; - private io.grafeas.v1.DSSEAttestationNote.DSSEHint hint_; - /** - *
-   * DSSEHint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @return Whether the hint field is set. - */ - @java.lang.Override - public boolean hasHint() { - return hint_ != null; - } - /** - *
-   * DSSEHint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @return The hint. - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote.DSSEHint getHint() { - return hint_ == null ? io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; - } - /** - *
-   * DSSEHint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder getHintOrBuilder() { - return hint_ == null ? io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (hint_ != null) { - output.writeMessage(1, getHint()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (hint_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getHint()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DSSEAttestationNote)) { - return super.equals(obj); - } - io.grafeas.v1.DSSEAttestationNote other = (io.grafeas.v1.DSSEAttestationNote) obj; - - if (hasHint() != other.hasHint()) return false; - if (hasHint()) { - if (!getHint() - .equals(other.getHint())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasHint()) { - hash = (37 * hash) + HINT_FIELD_NUMBER; - hash = (53 * hash) + getHint().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DSSEAttestationNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.DSSEAttestationNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DSSEAttestationNote) - io.grafeas.v1.DSSEAttestationNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DSSEAttestationNote.class, io.grafeas.v1.DSSEAttestationNote.Builder.class); - } - - // Construct using io.grafeas.v1.DSSEAttestationNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - hint_ = null; - if (hintBuilder_ != null) { - hintBuilder_.dispose(); - hintBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote getDefaultInstanceForType() { - return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote build() { - io.grafeas.v1.DSSEAttestationNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote buildPartial() { - io.grafeas.v1.DSSEAttestationNote result = new io.grafeas.v1.DSSEAttestationNote(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.DSSEAttestationNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.hint_ = hintBuilder_ == null - ? hint_ - : hintBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DSSEAttestationNote) { - return mergeFrom((io.grafeas.v1.DSSEAttestationNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DSSEAttestationNote other) { - if (other == io.grafeas.v1.DSSEAttestationNote.getDefaultInstance()) return this; - if (other.hasHint()) { - mergeHint(other.getHint()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getHintFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.DSSEAttestationNote.DSSEHint hint_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationNote.DSSEHint, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder, io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder> hintBuilder_; - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @return Whether the hint field is set. - */ - public boolean hasHint() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @return The hint. - */ - public io.grafeas.v1.DSSEAttestationNote.DSSEHint getHint() { - if (hintBuilder_ == null) { - return hint_ == null ? io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; - } else { - return hintBuilder_.getMessage(); - } - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - public Builder setHint(io.grafeas.v1.DSSEAttestationNote.DSSEHint value) { - if (hintBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hint_ = value; - } else { - hintBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - public Builder setHint( - io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder builderForValue) { - if (hintBuilder_ == null) { - hint_ = builderForValue.build(); - } else { - hintBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - public Builder mergeHint(io.grafeas.v1.DSSEAttestationNote.DSSEHint value) { - if (hintBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - hint_ != null && - hint_ != io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance()) { - getHintBuilder().mergeFrom(value); - } else { - hint_ = value; - } - } else { - hintBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - public Builder clearHint() { - bitField0_ = (bitField0_ & ~0x00000001); - hint_ = null; - if (hintBuilder_ != null) { - hintBuilder_.dispose(); - hintBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - public io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder getHintBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getHintFieldBuilder().getBuilder(); - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - public io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder getHintOrBuilder() { - if (hintBuilder_ != null) { - return hintBuilder_.getMessageOrBuilder(); - } else { - return hint_ == null ? - io.grafeas.v1.DSSEAttestationNote.DSSEHint.getDefaultInstance() : hint_; - } - } - /** - *
-     * DSSEHint hints at the purpose of the attestation authority.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationNote.DSSEHint, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder, io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder> - getHintFieldBuilder() { - if (hintBuilder_ == null) { - hintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationNote.DSSEHint, io.grafeas.v1.DSSEAttestationNote.DSSEHint.Builder, io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder>( - getHint(), - getParentForChildren(), - isClean()); - hint_ = null; - } - return hintBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DSSEAttestationNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DSSEAttestationNote) - private static final io.grafeas.v1.DSSEAttestationNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DSSEAttestationNote(); - } - - public static io.grafeas.v1.DSSEAttestationNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DSSEAttestationNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java deleted file mode 100644 index a117798b32fc..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationNoteOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/dsse_attestation.proto - -package io.grafeas.v1; - -public interface DSSEAttestationNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DSSEAttestationNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * DSSEHint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @return Whether the hint field is set. - */ - boolean hasHint(); - /** - *
-   * DSSEHint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @return The hint. - */ - io.grafeas.v1.DSSEAttestationNote.DSSEHint getHint(); - /** - *
-   * DSSEHint hints at the purpose of the attestation authority.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - io.grafeas.v1.DSSEAttestationNote.DSSEHintOrBuilder getHintOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java deleted file mode 100644 index 4228d6b0b59c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrence.java +++ /dev/null @@ -1,941 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/dsse_attestation.proto - -package io.grafeas.v1; - -/** - *
- * Deprecated. Prefer to use a regular Occurrence, and populate the
- * Envelope at the top level of the Occurrence.
- * 
- * - * Protobuf type {@code grafeas.v1.DSSEAttestationOccurrence} - */ -public final class DSSEAttestationOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DSSEAttestationOccurrence) - DSSEAttestationOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use DSSEAttestationOccurrence.newBuilder() to construct. - private DSSEAttestationOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DSSEAttestationOccurrence() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DSSEAttestationOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DSSEAttestationOccurrence.class, io.grafeas.v1.DSSEAttestationOccurrence.Builder.class); - } - - private int decodedPayloadCase_ = 0; - private java.lang.Object decodedPayload_; - public enum DecodedPayloadCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - STATEMENT(2), - DECODEDPAYLOAD_NOT_SET(0); - private final int value; - private DecodedPayloadCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DecodedPayloadCase valueOf(int value) { - return forNumber(value); - } - - public static DecodedPayloadCase forNumber(int value) { - switch (value) { - case 2: return STATEMENT; - case 0: return DECODEDPAYLOAD_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public DecodedPayloadCase - getDecodedPayloadCase() { - return DecodedPayloadCase.forNumber( - decodedPayloadCase_); - } - - public static final int ENVELOPE_FIELD_NUMBER = 1; - private io.grafeas.v1.Envelope envelope_; - /** - *
-   * If doing something security critical, make sure to verify the signatures in
-   * this metadata.
-   * 
- * - * .grafeas.v1.Envelope envelope = 1; - * @return Whether the envelope field is set. - */ - @java.lang.Override - public boolean hasEnvelope() { - return envelope_ != null; - } - /** - *
-   * If doing something security critical, make sure to verify the signatures in
-   * this metadata.
-   * 
- * - * .grafeas.v1.Envelope envelope = 1; - * @return The envelope. - */ - @java.lang.Override - public io.grafeas.v1.Envelope getEnvelope() { - return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } - /** - *
-   * If doing something security critical, make sure to verify the signatures in
-   * this metadata.
-   * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - @java.lang.Override - public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { - return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } - - public static final int STATEMENT_FIELD_NUMBER = 2; - /** - * .grafeas.v1.InTotoStatement statement = 2; - * @return Whether the statement field is set. - */ - @java.lang.Override - public boolean hasStatement() { - return decodedPayloadCase_ == 2; - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - * @return The statement. - */ - @java.lang.Override - public io.grafeas.v1.InTotoStatement getStatement() { - if (decodedPayloadCase_ == 2) { - return (io.grafeas.v1.InTotoStatement) decodedPayload_; - } - return io.grafeas.v1.InTotoStatement.getDefaultInstance(); - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - @java.lang.Override - public io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder() { - if (decodedPayloadCase_ == 2) { - return (io.grafeas.v1.InTotoStatement) decodedPayload_; - } - return io.grafeas.v1.InTotoStatement.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (envelope_ != null) { - output.writeMessage(1, getEnvelope()); - } - if (decodedPayloadCase_ == 2) { - output.writeMessage(2, (io.grafeas.v1.InTotoStatement) decodedPayload_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (envelope_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEnvelope()); - } - if (decodedPayloadCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (io.grafeas.v1.InTotoStatement) decodedPayload_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DSSEAttestationOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.DSSEAttestationOccurrence other = (io.grafeas.v1.DSSEAttestationOccurrence) obj; - - if (hasEnvelope() != other.hasEnvelope()) return false; - if (hasEnvelope()) { - if (!getEnvelope() - .equals(other.getEnvelope())) return false; - } - if (!getDecodedPayloadCase().equals(other.getDecodedPayloadCase())) return false; - switch (decodedPayloadCase_) { - case 2: - if (!getStatement() - .equals(other.getStatement())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEnvelope()) { - hash = (37 * hash) + ENVELOPE_FIELD_NUMBER; - hash = (53 * hash) + getEnvelope().hashCode(); - } - switch (decodedPayloadCase_) { - case 2: - hash = (37 * hash) + STATEMENT_FIELD_NUMBER; - hash = (53 * hash) + getStatement().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DSSEAttestationOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Deprecated. Prefer to use a regular Occurrence, and populate the
-   * Envelope at the top level of the Occurrence.
-   * 
- * - * Protobuf type {@code grafeas.v1.DSSEAttestationOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DSSEAttestationOccurrence) - io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DSSEAttestationOccurrence.class, io.grafeas.v1.DSSEAttestationOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.DSSEAttestationOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - envelope_ = null; - if (envelopeBuilder_ != null) { - envelopeBuilder_.dispose(); - envelopeBuilder_ = null; - } - if (statementBuilder_ != null) { - statementBuilder_.clear(); - } - decodedPayloadCase_ = 0; - decodedPayload_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.DsseAttestation.internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrence build() { - io.grafeas.v1.DSSEAttestationOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrence buildPartial() { - io.grafeas.v1.DSSEAttestationOccurrence result = new io.grafeas.v1.DSSEAttestationOccurrence(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.DSSEAttestationOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.envelope_ = envelopeBuilder_ == null - ? envelope_ - : envelopeBuilder_.build(); - } - } - - private void buildPartialOneofs(io.grafeas.v1.DSSEAttestationOccurrence result) { - result.decodedPayloadCase_ = decodedPayloadCase_; - result.decodedPayload_ = this.decodedPayload_; - if (decodedPayloadCase_ == 2 && - statementBuilder_ != null) { - result.decodedPayload_ = statementBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DSSEAttestationOccurrence) { - return mergeFrom((io.grafeas.v1.DSSEAttestationOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DSSEAttestationOccurrence other) { - if (other == io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance()) return this; - if (other.hasEnvelope()) { - mergeEnvelope(other.getEnvelope()); - } - switch (other.getDecodedPayloadCase()) { - case STATEMENT: { - mergeStatement(other.getStatement()); - break; - } - case DECODEDPAYLOAD_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getEnvelopeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getStatementFieldBuilder().getBuilder(), - extensionRegistry); - decodedPayloadCase_ = 2; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int decodedPayloadCase_ = 0; - private java.lang.Object decodedPayload_; - public DecodedPayloadCase - getDecodedPayloadCase() { - return DecodedPayloadCase.forNumber( - decodedPayloadCase_); - } - - public Builder clearDecodedPayload() { - decodedPayloadCase_ = 0; - decodedPayload_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private io.grafeas.v1.Envelope envelope_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> envelopeBuilder_; - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - * @return Whether the envelope field is set. - */ - public boolean hasEnvelope() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - * @return The envelope. - */ - public io.grafeas.v1.Envelope getEnvelope() { - if (envelopeBuilder_ == null) { - return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } else { - return envelopeBuilder_.getMessage(); - } - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - public Builder setEnvelope(io.grafeas.v1.Envelope value) { - if (envelopeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - envelope_ = value; - } else { - envelopeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - public Builder setEnvelope( - io.grafeas.v1.Envelope.Builder builderForValue) { - if (envelopeBuilder_ == null) { - envelope_ = builderForValue.build(); - } else { - envelopeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - public Builder mergeEnvelope(io.grafeas.v1.Envelope value) { - if (envelopeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - envelope_ != null && - envelope_ != io.grafeas.v1.Envelope.getDefaultInstance()) { - getEnvelopeBuilder().mergeFrom(value); - } else { - envelope_ = value; - } - } else { - envelopeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - public Builder clearEnvelope() { - bitField0_ = (bitField0_ & ~0x00000001); - envelope_ = null; - if (envelopeBuilder_ != null) { - envelopeBuilder_.dispose(); - envelopeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - public io.grafeas.v1.Envelope.Builder getEnvelopeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getEnvelopeFieldBuilder().getBuilder(); - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { - if (envelopeBuilder_ != null) { - return envelopeBuilder_.getMessageOrBuilder(); - } else { - return envelope_ == null ? - io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } - } - /** - *
-     * If doing something security critical, make sure to verify the signatures in
-     * this metadata.
-     * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> - getEnvelopeFieldBuilder() { - if (envelopeBuilder_ == null) { - envelopeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder>( - getEnvelope(), - getParentForChildren(), - isClean()); - envelope_ = null; - } - return envelopeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> statementBuilder_; - /** - * .grafeas.v1.InTotoStatement statement = 2; - * @return Whether the statement field is set. - */ - @java.lang.Override - public boolean hasStatement() { - return decodedPayloadCase_ == 2; - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - * @return The statement. - */ - @java.lang.Override - public io.grafeas.v1.InTotoStatement getStatement() { - if (statementBuilder_ == null) { - if (decodedPayloadCase_ == 2) { - return (io.grafeas.v1.InTotoStatement) decodedPayload_; - } - return io.grafeas.v1.InTotoStatement.getDefaultInstance(); - } else { - if (decodedPayloadCase_ == 2) { - return statementBuilder_.getMessage(); - } - return io.grafeas.v1.InTotoStatement.getDefaultInstance(); - } - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - public Builder setStatement(io.grafeas.v1.InTotoStatement value) { - if (statementBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - decodedPayload_ = value; - onChanged(); - } else { - statementBuilder_.setMessage(value); - } - decodedPayloadCase_ = 2; - return this; - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - public Builder setStatement( - io.grafeas.v1.InTotoStatement.Builder builderForValue) { - if (statementBuilder_ == null) { - decodedPayload_ = builderForValue.build(); - onChanged(); - } else { - statementBuilder_.setMessage(builderForValue.build()); - } - decodedPayloadCase_ = 2; - return this; - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - public Builder mergeStatement(io.grafeas.v1.InTotoStatement value) { - if (statementBuilder_ == null) { - if (decodedPayloadCase_ == 2 && - decodedPayload_ != io.grafeas.v1.InTotoStatement.getDefaultInstance()) { - decodedPayload_ = io.grafeas.v1.InTotoStatement.newBuilder((io.grafeas.v1.InTotoStatement) decodedPayload_) - .mergeFrom(value).buildPartial(); - } else { - decodedPayload_ = value; - } - onChanged(); - } else { - if (decodedPayloadCase_ == 2) { - statementBuilder_.mergeFrom(value); - } else { - statementBuilder_.setMessage(value); - } - } - decodedPayloadCase_ = 2; - return this; - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - public Builder clearStatement() { - if (statementBuilder_ == null) { - if (decodedPayloadCase_ == 2) { - decodedPayloadCase_ = 0; - decodedPayload_ = null; - onChanged(); - } - } else { - if (decodedPayloadCase_ == 2) { - decodedPayloadCase_ = 0; - decodedPayload_ = null; - } - statementBuilder_.clear(); - } - return this; - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - public io.grafeas.v1.InTotoStatement.Builder getStatementBuilder() { - return getStatementFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - @java.lang.Override - public io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder() { - if ((decodedPayloadCase_ == 2) && (statementBuilder_ != null)) { - return statementBuilder_.getMessageOrBuilder(); - } else { - if (decodedPayloadCase_ == 2) { - return (io.grafeas.v1.InTotoStatement) decodedPayload_; - } - return io.grafeas.v1.InTotoStatement.getDefaultInstance(); - } - } - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> - getStatementFieldBuilder() { - if (statementBuilder_ == null) { - if (!(decodedPayloadCase_ == 2)) { - decodedPayload_ = io.grafeas.v1.InTotoStatement.getDefaultInstance(); - } - statementBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder>( - (io.grafeas.v1.InTotoStatement) decodedPayload_, - getParentForChildren(), - isClean()); - decodedPayload_ = null; - } - decodedPayloadCase_ = 2; - onChanged(); - return statementBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DSSEAttestationOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DSSEAttestationOccurrence) - private static final io.grafeas.v1.DSSEAttestationOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DSSEAttestationOccurrence(); - } - - public static io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DSSEAttestationOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java deleted file mode 100644 index 0ef0cb2ac550..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DSSEAttestationOccurrenceOrBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/dsse_attestation.proto - -package io.grafeas.v1; - -public interface DSSEAttestationOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DSSEAttestationOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If doing something security critical, make sure to verify the signatures in
-   * this metadata.
-   * 
- * - * .grafeas.v1.Envelope envelope = 1; - * @return Whether the envelope field is set. - */ - boolean hasEnvelope(); - /** - *
-   * If doing something security critical, make sure to verify the signatures in
-   * this metadata.
-   * 
- * - * .grafeas.v1.Envelope envelope = 1; - * @return The envelope. - */ - io.grafeas.v1.Envelope getEnvelope(); - /** - *
-   * If doing something security critical, make sure to verify the signatures in
-   * this metadata.
-   * 
- * - * .grafeas.v1.Envelope envelope = 1; - */ - io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder(); - - /** - * .grafeas.v1.InTotoStatement statement = 2; - * @return Whether the statement field is set. - */ - boolean hasStatement(); - /** - * .grafeas.v1.InTotoStatement statement = 2; - * @return The statement. - */ - io.grafeas.v1.InTotoStatement getStatement(); - /** - * .grafeas.v1.InTotoStatement statement = 2; - */ - io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder(); - - public io.grafeas.v1.DSSEAttestationOccurrence.DecodedPayloadCase getDecodedPayloadCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java deleted file mode 100644 index 0436291b80b9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequest.java +++ /dev/null @@ -1,587 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to delete a note.
- * 
- * - * Protobuf type {@code grafeas.v1.DeleteNoteRequest} - */ -public final class DeleteNoteRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DeleteNoteRequest) - DeleteNoteRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteNoteRequest.newBuilder() to construct. - private DeleteNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteNoteRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteNoteRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeleteNoteRequest.class, io.grafeas.v1.DeleteNoteRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DeleteNoteRequest)) { - return super.equals(obj); - } - io.grafeas.v1.DeleteNoteRequest other = (io.grafeas.v1.DeleteNoteRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeleteNoteRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeleteNoteRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeleteNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DeleteNoteRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to delete a note.
-   * 
- * - * Protobuf type {@code grafeas.v1.DeleteNoteRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DeleteNoteRequest) - io.grafeas.v1.DeleteNoteRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeleteNoteRequest.class, io.grafeas.v1.DeleteNoteRequest.Builder.class); - } - - // Construct using io.grafeas.v1.DeleteNoteRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteNoteRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DeleteNoteRequest getDefaultInstanceForType() { - return io.grafeas.v1.DeleteNoteRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DeleteNoteRequest build() { - io.grafeas.v1.DeleteNoteRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DeleteNoteRequest buildPartial() { - io.grafeas.v1.DeleteNoteRequest result = new io.grafeas.v1.DeleteNoteRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.DeleteNoteRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DeleteNoteRequest) { - return mergeFrom((io.grafeas.v1.DeleteNoteRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DeleteNoteRequest other) { - if (other == io.grafeas.v1.DeleteNoteRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DeleteNoteRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DeleteNoteRequest) - private static final io.grafeas.v1.DeleteNoteRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DeleteNoteRequest(); - } - - public static io.grafeas.v1.DeleteNoteRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteNoteRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DeleteNoteRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java deleted file mode 100644 index f7cdc3fd761a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface DeleteNoteRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DeleteNoteRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java deleted file mode 100644 index cf4d61bfad6e..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java +++ /dev/null @@ -1,587 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to delete an occurrence.
- * 
- * - * Protobuf type {@code grafeas.v1.DeleteOccurrenceRequest} - */ -public final class DeleteOccurrenceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DeleteOccurrenceRequest) - DeleteOccurrenceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteOccurrenceRequest.newBuilder() to construct. - private DeleteOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteOccurrenceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteOccurrenceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeleteOccurrenceRequest.class, io.grafeas.v1.DeleteOccurrenceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DeleteOccurrenceRequest)) { - return super.equals(obj); - } - io.grafeas.v1.DeleteOccurrenceRequest other = (io.grafeas.v1.DeleteOccurrenceRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeleteOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DeleteOccurrenceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to delete an occurrence.
-   * 
- * - * Protobuf type {@code grafeas.v1.DeleteOccurrenceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DeleteOccurrenceRequest) - io.grafeas.v1.DeleteOccurrenceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeleteOccurrenceRequest.class, io.grafeas.v1.DeleteOccurrenceRequest.Builder.class); - } - - // Construct using io.grafeas.v1.DeleteOccurrenceRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DeleteOccurrenceRequest getDefaultInstanceForType() { - return io.grafeas.v1.DeleteOccurrenceRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DeleteOccurrenceRequest build() { - io.grafeas.v1.DeleteOccurrenceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DeleteOccurrenceRequest buildPartial() { - io.grafeas.v1.DeleteOccurrenceRequest result = new io.grafeas.v1.DeleteOccurrenceRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.DeleteOccurrenceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DeleteOccurrenceRequest) { - return mergeFrom((io.grafeas.v1.DeleteOccurrenceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DeleteOccurrenceRequest other) { - if (other == io.grafeas.v1.DeleteOccurrenceRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DeleteOccurrenceRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DeleteOccurrenceRequest) - private static final io.grafeas.v1.DeleteOccurrenceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DeleteOccurrenceRequest(); - } - - public static io.grafeas.v1.DeleteOccurrenceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteOccurrenceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DeleteOccurrenceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java deleted file mode 100644 index 755eafdee791..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface DeleteOccurrenceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DeleteOccurrenceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java deleted file mode 100644 index a74f9380efe2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Deployment.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/deployment.proto - -package io.grafeas.v1; - -public final class Deployment { - private Deployment() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DeploymentNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DeploymentOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\033grafeas/v1/deployment.proto\022\ngrafeas.v" + - "1\032\037google/protobuf/timestamp.proto\"&\n\016De" + - "ploymentNote\022\024\n\014resource_uri\030\001 \003(\t\"\307\002\n\024D" + - "eploymentOccurrence\022\022\n\nuser_email\030\001 \001(\t\022" + - "/\n\013deploy_time\030\002 \001(\0132\032.google.protobuf.T" + - "imestamp\0221\n\rundeploy_time\030\003 \001(\0132\032.google" + - ".protobuf.Timestamp\022\016\n\006config\030\004 \001(\t\022\017\n\007a" + - "ddress\030\005 \001(\t\022\024\n\014resource_uri\030\006 \003(\t\022;\n\010pl" + - "atform\030\007 \001(\0162).grafeas.v1.DeploymentOccu" + - "rrence.Platform\"C\n\010Platform\022\030\n\024PLATFORM_" + - "UNSPECIFIED\020\000\022\007\n\003GKE\020\001\022\010\n\004FLEX\020\002\022\n\n\006CUST" + - "OM\020\003BQ\n\rio.grafeas.v1P\001Z8google.golang.o" + - "rg/genproto/googleapis/grafeas/v1;grafea" + - "s\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_grafeas_v1_DeploymentNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DeploymentNote_descriptor, - new java.lang.String[] { "ResourceUri", }); - internal_static_grafeas_v1_DeploymentOccurrence_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DeploymentOccurrence_descriptor, - new java.lang.String[] { "UserEmail", "DeployTime", "UndeployTime", "Config", "Address", "ResourceUri", "Platform", }); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java deleted file mode 100644 index ad814299c958..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNote.java +++ /dev/null @@ -1,653 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/deployment.proto - -package io.grafeas.v1; - -/** - *
- * An artifact that can be deployed in some runtime.
- * 
- * - * Protobuf type {@code grafeas.v1.DeploymentNote} - */ -public final class DeploymentNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DeploymentNote) - DeploymentNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeploymentNote.newBuilder() to construct. - private DeploymentNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeploymentNote() { - resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeploymentNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeploymentNote.class, io.grafeas.v1.DeploymentNote.Builder.class); - } - - public static final int RESOURCE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList resourceUri_; - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @return A list containing the resourceUri. - */ - public com.google.protobuf.ProtocolStringList - getResourceUriList() { - return resourceUri_; - } - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @return The count of resourceUri. - */ - public int getResourceUriCount() { - return resourceUri_.size(); - } - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @param index The index of the element to return. - * @return The resourceUri at the given index. - */ - public java.lang.String getResourceUri(int index) { - return resourceUri_.get(index); - } - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @param index The index of the value to return. - * @return The bytes of the resourceUri at the given index. - */ - public com.google.protobuf.ByteString - getResourceUriBytes(int index) { - return resourceUri_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < resourceUri_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceUri_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < resourceUri_.size(); i++) { - dataSize += computeStringSizeNoTag(resourceUri_.getRaw(i)); - } - size += dataSize; - size += 1 * getResourceUriList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DeploymentNote)) { - return super.equals(obj); - } - io.grafeas.v1.DeploymentNote other = (io.grafeas.v1.DeploymentNote) obj; - - if (!getResourceUriList() - .equals(other.getResourceUriList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResourceUriCount() > 0) { - hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; - hash = (53 * hash) + getResourceUriList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DeploymentNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeploymentNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeploymentNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeploymentNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeploymentNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeploymentNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeploymentNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeploymentNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeploymentNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeploymentNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeploymentNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeploymentNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DeploymentNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An artifact that can be deployed in some runtime.
-   * 
- * - * Protobuf type {@code grafeas.v1.DeploymentNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DeploymentNote) - io.grafeas.v1.DeploymentNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeploymentNote.class, io.grafeas.v1.DeploymentNote.Builder.class); - } - - // Construct using io.grafeas.v1.DeploymentNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DeploymentNote getDefaultInstanceForType() { - return io.grafeas.v1.DeploymentNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DeploymentNote build() { - io.grafeas.v1.DeploymentNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DeploymentNote buildPartial() { - io.grafeas.v1.DeploymentNote result = new io.grafeas.v1.DeploymentNote(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.DeploymentNote result) { - if (((bitField0_ & 0x00000001) != 0)) { - resourceUri_ = resourceUri_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.resourceUri_ = resourceUri_; - } - - private void buildPartial0(io.grafeas.v1.DeploymentNote result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DeploymentNote) { - return mergeFrom((io.grafeas.v1.DeploymentNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DeploymentNote other) { - if (other == io.grafeas.v1.DeploymentNote.getDefaultInstance()) return this; - if (!other.resourceUri_.isEmpty()) { - if (resourceUri_.isEmpty()) { - resourceUri_ = other.resourceUri_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResourceUriIsMutable(); - resourceUri_.addAll(other.resourceUri_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - ensureResourceUriIsMutable(); - resourceUri_.add(s); - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureResourceUriIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - resourceUri_ = new com.google.protobuf.LazyStringArrayList(resourceUri_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @return A list containing the resourceUri. - */ - public com.google.protobuf.ProtocolStringList - getResourceUriList() { - return resourceUri_.getUnmodifiableView(); - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @return The count of resourceUri. - */ - public int getResourceUriCount() { - return resourceUri_.size(); - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @param index The index of the element to return. - * @return The resourceUri at the given index. - */ - public java.lang.String getResourceUri(int index) { - return resourceUri_.get(index); - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @param index The index of the value to return. - * @return The bytes of the resourceUri at the given index. - */ - public com.google.protobuf.ByteString - getResourceUriBytes(int index) { - return resourceUri_.getByteString(index); - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @param index The index to set the value at. - * @param value The resourceUri to set. - * @return This builder for chaining. - */ - public Builder setResourceUri( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureResourceUriIsMutable(); - resourceUri_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @param value The resourceUri to add. - * @return This builder for chaining. - */ - public Builder addResourceUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureResourceUriIsMutable(); - resourceUri_.add(value); - onChanged(); - return this; - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @param values The resourceUri to add. - * @return This builder for chaining. - */ - public Builder addAllResourceUri( - java.lang.Iterable values) { - ensureResourceUriIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, resourceUri_); - onChanged(); - return this; - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @return This builder for chaining. - */ - public Builder clearResourceUri() { - resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. Resource URI for the artifact being deployed.
-     * 
- * - * repeated string resource_uri = 1; - * @param value The bytes of the resourceUri to add. - * @return This builder for chaining. - */ - public Builder addResourceUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureResourceUriIsMutable(); - resourceUri_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DeploymentNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DeploymentNote) - private static final io.grafeas.v1.DeploymentNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DeploymentNote(); - } - - public static io.grafeas.v1.DeploymentNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeploymentNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DeploymentNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java deleted file mode 100644 index 3e512a6a1a33..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/deployment.proto - -package io.grafeas.v1; - -public interface DeploymentNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DeploymentNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @return A list containing the resourceUri. - */ - java.util.List - getResourceUriList(); - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @return The count of resourceUri. - */ - int getResourceUriCount(); - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @param index The index of the element to return. - * @return The resourceUri at the given index. - */ - java.lang.String getResourceUri(int index); - /** - *
-   * Required. Resource URI for the artifact being deployed.
-   * 
- * - * repeated string resource_uri = 1; - * @param index The index of the value to return. - * @return The bytes of the resourceUri at the given index. - */ - com.google.protobuf.ByteString - getResourceUriBytes(int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java deleted file mode 100644 index e0a761932ed7..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrence.java +++ /dev/null @@ -1,1900 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/deployment.proto - -package io.grafeas.v1; - -/** - *
- * The period during which some deployable was active in a runtime.
- * 
- * - * Protobuf type {@code grafeas.v1.DeploymentOccurrence} - */ -public final class DeploymentOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DeploymentOccurrence) - DeploymentOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeploymentOccurrence.newBuilder() to construct. - private DeploymentOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeploymentOccurrence() { - userEmail_ = ""; - config_ = ""; - address_ = ""; - resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - platform_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeploymentOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeploymentOccurrence.class, io.grafeas.v1.DeploymentOccurrence.Builder.class); - } - - /** - *
-   * Types of platforms.
-   * 
- * - * Protobuf enum {@code grafeas.v1.DeploymentOccurrence.Platform} - */ - public enum Platform - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown.
-     * 
- * - * PLATFORM_UNSPECIFIED = 0; - */ - PLATFORM_UNSPECIFIED(0), - /** - *
-     * Google Container Engine.
-     * 
- * - * GKE = 1; - */ - GKE(1), - /** - *
-     * Google App Engine: Flexible Environment.
-     * 
- * - * FLEX = 2; - */ - FLEX(2), - /** - *
-     * Custom user-defined platform.
-     * 
- * - * CUSTOM = 3; - */ - CUSTOM(3), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unknown.
-     * 
- * - * PLATFORM_UNSPECIFIED = 0; - */ - public static final int PLATFORM_UNSPECIFIED_VALUE = 0; - /** - *
-     * Google Container Engine.
-     * 
- * - * GKE = 1; - */ - public static final int GKE_VALUE = 1; - /** - *
-     * Google App Engine: Flexible Environment.
-     * 
- * - * FLEX = 2; - */ - public static final int FLEX_VALUE = 2; - /** - *
-     * Custom user-defined platform.
-     * 
- * - * CUSTOM = 3; - */ - public static final int CUSTOM_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Platform valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Platform forNumber(int value) { - switch (value) { - case 0: return PLATFORM_UNSPECIFIED; - case 1: return GKE; - case 2: return FLEX; - case 3: return CUSTOM; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Platform> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Platform findValueByNumber(int number) { - return Platform.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.DeploymentOccurrence.getDescriptor().getEnumTypes().get(0); - } - - private static final Platform[] VALUES = values(); - - public static Platform valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Platform(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.DeploymentOccurrence.Platform) - } - - public static final int USER_EMAIL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object userEmail_ = ""; - /** - *
-   * Identity of the user that triggered this deployment.
-   * 
- * - * string user_email = 1; - * @return The userEmail. - */ - @java.lang.Override - public java.lang.String getUserEmail() { - java.lang.Object ref = userEmail_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - userEmail_ = s; - return s; - } - } - /** - *
-   * Identity of the user that triggered this deployment.
-   * 
- * - * string user_email = 1; - * @return The bytes for userEmail. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUserEmailBytes() { - java.lang.Object ref = userEmail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - userEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEPLOY_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp deployTime_; - /** - *
-   * Required. Beginning of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * @return Whether the deployTime field is set. - */ - @java.lang.Override - public boolean hasDeployTime() { - return deployTime_ != null; - } - /** - *
-   * Required. Beginning of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * @return The deployTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getDeployTime() { - return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; - } - /** - *
-   * Required. Beginning of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder() { - return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; - } - - public static final int UNDEPLOY_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp undeployTime_; - /** - *
-   * End of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - * @return Whether the undeployTime field is set. - */ - @java.lang.Override - public boolean hasUndeployTime() { - return undeployTime_ != null; - } - /** - *
-   * End of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - * @return The undeployTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUndeployTime() { - return undeployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; - } - /** - *
-   * End of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUndeployTimeOrBuilder() { - return undeployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; - } - - public static final int CONFIG_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object config_ = ""; - /** - *
-   * Configuration used to create this deployment.
-   * 
- * - * string config = 4; - * @return The config. - */ - @java.lang.Override - public java.lang.String getConfig() { - java.lang.Object ref = config_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - config_ = s; - return s; - } - } - /** - *
-   * Configuration used to create this deployment.
-   * 
- * - * string config = 4; - * @return The bytes for config. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getConfigBytes() { - java.lang.Object ref = config_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - config_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ADDRESS_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object address_ = ""; - /** - *
-   * Address of the runtime element hosting this deployment.
-   * 
- * - * string address = 5; - * @return The address. - */ - @java.lang.Override - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } - } - /** - *
-   * Address of the runtime element hosting this deployment.
-   * 
- * - * string address = 5; - * @return The bytes for address. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_URI_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList resourceUri_; - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @return A list containing the resourceUri. - */ - public com.google.protobuf.ProtocolStringList - getResourceUriList() { - return resourceUri_; - } - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @return The count of resourceUri. - */ - public int getResourceUriCount() { - return resourceUri_.size(); - } - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @param index The index of the element to return. - * @return The resourceUri at the given index. - */ - public java.lang.String getResourceUri(int index) { - return resourceUri_.get(index); - } - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @param index The index of the value to return. - * @return The bytes of the resourceUri at the given index. - */ - public com.google.protobuf.ByteString - getResourceUriBytes(int index) { - return resourceUri_.getByteString(index); - } - - public static final int PLATFORM_FIELD_NUMBER = 7; - private int platform_ = 0; - /** - *
-   * Platform hosting this deployment.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return The enum numeric value on the wire for platform. - */ - @java.lang.Override public int getPlatformValue() { - return platform_; - } - /** - *
-   * Platform hosting this deployment.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return The platform. - */ - @java.lang.Override public io.grafeas.v1.DeploymentOccurrence.Platform getPlatform() { - io.grafeas.v1.DeploymentOccurrence.Platform result = io.grafeas.v1.DeploymentOccurrence.Platform.forNumber(platform_); - return result == null ? io.grafeas.v1.DeploymentOccurrence.Platform.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userEmail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userEmail_); - } - if (deployTime_ != null) { - output.writeMessage(2, getDeployTime()); - } - if (undeployTime_ != null) { - output.writeMessage(3, getUndeployTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, config_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, address_); - } - for (int i = 0; i < resourceUri_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, resourceUri_.getRaw(i)); - } - if (platform_ != io.grafeas.v1.DeploymentOccurrence.Platform.PLATFORM_UNSPECIFIED.getNumber()) { - output.writeEnum(7, platform_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userEmail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userEmail_); - } - if (deployTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDeployTime()); - } - if (undeployTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getUndeployTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, config_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, address_); - } - { - int dataSize = 0; - for (int i = 0; i < resourceUri_.size(); i++) { - dataSize += computeStringSizeNoTag(resourceUri_.getRaw(i)); - } - size += dataSize; - size += 1 * getResourceUriList().size(); - } - if (platform_ != io.grafeas.v1.DeploymentOccurrence.Platform.PLATFORM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(7, platform_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DeploymentOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.DeploymentOccurrence other = (io.grafeas.v1.DeploymentOccurrence) obj; - - if (!getUserEmail() - .equals(other.getUserEmail())) return false; - if (hasDeployTime() != other.hasDeployTime()) return false; - if (hasDeployTime()) { - if (!getDeployTime() - .equals(other.getDeployTime())) return false; - } - if (hasUndeployTime() != other.hasUndeployTime()) return false; - if (hasUndeployTime()) { - if (!getUndeployTime() - .equals(other.getUndeployTime())) return false; - } - if (!getConfig() - .equals(other.getConfig())) return false; - if (!getAddress() - .equals(other.getAddress())) return false; - if (!getResourceUriList() - .equals(other.getResourceUriList())) return false; - if (platform_ != other.platform_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + USER_EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getUserEmail().hashCode(); - if (hasDeployTime()) { - hash = (37 * hash) + DEPLOY_TIME_FIELD_NUMBER; - hash = (53 * hash) + getDeployTime().hashCode(); - } - if (hasUndeployTime()) { - hash = (37 * hash) + UNDEPLOY_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUndeployTime().hashCode(); - } - hash = (37 * hash) + CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getConfig().hashCode(); - hash = (37 * hash) + ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAddress().hashCode(); - if (getResourceUriCount() > 0) { - hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; - hash = (53 * hash) + getResourceUriList().hashCode(); - } - hash = (37 * hash) + PLATFORM_FIELD_NUMBER; - hash = (53 * hash) + platform_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeploymentOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeploymentOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DeploymentOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DeploymentOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The period during which some deployable was active in a runtime.
-   * 
- * - * Protobuf type {@code grafeas.v1.DeploymentOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DeploymentOccurrence) - io.grafeas.v1.DeploymentOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DeploymentOccurrence.class, io.grafeas.v1.DeploymentOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.DeploymentOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - userEmail_ = ""; - deployTime_ = null; - if (deployTimeBuilder_ != null) { - deployTimeBuilder_.dispose(); - deployTimeBuilder_ = null; - } - undeployTime_ = null; - if (undeployTimeBuilder_ != null) { - undeployTimeBuilder_.dispose(); - undeployTimeBuilder_ = null; - } - config_ = ""; - address_ = ""; - resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - platform_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrence build() { - io.grafeas.v1.DeploymentOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrence buildPartial() { - io.grafeas.v1.DeploymentOccurrence result = new io.grafeas.v1.DeploymentOccurrence(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.DeploymentOccurrence result) { - if (((bitField0_ & 0x00000020) != 0)) { - resourceUri_ = resourceUri_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.resourceUri_ = resourceUri_; - } - - private void buildPartial0(io.grafeas.v1.DeploymentOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.userEmail_ = userEmail_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.deployTime_ = deployTimeBuilder_ == null - ? deployTime_ - : deployTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.undeployTime_ = undeployTimeBuilder_ == null - ? undeployTime_ - : undeployTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.config_ = config_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.address_ = address_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.platform_ = platform_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DeploymentOccurrence) { - return mergeFrom((io.grafeas.v1.DeploymentOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DeploymentOccurrence other) { - if (other == io.grafeas.v1.DeploymentOccurrence.getDefaultInstance()) return this; - if (!other.getUserEmail().isEmpty()) { - userEmail_ = other.userEmail_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasDeployTime()) { - mergeDeployTime(other.getDeployTime()); - } - if (other.hasUndeployTime()) { - mergeUndeployTime(other.getUndeployTime()); - } - if (!other.getConfig().isEmpty()) { - config_ = other.config_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getAddress().isEmpty()) { - address_ = other.address_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (!other.resourceUri_.isEmpty()) { - if (resourceUri_.isEmpty()) { - resourceUri_ = other.resourceUri_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureResourceUriIsMutable(); - resourceUri_.addAll(other.resourceUri_); - } - onChanged(); - } - if (other.platform_ != 0) { - setPlatformValue(other.getPlatformValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - userEmail_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getDeployTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getUndeployTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - config_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - address_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - ensureResourceUriIsMutable(); - resourceUri_.add(s); - break; - } // case 50 - case 56: { - platform_ = input.readEnum(); - bitField0_ |= 0x00000040; - break; - } // case 56 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object userEmail_ = ""; - /** - *
-     * Identity of the user that triggered this deployment.
-     * 
- * - * string user_email = 1; - * @return The userEmail. - */ - public java.lang.String getUserEmail() { - java.lang.Object ref = userEmail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - userEmail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Identity of the user that triggered this deployment.
-     * 
- * - * string user_email = 1; - * @return The bytes for userEmail. - */ - public com.google.protobuf.ByteString - getUserEmailBytes() { - java.lang.Object ref = userEmail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - userEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Identity of the user that triggered this deployment.
-     * 
- * - * string user_email = 1; - * @param value The userEmail to set. - * @return This builder for chaining. - */ - public Builder setUserEmail( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - userEmail_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Identity of the user that triggered this deployment.
-     * 
- * - * string user_email = 1; - * @return This builder for chaining. - */ - public Builder clearUserEmail() { - userEmail_ = getDefaultInstance().getUserEmail(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Identity of the user that triggered this deployment.
-     * 
- * - * string user_email = 1; - * @param value The bytes for userEmail to set. - * @return This builder for chaining. - */ - public Builder setUserEmailBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - userEmail_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp deployTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> deployTimeBuilder_; - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * @return Whether the deployTime field is set. - */ - public boolean hasDeployTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * @return The deployTime. - */ - public com.google.protobuf.Timestamp getDeployTime() { - if (deployTimeBuilder_ == null) { - return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; - } else { - return deployTimeBuilder_.getMessage(); - } - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public Builder setDeployTime(com.google.protobuf.Timestamp value) { - if (deployTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deployTime_ = value; - } else { - deployTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public Builder setDeployTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (deployTimeBuilder_ == null) { - deployTime_ = builderForValue.build(); - } else { - deployTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public Builder mergeDeployTime(com.google.protobuf.Timestamp value) { - if (deployTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - deployTime_ != null && - deployTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getDeployTimeBuilder().mergeFrom(value); - } else { - deployTime_ = value; - } - } else { - deployTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public Builder clearDeployTime() { - bitField0_ = (bitField0_ & ~0x00000002); - deployTime_ = null; - if (deployTimeBuilder_ != null) { - deployTimeBuilder_.dispose(); - deployTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getDeployTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getDeployTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder() { - if (deployTimeBuilder_ != null) { - return deployTimeBuilder_.getMessageOrBuilder(); - } else { - return deployTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; - } - } - /** - *
-     * Required. Beginning of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getDeployTimeFieldBuilder() { - if (deployTimeBuilder_ == null) { - deployTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getDeployTime(), - getParentForChildren(), - isClean()); - deployTime_ = null; - } - return deployTimeBuilder_; - } - - private com.google.protobuf.Timestamp undeployTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> undeployTimeBuilder_; - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - * @return Whether the undeployTime field is set. - */ - public boolean hasUndeployTime() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - * @return The undeployTime. - */ - public com.google.protobuf.Timestamp getUndeployTime() { - if (undeployTimeBuilder_ == null) { - return undeployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; - } else { - return undeployTimeBuilder_.getMessage(); - } - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - public Builder setUndeployTime(com.google.protobuf.Timestamp value) { - if (undeployTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - undeployTime_ = value; - } else { - undeployTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - public Builder setUndeployTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (undeployTimeBuilder_ == null) { - undeployTime_ = builderForValue.build(); - } else { - undeployTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - public Builder mergeUndeployTime(com.google.protobuf.Timestamp value) { - if (undeployTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - undeployTime_ != null && - undeployTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUndeployTimeBuilder().mergeFrom(value); - } else { - undeployTime_ = value; - } - } else { - undeployTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - public Builder clearUndeployTime() { - bitField0_ = (bitField0_ & ~0x00000004); - undeployTime_ = null; - if (undeployTimeBuilder_ != null) { - undeployTimeBuilder_.dispose(); - undeployTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - public com.google.protobuf.Timestamp.Builder getUndeployTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getUndeployTimeFieldBuilder().getBuilder(); - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - public com.google.protobuf.TimestampOrBuilder getUndeployTimeOrBuilder() { - if (undeployTimeBuilder_ != null) { - return undeployTimeBuilder_.getMessageOrBuilder(); - } else { - return undeployTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : undeployTime_; - } - } - /** - *
-     * End of the lifetime of this deployment.
-     * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUndeployTimeFieldBuilder() { - if (undeployTimeBuilder_ == null) { - undeployTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUndeployTime(), - getParentForChildren(), - isClean()); - undeployTime_ = null; - } - return undeployTimeBuilder_; - } - - private java.lang.Object config_ = ""; - /** - *
-     * Configuration used to create this deployment.
-     * 
- * - * string config = 4; - * @return The config. - */ - public java.lang.String getConfig() { - java.lang.Object ref = config_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - config_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Configuration used to create this deployment.
-     * 
- * - * string config = 4; - * @return The bytes for config. - */ - public com.google.protobuf.ByteString - getConfigBytes() { - java.lang.Object ref = config_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - config_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Configuration used to create this deployment.
-     * 
- * - * string config = 4; - * @param value The config to set. - * @return This builder for chaining. - */ - public Builder setConfig( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - config_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Configuration used to create this deployment.
-     * 
- * - * string config = 4; - * @return This builder for chaining. - */ - public Builder clearConfig() { - config_ = getDefaultInstance().getConfig(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * Configuration used to create this deployment.
-     * 
- * - * string config = 4; - * @param value The bytes for config to set. - * @return This builder for chaining. - */ - public Builder setConfigBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - config_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object address_ = ""; - /** - *
-     * Address of the runtime element hosting this deployment.
-     * 
- * - * string address = 5; - * @return The address. - */ - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Address of the runtime element hosting this deployment.
-     * 
- * - * string address = 5; - * @return The bytes for address. - */ - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Address of the runtime element hosting this deployment.
-     * 
- * - * string address = 5; - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - address_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Address of the runtime element hosting this deployment.
-     * 
- * - * string address = 5; - * @return This builder for chaining. - */ - public Builder clearAddress() { - address_ = getDefaultInstance().getAddress(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * Address of the runtime element hosting this deployment.
-     * 
- * - * string address = 5; - * @param value The bytes for address to set. - * @return This builder for chaining. - */ - public Builder setAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - address_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureResourceUriIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - resourceUri_ = new com.google.protobuf.LazyStringArrayList(resourceUri_); - bitField0_ |= 0x00000020; - } - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @return A list containing the resourceUri. - */ - public com.google.protobuf.ProtocolStringList - getResourceUriList() { - return resourceUri_.getUnmodifiableView(); - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @return The count of resourceUri. - */ - public int getResourceUriCount() { - return resourceUri_.size(); - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @param index The index of the element to return. - * @return The resourceUri at the given index. - */ - public java.lang.String getResourceUri(int index) { - return resourceUri_.get(index); - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @param index The index of the value to return. - * @return The bytes of the resourceUri at the given index. - */ - public com.google.protobuf.ByteString - getResourceUriBytes(int index) { - return resourceUri_.getByteString(index); - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @param index The index to set the value at. - * @param value The resourceUri to set. - * @return This builder for chaining. - */ - public Builder setResourceUri( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureResourceUriIsMutable(); - resourceUri_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @param value The resourceUri to add. - * @return This builder for chaining. - */ - public Builder addResourceUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureResourceUriIsMutable(); - resourceUri_.add(value); - onChanged(); - return this; - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @param values The resourceUri to add. - * @return This builder for chaining. - */ - public Builder addAllResourceUri( - java.lang.Iterable values) { - ensureResourceUriIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, resourceUri_); - onChanged(); - return this; - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @return This builder for chaining. - */ - public Builder clearResourceUri() { - resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * Output only. Resource URI for the artifact being deployed taken from
-     * the deployable field with the same name.
-     * 
- * - * repeated string resource_uri = 6; - * @param value The bytes of the resourceUri to add. - * @return This builder for chaining. - */ - public Builder addResourceUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureResourceUriIsMutable(); - resourceUri_.add(value); - onChanged(); - return this; - } - - private int platform_ = 0; - /** - *
-     * Platform hosting this deployment.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return The enum numeric value on the wire for platform. - */ - @java.lang.Override public int getPlatformValue() { - return platform_; - } - /** - *
-     * Platform hosting this deployment.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @param value The enum numeric value on the wire for platform to set. - * @return This builder for chaining. - */ - public Builder setPlatformValue(int value) { - platform_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Platform hosting this deployment.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return The platform. - */ - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrence.Platform getPlatform() { - io.grafeas.v1.DeploymentOccurrence.Platform result = io.grafeas.v1.DeploymentOccurrence.Platform.forNumber(platform_); - return result == null ? io.grafeas.v1.DeploymentOccurrence.Platform.UNRECOGNIZED : result; - } - /** - *
-     * Platform hosting this deployment.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @param value The platform to set. - * @return This builder for chaining. - */ - public Builder setPlatform(io.grafeas.v1.DeploymentOccurrence.Platform value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - platform_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Platform hosting this deployment.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return This builder for chaining. - */ - public Builder clearPlatform() { - bitField0_ = (bitField0_ & ~0x00000040); - platform_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DeploymentOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DeploymentOccurrence) - private static final io.grafeas.v1.DeploymentOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DeploymentOccurrence(); - } - - public static io.grafeas.v1.DeploymentOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeploymentOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java deleted file mode 100644 index 4a9234225f40..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java +++ /dev/null @@ -1,187 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/deployment.proto - -package io.grafeas.v1; - -public interface DeploymentOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DeploymentOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Identity of the user that triggered this deployment.
-   * 
- * - * string user_email = 1; - * @return The userEmail. - */ - java.lang.String getUserEmail(); - /** - *
-   * Identity of the user that triggered this deployment.
-   * 
- * - * string user_email = 1; - * @return The bytes for userEmail. - */ - com.google.protobuf.ByteString - getUserEmailBytes(); - - /** - *
-   * Required. Beginning of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * @return Whether the deployTime field is set. - */ - boolean hasDeployTime(); - /** - *
-   * Required. Beginning of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * @return The deployTime. - */ - com.google.protobuf.Timestamp getDeployTime(); - /** - *
-   * Required. Beginning of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder(); - - /** - *
-   * End of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - * @return Whether the undeployTime field is set. - */ - boolean hasUndeployTime(); - /** - *
-   * End of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - * @return The undeployTime. - */ - com.google.protobuf.Timestamp getUndeployTime(); - /** - *
-   * End of the lifetime of this deployment.
-   * 
- * - * .google.protobuf.Timestamp undeploy_time = 3; - */ - com.google.protobuf.TimestampOrBuilder getUndeployTimeOrBuilder(); - - /** - *
-   * Configuration used to create this deployment.
-   * 
- * - * string config = 4; - * @return The config. - */ - java.lang.String getConfig(); - /** - *
-   * Configuration used to create this deployment.
-   * 
- * - * string config = 4; - * @return The bytes for config. - */ - com.google.protobuf.ByteString - getConfigBytes(); - - /** - *
-   * Address of the runtime element hosting this deployment.
-   * 
- * - * string address = 5; - * @return The address. - */ - java.lang.String getAddress(); - /** - *
-   * Address of the runtime element hosting this deployment.
-   * 
- * - * string address = 5; - * @return The bytes for address. - */ - com.google.protobuf.ByteString - getAddressBytes(); - - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @return A list containing the resourceUri. - */ - java.util.List - getResourceUriList(); - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @return The count of resourceUri. - */ - int getResourceUriCount(); - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @param index The index of the element to return. - * @return The resourceUri at the given index. - */ - java.lang.String getResourceUri(int index); - /** - *
-   * Output only. Resource URI for the artifact being deployed taken from
-   * the deployable field with the same name.
-   * 
- * - * repeated string resource_uri = 6; - * @param index The index of the value to return. - * @return The bytes of the resourceUri at the given index. - */ - com.google.protobuf.ByteString - getResourceUriBytes(int index); - - /** - *
-   * Platform hosting this deployment.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return The enum numeric value on the wire for platform. - */ - int getPlatformValue(); - /** - *
-   * Platform hosting this deployment.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return The platform. - */ - io.grafeas.v1.DeploymentOccurrence.Platform getPlatform(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java deleted file mode 100644 index a3d76aee3b80..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Digest.java +++ /dev/null @@ -1,663 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - *
- * Digest information.
- * 
- * - * Protobuf type {@code grafeas.v1.Digest} - */ -public final class Digest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Digest) - DigestOrBuilder { -private static final long serialVersionUID = 0L; - // Use Digest.newBuilder() to construct. - private Digest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Digest() { - algo_ = ""; - digestBytes_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Digest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Digest.class, io.grafeas.v1.Digest.Builder.class); - } - - public static final int ALGO_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object algo_ = ""; - /** - *
-   * `SHA1`, `SHA512` etc.
-   * 
- * - * string algo = 1; - * @return The algo. - */ - @java.lang.Override - public java.lang.String getAlgo() { - java.lang.Object ref = algo_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - algo_ = s; - return s; - } - } - /** - *
-   * `SHA1`, `SHA512` etc.
-   * 
- * - * string algo = 1; - * @return The bytes for algo. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAlgoBytes() { - java.lang.Object ref = algo_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - algo_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DIGEST_BYTES_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString digestBytes_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-   * Value of the digest.
-   * 
- * - * bytes digest_bytes = 2; - * @return The digestBytes. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDigestBytes() { - return digestBytes_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algo_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, algo_); - } - if (!digestBytes_.isEmpty()) { - output.writeBytes(2, digestBytes_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algo_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, algo_); - } - if (!digestBytes_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, digestBytes_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Digest)) { - return super.equals(obj); - } - io.grafeas.v1.Digest other = (io.grafeas.v1.Digest) obj; - - if (!getAlgo() - .equals(other.getAlgo())) return false; - if (!getDigestBytes() - .equals(other.getDigestBytes())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ALGO_FIELD_NUMBER; - hash = (53 * hash) + getAlgo().hashCode(); - hash = (37 * hash) + DIGEST_BYTES_FIELD_NUMBER; - hash = (53 * hash) + getDigestBytes().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Digest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Digest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Digest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Digest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Digest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Digest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Digest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Digest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Digest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Digest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Digest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Digest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Digest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Digest information.
-   * 
- * - * Protobuf type {@code grafeas.v1.Digest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Digest) - io.grafeas.v1.DigestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Digest.class, io.grafeas.v1.Digest.Builder.class); - } - - // Construct using io.grafeas.v1.Digest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - algo_ = ""; - digestBytes_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Digest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Digest getDefaultInstanceForType() { - return io.grafeas.v1.Digest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Digest build() { - io.grafeas.v1.Digest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Digest buildPartial() { - io.grafeas.v1.Digest result = new io.grafeas.v1.Digest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Digest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.algo_ = algo_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.digestBytes_ = digestBytes_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Digest) { - return mergeFrom((io.grafeas.v1.Digest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Digest other) { - if (other == io.grafeas.v1.Digest.getDefaultInstance()) return this; - if (!other.getAlgo().isEmpty()) { - algo_ = other.algo_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getDigestBytes() != com.google.protobuf.ByteString.EMPTY) { - setDigestBytes(other.getDigestBytes()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - algo_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - digestBytes_ = input.readBytes(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object algo_ = ""; - /** - *
-     * `SHA1`, `SHA512` etc.
-     * 
- * - * string algo = 1; - * @return The algo. - */ - public java.lang.String getAlgo() { - java.lang.Object ref = algo_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - algo_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `SHA1`, `SHA512` etc.
-     * 
- * - * string algo = 1; - * @return The bytes for algo. - */ - public com.google.protobuf.ByteString - getAlgoBytes() { - java.lang.Object ref = algo_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - algo_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `SHA1`, `SHA512` etc.
-     * 
- * - * string algo = 1; - * @param value The algo to set. - * @return This builder for chaining. - */ - public Builder setAlgo( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - algo_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `SHA1`, `SHA512` etc.
-     * 
- * - * string algo = 1; - * @return This builder for chaining. - */ - public Builder clearAlgo() { - algo_ = getDefaultInstance().getAlgo(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * `SHA1`, `SHA512` etc.
-     * 
- * - * string algo = 1; - * @param value The bytes for algo to set. - * @return This builder for chaining. - */ - public Builder setAlgoBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - algo_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString digestBytes_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Value of the digest.
-     * 
- * - * bytes digest_bytes = 2; - * @return The digestBytes. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDigestBytes() { - return digestBytes_; - } - /** - *
-     * Value of the digest.
-     * 
- * - * bytes digest_bytes = 2; - * @param value The digestBytes to set. - * @return This builder for chaining. - */ - public Builder setDigestBytes(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - digestBytes_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Value of the digest.
-     * 
- * - * bytes digest_bytes = 2; - * @return This builder for chaining. - */ - public Builder clearDigestBytes() { - bitField0_ = (bitField0_ & ~0x00000002); - digestBytes_ = getDefaultInstance().getDigestBytes(); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Digest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Digest) - private static final io.grafeas.v1.Digest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Digest(); - } - - public static io.grafeas.v1.Digest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Digest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Digest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java deleted file mode 100644 index b1151e73ce84..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DigestOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public interface DigestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Digest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * `SHA1`, `SHA512` etc.
-   * 
- * - * string algo = 1; - * @return The algo. - */ - java.lang.String getAlgo(); - /** - *
-   * `SHA1`, `SHA512` etc.
-   * 
- * - * string algo = 1; - * @return The bytes for algo. - */ - com.google.protobuf.ByteString - getAlgoBytes(); - - /** - *
-   * Value of the digest.
-   * 
- * - * bytes digest_bytes = 2; - * @return The digestBytes. - */ - com.google.protobuf.ByteString getDigestBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java deleted file mode 100644 index 405d615d4b2c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Discovery.java +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/discovery.proto - -package io.grafeas.v1; - -public final class Discovery { - private Discovery() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DiscoveryNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\032grafeas/v1/discovery.proto\022\ngrafeas.v1" + - "\032\037google/api/field_behavior.proto\032\037googl" + - "e/protobuf/timestamp.proto\032\027google/rpc/s" + - "tatus.proto\032\027grafeas/v1/common.proto\"<\n\r" + - "DiscoveryNote\022+\n\ranalysis_kind\030\001 \001(\0162\024.g" + - "rafeas.v1.NoteKind\"\374\005\n\023DiscoveryOccurren" + - "ce\022O\n\023continuous_analysis\030\001 \001(\01622.grafea" + - "s.v1.DiscoveryOccurrence.ContinuousAnaly" + - "sis\022G\n\017analysis_status\030\002 \001(\0162..grafeas.v" + - "1.DiscoveryOccurrence.AnalysisStatus\022M\n\022" + - "analysis_completed\030\007 \001(\01321.grafeas.v1.Di" + - "scoveryOccurrence.AnalysisCompleted\022*\n\016a" + - "nalysis_error\030\010 \003(\0132\022.google.rpc.Status\022" + - "1\n\025analysis_status_error\030\003 \001(\0132\022.google." + - "rpc.Status\022\013\n\003cpe\030\004 \001(\t\0222\n\016last_scan_tim" + - "e\030\005 \001(\0132\032.google.protobuf.Timestamp\0225\n\014a" + - "rchive_time\030\006 \001(\0132\032.google.protobuf.Time" + - "stampB\003\340A\003\032*\n\021AnalysisCompleted\022\025\n\ranaly" + - "sis_type\030\001 \003(\t\"S\n\022ContinuousAnalysis\022#\n\037" + - "CONTINUOUS_ANALYSIS_UNSPECIFIED\020\000\022\n\n\006ACT" + - "IVE\020\001\022\014\n\010INACTIVE\020\002\"\243\001\n\016AnalysisStatus\022\037" + - "\n\033ANALYSIS_STATUS_UNSPECIFIED\020\000\022\013\n\007PENDI" + - "NG\020\001\022\014\n\010SCANNING\020\002\022\024\n\020FINISHED_SUCCESS\020\003" + - "\022\014\n\010COMPLETE\020\003\022\023\n\017FINISHED_FAILED\020\004\022\030\n\024F" + - "INISHED_UNSUPPORTED\020\005\032\002\020\001BQ\n\rio.grafeas." + - "v1P\001Z8google.golang.org/genproto/googlea" + - "pis/grafeas/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.rpc.StatusProto.getDescriptor(), - io.grafeas.v1.Common.getDescriptor(), - }); - internal_static_grafeas_v1_DiscoveryNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DiscoveryNote_descriptor, - new java.lang.String[] { "AnalysisKind", }); - internal_static_grafeas_v1_DiscoveryOccurrence_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DiscoveryOccurrence_descriptor, - new java.lang.String[] { "ContinuousAnalysis", "AnalysisStatus", "AnalysisCompleted", "AnalysisError", "AnalysisStatusError", "Cpe", "LastScanTime", "ArchiveTime", }); - internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor = - internal_static_grafeas_v1_DiscoveryOccurrence_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor, - new java.lang.String[] { "AnalysisType", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); - io.grafeas.v1.Common.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java deleted file mode 100644 index 8a134c302da5..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNote.java +++ /dev/null @@ -1,549 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/discovery.proto - -package io.grafeas.v1; - -/** - *
- * A note that indicates a type of analysis a provider would perform. This note
- * exists in a provider's project. A `Discovery` occurrence is created in a
- * consumer's project at the start of analysis.
- * 
- * - * Protobuf type {@code grafeas.v1.DiscoveryNote} - */ -public final class DiscoveryNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DiscoveryNote) - DiscoveryNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use DiscoveryNote.newBuilder() to construct. - private DiscoveryNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DiscoveryNote() { - analysisKind_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DiscoveryNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DiscoveryNote.class, io.grafeas.v1.DiscoveryNote.Builder.class); - } - - public static final int ANALYSIS_KIND_FIELD_NUMBER = 1; - private int analysisKind_ = 0; - /** - *
-   * Required. Immutable. The kind of analysis that is handled by this
-   * discovery.
-   * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @return The enum numeric value on the wire for analysisKind. - */ - @java.lang.Override public int getAnalysisKindValue() { - return analysisKind_; - } - /** - *
-   * Required. Immutable. The kind of analysis that is handled by this
-   * discovery.
-   * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @return The analysisKind. - */ - @java.lang.Override public io.grafeas.v1.NoteKind getAnalysisKind() { - io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(analysisKind_); - return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (analysisKind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { - output.writeEnum(1, analysisKind_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (analysisKind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, analysisKind_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DiscoveryNote)) { - return super.equals(obj); - } - io.grafeas.v1.DiscoveryNote other = (io.grafeas.v1.DiscoveryNote) obj; - - if (analysisKind_ != other.analysisKind_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ANALYSIS_KIND_FIELD_NUMBER; - hash = (53 * hash) + analysisKind_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DiscoveryNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DiscoveryNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A note that indicates a type of analysis a provider would perform. This note
-   * exists in a provider's project. A `Discovery` occurrence is created in a
-   * consumer's project at the start of analysis.
-   * 
- * - * Protobuf type {@code grafeas.v1.DiscoveryNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DiscoveryNote) - io.grafeas.v1.DiscoveryNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DiscoveryNote.class, io.grafeas.v1.DiscoveryNote.Builder.class); - } - - // Construct using io.grafeas.v1.DiscoveryNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - analysisKind_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryNote getDefaultInstanceForType() { - return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryNote build() { - io.grafeas.v1.DiscoveryNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryNote buildPartial() { - io.grafeas.v1.DiscoveryNote result = new io.grafeas.v1.DiscoveryNote(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.DiscoveryNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.analysisKind_ = analysisKind_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DiscoveryNote) { - return mergeFrom((io.grafeas.v1.DiscoveryNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DiscoveryNote other) { - if (other == io.grafeas.v1.DiscoveryNote.getDefaultInstance()) return this; - if (other.analysisKind_ != 0) { - setAnalysisKindValue(other.getAnalysisKindValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - analysisKind_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int analysisKind_ = 0; - /** - *
-     * Required. Immutable. The kind of analysis that is handled by this
-     * discovery.
-     * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @return The enum numeric value on the wire for analysisKind. - */ - @java.lang.Override public int getAnalysisKindValue() { - return analysisKind_; - } - /** - *
-     * Required. Immutable. The kind of analysis that is handled by this
-     * discovery.
-     * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @param value The enum numeric value on the wire for analysisKind to set. - * @return This builder for chaining. - */ - public Builder setAnalysisKindValue(int value) { - analysisKind_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The kind of analysis that is handled by this
-     * discovery.
-     * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @return The analysisKind. - */ - @java.lang.Override - public io.grafeas.v1.NoteKind getAnalysisKind() { - io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(analysisKind_); - return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; - } - /** - *
-     * Required. Immutable. The kind of analysis that is handled by this
-     * discovery.
-     * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @param value The analysisKind to set. - * @return This builder for chaining. - */ - public Builder setAnalysisKind(io.grafeas.v1.NoteKind value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - analysisKind_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The kind of analysis that is handled by this
-     * discovery.
-     * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @return This builder for chaining. - */ - public Builder clearAnalysisKind() { - bitField0_ = (bitField0_ & ~0x00000001); - analysisKind_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DiscoveryNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DiscoveryNote) - private static final io.grafeas.v1.DiscoveryNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DiscoveryNote(); - } - - public static io.grafeas.v1.DiscoveryNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DiscoveryNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java deleted file mode 100644 index ad1484f0679d..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java +++ /dev/null @@ -1,30 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/discovery.proto - -package io.grafeas.v1; - -public interface DiscoveryNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DiscoveryNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Immutable. The kind of analysis that is handled by this
-   * discovery.
-   * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @return The enum numeric value on the wire for analysisKind. - */ - int getAnalysisKindValue(); - /** - *
-   * Required. Immutable. The kind of analysis that is handled by this
-   * discovery.
-   * 
- * - * .grafeas.v1.NoteKind analysis_kind = 1; - * @return The analysisKind. - */ - io.grafeas.v1.NoteKind getAnalysisKind(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java deleted file mode 100644 index 1c6321c5cc12..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java +++ /dev/null @@ -1,3178 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/discovery.proto - -package io.grafeas.v1; - -/** - *
- * Provides information about the analysis status of a discovered resource.
- * 
- * - * Protobuf type {@code grafeas.v1.DiscoveryOccurrence} - */ -public final class DiscoveryOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DiscoveryOccurrence) - DiscoveryOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use DiscoveryOccurrence.newBuilder() to construct. - private DiscoveryOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DiscoveryOccurrence() { - continuousAnalysis_ = 0; - analysisStatus_ = 0; - analysisError_ = java.util.Collections.emptyList(); - cpe_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DiscoveryOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DiscoveryOccurrence.class, io.grafeas.v1.DiscoveryOccurrence.Builder.class); - } - - /** - *
-   * Whether the resource is continuously analyzed.
-   * 
- * - * Protobuf enum {@code grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis} - */ - public enum ContinuousAnalysis - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown.
-     * 
- * - * CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; - */ - CONTINUOUS_ANALYSIS_UNSPECIFIED(0), - /** - *
-     * The resource is continuously analyzed.
-     * 
- * - * ACTIVE = 1; - */ - ACTIVE(1), - /** - *
-     * The resource is ignored for continuous analysis.
-     * 
- * - * INACTIVE = 2; - */ - INACTIVE(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unknown.
-     * 
- * - * CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; - */ - public static final int CONTINUOUS_ANALYSIS_UNSPECIFIED_VALUE = 0; - /** - *
-     * The resource is continuously analyzed.
-     * 
- * - * ACTIVE = 1; - */ - public static final int ACTIVE_VALUE = 1; - /** - *
-     * The resource is ignored for continuous analysis.
-     * 
- * - * INACTIVE = 2; - */ - public static final int INACTIVE_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ContinuousAnalysis valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ContinuousAnalysis forNumber(int value) { - switch (value) { - case 0: return CONTINUOUS_ANALYSIS_UNSPECIFIED; - case 1: return ACTIVE; - case 2: return INACTIVE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ContinuousAnalysis> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ContinuousAnalysis findValueByNumber(int number) { - return ContinuousAnalysis.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.DiscoveryOccurrence.getDescriptor().getEnumTypes().get(0); - } - - private static final ContinuousAnalysis[] VALUES = values(); - - public static ContinuousAnalysis valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ContinuousAnalysis(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis) - } - - /** - *
-   * Analysis status for a resource. Currently for initial analysis only (not
-   * updated in continuous analysis).
-   * 
- * - * Protobuf enum {@code grafeas.v1.DiscoveryOccurrence.AnalysisStatus} - */ - public enum AnalysisStatus - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown.
-     * 
- * - * ANALYSIS_STATUS_UNSPECIFIED = 0; - */ - ANALYSIS_STATUS_UNSPECIFIED(0, 0), - /** - *
-     * Resource is known but no action has been taken yet.
-     * 
- * - * PENDING = 1; - */ - PENDING(1, 1), - /** - *
-     * Resource is being analyzed.
-     * 
- * - * SCANNING = 2; - */ - SCANNING(2, 2), - /** - *
-     * Analysis has finished successfully.
-     * 
- * - * FINISHED_SUCCESS = 3; - */ - FINISHED_SUCCESS(3, 3), - /** - *
-     * Analysis has finished unsuccessfully, the analysis itself is in a bad
-     * state.
-     * 
- * - * FINISHED_FAILED = 4; - */ - FINISHED_FAILED(5, 4), - /** - *
-     * The resource is known not to be supported.
-     * 
- * - * FINISHED_UNSUPPORTED = 5; - */ - FINISHED_UNSUPPORTED(6, 5), - UNRECOGNIZED(-1, -1), - ; - - /** - *
-     * Analysis has completed.
-     * 
- * - * COMPLETE = 3; - */ - public static final AnalysisStatus COMPLETE = FINISHED_SUCCESS; - /** - *
-     * Unknown.
-     * 
- * - * ANALYSIS_STATUS_UNSPECIFIED = 0; - */ - public static final int ANALYSIS_STATUS_UNSPECIFIED_VALUE = 0; - /** - *
-     * Resource is known but no action has been taken yet.
-     * 
- * - * PENDING = 1; - */ - public static final int PENDING_VALUE = 1; - /** - *
-     * Resource is being analyzed.
-     * 
- * - * SCANNING = 2; - */ - public static final int SCANNING_VALUE = 2; - /** - *
-     * Analysis has finished successfully.
-     * 
- * - * FINISHED_SUCCESS = 3; - */ - public static final int FINISHED_SUCCESS_VALUE = 3; - /** - *
-     * Analysis has completed.
-     * 
- * - * COMPLETE = 3; - */ - public static final int COMPLETE_VALUE = 3; - /** - *
-     * Analysis has finished unsuccessfully, the analysis itself is in a bad
-     * state.
-     * 
- * - * FINISHED_FAILED = 4; - */ - public static final int FINISHED_FAILED_VALUE = 4; - /** - *
-     * The resource is known not to be supported.
-     * 
- * - * FINISHED_UNSUPPORTED = 5; - */ - public static final int FINISHED_UNSUPPORTED_VALUE = 5; - - - public final int getNumber() { - if (index == -1) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AnalysisStatus valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AnalysisStatus forNumber(int value) { - switch (value) { - case 0: return ANALYSIS_STATUS_UNSPECIFIED; - case 1: return PENDING; - case 2: return SCANNING; - case 3: return FINISHED_SUCCESS; - case 4: return FINISHED_FAILED; - case 5: return FINISHED_UNSUPPORTED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AnalysisStatus> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AnalysisStatus findValueByNumber(int number) { - return AnalysisStatus.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (index == -1) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.DiscoveryOccurrence.getDescriptor().getEnumTypes().get(1); - } - - private static final AnalysisStatus[] VALUES = getStaticValuesArray(); - private static AnalysisStatus[] getStaticValuesArray() { - return new AnalysisStatus[] { - ANALYSIS_STATUS_UNSPECIFIED, PENDING, SCANNING, FINISHED_SUCCESS, COMPLETE, FINISHED_FAILED, FINISHED_UNSUPPORTED, - }; - } - public static AnalysisStatus valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private AnalysisStatus(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.DiscoveryOccurrence.AnalysisStatus) - } - - public interface AnalysisCompletedOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string analysis_type = 1; - * @return A list containing the analysisType. - */ - java.util.List - getAnalysisTypeList(); - /** - * repeated string analysis_type = 1; - * @return The count of analysisType. - */ - int getAnalysisTypeCount(); - /** - * repeated string analysis_type = 1; - * @param index The index of the element to return. - * @return The analysisType at the given index. - */ - java.lang.String getAnalysisType(int index); - /** - * repeated string analysis_type = 1; - * @param index The index of the value to return. - * @return The bytes of the analysisType at the given index. - */ - com.google.protobuf.ByteString - getAnalysisTypeBytes(int index); - } - /** - *
-   * Indicates which analysis completed successfully. Multiple types of
-   * analysis can be performed on a single resource.
-   * 
- * - * Protobuf type {@code grafeas.v1.DiscoveryOccurrence.AnalysisCompleted} - */ - public static final class AnalysisCompleted extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) - AnalysisCompletedOrBuilder { - private static final long serialVersionUID = 0L; - // Use AnalysisCompleted.newBuilder() to construct. - private AnalysisCompleted(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnalysisCompleted() { - analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnalysisCompleted(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.class, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder.class); - } - - public static final int ANALYSIS_TYPE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList analysisType_; - /** - * repeated string analysis_type = 1; - * @return A list containing the analysisType. - */ - public com.google.protobuf.ProtocolStringList - getAnalysisTypeList() { - return analysisType_; - } - /** - * repeated string analysis_type = 1; - * @return The count of analysisType. - */ - public int getAnalysisTypeCount() { - return analysisType_.size(); - } - /** - * repeated string analysis_type = 1; - * @param index The index of the element to return. - * @return The analysisType at the given index. - */ - public java.lang.String getAnalysisType(int index) { - return analysisType_.get(index); - } - /** - * repeated string analysis_type = 1; - * @param index The index of the value to return. - * @return The bytes of the analysisType at the given index. - */ - public com.google.protobuf.ByteString - getAnalysisTypeBytes(int index) { - return analysisType_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < analysisType_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, analysisType_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < analysisType_.size(); i++) { - dataSize += computeStringSizeNoTag(analysisType_.getRaw(i)); - } - size += dataSize; - size += 1 * getAnalysisTypeList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted)) { - return super.equals(obj); - } - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted other = (io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) obj; - - if (!getAnalysisTypeList() - .equals(other.getAnalysisTypeList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAnalysisTypeCount() > 0) { - hash = (37 * hash) + ANALYSIS_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAnalysisTypeList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Indicates which analysis completed successfully. Multiple types of
-     * analysis can be performed on a single resource.
-     * 
- * - * Protobuf type {@code grafeas.v1.DiscoveryOccurrence.AnalysisCompleted} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.class, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder.class); - } - - // Construct using io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_AnalysisCompleted_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getDefaultInstanceForType() { - return io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted build() { - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted buildPartial() { - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result = new io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result) { - if (((bitField0_ & 0x00000001) != 0)) { - analysisType_ = analysisType_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.analysisType_ = analysisType_; - } - - private void buildPartial0(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) { - return mergeFrom((io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted other) { - if (other == io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance()) return this; - if (!other.analysisType_.isEmpty()) { - if (analysisType_.isEmpty()) { - analysisType_ = other.analysisType_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAnalysisTypeIsMutable(); - analysisType_.addAll(other.analysisType_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - ensureAnalysisTypeIsMutable(); - analysisType_.add(s); - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAnalysisTypeIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - analysisType_ = new com.google.protobuf.LazyStringArrayList(analysisType_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated string analysis_type = 1; - * @return A list containing the analysisType. - */ - public com.google.protobuf.ProtocolStringList - getAnalysisTypeList() { - return analysisType_.getUnmodifiableView(); - } - /** - * repeated string analysis_type = 1; - * @return The count of analysisType. - */ - public int getAnalysisTypeCount() { - return analysisType_.size(); - } - /** - * repeated string analysis_type = 1; - * @param index The index of the element to return. - * @return The analysisType at the given index. - */ - public java.lang.String getAnalysisType(int index) { - return analysisType_.get(index); - } - /** - * repeated string analysis_type = 1; - * @param index The index of the value to return. - * @return The bytes of the analysisType at the given index. - */ - public com.google.protobuf.ByteString - getAnalysisTypeBytes(int index) { - return analysisType_.getByteString(index); - } - /** - * repeated string analysis_type = 1; - * @param index The index to set the value at. - * @param value The analysisType to set. - * @return This builder for chaining. - */ - public Builder setAnalysisType( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureAnalysisTypeIsMutable(); - analysisType_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string analysis_type = 1; - * @param value The analysisType to add. - * @return This builder for chaining. - */ - public Builder addAnalysisType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureAnalysisTypeIsMutable(); - analysisType_.add(value); - onChanged(); - return this; - } - /** - * repeated string analysis_type = 1; - * @param values The analysisType to add. - * @return This builder for chaining. - */ - public Builder addAllAnalysisType( - java.lang.Iterable values) { - ensureAnalysisTypeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, analysisType_); - onChanged(); - return this; - } - /** - * repeated string analysis_type = 1; - * @return This builder for chaining. - */ - public Builder clearAnalysisType() { - analysisType_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated string analysis_type = 1; - * @param value The bytes of the analysisType to add. - * @return This builder for chaining. - */ - public Builder addAnalysisTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureAnalysisTypeIsMutable(); - analysisType_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DiscoveryOccurrence.AnalysisCompleted) - private static final io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted(); - } - - public static io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnalysisCompleted parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int CONTINUOUS_ANALYSIS_FIELD_NUMBER = 1; - private int continuousAnalysis_ = 0; - /** - *
-   * Whether the resource is continuously analyzed.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return The enum numeric value on the wire for continuousAnalysis. - */ - @java.lang.Override public int getContinuousAnalysisValue() { - return continuousAnalysis_; - } - /** - *
-   * Whether the resource is continuously analyzed.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return The continuousAnalysis. - */ - @java.lang.Override public io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis getContinuousAnalysis() { - io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis result = io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.forNumber(continuousAnalysis_); - return result == null ? io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.UNRECOGNIZED : result; - } - - public static final int ANALYSIS_STATUS_FIELD_NUMBER = 2; - private int analysisStatus_ = 0; - /** - *
-   * The status of discovery for the resource.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return The enum numeric value on the wire for analysisStatus. - */ - @java.lang.Override public int getAnalysisStatusValue() { - return analysisStatus_; - } - /** - *
-   * The status of discovery for the resource.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return The analysisStatus. - */ - @java.lang.Override public io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus getAnalysisStatus() { - io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus result = io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.forNumber(analysisStatus_); - return result == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.UNRECOGNIZED : result; - } - - public static final int ANALYSIS_COMPLETED_FIELD_NUMBER = 7; - private io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysisCompleted_; - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @return Whether the analysisCompleted field is set. - */ - @java.lang.Override - public boolean hasAnalysisCompleted() { - return analysisCompleted_ != null; - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @return The analysisCompleted. - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getAnalysisCompleted() { - return analysisCompleted_ == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder getAnalysisCompletedOrBuilder() { - return analysisCompleted_ == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; - } - - public static final int ANALYSIS_ERROR_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private java.util.List analysisError_; - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - @java.lang.Override - public java.util.List getAnalysisErrorList() { - return analysisError_; - } - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - @java.lang.Override - public java.util.List - getAnalysisErrorOrBuilderList() { - return analysisError_; - } - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - @java.lang.Override - public int getAnalysisErrorCount() { - return analysisError_.size(); - } - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - @java.lang.Override - public com.google.rpc.Status getAnalysisError(int index) { - return analysisError_.get(index); - } - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getAnalysisErrorOrBuilder( - int index) { - return analysisError_.get(index); - } - - public static final int ANALYSIS_STATUS_ERROR_FIELD_NUMBER = 3; - private com.google.rpc.Status analysisStatusError_; - /** - *
-   * When an error is encountered this will contain a LocalizedMessage under
-   * details to show to the user. The LocalizedMessage is output only and
-   * populated by the API.
-   * 
- * - * .google.rpc.Status analysis_status_error = 3; - * @return Whether the analysisStatusError field is set. - */ - @java.lang.Override - public boolean hasAnalysisStatusError() { - return analysisStatusError_ != null; - } - /** - *
-   * When an error is encountered this will contain a LocalizedMessage under
-   * details to show to the user. The LocalizedMessage is output only and
-   * populated by the API.
-   * 
- * - * .google.rpc.Status analysis_status_error = 3; - * @return The analysisStatusError. - */ - @java.lang.Override - public com.google.rpc.Status getAnalysisStatusError() { - return analysisStatusError_ == null ? com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; - } - /** - *
-   * When an error is encountered this will contain a LocalizedMessage under
-   * details to show to the user. The LocalizedMessage is output only and
-   * populated by the API.
-   * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getAnalysisStatusErrorOrBuilder() { - return analysisStatusError_ == null ? com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; - } - - public static final int CPE_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object cpe_ = ""; - /** - *
-   * The CPE of the resource being scanned.
-   * 
- * - * string cpe = 4; - * @return The cpe. - */ - @java.lang.Override - public java.lang.String getCpe() { - java.lang.Object ref = cpe_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpe_ = s; - return s; - } - } - /** - *
-   * The CPE of the resource being scanned.
-   * 
- * - * string cpe = 4; - * @return The bytes for cpe. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeBytes() { - java.lang.Object ref = cpe_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpe_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LAST_SCAN_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp lastScanTime_; - /** - *
-   * The last time this resource was scanned.
-   * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - * @return Whether the lastScanTime field is set. - */ - @java.lang.Override - public boolean hasLastScanTime() { - return lastScanTime_ != null; - } - /** - *
-   * The last time this resource was scanned.
-   * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - * @return The lastScanTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLastScanTime() { - return lastScanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; - } - /** - *
-   * The last time this resource was scanned.
-   * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLastScanTimeOrBuilder() { - return lastScanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; - } - - public static final int ARCHIVE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp archiveTime_; - /** - *
-   * The time occurrences related to this discovery occurrence were archived.
-   * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the archiveTime field is set. - */ - @java.lang.Override - public boolean hasArchiveTime() { - return archiveTime_ != null; - } - /** - *
-   * The time occurrences related to this discovery occurrence were archived.
-   * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The archiveTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getArchiveTime() { - return archiveTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; - } - /** - *
-   * The time occurrences related to this discovery occurrence were archived.
-   * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getArchiveTimeOrBuilder() { - return archiveTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (continuousAnalysis_ != io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.CONTINUOUS_ANALYSIS_UNSPECIFIED.getNumber()) { - output.writeEnum(1, continuousAnalysis_); - } - if (analysisStatus_ != io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.ANALYSIS_STATUS_UNSPECIFIED.getNumber()) { - output.writeEnum(2, analysisStatus_); - } - if (analysisStatusError_ != null) { - output.writeMessage(3, getAnalysisStatusError()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpe_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cpe_); - } - if (lastScanTime_ != null) { - output.writeMessage(5, getLastScanTime()); - } - if (archiveTime_ != null) { - output.writeMessage(6, getArchiveTime()); - } - if (analysisCompleted_ != null) { - output.writeMessage(7, getAnalysisCompleted()); - } - for (int i = 0; i < analysisError_.size(); i++) { - output.writeMessage(8, analysisError_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (continuousAnalysis_ != io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.CONTINUOUS_ANALYSIS_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, continuousAnalysis_); - } - if (analysisStatus_ != io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.ANALYSIS_STATUS_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, analysisStatus_); - } - if (analysisStatusError_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getAnalysisStatusError()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpe_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cpe_); - } - if (lastScanTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getLastScanTime()); - } - if (archiveTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getArchiveTime()); - } - if (analysisCompleted_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getAnalysisCompleted()); - } - for (int i = 0; i < analysisError_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, analysisError_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.DiscoveryOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.DiscoveryOccurrence other = (io.grafeas.v1.DiscoveryOccurrence) obj; - - if (continuousAnalysis_ != other.continuousAnalysis_) return false; - if (analysisStatus_ != other.analysisStatus_) return false; - if (hasAnalysisCompleted() != other.hasAnalysisCompleted()) return false; - if (hasAnalysisCompleted()) { - if (!getAnalysisCompleted() - .equals(other.getAnalysisCompleted())) return false; - } - if (!getAnalysisErrorList() - .equals(other.getAnalysisErrorList())) return false; - if (hasAnalysisStatusError() != other.hasAnalysisStatusError()) return false; - if (hasAnalysisStatusError()) { - if (!getAnalysisStatusError() - .equals(other.getAnalysisStatusError())) return false; - } - if (!getCpe() - .equals(other.getCpe())) return false; - if (hasLastScanTime() != other.hasLastScanTime()) return false; - if (hasLastScanTime()) { - if (!getLastScanTime() - .equals(other.getLastScanTime())) return false; - } - if (hasArchiveTime() != other.hasArchiveTime()) return false; - if (hasArchiveTime()) { - if (!getArchiveTime() - .equals(other.getArchiveTime())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONTINUOUS_ANALYSIS_FIELD_NUMBER; - hash = (53 * hash) + continuousAnalysis_; - hash = (37 * hash) + ANALYSIS_STATUS_FIELD_NUMBER; - hash = (53 * hash) + analysisStatus_; - if (hasAnalysisCompleted()) { - hash = (37 * hash) + ANALYSIS_COMPLETED_FIELD_NUMBER; - hash = (53 * hash) + getAnalysisCompleted().hashCode(); - } - if (getAnalysisErrorCount() > 0) { - hash = (37 * hash) + ANALYSIS_ERROR_FIELD_NUMBER; - hash = (53 * hash) + getAnalysisErrorList().hashCode(); - } - if (hasAnalysisStatusError()) { - hash = (37 * hash) + ANALYSIS_STATUS_ERROR_FIELD_NUMBER; - hash = (53 * hash) + getAnalysisStatusError().hashCode(); - } - hash = (37 * hash) + CPE_FIELD_NUMBER; - hash = (53 * hash) + getCpe().hashCode(); - if (hasLastScanTime()) { - hash = (37 * hash) + LAST_SCAN_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLastScanTime().hashCode(); - } - if (hasArchiveTime()) { - hash = (37 * hash) + ARCHIVE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getArchiveTime().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.DiscoveryOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.DiscoveryOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Provides information about the analysis status of a discovered resource.
-   * 
- * - * Protobuf type {@code grafeas.v1.DiscoveryOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.DiscoveryOccurrence) - io.grafeas.v1.DiscoveryOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.DiscoveryOccurrence.class, io.grafeas.v1.DiscoveryOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.DiscoveryOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - continuousAnalysis_ = 0; - analysisStatus_ = 0; - analysisCompleted_ = null; - if (analysisCompletedBuilder_ != null) { - analysisCompletedBuilder_.dispose(); - analysisCompletedBuilder_ = null; - } - if (analysisErrorBuilder_ == null) { - analysisError_ = java.util.Collections.emptyList(); - } else { - analysisError_ = null; - analysisErrorBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - analysisStatusError_ = null; - if (analysisStatusErrorBuilder_ != null) { - analysisStatusErrorBuilder_.dispose(); - analysisStatusErrorBuilder_ = null; - } - cpe_ = ""; - lastScanTime_ = null; - if (lastScanTimeBuilder_ != null) { - lastScanTimeBuilder_.dispose(); - lastScanTimeBuilder_ = null; - } - archiveTime_ = null; - if (archiveTimeBuilder_ != null) { - archiveTimeBuilder_.dispose(); - archiveTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Discovery.internal_static_grafeas_v1_DiscoveryOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence build() { - io.grafeas.v1.DiscoveryOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence buildPartial() { - io.grafeas.v1.DiscoveryOccurrence result = new io.grafeas.v1.DiscoveryOccurrence(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.DiscoveryOccurrence result) { - if (analysisErrorBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - analysisError_ = java.util.Collections.unmodifiableList(analysisError_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.analysisError_ = analysisError_; - } else { - result.analysisError_ = analysisErrorBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.DiscoveryOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.continuousAnalysis_ = continuousAnalysis_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.analysisStatus_ = analysisStatus_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.analysisCompleted_ = analysisCompletedBuilder_ == null - ? analysisCompleted_ - : analysisCompletedBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.analysisStatusError_ = analysisStatusErrorBuilder_ == null - ? analysisStatusError_ - : analysisStatusErrorBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.cpe_ = cpe_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.lastScanTime_ = lastScanTimeBuilder_ == null - ? lastScanTime_ - : lastScanTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.archiveTime_ = archiveTimeBuilder_ == null - ? archiveTime_ - : archiveTimeBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.DiscoveryOccurrence) { - return mergeFrom((io.grafeas.v1.DiscoveryOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.DiscoveryOccurrence other) { - if (other == io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance()) return this; - if (other.continuousAnalysis_ != 0) { - setContinuousAnalysisValue(other.getContinuousAnalysisValue()); - } - if (other.analysisStatus_ != 0) { - setAnalysisStatusValue(other.getAnalysisStatusValue()); - } - if (other.hasAnalysisCompleted()) { - mergeAnalysisCompleted(other.getAnalysisCompleted()); - } - if (analysisErrorBuilder_ == null) { - if (!other.analysisError_.isEmpty()) { - if (analysisError_.isEmpty()) { - analysisError_ = other.analysisError_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAnalysisErrorIsMutable(); - analysisError_.addAll(other.analysisError_); - } - onChanged(); - } - } else { - if (!other.analysisError_.isEmpty()) { - if (analysisErrorBuilder_.isEmpty()) { - analysisErrorBuilder_.dispose(); - analysisErrorBuilder_ = null; - analysisError_ = other.analysisError_; - bitField0_ = (bitField0_ & ~0x00000008); - analysisErrorBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAnalysisErrorFieldBuilder() : null; - } else { - analysisErrorBuilder_.addAllMessages(other.analysisError_); - } - } - } - if (other.hasAnalysisStatusError()) { - mergeAnalysisStatusError(other.getAnalysisStatusError()); - } - if (!other.getCpe().isEmpty()) { - cpe_ = other.cpe_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (other.hasLastScanTime()) { - mergeLastScanTime(other.getLastScanTime()); - } - if (other.hasArchiveTime()) { - mergeArchiveTime(other.getArchiveTime()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - continuousAnalysis_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - analysisStatus_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - input.readMessage( - getAnalysisStatusErrorFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 26 - case 34: { - cpe_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 34 - case 42: { - input.readMessage( - getLastScanTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 42 - case 50: { - input.readMessage( - getArchiveTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 50 - case 58: { - input.readMessage( - getAnalysisCompletedFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 58 - case 66: { - com.google.rpc.Status m = - input.readMessage( - com.google.rpc.Status.parser(), - extensionRegistry); - if (analysisErrorBuilder_ == null) { - ensureAnalysisErrorIsMutable(); - analysisError_.add(m); - } else { - analysisErrorBuilder_.addMessage(m); - } - break; - } // case 66 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int continuousAnalysis_ = 0; - /** - *
-     * Whether the resource is continuously analyzed.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return The enum numeric value on the wire for continuousAnalysis. - */ - @java.lang.Override public int getContinuousAnalysisValue() { - return continuousAnalysis_; - } - /** - *
-     * Whether the resource is continuously analyzed.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @param value The enum numeric value on the wire for continuousAnalysis to set. - * @return This builder for chaining. - */ - public Builder setContinuousAnalysisValue(int value) { - continuousAnalysis_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Whether the resource is continuously analyzed.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return The continuousAnalysis. - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis getContinuousAnalysis() { - io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis result = io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.forNumber(continuousAnalysis_); - return result == null ? io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis.UNRECOGNIZED : result; - } - /** - *
-     * Whether the resource is continuously analyzed.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @param value The continuousAnalysis to set. - * @return This builder for chaining. - */ - public Builder setContinuousAnalysis(io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - continuousAnalysis_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Whether the resource is continuously analyzed.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return This builder for chaining. - */ - public Builder clearContinuousAnalysis() { - bitField0_ = (bitField0_ & ~0x00000001); - continuousAnalysis_ = 0; - onChanged(); - return this; - } - - private int analysisStatus_ = 0; - /** - *
-     * The status of discovery for the resource.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return The enum numeric value on the wire for analysisStatus. - */ - @java.lang.Override public int getAnalysisStatusValue() { - return analysisStatus_; - } - /** - *
-     * The status of discovery for the resource.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @param value The enum numeric value on the wire for analysisStatus to set. - * @return This builder for chaining. - */ - public Builder setAnalysisStatusValue(int value) { - analysisStatus_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The status of discovery for the resource.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return The analysisStatus. - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus getAnalysisStatus() { - io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus result = io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.forNumber(analysisStatus_); - return result == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus.UNRECOGNIZED : result; - } - /** - *
-     * The status of discovery for the resource.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @param value The analysisStatus to set. - * @return This builder for chaining. - */ - public Builder setAnalysisStatus(io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - analysisStatus_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The status of discovery for the resource.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return This builder for chaining. - */ - public Builder clearAnalysisStatus() { - bitField0_ = (bitField0_ & ~0x00000002); - analysisStatus_ = 0; - onChanged(); - return this; - } - - private io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysisCompleted_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder> analysisCompletedBuilder_; - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @return Whether the analysisCompleted field is set. - */ - public boolean hasAnalysisCompleted() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @return The analysisCompleted. - */ - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getAnalysisCompleted() { - if (analysisCompletedBuilder_ == null) { - return analysisCompleted_ == null ? io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; - } else { - return analysisCompletedBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - public Builder setAnalysisCompleted(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted value) { - if (analysisCompletedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - analysisCompleted_ = value; - } else { - analysisCompletedBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - public Builder setAnalysisCompleted( - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder builderForValue) { - if (analysisCompletedBuilder_ == null) { - analysisCompleted_ = builderForValue.build(); - } else { - analysisCompletedBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - public Builder mergeAnalysisCompleted(io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted value) { - if (analysisCompletedBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - analysisCompleted_ != null && - analysisCompleted_ != io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance()) { - getAnalysisCompletedBuilder().mergeFrom(value); - } else { - analysisCompleted_ = value; - } - } else { - analysisCompletedBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - public Builder clearAnalysisCompleted() { - bitField0_ = (bitField0_ & ~0x00000004); - analysisCompleted_ = null; - if (analysisCompletedBuilder_ != null) { - analysisCompletedBuilder_.dispose(); - analysisCompletedBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder getAnalysisCompletedBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getAnalysisCompletedFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - public io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder getAnalysisCompletedOrBuilder() { - if (analysisCompletedBuilder_ != null) { - return analysisCompletedBuilder_.getMessageOrBuilder(); - } else { - return analysisCompleted_ == null ? - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.getDefaultInstance() : analysisCompleted_; - } - } - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder> - getAnalysisCompletedFieldBuilder() { - if (analysisCompletedBuilder_ == null) { - analysisCompletedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted.Builder, io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder>( - getAnalysisCompleted(), - getParentForChildren(), - isClean()); - analysisCompleted_ = null; - } - return analysisCompletedBuilder_; - } - - private java.util.List analysisError_ = - java.util.Collections.emptyList(); - private void ensureAnalysisErrorIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - analysisError_ = new java.util.ArrayList(analysisError_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> analysisErrorBuilder_; - - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public java.util.List getAnalysisErrorList() { - if (analysisErrorBuilder_ == null) { - return java.util.Collections.unmodifiableList(analysisError_); - } else { - return analysisErrorBuilder_.getMessageList(); - } - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public int getAnalysisErrorCount() { - if (analysisErrorBuilder_ == null) { - return analysisError_.size(); - } else { - return analysisErrorBuilder_.getCount(); - } - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public com.google.rpc.Status getAnalysisError(int index) { - if (analysisErrorBuilder_ == null) { - return analysisError_.get(index); - } else { - return analysisErrorBuilder_.getMessage(index); - } - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder setAnalysisError( - int index, com.google.rpc.Status value) { - if (analysisErrorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnalysisErrorIsMutable(); - analysisError_.set(index, value); - onChanged(); - } else { - analysisErrorBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder setAnalysisError( - int index, com.google.rpc.Status.Builder builderForValue) { - if (analysisErrorBuilder_ == null) { - ensureAnalysisErrorIsMutable(); - analysisError_.set(index, builderForValue.build()); - onChanged(); - } else { - analysisErrorBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder addAnalysisError(com.google.rpc.Status value) { - if (analysisErrorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnalysisErrorIsMutable(); - analysisError_.add(value); - onChanged(); - } else { - analysisErrorBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder addAnalysisError( - int index, com.google.rpc.Status value) { - if (analysisErrorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnalysisErrorIsMutable(); - analysisError_.add(index, value); - onChanged(); - } else { - analysisErrorBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder addAnalysisError( - com.google.rpc.Status.Builder builderForValue) { - if (analysisErrorBuilder_ == null) { - ensureAnalysisErrorIsMutable(); - analysisError_.add(builderForValue.build()); - onChanged(); - } else { - analysisErrorBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder addAnalysisError( - int index, com.google.rpc.Status.Builder builderForValue) { - if (analysisErrorBuilder_ == null) { - ensureAnalysisErrorIsMutable(); - analysisError_.add(index, builderForValue.build()); - onChanged(); - } else { - analysisErrorBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder addAllAnalysisError( - java.lang.Iterable values) { - if (analysisErrorBuilder_ == null) { - ensureAnalysisErrorIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, analysisError_); - onChanged(); - } else { - analysisErrorBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder clearAnalysisError() { - if (analysisErrorBuilder_ == null) { - analysisError_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - analysisErrorBuilder_.clear(); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public Builder removeAnalysisError(int index) { - if (analysisErrorBuilder_ == null) { - ensureAnalysisErrorIsMutable(); - analysisError_.remove(index); - onChanged(); - } else { - analysisErrorBuilder_.remove(index); - } - return this; - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public com.google.rpc.Status.Builder getAnalysisErrorBuilder( - int index) { - return getAnalysisErrorFieldBuilder().getBuilder(index); - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public com.google.rpc.StatusOrBuilder getAnalysisErrorOrBuilder( - int index) { - if (analysisErrorBuilder_ == null) { - return analysisError_.get(index); } else { - return analysisErrorBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public java.util.List - getAnalysisErrorOrBuilderList() { - if (analysisErrorBuilder_ != null) { - return analysisErrorBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(analysisError_); - } - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public com.google.rpc.Status.Builder addAnalysisErrorBuilder() { - return getAnalysisErrorFieldBuilder().addBuilder( - com.google.rpc.Status.getDefaultInstance()); - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public com.google.rpc.Status.Builder addAnalysisErrorBuilder( - int index) { - return getAnalysisErrorFieldBuilder().addBuilder( - index, com.google.rpc.Status.getDefaultInstance()); - } - /** - *
-     * Indicates any errors encountered during analysis of a resource. There
-     * could be 0 or more of these errors.
-     * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - public java.util.List - getAnalysisErrorBuilderList() { - return getAnalysisErrorFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getAnalysisErrorFieldBuilder() { - if (analysisErrorBuilder_ == null) { - analysisErrorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - analysisError_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - analysisError_ = null; - } - return analysisErrorBuilder_; - } - - private com.google.rpc.Status analysisStatusError_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> analysisStatusErrorBuilder_; - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - * @return Whether the analysisStatusError field is set. - */ - public boolean hasAnalysisStatusError() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - * @return The analysisStatusError. - */ - public com.google.rpc.Status getAnalysisStatusError() { - if (analysisStatusErrorBuilder_ == null) { - return analysisStatusError_ == null ? com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; - } else { - return analysisStatusErrorBuilder_.getMessage(); - } - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - public Builder setAnalysisStatusError(com.google.rpc.Status value) { - if (analysisStatusErrorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - analysisStatusError_ = value; - } else { - analysisStatusErrorBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - public Builder setAnalysisStatusError( - com.google.rpc.Status.Builder builderForValue) { - if (analysisStatusErrorBuilder_ == null) { - analysisStatusError_ = builderForValue.build(); - } else { - analysisStatusErrorBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - public Builder mergeAnalysisStatusError(com.google.rpc.Status value) { - if (analysisStatusErrorBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - analysisStatusError_ != null && - analysisStatusError_ != com.google.rpc.Status.getDefaultInstance()) { - getAnalysisStatusErrorBuilder().mergeFrom(value); - } else { - analysisStatusError_ = value; - } - } else { - analysisStatusErrorBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - public Builder clearAnalysisStatusError() { - bitField0_ = (bitField0_ & ~0x00000010); - analysisStatusError_ = null; - if (analysisStatusErrorBuilder_ != null) { - analysisStatusErrorBuilder_.dispose(); - analysisStatusErrorBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - public com.google.rpc.Status.Builder getAnalysisStatusErrorBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getAnalysisStatusErrorFieldBuilder().getBuilder(); - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - public com.google.rpc.StatusOrBuilder getAnalysisStatusErrorOrBuilder() { - if (analysisStatusErrorBuilder_ != null) { - return analysisStatusErrorBuilder_.getMessageOrBuilder(); - } else { - return analysisStatusError_ == null ? - com.google.rpc.Status.getDefaultInstance() : analysisStatusError_; - } - } - /** - *
-     * When an error is encountered this will contain a LocalizedMessage under
-     * details to show to the user. The LocalizedMessage is output only and
-     * populated by the API.
-     * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getAnalysisStatusErrorFieldBuilder() { - if (analysisStatusErrorBuilder_ == null) { - analysisStatusErrorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getAnalysisStatusError(), - getParentForChildren(), - isClean()); - analysisStatusError_ = null; - } - return analysisStatusErrorBuilder_; - } - - private java.lang.Object cpe_ = ""; - /** - *
-     * The CPE of the resource being scanned.
-     * 
- * - * string cpe = 4; - * @return The cpe. - */ - public java.lang.String getCpe() { - java.lang.Object ref = cpe_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpe_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The CPE of the resource being scanned.
-     * 
- * - * string cpe = 4; - * @return The bytes for cpe. - */ - public com.google.protobuf.ByteString - getCpeBytes() { - java.lang.Object ref = cpe_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpe_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The CPE of the resource being scanned.
-     * 
- * - * string cpe = 4; - * @param value The cpe to set. - * @return This builder for chaining. - */ - public Builder setCpe( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpe_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The CPE of the resource being scanned.
-     * 
- * - * string cpe = 4; - * @return This builder for chaining. - */ - public Builder clearCpe() { - cpe_ = getDefaultInstance().getCpe(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * The CPE of the resource being scanned.
-     * 
- * - * string cpe = 4; - * @param value The bytes for cpe to set. - * @return This builder for chaining. - */ - public Builder setCpeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpe_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp lastScanTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastScanTimeBuilder_; - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - * @return Whether the lastScanTime field is set. - */ - public boolean hasLastScanTime() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - * @return The lastScanTime. - */ - public com.google.protobuf.Timestamp getLastScanTime() { - if (lastScanTimeBuilder_ == null) { - return lastScanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; - } else { - return lastScanTimeBuilder_.getMessage(); - } - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - public Builder setLastScanTime(com.google.protobuf.Timestamp value) { - if (lastScanTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lastScanTime_ = value; - } else { - lastScanTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - public Builder setLastScanTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (lastScanTimeBuilder_ == null) { - lastScanTime_ = builderForValue.build(); - } else { - lastScanTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - public Builder mergeLastScanTime(com.google.protobuf.Timestamp value) { - if (lastScanTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - lastScanTime_ != null && - lastScanTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getLastScanTimeBuilder().mergeFrom(value); - } else { - lastScanTime_ = value; - } - } else { - lastScanTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - public Builder clearLastScanTime() { - bitField0_ = (bitField0_ & ~0x00000040); - lastScanTime_ = null; - if (lastScanTimeBuilder_ != null) { - lastScanTimeBuilder_.dispose(); - lastScanTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - public com.google.protobuf.Timestamp.Builder getLastScanTimeBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getLastScanTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - public com.google.protobuf.TimestampOrBuilder getLastScanTimeOrBuilder() { - if (lastScanTimeBuilder_ != null) { - return lastScanTimeBuilder_.getMessageOrBuilder(); - } else { - return lastScanTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : lastScanTime_; - } - } - /** - *
-     * The last time this resource was scanned.
-     * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getLastScanTimeFieldBuilder() { - if (lastScanTimeBuilder_ == null) { - lastScanTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getLastScanTime(), - getParentForChildren(), - isClean()); - lastScanTime_ = null; - } - return lastScanTimeBuilder_; - } - - private com.google.protobuf.Timestamp archiveTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> archiveTimeBuilder_; - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the archiveTime field is set. - */ - public boolean hasArchiveTime() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The archiveTime. - */ - public com.google.protobuf.Timestamp getArchiveTime() { - if (archiveTimeBuilder_ == null) { - return archiveTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; - } else { - return archiveTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setArchiveTime(com.google.protobuf.Timestamp value) { - if (archiveTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - archiveTime_ = value; - } else { - archiveTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setArchiveTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (archiveTimeBuilder_ == null) { - archiveTime_ = builderForValue.build(); - } else { - archiveTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeArchiveTime(com.google.protobuf.Timestamp value) { - if (archiveTimeBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) && - archiveTime_ != null && - archiveTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getArchiveTimeBuilder().mergeFrom(value); - } else { - archiveTime_ = value; - } - } else { - archiveTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearArchiveTime() { - bitField0_ = (bitField0_ & ~0x00000080); - archiveTime_ = null; - if (archiveTimeBuilder_ != null) { - archiveTimeBuilder_.dispose(); - archiveTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getArchiveTimeBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return getArchiveTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getArchiveTimeOrBuilder() { - if (archiveTimeBuilder_ != null) { - return archiveTimeBuilder_.getMessageOrBuilder(); - } else { - return archiveTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : archiveTime_; - } - } - /** - *
-     * The time occurrences related to this discovery occurrence were archived.
-     * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getArchiveTimeFieldBuilder() { - if (archiveTimeBuilder_ == null) { - archiveTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getArchiveTime(), - getParentForChildren(), - isClean()); - archiveTime_ = null; - } - return archiveTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.DiscoveryOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.DiscoveryOccurrence) - private static final io.grafeas.v1.DiscoveryOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.DiscoveryOccurrence(); - } - - public static io.grafeas.v1.DiscoveryOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DiscoveryOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java deleted file mode 100644 index 6d5434fd5737..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java +++ /dev/null @@ -1,218 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/discovery.proto - -package io.grafeas.v1; - -public interface DiscoveryOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.DiscoveryOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Whether the resource is continuously analyzed.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return The enum numeric value on the wire for continuousAnalysis. - */ - int getContinuousAnalysisValue(); - /** - *
-   * Whether the resource is continuously analyzed.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return The continuousAnalysis. - */ - io.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis getContinuousAnalysis(); - - /** - *
-   * The status of discovery for the resource.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return The enum numeric value on the wire for analysisStatus. - */ - int getAnalysisStatusValue(); - /** - *
-   * The status of discovery for the resource.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return The analysisStatus. - */ - io.grafeas.v1.DiscoveryOccurrence.AnalysisStatus getAnalysisStatus(); - - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @return Whether the analysisCompleted field is set. - */ - boolean hasAnalysisCompleted(); - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @return The analysisCompleted. - */ - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted getAnalysisCompleted(); - /** - * .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - io.grafeas.v1.DiscoveryOccurrence.AnalysisCompletedOrBuilder getAnalysisCompletedOrBuilder(); - - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - java.util.List - getAnalysisErrorList(); - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - com.google.rpc.Status getAnalysisError(int index); - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - int getAnalysisErrorCount(); - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - java.util.List - getAnalysisErrorOrBuilderList(); - /** - *
-   * Indicates any errors encountered during analysis of a resource. There
-   * could be 0 or more of these errors.
-   * 
- * - * repeated .google.rpc.Status analysis_error = 8; - */ - com.google.rpc.StatusOrBuilder getAnalysisErrorOrBuilder( - int index); - - /** - *
-   * When an error is encountered this will contain a LocalizedMessage under
-   * details to show to the user. The LocalizedMessage is output only and
-   * populated by the API.
-   * 
- * - * .google.rpc.Status analysis_status_error = 3; - * @return Whether the analysisStatusError field is set. - */ - boolean hasAnalysisStatusError(); - /** - *
-   * When an error is encountered this will contain a LocalizedMessage under
-   * details to show to the user. The LocalizedMessage is output only and
-   * populated by the API.
-   * 
- * - * .google.rpc.Status analysis_status_error = 3; - * @return The analysisStatusError. - */ - com.google.rpc.Status getAnalysisStatusError(); - /** - *
-   * When an error is encountered this will contain a LocalizedMessage under
-   * details to show to the user. The LocalizedMessage is output only and
-   * populated by the API.
-   * 
- * - * .google.rpc.Status analysis_status_error = 3; - */ - com.google.rpc.StatusOrBuilder getAnalysisStatusErrorOrBuilder(); - - /** - *
-   * The CPE of the resource being scanned.
-   * 
- * - * string cpe = 4; - * @return The cpe. - */ - java.lang.String getCpe(); - /** - *
-   * The CPE of the resource being scanned.
-   * 
- * - * string cpe = 4; - * @return The bytes for cpe. - */ - com.google.protobuf.ByteString - getCpeBytes(); - - /** - *
-   * The last time this resource was scanned.
-   * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - * @return Whether the lastScanTime field is set. - */ - boolean hasLastScanTime(); - /** - *
-   * The last time this resource was scanned.
-   * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - * @return The lastScanTime. - */ - com.google.protobuf.Timestamp getLastScanTime(); - /** - *
-   * The last time this resource was scanned.
-   * 
- * - * .google.protobuf.Timestamp last_scan_time = 5; - */ - com.google.protobuf.TimestampOrBuilder getLastScanTimeOrBuilder(); - - /** - *
-   * The time occurrences related to this discovery occurrence were archived.
-   * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the archiveTime field is set. - */ - boolean hasArchiveTime(); - /** - *
-   * The time occurrences related to this discovery occurrence were archived.
-   * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The archiveTime. - */ - com.google.protobuf.Timestamp getArchiveTime(); - /** - *
-   * The time occurrences related to this discovery occurrence were archived.
-   * 
- * - * .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getArchiveTimeOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java deleted file mode 100644 index fe74a108d6d7..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Distribution.java +++ /dev/null @@ -1,1439 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -/** - *
- * This represents a particular channel of distribution for a given package.
- * E.g., Debian's jessie-backports dpkg mirror.
- * 
- * - * Protobuf type {@code grafeas.v1.Distribution} - */ -public final class Distribution extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Distribution) - DistributionOrBuilder { -private static final long serialVersionUID = 0L; - // Use Distribution.newBuilder() to construct. - private Distribution(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Distribution() { - cpeUri_ = ""; - architecture_ = 0; - maintainer_ = ""; - url_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Distribution(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Distribution.class, io.grafeas.v1.Distribution.Builder.class); - } - - public static final int CPE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object cpeUri_ = ""; - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The cpeUri. - */ - @java.lang.Override - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } - } - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for cpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARCHITECTURE_FIELD_NUMBER = 2; - private int architecture_ = 0; - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built.
-   * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @return The enum numeric value on the wire for architecture. - */ - @java.lang.Override public int getArchitectureValue() { - return architecture_; - } - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built.
-   * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @return The architecture. - */ - @java.lang.Override public io.grafeas.v1.Architecture getArchitecture() { - io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); - return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; - } - - public static final int LATEST_VERSION_FIELD_NUMBER = 3; - private io.grafeas.v1.Version latestVersion_; - /** - *
-   * The latest available version of this package in this distribution channel.
-   * 
- * - * .grafeas.v1.Version latest_version = 3; - * @return Whether the latestVersion field is set. - */ - @java.lang.Override - public boolean hasLatestVersion() { - return latestVersion_ != null; - } - /** - *
-   * The latest available version of this package in this distribution channel.
-   * 
- * - * .grafeas.v1.Version latest_version = 3; - * @return The latestVersion. - */ - @java.lang.Override - public io.grafeas.v1.Version getLatestVersion() { - return latestVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; - } - /** - *
-   * The latest available version of this package in this distribution channel.
-   * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getLatestVersionOrBuilder() { - return latestVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; - } - - public static final int MAINTAINER_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object maintainer_ = ""; - /** - *
-   * A freeform string denoting the maintainer of this package.
-   * 
- * - * string maintainer = 4; - * @return The maintainer. - */ - @java.lang.Override - public java.lang.String getMaintainer() { - java.lang.Object ref = maintainer_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - maintainer_ = s; - return s; - } - } - /** - *
-   * A freeform string denoting the maintainer of this package.
-   * 
- * - * string maintainer = 4; - * @return The bytes for maintainer. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMaintainerBytes() { - java.lang.Object ref = maintainer_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - maintainer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URL_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object url_ = ""; - /** - *
-   * The distribution channel-specific homepage for this package.
-   * 
- * - * string url = 5; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-   * The distribution channel-specific homepage for this package.
-   * 
- * - * string url = 5; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * The distribution channel-specific description of this package.
-   * 
- * - * string description = 6; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * The distribution channel-specific description of this package.
-   * 
- * - * string description = 6; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); - } - if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { - output.writeEnum(2, architecture_); - } - if (latestVersion_ != null) { - output.writeMessage(3, getLatestVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, maintainer_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); - } - if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, architecture_); - } - if (latestVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getLatestVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, maintainer_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Distribution)) { - return super.equals(obj); - } - io.grafeas.v1.Distribution other = (io.grafeas.v1.Distribution) obj; - - if (!getCpeUri() - .equals(other.getCpeUri())) return false; - if (architecture_ != other.architecture_) return false; - if (hasLatestVersion() != other.hasLatestVersion()) return false; - if (hasLatestVersion()) { - if (!getLatestVersion() - .equals(other.getLatestVersion())) return false; - } - if (!getMaintainer() - .equals(other.getMaintainer())) return false; - if (!getUrl() - .equals(other.getUrl())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCpeUri().hashCode(); - hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; - hash = (53 * hash) + architecture_; - if (hasLatestVersion()) { - hash = (37 * hash) + LATEST_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getLatestVersion().hashCode(); - } - hash = (37 * hash) + MAINTAINER_FIELD_NUMBER; - hash = (53 * hash) + getMaintainer().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Distribution parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Distribution parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Distribution parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Distribution parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Distribution parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Distribution parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Distribution parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Distribution parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Distribution parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Distribution parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Distribution parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Distribution parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Distribution prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * This represents a particular channel of distribution for a given package.
-   * E.g., Debian's jessie-backports dpkg mirror.
-   * 
- * - * Protobuf type {@code grafeas.v1.Distribution} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Distribution) - io.grafeas.v1.DistributionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Distribution.class, io.grafeas.v1.Distribution.Builder.class); - } - - // Construct using io.grafeas.v1.Distribution.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - cpeUri_ = ""; - architecture_ = 0; - latestVersion_ = null; - if (latestVersionBuilder_ != null) { - latestVersionBuilder_.dispose(); - latestVersionBuilder_ = null; - } - maintainer_ = ""; - url_ = ""; - description_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Distribution_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Distribution getDefaultInstanceForType() { - return io.grafeas.v1.Distribution.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Distribution build() { - io.grafeas.v1.Distribution result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Distribution buildPartial() { - io.grafeas.v1.Distribution result = new io.grafeas.v1.Distribution(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Distribution result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.cpeUri_ = cpeUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.architecture_ = architecture_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.latestVersion_ = latestVersionBuilder_ == null - ? latestVersion_ - : latestVersionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.maintainer_ = maintainer_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.url_ = url_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.description_ = description_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Distribution) { - return mergeFrom((io.grafeas.v1.Distribution)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Distribution other) { - if (other == io.grafeas.v1.Distribution.getDefaultInstance()) return this; - if (!other.getCpeUri().isEmpty()) { - cpeUri_ = other.cpeUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.architecture_ != 0) { - setArchitectureValue(other.getArchitectureValue()); - } - if (other.hasLatestVersion()) { - mergeLatestVersion(other.getLatestVersion()); - } - if (!other.getMaintainer().isEmpty()) { - maintainer_ = other.maintainer_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000020; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - cpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - architecture_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - input.readMessage( - getLatestVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - maintainer_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - url_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object cpeUri_ = ""; - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The cpeUri. - */ - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for cpeUri. - */ - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearCpeUri() { - cpeUri_ = getDefaultInstance().getCpeUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int architecture_ = 0; - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built.
-     * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @return The enum numeric value on the wire for architecture. - */ - @java.lang.Override public int getArchitectureValue() { - return architecture_; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built.
-     * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @param value The enum numeric value on the wire for architecture to set. - * @return This builder for chaining. - */ - public Builder setArchitectureValue(int value) { - architecture_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built.
-     * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @return The architecture. - */ - @java.lang.Override - public io.grafeas.v1.Architecture getArchitecture() { - io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); - return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built.
-     * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @param value The architecture to set. - * @return This builder for chaining. - */ - public Builder setArchitecture(io.grafeas.v1.Architecture value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - architecture_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built.
-     * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @return This builder for chaining. - */ - public Builder clearArchitecture() { - bitField0_ = (bitField0_ & ~0x00000002); - architecture_ = 0; - onChanged(); - return this; - } - - private io.grafeas.v1.Version latestVersion_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> latestVersionBuilder_; - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - * @return Whether the latestVersion field is set. - */ - public boolean hasLatestVersion() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - * @return The latestVersion. - */ - public io.grafeas.v1.Version getLatestVersion() { - if (latestVersionBuilder_ == null) { - return latestVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; - } else { - return latestVersionBuilder_.getMessage(); - } - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - public Builder setLatestVersion(io.grafeas.v1.Version value) { - if (latestVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - latestVersion_ = value; - } else { - latestVersionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - public Builder setLatestVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (latestVersionBuilder_ == null) { - latestVersion_ = builderForValue.build(); - } else { - latestVersionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - public Builder mergeLatestVersion(io.grafeas.v1.Version value) { - if (latestVersionBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - latestVersion_ != null && - latestVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { - getLatestVersionBuilder().mergeFrom(value); - } else { - latestVersion_ = value; - } - } else { - latestVersionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - public Builder clearLatestVersion() { - bitField0_ = (bitField0_ & ~0x00000004); - latestVersion_ = null; - if (latestVersionBuilder_ != null) { - latestVersionBuilder_.dispose(); - latestVersionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - public io.grafeas.v1.Version.Builder getLatestVersionBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getLatestVersionFieldBuilder().getBuilder(); - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - public io.grafeas.v1.VersionOrBuilder getLatestVersionOrBuilder() { - if (latestVersionBuilder_ != null) { - return latestVersionBuilder_.getMessageOrBuilder(); - } else { - return latestVersion_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : latestVersion_; - } - } - /** - *
-     * The latest available version of this package in this distribution channel.
-     * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getLatestVersionFieldBuilder() { - if (latestVersionBuilder_ == null) { - latestVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getLatestVersion(), - getParentForChildren(), - isClean()); - latestVersion_ = null; - } - return latestVersionBuilder_; - } - - private java.lang.Object maintainer_ = ""; - /** - *
-     * A freeform string denoting the maintainer of this package.
-     * 
- * - * string maintainer = 4; - * @return The maintainer. - */ - public java.lang.String getMaintainer() { - java.lang.Object ref = maintainer_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - maintainer_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A freeform string denoting the maintainer of this package.
-     * 
- * - * string maintainer = 4; - * @return The bytes for maintainer. - */ - public com.google.protobuf.ByteString - getMaintainerBytes() { - java.lang.Object ref = maintainer_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - maintainer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A freeform string denoting the maintainer of this package.
-     * 
- * - * string maintainer = 4; - * @param value The maintainer to set. - * @return This builder for chaining. - */ - public Builder setMaintainer( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - maintainer_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * A freeform string denoting the maintainer of this package.
-     * 
- * - * string maintainer = 4; - * @return This builder for chaining. - */ - public Builder clearMaintainer() { - maintainer_ = getDefaultInstance().getMaintainer(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * A freeform string denoting the maintainer of this package.
-     * 
- * - * string maintainer = 4; - * @param value The bytes for maintainer to set. - * @return This builder for chaining. - */ - public Builder setMaintainerBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - maintainer_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-     * The distribution channel-specific homepage for this package.
-     * 
- * - * string url = 5; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The distribution channel-specific homepage for this package.
-     * 
- * - * string url = 5; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The distribution channel-specific homepage for this package.
-     * 
- * - * string url = 5; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - url_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * The distribution channel-specific homepage for this package.
-     * 
- * - * string url = 5; - * @return This builder for chaining. - */ - public Builder clearUrl() { - url_ = getDefaultInstance().getUrl(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * The distribution channel-specific homepage for this package.
-     * 
- * - * string url = 5; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - url_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * The distribution channel-specific description of this package.
-     * 
- * - * string description = 6; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The distribution channel-specific description of this package.
-     * 
- * - * string description = 6; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The distribution channel-specific description of this package.
-     * 
- * - * string description = 6; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The distribution channel-specific description of this package.
-     * 
- * - * string description = 6; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * The distribution channel-specific description of this package.
-     * 
- * - * string description = 6; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Distribution) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Distribution) - private static final io.grafeas.v1.Distribution DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Distribution(); - } - - public static io.grafeas.v1.Distribution getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Distribution parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Distribution getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java deleted file mode 100644 index 68a9704ee42d..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DistributionOrBuilder.java +++ /dev/null @@ -1,139 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -public interface DistributionOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Distribution) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The cpeUri. - */ - java.lang.String getCpeUri(); - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * 
- * - * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for cpeUri. - */ - com.google.protobuf.ByteString - getCpeUriBytes(); - - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built.
-   * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @return The enum numeric value on the wire for architecture. - */ - int getArchitectureValue(); - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built.
-   * 
- * - * .grafeas.v1.Architecture architecture = 2; - * @return The architecture. - */ - io.grafeas.v1.Architecture getArchitecture(); - - /** - *
-   * The latest available version of this package in this distribution channel.
-   * 
- * - * .grafeas.v1.Version latest_version = 3; - * @return Whether the latestVersion field is set. - */ - boolean hasLatestVersion(); - /** - *
-   * The latest available version of this package in this distribution channel.
-   * 
- * - * .grafeas.v1.Version latest_version = 3; - * @return The latestVersion. - */ - io.grafeas.v1.Version getLatestVersion(); - /** - *
-   * The latest available version of this package in this distribution channel.
-   * 
- * - * .grafeas.v1.Version latest_version = 3; - */ - io.grafeas.v1.VersionOrBuilder getLatestVersionOrBuilder(); - - /** - *
-   * A freeform string denoting the maintainer of this package.
-   * 
- * - * string maintainer = 4; - * @return The maintainer. - */ - java.lang.String getMaintainer(); - /** - *
-   * A freeform string denoting the maintainer of this package.
-   * 
- * - * string maintainer = 4; - * @return The bytes for maintainer. - */ - com.google.protobuf.ByteString - getMaintainerBytes(); - - /** - *
-   * The distribution channel-specific homepage for this package.
-   * 
- * - * string url = 5; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-   * The distribution channel-specific homepage for this package.
-   * 
- * - * string url = 5; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-   * The distribution channel-specific description of this package.
-   * 
- * - * string description = 6; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * The distribution channel-specific description of this package.
-   * 
- * - * string description = 6; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java deleted file mode 100644 index 00a87936ba93..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/DsseAttestation.java +++ /dev/null @@ -1,83 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/dsse_attestation.proto - -package io.grafeas.v1; - -public final class DsseAttestation { - private DsseAttestation() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DSSEAttestationNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n!grafeas/v1/dsse_attestation.proto\022\ngra" + - "feas.v1\032\027grafeas/v1/common.proto\032!grafea" + - "s/v1/intoto_statement.proto\"v\n\023DSSEAttes" + - "tationNote\0226\n\004hint\030\001 \001(\0132(.grafeas.v1.DS" + - "SEAttestationNote.DSSEHint\032\'\n\010DSSEHint\022\033" + - "\n\023human_readable_name\030\001 \001(\t\"\210\001\n\031DSSEAtte" + - "stationOccurrence\022&\n\010envelope\030\001 \001(\0132\024.gr" + - "afeas.v1.Envelope\0220\n\tstatement\030\002 \001(\0132\033.g" + - "rafeas.v1.InTotoStatementH\000B\021\n\017decoded_p" + - "ayloadBQ\n\rio.grafeas.v1P\001Z8google.golang" + - ".org/genproto/googleapis/grafeas/v1;graf" + - "eas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.grafeas.v1.Common.getDescriptor(), - io.grafeas.v1.InTotoStatementProto.getDescriptor(), - }); - internal_static_grafeas_v1_DSSEAttestationNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_DSSEAttestationNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DSSEAttestationNote_descriptor, - new java.lang.String[] { "Hint", }); - internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor = - internal_static_grafeas_v1_DSSEAttestationNote_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DSSEAttestationNote_DSSEHint_descriptor, - new java.lang.String[] { "HumanReadableName", }); - internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor, - new java.lang.String[] { "Envelope", "Statement", "DecodedPayload", }); - io.grafeas.v1.Common.getDescriptor(); - io.grafeas.v1.InTotoStatementProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java deleted file mode 100644 index 62f692aff974..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Envelope.java +++ /dev/null @@ -1,977 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - *
- * MUST match
- * https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An
- * authenticated message of arbitrary type.
- * 
- * - * Protobuf type {@code grafeas.v1.Envelope} - */ -public final class Envelope extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Envelope) - EnvelopeOrBuilder { -private static final long serialVersionUID = 0L; - // Use Envelope.newBuilder() to construct. - private Envelope(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Envelope() { - payload_ = com.google.protobuf.ByteString.EMPTY; - payloadType_ = ""; - signatures_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Envelope(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Envelope.class, io.grafeas.v1.Envelope.Builder.class); - } - - public static final int PAYLOAD_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes payload = 1; - * @return The payload. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPayload() { - return payload_; - } - - public static final int PAYLOAD_TYPE_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object payloadType_ = ""; - /** - * string payload_type = 2; - * @return The payloadType. - */ - @java.lang.Override - public java.lang.String getPayloadType() { - java.lang.Object ref = payloadType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - payloadType_ = s; - return s; - } - } - /** - * string payload_type = 2; - * @return The bytes for payloadType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPayloadTypeBytes() { - java.lang.Object ref = payloadType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - payloadType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SIGNATURES_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List signatures_; - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - @java.lang.Override - public java.util.List getSignaturesList() { - return signatures_; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - @java.lang.Override - public java.util.List - getSignaturesOrBuilderList() { - return signatures_; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - @java.lang.Override - public int getSignaturesCount() { - return signatures_.size(); - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - @java.lang.Override - public io.grafeas.v1.EnvelopeSignature getSignatures(int index) { - return signatures_.get(index); - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - @java.lang.Override - public io.grafeas.v1.EnvelopeSignatureOrBuilder getSignaturesOrBuilder( - int index) { - return signatures_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!payload_.isEmpty()) { - output.writeBytes(1, payload_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, payloadType_); - } - for (int i = 0; i < signatures_.size(); i++) { - output.writeMessage(3, signatures_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!payload_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, payload_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, payloadType_); - } - for (int i = 0; i < signatures_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, signatures_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Envelope)) { - return super.equals(obj); - } - io.grafeas.v1.Envelope other = (io.grafeas.v1.Envelope) obj; - - if (!getPayload() - .equals(other.getPayload())) return false; - if (!getPayloadType() - .equals(other.getPayloadType())) return false; - if (!getSignaturesList() - .equals(other.getSignaturesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; - hash = (53 * hash) + getPayload().hashCode(); - hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getPayloadType().hashCode(); - if (getSignaturesCount() > 0) { - hash = (37 * hash) + SIGNATURES_FIELD_NUMBER; - hash = (53 * hash) + getSignaturesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Envelope parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Envelope parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Envelope parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Envelope parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Envelope parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Envelope parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Envelope parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Envelope parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Envelope parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Envelope parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Envelope parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Envelope parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Envelope prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * MUST match
-   * https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An
-   * authenticated message of arbitrary type.
-   * 
- * - * Protobuf type {@code grafeas.v1.Envelope} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Envelope) - io.grafeas.v1.EnvelopeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Envelope.class, io.grafeas.v1.Envelope.Builder.class); - } - - // Construct using io.grafeas.v1.Envelope.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - payload_ = com.google.protobuf.ByteString.EMPTY; - payloadType_ = ""; - if (signaturesBuilder_ == null) { - signatures_ = java.util.Collections.emptyList(); - } else { - signatures_ = null; - signaturesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Envelope_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Envelope getDefaultInstanceForType() { - return io.grafeas.v1.Envelope.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Envelope build() { - io.grafeas.v1.Envelope result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Envelope buildPartial() { - io.grafeas.v1.Envelope result = new io.grafeas.v1.Envelope(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.Envelope result) { - if (signaturesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - signatures_ = java.util.Collections.unmodifiableList(signatures_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.signatures_ = signatures_; - } else { - result.signatures_ = signaturesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.Envelope result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.payload_ = payload_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.payloadType_ = payloadType_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Envelope) { - return mergeFrom((io.grafeas.v1.Envelope)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Envelope other) { - if (other == io.grafeas.v1.Envelope.getDefaultInstance()) return this; - if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { - setPayload(other.getPayload()); - } - if (!other.getPayloadType().isEmpty()) { - payloadType_ = other.payloadType_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (signaturesBuilder_ == null) { - if (!other.signatures_.isEmpty()) { - if (signatures_.isEmpty()) { - signatures_ = other.signatures_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureSignaturesIsMutable(); - signatures_.addAll(other.signatures_); - } - onChanged(); - } - } else { - if (!other.signatures_.isEmpty()) { - if (signaturesBuilder_.isEmpty()) { - signaturesBuilder_.dispose(); - signaturesBuilder_ = null; - signatures_ = other.signatures_; - bitField0_ = (bitField0_ & ~0x00000004); - signaturesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSignaturesFieldBuilder() : null; - } else { - signaturesBuilder_.addAllMessages(other.signatures_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - payload_ = input.readBytes(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - payloadType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - io.grafeas.v1.EnvelopeSignature m = - input.readMessage( - io.grafeas.v1.EnvelopeSignature.parser(), - extensionRegistry); - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.add(m); - } else { - signaturesBuilder_.addMessage(m); - } - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes payload = 1; - * @return The payload. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPayload() { - return payload_; - } - /** - * bytes payload = 1; - * @param value The payload to set. - * @return This builder for chaining. - */ - public Builder setPayload(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - payload_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes payload = 1; - * @return This builder for chaining. - */ - public Builder clearPayload() { - bitField0_ = (bitField0_ & ~0x00000001); - payload_ = getDefaultInstance().getPayload(); - onChanged(); - return this; - } - - private java.lang.Object payloadType_ = ""; - /** - * string payload_type = 2; - * @return The payloadType. - */ - public java.lang.String getPayloadType() { - java.lang.Object ref = payloadType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - payloadType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string payload_type = 2; - * @return The bytes for payloadType. - */ - public com.google.protobuf.ByteString - getPayloadTypeBytes() { - java.lang.Object ref = payloadType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - payloadType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string payload_type = 2; - * @param value The payloadType to set. - * @return This builder for chaining. - */ - public Builder setPayloadType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - payloadType_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string payload_type = 2; - * @return This builder for chaining. - */ - public Builder clearPayloadType() { - payloadType_ = getDefaultInstance().getPayloadType(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string payload_type = 2; - * @param value The bytes for payloadType to set. - * @return This builder for chaining. - */ - public Builder setPayloadTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - payloadType_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.util.List signatures_ = - java.util.Collections.emptyList(); - private void ensureSignaturesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - signatures_ = new java.util.ArrayList(signatures_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.EnvelopeSignature, io.grafeas.v1.EnvelopeSignature.Builder, io.grafeas.v1.EnvelopeSignatureOrBuilder> signaturesBuilder_; - - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public java.util.List getSignaturesList() { - if (signaturesBuilder_ == null) { - return java.util.Collections.unmodifiableList(signatures_); - } else { - return signaturesBuilder_.getMessageList(); - } - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public int getSignaturesCount() { - if (signaturesBuilder_ == null) { - return signatures_.size(); - } else { - return signaturesBuilder_.getCount(); - } - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public io.grafeas.v1.EnvelopeSignature getSignatures(int index) { - if (signaturesBuilder_ == null) { - return signatures_.get(index); - } else { - return signaturesBuilder_.getMessage(index); - } - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder setSignatures( - int index, io.grafeas.v1.EnvelopeSignature value) { - if (signaturesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignaturesIsMutable(); - signatures_.set(index, value); - onChanged(); - } else { - signaturesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder setSignatures( - int index, io.grafeas.v1.EnvelopeSignature.Builder builderForValue) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.set(index, builderForValue.build()); - onChanged(); - } else { - signaturesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder addSignatures(io.grafeas.v1.EnvelopeSignature value) { - if (signaturesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignaturesIsMutable(); - signatures_.add(value); - onChanged(); - } else { - signaturesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder addSignatures( - int index, io.grafeas.v1.EnvelopeSignature value) { - if (signaturesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignaturesIsMutable(); - signatures_.add(index, value); - onChanged(); - } else { - signaturesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder addSignatures( - io.grafeas.v1.EnvelopeSignature.Builder builderForValue) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.add(builderForValue.build()); - onChanged(); - } else { - signaturesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder addSignatures( - int index, io.grafeas.v1.EnvelopeSignature.Builder builderForValue) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.add(index, builderForValue.build()); - onChanged(); - } else { - signaturesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder addAllSignatures( - java.lang.Iterable values) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, signatures_); - onChanged(); - } else { - signaturesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder clearSignatures() { - if (signaturesBuilder_ == null) { - signatures_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - signaturesBuilder_.clear(); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public Builder removeSignatures(int index) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.remove(index); - onChanged(); - } else { - signaturesBuilder_.remove(index); - } - return this; - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public io.grafeas.v1.EnvelopeSignature.Builder getSignaturesBuilder( - int index) { - return getSignaturesFieldBuilder().getBuilder(index); - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public io.grafeas.v1.EnvelopeSignatureOrBuilder getSignaturesOrBuilder( - int index) { - if (signaturesBuilder_ == null) { - return signatures_.get(index); } else { - return signaturesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public java.util.List - getSignaturesOrBuilderList() { - if (signaturesBuilder_ != null) { - return signaturesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(signatures_); - } - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public io.grafeas.v1.EnvelopeSignature.Builder addSignaturesBuilder() { - return getSignaturesFieldBuilder().addBuilder( - io.grafeas.v1.EnvelopeSignature.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public io.grafeas.v1.EnvelopeSignature.Builder addSignaturesBuilder( - int index) { - return getSignaturesFieldBuilder().addBuilder( - index, io.grafeas.v1.EnvelopeSignature.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - public java.util.List - getSignaturesBuilderList() { - return getSignaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.EnvelopeSignature, io.grafeas.v1.EnvelopeSignature.Builder, io.grafeas.v1.EnvelopeSignatureOrBuilder> - getSignaturesFieldBuilder() { - if (signaturesBuilder_ == null) { - signaturesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.EnvelopeSignature, io.grafeas.v1.EnvelopeSignature.Builder, io.grafeas.v1.EnvelopeSignatureOrBuilder>( - signatures_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - signatures_ = null; - } - return signaturesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Envelope) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Envelope) - private static final io.grafeas.v1.Envelope DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Envelope(); - } - - public static io.grafeas.v1.Envelope getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Envelope parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Envelope getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java deleted file mode 100644 index 836bb5b989d0..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public interface EnvelopeOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Envelope) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes payload = 1; - * @return The payload. - */ - com.google.protobuf.ByteString getPayload(); - - /** - * string payload_type = 2; - * @return The payloadType. - */ - java.lang.String getPayloadType(); - /** - * string payload_type = 2; - * @return The bytes for payloadType. - */ - com.google.protobuf.ByteString - getPayloadTypeBytes(); - - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - java.util.List - getSignaturesList(); - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - io.grafeas.v1.EnvelopeSignature getSignatures(int index); - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - int getSignaturesCount(); - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - java.util.List - getSignaturesOrBuilderList(); - /** - * repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - io.grafeas.v1.EnvelopeSignatureOrBuilder getSignaturesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java deleted file mode 100644 index d3bec7230117..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignature.java +++ /dev/null @@ -1,611 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.EnvelopeSignature} - */ -public final class EnvelopeSignature extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.EnvelopeSignature) - EnvelopeSignatureOrBuilder { -private static final long serialVersionUID = 0L; - // Use EnvelopeSignature.newBuilder() to construct. - private EnvelopeSignature(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EnvelopeSignature() { - sig_ = com.google.protobuf.ByteString.EMPTY; - keyid_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EnvelopeSignature(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.EnvelopeSignature.class, io.grafeas.v1.EnvelopeSignature.Builder.class); - } - - public static final int SIG_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString sig_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes sig = 1; - * @return The sig. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSig() { - return sig_; - } - - public static final int KEYID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object keyid_ = ""; - /** - * string keyid = 2; - * @return The keyid. - */ - @java.lang.Override - public java.lang.String getKeyid() { - java.lang.Object ref = keyid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keyid_ = s; - return s; - } - } - /** - * string keyid = 2; - * @return The bytes for keyid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getKeyidBytes() { - java.lang.Object ref = keyid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - keyid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!sig_.isEmpty()) { - output.writeBytes(1, sig_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keyid_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!sig_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, sig_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, keyid_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.EnvelopeSignature)) { - return super.equals(obj); - } - io.grafeas.v1.EnvelopeSignature other = (io.grafeas.v1.EnvelopeSignature) obj; - - if (!getSig() - .equals(other.getSig())) return false; - if (!getKeyid() - .equals(other.getKeyid())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SIG_FIELD_NUMBER; - hash = (53 * hash) + getSig().hashCode(); - hash = (37 * hash) + KEYID_FIELD_NUMBER; - hash = (53 * hash) + getKeyid().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.EnvelopeSignature parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.EnvelopeSignature parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.EnvelopeSignature parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.EnvelopeSignature parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.EnvelopeSignature prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.EnvelopeSignature} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.EnvelopeSignature) - io.grafeas.v1.EnvelopeSignatureOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.EnvelopeSignature.class, io.grafeas.v1.EnvelopeSignature.Builder.class); - } - - // Construct using io.grafeas.v1.EnvelopeSignature.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - sig_ = com.google.protobuf.ByteString.EMPTY; - keyid_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_EnvelopeSignature_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.EnvelopeSignature getDefaultInstanceForType() { - return io.grafeas.v1.EnvelopeSignature.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.EnvelopeSignature build() { - io.grafeas.v1.EnvelopeSignature result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.EnvelopeSignature buildPartial() { - io.grafeas.v1.EnvelopeSignature result = new io.grafeas.v1.EnvelopeSignature(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.EnvelopeSignature result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.sig_ = sig_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.keyid_ = keyid_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.EnvelopeSignature) { - return mergeFrom((io.grafeas.v1.EnvelopeSignature)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.EnvelopeSignature other) { - if (other == io.grafeas.v1.EnvelopeSignature.getDefaultInstance()) return this; - if (other.getSig() != com.google.protobuf.ByteString.EMPTY) { - setSig(other.getSig()); - } - if (!other.getKeyid().isEmpty()) { - keyid_ = other.keyid_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - sig_ = input.readBytes(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - keyid_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.ByteString sig_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes sig = 1; - * @return The sig. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSig() { - return sig_; - } - /** - * bytes sig = 1; - * @param value The sig to set. - * @return This builder for chaining. - */ - public Builder setSig(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - sig_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes sig = 1; - * @return This builder for chaining. - */ - public Builder clearSig() { - bitField0_ = (bitField0_ & ~0x00000001); - sig_ = getDefaultInstance().getSig(); - onChanged(); - return this; - } - - private java.lang.Object keyid_ = ""; - /** - * string keyid = 2; - * @return The keyid. - */ - public java.lang.String getKeyid() { - java.lang.Object ref = keyid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keyid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string keyid = 2; - * @return The bytes for keyid. - */ - public com.google.protobuf.ByteString - getKeyidBytes() { - java.lang.Object ref = keyid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - keyid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string keyid = 2; - * @param value The keyid to set. - * @return This builder for chaining. - */ - public Builder setKeyid( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - keyid_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string keyid = 2; - * @return This builder for chaining. - */ - public Builder clearKeyid() { - keyid_ = getDefaultInstance().getKeyid(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string keyid = 2; - * @param value The bytes for keyid to set. - * @return This builder for chaining. - */ - public Builder setKeyidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - keyid_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.EnvelopeSignature) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.EnvelopeSignature) - private static final io.grafeas.v1.EnvelopeSignature DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.EnvelopeSignature(); - } - - public static io.grafeas.v1.EnvelopeSignature getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnvelopeSignature parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.EnvelopeSignature getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java deleted file mode 100644 index 13a73d048cf2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/EnvelopeSignatureOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public interface EnvelopeSignatureOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.EnvelopeSignature) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes sig = 1; - * @return The sig. - */ - com.google.protobuf.ByteString getSig(); - - /** - * string keyid = 2; - * @return The keyid. - */ - java.lang.String getKeyid(); - /** - * string keyid = 2; - * @return The bytes for keyid. - */ - com.google.protobuf.ByteString - getKeyidBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java deleted file mode 100644 index 95a37b40792a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashes.java +++ /dev/null @@ -1,864 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * Container message for hashes of byte content of files, used in source
- * messages to verify integrity of source input to the build.
- * 
- * - * Protobuf type {@code grafeas.v1.FileHashes} - */ -public final class FileHashes extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.FileHashes) - FileHashesOrBuilder { -private static final long serialVersionUID = 0L; - // Use FileHashes.newBuilder() to construct. - private FileHashes(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FileHashes() { - fileHash_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FileHashes(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.FileHashes.class, io.grafeas.v1.FileHashes.Builder.class); - } - - public static final int FILE_HASH_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List fileHash_; - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - @java.lang.Override - public java.util.List getFileHashList() { - return fileHash_; - } - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - @java.lang.Override - public java.util.List - getFileHashOrBuilderList() { - return fileHash_; - } - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - @java.lang.Override - public int getFileHashCount() { - return fileHash_.size(); - } - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - @java.lang.Override - public io.grafeas.v1.Hash getFileHash(int index) { - return fileHash_.get(index); - } - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - @java.lang.Override - public io.grafeas.v1.HashOrBuilder getFileHashOrBuilder( - int index) { - return fileHash_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < fileHash_.size(); i++) { - output.writeMessage(1, fileHash_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < fileHash_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, fileHash_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.FileHashes)) { - return super.equals(obj); - } - io.grafeas.v1.FileHashes other = (io.grafeas.v1.FileHashes) obj; - - if (!getFileHashList() - .equals(other.getFileHashList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFileHashCount() > 0) { - hash = (37 * hash) + FILE_HASH_FIELD_NUMBER; - hash = (53 * hash) + getFileHashList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.FileHashes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.FileHashes parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.FileHashes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.FileHashes parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.FileHashes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.FileHashes parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.FileHashes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.FileHashes parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.FileHashes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.FileHashes parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.FileHashes parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.FileHashes parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.FileHashes prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Container message for hashes of byte content of files, used in source
-   * messages to verify integrity of source input to the build.
-   * 
- * - * Protobuf type {@code grafeas.v1.FileHashes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.FileHashes) - io.grafeas.v1.FileHashesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.FileHashes.class, io.grafeas.v1.FileHashes.Builder.class); - } - - // Construct using io.grafeas.v1.FileHashes.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (fileHashBuilder_ == null) { - fileHash_ = java.util.Collections.emptyList(); - } else { - fileHash_ = null; - fileHashBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_FileHashes_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.FileHashes getDefaultInstanceForType() { - return io.grafeas.v1.FileHashes.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.FileHashes build() { - io.grafeas.v1.FileHashes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.FileHashes buildPartial() { - io.grafeas.v1.FileHashes result = new io.grafeas.v1.FileHashes(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.FileHashes result) { - if (fileHashBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fileHash_ = java.util.Collections.unmodifiableList(fileHash_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fileHash_ = fileHash_; - } else { - result.fileHash_ = fileHashBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.FileHashes result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.FileHashes) { - return mergeFrom((io.grafeas.v1.FileHashes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.FileHashes other) { - if (other == io.grafeas.v1.FileHashes.getDefaultInstance()) return this; - if (fileHashBuilder_ == null) { - if (!other.fileHash_.isEmpty()) { - if (fileHash_.isEmpty()) { - fileHash_ = other.fileHash_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFileHashIsMutable(); - fileHash_.addAll(other.fileHash_); - } - onChanged(); - } - } else { - if (!other.fileHash_.isEmpty()) { - if (fileHashBuilder_.isEmpty()) { - fileHashBuilder_.dispose(); - fileHashBuilder_ = null; - fileHash_ = other.fileHash_; - bitField0_ = (bitField0_ & ~0x00000001); - fileHashBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFileHashFieldBuilder() : null; - } else { - fileHashBuilder_.addAllMessages(other.fileHash_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.grafeas.v1.Hash m = - input.readMessage( - io.grafeas.v1.Hash.parser(), - extensionRegistry); - if (fileHashBuilder_ == null) { - ensureFileHashIsMutable(); - fileHash_.add(m); - } else { - fileHashBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List fileHash_ = - java.util.Collections.emptyList(); - private void ensureFileHashIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fileHash_ = new java.util.ArrayList(fileHash_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Hash, io.grafeas.v1.Hash.Builder, io.grafeas.v1.HashOrBuilder> fileHashBuilder_; - - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public java.util.List getFileHashList() { - if (fileHashBuilder_ == null) { - return java.util.Collections.unmodifiableList(fileHash_); - } else { - return fileHashBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public int getFileHashCount() { - if (fileHashBuilder_ == null) { - return fileHash_.size(); - } else { - return fileHashBuilder_.getCount(); - } - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public io.grafeas.v1.Hash getFileHash(int index) { - if (fileHashBuilder_ == null) { - return fileHash_.get(index); - } else { - return fileHashBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder setFileHash( - int index, io.grafeas.v1.Hash value) { - if (fileHashBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileHashIsMutable(); - fileHash_.set(index, value); - onChanged(); - } else { - fileHashBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder setFileHash( - int index, io.grafeas.v1.Hash.Builder builderForValue) { - if (fileHashBuilder_ == null) { - ensureFileHashIsMutable(); - fileHash_.set(index, builderForValue.build()); - onChanged(); - } else { - fileHashBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder addFileHash(io.grafeas.v1.Hash value) { - if (fileHashBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileHashIsMutable(); - fileHash_.add(value); - onChanged(); - } else { - fileHashBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder addFileHash( - int index, io.grafeas.v1.Hash value) { - if (fileHashBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileHashIsMutable(); - fileHash_.add(index, value); - onChanged(); - } else { - fileHashBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder addFileHash( - io.grafeas.v1.Hash.Builder builderForValue) { - if (fileHashBuilder_ == null) { - ensureFileHashIsMutable(); - fileHash_.add(builderForValue.build()); - onChanged(); - } else { - fileHashBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder addFileHash( - int index, io.grafeas.v1.Hash.Builder builderForValue) { - if (fileHashBuilder_ == null) { - ensureFileHashIsMutable(); - fileHash_.add(index, builderForValue.build()); - onChanged(); - } else { - fileHashBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder addAllFileHash( - java.lang.Iterable values) { - if (fileHashBuilder_ == null) { - ensureFileHashIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fileHash_); - onChanged(); - } else { - fileHashBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder clearFileHash() { - if (fileHashBuilder_ == null) { - fileHash_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fileHashBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public Builder removeFileHash(int index) { - if (fileHashBuilder_ == null) { - ensureFileHashIsMutable(); - fileHash_.remove(index); - onChanged(); - } else { - fileHashBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public io.grafeas.v1.Hash.Builder getFileHashBuilder( - int index) { - return getFileHashFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public io.grafeas.v1.HashOrBuilder getFileHashOrBuilder( - int index) { - if (fileHashBuilder_ == null) { - return fileHash_.get(index); } else { - return fileHashBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public java.util.List - getFileHashOrBuilderList() { - if (fileHashBuilder_ != null) { - return fileHashBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fileHash_); - } - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public io.grafeas.v1.Hash.Builder addFileHashBuilder() { - return getFileHashFieldBuilder().addBuilder( - io.grafeas.v1.Hash.getDefaultInstance()); - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public io.grafeas.v1.Hash.Builder addFileHashBuilder( - int index) { - return getFileHashFieldBuilder().addBuilder( - index, io.grafeas.v1.Hash.getDefaultInstance()); - } - /** - *
-     * Required. Collection of file hashes.
-     * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - public java.util.List - getFileHashBuilderList() { - return getFileHashFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Hash, io.grafeas.v1.Hash.Builder, io.grafeas.v1.HashOrBuilder> - getFileHashFieldBuilder() { - if (fileHashBuilder_ == null) { - fileHashBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Hash, io.grafeas.v1.Hash.Builder, io.grafeas.v1.HashOrBuilder>( - fileHash_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - fileHash_ = null; - } - return fileHashBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.FileHashes) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.FileHashes) - private static final io.grafeas.v1.FileHashes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.FileHashes(); - } - - public static io.grafeas.v1.FileHashes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FileHashes parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.FileHashes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java deleted file mode 100644 index fd271d4029ff..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileHashesOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface FileHashesOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.FileHashes) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - java.util.List - getFileHashList(); - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - io.grafeas.v1.Hash getFileHash(int index); - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - int getFileHashCount(); - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - java.util.List - getFileHashOrBuilderList(); - /** - *
-   * Required. Collection of file hashes.
-   * 
- * - * repeated .grafeas.v1.Hash file_hash = 1; - */ - io.grafeas.v1.HashOrBuilder getFileHashOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java deleted file mode 100644 index 6d2ecff765e6..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocation.java +++ /dev/null @@ -1,587 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - *
- * Indicates the location at which a package was found.
- * 
- * - * Protobuf type {@code grafeas.v1.FileLocation} - */ -public final class FileLocation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.FileLocation) - FileLocationOrBuilder { -private static final long serialVersionUID = 0L; - // Use FileLocation.newBuilder() to construct. - private FileLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FileLocation() { - filePath_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FileLocation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.FileLocation.class, io.grafeas.v1.FileLocation.Builder.class); - } - - public static final int FILE_PATH_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object filePath_ = ""; - /** - *
-   * For jars that are contained inside .war files, this filepath
-   * can indicate the path to war file combined with the path to jar file.
-   * 
- * - * string file_path = 1; - * @return The filePath. - */ - @java.lang.Override - public java.lang.String getFilePath() { - java.lang.Object ref = filePath_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filePath_ = s; - return s; - } - } - /** - *
-   * For jars that are contained inside .war files, this filepath
-   * can indicate the path to war file combined with the path to jar file.
-   * 
- * - * string file_path = 1; - * @return The bytes for filePath. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilePathBytes() { - java.lang.Object ref = filePath_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filePath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filePath_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filePath_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.FileLocation)) { - return super.equals(obj); - } - io.grafeas.v1.FileLocation other = (io.grafeas.v1.FileLocation) obj; - - if (!getFilePath() - .equals(other.getFilePath())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FILE_PATH_FIELD_NUMBER; - hash = (53 * hash) + getFilePath().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.FileLocation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.FileLocation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.FileLocation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.FileLocation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.FileLocation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.FileLocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.FileLocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.FileLocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.FileLocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.FileLocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.FileLocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.FileLocation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.FileLocation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Indicates the location at which a package was found.
-   * 
- * - * Protobuf type {@code grafeas.v1.FileLocation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.FileLocation) - io.grafeas.v1.FileLocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.FileLocation.class, io.grafeas.v1.FileLocation.Builder.class); - } - - // Construct using io.grafeas.v1.FileLocation.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - filePath_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.FileLocation getDefaultInstanceForType() { - return io.grafeas.v1.FileLocation.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.FileLocation build() { - io.grafeas.v1.FileLocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.FileLocation buildPartial() { - io.grafeas.v1.FileLocation result = new io.grafeas.v1.FileLocation(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.FileLocation result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.filePath_ = filePath_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.FileLocation) { - return mergeFrom((io.grafeas.v1.FileLocation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.FileLocation other) { - if (other == io.grafeas.v1.FileLocation.getDefaultInstance()) return this; - if (!other.getFilePath().isEmpty()) { - filePath_ = other.filePath_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - filePath_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object filePath_ = ""; - /** - *
-     * For jars that are contained inside .war files, this filepath
-     * can indicate the path to war file combined with the path to jar file.
-     * 
- * - * string file_path = 1; - * @return The filePath. - */ - public java.lang.String getFilePath() { - java.lang.Object ref = filePath_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filePath_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * For jars that are contained inside .war files, this filepath
-     * can indicate the path to war file combined with the path to jar file.
-     * 
- * - * string file_path = 1; - * @return The bytes for filePath. - */ - public com.google.protobuf.ByteString - getFilePathBytes() { - java.lang.Object ref = filePath_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filePath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * For jars that are contained inside .war files, this filepath
-     * can indicate the path to war file combined with the path to jar file.
-     * 
- * - * string file_path = 1; - * @param value The filePath to set. - * @return This builder for chaining. - */ - public Builder setFilePath( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - filePath_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * For jars that are contained inside .war files, this filepath
-     * can indicate the path to war file combined with the path to jar file.
-     * 
- * - * string file_path = 1; - * @return This builder for chaining. - */ - public Builder clearFilePath() { - filePath_ = getDefaultInstance().getFilePath(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * For jars that are contained inside .war files, this filepath
-     * can indicate the path to war file combined with the path to jar file.
-     * 
- * - * string file_path = 1; - * @param value The bytes for filePath to set. - * @return This builder for chaining. - */ - public Builder setFilePathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - filePath_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.FileLocation) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.FileLocation) - private static final io.grafeas.v1.FileLocation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.FileLocation(); - } - - public static io.grafeas.v1.FileLocation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FileLocation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.FileLocation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java deleted file mode 100644 index 7869d5e04677..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public interface FileLocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.FileLocation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * For jars that are contained inside .war files, this filepath
-   * can indicate the path to war file combined with the path to jar file.
-   * 
- * - * string file_path = 1; - * @return The filePath. - */ - java.lang.String getFilePath(); - /** - *
-   * For jars that are contained inside .war files, this filepath
-   * can indicate the path to war file combined with the path to jar file.
-   * 
- * - * string file_path = 1; - * @return The bytes for filePath. - */ - com.google.protobuf.ByteString - getFilePathBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java deleted file mode 100644 index ce9a56433288..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Fingerprint.java +++ /dev/null @@ -1,1009 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -/** - *
- * A set of properties that uniquely identify a given Docker image.
- * 
- * - * Protobuf type {@code grafeas.v1.Fingerprint} - */ -public final class Fingerprint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Fingerprint) - FingerprintOrBuilder { -private static final long serialVersionUID = 0L; - // Use Fingerprint.newBuilder() to construct. - private Fingerprint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Fingerprint() { - v1Name_ = ""; - v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; - v2Name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Fingerprint(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Fingerprint.class, io.grafeas.v1.Fingerprint.Builder.class); - } - - public static final int V1_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object v1Name_ = ""; - /** - *
-   * Required. The layer ID of the final layer in the Docker image's v1
-   * representation.
-   * 
- * - * string v1_name = 1; - * @return The v1Name. - */ - @java.lang.Override - public java.lang.String getV1Name() { - java.lang.Object ref = v1Name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - v1Name_ = s; - return s; - } - } - /** - *
-   * Required. The layer ID of the final layer in the Docker image's v1
-   * representation.
-   * 
- * - * string v1_name = 1; - * @return The bytes for v1Name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getV1NameBytes() { - java.lang.Object ref = v1Name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - v1Name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int V2_BLOB_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList v2Blob_; - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @return A list containing the v2Blob. - */ - public com.google.protobuf.ProtocolStringList - getV2BlobList() { - return v2Blob_; - } - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @return The count of v2Blob. - */ - public int getV2BlobCount() { - return v2Blob_.size(); - } - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @param index The index of the element to return. - * @return The v2Blob at the given index. - */ - public java.lang.String getV2Blob(int index) { - return v2Blob_.get(index); - } - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @param index The index of the value to return. - * @return The bytes of the v2Blob at the given index. - */ - public com.google.protobuf.ByteString - getV2BlobBytes(int index) { - return v2Blob_.getByteString(index); - } - - public static final int V2_NAME_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object v2Name_ = ""; - /** - *
-   * Output only. The name of the image's v2 blobs computed via:
-   *   [bottom] := v2_blob[bottom]
-   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-   * Only the name of the final blob is kept.
-   * 
- * - * string v2_name = 3; - * @return The v2Name. - */ - @java.lang.Override - public java.lang.String getV2Name() { - java.lang.Object ref = v2Name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - v2Name_ = s; - return s; - } - } - /** - *
-   * Output only. The name of the image's v2 blobs computed via:
-   *   [bottom] := v2_blob[bottom]
-   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-   * Only the name of the final blob is kept.
-   * 
- * - * string v2_name = 3; - * @return The bytes for v2Name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getV2NameBytes() { - java.lang.Object ref = v2Name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - v2Name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v1Name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, v1Name_); - } - for (int i = 0; i < v2Blob_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, v2Blob_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v2Name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, v2Name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v1Name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, v1Name_); - } - { - int dataSize = 0; - for (int i = 0; i < v2Blob_.size(); i++) { - dataSize += computeStringSizeNoTag(v2Blob_.getRaw(i)); - } - size += dataSize; - size += 1 * getV2BlobList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v2Name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, v2Name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Fingerprint)) { - return super.equals(obj); - } - io.grafeas.v1.Fingerprint other = (io.grafeas.v1.Fingerprint) obj; - - if (!getV1Name() - .equals(other.getV1Name())) return false; - if (!getV2BlobList() - .equals(other.getV2BlobList())) return false; - if (!getV2Name() - .equals(other.getV2Name())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + V1_NAME_FIELD_NUMBER; - hash = (53 * hash) + getV1Name().hashCode(); - if (getV2BlobCount() > 0) { - hash = (37 * hash) + V2_BLOB_FIELD_NUMBER; - hash = (53 * hash) + getV2BlobList().hashCode(); - } - hash = (37 * hash) + V2_NAME_FIELD_NUMBER; - hash = (53 * hash) + getV2Name().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Fingerprint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Fingerprint parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Fingerprint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Fingerprint parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Fingerprint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Fingerprint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Fingerprint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Fingerprint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Fingerprint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Fingerprint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Fingerprint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Fingerprint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Fingerprint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A set of properties that uniquely identify a given Docker image.
-   * 
- * - * Protobuf type {@code grafeas.v1.Fingerprint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Fingerprint) - io.grafeas.v1.FingerprintOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Fingerprint.class, io.grafeas.v1.Fingerprint.Builder.class); - } - - // Construct using io.grafeas.v1.Fingerprint.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - v1Name_ = ""; - v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - v2Name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Fingerprint getDefaultInstanceForType() { - return io.grafeas.v1.Fingerprint.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Fingerprint build() { - io.grafeas.v1.Fingerprint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Fingerprint buildPartial() { - io.grafeas.v1.Fingerprint result = new io.grafeas.v1.Fingerprint(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.Fingerprint result) { - if (((bitField0_ & 0x00000002) != 0)) { - v2Blob_ = v2Blob_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.v2Blob_ = v2Blob_; - } - - private void buildPartial0(io.grafeas.v1.Fingerprint result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.v1Name_ = v1Name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.v2Name_ = v2Name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Fingerprint) { - return mergeFrom((io.grafeas.v1.Fingerprint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Fingerprint other) { - if (other == io.grafeas.v1.Fingerprint.getDefaultInstance()) return this; - if (!other.getV1Name().isEmpty()) { - v1Name_ = other.v1Name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.v2Blob_.isEmpty()) { - if (v2Blob_.isEmpty()) { - v2Blob_ = other.v2Blob_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureV2BlobIsMutable(); - v2Blob_.addAll(other.v2Blob_); - } - onChanged(); - } - if (!other.getV2Name().isEmpty()) { - v2Name_ = other.v2Name_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - v1Name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - ensureV2BlobIsMutable(); - v2Blob_.add(s); - break; - } // case 18 - case 26: { - v2Name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object v1Name_ = ""; - /** - *
-     * Required. The layer ID of the final layer in the Docker image's v1
-     * representation.
-     * 
- * - * string v1_name = 1; - * @return The v1Name. - */ - public java.lang.String getV1Name() { - java.lang.Object ref = v1Name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - v1Name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The layer ID of the final layer in the Docker image's v1
-     * representation.
-     * 
- * - * string v1_name = 1; - * @return The bytes for v1Name. - */ - public com.google.protobuf.ByteString - getV1NameBytes() { - java.lang.Object ref = v1Name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - v1Name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The layer ID of the final layer in the Docker image's v1
-     * representation.
-     * 
- * - * string v1_name = 1; - * @param value The v1Name to set. - * @return This builder for chaining. - */ - public Builder setV1Name( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - v1Name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. The layer ID of the final layer in the Docker image's v1
-     * representation.
-     * 
- * - * string v1_name = 1; - * @return This builder for chaining. - */ - public Builder clearV1Name() { - v1Name_ = getDefaultInstance().getV1Name(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. The layer ID of the final layer in the Docker image's v1
-     * representation.
-     * 
- * - * string v1_name = 1; - * @param value The bytes for v1Name to set. - * @return This builder for chaining. - */ - public Builder setV1NameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - v1Name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureV2BlobIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - v2Blob_ = new com.google.protobuf.LazyStringArrayList(v2Blob_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @return A list containing the v2Blob. - */ - public com.google.protobuf.ProtocolStringList - getV2BlobList() { - return v2Blob_.getUnmodifiableView(); - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @return The count of v2Blob. - */ - public int getV2BlobCount() { - return v2Blob_.size(); - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @param index The index of the element to return. - * @return The v2Blob at the given index. - */ - public java.lang.String getV2Blob(int index) { - return v2Blob_.get(index); - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @param index The index of the value to return. - * @return The bytes of the v2Blob at the given index. - */ - public com.google.protobuf.ByteString - getV2BlobBytes(int index) { - return v2Blob_.getByteString(index); - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @param index The index to set the value at. - * @param value The v2Blob to set. - * @return This builder for chaining. - */ - public Builder setV2Blob( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureV2BlobIsMutable(); - v2Blob_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @param value The v2Blob to add. - * @return This builder for chaining. - */ - public Builder addV2Blob( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureV2BlobIsMutable(); - v2Blob_.add(value); - onChanged(); - return this; - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @param values The v2Blob to add. - * @return This builder for chaining. - */ - public Builder addAllV2Blob( - java.lang.Iterable values) { - ensureV2BlobIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, v2Blob_); - onChanged(); - return this; - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @return This builder for chaining. - */ - public Builder clearV2Blob() { - v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Required. The ordered list of v2 blobs that represent a given image.
-     * 
- * - * repeated string v2_blob = 2; - * @param value The bytes of the v2Blob to add. - * @return This builder for chaining. - */ - public Builder addV2BlobBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureV2BlobIsMutable(); - v2Blob_.add(value); - onChanged(); - return this; - } - - private java.lang.Object v2Name_ = ""; - /** - *
-     * Output only. The name of the image's v2 blobs computed via:
-     *   [bottom] := v2_blob[bottom]
-     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-     * Only the name of the final blob is kept.
-     * 
- * - * string v2_name = 3; - * @return The v2Name. - */ - public java.lang.String getV2Name() { - java.lang.Object ref = v2Name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - v2Name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. The name of the image's v2 blobs computed via:
-     *   [bottom] := v2_blob[bottom]
-     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-     * Only the name of the final blob is kept.
-     * 
- * - * string v2_name = 3; - * @return The bytes for v2Name. - */ - public com.google.protobuf.ByteString - getV2NameBytes() { - java.lang.Object ref = v2Name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - v2Name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. The name of the image's v2 blobs computed via:
-     *   [bottom] := v2_blob[bottom]
-     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-     * Only the name of the final blob is kept.
-     * 
- * - * string v2_name = 3; - * @param value The v2Name to set. - * @return This builder for chaining. - */ - public Builder setV2Name( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - v2Name_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Output only. The name of the image's v2 blobs computed via:
-     *   [bottom] := v2_blob[bottom]
-     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-     * Only the name of the final blob is kept.
-     * 
- * - * string v2_name = 3; - * @return This builder for chaining. - */ - public Builder clearV2Name() { - v2Name_ = getDefaultInstance().getV2Name(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * Output only. The name of the image's v2 blobs computed via:
-     *   [bottom] := v2_blob[bottom]
-     *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-     * Only the name of the final blob is kept.
-     * 
- * - * string v2_name = 3; - * @param value The bytes for v2Name to set. - * @return This builder for chaining. - */ - public Builder setV2NameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - v2Name_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Fingerprint) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Fingerprint) - private static final io.grafeas.v1.Fingerprint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Fingerprint(); - } - - public static io.grafeas.v1.Fingerprint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fingerprint parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Fingerprint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java deleted file mode 100644 index ca06107712b3..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/FingerprintOrBuilder.java +++ /dev/null @@ -1,98 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -public interface FingerprintOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Fingerprint) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The layer ID of the final layer in the Docker image's v1
-   * representation.
-   * 
- * - * string v1_name = 1; - * @return The v1Name. - */ - java.lang.String getV1Name(); - /** - *
-   * Required. The layer ID of the final layer in the Docker image's v1
-   * representation.
-   * 
- * - * string v1_name = 1; - * @return The bytes for v1Name. - */ - com.google.protobuf.ByteString - getV1NameBytes(); - - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @return A list containing the v2Blob. - */ - java.util.List - getV2BlobList(); - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @return The count of v2Blob. - */ - int getV2BlobCount(); - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @param index The index of the element to return. - * @return The v2Blob at the given index. - */ - java.lang.String getV2Blob(int index); - /** - *
-   * Required. The ordered list of v2 blobs that represent a given image.
-   * 
- * - * repeated string v2_blob = 2; - * @param index The index of the value to return. - * @return The bytes of the v2Blob at the given index. - */ - com.google.protobuf.ByteString - getV2BlobBytes(int index); - - /** - *
-   * Output only. The name of the image's v2 blobs computed via:
-   *   [bottom] := v2_blob[bottom]
-   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-   * Only the name of the final blob is kept.
-   * 
- * - * string v2_name = 3; - * @return The v2Name. - */ - java.lang.String getV2Name(); - /** - *
-   * Output only. The name of the image's v2 blobs computed via:
-   *   [bottom] := v2_blob[bottom]
-   *   [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
-   * Only the name of the final blob is kept.
-   * 
- * - * string v2_name = 3; - * @return The bytes for v2Name. - */ - com.google.protobuf.ByteString - getV2NameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java deleted file mode 100644 index 5e61686f515f..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContext.java +++ /dev/null @@ -1,1297 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * A SourceContext referring to a Gerrit project.
- * 
- * - * Protobuf type {@code grafeas.v1.GerritSourceContext} - */ -public final class GerritSourceContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.GerritSourceContext) - GerritSourceContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use GerritSourceContext.newBuilder() to construct. - private GerritSourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GerritSourceContext() { - hostUri_ = ""; - gerritProject_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GerritSourceContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GerritSourceContext.class, io.grafeas.v1.GerritSourceContext.Builder.class); - } - - private int revisionCase_ = 0; - private java.lang.Object revision_; - public enum RevisionCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - REVISION_ID(3), - ALIAS_CONTEXT(4), - REVISION_NOT_SET(0); - private final int value; - private RevisionCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static RevisionCase valueOf(int value) { - return forNumber(value); - } - - public static RevisionCase forNumber(int value) { - switch (value) { - case 3: return REVISION_ID; - case 4: return ALIAS_CONTEXT; - case 0: return REVISION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public RevisionCase - getRevisionCase() { - return RevisionCase.forNumber( - revisionCase_); - } - - public static final int HOST_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object hostUri_ = ""; - /** - *
-   * The URI of a running Gerrit instance.
-   * 
- * - * string host_uri = 1; - * @return The hostUri. - */ - @java.lang.Override - public java.lang.String getHostUri() { - java.lang.Object ref = hostUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hostUri_ = s; - return s; - } - } - /** - *
-   * The URI of a running Gerrit instance.
-   * 
- * - * string host_uri = 1; - * @return The bytes for hostUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getHostUriBytes() { - java.lang.Object ref = hostUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hostUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int GERRIT_PROJECT_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object gerritProject_ = ""; - /** - *
-   * The full project name within the host. Projects may be nested, so
-   * "project/subproject" is a valid project name. The "repo name" is the
-   * hostURI/project.
-   * 
- * - * string gerrit_project = 2; - * @return The gerritProject. - */ - @java.lang.Override - public java.lang.String getGerritProject() { - java.lang.Object ref = gerritProject_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gerritProject_ = s; - return s; - } - } - /** - *
-   * The full project name within the host. Projects may be nested, so
-   * "project/subproject" is a valid project name. The "repo name" is the
-   * hostURI/project.
-   * 
- * - * string gerrit_project = 2; - * @return The bytes for gerritProject. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getGerritProjectBytes() { - java.lang.Object ref = gerritProject_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - gerritProject_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REVISION_ID_FIELD_NUMBER = 3; - /** - *
-   * A revision (commit) ID.
-   * 
- * - * string revision_id = 3; - * @return Whether the revisionId field is set. - */ - public boolean hasRevisionId() { - return revisionCase_ == 3; - } - /** - *
-   * A revision (commit) ID.
-   * 
- * - * string revision_id = 3; - * @return The revisionId. - */ - public java.lang.String getRevisionId() { - java.lang.Object ref = ""; - if (revisionCase_ == 3) { - ref = revision_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (revisionCase_ == 3) { - revision_ = s; - } - return s; - } - } - /** - *
-   * A revision (commit) ID.
-   * 
- * - * string revision_id = 3; - * @return The bytes for revisionId. - */ - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = ""; - if (revisionCase_ == 3) { - ref = revision_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (revisionCase_ == 3) { - revision_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ALIAS_CONTEXT_FIELD_NUMBER = 4; - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - * @return Whether the aliasContext field is set. - */ - @java.lang.Override - public boolean hasAliasContext() { - return revisionCase_ == 4; - } - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - * @return The aliasContext. - */ - @java.lang.Override - public io.grafeas.v1.AliasContext getAliasContext() { - if (revisionCase_ == 4) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - @java.lang.Override - public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { - if (revisionCase_ == 4) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hostUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gerritProject_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gerritProject_); - } - if (revisionCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, revision_); - } - if (revisionCase_ == 4) { - output.writeMessage(4, (io.grafeas.v1.AliasContext) revision_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hostUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gerritProject_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gerritProject_); - } - if (revisionCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, revision_); - } - if (revisionCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (io.grafeas.v1.AliasContext) revision_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.GerritSourceContext)) { - return super.equals(obj); - } - io.grafeas.v1.GerritSourceContext other = (io.grafeas.v1.GerritSourceContext) obj; - - if (!getHostUri() - .equals(other.getHostUri())) return false; - if (!getGerritProject() - .equals(other.getGerritProject())) return false; - if (!getRevisionCase().equals(other.getRevisionCase())) return false; - switch (revisionCase_) { - case 3: - if (!getRevisionId() - .equals(other.getRevisionId())) return false; - break; - case 4: - if (!getAliasContext() - .equals(other.getAliasContext())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HOST_URI_FIELD_NUMBER; - hash = (53 * hash) + getHostUri().hashCode(); - hash = (37 * hash) + GERRIT_PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getGerritProject().hashCode(); - switch (revisionCase_) { - case 3: - hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; - hash = (53 * hash) + getRevisionId().hashCode(); - break; - case 4: - hash = (37 * hash) + ALIAS_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getAliasContext().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.GerritSourceContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GerritSourceContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GerritSourceContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GerritSourceContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GerritSourceContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GerritSourceContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GerritSourceContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GerritSourceContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GerritSourceContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.GerritSourceContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GerritSourceContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GerritSourceContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.GerritSourceContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A SourceContext referring to a Gerrit project.
-   * 
- * - * Protobuf type {@code grafeas.v1.GerritSourceContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.GerritSourceContext) - io.grafeas.v1.GerritSourceContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GerritSourceContext.class, io.grafeas.v1.GerritSourceContext.Builder.class); - } - - // Construct using io.grafeas.v1.GerritSourceContext.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - hostUri_ = ""; - gerritProject_ = ""; - if (aliasContextBuilder_ != null) { - aliasContextBuilder_.clear(); - } - revisionCase_ = 0; - revision_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GerritSourceContext_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.GerritSourceContext getDefaultInstanceForType() { - return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.GerritSourceContext build() { - io.grafeas.v1.GerritSourceContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.GerritSourceContext buildPartial() { - io.grafeas.v1.GerritSourceContext result = new io.grafeas.v1.GerritSourceContext(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.GerritSourceContext result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.hostUri_ = hostUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.gerritProject_ = gerritProject_; - } - } - - private void buildPartialOneofs(io.grafeas.v1.GerritSourceContext result) { - result.revisionCase_ = revisionCase_; - result.revision_ = this.revision_; - if (revisionCase_ == 4 && - aliasContextBuilder_ != null) { - result.revision_ = aliasContextBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.GerritSourceContext) { - return mergeFrom((io.grafeas.v1.GerritSourceContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.GerritSourceContext other) { - if (other == io.grafeas.v1.GerritSourceContext.getDefaultInstance()) return this; - if (!other.getHostUri().isEmpty()) { - hostUri_ = other.hostUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getGerritProject().isEmpty()) { - gerritProject_ = other.gerritProject_; - bitField0_ |= 0x00000002; - onChanged(); - } - switch (other.getRevisionCase()) { - case REVISION_ID: { - revisionCase_ = 3; - revision_ = other.revision_; - onChanged(); - break; - } - case ALIAS_CONTEXT: { - mergeAliasContext(other.getAliasContext()); - break; - } - case REVISION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - hostUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - gerritProject_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - revisionCase_ = 3; - revision_ = s; - break; - } // case 26 - case 34: { - input.readMessage( - getAliasContextFieldBuilder().getBuilder(), - extensionRegistry); - revisionCase_ = 4; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int revisionCase_ = 0; - private java.lang.Object revision_; - public RevisionCase - getRevisionCase() { - return RevisionCase.forNumber( - revisionCase_); - } - - public Builder clearRevision() { - revisionCase_ = 0; - revision_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object hostUri_ = ""; - /** - *
-     * The URI of a running Gerrit instance.
-     * 
- * - * string host_uri = 1; - * @return The hostUri. - */ - public java.lang.String getHostUri() { - java.lang.Object ref = hostUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hostUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URI of a running Gerrit instance.
-     * 
- * - * string host_uri = 1; - * @return The bytes for hostUri. - */ - public com.google.protobuf.ByteString - getHostUriBytes() { - java.lang.Object ref = hostUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hostUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URI of a running Gerrit instance.
-     * 
- * - * string host_uri = 1; - * @param value The hostUri to set. - * @return This builder for chaining. - */ - public Builder setHostUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - hostUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The URI of a running Gerrit instance.
-     * 
- * - * string host_uri = 1; - * @return This builder for chaining. - */ - public Builder clearHostUri() { - hostUri_ = getDefaultInstance().getHostUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The URI of a running Gerrit instance.
-     * 
- * - * string host_uri = 1; - * @param value The bytes for hostUri to set. - * @return This builder for chaining. - */ - public Builder setHostUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - hostUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object gerritProject_ = ""; - /** - *
-     * The full project name within the host. Projects may be nested, so
-     * "project/subproject" is a valid project name. The "repo name" is the
-     * hostURI/project.
-     * 
- * - * string gerrit_project = 2; - * @return The gerritProject. - */ - public java.lang.String getGerritProject() { - java.lang.Object ref = gerritProject_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gerritProject_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full project name within the host. Projects may be nested, so
-     * "project/subproject" is a valid project name. The "repo name" is the
-     * hostURI/project.
-     * 
- * - * string gerrit_project = 2; - * @return The bytes for gerritProject. - */ - public com.google.protobuf.ByteString - getGerritProjectBytes() { - java.lang.Object ref = gerritProject_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - gerritProject_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full project name within the host. Projects may be nested, so
-     * "project/subproject" is a valid project name. The "repo name" is the
-     * hostURI/project.
-     * 
- * - * string gerrit_project = 2; - * @param value The gerritProject to set. - * @return This builder for chaining. - */ - public Builder setGerritProject( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - gerritProject_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The full project name within the host. Projects may be nested, so
-     * "project/subproject" is a valid project name. The "repo name" is the
-     * hostURI/project.
-     * 
- * - * string gerrit_project = 2; - * @return This builder for chaining. - */ - public Builder clearGerritProject() { - gerritProject_ = getDefaultInstance().getGerritProject(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The full project name within the host. Projects may be nested, so
-     * "project/subproject" is a valid project name. The "repo name" is the
-     * hostURI/project.
-     * 
- * - * string gerrit_project = 2; - * @param value The bytes for gerritProject to set. - * @return This builder for chaining. - */ - public Builder setGerritProjectBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - gerritProject_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - *
-     * A revision (commit) ID.
-     * 
- * - * string revision_id = 3; - * @return Whether the revisionId field is set. - */ - @java.lang.Override - public boolean hasRevisionId() { - return revisionCase_ == 3; - } - /** - *
-     * A revision (commit) ID.
-     * 
- * - * string revision_id = 3; - * @return The revisionId. - */ - @java.lang.Override - public java.lang.String getRevisionId() { - java.lang.Object ref = ""; - if (revisionCase_ == 3) { - ref = revision_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (revisionCase_ == 3) { - revision_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A revision (commit) ID.
-     * 
- * - * string revision_id = 3; - * @return The bytes for revisionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = ""; - if (revisionCase_ == 3) { - ref = revision_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (revisionCase_ == 3) { - revision_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A revision (commit) ID.
-     * 
- * - * string revision_id = 3; - * @param value The revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - revisionCase_ = 3; - revision_ = value; - onChanged(); - return this; - } - /** - *
-     * A revision (commit) ID.
-     * 
- * - * string revision_id = 3; - * @return This builder for chaining. - */ - public Builder clearRevisionId() { - if (revisionCase_ == 3) { - revisionCase_ = 0; - revision_ = null; - onChanged(); - } - return this; - } - /** - *
-     * A revision (commit) ID.
-     * 
- * - * string revision_id = 3; - * @param value The bytes for revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - revisionCase_ = 3; - revision_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> aliasContextBuilder_; - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - * @return Whether the aliasContext field is set. - */ - @java.lang.Override - public boolean hasAliasContext() { - return revisionCase_ == 4; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - * @return The aliasContext. - */ - @java.lang.Override - public io.grafeas.v1.AliasContext getAliasContext() { - if (aliasContextBuilder_ == null) { - if (revisionCase_ == 4) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } else { - if (revisionCase_ == 4) { - return aliasContextBuilder_.getMessage(); - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - public Builder setAliasContext(io.grafeas.v1.AliasContext value) { - if (aliasContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - revision_ = value; - onChanged(); - } else { - aliasContextBuilder_.setMessage(value); - } - revisionCase_ = 4; - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - public Builder setAliasContext( - io.grafeas.v1.AliasContext.Builder builderForValue) { - if (aliasContextBuilder_ == null) { - revision_ = builderForValue.build(); - onChanged(); - } else { - aliasContextBuilder_.setMessage(builderForValue.build()); - } - revisionCase_ = 4; - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - public Builder mergeAliasContext(io.grafeas.v1.AliasContext value) { - if (aliasContextBuilder_ == null) { - if (revisionCase_ == 4 && - revision_ != io.grafeas.v1.AliasContext.getDefaultInstance()) { - revision_ = io.grafeas.v1.AliasContext.newBuilder((io.grafeas.v1.AliasContext) revision_) - .mergeFrom(value).buildPartial(); - } else { - revision_ = value; - } - onChanged(); - } else { - if (revisionCase_ == 4) { - aliasContextBuilder_.mergeFrom(value); - } else { - aliasContextBuilder_.setMessage(value); - } - } - revisionCase_ = 4; - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - public Builder clearAliasContext() { - if (aliasContextBuilder_ == null) { - if (revisionCase_ == 4) { - revisionCase_ = 0; - revision_ = null; - onChanged(); - } - } else { - if (revisionCase_ == 4) { - revisionCase_ = 0; - revision_ = null; - } - aliasContextBuilder_.clear(); - } - return this; - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - public io.grafeas.v1.AliasContext.Builder getAliasContextBuilder() { - return getAliasContextFieldBuilder().getBuilder(); - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - @java.lang.Override - public io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder() { - if ((revisionCase_ == 4) && (aliasContextBuilder_ != null)) { - return aliasContextBuilder_.getMessageOrBuilder(); - } else { - if (revisionCase_ == 4) { - return (io.grafeas.v1.AliasContext) revision_; - } - return io.grafeas.v1.AliasContext.getDefaultInstance(); - } - } - /** - *
-     * An alias, which may be a branch or tag.
-     * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder> - getAliasContextFieldBuilder() { - if (aliasContextBuilder_ == null) { - if (!(revisionCase_ == 4)) { - revision_ = io.grafeas.v1.AliasContext.getDefaultInstance(); - } - aliasContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AliasContext, io.grafeas.v1.AliasContext.Builder, io.grafeas.v1.AliasContextOrBuilder>( - (io.grafeas.v1.AliasContext) revision_, - getParentForChildren(), - isClean()); - revision_ = null; - } - revisionCase_ = 4; - onChanged(); - return aliasContextBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.GerritSourceContext) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.GerritSourceContext) - private static final io.grafeas.v1.GerritSourceContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.GerritSourceContext(); - } - - public static io.grafeas.v1.GerritSourceContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GerritSourceContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.GerritSourceContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java deleted file mode 100644 index c0221c8a2abd..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java +++ /dev/null @@ -1,111 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface GerritSourceContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.GerritSourceContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The URI of a running Gerrit instance.
-   * 
- * - * string host_uri = 1; - * @return The hostUri. - */ - java.lang.String getHostUri(); - /** - *
-   * The URI of a running Gerrit instance.
-   * 
- * - * string host_uri = 1; - * @return The bytes for hostUri. - */ - com.google.protobuf.ByteString - getHostUriBytes(); - - /** - *
-   * The full project name within the host. Projects may be nested, so
-   * "project/subproject" is a valid project name. The "repo name" is the
-   * hostURI/project.
-   * 
- * - * string gerrit_project = 2; - * @return The gerritProject. - */ - java.lang.String getGerritProject(); - /** - *
-   * The full project name within the host. Projects may be nested, so
-   * "project/subproject" is a valid project name. The "repo name" is the
-   * hostURI/project.
-   * 
- * - * string gerrit_project = 2; - * @return The bytes for gerritProject. - */ - com.google.protobuf.ByteString - getGerritProjectBytes(); - - /** - *
-   * A revision (commit) ID.
-   * 
- * - * string revision_id = 3; - * @return Whether the revisionId field is set. - */ - boolean hasRevisionId(); - /** - *
-   * A revision (commit) ID.
-   * 
- * - * string revision_id = 3; - * @return The revisionId. - */ - java.lang.String getRevisionId(); - /** - *
-   * A revision (commit) ID.
-   * 
- * - * string revision_id = 3; - * @return The bytes for revisionId. - */ - com.google.protobuf.ByteString - getRevisionIdBytes(); - - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - * @return Whether the aliasContext field is set. - */ - boolean hasAliasContext(); - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - * @return The aliasContext. - */ - io.grafeas.v1.AliasContext getAliasContext(); - /** - *
-   * An alias, which may be a branch or tag.
-   * 
- * - * .grafeas.v1.AliasContext alias_context = 4; - */ - io.grafeas.v1.AliasContextOrBuilder getAliasContextOrBuilder(); - - public io.grafeas.v1.GerritSourceContext.RevisionCase getRevisionCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java deleted file mode 100644 index 0d89ff20cad2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequest.java +++ /dev/null @@ -1,587 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to get a note.
- * 
- * - * Protobuf type {@code grafeas.v1.GetNoteRequest} - */ -public final class GetNoteRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.GetNoteRequest) - GetNoteRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetNoteRequest.newBuilder() to construct. - private GetNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetNoteRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetNoteRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GetNoteRequest.class, io.grafeas.v1.GetNoteRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.GetNoteRequest)) { - return super.equals(obj); - } - io.grafeas.v1.GetNoteRequest other = (io.grafeas.v1.GetNoteRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.GetNoteRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetNoteRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetNoteRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetNoteRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetNoteRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetNoteRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetNoteRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetNoteRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GetNoteRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetNoteRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GetNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.GetNoteRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to get a note.
-   * 
- * - * Protobuf type {@code grafeas.v1.GetNoteRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.GetNoteRequest) - io.grafeas.v1.GetNoteRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GetNoteRequest.class, io.grafeas.v1.GetNoteRequest.Builder.class); - } - - // Construct using io.grafeas.v1.GetNoteRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetNoteRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.GetNoteRequest getDefaultInstanceForType() { - return io.grafeas.v1.GetNoteRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.GetNoteRequest build() { - io.grafeas.v1.GetNoteRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.GetNoteRequest buildPartial() { - io.grafeas.v1.GetNoteRequest result = new io.grafeas.v1.GetNoteRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.GetNoteRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.GetNoteRequest) { - return mergeFrom((io.grafeas.v1.GetNoteRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.GetNoteRequest other) { - if (other == io.grafeas.v1.GetNoteRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.GetNoteRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.GetNoteRequest) - private static final io.grafeas.v1.GetNoteRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.GetNoteRequest(); - } - - public static io.grafeas.v1.GetNoteRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetNoteRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.GetNoteRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java deleted file mode 100644 index 8b35e38c0447..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface GetNoteRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.GetNoteRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java deleted file mode 100644 index 485d009b3969..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java +++ /dev/null @@ -1,587 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to get the note to which the specified occurrence is attached.
- * 
- * - * Protobuf type {@code grafeas.v1.GetOccurrenceNoteRequest} - */ -public final class GetOccurrenceNoteRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.GetOccurrenceNoteRequest) - GetOccurrenceNoteRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetOccurrenceNoteRequest.newBuilder() to construct. - private GetOccurrenceNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetOccurrenceNoteRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetOccurrenceNoteRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GetOccurrenceNoteRequest.class, io.grafeas.v1.GetOccurrenceNoteRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.GetOccurrenceNoteRequest)) { - return super.equals(obj); - } - io.grafeas.v1.GetOccurrenceNoteRequest other = (io.grafeas.v1.GetOccurrenceNoteRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetOccurrenceNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.GetOccurrenceNoteRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to get the note to which the specified occurrence is attached.
-   * 
- * - * Protobuf type {@code grafeas.v1.GetOccurrenceNoteRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.GetOccurrenceNoteRequest) - io.grafeas.v1.GetOccurrenceNoteRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GetOccurrenceNoteRequest.class, io.grafeas.v1.GetOccurrenceNoteRequest.Builder.class); - } - - // Construct using io.grafeas.v1.GetOccurrenceNoteRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceNoteRequest getDefaultInstanceForType() { - return io.grafeas.v1.GetOccurrenceNoteRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceNoteRequest build() { - io.grafeas.v1.GetOccurrenceNoteRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceNoteRequest buildPartial() { - io.grafeas.v1.GetOccurrenceNoteRequest result = new io.grafeas.v1.GetOccurrenceNoteRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.GetOccurrenceNoteRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.GetOccurrenceNoteRequest) { - return mergeFrom((io.grafeas.v1.GetOccurrenceNoteRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.GetOccurrenceNoteRequest other) { - if (other == io.grafeas.v1.GetOccurrenceNoteRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.GetOccurrenceNoteRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.GetOccurrenceNoteRequest) - private static final io.grafeas.v1.GetOccurrenceNoteRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.GetOccurrenceNoteRequest(); - } - - public static io.grafeas.v1.GetOccurrenceNoteRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetOccurrenceNoteRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceNoteRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java deleted file mode 100644 index 26185bddff7d..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface GetOccurrenceNoteRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.GetOccurrenceNoteRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java deleted file mode 100644 index 16e1cf97f986..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java +++ /dev/null @@ -1,587 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to get an occurrence.
- * 
- * - * Protobuf type {@code grafeas.v1.GetOccurrenceRequest} - */ -public final class GetOccurrenceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.GetOccurrenceRequest) - GetOccurrenceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetOccurrenceRequest.newBuilder() to construct. - private GetOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetOccurrenceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetOccurrenceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GetOccurrenceRequest.class, io.grafeas.v1.GetOccurrenceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.GetOccurrenceRequest)) { - return super.equals(obj); - } - io.grafeas.v1.GetOccurrenceRequest other = (io.grafeas.v1.GetOccurrenceRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetOccurrenceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GetOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.GetOccurrenceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to get an occurrence.
-   * 
- * - * Protobuf type {@code grafeas.v1.GetOccurrenceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.GetOccurrenceRequest) - io.grafeas.v1.GetOccurrenceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GetOccurrenceRequest.class, io.grafeas.v1.GetOccurrenceRequest.Builder.class); - } - - // Construct using io.grafeas.v1.GetOccurrenceRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceRequest getDefaultInstanceForType() { - return io.grafeas.v1.GetOccurrenceRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceRequest build() { - io.grafeas.v1.GetOccurrenceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceRequest buildPartial() { - io.grafeas.v1.GetOccurrenceRequest result = new io.grafeas.v1.GetOccurrenceRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.GetOccurrenceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.GetOccurrenceRequest) { - return mergeFrom((io.grafeas.v1.GetOccurrenceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.GetOccurrenceRequest other) { - if (other == io.grafeas.v1.GetOccurrenceRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.GetOccurrenceRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.GetOccurrenceRequest) - private static final io.grafeas.v1.GetOccurrenceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.GetOccurrenceRequest(); - } - - public static io.grafeas.v1.GetOccurrenceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetOccurrenceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.GetOccurrenceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java deleted file mode 100644 index 67210e529112..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface GetOccurrenceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.GetOccurrenceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java deleted file mode 100644 index 6ba7ba88015e..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContext.java +++ /dev/null @@ -1,746 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * A GitSourceContext denotes a particular revision in a third party Git
- * repository (e.g., GitHub).
- * 
- * - * Protobuf type {@code grafeas.v1.GitSourceContext} - */ -public final class GitSourceContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.GitSourceContext) - GitSourceContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use GitSourceContext.newBuilder() to construct. - private GitSourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GitSourceContext() { - url_ = ""; - revisionId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GitSourceContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GitSourceContext.class, io.grafeas.v1.GitSourceContext.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object url_ = ""; - /** - *
-   * Git repository URL.
-   * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-   * Git repository URL.
-   * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REVISION_ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object revisionId_ = ""; - /** - *
-   * Git commit hash.
-   * 
- * - * string revision_id = 2; - * @return The revisionId. - */ - @java.lang.Override - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revisionId_ = s; - return s; - } - } - /** - *
-   * Git commit hash.
-   * 
- * - * string revision_id = 2; - * @return The bytes for revisionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revisionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, revisionId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, revisionId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.GitSourceContext)) { - return super.equals(obj); - } - io.grafeas.v1.GitSourceContext other = (io.grafeas.v1.GitSourceContext) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (!getRevisionId() - .equals(other.getRevisionId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; - hash = (53 * hash) + getRevisionId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.GitSourceContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GitSourceContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GitSourceContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GitSourceContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GitSourceContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.GitSourceContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.GitSourceContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GitSourceContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GitSourceContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.GitSourceContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.GitSourceContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.GitSourceContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.GitSourceContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A GitSourceContext denotes a particular revision in a third party Git
-   * repository (e.g., GitHub).
-   * 
- * - * Protobuf type {@code grafeas.v1.GitSourceContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.GitSourceContext) - io.grafeas.v1.GitSourceContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.GitSourceContext.class, io.grafeas.v1.GitSourceContext.Builder.class); - } - - // Construct using io.grafeas.v1.GitSourceContext.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - url_ = ""; - revisionId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_GitSourceContext_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.GitSourceContext getDefaultInstanceForType() { - return io.grafeas.v1.GitSourceContext.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.GitSourceContext build() { - io.grafeas.v1.GitSourceContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.GitSourceContext buildPartial() { - io.grafeas.v1.GitSourceContext result = new io.grafeas.v1.GitSourceContext(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.GitSourceContext result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.url_ = url_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.revisionId_ = revisionId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.GitSourceContext) { - return mergeFrom((io.grafeas.v1.GitSourceContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.GitSourceContext other) { - if (other == io.grafeas.v1.GitSourceContext.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getRevisionId().isEmpty()) { - revisionId_ = other.revisionId_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - url_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - revisionId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object url_ = ""; - /** - *
-     * Git repository URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Git repository URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Git repository URL.
-     * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - url_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Git repository URL.
-     * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - url_ = getDefaultInstance().getUrl(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Git repository URL.
-     * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - url_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object revisionId_ = ""; - /** - *
-     * Git commit hash.
-     * 
- * - * string revision_id = 2; - * @return The revisionId. - */ - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revisionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Git commit hash.
-     * 
- * - * string revision_id = 2; - * @return The bytes for revisionId. - */ - public com.google.protobuf.ByteString - getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revisionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Git commit hash.
-     * 
- * - * string revision_id = 2; - * @param value The revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - revisionId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Git commit hash.
-     * 
- * - * string revision_id = 2; - * @return This builder for chaining. - */ - public Builder clearRevisionId() { - revisionId_ = getDefaultInstance().getRevisionId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Git commit hash.
-     * 
- * - * string revision_id = 2; - * @param value The bytes for revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - revisionId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.GitSourceContext) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.GitSourceContext) - private static final io.grafeas.v1.GitSourceContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.GitSourceContext(); - } - - public static io.grafeas.v1.GitSourceContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GitSourceContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.GitSourceContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java deleted file mode 100644 index 22f81fc4db36..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java +++ /dev/null @@ -1,49 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface GitSourceContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.GitSourceContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Git repository URL.
-   * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-   * Git repository URL.
-   * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-   * Git commit hash.
-   * 
- * - * string revision_id = 2; - * @return The revisionId. - */ - java.lang.String getRevisionId(); - /** - *
-   * Git commit hash.
-   * 
- * - * string revision_id = 2; - * @return The bytes for revisionId. - */ - com.google.protobuf.ByteString - getRevisionIdBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java deleted file mode 100644 index 332ac72426e8..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasClient.java +++ /dev/null @@ -1,2264 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import io.grafeas.v1.stub.GrafeasStub; -import io.grafeas.v1.stub.GrafeasStubSettings; -import java.io.IOException; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: [Grafeas](https://grafeas.io) API. - * - *

Retrieves analysis results of Cloud components such as Docker container images. - * - *

Analysis results are stored as a series of occurrences. An `Occurrence` contains information - * about a specific analysis instance on a resource. An occurrence refers to a `Note`. A note - * contains details describing the analysis and is generally stored in a separate project, called a - * `Provider`. Multiple occurrences can refer to the same note. - * - *

For example, an SSL vulnerability could affect multiple images. In this case, there would be - * one note for the vulnerability and an occurrence for each image with the vulnerability referring - * to that note. - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
- *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
- *   Occurrence response = grafeasClient.getOccurrence(name);
- * }
- * }
- * - *

Note: close() needs to be called on the GrafeasClient object to clean up resources such as - * threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of GrafeasSettings to create(). - * For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GrafeasSettings grafeasSettings =
- *     GrafeasSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * GrafeasClient grafeasClient = GrafeasClient.create(grafeasSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GrafeasSettings grafeasSettings = GrafeasSettings.newBuilder().setEndpoint(myEndpoint).build();
- * GrafeasClient grafeasClient = GrafeasClient.create(grafeasSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class GrafeasClient implements BackgroundResource { - private final GrafeasSettings settings; - private final GrafeasStub stub; - - /** Constructs an instance of GrafeasClient with default settings. */ - public static final GrafeasClient create() throws IOException { - return create(GrafeasSettings.newBuilder().build()); - } - - /** - * Constructs an instance of GrafeasClient, using the given settings. The channels are created - * based on the settings passed in, or defaults for any settings that are not set. - */ - public static final GrafeasClient create(GrafeasSettings settings) throws IOException { - return new GrafeasClient(settings); - } - - /** - * Constructs an instance of GrafeasClient, using the given stub for making calls. This is for - * advanced usage - prefer using create(GrafeasSettings). - */ - public static final GrafeasClient create(GrafeasStub stub) { - return new GrafeasClient(stub); - } - - /** - * Constructs an instance of GrafeasClient, using the given settings. This is protected so that it - * is easy to make a subclass, but otherwise, the static factory methods should be preferred. - */ - protected GrafeasClient(GrafeasSettings settings) throws IOException { - this.settings = settings; - this.stub = ((GrafeasStubSettings) settings.getStubSettings()).createStub(); - } - - protected GrafeasClient(GrafeasStub stub) { - this.settings = null; - this.stub = stub; - } - - public final GrafeasSettings getSettings() { - return settings; - } - - public GrafeasStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
-   *   Occurrence response = grafeasClient.getOccurrence(name);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence getOccurrence(OccurrenceName name) { - GetOccurrenceRequest request = - GetOccurrenceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
-   *   Occurrence response = grafeasClient.getOccurrence(name);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence getOccurrence(String name) { - GetOccurrenceRequest request = GetOccurrenceRequest.newBuilder().setName(name).build(); - return getOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   GetOccurrenceRequest request =
-   *       GetOccurrenceRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .build();
-   *   Occurrence response = grafeasClient.getOccurrence(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence getOccurrence(GetOccurrenceRequest request) { - return getOccurrenceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   GetOccurrenceRequest request =
-   *       GetOccurrenceRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .build();
-   *   ApiFuture future = grafeasClient.getOccurrenceCallable().futureCall(request);
-   *   // Do something.
-   *   Occurrence response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getOccurrenceCallable() { - return stub.getOccurrenceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   String filter = "filter-1274492040";
-   *   for (Occurrence element : grafeasClient.listOccurrences(parent, filter).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent The name of the project to list occurrences for in the form of - * `projects/[PROJECT_ID]`. - * @param filter The filter expression. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListOccurrencesPagedResponse listOccurrences(ProjectName parent, String filter) { - ListOccurrencesRequest request = - ListOccurrencesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setFilter(filter) - .build(); - return listOccurrences(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   String filter = "filter-1274492040";
-   *   for (Occurrence element : grafeasClient.listOccurrences(parent, filter).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent The name of the project to list occurrences for in the form of - * `projects/[PROJECT_ID]`. - * @param filter The filter expression. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListOccurrencesPagedResponse listOccurrences(String parent, String filter) { - ListOccurrencesRequest request = - ListOccurrencesRequest.newBuilder().setParent(parent).setFilter(filter).build(); - return listOccurrences(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListOccurrencesRequest request =
-   *       ListOccurrencesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Occurrence element : grafeasClient.listOccurrences(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListOccurrencesPagedResponse listOccurrences(ListOccurrencesRequest request) { - return listOccurrencesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListOccurrencesRequest request =
-   *       ListOccurrencesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       grafeasClient.listOccurrencesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Occurrence element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listOccurrencesPagedCallable() { - return stub.listOccurrencesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListOccurrencesRequest request =
-   *       ListOccurrencesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListOccurrencesResponse response = grafeasClient.listOccurrencesCallable().call(request);
-   *     for (Occurrence element : response.getOccurrencesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listOccurrencesCallable() { - return stub.listOccurrencesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified occurrence. For example, use this method to delete an occurrence when the - * occurrence is no longer applicable for the given resource. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
-   *   grafeasClient.deleteOccurrence(name);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteOccurrence(OccurrenceName name) { - DeleteOccurrenceRequest request = - DeleteOccurrenceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified occurrence. For example, use this method to delete an occurrence when the - * occurrence is no longer applicable for the given resource. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
-   *   grafeasClient.deleteOccurrence(name);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteOccurrence(String name) { - DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder().setName(name).build(); - deleteOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified occurrence. For example, use this method to delete an occurrence when the - * occurrence is no longer applicable for the given resource. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   DeleteOccurrenceRequest request =
-   *       DeleteOccurrenceRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .build();
-   *   grafeasClient.deleteOccurrence(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteOccurrence(DeleteOccurrenceRequest request) { - deleteOccurrenceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified occurrence. For example, use this method to delete an occurrence when the - * occurrence is no longer applicable for the given resource. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   DeleteOccurrenceRequest request =
-   *       DeleteOccurrenceRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .build();
-   *   ApiFuture future = grafeasClient.deleteOccurrenceCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteOccurrenceCallable() { - return stub.deleteOccurrenceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   Occurrence occurrence = Occurrence.newBuilder().build();
-   *   Occurrence response = grafeasClient.createOccurrence(parent, occurrence);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * occurrence is to be created. - * @param occurrence The occurrence to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence createOccurrence(ProjectName parent, Occurrence occurrence) { - CreateOccurrenceRequest request = - CreateOccurrenceRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setOccurrence(occurrence) - .build(); - return createOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   Occurrence occurrence = Occurrence.newBuilder().build();
-   *   Occurrence response = grafeasClient.createOccurrence(parent, occurrence);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * occurrence is to be created. - * @param occurrence The occurrence to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence createOccurrence(String parent, Occurrence occurrence) { - CreateOccurrenceRequest request = - CreateOccurrenceRequest.newBuilder().setParent(parent).setOccurrence(occurrence).build(); - return createOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   CreateOccurrenceRequest request =
-   *       CreateOccurrenceRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setOccurrence(Occurrence.newBuilder().build())
-   *           .build();
-   *   Occurrence response = grafeasClient.createOccurrence(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence createOccurrence(CreateOccurrenceRequest request) { - return createOccurrenceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   CreateOccurrenceRequest request =
-   *       CreateOccurrenceRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setOccurrence(Occurrence.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = grafeasClient.createOccurrenceCallable().futureCall(request);
-   *   // Do something.
-   *   Occurrence response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createOccurrenceCallable() { - return stub.createOccurrenceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new occurrences in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   List occurrences = new ArrayList<>();
-   *   BatchCreateOccurrencesResponse response =
-   *       grafeasClient.batchCreateOccurrences(parent, occurrences);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * occurrences are to be created. - * @param occurrences The occurrences to create. Max allowed length is 1000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchCreateOccurrencesResponse batchCreateOccurrences( - ProjectName parent, List occurrences) { - BatchCreateOccurrencesRequest request = - BatchCreateOccurrencesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .addAllOccurrences(occurrences) - .build(); - return batchCreateOccurrences(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new occurrences in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   List occurrences = new ArrayList<>();
-   *   BatchCreateOccurrencesResponse response =
-   *       grafeasClient.batchCreateOccurrences(parent, occurrences);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * occurrences are to be created. - * @param occurrences The occurrences to create. Max allowed length is 1000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchCreateOccurrencesResponse batchCreateOccurrences( - String parent, List occurrences) { - BatchCreateOccurrencesRequest request = - BatchCreateOccurrencesRequest.newBuilder() - .setParent(parent) - .addAllOccurrences(occurrences) - .build(); - return batchCreateOccurrences(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new occurrences in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   BatchCreateOccurrencesRequest request =
-   *       BatchCreateOccurrencesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .addAllOccurrences(new ArrayList())
-   *           .build();
-   *   BatchCreateOccurrencesResponse response = grafeasClient.batchCreateOccurrences(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchCreateOccurrencesResponse batchCreateOccurrences( - BatchCreateOccurrencesRequest request) { - return batchCreateOccurrencesCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new occurrences in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   BatchCreateOccurrencesRequest request =
-   *       BatchCreateOccurrencesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .addAllOccurrences(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       grafeasClient.batchCreateOccurrencesCallable().futureCall(request);
-   *   // Do something.
-   *   BatchCreateOccurrencesResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - batchCreateOccurrencesCallable() { - return stub.batchCreateOccurrencesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
-   *   Occurrence occurrence = Occurrence.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Occurrence response = grafeasClient.updateOccurrence(name, occurrence, updateMask);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @param occurrence The updated occurrence. - * @param updateMask The fields to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence updateOccurrence( - OccurrenceName name, Occurrence occurrence, FieldMask updateMask) { - UpdateOccurrenceRequest request = - UpdateOccurrenceRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setOccurrence(occurrence) - .setUpdateMask(updateMask) - .build(); - return updateOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
-   *   Occurrence occurrence = Occurrence.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Occurrence response = grafeasClient.updateOccurrence(name, occurrence, updateMask);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @param occurrence The updated occurrence. - * @param updateMask The fields to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence updateOccurrence( - String name, Occurrence occurrence, FieldMask updateMask) { - UpdateOccurrenceRequest request = - UpdateOccurrenceRequest.newBuilder() - .setName(name) - .setOccurrence(occurrence) - .setUpdateMask(updateMask) - .build(); - return updateOccurrence(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   UpdateOccurrenceRequest request =
-   *       UpdateOccurrenceRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .setOccurrence(Occurrence.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Occurrence response = grafeasClient.updateOccurrence(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Occurrence updateOccurrence(UpdateOccurrenceRequest request) { - return updateOccurrenceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified occurrence. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   UpdateOccurrenceRequest request =
-   *       UpdateOccurrenceRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .setOccurrence(Occurrence.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = grafeasClient.updateOccurrenceCallable().futureCall(request);
-   *   // Do something.
-   *   Occurrence response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateOccurrenceCallable() { - return stub.updateOccurrenceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the note attached to the specified occurrence. Consumer projects can use this method to - * get a note that belongs to a provider project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
-   *   Note response = grafeasClient.getOccurrenceNote(name);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note getOccurrenceNote(OccurrenceName name) { - GetOccurrenceNoteRequest request = - GetOccurrenceNoteRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getOccurrenceNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the note attached to the specified occurrence. Consumer projects can use this method to - * get a note that belongs to a provider project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString();
-   *   Note response = grafeasClient.getOccurrenceNote(name);
-   * }
-   * }
- * - * @param name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note getOccurrenceNote(String name) { - GetOccurrenceNoteRequest request = GetOccurrenceNoteRequest.newBuilder().setName(name).build(); - return getOccurrenceNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the note attached to the specified occurrence. Consumer projects can use this method to - * get a note that belongs to a provider project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   GetOccurrenceNoteRequest request =
-   *       GetOccurrenceNoteRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .build();
-   *   Note response = grafeasClient.getOccurrenceNote(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note getOccurrenceNote(GetOccurrenceNoteRequest request) { - return getOccurrenceNoteCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the note attached to the specified occurrence. Consumer projects can use this method to - * get a note that belongs to a provider project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   GetOccurrenceNoteRequest request =
-   *       GetOccurrenceNoteRequest.newBuilder()
-   *           .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString())
-   *           .build();
-   *   ApiFuture future = grafeasClient.getOccurrenceNoteCallable().futureCall(request);
-   *   // Do something.
-   *   Note response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getOccurrenceNoteCallable() { - return stub.getOccurrenceNoteCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
-   *   Note response = grafeasClient.getNote(name);
-   * }
-   * }
- * - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note getNote(NoteName name) { - GetNoteRequest request = - GetNoteRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
-   *   Note response = grafeasClient.getNote(name);
-   * }
-   * }
- * - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note getNote(String name) { - GetNoteRequest request = GetNoteRequest.newBuilder().setName(name).build(); - return getNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   GetNoteRequest request =
-   *       GetNoteRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .build();
-   *   Note response = grafeasClient.getNote(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note getNote(GetNoteRequest request) { - return getNoteCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   GetNoteRequest request =
-   *       GetNoteRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .build();
-   *   ApiFuture future = grafeasClient.getNoteCallable().futureCall(request);
-   *   // Do something.
-   *   Note response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getNoteCallable() { - return stub.getNoteCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists notes for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   String filter = "filter-1274492040";
-   *   for (Note element : grafeasClient.listNotes(parent, filter).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent The name of the project to list notes for in the form of `projects/[PROJECT_ID]`. - * @param filter The filter expression. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListNotesPagedResponse listNotes(ProjectName parent, String filter) { - ListNotesRequest request = - ListNotesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setFilter(filter) - .build(); - return listNotes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists notes for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   String filter = "filter-1274492040";
-   *   for (Note element : grafeasClient.listNotes(parent, filter).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent The name of the project to list notes for in the form of `projects/[PROJECT_ID]`. - * @param filter The filter expression. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListNotesPagedResponse listNotes(String parent, String filter) { - ListNotesRequest request = - ListNotesRequest.newBuilder().setParent(parent).setFilter(filter).build(); - return listNotes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists notes for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListNotesRequest request =
-   *       ListNotesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Note element : grafeasClient.listNotes(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListNotesPagedResponse listNotes(ListNotesRequest request) { - return listNotesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists notes for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListNotesRequest request =
-   *       ListNotesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future = grafeasClient.listNotesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Note element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listNotesPagedCallable() { - return stub.listNotesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists notes for the specified project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListNotesRequest request =
-   *       ListNotesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListNotesResponse response = grafeasClient.listNotesCallable().call(request);
-   *     for (Note element : response.getNotesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listNotesCallable() { - return stub.listNotesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
-   *   grafeasClient.deleteNote(name);
-   * }
-   * }
- * - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteNote(NoteName name) { - DeleteNoteRequest request = - DeleteNoteRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
-   *   grafeasClient.deleteNote(name);
-   * }
-   * }
- * - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteNote(String name) { - DeleteNoteRequest request = DeleteNoteRequest.newBuilder().setName(name).build(); - deleteNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   DeleteNoteRequest request =
-   *       DeleteNoteRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .build();
-   *   grafeasClient.deleteNote(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteNote(DeleteNoteRequest request) { - deleteNoteCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   DeleteNoteRequest request =
-   *       DeleteNoteRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .build();
-   *   ApiFuture future = grafeasClient.deleteNoteCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteNoteCallable() { - return stub.deleteNoteCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   String noteId = "noteId-1039694675";
-   *   Note note = Note.newBuilder().build();
-   *   Note response = grafeasClient.createNote(parent, noteId, note);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * note is to be created. - * @param noteId The ID to use for this note. - * @param note The note to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note createNote(ProjectName parent, String noteId, Note note) { - CreateNoteRequest request = - CreateNoteRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setNoteId(noteId) - .setNote(note) - .build(); - return createNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   String noteId = "noteId-1039694675";
-   *   Note note = Note.newBuilder().build();
-   *   Note response = grafeasClient.createNote(parent, noteId, note);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * note is to be created. - * @param noteId The ID to use for this note. - * @param note The note to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note createNote(String parent, String noteId, Note note) { - CreateNoteRequest request = - CreateNoteRequest.newBuilder().setParent(parent).setNoteId(noteId).setNote(note).build(); - return createNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   CreateNoteRequest request =
-   *       CreateNoteRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setNoteId("noteId-1039694675")
-   *           .setNote(Note.newBuilder().build())
-   *           .build();
-   *   Note response = grafeasClient.createNote(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note createNote(CreateNoteRequest request) { - return createNoteCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   CreateNoteRequest request =
-   *       CreateNoteRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setNoteId("noteId-1039694675")
-   *           .setNote(Note.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = grafeasClient.createNoteCallable().futureCall(request);
-   *   // Do something.
-   *   Note response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createNoteCallable() { - return stub.createNoteCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new notes in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   Map notes = new HashMap<>();
-   *   BatchCreateNotesResponse response = grafeasClient.batchCreateNotes(parent, notes);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * notes are to be created. - * @param notes The notes to create. Max allowed length is 1000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchCreateNotesResponse batchCreateNotes( - ProjectName parent, Map notes) { - BatchCreateNotesRequest request = - BatchCreateNotesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .putAllNotes(notes) - .build(); - return batchCreateNotes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new notes in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   Map notes = new HashMap<>();
-   *   BatchCreateNotesResponse response = grafeasClient.batchCreateNotes(parent, notes);
-   * }
-   * }
- * - * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the - * notes are to be created. - * @param notes The notes to create. Max allowed length is 1000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchCreateNotesResponse batchCreateNotes(String parent, Map notes) { - BatchCreateNotesRequest request = - BatchCreateNotesRequest.newBuilder().setParent(parent).putAllNotes(notes).build(); - return batchCreateNotes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new notes in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   BatchCreateNotesRequest request =
-   *       BatchCreateNotesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .putAllNotes(new HashMap())
-   *           .build();
-   *   BatchCreateNotesResponse response = grafeasClient.batchCreateNotes(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchCreateNotesResponse batchCreateNotes(BatchCreateNotesRequest request) { - return batchCreateNotesCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new notes in batch. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   BatchCreateNotesRequest request =
-   *       BatchCreateNotesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .putAllNotes(new HashMap())
-   *           .build();
-   *   ApiFuture future =
-   *       grafeasClient.batchCreateNotesCallable().futureCall(request);
-   *   // Do something.
-   *   BatchCreateNotesResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - batchCreateNotesCallable() { - return stub.batchCreateNotesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
-   *   Note note = Note.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Note response = grafeasClient.updateNote(name, note, updateMask);
-   * }
-   * }
- * - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @param note The updated note. - * @param updateMask The fields to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note updateNote(NoteName name, Note note, FieldMask updateMask) { - UpdateNoteRequest request = - UpdateNoteRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setNote(note) - .setUpdateMask(updateMask) - .build(); - return updateNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
-   *   Note note = Note.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Note response = grafeasClient.updateNote(name, note, updateMask);
-   * }
-   * }
- * - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @param note The updated note. - * @param updateMask The fields to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note updateNote(String name, Note note, FieldMask updateMask) { - UpdateNoteRequest request = - UpdateNoteRequest.newBuilder() - .setName(name) - .setNote(note) - .setUpdateMask(updateMask) - .build(); - return updateNote(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   UpdateNoteRequest request =
-   *       UpdateNoteRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .setNote(Note.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Note response = grafeasClient.updateNote(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Note updateNote(UpdateNoteRequest request) { - return updateNoteCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   UpdateNoteRequest request =
-   *       UpdateNoteRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .setNote(Note.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = grafeasClient.updateNoteCallable().futureCall(request);
-   *   // Do something.
-   *   Note response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateNoteCallable() { - return stub.updateNoteCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences referencing the specified note. Provider projects can use this method to get - * all occurrences across consumer projects referencing the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
-   *   String filter = "filter-1274492040";
-   *   for (Occurrence element : grafeasClient.listNoteOccurrences(name, filter).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param name The name of the note to list occurrences for in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @param filter The filter expression. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListNoteOccurrencesPagedResponse listNoteOccurrences(NoteName name, String filter) { - ListNoteOccurrencesRequest request = - ListNoteOccurrencesRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setFilter(filter) - .build(); - return listNoteOccurrences(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences referencing the specified note. Provider projects can use this method to get - * all occurrences across consumer projects referencing the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   String name = NoteName.of("[PROJECT]", "[NOTE]").toString();
-   *   String filter = "filter-1274492040";
-   *   for (Occurrence element : grafeasClient.listNoteOccurrences(name, filter).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param name The name of the note to list occurrences for in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @param filter The filter expression. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListNoteOccurrencesPagedResponse listNoteOccurrences(String name, String filter) { - ListNoteOccurrencesRequest request = - ListNoteOccurrencesRequest.newBuilder().setName(name).setFilter(filter).build(); - return listNoteOccurrences(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences referencing the specified note. Provider projects can use this method to get - * all occurrences across consumer projects referencing the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListNoteOccurrencesRequest request =
-   *       ListNoteOccurrencesRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Occurrence element : grafeasClient.listNoteOccurrences(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListNoteOccurrencesPagedResponse listNoteOccurrences( - ListNoteOccurrencesRequest request) { - return listNoteOccurrencesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences referencing the specified note. Provider projects can use this method to get - * all occurrences across consumer projects referencing the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListNoteOccurrencesRequest request =
-   *       ListNoteOccurrencesRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       grafeasClient.listNoteOccurrencesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Occurrence element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listNoteOccurrencesPagedCallable() { - return stub.listNoteOccurrencesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists occurrences referencing the specified note. Provider projects can use this method to get - * all occurrences across consumer projects referencing the specified note. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
-   *   ListNoteOccurrencesRequest request =
-   *       ListNoteOccurrencesRequest.newBuilder()
-   *           .setName(NoteName.of("[PROJECT]", "[NOTE]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListNoteOccurrencesResponse response =
-   *         grafeasClient.listNoteOccurrencesCallable().call(request);
-   *     for (Occurrence element : response.getOccurrencesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listNoteOccurrencesCallable() { - return stub.listNoteOccurrencesCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListOccurrencesPagedResponse - extends AbstractPagedListResponse< - ListOccurrencesRequest, - ListOccurrencesResponse, - Occurrence, - ListOccurrencesPage, - ListOccurrencesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListOccurrencesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListOccurrencesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListOccurrencesPagedResponse(ListOccurrencesPage page) { - super(page, ListOccurrencesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListOccurrencesPage - extends AbstractPage< - ListOccurrencesRequest, ListOccurrencesResponse, Occurrence, ListOccurrencesPage> { - - private ListOccurrencesPage( - PageContext context, - ListOccurrencesResponse response) { - super(context, response); - } - - private static ListOccurrencesPage createEmptyPage() { - return new ListOccurrencesPage(null, null); - } - - @Override - protected ListOccurrencesPage createPage( - PageContext context, - ListOccurrencesResponse response) { - return new ListOccurrencesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListOccurrencesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListOccurrencesRequest, - ListOccurrencesResponse, - Occurrence, - ListOccurrencesPage, - ListOccurrencesFixedSizeCollection> { - - private ListOccurrencesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListOccurrencesFixedSizeCollection createEmptyCollection() { - return new ListOccurrencesFixedSizeCollection(null, 0); - } - - @Override - protected ListOccurrencesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListOccurrencesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListNotesPagedResponse - extends AbstractPagedListResponse< - ListNotesRequest, ListNotesResponse, Note, ListNotesPage, ListNotesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListNotesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListNotesPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListNotesPagedResponse(ListNotesPage page) { - super(page, ListNotesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListNotesPage - extends AbstractPage { - - private ListNotesPage( - PageContext context, - ListNotesResponse response) { - super(context, response); - } - - private static ListNotesPage createEmptyPage() { - return new ListNotesPage(null, null); - } - - @Override - protected ListNotesPage createPage( - PageContext context, - ListNotesResponse response) { - return new ListNotesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListNotesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListNotesRequest, ListNotesResponse, Note, ListNotesPage, ListNotesFixedSizeCollection> { - - private ListNotesFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListNotesFixedSizeCollection createEmptyCollection() { - return new ListNotesFixedSizeCollection(null, 0); - } - - @Override - protected ListNotesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListNotesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListNoteOccurrencesPagedResponse - extends AbstractPagedListResponse< - ListNoteOccurrencesRequest, - ListNoteOccurrencesResponse, - Occurrence, - ListNoteOccurrencesPage, - ListNoteOccurrencesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListNoteOccurrencesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListNoteOccurrencesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListNoteOccurrencesPagedResponse(ListNoteOccurrencesPage page) { - super(page, ListNoteOccurrencesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListNoteOccurrencesPage - extends AbstractPage< - ListNoteOccurrencesRequest, - ListNoteOccurrencesResponse, - Occurrence, - ListNoteOccurrencesPage> { - - private ListNoteOccurrencesPage( - PageContext context, - ListNoteOccurrencesResponse response) { - super(context, response); - } - - private static ListNoteOccurrencesPage createEmptyPage() { - return new ListNoteOccurrencesPage(null, null); - } - - @Override - protected ListNoteOccurrencesPage createPage( - PageContext context, - ListNoteOccurrencesResponse response) { - return new ListNoteOccurrencesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListNoteOccurrencesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListNoteOccurrencesRequest, - ListNoteOccurrencesResponse, - Occurrence, - ListNoteOccurrencesPage, - ListNoteOccurrencesFixedSizeCollection> { - - private ListNoteOccurrencesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListNoteOccurrencesFixedSizeCollection createEmptyCollection() { - return new ListNoteOccurrencesFixedSizeCollection(null, 0); - } - - @Override - protected ListNoteOccurrencesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListNoteOccurrencesFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java deleted file mode 100644 index 46c98bd4370b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasGrpc.java +++ /dev/null @@ -1,1491 +0,0 @@ -package io.grafeas.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * [Grafeas](https://grafeas.io) API.
- * Retrieves analysis results of Cloud components such as Docker container
- * images.
- * Analysis results are stored as a series of occurrences. An `Occurrence`
- * contains information about a specific analysis instance on a resource. An
- * occurrence refers to a `Note`. A note contains details describing the
- * analysis and is generally stored in a separate project, called a `Provider`.
- * Multiple occurrences can refer to the same note.
- * For example, an SSL vulnerability could affect multiple images. In this case,
- * there would be one note for the vulnerability and an occurrence for each
- * image with the vulnerability referring to that note.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: grafeas/v1/grafeas.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class GrafeasGrpc { - - private GrafeasGrpc() {} - - public static final String SERVICE_NAME = "grafeas.v1.Grafeas"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getGetOccurrenceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetOccurrence", - requestType = io.grafeas.v1.GetOccurrenceRequest.class, - responseType = io.grafeas.v1.Occurrence.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetOccurrenceMethod() { - io.grpc.MethodDescriptor getGetOccurrenceMethod; - if ((getGetOccurrenceMethod = GrafeasGrpc.getGetOccurrenceMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getGetOccurrenceMethod = GrafeasGrpc.getGetOccurrenceMethod) == null) { - GrafeasGrpc.getGetOccurrenceMethod = getGetOccurrenceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOccurrence")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.GetOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.Occurrence.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("GetOccurrence")) - .build(); - } - } - } - return getGetOccurrenceMethod; - } - - private static volatile io.grpc.MethodDescriptor getListOccurrencesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListOccurrences", - requestType = io.grafeas.v1.ListOccurrencesRequest.class, - responseType = io.grafeas.v1.ListOccurrencesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListOccurrencesMethod() { - io.grpc.MethodDescriptor getListOccurrencesMethod; - if ((getListOccurrencesMethod = GrafeasGrpc.getListOccurrencesMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getListOccurrencesMethod = GrafeasGrpc.getListOccurrencesMethod) == null) { - GrafeasGrpc.getListOccurrencesMethod = getListOccurrencesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListOccurrences")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.ListOccurrencesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.ListOccurrencesResponse.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("ListOccurrences")) - .build(); - } - } - } - return getListOccurrencesMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteOccurrenceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteOccurrence", - requestType = io.grafeas.v1.DeleteOccurrenceRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteOccurrenceMethod() { - io.grpc.MethodDescriptor getDeleteOccurrenceMethod; - if ((getDeleteOccurrenceMethod = GrafeasGrpc.getDeleteOccurrenceMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getDeleteOccurrenceMethod = GrafeasGrpc.getDeleteOccurrenceMethod) == null) { - GrafeasGrpc.getDeleteOccurrenceMethod = getDeleteOccurrenceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteOccurrence")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.DeleteOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("DeleteOccurrence")) - .build(); - } - } - } - return getDeleteOccurrenceMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateOccurrenceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateOccurrence", - requestType = io.grafeas.v1.CreateOccurrenceRequest.class, - responseType = io.grafeas.v1.Occurrence.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateOccurrenceMethod() { - io.grpc.MethodDescriptor getCreateOccurrenceMethod; - if ((getCreateOccurrenceMethod = GrafeasGrpc.getCreateOccurrenceMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getCreateOccurrenceMethod = GrafeasGrpc.getCreateOccurrenceMethod) == null) { - GrafeasGrpc.getCreateOccurrenceMethod = getCreateOccurrenceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateOccurrence")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.CreateOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.Occurrence.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("CreateOccurrence")) - .build(); - } - } - } - return getCreateOccurrenceMethod; - } - - private static volatile io.grpc.MethodDescriptor getBatchCreateOccurrencesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchCreateOccurrences", - requestType = io.grafeas.v1.BatchCreateOccurrencesRequest.class, - responseType = io.grafeas.v1.BatchCreateOccurrencesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBatchCreateOccurrencesMethod() { - io.grpc.MethodDescriptor getBatchCreateOccurrencesMethod; - if ((getBatchCreateOccurrencesMethod = GrafeasGrpc.getBatchCreateOccurrencesMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getBatchCreateOccurrencesMethod = GrafeasGrpc.getBatchCreateOccurrencesMethod) == null) { - GrafeasGrpc.getBatchCreateOccurrencesMethod = getBatchCreateOccurrencesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchCreateOccurrences")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.BatchCreateOccurrencesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.BatchCreateOccurrencesResponse.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("BatchCreateOccurrences")) - .build(); - } - } - } - return getBatchCreateOccurrencesMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateOccurrenceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateOccurrence", - requestType = io.grafeas.v1.UpdateOccurrenceRequest.class, - responseType = io.grafeas.v1.Occurrence.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateOccurrenceMethod() { - io.grpc.MethodDescriptor getUpdateOccurrenceMethod; - if ((getUpdateOccurrenceMethod = GrafeasGrpc.getUpdateOccurrenceMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getUpdateOccurrenceMethod = GrafeasGrpc.getUpdateOccurrenceMethod) == null) { - GrafeasGrpc.getUpdateOccurrenceMethod = getUpdateOccurrenceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateOccurrence")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.UpdateOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.Occurrence.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("UpdateOccurrence")) - .build(); - } - } - } - return getUpdateOccurrenceMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetOccurrenceNoteMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetOccurrenceNote", - requestType = io.grafeas.v1.GetOccurrenceNoteRequest.class, - responseType = io.grafeas.v1.Note.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetOccurrenceNoteMethod() { - io.grpc.MethodDescriptor getGetOccurrenceNoteMethod; - if ((getGetOccurrenceNoteMethod = GrafeasGrpc.getGetOccurrenceNoteMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getGetOccurrenceNoteMethod = GrafeasGrpc.getGetOccurrenceNoteMethod) == null) { - GrafeasGrpc.getGetOccurrenceNoteMethod = getGetOccurrenceNoteMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOccurrenceNote")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.GetOccurrenceNoteRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.Note.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("GetOccurrenceNote")) - .build(); - } - } - } - return getGetOccurrenceNoteMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetNoteMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetNote", - requestType = io.grafeas.v1.GetNoteRequest.class, - responseType = io.grafeas.v1.Note.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetNoteMethod() { - io.grpc.MethodDescriptor getGetNoteMethod; - if ((getGetNoteMethod = GrafeasGrpc.getGetNoteMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getGetNoteMethod = GrafeasGrpc.getGetNoteMethod) == null) { - GrafeasGrpc.getGetNoteMethod = getGetNoteMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNote")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.GetNoteRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.Note.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("GetNote")) - .build(); - } - } - } - return getGetNoteMethod; - } - - private static volatile io.grpc.MethodDescriptor getListNotesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListNotes", - requestType = io.grafeas.v1.ListNotesRequest.class, - responseType = io.grafeas.v1.ListNotesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListNotesMethod() { - io.grpc.MethodDescriptor getListNotesMethod; - if ((getListNotesMethod = GrafeasGrpc.getListNotesMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getListNotesMethod = GrafeasGrpc.getListNotesMethod) == null) { - GrafeasGrpc.getListNotesMethod = getListNotesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNotes")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.ListNotesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.ListNotesResponse.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("ListNotes")) - .build(); - } - } - } - return getListNotesMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteNoteMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteNote", - requestType = io.grafeas.v1.DeleteNoteRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteNoteMethod() { - io.grpc.MethodDescriptor getDeleteNoteMethod; - if ((getDeleteNoteMethod = GrafeasGrpc.getDeleteNoteMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getDeleteNoteMethod = GrafeasGrpc.getDeleteNoteMethod) == null) { - GrafeasGrpc.getDeleteNoteMethod = getDeleteNoteMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNote")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.DeleteNoteRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("DeleteNote")) - .build(); - } - } - } - return getDeleteNoteMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateNoteMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateNote", - requestType = io.grafeas.v1.CreateNoteRequest.class, - responseType = io.grafeas.v1.Note.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateNoteMethod() { - io.grpc.MethodDescriptor getCreateNoteMethod; - if ((getCreateNoteMethod = GrafeasGrpc.getCreateNoteMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getCreateNoteMethod = GrafeasGrpc.getCreateNoteMethod) == null) { - GrafeasGrpc.getCreateNoteMethod = getCreateNoteMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNote")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.CreateNoteRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.Note.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("CreateNote")) - .build(); - } - } - } - return getCreateNoteMethod; - } - - private static volatile io.grpc.MethodDescriptor getBatchCreateNotesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchCreateNotes", - requestType = io.grafeas.v1.BatchCreateNotesRequest.class, - responseType = io.grafeas.v1.BatchCreateNotesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBatchCreateNotesMethod() { - io.grpc.MethodDescriptor getBatchCreateNotesMethod; - if ((getBatchCreateNotesMethod = GrafeasGrpc.getBatchCreateNotesMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getBatchCreateNotesMethod = GrafeasGrpc.getBatchCreateNotesMethod) == null) { - GrafeasGrpc.getBatchCreateNotesMethod = getBatchCreateNotesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchCreateNotes")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.BatchCreateNotesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.BatchCreateNotesResponse.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("BatchCreateNotes")) - .build(); - } - } - } - return getBatchCreateNotesMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateNoteMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateNote", - requestType = io.grafeas.v1.UpdateNoteRequest.class, - responseType = io.grafeas.v1.Note.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateNoteMethod() { - io.grpc.MethodDescriptor getUpdateNoteMethod; - if ((getUpdateNoteMethod = GrafeasGrpc.getUpdateNoteMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getUpdateNoteMethod = GrafeasGrpc.getUpdateNoteMethod) == null) { - GrafeasGrpc.getUpdateNoteMethod = getUpdateNoteMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateNote")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.UpdateNoteRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.Note.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("UpdateNote")) - .build(); - } - } - } - return getUpdateNoteMethod; - } - - private static volatile io.grpc.MethodDescriptor getListNoteOccurrencesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListNoteOccurrences", - requestType = io.grafeas.v1.ListNoteOccurrencesRequest.class, - responseType = io.grafeas.v1.ListNoteOccurrencesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListNoteOccurrencesMethod() { - io.grpc.MethodDescriptor getListNoteOccurrencesMethod; - if ((getListNoteOccurrencesMethod = GrafeasGrpc.getListNoteOccurrencesMethod) == null) { - synchronized (GrafeasGrpc.class) { - if ((getListNoteOccurrencesMethod = GrafeasGrpc.getListNoteOccurrencesMethod) == null) { - GrafeasGrpc.getListNoteOccurrencesMethod = getListNoteOccurrencesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNoteOccurrences")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.ListNoteOccurrencesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grafeas.v1.ListNoteOccurrencesResponse.getDefaultInstance())) - .setSchemaDescriptor(new GrafeasMethodDescriptorSupplier("ListNoteOccurrences")) - .build(); - } - } - } - return getListNoteOccurrencesMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static GrafeasStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public GrafeasStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new GrafeasStub(channel, callOptions); - } - }; - return GrafeasStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static GrafeasBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public GrafeasBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new GrafeasBlockingStub(channel, callOptions); - } - }; - return GrafeasBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static GrafeasFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public GrafeasFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new GrafeasFutureStub(channel, callOptions); - } - }; - return GrafeasFutureStub.newStub(factory, channel); - } - - /** - *
-   * [Grafeas](https://grafeas.io) API.
-   * Retrieves analysis results of Cloud components such as Docker container
-   * images.
-   * Analysis results are stored as a series of occurrences. An `Occurrence`
-   * contains information about a specific analysis instance on a resource. An
-   * occurrence refers to a `Note`. A note contains details describing the
-   * analysis and is generally stored in a separate project, called a `Provider`.
-   * Multiple occurrences can refer to the same note.
-   * For example, an SSL vulnerability could affect multiple images. In this case,
-   * there would be one note for the vulnerability and an occurrence for each
-   * image with the vulnerability referring to that note.
-   * 
- */ - public static abstract class GrafeasImplBase implements io.grpc.BindableService { - - /** - *
-     * Gets the specified occurrence.
-     * 
- */ - public void getOccurrence(io.grafeas.v1.GetOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOccurrenceMethod(), responseObserver); - } - - /** - *
-     * Lists occurrences for the specified project.
-     * 
- */ - public void listOccurrences(io.grafeas.v1.ListOccurrencesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListOccurrencesMethod(), responseObserver); - } - - /** - *
-     * Deletes the specified occurrence. For example, use this method to delete an
-     * occurrence when the occurrence is no longer applicable for the given
-     * resource.
-     * 
- */ - public void deleteOccurrence(io.grafeas.v1.DeleteOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteOccurrenceMethod(), responseObserver); - } - - /** - *
-     * Creates a new occurrence.
-     * 
- */ - public void createOccurrence(io.grafeas.v1.CreateOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateOccurrenceMethod(), responseObserver); - } - - /** - *
-     * Creates new occurrences in batch.
-     * 
- */ - public void batchCreateOccurrences(io.grafeas.v1.BatchCreateOccurrencesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchCreateOccurrencesMethod(), responseObserver); - } - - /** - *
-     * Updates the specified occurrence.
-     * 
- */ - public void updateOccurrence(io.grafeas.v1.UpdateOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateOccurrenceMethod(), responseObserver); - } - - /** - *
-     * Gets the note attached to the specified occurrence. Consumer projects can
-     * use this method to get a note that belongs to a provider project.
-     * 
- */ - public void getOccurrenceNote(io.grafeas.v1.GetOccurrenceNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOccurrenceNoteMethod(), responseObserver); - } - - /** - *
-     * Gets the specified note.
-     * 
- */ - public void getNote(io.grafeas.v1.GetNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNoteMethod(), responseObserver); - } - - /** - *
-     * Lists notes for the specified project.
-     * 
- */ - public void listNotes(io.grafeas.v1.ListNotesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNotesMethod(), responseObserver); - } - - /** - *
-     * Deletes the specified note.
-     * 
- */ - public void deleteNote(io.grafeas.v1.DeleteNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNoteMethod(), responseObserver); - } - - /** - *
-     * Creates a new note.
-     * 
- */ - public void createNote(io.grafeas.v1.CreateNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNoteMethod(), responseObserver); - } - - /** - *
-     * Creates new notes in batch.
-     * 
- */ - public void batchCreateNotes(io.grafeas.v1.BatchCreateNotesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchCreateNotesMethod(), responseObserver); - } - - /** - *
-     * Updates the specified note.
-     * 
- */ - public void updateNote(io.grafeas.v1.UpdateNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateNoteMethod(), responseObserver); - } - - /** - *
-     * Lists occurrences referencing the specified note. Provider projects can use
-     * this method to get all occurrences across consumer projects referencing the
-     * specified note.
-     * 
- */ - public void listNoteOccurrences(io.grafeas.v1.ListNoteOccurrencesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNoteOccurrencesMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getGetOccurrenceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.GetOccurrenceRequest, - io.grafeas.v1.Occurrence>( - this, METHODID_GET_OCCURRENCE))) - .addMethod( - getListOccurrencesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.ListOccurrencesRequest, - io.grafeas.v1.ListOccurrencesResponse>( - this, METHODID_LIST_OCCURRENCES))) - .addMethod( - getDeleteOccurrenceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.DeleteOccurrenceRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_OCCURRENCE))) - .addMethod( - getCreateOccurrenceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.CreateOccurrenceRequest, - io.grafeas.v1.Occurrence>( - this, METHODID_CREATE_OCCURRENCE))) - .addMethod( - getBatchCreateOccurrencesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.BatchCreateOccurrencesRequest, - io.grafeas.v1.BatchCreateOccurrencesResponse>( - this, METHODID_BATCH_CREATE_OCCURRENCES))) - .addMethod( - getUpdateOccurrenceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.UpdateOccurrenceRequest, - io.grafeas.v1.Occurrence>( - this, METHODID_UPDATE_OCCURRENCE))) - .addMethod( - getGetOccurrenceNoteMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.GetOccurrenceNoteRequest, - io.grafeas.v1.Note>( - this, METHODID_GET_OCCURRENCE_NOTE))) - .addMethod( - getGetNoteMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.GetNoteRequest, - io.grafeas.v1.Note>( - this, METHODID_GET_NOTE))) - .addMethod( - getListNotesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.ListNotesRequest, - io.grafeas.v1.ListNotesResponse>( - this, METHODID_LIST_NOTES))) - .addMethod( - getDeleteNoteMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.DeleteNoteRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_NOTE))) - .addMethod( - getCreateNoteMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.CreateNoteRequest, - io.grafeas.v1.Note>( - this, METHODID_CREATE_NOTE))) - .addMethod( - getBatchCreateNotesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.BatchCreateNotesRequest, - io.grafeas.v1.BatchCreateNotesResponse>( - this, METHODID_BATCH_CREATE_NOTES))) - .addMethod( - getUpdateNoteMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.UpdateNoteRequest, - io.grafeas.v1.Note>( - this, METHODID_UPDATE_NOTE))) - .addMethod( - getListNoteOccurrencesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.grafeas.v1.ListNoteOccurrencesRequest, - io.grafeas.v1.ListNoteOccurrencesResponse>( - this, METHODID_LIST_NOTE_OCCURRENCES))) - .build(); - } - } - - /** - *
-   * [Grafeas](https://grafeas.io) API.
-   * Retrieves analysis results of Cloud components such as Docker container
-   * images.
-   * Analysis results are stored as a series of occurrences. An `Occurrence`
-   * contains information about a specific analysis instance on a resource. An
-   * occurrence refers to a `Note`. A note contains details describing the
-   * analysis and is generally stored in a separate project, called a `Provider`.
-   * Multiple occurrences can refer to the same note.
-   * For example, an SSL vulnerability could affect multiple images. In this case,
-   * there would be one note for the vulnerability and an occurrence for each
-   * image with the vulnerability referring to that note.
-   * 
- */ - public static final class GrafeasStub extends io.grpc.stub.AbstractAsyncStub { - private GrafeasStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected GrafeasStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new GrafeasStub(channel, callOptions); - } - - /** - *
-     * Gets the specified occurrence.
-     * 
- */ - public void getOccurrence(io.grafeas.v1.GetOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetOccurrenceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists occurrences for the specified project.
-     * 
- */ - public void listOccurrences(io.grafeas.v1.ListOccurrencesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListOccurrencesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes the specified occurrence. For example, use this method to delete an
-     * occurrence when the occurrence is no longer applicable for the given
-     * resource.
-     * 
- */ - public void deleteOccurrence(io.grafeas.v1.DeleteOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteOccurrenceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a new occurrence.
-     * 
- */ - public void createOccurrence(io.grafeas.v1.CreateOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateOccurrenceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates new occurrences in batch.
-     * 
- */ - public void batchCreateOccurrences(io.grafeas.v1.BatchCreateOccurrencesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchCreateOccurrencesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates the specified occurrence.
-     * 
- */ - public void updateOccurrence(io.grafeas.v1.UpdateOccurrenceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateOccurrenceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets the note attached to the specified occurrence. Consumer projects can
-     * use this method to get a note that belongs to a provider project.
-     * 
- */ - public void getOccurrenceNote(io.grafeas.v1.GetOccurrenceNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetOccurrenceNoteMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets the specified note.
-     * 
- */ - public void getNote(io.grafeas.v1.GetNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetNoteMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists notes for the specified project.
-     * 
- */ - public void listNotes(io.grafeas.v1.ListNotesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListNotesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes the specified note.
-     * 
- */ - public void deleteNote(io.grafeas.v1.DeleteNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteNoteMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a new note.
-     * 
- */ - public void createNote(io.grafeas.v1.CreateNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateNoteMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates new notes in batch.
-     * 
- */ - public void batchCreateNotes(io.grafeas.v1.BatchCreateNotesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchCreateNotesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates the specified note.
-     * 
- */ - public void updateNote(io.grafeas.v1.UpdateNoteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateNoteMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists occurrences referencing the specified note. Provider projects can use
-     * this method to get all occurrences across consumer projects referencing the
-     * specified note.
-     * 
- */ - public void listNoteOccurrences(io.grafeas.v1.ListNoteOccurrencesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListNoteOccurrencesMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * [Grafeas](https://grafeas.io) API.
-   * Retrieves analysis results of Cloud components such as Docker container
-   * images.
-   * Analysis results are stored as a series of occurrences. An `Occurrence`
-   * contains information about a specific analysis instance on a resource. An
-   * occurrence refers to a `Note`. A note contains details describing the
-   * analysis and is generally stored in a separate project, called a `Provider`.
-   * Multiple occurrences can refer to the same note.
-   * For example, an SSL vulnerability could affect multiple images. In this case,
-   * there would be one note for the vulnerability and an occurrence for each
-   * image with the vulnerability referring to that note.
-   * 
- */ - public static final class GrafeasBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private GrafeasBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected GrafeasBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new GrafeasBlockingStub(channel, callOptions); - } - - /** - *
-     * Gets the specified occurrence.
-     * 
- */ - public io.grafeas.v1.Occurrence getOccurrence(io.grafeas.v1.GetOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetOccurrenceMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists occurrences for the specified project.
-     * 
- */ - public io.grafeas.v1.ListOccurrencesResponse listOccurrences(io.grafeas.v1.ListOccurrencesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListOccurrencesMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes the specified occurrence. For example, use this method to delete an
-     * occurrence when the occurrence is no longer applicable for the given
-     * resource.
-     * 
- */ - public com.google.protobuf.Empty deleteOccurrence(io.grafeas.v1.DeleteOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteOccurrenceMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a new occurrence.
-     * 
- */ - public io.grafeas.v1.Occurrence createOccurrence(io.grafeas.v1.CreateOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateOccurrenceMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates new occurrences in batch.
-     * 
- */ - public io.grafeas.v1.BatchCreateOccurrencesResponse batchCreateOccurrences(io.grafeas.v1.BatchCreateOccurrencesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBatchCreateOccurrencesMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates the specified occurrence.
-     * 
- */ - public io.grafeas.v1.Occurrence updateOccurrence(io.grafeas.v1.UpdateOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateOccurrenceMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets the note attached to the specified occurrence. Consumer projects can
-     * use this method to get a note that belongs to a provider project.
-     * 
- */ - public io.grafeas.v1.Note getOccurrenceNote(io.grafeas.v1.GetOccurrenceNoteRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetOccurrenceNoteMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets the specified note.
-     * 
- */ - public io.grafeas.v1.Note getNote(io.grafeas.v1.GetNoteRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetNoteMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists notes for the specified project.
-     * 
- */ - public io.grafeas.v1.ListNotesResponse listNotes(io.grafeas.v1.ListNotesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListNotesMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes the specified note.
-     * 
- */ - public com.google.protobuf.Empty deleteNote(io.grafeas.v1.DeleteNoteRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteNoteMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a new note.
-     * 
- */ - public io.grafeas.v1.Note createNote(io.grafeas.v1.CreateNoteRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateNoteMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates new notes in batch.
-     * 
- */ - public io.grafeas.v1.BatchCreateNotesResponse batchCreateNotes(io.grafeas.v1.BatchCreateNotesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBatchCreateNotesMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates the specified note.
-     * 
- */ - public io.grafeas.v1.Note updateNote(io.grafeas.v1.UpdateNoteRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateNoteMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists occurrences referencing the specified note. Provider projects can use
-     * this method to get all occurrences across consumer projects referencing the
-     * specified note.
-     * 
- */ - public io.grafeas.v1.ListNoteOccurrencesResponse listNoteOccurrences(io.grafeas.v1.ListNoteOccurrencesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListNoteOccurrencesMethod(), getCallOptions(), request); - } - } - - /** - *
-   * [Grafeas](https://grafeas.io) API.
-   * Retrieves analysis results of Cloud components such as Docker container
-   * images.
-   * Analysis results are stored as a series of occurrences. An `Occurrence`
-   * contains information about a specific analysis instance on a resource. An
-   * occurrence refers to a `Note`. A note contains details describing the
-   * analysis and is generally stored in a separate project, called a `Provider`.
-   * Multiple occurrences can refer to the same note.
-   * For example, an SSL vulnerability could affect multiple images. In this case,
-   * there would be one note for the vulnerability and an occurrence for each
-   * image with the vulnerability referring to that note.
-   * 
- */ - public static final class GrafeasFutureStub extends io.grpc.stub.AbstractFutureStub { - private GrafeasFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected GrafeasFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new GrafeasFutureStub(channel, callOptions); - } - - /** - *
-     * Gets the specified occurrence.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getOccurrence( - io.grafeas.v1.GetOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetOccurrenceMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists occurrences for the specified project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listOccurrences( - io.grafeas.v1.ListOccurrencesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListOccurrencesMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes the specified occurrence. For example, use this method to delete an
-     * occurrence when the occurrence is no longer applicable for the given
-     * resource.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteOccurrence( - io.grafeas.v1.DeleteOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteOccurrenceMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a new occurrence.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createOccurrence( - io.grafeas.v1.CreateOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateOccurrenceMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates new occurrences in batch.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture batchCreateOccurrences( - io.grafeas.v1.BatchCreateOccurrencesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchCreateOccurrencesMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates the specified occurrence.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateOccurrence( - io.grafeas.v1.UpdateOccurrenceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateOccurrenceMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets the note attached to the specified occurrence. Consumer projects can
-     * use this method to get a note that belongs to a provider project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getOccurrenceNote( - io.grafeas.v1.GetOccurrenceNoteRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetOccurrenceNoteMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets the specified note.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getNote( - io.grafeas.v1.GetNoteRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetNoteMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists notes for the specified project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listNotes( - io.grafeas.v1.ListNotesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListNotesMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes the specified note.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteNote( - io.grafeas.v1.DeleteNoteRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteNoteMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a new note.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createNote( - io.grafeas.v1.CreateNoteRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateNoteMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates new notes in batch.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture batchCreateNotes( - io.grafeas.v1.BatchCreateNotesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchCreateNotesMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates the specified note.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateNote( - io.grafeas.v1.UpdateNoteRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateNoteMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists occurrences referencing the specified note. Provider projects can use
-     * this method to get all occurrences across consumer projects referencing the
-     * specified note.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listNoteOccurrences( - io.grafeas.v1.ListNoteOccurrencesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListNoteOccurrencesMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_GET_OCCURRENCE = 0; - private static final int METHODID_LIST_OCCURRENCES = 1; - private static final int METHODID_DELETE_OCCURRENCE = 2; - private static final int METHODID_CREATE_OCCURRENCE = 3; - private static final int METHODID_BATCH_CREATE_OCCURRENCES = 4; - private static final int METHODID_UPDATE_OCCURRENCE = 5; - private static final int METHODID_GET_OCCURRENCE_NOTE = 6; - private static final int METHODID_GET_NOTE = 7; - private static final int METHODID_LIST_NOTES = 8; - private static final int METHODID_DELETE_NOTE = 9; - private static final int METHODID_CREATE_NOTE = 10; - private static final int METHODID_BATCH_CREATE_NOTES = 11; - private static final int METHODID_UPDATE_NOTE = 12; - private static final int METHODID_LIST_NOTE_OCCURRENCES = 13; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final GrafeasImplBase serviceImpl; - private final int methodId; - - MethodHandlers(GrafeasImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_GET_OCCURRENCE: - serviceImpl.getOccurrence((io.grafeas.v1.GetOccurrenceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_OCCURRENCES: - serviceImpl.listOccurrences((io.grafeas.v1.ListOccurrencesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_OCCURRENCE: - serviceImpl.deleteOccurrence((io.grafeas.v1.DeleteOccurrenceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_OCCURRENCE: - serviceImpl.createOccurrence((io.grafeas.v1.CreateOccurrenceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_BATCH_CREATE_OCCURRENCES: - serviceImpl.batchCreateOccurrences((io.grafeas.v1.BatchCreateOccurrencesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_OCCURRENCE: - serviceImpl.updateOccurrence((io.grafeas.v1.UpdateOccurrenceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_OCCURRENCE_NOTE: - serviceImpl.getOccurrenceNote((io.grafeas.v1.GetOccurrenceNoteRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_NOTE: - serviceImpl.getNote((io.grafeas.v1.GetNoteRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_NOTES: - serviceImpl.listNotes((io.grafeas.v1.ListNotesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_NOTE: - serviceImpl.deleteNote((io.grafeas.v1.DeleteNoteRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_NOTE: - serviceImpl.createNote((io.grafeas.v1.CreateNoteRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_BATCH_CREATE_NOTES: - serviceImpl.batchCreateNotes((io.grafeas.v1.BatchCreateNotesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_NOTE: - serviceImpl.updateNote((io.grafeas.v1.UpdateNoteRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_NOTE_OCCURRENCES: - serviceImpl.listNoteOccurrences((io.grafeas.v1.ListNoteOccurrencesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class GrafeasBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - GrafeasBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Grafeas"); - } - } - - private static final class GrafeasFileDescriptorSupplier - extends GrafeasBaseDescriptorSupplier { - GrafeasFileDescriptorSupplier() {} - } - - private static final class GrafeasMethodDescriptorSupplier - extends GrafeasBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - GrafeasMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (GrafeasGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new GrafeasFileDescriptorSupplier()) - .addMethod(getGetOccurrenceMethod()) - .addMethod(getListOccurrencesMethod()) - .addMethod(getDeleteOccurrenceMethod()) - .addMethod(getCreateOccurrenceMethod()) - .addMethod(getBatchCreateOccurrencesMethod()) - .addMethod(getUpdateOccurrenceMethod()) - .addMethod(getGetOccurrenceNoteMethod()) - .addMethod(getGetNoteMethod()) - .addMethod(getListNotesMethod()) - .addMethod(getDeleteNoteMethod()) - .addMethod(getCreateNoteMethod()) - .addMethod(getBatchCreateNotesMethod()) - .addMethod(getUpdateNoteMethod()) - .addMethod(getListNoteOccurrencesMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java deleted file mode 100644 index e0f413fa5872..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasOuterClass.java +++ /dev/null @@ -1,492 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public final class GrafeasOuterClass { - private GrafeasOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Occurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Occurrence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Note_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Note_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_GetOccurrenceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_GetNoteRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ListNotesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ListNotesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_DeleteNoteRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_CreateNoteRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_UpdateNoteRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\030grafeas/v1/grafeas.proto\022\ngrafeas.v1\032\034" + - "google/api/annotations.proto\032\027google/api" + - "/client.proto\032\037google/api/field_behavior" + - ".proto\032\031google/api/resource.proto\032\033googl" + - "e/protobuf/empty.proto\032 google/protobuf/" + - "field_mask.proto\032\037google/protobuf/timest" + - "amp.proto\032\034grafeas/v1/attestation.proto\032" + - "\026grafeas/v1/build.proto\032\027grafeas/v1/comm" + - "on.proto\032\033grafeas/v1/compliance.proto\032\033g" + - "rafeas/v1/deployment.proto\032\032grafeas/v1/d" + - "iscovery.proto\032!grafeas/v1/dsse_attestat" + - "ion.proto\032\026grafeas/v1/image.proto\032\030grafe" + - "as/v1/package.proto\032\030grafeas/v1/upgrade." + - "proto\032\024grafeas/v1/vex.proto\032\036grafeas/v1/" + - "vulnerability.proto\"\373\006\n\nOccurrence\022\014\n\004na" + - "me\030\001 \001(\t\022\024\n\014resource_uri\030\002 \001(\t\022\021\n\tnote_n" + - "ame\030\003 \001(\t\022\"\n\004kind\030\004 \001(\0162\024.grafeas.v1.Not" + - "eKind\022\023\n\013remediation\030\005 \001(\t\022/\n\013create_tim" + - "e\030\006 \001(\0132\032.google.protobuf.Timestamp\022/\n\013u" + - "pdate_time\030\007 \001(\0132\032.google.protobuf.Times" + - "tamp\022<\n\rvulnerability\030\010 \001(\0132#.grafeas.v1" + - ".VulnerabilityOccurrenceH\000\022,\n\005build\030\t \001(" + - "\0132\033.grafeas.v1.BuildOccurrenceH\000\022,\n\005imag" + - "e\030\n \001(\0132\033.grafeas.v1.ImageOccurrenceH\000\0220" + - "\n\007package\030\013 \001(\0132\035.grafeas.v1.PackageOccu" + - "rrenceH\000\0226\n\ndeployment\030\014 \001(\0132 .grafeas.v" + - "1.DeploymentOccurrenceH\000\0224\n\tdiscovery\030\r " + - "\001(\0132\037.grafeas.v1.DiscoveryOccurrenceH\000\0228" + - "\n\013attestation\030\016 \001(\0132!.grafeas.v1.Attesta" + - "tionOccurrenceH\000\0220\n\007upgrade\030\017 \001(\0132\035.graf" + - "eas.v1.UpgradeOccurrenceH\000\0226\n\ncompliance" + - "\030\020 \001(\0132 .grafeas.v1.ComplianceOccurrence" + - "H\000\022A\n\020dsse_attestation\030\021 \001(\0132%.grafeas.v" + - "1.DSSEAttestationOccurrenceH\000\022&\n\010envelop" + - "e\030\022 \001(\0132\024.grafeas.v1.Envelope:G\352AD\n\025graf" + - "eas.io/Occurrence\022+projects/{project}/oc" + - "currences/{occurrence}B\t\n\007details\"\276\007\n\004No" + - "te\022\014\n\004name\030\001 \001(\t\022\031\n\021short_description\030\002 " + - "\001(\t\022\030\n\020long_description\030\003 \001(\t\022\"\n\004kind\030\004 " + - "\001(\0162\024.grafeas.v1.NoteKind\022+\n\013related_url" + - "\030\005 \003(\0132\026.grafeas.v1.RelatedUrl\0223\n\017expira" + - "tion_time\030\006 \001(\0132\032.google.protobuf.Timest" + - "amp\022/\n\013create_time\030\007 \001(\0132\032.google.protob" + - "uf.Timestamp\022/\n\013update_time\030\010 \001(\0132\032.goog" + - "le.protobuf.Timestamp\022\032\n\022related_note_na" + - "mes\030\t \003(\t\0226\n\rvulnerability\030\n \001(\0132\035.grafe" + - "as.v1.VulnerabilityNoteH\000\022&\n\005build\030\013 \001(\013" + - "2\025.grafeas.v1.BuildNoteH\000\022&\n\005image\030\014 \001(\013" + - "2\025.grafeas.v1.ImageNoteH\000\022*\n\007package\030\r \001" + - "(\0132\027.grafeas.v1.PackageNoteH\000\0220\n\ndeploym" + - "ent\030\016 \001(\0132\032.grafeas.v1.DeploymentNoteH\000\022" + - ".\n\tdiscovery\030\017 \001(\0132\031.grafeas.v1.Discover" + - "yNoteH\000\0222\n\013attestation\030\020 \001(\0132\033.grafeas.v" + - "1.AttestationNoteH\000\022*\n\007upgrade\030\021 \001(\0132\027.g" + - "rafeas.v1.UpgradeNoteH\000\0220\n\ncompliance\030\022 " + - "\001(\0132\032.grafeas.v1.ComplianceNoteH\000\022;\n\020dss" + - "e_attestation\030\023 \001(\0132\037.grafeas.v1.DSSEAtt" + - "estationNoteH\000\022K\n\030vulnerability_assessme" + - "nt\030\024 \001(\0132\'.grafeas.v1.VulnerabilityAsses" + - "smentNoteH\000:5\352A2\n\017grafeas.io/Note\022\037proje" + - "cts/{project}/notes/{note}B\006\n\004type\"C\n\024Ge" + - "tOccurrenceRequest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027" + - "\n\025grafeas.io/Occurrence\"{\n\026ListOccurrenc" + - "esRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafe" + - "as.io/Project\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_si" + - "ze\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"_\n\027ListOccu" + - "rrencesResponse\022+\n\013occurrences\030\001 \003(\0132\026.g" + - "rafeas.v1.Occurrence\022\027\n\017next_page_token\030" + - "\002 \001(\t\"F\n\027DeleteOccurrenceRequest\022+\n\004name" + - "\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io/Occurrence\"v\n" + - "\027CreateOccurrenceRequest\022*\n\006parent\030\001 \001(\t" + - "B\032\340A\002\372A\024\n\022grafeas.io/Project\022/\n\noccurren" + - "ce\030\002 \001(\0132\026.grafeas.v1.OccurrenceB\003\340A\002\"\250\001" + - "\n\027UpdateOccurrenceRequest\022+\n\004name\030\001 \001(\tB" + - "\035\340A\002\372A\027\n\025grafeas.io/Occurrence\022/\n\noccurr" + - "ence\030\002 \001(\0132\026.grafeas.v1.OccurrenceB\003\340A\002\022" + - "/\n\013update_mask\030\003 \001(\0132\032.google.protobuf.F" + - "ieldMask\"7\n\016GetNoteRequest\022%\n\004name\030\001 \001(\t" + - "B\027\340A\002\372A\021\n\017grafeas.io/Note\"G\n\030GetOccurren" + - "ceNoteRequest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025gra" + - "feas.io/Occurrence\"u\n\020ListNotesRequest\022*" + - "\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Proje" + - "ct\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n" + - "\npage_token\030\004 \001(\t\"M\n\021ListNotesResponse\022\037" + - "\n\005notes\030\001 \003(\0132\020.grafeas.v1.Note\022\027\n\017next_" + - "page_token\030\002 \001(\t\":\n\021DeleteNoteRequest\022%\n" + - "\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.io/Note\"z\n\021" + - "CreateNoteRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A" + - "\024\n\022grafeas.io/Project\022\024\n\007note_id\030\002 \001(\tB\003" + - "\340A\002\022#\n\004note\030\003 \001(\0132\020.grafeas.v1.NoteB\003\340A\002" + - "\"\220\001\n\021UpdateNoteRequest\022%\n\004name\030\001 \001(\tB\027\340A" + - "\002\372A\021\n\017grafeas.io/Note\022#\n\004note\030\002 \001(\0132\020.gr" + - "afeas.v1.NoteB\003\340A\002\022/\n\013update_mask\030\003 \001(\0132" + - "\032.google.protobuf.FieldMask\"z\n\032ListNoteO" + - "ccurrencesRequest\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n" + - "\017grafeas.io/Note\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage" + - "_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"c\n\033ListN" + - "oteOccurrencesResponse\022+\n\013occurrences\030\001 " + - "\003(\0132\026.grafeas.v1.Occurrence\022\027\n\017next_page" + - "_token\030\002 \001(\t\"\311\001\n\027BatchCreateNotesRequest" + - "\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Pro" + - "ject\022B\n\005notes\030\002 \003(\0132..grafeas.v1.BatchCr" + - "eateNotesRequest.NotesEntryB\003\340A\002\032>\n\nNote" + - "sEntry\022\013\n\003key\030\001 \001(\t\022\037\n\005value\030\002 \001(\0132\020.gra" + - "feas.v1.Note:\0028\001\";\n\030BatchCreateNotesResp" + - "onse\022\037\n\005notes\030\001 \003(\0132\020.grafeas.v1.Note\"}\n" + - "\035BatchCreateOccurrencesRequest\022*\n\006parent" + - "\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Project\0220\n\013oc" + - "currences\030\002 \003(\0132\026.grafeas.v1.OccurrenceB" + - "\003\340A\002\"M\n\036BatchCreateOccurrencesResponse\022+" + - "\n\013occurrences\030\001 \003(\0132\026.grafeas.v1.Occurre" + - "nce2\222\020\n\007Grafeas\022}\n\rGetOccurrence\022 .grafe" + - "as.v1.GetOccurrenceRequest\032\026.grafeas.v1." + - "Occurrence\"2\202\323\344\223\002%\022#/v1/{name=projects/*" + - "/occurrences/*}\332A\004name\022\227\001\n\017ListOccurrenc" + - "es\022\".grafeas.v1.ListOccurrencesRequest\032#" + - ".grafeas.v1.ListOccurrencesResponse\";\202\323\344" + - "\223\002%\022#/v1/{parent=projects/*}/occurrences" + - "\332A\rparent,filter\022\203\001\n\020DeleteOccurrence\022#." + - "grafeas.v1.DeleteOccurrenceRequest\032\026.goo" + - "gle.protobuf.Empty\"2\202\323\344\223\002%*#/v1/{name=pr" + - "ojects/*/occurrences/*}\332A\004name\022\234\001\n\020Creat" + - "eOccurrence\022#.grafeas.v1.CreateOccurrenc" + - "eRequest\032\026.grafeas.v1.Occurrence\"K\202\323\344\223\0021" + - "\"#/v1/{parent=projects/*}/occurrences:\no" + - "ccurrence\332A\021parent,occurrence\022\300\001\n\026BatchC" + - "reateOccurrences\022).grafeas.v1.BatchCreat" + - "eOccurrencesRequest\032*.grafeas.v1.BatchCr" + - "eateOccurrencesResponse\"O\202\323\344\223\0024\"//v1/{pa" + - "rent=projects/*}/occurrences:batchCreate" + - ":\001*\332A\022parent,occurrences\022\246\001\n\020UpdateOccur" + - "rence\022#.grafeas.v1.UpdateOccurrenceReque" + - "st\032\026.grafeas.v1.Occurrence\"U\202\323\344\223\00212#/v1/" + - "{name=projects/*/occurrences/*}:\noccurre" + - "nce\332A\033name,occurrence,update_mask\022\205\001\n\021Ge" + - "tOccurrenceNote\022$.grafeas.v1.GetOccurren" + - "ceNoteRequest\032\020.grafeas.v1.Note\"8\202\323\344\223\002+\022" + - ")/v1/{name=projects/*/occurrences/*}/not" + - "es\332A\004name\022e\n\007GetNote\022\032.grafeas.v1.GetNot" + - "eRequest\032\020.grafeas.v1.Note\",\202\323\344\223\002\037\022\035/v1/" + - "{name=projects/*/notes/*}\332A\004name\022\177\n\tList" + - "Notes\022\034.grafeas.v1.ListNotesRequest\032\035.gr" + - "afeas.v1.ListNotesResponse\"5\202\323\344\223\002\037\022\035/v1/" + - "{parent=projects/*}/notes\332A\rparent,filte" + - "r\022q\n\nDeleteNote\022\035.grafeas.v1.DeleteNoteR" + - "equest\032\026.google.protobuf.Empty\",\202\323\344\223\002\037*\035" + - "/v1/{name=projects/*/notes/*}\332A\004name\022\200\001\n" + - "\nCreateNote\022\035.grafeas.v1.CreateNoteReque" + - "st\032\020.grafeas.v1.Note\"A\202\323\344\223\002%\"\035/v1/{paren" + - "t=projects/*}/notes:\004note\332A\023parent,note_" + - "id,note\022\242\001\n\020BatchCreateNotes\022#.grafeas.v" + - "1.BatchCreateNotesRequest\032$.grafeas.v1.B" + - "atchCreateNotesResponse\"C\202\323\344\223\002.\")/v1/{pa" + - "rent=projects/*}/notes:batchCreate:\001*\332A\014" + - "parent,notes\022\202\001\n\nUpdateNote\022\035.grafeas.v1" + - ".UpdateNoteRequest\032\020.grafeas.v1.Note\"C\202\323" + - "\344\223\002%2\035/v1/{name=projects/*/notes/*}:\004not" + - "e\332A\025name,note,update_mask\022\247\001\n\023ListNoteOc" + - "currences\022&.grafeas.v1.ListNoteOccurrenc" + - "esRequest\032\'.grafeas.v1.ListNoteOccurrenc" + - "esResponse\"?\202\323\344\223\002+\022)/v1/{name=projects/*" + - "/notes/*}/occurrences\332A\013name,filter\032#\312A " + - "containeranalysis.googleapis.comB|\n\rio.g" + - "rafeas.v1P\001Z8google.golang.org/genproto/" + - "googleapis/grafeas/v1;grafeas\242\002\003GRA\352A(\n\022" + - "grafeas.io/Project\022\022projects/{project}b\006" + - "proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - io.grafeas.v1.Attestation.getDescriptor(), - io.grafeas.v1.Build.getDescriptor(), - io.grafeas.v1.Common.getDescriptor(), - io.grafeas.v1.Compliance.getDescriptor(), - io.grafeas.v1.Deployment.getDescriptor(), - io.grafeas.v1.Discovery.getDescriptor(), - io.grafeas.v1.DsseAttestation.getDescriptor(), - io.grafeas.v1.Image.getDescriptor(), - io.grafeas.v1.Package.getDescriptor(), - io.grafeas.v1.Upgrade.getDescriptor(), - io.grafeas.v1.Vex.getDescriptor(), - io.grafeas.v1.Vulnerability.getDescriptor(), - }); - internal_static_grafeas_v1_Occurrence_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_Occurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Occurrence_descriptor, - new java.lang.String[] { "Name", "ResourceUri", "NoteName", "Kind", "Remediation", "CreateTime", "UpdateTime", "Vulnerability", "Build", "Image", "Package", "Deployment", "Discovery", "Attestation", "Upgrade", "Compliance", "DsseAttestation", "Envelope", "Details", }); - internal_static_grafeas_v1_Note_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Note_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Note_descriptor, - new java.lang.String[] { "Name", "ShortDescription", "LongDescription", "Kind", "RelatedUrl", "ExpirationTime", "CreateTime", "UpdateTime", "RelatedNoteNames", "Vulnerability", "Build", "Image", "Package", "Deployment", "Discovery", "Attestation", "Upgrade", "Compliance", "DsseAttestation", "VulnerabilityAssessment", "Type", }); - internal_static_grafeas_v1_GetOccurrenceRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_GetOccurrenceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_GetOccurrenceRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_grafeas_v1_ListOccurrencesRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ListOccurrencesRequest_descriptor, - new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", }); - internal_static_grafeas_v1_ListOccurrencesResponse_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ListOccurrencesResponse_descriptor, - new java.lang.String[] { "Occurrences", "NextPageToken", }); - internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_grafeas_v1_DeleteOccurrenceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DeleteOccurrenceRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_grafeas_v1_CreateOccurrenceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_CreateOccurrenceRequest_descriptor, - new java.lang.String[] { "Parent", "Occurrence", }); - internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor, - new java.lang.String[] { "Name", "Occurrence", "UpdateMask", }); - internal_static_grafeas_v1_GetNoteRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_grafeas_v1_GetNoteRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_GetNoteRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_grafeas_v1_GetOccurrenceNoteRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_GetOccurrenceNoteRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_grafeas_v1_ListNotesRequest_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ListNotesRequest_descriptor, - new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", }); - internal_static_grafeas_v1_ListNotesResponse_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ListNotesResponse_descriptor, - new java.lang.String[] { "Notes", "NextPageToken", }); - internal_static_grafeas_v1_DeleteNoteRequest_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_grafeas_v1_DeleteNoteRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_DeleteNoteRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_grafeas_v1_CreateNoteRequest_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_grafeas_v1_CreateNoteRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_CreateNoteRequest_descriptor, - new java.lang.String[] { "Parent", "NoteId", "Note", }); - internal_static_grafeas_v1_UpdateNoteRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_UpdateNoteRequest_descriptor, - new java.lang.String[] { "Name", "Note", "UpdateMask", }); - internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor, - new java.lang.String[] { "Name", "Filter", "PageSize", "PageToken", }); - internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor, - new java.lang.String[] { "Occurrences", "NextPageToken", }); - internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_grafeas_v1_BatchCreateNotesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor, - new java.lang.String[] { "Parent", "Notes", }); - internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor = - internal_static_grafeas_v1_BatchCreateNotesRequest_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BatchCreateNotesRequest_NotesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_grafeas_v1_BatchCreateNotesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BatchCreateNotesResponse_descriptor, - new java.lang.String[] { "Notes", }); - internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_grafeas_v1_BatchCreateOccurrencesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BatchCreateOccurrencesRequest_descriptor, - new java.lang.String[] { "Parent", "Occurrences", }); - internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_grafeas_v1_BatchCreateOccurrencesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BatchCreateOccurrencesResponse_descriptor, - new java.lang.String[] { "Occurrences", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceDefinition); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - io.grafeas.v1.Attestation.getDescriptor(); - io.grafeas.v1.Build.getDescriptor(); - io.grafeas.v1.Common.getDescriptor(); - io.grafeas.v1.Compliance.getDescriptor(); - io.grafeas.v1.Deployment.getDescriptor(); - io.grafeas.v1.Discovery.getDescriptor(); - io.grafeas.v1.DsseAttestation.getDescriptor(); - io.grafeas.v1.Image.getDescriptor(); - io.grafeas.v1.Package.getDescriptor(); - io.grafeas.v1.Upgrade.getDescriptor(); - io.grafeas.v1.Vex.getDescriptor(); - io.grafeas.v1.Vulnerability.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java deleted file mode 100644 index 898f9ad61838..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/GrafeasSettings.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.protobuf.Empty; -import io.grafeas.v1.stub.GrafeasStubSettings; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link GrafeasClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (containeranalysis.googleapis.com) and default port (443) are - * used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of getOccurrence to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GrafeasSettings.Builder grafeasSettingsBuilder = GrafeasSettings.newBuilder();
- * grafeasSettingsBuilder
- *     .getOccurrenceSettings()
- *     .setRetrySettings(
- *         grafeasSettingsBuilder
- *             .getOccurrenceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * GrafeasSettings grafeasSettings = grafeasSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class GrafeasSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to getOccurrence. */ - public UnaryCallSettings getOccurrenceSettings() { - return ((GrafeasStubSettings) getStubSettings()).getOccurrenceSettings(); - } - - /** Returns the object with the settings used for calls to listOccurrences. */ - public PagedCallSettings< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> - listOccurrencesSettings() { - return ((GrafeasStubSettings) getStubSettings()).listOccurrencesSettings(); - } - - /** Returns the object with the settings used for calls to deleteOccurrence. */ - public UnaryCallSettings deleteOccurrenceSettings() { - return ((GrafeasStubSettings) getStubSettings()).deleteOccurrenceSettings(); - } - - /** Returns the object with the settings used for calls to createOccurrence. */ - public UnaryCallSettings createOccurrenceSettings() { - return ((GrafeasStubSettings) getStubSettings()).createOccurrenceSettings(); - } - - /** Returns the object with the settings used for calls to batchCreateOccurrences. */ - public UnaryCallSettings - batchCreateOccurrencesSettings() { - return ((GrafeasStubSettings) getStubSettings()).batchCreateOccurrencesSettings(); - } - - /** Returns the object with the settings used for calls to updateOccurrence. */ - public UnaryCallSettings updateOccurrenceSettings() { - return ((GrafeasStubSettings) getStubSettings()).updateOccurrenceSettings(); - } - - /** Returns the object with the settings used for calls to getOccurrenceNote. */ - public UnaryCallSettings getOccurrenceNoteSettings() { - return ((GrafeasStubSettings) getStubSettings()).getOccurrenceNoteSettings(); - } - - /** Returns the object with the settings used for calls to getNote. */ - public UnaryCallSettings getNoteSettings() { - return ((GrafeasStubSettings) getStubSettings()).getNoteSettings(); - } - - /** Returns the object with the settings used for calls to listNotes. */ - public PagedCallSettings - listNotesSettings() { - return ((GrafeasStubSettings) getStubSettings()).listNotesSettings(); - } - - /** Returns the object with the settings used for calls to deleteNote. */ - public UnaryCallSettings deleteNoteSettings() { - return ((GrafeasStubSettings) getStubSettings()).deleteNoteSettings(); - } - - /** Returns the object with the settings used for calls to createNote. */ - public UnaryCallSettings createNoteSettings() { - return ((GrafeasStubSettings) getStubSettings()).createNoteSettings(); - } - - /** Returns the object with the settings used for calls to batchCreateNotes. */ - public UnaryCallSettings - batchCreateNotesSettings() { - return ((GrafeasStubSettings) getStubSettings()).batchCreateNotesSettings(); - } - - /** Returns the object with the settings used for calls to updateNote. */ - public UnaryCallSettings updateNoteSettings() { - return ((GrafeasStubSettings) getStubSettings()).updateNoteSettings(); - } - - /** Returns the object with the settings used for calls to listNoteOccurrences. */ - public PagedCallSettings< - ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> - listNoteOccurrencesSettings() { - return ((GrafeasStubSettings) getStubSettings()).listNoteOccurrencesSettings(); - } - - public static final GrafeasSettings create(GrafeasStubSettings stub) throws IOException { - return new GrafeasSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return GrafeasStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return GrafeasStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return GrafeasStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GrafeasStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return GrafeasStubSettings.defaultGrpcTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return GrafeasStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return GrafeasStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected GrafeasSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for GrafeasSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(GrafeasStubSettings.newBuilder(clientContext)); - } - - protected Builder(GrafeasSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(GrafeasStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(GrafeasStubSettings.newBuilder()); - } - - public GrafeasStubSettings.Builder getStubSettingsBuilder() { - return ((GrafeasStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to getOccurrence. */ - public UnaryCallSettings.Builder getOccurrenceSettings() { - return getStubSettingsBuilder().getOccurrenceSettings(); - } - - /** Returns the builder for the settings used for calls to listOccurrences. */ - public PagedCallSettings.Builder< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> - listOccurrencesSettings() { - return getStubSettingsBuilder().listOccurrencesSettings(); - } - - /** Returns the builder for the settings used for calls to deleteOccurrence. */ - public UnaryCallSettings.Builder deleteOccurrenceSettings() { - return getStubSettingsBuilder().deleteOccurrenceSettings(); - } - - /** Returns the builder for the settings used for calls to createOccurrence. */ - public UnaryCallSettings.Builder - createOccurrenceSettings() { - return getStubSettingsBuilder().createOccurrenceSettings(); - } - - /** Returns the builder for the settings used for calls to batchCreateOccurrences. */ - public UnaryCallSettings.Builder - batchCreateOccurrencesSettings() { - return getStubSettingsBuilder().batchCreateOccurrencesSettings(); - } - - /** Returns the builder for the settings used for calls to updateOccurrence. */ - public UnaryCallSettings.Builder - updateOccurrenceSettings() { - return getStubSettingsBuilder().updateOccurrenceSettings(); - } - - /** Returns the builder for the settings used for calls to getOccurrenceNote. */ - public UnaryCallSettings.Builder getOccurrenceNoteSettings() { - return getStubSettingsBuilder().getOccurrenceNoteSettings(); - } - - /** Returns the builder for the settings used for calls to getNote. */ - public UnaryCallSettings.Builder getNoteSettings() { - return getStubSettingsBuilder().getNoteSettings(); - } - - /** Returns the builder for the settings used for calls to listNotes. */ - public PagedCallSettings.Builder - listNotesSettings() { - return getStubSettingsBuilder().listNotesSettings(); - } - - /** Returns the builder for the settings used for calls to deleteNote. */ - public UnaryCallSettings.Builder deleteNoteSettings() { - return getStubSettingsBuilder().deleteNoteSettings(); - } - - /** Returns the builder for the settings used for calls to createNote. */ - public UnaryCallSettings.Builder createNoteSettings() { - return getStubSettingsBuilder().createNoteSettings(); - } - - /** Returns the builder for the settings used for calls to batchCreateNotes. */ - public UnaryCallSettings.Builder - batchCreateNotesSettings() { - return getStubSettingsBuilder().batchCreateNotesSettings(); - } - - /** Returns the builder for the settings used for calls to updateNote. */ - public UnaryCallSettings.Builder updateNoteSettings() { - return getStubSettingsBuilder().updateNoteSettings(); - } - - /** Returns the builder for the settings used for calls to listNoteOccurrences. */ - public PagedCallSettings.Builder< - ListNoteOccurrencesRequest, - ListNoteOccurrencesResponse, - ListNoteOccurrencesPagedResponse> - listNoteOccurrencesSettings() { - return getStubSettingsBuilder().listNoteOccurrencesSettings(); - } - - @Override - public GrafeasSettings build() throws IOException { - return new GrafeasSettings(this); - } - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java deleted file mode 100644 index 9d44bb822baa..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Hash.java +++ /dev/null @@ -1,663 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *

- * Container message for hash values.
- * 
- * - * Protobuf type {@code grafeas.v1.Hash} - */ -public final class Hash extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Hash) - HashOrBuilder { -private static final long serialVersionUID = 0L; - // Use Hash.newBuilder() to construct. - private Hash(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Hash() { - type_ = ""; - value_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Hash(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Hash.class, io.grafeas.v1.Hash.Builder.class); - } - - public static final int TYPE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object type_ = ""; - /** - *
-   * Required. The type of hash that was performed, e.g. "SHA-256".
-   * 
- * - * string type = 1; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } - } - /** - *
-   * Required. The type of hash that was performed, e.g. "SHA-256".
-   * 
- * - * string type = 1; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-   * Required. The hash value.
-   * 
- * - * bytes value = 2; - * @return The value. - */ - @java.lang.Override - public com.google.protobuf.ByteString getValue() { - return value_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); - } - if (!value_.isEmpty()) { - output.writeBytes(2, value_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); - } - if (!value_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, value_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Hash)) { - return super.equals(obj); - } - io.grafeas.v1.Hash other = (io.grafeas.v1.Hash) obj; - - if (!getType() - .equals(other.getType())) return false; - if (!getValue() - .equals(other.getValue())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Hash parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Hash parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Hash parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Hash parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Hash parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Hash parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Hash parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Hash parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Hash parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Hash parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Hash parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Hash parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Hash prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Container message for hash values.
-   * 
- * - * Protobuf type {@code grafeas.v1.Hash} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Hash) - io.grafeas.v1.HashOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Hash.class, io.grafeas.v1.Hash.Builder.class); - } - - // Construct using io.grafeas.v1.Hash.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = ""; - value_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Hash_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Hash getDefaultInstanceForType() { - return io.grafeas.v1.Hash.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Hash build() { - io.grafeas.v1.Hash result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Hash buildPartial() { - io.grafeas.v1.Hash result = new io.grafeas.v1.Hash(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Hash result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.value_ = value_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Hash) { - return mergeFrom((io.grafeas.v1.Hash)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Hash other) { - if (other == io.grafeas.v1.Hash.getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { - setValue(other.getValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - type_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - value_ = input.readBytes(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object type_ = ""; - /** - *
-     * Required. The type of hash that was performed, e.g. "SHA-256".
-     * 
- * - * string type = 1; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The type of hash that was performed, e.g. "SHA-256".
-     * 
- * - * string type = 1; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The type of hash that was performed, e.g. "SHA-256".
-     * 
- * - * string type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. The type of hash that was performed, e.g. "SHA-256".
-     * 
- * - * string type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - type_ = getDefaultInstance().getType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. The type of hash that was performed, e.g. "SHA-256".
-     * 
- * - * string type = 1; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Required. The hash value.
-     * 
- * - * bytes value = 2; - * @return The value. - */ - @java.lang.Override - public com.google.protobuf.ByteString getValue() { - return value_; - } - /** - *
-     * Required. The hash value.
-     * 
- * - * bytes value = 2; - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - value_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. The hash value.
-     * 
- * - * bytes value = 2; - * @return This builder for chaining. - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Hash) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Hash) - private static final io.grafeas.v1.Hash DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Hash(); - } - - public static io.grafeas.v1.Hash getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Hash parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Hash getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java deleted file mode 100644 index 3b14e9540a5b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/HashOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface HashOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Hash) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The type of hash that was performed, e.g. "SHA-256".
-   * 
- * - * string type = 1; - * @return The type. - */ - java.lang.String getType(); - /** - *
-   * Required. The type of hash that was performed, e.g. "SHA-256".
-   * 
- * - * string type = 1; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - *
-   * Required. The hash value.
-   * 
- * - * bytes value = 2; - * @return The value. - */ - com.google.protobuf.ByteString getValue(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java deleted file mode 100644 index 4552e28165f9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Image.java +++ /dev/null @@ -1,90 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -public final class Image { - private Image() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Layer_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Layer_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Fingerprint_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Fingerprint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ImageNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ImageNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ImageOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\026grafeas/v1/image.proto\022\ngrafeas.v1\"-\n\005" + - "Layer\022\021\n\tdirective\030\001 \001(\t\022\021\n\targuments\030\002 " + - "\001(\t\"@\n\013Fingerprint\022\017\n\007v1_name\030\001 \001(\t\022\017\n\007v" + - "2_blob\030\002 \003(\t\022\017\n\007v2_name\030\003 \001(\t\"O\n\tImageNo" + - "te\022\024\n\014resource_url\030\001 \001(\t\022,\n\013fingerprint\030" + - "\002 \001(\0132\027.grafeas.v1.Fingerprint\"\223\001\n\017Image" + - "Occurrence\022,\n\013fingerprint\030\001 \001(\0132\027.grafea" + - "s.v1.Fingerprint\022\020\n\010distance\030\002 \001(\005\022%\n\nla" + - "yer_info\030\003 \003(\0132\021.grafeas.v1.Layer\022\031\n\021bas" + - "e_resource_url\030\004 \001(\tBQ\n\rio.grafeas.v1P\001Z" + - "8google.golang.org/genproto/googleapis/g" + - "rafeas/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_grafeas_v1_Layer_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_Layer_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Layer_descriptor, - new java.lang.String[] { "Directive", "Arguments", }); - internal_static_grafeas_v1_Fingerprint_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Fingerprint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Fingerprint_descriptor, - new java.lang.String[] { "V1Name", "V2Blob", "V2Name", }); - internal_static_grafeas_v1_ImageNote_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_ImageNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ImageNote_descriptor, - new java.lang.String[] { "ResourceUrl", "Fingerprint", }); - internal_static_grafeas_v1_ImageOccurrence_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ImageOccurrence_descriptor, - new java.lang.String[] { "Fingerprint", "Distance", "LayerInfo", "BaseResourceUrl", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java deleted file mode 100644 index 69fb40e2db70..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNote.java +++ /dev/null @@ -1,824 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -/** - *
- * Basis describes the base image portion (Note) of the DockerImage
- * relationship. Linked occurrences are derived from this or an equivalent image
- * via:
- *   FROM <Basis.resource_url>
- * Or an equivalent reference, e.g., a tag of the resource_url.
- * 
- * - * Protobuf type {@code grafeas.v1.ImageNote} - */ -public final class ImageNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ImageNote) - ImageNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageNote.newBuilder() to construct. - private ImageNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageNote() { - resourceUrl_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ImageNote.class, io.grafeas.v1.ImageNote.Builder.class); - } - - public static final int RESOURCE_URL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object resourceUrl_ = ""; - /** - *
-   * Required. Immutable. The resource_url for the resource representing the
-   * basis of associated occurrence images.
-   * 
- * - * string resource_url = 1; - * @return The resourceUrl. - */ - @java.lang.Override - public java.lang.String getResourceUrl() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUrl_ = s; - return s; - } - } - /** - *
-   * Required. Immutable. The resource_url for the resource representing the
-   * basis of associated occurrence images.
-   * 
- * - * string resource_url = 1; - * @return The bytes for resourceUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceUrlBytes() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FINGERPRINT_FIELD_NUMBER = 2; - private io.grafeas.v1.Fingerprint fingerprint_; - /** - *
-   * Required. Immutable. The fingerprint of the base image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - * @return Whether the fingerprint field is set. - */ - @java.lang.Override - public boolean hasFingerprint() { - return fingerprint_ != null; - } - /** - *
-   * Required. Immutable. The fingerprint of the base image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - * @return The fingerprint. - */ - @java.lang.Override - public io.grafeas.v1.Fingerprint getFingerprint() { - return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } - /** - *
-   * Required. Immutable. The fingerprint of the base image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - @java.lang.Override - public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { - return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceUrl_); - } - if (fingerprint_ != null) { - output.writeMessage(2, getFingerprint()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceUrl_); - } - if (fingerprint_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getFingerprint()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ImageNote)) { - return super.equals(obj); - } - io.grafeas.v1.ImageNote other = (io.grafeas.v1.ImageNote) obj; - - if (!getResourceUrl() - .equals(other.getResourceUrl())) return false; - if (hasFingerprint() != other.hasFingerprint()) return false; - if (hasFingerprint()) { - if (!getFingerprint() - .equals(other.getFingerprint())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_URL_FIELD_NUMBER; - hash = (53 * hash) + getResourceUrl().hashCode(); - if (hasFingerprint()) { - hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER; - hash = (53 * hash) + getFingerprint().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ImageNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ImageNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ImageNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ImageNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ImageNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ImageNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ImageNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ImageNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ImageNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ImageNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ImageNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ImageNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ImageNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Basis describes the base image portion (Note) of the DockerImage
-   * relationship. Linked occurrences are derived from this or an equivalent image
-   * via:
-   *   FROM <Basis.resource_url>
-   * Or an equivalent reference, e.g., a tag of the resource_url.
-   * 
- * - * Protobuf type {@code grafeas.v1.ImageNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ImageNote) - io.grafeas.v1.ImageNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ImageNote.class, io.grafeas.v1.ImageNote.Builder.class); - } - - // Construct using io.grafeas.v1.ImageNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - resourceUrl_ = ""; - fingerprint_ = null; - if (fingerprintBuilder_ != null) { - fingerprintBuilder_.dispose(); - fingerprintBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ImageNote getDefaultInstanceForType() { - return io.grafeas.v1.ImageNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ImageNote build() { - io.grafeas.v1.ImageNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ImageNote buildPartial() { - io.grafeas.v1.ImageNote result = new io.grafeas.v1.ImageNote(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.ImageNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.resourceUrl_ = resourceUrl_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.fingerprint_ = fingerprintBuilder_ == null - ? fingerprint_ - : fingerprintBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ImageNote) { - return mergeFrom((io.grafeas.v1.ImageNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ImageNote other) { - if (other == io.grafeas.v1.ImageNote.getDefaultInstance()) return this; - if (!other.getResourceUrl().isEmpty()) { - resourceUrl_ = other.resourceUrl_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasFingerprint()) { - mergeFingerprint(other.getFingerprint()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - resourceUrl_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getFingerprintFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object resourceUrl_ = ""; - /** - *
-     * Required. Immutable. The resource_url for the resource representing the
-     * basis of associated occurrence images.
-     * 
- * - * string resource_url = 1; - * @return The resourceUrl. - */ - public java.lang.String getResourceUrl() { - java.lang.Object ref = resourceUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Immutable. The resource_url for the resource representing the
-     * basis of associated occurrence images.
-     * 
- * - * string resource_url = 1; - * @return The bytes for resourceUrl. - */ - public com.google.protobuf.ByteString - getResourceUrlBytes() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Immutable. The resource_url for the resource representing the
-     * basis of associated occurrence images.
-     * 
- * - * string resource_url = 1; - * @param value The resourceUrl to set. - * @return This builder for chaining. - */ - public Builder setResourceUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - resourceUrl_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The resource_url for the resource representing the
-     * basis of associated occurrence images.
-     * 
- * - * string resource_url = 1; - * @return This builder for chaining. - */ - public Builder clearResourceUrl() { - resourceUrl_ = getDefaultInstance().getResourceUrl(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The resource_url for the resource representing the
-     * basis of associated occurrence images.
-     * 
- * - * string resource_url = 1; - * @param value The bytes for resourceUrl to set. - * @return This builder for chaining. - */ - public Builder setResourceUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - resourceUrl_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.grafeas.v1.Fingerprint fingerprint_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> fingerprintBuilder_; - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - * @return Whether the fingerprint field is set. - */ - public boolean hasFingerprint() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - * @return The fingerprint. - */ - public io.grafeas.v1.Fingerprint getFingerprint() { - if (fingerprintBuilder_ == null) { - return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } else { - return fingerprintBuilder_.getMessage(); - } - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - public Builder setFingerprint(io.grafeas.v1.Fingerprint value) { - if (fingerprintBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fingerprint_ = value; - } else { - fingerprintBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - public Builder setFingerprint( - io.grafeas.v1.Fingerprint.Builder builderForValue) { - if (fingerprintBuilder_ == null) { - fingerprint_ = builderForValue.build(); - } else { - fingerprintBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - public Builder mergeFingerprint(io.grafeas.v1.Fingerprint value) { - if (fingerprintBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - fingerprint_ != null && - fingerprint_ != io.grafeas.v1.Fingerprint.getDefaultInstance()) { - getFingerprintBuilder().mergeFrom(value); - } else { - fingerprint_ = value; - } - } else { - fingerprintBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - public Builder clearFingerprint() { - bitField0_ = (bitField0_ & ~0x00000002); - fingerprint_ = null; - if (fingerprintBuilder_ != null) { - fingerprintBuilder_.dispose(); - fingerprintBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - public io.grafeas.v1.Fingerprint.Builder getFingerprintBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getFingerprintFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { - if (fingerprintBuilder_ != null) { - return fingerprintBuilder_.getMessageOrBuilder(); - } else { - return fingerprint_ == null ? - io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } - } - /** - *
-     * Required. Immutable. The fingerprint of the base image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> - getFingerprintFieldBuilder() { - if (fingerprintBuilder_ == null) { - fingerprintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder>( - getFingerprint(), - getParentForChildren(), - isClean()); - fingerprint_ = null; - } - return fingerprintBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ImageNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ImageNote) - private static final io.grafeas.v1.ImageNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ImageNote(); - } - - public static io.grafeas.v1.ImageNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ImageNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java deleted file mode 100644 index d3ff6b229887..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -public interface ImageNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ImageNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Immutable. The resource_url for the resource representing the
-   * basis of associated occurrence images.
-   * 
- * - * string resource_url = 1; - * @return The resourceUrl. - */ - java.lang.String getResourceUrl(); - /** - *
-   * Required. Immutable. The resource_url for the resource representing the
-   * basis of associated occurrence images.
-   * 
- * - * string resource_url = 1; - * @return The bytes for resourceUrl. - */ - com.google.protobuf.ByteString - getResourceUrlBytes(); - - /** - *
-   * Required. Immutable. The fingerprint of the base image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - * @return Whether the fingerprint field is set. - */ - boolean hasFingerprint(); - /** - *
-   * Required. Immutable. The fingerprint of the base image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - * @return The fingerprint. - */ - io.grafeas.v1.Fingerprint getFingerprint(); - /** - *
-   * Required. Immutable. The fingerprint of the base image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 2; - */ - io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java deleted file mode 100644 index 42e50c3a99ed..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrence.java +++ /dev/null @@ -1,1398 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -/** - *
- * Details of the derived image portion of the DockerImage relationship. This
- * image would be produced from a Dockerfile with FROM <DockerImage.Basis in
- * attached Note>.
- * 
- * - * Protobuf type {@code grafeas.v1.ImageOccurrence} - */ -public final class ImageOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ImageOccurrence) - ImageOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageOccurrence.newBuilder() to construct. - private ImageOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageOccurrence() { - layerInfo_ = java.util.Collections.emptyList(); - baseResourceUrl_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ImageOccurrence.class, io.grafeas.v1.ImageOccurrence.Builder.class); - } - - public static final int FINGERPRINT_FIELD_NUMBER = 1; - private io.grafeas.v1.Fingerprint fingerprint_; - /** - *
-   * Required. The fingerprint of the derived image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - * @return Whether the fingerprint field is set. - */ - @java.lang.Override - public boolean hasFingerprint() { - return fingerprint_ != null; - } - /** - *
-   * Required. The fingerprint of the derived image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - * @return The fingerprint. - */ - @java.lang.Override - public io.grafeas.v1.Fingerprint getFingerprint() { - return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } - /** - *
-   * Required. The fingerprint of the derived image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - @java.lang.Override - public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { - return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } - - public static final int DISTANCE_FIELD_NUMBER = 2; - private int distance_ = 0; - /** - *
-   * Output only. The number of layers by which this image differs from the
-   * associated image basis.
-   * 
- * - * int32 distance = 2; - * @return The distance. - */ - @java.lang.Override - public int getDistance() { - return distance_; - } - - public static final int LAYER_INFO_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List layerInfo_; - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - @java.lang.Override - public java.util.List getLayerInfoList() { - return layerInfo_; - } - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - @java.lang.Override - public java.util.List - getLayerInfoOrBuilderList() { - return layerInfo_; - } - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - @java.lang.Override - public int getLayerInfoCount() { - return layerInfo_.size(); - } - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - @java.lang.Override - public io.grafeas.v1.Layer getLayerInfo(int index) { - return layerInfo_.get(index); - } - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - @java.lang.Override - public io.grafeas.v1.LayerOrBuilder getLayerInfoOrBuilder( - int index) { - return layerInfo_.get(index); - } - - public static final int BASE_RESOURCE_URL_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object baseResourceUrl_ = ""; - /** - *
-   * Output only. This contains the base image URL for the derived image
-   * occurrence.
-   * 
- * - * string base_resource_url = 4; - * @return The baseResourceUrl. - */ - @java.lang.Override - public java.lang.String getBaseResourceUrl() { - java.lang.Object ref = baseResourceUrl_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - baseResourceUrl_ = s; - return s; - } - } - /** - *
-   * Output only. This contains the base image URL for the derived image
-   * occurrence.
-   * 
- * - * string base_resource_url = 4; - * @return The bytes for baseResourceUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBaseResourceUrlBytes() { - java.lang.Object ref = baseResourceUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - baseResourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (fingerprint_ != null) { - output.writeMessage(1, getFingerprint()); - } - if (distance_ != 0) { - output.writeInt32(2, distance_); - } - for (int i = 0; i < layerInfo_.size(); i++) { - output.writeMessage(3, layerInfo_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseResourceUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, baseResourceUrl_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (fingerprint_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getFingerprint()); - } - if (distance_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, distance_); - } - for (int i = 0; i < layerInfo_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, layerInfo_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseResourceUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, baseResourceUrl_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ImageOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.ImageOccurrence other = (io.grafeas.v1.ImageOccurrence) obj; - - if (hasFingerprint() != other.hasFingerprint()) return false; - if (hasFingerprint()) { - if (!getFingerprint() - .equals(other.getFingerprint())) return false; - } - if (getDistance() - != other.getDistance()) return false; - if (!getLayerInfoList() - .equals(other.getLayerInfoList())) return false; - if (!getBaseResourceUrl() - .equals(other.getBaseResourceUrl())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasFingerprint()) { - hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER; - hash = (53 * hash) + getFingerprint().hashCode(); - } - hash = (37 * hash) + DISTANCE_FIELD_NUMBER; - hash = (53 * hash) + getDistance(); - if (getLayerInfoCount() > 0) { - hash = (37 * hash) + LAYER_INFO_FIELD_NUMBER; - hash = (53 * hash) + getLayerInfoList().hashCode(); - } - hash = (37 * hash) + BASE_RESOURCE_URL_FIELD_NUMBER; - hash = (53 * hash) + getBaseResourceUrl().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ImageOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ImageOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ImageOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ImageOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ImageOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ImageOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ImageOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ImageOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ImageOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ImageOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ImageOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ImageOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ImageOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Details of the derived image portion of the DockerImage relationship. This
-   * image would be produced from a Dockerfile with FROM <DockerImage.Basis in
-   * attached Note>.
-   * 
- * - * Protobuf type {@code grafeas.v1.ImageOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ImageOccurrence) - io.grafeas.v1.ImageOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ImageOccurrence.class, io.grafeas.v1.ImageOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.ImageOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - fingerprint_ = null; - if (fingerprintBuilder_ != null) { - fingerprintBuilder_.dispose(); - fingerprintBuilder_ = null; - } - distance_ = 0; - if (layerInfoBuilder_ == null) { - layerInfo_ = java.util.Collections.emptyList(); - } else { - layerInfo_ = null; - layerInfoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - baseResourceUrl_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ImageOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ImageOccurrence build() { - io.grafeas.v1.ImageOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ImageOccurrence buildPartial() { - io.grafeas.v1.ImageOccurrence result = new io.grafeas.v1.ImageOccurrence(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.ImageOccurrence result) { - if (layerInfoBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - layerInfo_ = java.util.Collections.unmodifiableList(layerInfo_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.layerInfo_ = layerInfo_; - } else { - result.layerInfo_ = layerInfoBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.ImageOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.fingerprint_ = fingerprintBuilder_ == null - ? fingerprint_ - : fingerprintBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.distance_ = distance_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.baseResourceUrl_ = baseResourceUrl_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ImageOccurrence) { - return mergeFrom((io.grafeas.v1.ImageOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ImageOccurrence other) { - if (other == io.grafeas.v1.ImageOccurrence.getDefaultInstance()) return this; - if (other.hasFingerprint()) { - mergeFingerprint(other.getFingerprint()); - } - if (other.getDistance() != 0) { - setDistance(other.getDistance()); - } - if (layerInfoBuilder_ == null) { - if (!other.layerInfo_.isEmpty()) { - if (layerInfo_.isEmpty()) { - layerInfo_ = other.layerInfo_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureLayerInfoIsMutable(); - layerInfo_.addAll(other.layerInfo_); - } - onChanged(); - } - } else { - if (!other.layerInfo_.isEmpty()) { - if (layerInfoBuilder_.isEmpty()) { - layerInfoBuilder_.dispose(); - layerInfoBuilder_ = null; - layerInfo_ = other.layerInfo_; - bitField0_ = (bitField0_ & ~0x00000004); - layerInfoBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLayerInfoFieldBuilder() : null; - } else { - layerInfoBuilder_.addAllMessages(other.layerInfo_); - } - } - } - if (!other.getBaseResourceUrl().isEmpty()) { - baseResourceUrl_ = other.baseResourceUrl_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getFingerprintFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - distance_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - io.grafeas.v1.Layer m = - input.readMessage( - io.grafeas.v1.Layer.parser(), - extensionRegistry); - if (layerInfoBuilder_ == null) { - ensureLayerInfoIsMutable(); - layerInfo_.add(m); - } else { - layerInfoBuilder_.addMessage(m); - } - break; - } // case 26 - case 34: { - baseResourceUrl_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.Fingerprint fingerprint_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> fingerprintBuilder_; - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - * @return Whether the fingerprint field is set. - */ - public boolean hasFingerprint() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - * @return The fingerprint. - */ - public io.grafeas.v1.Fingerprint getFingerprint() { - if (fingerprintBuilder_ == null) { - return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } else { - return fingerprintBuilder_.getMessage(); - } - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - public Builder setFingerprint(io.grafeas.v1.Fingerprint value) { - if (fingerprintBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fingerprint_ = value; - } else { - fingerprintBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - public Builder setFingerprint( - io.grafeas.v1.Fingerprint.Builder builderForValue) { - if (fingerprintBuilder_ == null) { - fingerprint_ = builderForValue.build(); - } else { - fingerprintBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - public Builder mergeFingerprint(io.grafeas.v1.Fingerprint value) { - if (fingerprintBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - fingerprint_ != null && - fingerprint_ != io.grafeas.v1.Fingerprint.getDefaultInstance()) { - getFingerprintBuilder().mergeFrom(value); - } else { - fingerprint_ = value; - } - } else { - fingerprintBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - public Builder clearFingerprint() { - bitField0_ = (bitField0_ & ~0x00000001); - fingerprint_ = null; - if (fingerprintBuilder_ != null) { - fingerprintBuilder_.dispose(); - fingerprintBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - public io.grafeas.v1.Fingerprint.Builder getFingerprintBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getFingerprintFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() { - if (fingerprintBuilder_ != null) { - return fingerprintBuilder_.getMessageOrBuilder(); - } else { - return fingerprint_ == null ? - io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_; - } - } - /** - *
-     * Required. The fingerprint of the derived image.
-     * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder> - getFingerprintFieldBuilder() { - if (fingerprintBuilder_ == null) { - fingerprintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Fingerprint, io.grafeas.v1.Fingerprint.Builder, io.grafeas.v1.FingerprintOrBuilder>( - getFingerprint(), - getParentForChildren(), - isClean()); - fingerprint_ = null; - } - return fingerprintBuilder_; - } - - private int distance_ ; - /** - *
-     * Output only. The number of layers by which this image differs from the
-     * associated image basis.
-     * 
- * - * int32 distance = 2; - * @return The distance. - */ - @java.lang.Override - public int getDistance() { - return distance_; - } - /** - *
-     * Output only. The number of layers by which this image differs from the
-     * associated image basis.
-     * 
- * - * int32 distance = 2; - * @param value The distance to set. - * @return This builder for chaining. - */ - public Builder setDistance(int value) { - - distance_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Output only. The number of layers by which this image differs from the
-     * associated image basis.
-     * 
- * - * int32 distance = 2; - * @return This builder for chaining. - */ - public Builder clearDistance() { - bitField0_ = (bitField0_ & ~0x00000002); - distance_ = 0; - onChanged(); - return this; - } - - private java.util.List layerInfo_ = - java.util.Collections.emptyList(); - private void ensureLayerInfoIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - layerInfo_ = new java.util.ArrayList(layerInfo_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Layer, io.grafeas.v1.Layer.Builder, io.grafeas.v1.LayerOrBuilder> layerInfoBuilder_; - - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public java.util.List getLayerInfoList() { - if (layerInfoBuilder_ == null) { - return java.util.Collections.unmodifiableList(layerInfo_); - } else { - return layerInfoBuilder_.getMessageList(); - } - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public int getLayerInfoCount() { - if (layerInfoBuilder_ == null) { - return layerInfo_.size(); - } else { - return layerInfoBuilder_.getCount(); - } - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public io.grafeas.v1.Layer getLayerInfo(int index) { - if (layerInfoBuilder_ == null) { - return layerInfo_.get(index); - } else { - return layerInfoBuilder_.getMessage(index); - } - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder setLayerInfo( - int index, io.grafeas.v1.Layer value) { - if (layerInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLayerInfoIsMutable(); - layerInfo_.set(index, value); - onChanged(); - } else { - layerInfoBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder setLayerInfo( - int index, io.grafeas.v1.Layer.Builder builderForValue) { - if (layerInfoBuilder_ == null) { - ensureLayerInfoIsMutable(); - layerInfo_.set(index, builderForValue.build()); - onChanged(); - } else { - layerInfoBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder addLayerInfo(io.grafeas.v1.Layer value) { - if (layerInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLayerInfoIsMutable(); - layerInfo_.add(value); - onChanged(); - } else { - layerInfoBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder addLayerInfo( - int index, io.grafeas.v1.Layer value) { - if (layerInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLayerInfoIsMutable(); - layerInfo_.add(index, value); - onChanged(); - } else { - layerInfoBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder addLayerInfo( - io.grafeas.v1.Layer.Builder builderForValue) { - if (layerInfoBuilder_ == null) { - ensureLayerInfoIsMutable(); - layerInfo_.add(builderForValue.build()); - onChanged(); - } else { - layerInfoBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder addLayerInfo( - int index, io.grafeas.v1.Layer.Builder builderForValue) { - if (layerInfoBuilder_ == null) { - ensureLayerInfoIsMutable(); - layerInfo_.add(index, builderForValue.build()); - onChanged(); - } else { - layerInfoBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder addAllLayerInfo( - java.lang.Iterable values) { - if (layerInfoBuilder_ == null) { - ensureLayerInfoIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, layerInfo_); - onChanged(); - } else { - layerInfoBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder clearLayerInfo() { - if (layerInfoBuilder_ == null) { - layerInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - layerInfoBuilder_.clear(); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public Builder removeLayerInfo(int index) { - if (layerInfoBuilder_ == null) { - ensureLayerInfoIsMutable(); - layerInfo_.remove(index); - onChanged(); - } else { - layerInfoBuilder_.remove(index); - } - return this; - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public io.grafeas.v1.Layer.Builder getLayerInfoBuilder( - int index) { - return getLayerInfoFieldBuilder().getBuilder(index); - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public io.grafeas.v1.LayerOrBuilder getLayerInfoOrBuilder( - int index) { - if (layerInfoBuilder_ == null) { - return layerInfo_.get(index); } else { - return layerInfoBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public java.util.List - getLayerInfoOrBuilderList() { - if (layerInfoBuilder_ != null) { - return layerInfoBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(layerInfo_); - } - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public io.grafeas.v1.Layer.Builder addLayerInfoBuilder() { - return getLayerInfoFieldBuilder().addBuilder( - io.grafeas.v1.Layer.getDefaultInstance()); - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public io.grafeas.v1.Layer.Builder addLayerInfoBuilder( - int index) { - return getLayerInfoFieldBuilder().addBuilder( - index, io.grafeas.v1.Layer.getDefaultInstance()); - } - /** - *
-     * This contains layer-specific metadata, if populated it has length
-     * "distance" and is ordered with [distance] being the layer immediately
-     * following the base image and [1] being the final layer.
-     * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - public java.util.List - getLayerInfoBuilderList() { - return getLayerInfoFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Layer, io.grafeas.v1.Layer.Builder, io.grafeas.v1.LayerOrBuilder> - getLayerInfoFieldBuilder() { - if (layerInfoBuilder_ == null) { - layerInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Layer, io.grafeas.v1.Layer.Builder, io.grafeas.v1.LayerOrBuilder>( - layerInfo_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - layerInfo_ = null; - } - return layerInfoBuilder_; - } - - private java.lang.Object baseResourceUrl_ = ""; - /** - *
-     * Output only. This contains the base image URL for the derived image
-     * occurrence.
-     * 
- * - * string base_resource_url = 4; - * @return The baseResourceUrl. - */ - public java.lang.String getBaseResourceUrl() { - java.lang.Object ref = baseResourceUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - baseResourceUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. This contains the base image URL for the derived image
-     * occurrence.
-     * 
- * - * string base_resource_url = 4; - * @return The bytes for baseResourceUrl. - */ - public com.google.protobuf.ByteString - getBaseResourceUrlBytes() { - java.lang.Object ref = baseResourceUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - baseResourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. This contains the base image URL for the derived image
-     * occurrence.
-     * 
- * - * string base_resource_url = 4; - * @param value The baseResourceUrl to set. - * @return This builder for chaining. - */ - public Builder setBaseResourceUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - baseResourceUrl_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Output only. This contains the base image URL for the derived image
-     * occurrence.
-     * 
- * - * string base_resource_url = 4; - * @return This builder for chaining. - */ - public Builder clearBaseResourceUrl() { - baseResourceUrl_ = getDefaultInstance().getBaseResourceUrl(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * Output only. This contains the base image URL for the derived image
-     * occurrence.
-     * 
- * - * string base_resource_url = 4; - * @param value The bytes for baseResourceUrl to set. - * @return This builder for chaining. - */ - public Builder setBaseResourceUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - baseResourceUrl_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ImageOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ImageOccurrence) - private static final io.grafeas.v1.ImageOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ImageOccurrence(); - } - - public static io.grafeas.v1.ImageOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ImageOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java deleted file mode 100644 index 1de5a573a328..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java +++ /dev/null @@ -1,123 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -public interface ImageOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ImageOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The fingerprint of the derived image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - * @return Whether the fingerprint field is set. - */ - boolean hasFingerprint(); - /** - *
-   * Required. The fingerprint of the derived image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - * @return The fingerprint. - */ - io.grafeas.v1.Fingerprint getFingerprint(); - /** - *
-   * Required. The fingerprint of the derived image.
-   * 
- * - * .grafeas.v1.Fingerprint fingerprint = 1; - */ - io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder(); - - /** - *
-   * Output only. The number of layers by which this image differs from the
-   * associated image basis.
-   * 
- * - * int32 distance = 2; - * @return The distance. - */ - int getDistance(); - - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - java.util.List - getLayerInfoList(); - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - io.grafeas.v1.Layer getLayerInfo(int index); - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - int getLayerInfoCount(); - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - java.util.List - getLayerInfoOrBuilderList(); - /** - *
-   * This contains layer-specific metadata, if populated it has length
-   * "distance" and is ordered with [distance] being the layer immediately
-   * following the base image and [1] being the final layer.
-   * 
- * - * repeated .grafeas.v1.Layer layer_info = 3; - */ - io.grafeas.v1.LayerOrBuilder getLayerInfoOrBuilder( - int index); - - /** - *
-   * Output only. This contains the base image URL for the derived image
-   * occurrence.
-   * 
- * - * string base_resource_url = 4; - * @return The baseResourceUrl. - */ - java.lang.String getBaseResourceUrl(); - /** - *
-   * Output only. This contains the base image URL for the derived image
-   * occurrence.
-   * 
- * - * string base_resource_url = 4; - * @return The bytes for baseResourceUrl. - */ - com.google.protobuf.ByteString - getBaseResourceUrlBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java deleted file mode 100644 index e5a98d01e8fe..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenance.java +++ /dev/null @@ -1,1359 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.InTotoProvenance} - */ -public final class InTotoProvenance extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.InTotoProvenance) - InTotoProvenanceOrBuilder { -private static final long serialVersionUID = 0L; - // Use InTotoProvenance.newBuilder() to construct. - private InTotoProvenance(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InTotoProvenance() { - materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InTotoProvenance(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.InTotoProvenance.class, io.grafeas.v1.InTotoProvenance.Builder.class); - } - - public static final int BUILDER_CONFIG_FIELD_NUMBER = 1; - private io.grafeas.v1.BuilderConfig builderConfig_; - /** - *
-   * required
-   * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - * @return Whether the builderConfig field is set. - */ - @java.lang.Override - public boolean hasBuilderConfig() { - return builderConfig_ != null; - } - /** - *
-   * required
-   * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - * @return The builderConfig. - */ - @java.lang.Override - public io.grafeas.v1.BuilderConfig getBuilderConfig() { - return builderConfig_ == null ? io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; - } - /** - *
-   * required
-   * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - @java.lang.Override - public io.grafeas.v1.BuilderConfigOrBuilder getBuilderConfigOrBuilder() { - return builderConfig_ == null ? io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; - } - - public static final int RECIPE_FIELD_NUMBER = 2; - private io.grafeas.v1.Recipe recipe_; - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.Recipe recipe = 2; - * @return Whether the recipe field is set. - */ - @java.lang.Override - public boolean hasRecipe() { - return recipe_ != null; - } - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.Recipe recipe = 2; - * @return The recipe. - */ - @java.lang.Override - public io.grafeas.v1.Recipe getRecipe() { - return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; - } - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - @java.lang.Override - public io.grafeas.v1.RecipeOrBuilder getRecipeOrBuilder() { - return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; - } - - public static final int METADATA_FIELD_NUMBER = 3; - private io.grafeas.v1.Metadata metadata_; - /** - * .grafeas.v1.Metadata metadata = 3; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return metadata_ != null; - } - /** - * .grafeas.v1.Metadata metadata = 3; - * @return The metadata. - */ - @java.lang.Override - public io.grafeas.v1.Metadata getMetadata() { - return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - @java.lang.Override - public io.grafeas.v1.MetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; - } - - public static final int MATERIALS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList materials_; - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @return A list containing the materials. - */ - public com.google.protobuf.ProtocolStringList - getMaterialsList() { - return materials_; - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @return The count of materials. - */ - public int getMaterialsCount() { - return materials_.size(); - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @param index The index of the element to return. - * @return The materials at the given index. - */ - public java.lang.String getMaterials(int index) { - return materials_.get(index); - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @param index The index of the value to return. - * @return The bytes of the materials at the given index. - */ - public com.google.protobuf.ByteString - getMaterialsBytes(int index) { - return materials_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (builderConfig_ != null) { - output.writeMessage(1, getBuilderConfig()); - } - if (recipe_ != null) { - output.writeMessage(2, getRecipe()); - } - if (metadata_ != null) { - output.writeMessage(3, getMetadata()); - } - for (int i = 0; i < materials_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, materials_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (builderConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBuilderConfig()); - } - if (recipe_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getRecipe()); - } - if (metadata_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getMetadata()); - } - { - int dataSize = 0; - for (int i = 0; i < materials_.size(); i++) { - dataSize += computeStringSizeNoTag(materials_.getRaw(i)); - } - size += dataSize; - size += 1 * getMaterialsList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.InTotoProvenance)) { - return super.equals(obj); - } - io.grafeas.v1.InTotoProvenance other = (io.grafeas.v1.InTotoProvenance) obj; - - if (hasBuilderConfig() != other.hasBuilderConfig()) return false; - if (hasBuilderConfig()) { - if (!getBuilderConfig() - .equals(other.getBuilderConfig())) return false; - } - if (hasRecipe() != other.hasRecipe()) return false; - if (hasRecipe()) { - if (!getRecipe() - .equals(other.getRecipe())) return false; - } - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getMaterialsList() - .equals(other.getMaterialsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBuilderConfig()) { - hash = (37 * hash) + BUILDER_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getBuilderConfig().hashCode(); - } - if (hasRecipe()) { - hash = (37 * hash) + RECIPE_FIELD_NUMBER; - hash = (53 * hash) + getRecipe().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - if (getMaterialsCount() > 0) { - hash = (37 * hash) + MATERIALS_FIELD_NUMBER; - hash = (53 * hash) + getMaterialsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.InTotoProvenance parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.InTotoProvenance parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.InTotoProvenance parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.InTotoProvenance parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.InTotoProvenance parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.InTotoProvenance parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.InTotoProvenance parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.InTotoProvenance parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.InTotoProvenance parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.InTotoProvenance parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.InTotoProvenance parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.InTotoProvenance parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.InTotoProvenance prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.InTotoProvenance} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.InTotoProvenance) - io.grafeas.v1.InTotoProvenanceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.InTotoProvenance.class, io.grafeas.v1.InTotoProvenance.Builder.class); - } - - // Construct using io.grafeas.v1.InTotoProvenance.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - builderConfig_ = null; - if (builderConfigBuilder_ != null) { - builderConfigBuilder_.dispose(); - builderConfigBuilder_ = null; - } - recipe_ = null; - if (recipeBuilder_ != null) { - recipeBuilder_.dispose(); - recipeBuilder_ = null; - } - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_InTotoProvenance_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.InTotoProvenance getDefaultInstanceForType() { - return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.InTotoProvenance build() { - io.grafeas.v1.InTotoProvenance result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.InTotoProvenance buildPartial() { - io.grafeas.v1.InTotoProvenance result = new io.grafeas.v1.InTotoProvenance(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.InTotoProvenance result) { - if (((bitField0_ & 0x00000008) != 0)) { - materials_ = materials_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.materials_ = materials_; - } - - private void buildPartial0(io.grafeas.v1.InTotoProvenance result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.builderConfig_ = builderConfigBuilder_ == null - ? builderConfig_ - : builderConfigBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.recipe_ = recipeBuilder_ == null - ? recipe_ - : recipeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.InTotoProvenance) { - return mergeFrom((io.grafeas.v1.InTotoProvenance)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.InTotoProvenance other) { - if (other == io.grafeas.v1.InTotoProvenance.getDefaultInstance()) return this; - if (other.hasBuilderConfig()) { - mergeBuilderConfig(other.getBuilderConfig()); - } - if (other.hasRecipe()) { - mergeRecipe(other.getRecipe()); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (!other.materials_.isEmpty()) { - if (materials_.isEmpty()) { - materials_ = other.materials_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureMaterialsIsMutable(); - materials_.addAll(other.materials_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getBuilderConfigFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getRecipeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - ensureMaterialsIsMutable(); - materials_.add(s); - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.BuilderConfig builderConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuilderConfig, io.grafeas.v1.BuilderConfig.Builder, io.grafeas.v1.BuilderConfigOrBuilder> builderConfigBuilder_; - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - * @return Whether the builderConfig field is set. - */ - public boolean hasBuilderConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - * @return The builderConfig. - */ - public io.grafeas.v1.BuilderConfig getBuilderConfig() { - if (builderConfigBuilder_ == null) { - return builderConfig_ == null ? io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; - } else { - return builderConfigBuilder_.getMessage(); - } - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - public Builder setBuilderConfig(io.grafeas.v1.BuilderConfig value) { - if (builderConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - builderConfig_ = value; - } else { - builderConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - public Builder setBuilderConfig( - io.grafeas.v1.BuilderConfig.Builder builderForValue) { - if (builderConfigBuilder_ == null) { - builderConfig_ = builderForValue.build(); - } else { - builderConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - public Builder mergeBuilderConfig(io.grafeas.v1.BuilderConfig value) { - if (builderConfigBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - builderConfig_ != null && - builderConfig_ != io.grafeas.v1.BuilderConfig.getDefaultInstance()) { - getBuilderConfigBuilder().mergeFrom(value); - } else { - builderConfig_ = value; - } - } else { - builderConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - public Builder clearBuilderConfig() { - bitField0_ = (bitField0_ & ~0x00000001); - builderConfig_ = null; - if (builderConfigBuilder_ != null) { - builderConfigBuilder_.dispose(); - builderConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - public io.grafeas.v1.BuilderConfig.Builder getBuilderConfigBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getBuilderConfigFieldBuilder().getBuilder(); - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - public io.grafeas.v1.BuilderConfigOrBuilder getBuilderConfigOrBuilder() { - if (builderConfigBuilder_ != null) { - return builderConfigBuilder_.getMessageOrBuilder(); - } else { - return builderConfig_ == null ? - io.grafeas.v1.BuilderConfig.getDefaultInstance() : builderConfig_; - } - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuilderConfig, io.grafeas.v1.BuilderConfig.Builder, io.grafeas.v1.BuilderConfigOrBuilder> - getBuilderConfigFieldBuilder() { - if (builderConfigBuilder_ == null) { - builderConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuilderConfig, io.grafeas.v1.BuilderConfig.Builder, io.grafeas.v1.BuilderConfigOrBuilder>( - getBuilderConfig(), - getParentForChildren(), - isClean()); - builderConfig_ = null; - } - return builderConfigBuilder_; - } - - private io.grafeas.v1.Recipe recipe_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Recipe, io.grafeas.v1.Recipe.Builder, io.grafeas.v1.RecipeOrBuilder> recipeBuilder_; - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - * @return Whether the recipe field is set. - */ - public boolean hasRecipe() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - * @return The recipe. - */ - public io.grafeas.v1.Recipe getRecipe() { - if (recipeBuilder_ == null) { - return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; - } else { - return recipeBuilder_.getMessage(); - } - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - public Builder setRecipe(io.grafeas.v1.Recipe value) { - if (recipeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - recipe_ = value; - } else { - recipeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - public Builder setRecipe( - io.grafeas.v1.Recipe.Builder builderForValue) { - if (recipeBuilder_ == null) { - recipe_ = builderForValue.build(); - } else { - recipeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - public Builder mergeRecipe(io.grafeas.v1.Recipe value) { - if (recipeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - recipe_ != null && - recipe_ != io.grafeas.v1.Recipe.getDefaultInstance()) { - getRecipeBuilder().mergeFrom(value); - } else { - recipe_ = value; - } - } else { - recipeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - public Builder clearRecipe() { - bitField0_ = (bitField0_ & ~0x00000002); - recipe_ = null; - if (recipeBuilder_ != null) { - recipeBuilder_.dispose(); - recipeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - public io.grafeas.v1.Recipe.Builder getRecipeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getRecipeFieldBuilder().getBuilder(); - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - public io.grafeas.v1.RecipeOrBuilder getRecipeOrBuilder() { - if (recipeBuilder_ != null) { - return recipeBuilder_.getMessageOrBuilder(); - } else { - return recipe_ == null ? - io.grafeas.v1.Recipe.getDefaultInstance() : recipe_; - } - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Recipe, io.grafeas.v1.Recipe.Builder, io.grafeas.v1.RecipeOrBuilder> - getRecipeFieldBuilder() { - if (recipeBuilder_ == null) { - recipeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Recipe, io.grafeas.v1.Recipe.Builder, io.grafeas.v1.RecipeOrBuilder>( - getRecipe(), - getParentForChildren(), - isClean()); - recipe_ = null; - } - return recipeBuilder_; - } - - private io.grafeas.v1.Metadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Metadata, io.grafeas.v1.Metadata.Builder, io.grafeas.v1.MetadataOrBuilder> metadataBuilder_; - /** - * .grafeas.v1.Metadata metadata = 3; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .grafeas.v1.Metadata metadata = 3; - * @return The metadata. - */ - public io.grafeas.v1.Metadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - public Builder setMetadata(io.grafeas.v1.Metadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - public Builder setMetadata( - io.grafeas.v1.Metadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - public Builder mergeMetadata(io.grafeas.v1.Metadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - metadata_ != null && - metadata_ != io.grafeas.v1.Metadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000004); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - public io.grafeas.v1.Metadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - public io.grafeas.v1.MetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.grafeas.v1.Metadata.getDefaultInstance() : metadata_; - } - } - /** - * .grafeas.v1.Metadata metadata = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Metadata, io.grafeas.v1.Metadata.Builder, io.grafeas.v1.MetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Metadata, io.grafeas.v1.Metadata.Builder, io.grafeas.v1.MetadataOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private com.google.protobuf.LazyStringList materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureMaterialsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - materials_ = new com.google.protobuf.LazyStringArrayList(materials_); - bitField0_ |= 0x00000008; - } - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @return A list containing the materials. - */ - public com.google.protobuf.ProtocolStringList - getMaterialsList() { - return materials_.getUnmodifiableView(); - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @return The count of materials. - */ - public int getMaterialsCount() { - return materials_.size(); - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @param index The index of the element to return. - * @return The materials at the given index. - */ - public java.lang.String getMaterials(int index) { - return materials_.get(index); - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @param index The index of the value to return. - * @return The bytes of the materials at the given index. - */ - public com.google.protobuf.ByteString - getMaterialsBytes(int index) { - return materials_.getByteString(index); - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @param index The index to set the value at. - * @param value The materials to set. - * @return This builder for chaining. - */ - public Builder setMaterials( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureMaterialsIsMutable(); - materials_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @param value The materials to add. - * @return This builder for chaining. - */ - public Builder addMaterials( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureMaterialsIsMutable(); - materials_.add(value); - onChanged(); - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @param values The materials to add. - * @return This builder for chaining. - */ - public Builder addAllMaterials( - java.lang.Iterable values) { - ensureMaterialsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, materials_); - onChanged(); - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @return This builder for chaining. - */ - public Builder clearMaterials() { - materials_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated string materials = 4; - * @param value The bytes of the materials to add. - * @return This builder for chaining. - */ - public Builder addMaterialsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureMaterialsIsMutable(); - materials_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.InTotoProvenance) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.InTotoProvenance) - private static final io.grafeas.v1.InTotoProvenance DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.InTotoProvenance(); - } - - public static io.grafeas.v1.InTotoProvenance getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InTotoProvenance parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.InTotoProvenance getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java deleted file mode 100644 index b24aa48eb140..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceOrBuilder.java +++ /dev/null @@ -1,140 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -public interface InTotoProvenanceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.InTotoProvenance) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * required
-   * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - * @return Whether the builderConfig field is set. - */ - boolean hasBuilderConfig(); - /** - *
-   * required
-   * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - * @return The builderConfig. - */ - io.grafeas.v1.BuilderConfig getBuilderConfig(); - /** - *
-   * required
-   * 
- * - * .grafeas.v1.BuilderConfig builder_config = 1; - */ - io.grafeas.v1.BuilderConfigOrBuilder getBuilderConfigOrBuilder(); - - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.Recipe recipe = 2; - * @return Whether the recipe field is set. - */ - boolean hasRecipe(); - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.Recipe recipe = 2; - * @return The recipe. - */ - io.grafeas.v1.Recipe getRecipe(); - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.Recipe recipe = 2; - */ - io.grafeas.v1.RecipeOrBuilder getRecipeOrBuilder(); - - /** - * .grafeas.v1.Metadata metadata = 3; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * .grafeas.v1.Metadata metadata = 3; - * @return The metadata. - */ - io.grafeas.v1.Metadata getMetadata(); - /** - * .grafeas.v1.Metadata metadata = 3; - */ - io.grafeas.v1.MetadataOrBuilder getMetadataOrBuilder(); - - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @return A list containing the materials. - */ - java.util.List - getMaterialsList(); - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @return The count of materials. - */ - int getMaterialsCount(); - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @param index The index of the element to return. - * @return The materials at the given index. - */ - java.lang.String getMaterials(int index); - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated string materials = 4; - * @param index The index of the value to return. - * @return The bytes of the materials at the given index. - */ - com.google.protobuf.ByteString - getMaterialsBytes(int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java deleted file mode 100644 index 338b8a798f77..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoProvenanceProto.java +++ /dev/null @@ -1,115 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -public final class InTotoProvenanceProto { - private InTotoProvenanceProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Recipe_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Recipe_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Completeness_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Completeness_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Metadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Metadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BuilderConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_InTotoProvenance_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\"grafeas/v1/intoto_provenance.proto\022\ngr" + - "afeas.v1\032\031google/protobuf/any.proto\032\037goo" + - "gle/protobuf/timestamp.proto\"\234\001\n\006Recipe\022" + - "\014\n\004type\030\001 \001(\t\022\033\n\023defined_in_material\030\002 \001" + - "(\003\022\023\n\013entry_point\030\003 \001(\t\022\'\n\targuments\030\004 \003" + - "(\0132\024.google.protobuf.Any\022)\n\013environment\030" + - "\005 \003(\0132\024.google.protobuf.Any\"I\n\014Completen" + - "ess\022\021\n\targuments\030\001 \001(\010\022\023\n\013environment\030\002 " + - "\001(\010\022\021\n\tmaterials\030\003 \001(\010\"\332\001\n\010Metadata\022\033\n\023b" + - "uild_invocation_id\030\001 \001(\t\0224\n\020build_starte" + - "d_on\030\002 \001(\0132\032.google.protobuf.Timestamp\0225" + - "\n\021build_finished_on\030\003 \001(\0132\032.google.proto" + - "buf.Timestamp\022.\n\014completeness\030\004 \001(\0132\030.gr" + - "afeas.v1.Completeness\022\024\n\014reproducible\030\005 " + - "\001(\010\"\033\n\rBuilderConfig\022\n\n\002id\030\001 \001(\t\"\244\001\n\020InT" + - "otoProvenance\0221\n\016builder_config\030\001 \001(\0132\031." + - "grafeas.v1.BuilderConfig\022\"\n\006recipe\030\002 \001(\013" + - "2\022.grafeas.v1.Recipe\022&\n\010metadata\030\003 \001(\0132\024" + - ".grafeas.v1.Metadata\022\021\n\tmaterials\030\004 \003(\tB" + - "h\n\rio.grafeas.v1B\025InTotoProvenanceProtoP" + - "\001Z8google.golang.org/genproto/googleapis" + - "/grafeas/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.AnyProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_grafeas_v1_Recipe_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_Recipe_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Recipe_descriptor, - new java.lang.String[] { "Type", "DefinedInMaterial", "EntryPoint", "Arguments", "Environment", }); - internal_static_grafeas_v1_Completeness_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Completeness_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Completeness_descriptor, - new java.lang.String[] { "Arguments", "Environment", "Materials", }); - internal_static_grafeas_v1_Metadata_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_Metadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Metadata_descriptor, - new java.lang.String[] { "BuildInvocationId", "BuildStartedOn", "BuildFinishedOn", "Completeness", "Reproducible", }); - internal_static_grafeas_v1_BuilderConfig_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_BuilderConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BuilderConfig_descriptor, - new java.lang.String[] { "Id", }); - internal_static_grafeas_v1_InTotoProvenance_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_grafeas_v1_InTotoProvenance_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_InTotoProvenance_descriptor, - new java.lang.String[] { "BuilderConfig", "Recipe", "Metadata", "Materials", }); - com.google.protobuf.AnyProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java deleted file mode 100644 index 5f36886717b9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatement.java +++ /dev/null @@ -1,1802 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_statement.proto - -package io.grafeas.v1; - -/** - *
- * Spec defined at
- * https://github.com/in-toto/attestation/tree/main/spec#statement The
- * serialized InTotoStatement will be stored as Envelope.payload.
- * Envelope.payloadType is always "application/vnd.in-toto+json".
- * 
- * - * Protobuf type {@code grafeas.v1.InTotoStatement} - */ -public final class InTotoStatement extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.InTotoStatement) - InTotoStatementOrBuilder { -private static final long serialVersionUID = 0L; - // Use InTotoStatement.newBuilder() to construct. - private InTotoStatement(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InTotoStatement() { - type_ = ""; - subject_ = java.util.Collections.emptyList(); - predicateType_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InTotoStatement(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.InTotoStatement.class, io.grafeas.v1.InTotoStatement.Builder.class); - } - - private int predicateCase_ = 0; - private java.lang.Object predicate_; - public enum PredicateCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - PROVENANCE(4), - SLSA_PROVENANCE(5), - SLSA_PROVENANCE_ZERO_TWO(6), - PREDICATE_NOT_SET(0); - private final int value; - private PredicateCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PredicateCase valueOf(int value) { - return forNumber(value); - } - - public static PredicateCase forNumber(int value) { - switch (value) { - case 4: return PROVENANCE; - case 5: return SLSA_PROVENANCE; - case 6: return SLSA_PROVENANCE_ZERO_TWO; - case 0: return PREDICATE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public PredicateCase - getPredicateCase() { - return PredicateCase.forNumber( - predicateCase_); - } - - public static final int TYPE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object type_ = ""; - /** - *
-   * Always `https://in-toto.io/Statement/v0.1`.
-   * 
- * - * string type = 1 [json_name = "_type"]; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } - } - /** - *
-   * Always `https://in-toto.io/Statement/v0.1`.
-   * 
- * - * string type = 1 [json_name = "_type"]; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUBJECT_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List subject_; - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - @java.lang.Override - public java.util.List getSubjectList() { - return subject_; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - @java.lang.Override - public java.util.List - getSubjectOrBuilderList() { - return subject_; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - @java.lang.Override - public int getSubjectCount() { - return subject_.size(); - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - @java.lang.Override - public io.grafeas.v1.Subject getSubject(int index) { - return subject_.get(index); - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - @java.lang.Override - public io.grafeas.v1.SubjectOrBuilder getSubjectOrBuilder( - int index) { - return subject_.get(index); - } - - public static final int PREDICATE_TYPE_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object predicateType_ = ""; - /** - *
-   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-   * 
- * - * string predicate_type = 3; - * @return The predicateType. - */ - @java.lang.Override - public java.lang.String getPredicateType() { - java.lang.Object ref = predicateType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - predicateType_ = s; - return s; - } - } - /** - *
-   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-   * 
- * - * string predicate_type = 3; - * @return The bytes for predicateType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPredicateTypeBytes() { - java.lang.Object ref = predicateType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - predicateType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROVENANCE_FIELD_NUMBER = 4; - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - * @return Whether the provenance field is set. - */ - @java.lang.Override - public boolean hasProvenance() { - return predicateCase_ == 4; - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - * @return The provenance. - */ - @java.lang.Override - public io.grafeas.v1.InTotoProvenance getProvenance() { - if (predicateCase_ == 4) { - return (io.grafeas.v1.InTotoProvenance) predicate_; - } - return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - @java.lang.Override - public io.grafeas.v1.InTotoProvenanceOrBuilder getProvenanceOrBuilder() { - if (predicateCase_ == 4) { - return (io.grafeas.v1.InTotoProvenance) predicate_; - } - return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); - } - - public static final int SLSA_PROVENANCE_FIELD_NUMBER = 5; - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @return Whether the slsaProvenance field is set. - */ - @java.lang.Override - public boolean hasSlsaProvenance() { - return predicateCase_ == 5; - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @return The slsaProvenance. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance getSlsaProvenance() { - if (predicateCase_ == 5) { - return (io.grafeas.v1.SlsaProvenance) predicate_; - } - return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceOrBuilder getSlsaProvenanceOrBuilder() { - if (predicateCase_ == 5) { - return (io.grafeas.v1.SlsaProvenance) predicate_; - } - return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); - } - - public static final int SLSA_PROVENANCE_ZERO_TWO_FIELD_NUMBER = 6; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @return Whether the slsaProvenanceZeroTwo field is set. - */ - @java.lang.Override - public boolean hasSlsaProvenanceZeroTwo() { - return predicateCase_ == 6; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @return The slsaProvenanceZeroTwo. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo getSlsaProvenanceZeroTwo() { - if (predicateCase_ == 6) { - return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; - } - return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder getSlsaProvenanceZeroTwoOrBuilder() { - if (predicateCase_ == 6) { - return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; - } - return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); - } - for (int i = 0; i < subject_.size(); i++) { - output.writeMessage(2, subject_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(predicateType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, predicateType_); - } - if (predicateCase_ == 4) { - output.writeMessage(4, (io.grafeas.v1.InTotoProvenance) predicate_); - } - if (predicateCase_ == 5) { - output.writeMessage(5, (io.grafeas.v1.SlsaProvenance) predicate_); - } - if (predicateCase_ == 6) { - output.writeMessage(6, (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); - } - for (int i = 0; i < subject_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, subject_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(predicateType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, predicateType_); - } - if (predicateCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (io.grafeas.v1.InTotoProvenance) predicate_); - } - if (predicateCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (io.grafeas.v1.SlsaProvenance) predicate_); - } - if (predicateCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.InTotoStatement)) { - return super.equals(obj); - } - io.grafeas.v1.InTotoStatement other = (io.grafeas.v1.InTotoStatement) obj; - - if (!getType() - .equals(other.getType())) return false; - if (!getSubjectList() - .equals(other.getSubjectList())) return false; - if (!getPredicateType() - .equals(other.getPredicateType())) return false; - if (!getPredicateCase().equals(other.getPredicateCase())) return false; - switch (predicateCase_) { - case 4: - if (!getProvenance() - .equals(other.getProvenance())) return false; - break; - case 5: - if (!getSlsaProvenance() - .equals(other.getSlsaProvenance())) return false; - break; - case 6: - if (!getSlsaProvenanceZeroTwo() - .equals(other.getSlsaProvenanceZeroTwo())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - if (getSubjectCount() > 0) { - hash = (37 * hash) + SUBJECT_FIELD_NUMBER; - hash = (53 * hash) + getSubjectList().hashCode(); - } - hash = (37 * hash) + PREDICATE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getPredicateType().hashCode(); - switch (predicateCase_) { - case 4: - hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; - hash = (53 * hash) + getProvenance().hashCode(); - break; - case 5: - hash = (37 * hash) + SLSA_PROVENANCE_FIELD_NUMBER; - hash = (53 * hash) + getSlsaProvenance().hashCode(); - break; - case 6: - hash = (37 * hash) + SLSA_PROVENANCE_ZERO_TWO_FIELD_NUMBER; - hash = (53 * hash) + getSlsaProvenanceZeroTwo().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.InTotoStatement parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.InTotoStatement parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.InTotoStatement parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.InTotoStatement parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.InTotoStatement parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.InTotoStatement parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.InTotoStatement parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.InTotoStatement parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.InTotoStatement parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.InTotoStatement parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.InTotoStatement parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.InTotoStatement parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.InTotoStatement prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Spec defined at
-   * https://github.com/in-toto/attestation/tree/main/spec#statement The
-   * serialized InTotoStatement will be stored as Envelope.payload.
-   * Envelope.payloadType is always "application/vnd.in-toto+json".
-   * 
- * - * Protobuf type {@code grafeas.v1.InTotoStatement} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.InTotoStatement) - io.grafeas.v1.InTotoStatementOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.InTotoStatement.class, io.grafeas.v1.InTotoStatement.Builder.class); - } - - // Construct using io.grafeas.v1.InTotoStatement.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = ""; - if (subjectBuilder_ == null) { - subject_ = java.util.Collections.emptyList(); - } else { - subject_ = null; - subjectBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - predicateType_ = ""; - if (provenanceBuilder_ != null) { - provenanceBuilder_.clear(); - } - if (slsaProvenanceBuilder_ != null) { - slsaProvenanceBuilder_.clear(); - } - if (slsaProvenanceZeroTwoBuilder_ != null) { - slsaProvenanceZeroTwoBuilder_.clear(); - } - predicateCase_ = 0; - predicate_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_InTotoStatement_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.InTotoStatement getDefaultInstanceForType() { - return io.grafeas.v1.InTotoStatement.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.InTotoStatement build() { - io.grafeas.v1.InTotoStatement result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.InTotoStatement buildPartial() { - io.grafeas.v1.InTotoStatement result = new io.grafeas.v1.InTotoStatement(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.InTotoStatement result) { - if (subjectBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - subject_ = java.util.Collections.unmodifiableList(subject_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.subject_ = subject_; - } else { - result.subject_ = subjectBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.InTotoStatement result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.predicateType_ = predicateType_; - } - } - - private void buildPartialOneofs(io.grafeas.v1.InTotoStatement result) { - result.predicateCase_ = predicateCase_; - result.predicate_ = this.predicate_; - if (predicateCase_ == 4 && - provenanceBuilder_ != null) { - result.predicate_ = provenanceBuilder_.build(); - } - if (predicateCase_ == 5 && - slsaProvenanceBuilder_ != null) { - result.predicate_ = slsaProvenanceBuilder_.build(); - } - if (predicateCase_ == 6 && - slsaProvenanceZeroTwoBuilder_ != null) { - result.predicate_ = slsaProvenanceZeroTwoBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.InTotoStatement) { - return mergeFrom((io.grafeas.v1.InTotoStatement)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.InTotoStatement other) { - if (other == io.grafeas.v1.InTotoStatement.getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (subjectBuilder_ == null) { - if (!other.subject_.isEmpty()) { - if (subject_.isEmpty()) { - subject_ = other.subject_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSubjectIsMutable(); - subject_.addAll(other.subject_); - } - onChanged(); - } - } else { - if (!other.subject_.isEmpty()) { - if (subjectBuilder_.isEmpty()) { - subjectBuilder_.dispose(); - subjectBuilder_ = null; - subject_ = other.subject_; - bitField0_ = (bitField0_ & ~0x00000002); - subjectBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubjectFieldBuilder() : null; - } else { - subjectBuilder_.addAllMessages(other.subject_); - } - } - } - if (!other.getPredicateType().isEmpty()) { - predicateType_ = other.predicateType_; - bitField0_ |= 0x00000004; - onChanged(); - } - switch (other.getPredicateCase()) { - case PROVENANCE: { - mergeProvenance(other.getProvenance()); - break; - } - case SLSA_PROVENANCE: { - mergeSlsaProvenance(other.getSlsaProvenance()); - break; - } - case SLSA_PROVENANCE_ZERO_TWO: { - mergeSlsaProvenanceZeroTwo(other.getSlsaProvenanceZeroTwo()); - break; - } - case PREDICATE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - type_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - io.grafeas.v1.Subject m = - input.readMessage( - io.grafeas.v1.Subject.parser(), - extensionRegistry); - if (subjectBuilder_ == null) { - ensureSubjectIsMutable(); - subject_.add(m); - } else { - subjectBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: { - predicateType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getProvenanceFieldBuilder().getBuilder(), - extensionRegistry); - predicateCase_ = 4; - break; - } // case 34 - case 42: { - input.readMessage( - getSlsaProvenanceFieldBuilder().getBuilder(), - extensionRegistry); - predicateCase_ = 5; - break; - } // case 42 - case 50: { - input.readMessage( - getSlsaProvenanceZeroTwoFieldBuilder().getBuilder(), - extensionRegistry); - predicateCase_ = 6; - break; - } // case 50 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int predicateCase_ = 0; - private java.lang.Object predicate_; - public PredicateCase - getPredicateCase() { - return PredicateCase.forNumber( - predicateCase_); - } - - public Builder clearPredicate() { - predicateCase_ = 0; - predicate_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object type_ = ""; - /** - *
-     * Always `https://in-toto.io/Statement/v0.1`.
-     * 
- * - * string type = 1 [json_name = "_type"]; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Always `https://in-toto.io/Statement/v0.1`.
-     * 
- * - * string type = 1 [json_name = "_type"]; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Always `https://in-toto.io/Statement/v0.1`.
-     * 
- * - * string type = 1 [json_name = "_type"]; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Always `https://in-toto.io/Statement/v0.1`.
-     * 
- * - * string type = 1 [json_name = "_type"]; - * @return This builder for chaining. - */ - public Builder clearType() { - type_ = getDefaultInstance().getType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Always `https://in-toto.io/Statement/v0.1`.
-     * 
- * - * string type = 1 [json_name = "_type"]; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List subject_ = - java.util.Collections.emptyList(); - private void ensureSubjectIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - subject_ = new java.util.ArrayList(subject_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Subject, io.grafeas.v1.Subject.Builder, io.grafeas.v1.SubjectOrBuilder> subjectBuilder_; - - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public java.util.List getSubjectList() { - if (subjectBuilder_ == null) { - return java.util.Collections.unmodifiableList(subject_); - } else { - return subjectBuilder_.getMessageList(); - } - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public int getSubjectCount() { - if (subjectBuilder_ == null) { - return subject_.size(); - } else { - return subjectBuilder_.getCount(); - } - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public io.grafeas.v1.Subject getSubject(int index) { - if (subjectBuilder_ == null) { - return subject_.get(index); - } else { - return subjectBuilder_.getMessage(index); - } - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder setSubject( - int index, io.grafeas.v1.Subject value) { - if (subjectBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectIsMutable(); - subject_.set(index, value); - onChanged(); - } else { - subjectBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder setSubject( - int index, io.grafeas.v1.Subject.Builder builderForValue) { - if (subjectBuilder_ == null) { - ensureSubjectIsMutable(); - subject_.set(index, builderForValue.build()); - onChanged(); - } else { - subjectBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder addSubject(io.grafeas.v1.Subject value) { - if (subjectBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectIsMutable(); - subject_.add(value); - onChanged(); - } else { - subjectBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder addSubject( - int index, io.grafeas.v1.Subject value) { - if (subjectBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectIsMutable(); - subject_.add(index, value); - onChanged(); - } else { - subjectBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder addSubject( - io.grafeas.v1.Subject.Builder builderForValue) { - if (subjectBuilder_ == null) { - ensureSubjectIsMutable(); - subject_.add(builderForValue.build()); - onChanged(); - } else { - subjectBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder addSubject( - int index, io.grafeas.v1.Subject.Builder builderForValue) { - if (subjectBuilder_ == null) { - ensureSubjectIsMutable(); - subject_.add(index, builderForValue.build()); - onChanged(); - } else { - subjectBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder addAllSubject( - java.lang.Iterable values) { - if (subjectBuilder_ == null) { - ensureSubjectIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subject_); - onChanged(); - } else { - subjectBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder clearSubject() { - if (subjectBuilder_ == null) { - subject_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - subjectBuilder_.clear(); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public Builder removeSubject(int index) { - if (subjectBuilder_ == null) { - ensureSubjectIsMutable(); - subject_.remove(index); - onChanged(); - } else { - subjectBuilder_.remove(index); - } - return this; - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public io.grafeas.v1.Subject.Builder getSubjectBuilder( - int index) { - return getSubjectFieldBuilder().getBuilder(index); - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public io.grafeas.v1.SubjectOrBuilder getSubjectOrBuilder( - int index) { - if (subjectBuilder_ == null) { - return subject_.get(index); } else { - return subjectBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public java.util.List - getSubjectOrBuilderList() { - if (subjectBuilder_ != null) { - return subjectBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subject_); - } - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public io.grafeas.v1.Subject.Builder addSubjectBuilder() { - return getSubjectFieldBuilder().addBuilder( - io.grafeas.v1.Subject.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public io.grafeas.v1.Subject.Builder addSubjectBuilder( - int index) { - return getSubjectFieldBuilder().addBuilder( - index, io.grafeas.v1.Subject.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - public java.util.List - getSubjectBuilderList() { - return getSubjectFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Subject, io.grafeas.v1.Subject.Builder, io.grafeas.v1.SubjectOrBuilder> - getSubjectFieldBuilder() { - if (subjectBuilder_ == null) { - subjectBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Subject, io.grafeas.v1.Subject.Builder, io.grafeas.v1.SubjectOrBuilder>( - subject_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - subject_ = null; - } - return subjectBuilder_; - } - - private java.lang.Object predicateType_ = ""; - /** - *
-     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-     * 
- * - * string predicate_type = 3; - * @return The predicateType. - */ - public java.lang.String getPredicateType() { - java.lang.Object ref = predicateType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - predicateType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-     * 
- * - * string predicate_type = 3; - * @return The bytes for predicateType. - */ - public com.google.protobuf.ByteString - getPredicateTypeBytes() { - java.lang.Object ref = predicateType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - predicateType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-     * 
- * - * string predicate_type = 3; - * @param value The predicateType to set. - * @return This builder for chaining. - */ - public Builder setPredicateType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - predicateType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-     * 
- * - * string predicate_type = 3; - * @return This builder for chaining. - */ - public Builder clearPredicateType() { - predicateType_ = getDefaultInstance().getPredicateType(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-     * 
- * - * string predicate_type = 3; - * @param value The bytes for predicateType to set. - * @return This builder for chaining. - */ - public Builder setPredicateTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - predicateType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> provenanceBuilder_; - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - * @return Whether the provenance field is set. - */ - @java.lang.Override - public boolean hasProvenance() { - return predicateCase_ == 4; - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - * @return The provenance. - */ - @java.lang.Override - public io.grafeas.v1.InTotoProvenance getProvenance() { - if (provenanceBuilder_ == null) { - if (predicateCase_ == 4) { - return (io.grafeas.v1.InTotoProvenance) predicate_; - } - return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); - } else { - if (predicateCase_ == 4) { - return provenanceBuilder_.getMessage(); - } - return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); - } - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - public Builder setProvenance(io.grafeas.v1.InTotoProvenance value) { - if (provenanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - predicate_ = value; - onChanged(); - } else { - provenanceBuilder_.setMessage(value); - } - predicateCase_ = 4; - return this; - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - public Builder setProvenance( - io.grafeas.v1.InTotoProvenance.Builder builderForValue) { - if (provenanceBuilder_ == null) { - predicate_ = builderForValue.build(); - onChanged(); - } else { - provenanceBuilder_.setMessage(builderForValue.build()); - } - predicateCase_ = 4; - return this; - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - public Builder mergeProvenance(io.grafeas.v1.InTotoProvenance value) { - if (provenanceBuilder_ == null) { - if (predicateCase_ == 4 && - predicate_ != io.grafeas.v1.InTotoProvenance.getDefaultInstance()) { - predicate_ = io.grafeas.v1.InTotoProvenance.newBuilder((io.grafeas.v1.InTotoProvenance) predicate_) - .mergeFrom(value).buildPartial(); - } else { - predicate_ = value; - } - onChanged(); - } else { - if (predicateCase_ == 4) { - provenanceBuilder_.mergeFrom(value); - } else { - provenanceBuilder_.setMessage(value); - } - } - predicateCase_ = 4; - return this; - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - public Builder clearProvenance() { - if (provenanceBuilder_ == null) { - if (predicateCase_ == 4) { - predicateCase_ = 0; - predicate_ = null; - onChanged(); - } - } else { - if (predicateCase_ == 4) { - predicateCase_ = 0; - predicate_ = null; - } - provenanceBuilder_.clear(); - } - return this; - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - public io.grafeas.v1.InTotoProvenance.Builder getProvenanceBuilder() { - return getProvenanceFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - @java.lang.Override - public io.grafeas.v1.InTotoProvenanceOrBuilder getProvenanceOrBuilder() { - if ((predicateCase_ == 4) && (provenanceBuilder_ != null)) { - return provenanceBuilder_.getMessageOrBuilder(); - } else { - if (predicateCase_ == 4) { - return (io.grafeas.v1.InTotoProvenance) predicate_; - } - return io.grafeas.v1.InTotoProvenance.getDefaultInstance(); - } - } - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> - getProvenanceFieldBuilder() { - if (provenanceBuilder_ == null) { - if (!(predicateCase_ == 4)) { - predicate_ = io.grafeas.v1.InTotoProvenance.getDefaultInstance(); - } - provenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder>( - (io.grafeas.v1.InTotoProvenance) predicate_, - getParentForChildren(), - isClean()); - predicate_ = null; - } - predicateCase_ = 4; - onChanged(); - return provenanceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance, io.grafeas.v1.SlsaProvenance.Builder, io.grafeas.v1.SlsaProvenanceOrBuilder> slsaProvenanceBuilder_; - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @return Whether the slsaProvenance field is set. - */ - @java.lang.Override - public boolean hasSlsaProvenance() { - return predicateCase_ == 5; - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @return The slsaProvenance. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance getSlsaProvenance() { - if (slsaProvenanceBuilder_ == null) { - if (predicateCase_ == 5) { - return (io.grafeas.v1.SlsaProvenance) predicate_; - } - return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); - } else { - if (predicateCase_ == 5) { - return slsaProvenanceBuilder_.getMessage(); - } - return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); - } - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - public Builder setSlsaProvenance(io.grafeas.v1.SlsaProvenance value) { - if (slsaProvenanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - predicate_ = value; - onChanged(); - } else { - slsaProvenanceBuilder_.setMessage(value); - } - predicateCase_ = 5; - return this; - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - public Builder setSlsaProvenance( - io.grafeas.v1.SlsaProvenance.Builder builderForValue) { - if (slsaProvenanceBuilder_ == null) { - predicate_ = builderForValue.build(); - onChanged(); - } else { - slsaProvenanceBuilder_.setMessage(builderForValue.build()); - } - predicateCase_ = 5; - return this; - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - public Builder mergeSlsaProvenance(io.grafeas.v1.SlsaProvenance value) { - if (slsaProvenanceBuilder_ == null) { - if (predicateCase_ == 5 && - predicate_ != io.grafeas.v1.SlsaProvenance.getDefaultInstance()) { - predicate_ = io.grafeas.v1.SlsaProvenance.newBuilder((io.grafeas.v1.SlsaProvenance) predicate_) - .mergeFrom(value).buildPartial(); - } else { - predicate_ = value; - } - onChanged(); - } else { - if (predicateCase_ == 5) { - slsaProvenanceBuilder_.mergeFrom(value); - } else { - slsaProvenanceBuilder_.setMessage(value); - } - } - predicateCase_ = 5; - return this; - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - public Builder clearSlsaProvenance() { - if (slsaProvenanceBuilder_ == null) { - if (predicateCase_ == 5) { - predicateCase_ = 0; - predicate_ = null; - onChanged(); - } - } else { - if (predicateCase_ == 5) { - predicateCase_ = 0; - predicate_ = null; - } - slsaProvenanceBuilder_.clear(); - } - return this; - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - public io.grafeas.v1.SlsaProvenance.Builder getSlsaProvenanceBuilder() { - return getSlsaProvenanceFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceOrBuilder getSlsaProvenanceOrBuilder() { - if ((predicateCase_ == 5) && (slsaProvenanceBuilder_ != null)) { - return slsaProvenanceBuilder_.getMessageOrBuilder(); - } else { - if (predicateCase_ == 5) { - return (io.grafeas.v1.SlsaProvenance) predicate_; - } - return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); - } - } - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance, io.grafeas.v1.SlsaProvenance.Builder, io.grafeas.v1.SlsaProvenanceOrBuilder> - getSlsaProvenanceFieldBuilder() { - if (slsaProvenanceBuilder_ == null) { - if (!(predicateCase_ == 5)) { - predicate_ = io.grafeas.v1.SlsaProvenance.getDefaultInstance(); - } - slsaProvenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance, io.grafeas.v1.SlsaProvenance.Builder, io.grafeas.v1.SlsaProvenanceOrBuilder>( - (io.grafeas.v1.SlsaProvenance) predicate_, - getParentForChildren(), - isClean()); - predicate_ = null; - } - predicateCase_ = 5; - onChanged(); - return slsaProvenanceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder, io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder> slsaProvenanceZeroTwoBuilder_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @return Whether the slsaProvenanceZeroTwo field is set. - */ - @java.lang.Override - public boolean hasSlsaProvenanceZeroTwo() { - return predicateCase_ == 6; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @return The slsaProvenanceZeroTwo. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo getSlsaProvenanceZeroTwo() { - if (slsaProvenanceZeroTwoBuilder_ == null) { - if (predicateCase_ == 6) { - return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; - } - return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); - } else { - if (predicateCase_ == 6) { - return slsaProvenanceZeroTwoBuilder_.getMessage(); - } - return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - public Builder setSlsaProvenanceZeroTwo(io.grafeas.v1.SlsaProvenanceZeroTwo value) { - if (slsaProvenanceZeroTwoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - predicate_ = value; - onChanged(); - } else { - slsaProvenanceZeroTwoBuilder_.setMessage(value); - } - predicateCase_ = 6; - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - public Builder setSlsaProvenanceZeroTwo( - io.grafeas.v1.SlsaProvenanceZeroTwo.Builder builderForValue) { - if (slsaProvenanceZeroTwoBuilder_ == null) { - predicate_ = builderForValue.build(); - onChanged(); - } else { - slsaProvenanceZeroTwoBuilder_.setMessage(builderForValue.build()); - } - predicateCase_ = 6; - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - public Builder mergeSlsaProvenanceZeroTwo(io.grafeas.v1.SlsaProvenanceZeroTwo value) { - if (slsaProvenanceZeroTwoBuilder_ == null) { - if (predicateCase_ == 6 && - predicate_ != io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance()) { - predicate_ = io.grafeas.v1.SlsaProvenanceZeroTwo.newBuilder((io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_) - .mergeFrom(value).buildPartial(); - } else { - predicate_ = value; - } - onChanged(); - } else { - if (predicateCase_ == 6) { - slsaProvenanceZeroTwoBuilder_.mergeFrom(value); - } else { - slsaProvenanceZeroTwoBuilder_.setMessage(value); - } - } - predicateCase_ = 6; - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - public Builder clearSlsaProvenanceZeroTwo() { - if (slsaProvenanceZeroTwoBuilder_ == null) { - if (predicateCase_ == 6) { - predicateCase_ = 0; - predicate_ = null; - onChanged(); - } - } else { - if (predicateCase_ == 6) { - predicateCase_ = 0; - predicate_ = null; - } - slsaProvenanceZeroTwoBuilder_.clear(); - } - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.Builder getSlsaProvenanceZeroTwoBuilder() { - return getSlsaProvenanceZeroTwoFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder getSlsaProvenanceZeroTwoOrBuilder() { - if ((predicateCase_ == 6) && (slsaProvenanceZeroTwoBuilder_ != null)) { - return slsaProvenanceZeroTwoBuilder_.getMessageOrBuilder(); - } else { - if (predicateCase_ == 6) { - return (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_; - } - return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder, io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder> - getSlsaProvenanceZeroTwoFieldBuilder() { - if (slsaProvenanceZeroTwoBuilder_ == null) { - if (!(predicateCase_ == 6)) { - predicate_ = io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); - } - slsaProvenanceZeroTwoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder, io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder>( - (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_, - getParentForChildren(), - isClean()); - predicate_ = null; - } - predicateCase_ = 6; - onChanged(); - return slsaProvenanceZeroTwoBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.InTotoStatement) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.InTotoStatement) - private static final io.grafeas.v1.InTotoStatement DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.InTotoStatement(); - } - - public static io.grafeas.v1.InTotoStatement getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InTotoStatement parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.InTotoStatement getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java deleted file mode 100644 index 0f28f2f9126d..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java +++ /dev/null @@ -1,120 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_statement.proto - -package io.grafeas.v1; - -public interface InTotoStatementOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.InTotoStatement) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Always `https://in-toto.io/Statement/v0.1`.
-   * 
- * - * string type = 1 [json_name = "_type"]; - * @return The type. - */ - java.lang.String getType(); - /** - *
-   * Always `https://in-toto.io/Statement/v0.1`.
-   * 
- * - * string type = 1 [json_name = "_type"]; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - java.util.List - getSubjectList(); - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - io.grafeas.v1.Subject getSubject(int index); - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - int getSubjectCount(); - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - java.util.List - getSubjectOrBuilderList(); - /** - * repeated .grafeas.v1.Subject subject = 2; - */ - io.grafeas.v1.SubjectOrBuilder getSubjectOrBuilder( - int index); - - /** - *
-   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-   * 
- * - * string predicate_type = 3; - * @return The predicateType. - */ - java.lang.String getPredicateType(); - /** - *
-   * `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
-   * 
- * - * string predicate_type = 3; - * @return The bytes for predicateType. - */ - com.google.protobuf.ByteString - getPredicateTypeBytes(); - - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - * @return Whether the provenance field is set. - */ - boolean hasProvenance(); - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - * @return The provenance. - */ - io.grafeas.v1.InTotoProvenance getProvenance(); - /** - * .grafeas.v1.InTotoProvenance provenance = 4; - */ - io.grafeas.v1.InTotoProvenanceOrBuilder getProvenanceOrBuilder(); - - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @return Whether the slsaProvenance field is set. - */ - boolean hasSlsaProvenance(); - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @return The slsaProvenance. - */ - io.grafeas.v1.SlsaProvenance getSlsaProvenance(); - /** - * .grafeas.v1.SlsaProvenance slsa_provenance = 5; - */ - io.grafeas.v1.SlsaProvenanceOrBuilder getSlsaProvenanceOrBuilder(); - - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @return Whether the slsaProvenanceZeroTwo field is set. - */ - boolean hasSlsaProvenanceZeroTwo(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @return The slsaProvenanceZeroTwo. - */ - io.grafeas.v1.SlsaProvenanceZeroTwo getSlsaProvenanceZeroTwo(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - */ - io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder getSlsaProvenanceZeroTwoOrBuilder(); - - public io.grafeas.v1.InTotoStatement.PredicateCase getPredicateCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java deleted file mode 100644 index 966c8d35ded8..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/InTotoStatementProto.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_statement.proto - -package io.grafeas.v1; - -public final class InTotoStatementProto { - private InTotoStatementProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_InTotoStatement_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Subject_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Subject_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Subject_DigestEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Subject_DigestEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n!grafeas/v1/intoto_statement.proto\022\ngra" + - "feas.v1\032\"grafeas/v1/intoto_provenance.pr" + - "oto\032 grafeas/v1/slsa_provenance.proto\032)g" + - "rafeas/v1/slsa_provenance_zero_two.proto" + - "\"\243\002\n\017InTotoStatement\022\023\n\004type\030\001 \001(\tR\005_typ" + - "e\022$\n\007subject\030\002 \003(\0132\023.grafeas.v1.Subject\022" + - "\026\n\016predicate_type\030\003 \001(\t\0222\n\nprovenance\030\004 " + - "\001(\0132\034.grafeas.v1.InTotoProvenanceH\000\0225\n\017s" + - "lsa_provenance\030\005 \001(\0132\032.grafeas.v1.SlsaPr" + - "ovenanceH\000\022E\n\030slsa_provenance_zero_two\030\006" + - " \001(\0132!.grafeas.v1.SlsaProvenanceZeroTwoH" + - "\000B\013\n\tpredicate\"w\n\007Subject\022\014\n\004name\030\001 \001(\t\022" + - "/\n\006digest\030\002 \003(\0132\037.grafeas.v1.Subject.Dig" + - "estEntry\032-\n\013DigestEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + - "value\030\002 \001(\t:\0028\001Bg\n\rio.grafeas.v1B\024InToto" + - "StatementProtoP\001Z8google.golang.org/genp" + - "roto/googleapis/grafeas/v1;grafeas\242\002\003GRA" + - "b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.grafeas.v1.InTotoProvenanceProto.getDescriptor(), - io.grafeas.v1.SlsaProvenanceProto.getDescriptor(), - io.grafeas.v1.SlsaProvenanceZeroTwoProto.getDescriptor(), - }); - internal_static_grafeas_v1_InTotoStatement_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_InTotoStatement_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_InTotoStatement_descriptor, - new java.lang.String[] { "Type", "Subject", "PredicateType", "Provenance", "SlsaProvenance", "SlsaProvenanceZeroTwo", "Predicate", }); - internal_static_grafeas_v1_Subject_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Subject_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Subject_descriptor, - new java.lang.String[] { "Name", "Digest", }); - internal_static_grafeas_v1_Subject_DigestEntry_descriptor = - internal_static_grafeas_v1_Subject_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_Subject_DigestEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Subject_DigestEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - io.grafeas.v1.InTotoProvenanceProto.getDescriptor(); - io.grafeas.v1.SlsaProvenanceProto.getDescriptor(); - io.grafeas.v1.SlsaProvenanceZeroTwoProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java deleted file mode 100644 index f0b0c75c7f9c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Jwt.java +++ /dev/null @@ -1,586 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/attestation.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.Jwt} - */ -public final class Jwt extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Jwt) - JwtOrBuilder { -private static final long serialVersionUID = 0L; - // Use Jwt.newBuilder() to construct. - private Jwt(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Jwt() { - compactJwt_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Jwt(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Jwt.class, io.grafeas.v1.Jwt.Builder.class); - } - - public static final int COMPACT_JWT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object compactJwt_ = ""; - /** - *
-   * The compact encoding of a JWS, which is always three base64 encoded strings
-   * joined by periods. For details, see:
-   * https://tools.ietf.org/html/rfc7515.html#section-3.1
-   * 
- * - * string compact_jwt = 1; - * @return The compactJwt. - */ - @java.lang.Override - public java.lang.String getCompactJwt() { - java.lang.Object ref = compactJwt_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - compactJwt_ = s; - return s; - } - } - /** - *
-   * The compact encoding of a JWS, which is always three base64 encoded strings
-   * joined by periods. For details, see:
-   * https://tools.ietf.org/html/rfc7515.html#section-3.1
-   * 
- * - * string compact_jwt = 1; - * @return The bytes for compactJwt. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCompactJwtBytes() { - java.lang.Object ref = compactJwt_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - compactJwt_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compactJwt_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, compactJwt_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compactJwt_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, compactJwt_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Jwt)) { - return super.equals(obj); - } - io.grafeas.v1.Jwt other = (io.grafeas.v1.Jwt) obj; - - if (!getCompactJwt() - .equals(other.getCompactJwt())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + COMPACT_JWT_FIELD_NUMBER; - hash = (53 * hash) + getCompactJwt().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Jwt parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Jwt parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Jwt parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Jwt parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Jwt parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Jwt parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Jwt parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Jwt parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Jwt parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Jwt parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Jwt parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Jwt parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Jwt prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.Jwt} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Jwt) - io.grafeas.v1.JwtOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Jwt.class, io.grafeas.v1.Jwt.Builder.class); - } - - // Construct using io.grafeas.v1.Jwt.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - compactJwt_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Attestation.internal_static_grafeas_v1_Jwt_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Jwt getDefaultInstanceForType() { - return io.grafeas.v1.Jwt.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Jwt build() { - io.grafeas.v1.Jwt result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Jwt buildPartial() { - io.grafeas.v1.Jwt result = new io.grafeas.v1.Jwt(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Jwt result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.compactJwt_ = compactJwt_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Jwt) { - return mergeFrom((io.grafeas.v1.Jwt)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Jwt other) { - if (other == io.grafeas.v1.Jwt.getDefaultInstance()) return this; - if (!other.getCompactJwt().isEmpty()) { - compactJwt_ = other.compactJwt_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - compactJwt_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object compactJwt_ = ""; - /** - *
-     * The compact encoding of a JWS, which is always three base64 encoded strings
-     * joined by periods. For details, see:
-     * https://tools.ietf.org/html/rfc7515.html#section-3.1
-     * 
- * - * string compact_jwt = 1; - * @return The compactJwt. - */ - public java.lang.String getCompactJwt() { - java.lang.Object ref = compactJwt_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - compactJwt_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The compact encoding of a JWS, which is always three base64 encoded strings
-     * joined by periods. For details, see:
-     * https://tools.ietf.org/html/rfc7515.html#section-3.1
-     * 
- * - * string compact_jwt = 1; - * @return The bytes for compactJwt. - */ - public com.google.protobuf.ByteString - getCompactJwtBytes() { - java.lang.Object ref = compactJwt_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - compactJwt_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The compact encoding of a JWS, which is always three base64 encoded strings
-     * joined by periods. For details, see:
-     * https://tools.ietf.org/html/rfc7515.html#section-3.1
-     * 
- * - * string compact_jwt = 1; - * @param value The compactJwt to set. - * @return This builder for chaining. - */ - public Builder setCompactJwt( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - compactJwt_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The compact encoding of a JWS, which is always three base64 encoded strings
-     * joined by periods. For details, see:
-     * https://tools.ietf.org/html/rfc7515.html#section-3.1
-     * 
- * - * string compact_jwt = 1; - * @return This builder for chaining. - */ - public Builder clearCompactJwt() { - compactJwt_ = getDefaultInstance().getCompactJwt(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The compact encoding of a JWS, which is always three base64 encoded strings
-     * joined by periods. For details, see:
-     * https://tools.ietf.org/html/rfc7515.html#section-3.1
-     * 
- * - * string compact_jwt = 1; - * @param value The bytes for compactJwt to set. - * @return This builder for chaining. - */ - public Builder setCompactJwtBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - compactJwt_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Jwt) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Jwt) - private static final io.grafeas.v1.Jwt DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Jwt(); - } - - public static io.grafeas.v1.Jwt getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Jwt parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Jwt getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java deleted file mode 100644 index b548750df7d9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/JwtOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/attestation.proto - -package io.grafeas.v1; - -public interface JwtOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Jwt) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The compact encoding of a JWS, which is always three base64 encoded strings
-   * joined by periods. For details, see:
-   * https://tools.ietf.org/html/rfc7515.html#section-3.1
-   * 
- * - * string compact_jwt = 1; - * @return The compactJwt. - */ - java.lang.String getCompactJwt(); - /** - *
-   * The compact encoding of a JWS, which is always three base64 encoded strings
-   * joined by periods. For details, see:
-   * https://tools.ietf.org/html/rfc7515.html#section-3.1
-   * 
- * - * string compact_jwt = 1; - * @return The bytes for compactJwt. - */ - com.google.protobuf.ByteString - getCompactJwtBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java deleted file mode 100644 index 7c69d4115d68..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Layer.java +++ /dev/null @@ -1,751 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -/** - *
- * Layer holds metadata specific to a layer of a Docker image.
- * 
- * - * Protobuf type {@code grafeas.v1.Layer} - */ -public final class Layer extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Layer) - LayerOrBuilder { -private static final long serialVersionUID = 0L; - // Use Layer.newBuilder() to construct. - private Layer(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Layer() { - directive_ = ""; - arguments_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Layer(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Layer.class, io.grafeas.v1.Layer.Builder.class); - } - - public static final int DIRECTIVE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object directive_ = ""; - /** - *
-   * Required. The recovered Dockerfile directive used to construct this layer.
-   * See https://docs.docker.com/engine/reference/builder/ for more information.
-   * 
- * - * string directive = 1; - * @return The directive. - */ - @java.lang.Override - public java.lang.String getDirective() { - java.lang.Object ref = directive_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - directive_ = s; - return s; - } - } - /** - *
-   * Required. The recovered Dockerfile directive used to construct this layer.
-   * See https://docs.docker.com/engine/reference/builder/ for more information.
-   * 
- * - * string directive = 1; - * @return The bytes for directive. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDirectiveBytes() { - java.lang.Object ref = directive_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - directive_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARGUMENTS_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object arguments_ = ""; - /** - *
-   * The recovered arguments to the Dockerfile directive.
-   * 
- * - * string arguments = 2; - * @return The arguments. - */ - @java.lang.Override - public java.lang.String getArguments() { - java.lang.Object ref = arguments_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - arguments_ = s; - return s; - } - } - /** - *
-   * The recovered arguments to the Dockerfile directive.
-   * 
- * - * string arguments = 2; - * @return The bytes for arguments. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getArgumentsBytes() { - java.lang.Object ref = arguments_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - arguments_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(directive_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, directive_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(arguments_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, arguments_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(directive_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, directive_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(arguments_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, arguments_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Layer)) { - return super.equals(obj); - } - io.grafeas.v1.Layer other = (io.grafeas.v1.Layer) obj; - - if (!getDirective() - .equals(other.getDirective())) return false; - if (!getArguments() - .equals(other.getArguments())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DIRECTIVE_FIELD_NUMBER; - hash = (53 * hash) + getDirective().hashCode(); - hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; - hash = (53 * hash) + getArguments().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Layer parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Layer parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Layer parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Layer parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Layer parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Layer parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Layer parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Layer parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Layer parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Layer parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Layer parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Layer parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Layer prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Layer holds metadata specific to a layer of a Docker image.
-   * 
- * - * Protobuf type {@code grafeas.v1.Layer} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Layer) - io.grafeas.v1.LayerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Layer.class, io.grafeas.v1.Layer.Builder.class); - } - - // Construct using io.grafeas.v1.Layer.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - directive_ = ""; - arguments_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Image.internal_static_grafeas_v1_Layer_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Layer getDefaultInstanceForType() { - return io.grafeas.v1.Layer.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Layer build() { - io.grafeas.v1.Layer result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Layer buildPartial() { - io.grafeas.v1.Layer result = new io.grafeas.v1.Layer(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Layer result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.directive_ = directive_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.arguments_ = arguments_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Layer) { - return mergeFrom((io.grafeas.v1.Layer)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Layer other) { - if (other == io.grafeas.v1.Layer.getDefaultInstance()) return this; - if (!other.getDirective().isEmpty()) { - directive_ = other.directive_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getArguments().isEmpty()) { - arguments_ = other.arguments_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - directive_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - arguments_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object directive_ = ""; - /** - *
-     * Required. The recovered Dockerfile directive used to construct this layer.
-     * See https://docs.docker.com/engine/reference/builder/ for more information.
-     * 
- * - * string directive = 1; - * @return The directive. - */ - public java.lang.String getDirective() { - java.lang.Object ref = directive_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - directive_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The recovered Dockerfile directive used to construct this layer.
-     * See https://docs.docker.com/engine/reference/builder/ for more information.
-     * 
- * - * string directive = 1; - * @return The bytes for directive. - */ - public com.google.protobuf.ByteString - getDirectiveBytes() { - java.lang.Object ref = directive_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - directive_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The recovered Dockerfile directive used to construct this layer.
-     * See https://docs.docker.com/engine/reference/builder/ for more information.
-     * 
- * - * string directive = 1; - * @param value The directive to set. - * @return This builder for chaining. - */ - public Builder setDirective( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - directive_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required. The recovered Dockerfile directive used to construct this layer.
-     * See https://docs.docker.com/engine/reference/builder/ for more information.
-     * 
- * - * string directive = 1; - * @return This builder for chaining. - */ - public Builder clearDirective() { - directive_ = getDefaultInstance().getDirective(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. The recovered Dockerfile directive used to construct this layer.
-     * See https://docs.docker.com/engine/reference/builder/ for more information.
-     * 
- * - * string directive = 1; - * @param value The bytes for directive to set. - * @return This builder for chaining. - */ - public Builder setDirectiveBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - directive_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object arguments_ = ""; - /** - *
-     * The recovered arguments to the Dockerfile directive.
-     * 
- * - * string arguments = 2; - * @return The arguments. - */ - public java.lang.String getArguments() { - java.lang.Object ref = arguments_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - arguments_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The recovered arguments to the Dockerfile directive.
-     * 
- * - * string arguments = 2; - * @return The bytes for arguments. - */ - public com.google.protobuf.ByteString - getArgumentsBytes() { - java.lang.Object ref = arguments_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - arguments_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The recovered arguments to the Dockerfile directive.
-     * 
- * - * string arguments = 2; - * @param value The arguments to set. - * @return This builder for chaining. - */ - public Builder setArguments( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - arguments_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The recovered arguments to the Dockerfile directive.
-     * 
- * - * string arguments = 2; - * @return This builder for chaining. - */ - public Builder clearArguments() { - arguments_ = getDefaultInstance().getArguments(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The recovered arguments to the Dockerfile directive.
-     * 
- * - * string arguments = 2; - * @param value The bytes for arguments to set. - * @return This builder for chaining. - */ - public Builder setArgumentsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - arguments_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Layer) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Layer) - private static final io.grafeas.v1.Layer DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Layer(); - } - - public static io.grafeas.v1.Layer getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Layer parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Layer getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java deleted file mode 100644 index 57a86a319e96..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LayerOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/image.proto - -package io.grafeas.v1; - -public interface LayerOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Layer) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The recovered Dockerfile directive used to construct this layer.
-   * See https://docs.docker.com/engine/reference/builder/ for more information.
-   * 
- * - * string directive = 1; - * @return The directive. - */ - java.lang.String getDirective(); - /** - *
-   * Required. The recovered Dockerfile directive used to construct this layer.
-   * See https://docs.docker.com/engine/reference/builder/ for more information.
-   * 
- * - * string directive = 1; - * @return The bytes for directive. - */ - com.google.protobuf.ByteString - getDirectiveBytes(); - - /** - *
-   * The recovered arguments to the Dockerfile directive.
-   * 
- * - * string arguments = 2; - * @return The arguments. - */ - java.lang.String getArguments(); - /** - *
-   * The recovered arguments to the Dockerfile directive.
-   * 
- * - * string arguments = 2; - * @return The bytes for arguments. - */ - com.google.protobuf.ByteString - getArgumentsBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java deleted file mode 100644 index 376885d90c5f..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/License.java +++ /dev/null @@ -1,772 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - *
- * License information.
- * 
- * - * Protobuf type {@code grafeas.v1.License} - */ -public final class License extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.License) - LicenseOrBuilder { -private static final long serialVersionUID = 0L; - // Use License.newBuilder() to construct. - private License(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private License() { - expression_ = ""; - comments_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new License(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_License_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_License_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.License.class, io.grafeas.v1.License.Builder.class); - } - - public static final int EXPRESSION_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object expression_ = ""; - /** - *
-   * Often a single license can be used to represent the licensing terms.
-   * Sometimes it is necessary to include a choice of one or more licenses
-   * or some combination of license identifiers.
-   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-   * "GPL-2.0-or-later WITH Bison-exception-2.2".
-   * 
- * - * string expression = 1; - * @return The expression. - */ - @java.lang.Override - public java.lang.String getExpression() { - java.lang.Object ref = expression_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - expression_ = s; - return s; - } - } - /** - *
-   * Often a single license can be used to represent the licensing terms.
-   * Sometimes it is necessary to include a choice of one or more licenses
-   * or some combination of license identifiers.
-   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-   * "GPL-2.0-or-later WITH Bison-exception-2.2".
-   * 
- * - * string expression = 1; - * @return The bytes for expression. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getExpressionBytes() { - java.lang.Object ref = expression_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - expression_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int COMMENTS_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object comments_ = ""; - /** - *
-   * Comments
-   * 
- * - * string comments = 2; - * @return The comments. - */ - @java.lang.Override - public java.lang.String getComments() { - java.lang.Object ref = comments_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - comments_ = s; - return s; - } - } - /** - *
-   * Comments
-   * 
- * - * string comments = 2; - * @return The bytes for comments. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCommentsBytes() { - java.lang.Object ref = comments_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - comments_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expression_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, expression_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comments_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, comments_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expression_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, expression_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comments_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, comments_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.License)) { - return super.equals(obj); - } - io.grafeas.v1.License other = (io.grafeas.v1.License) obj; - - if (!getExpression() - .equals(other.getExpression())) return false; - if (!getComments() - .equals(other.getComments())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + EXPRESSION_FIELD_NUMBER; - hash = (53 * hash) + getExpression().hashCode(); - hash = (37 * hash) + COMMENTS_FIELD_NUMBER; - hash = (53 * hash) + getComments().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.License parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.License parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.License parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.License parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.License parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.License parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.License parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.License parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.License parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.License parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.License parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.License parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.License prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * License information.
-   * 
- * - * Protobuf type {@code grafeas.v1.License} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.License) - io.grafeas.v1.LicenseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_License_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_License_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.License.class, io.grafeas.v1.License.Builder.class); - } - - // Construct using io.grafeas.v1.License.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - expression_ = ""; - comments_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_License_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.License getDefaultInstanceForType() { - return io.grafeas.v1.License.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.License build() { - io.grafeas.v1.License result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.License buildPartial() { - io.grafeas.v1.License result = new io.grafeas.v1.License(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.License result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.expression_ = expression_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.comments_ = comments_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.License) { - return mergeFrom((io.grafeas.v1.License)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.License other) { - if (other == io.grafeas.v1.License.getDefaultInstance()) return this; - if (!other.getExpression().isEmpty()) { - expression_ = other.expression_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getComments().isEmpty()) { - comments_ = other.comments_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - expression_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - comments_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object expression_ = ""; - /** - *
-     * Often a single license can be used to represent the licensing terms.
-     * Sometimes it is necessary to include a choice of one or more licenses
-     * or some combination of license identifiers.
-     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-     * "GPL-2.0-or-later WITH Bison-exception-2.2".
-     * 
- * - * string expression = 1; - * @return The expression. - */ - public java.lang.String getExpression() { - java.lang.Object ref = expression_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - expression_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Often a single license can be used to represent the licensing terms.
-     * Sometimes it is necessary to include a choice of one or more licenses
-     * or some combination of license identifiers.
-     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-     * "GPL-2.0-or-later WITH Bison-exception-2.2".
-     * 
- * - * string expression = 1; - * @return The bytes for expression. - */ - public com.google.protobuf.ByteString - getExpressionBytes() { - java.lang.Object ref = expression_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - expression_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Often a single license can be used to represent the licensing terms.
-     * Sometimes it is necessary to include a choice of one or more licenses
-     * or some combination of license identifiers.
-     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-     * "GPL-2.0-or-later WITH Bison-exception-2.2".
-     * 
- * - * string expression = 1; - * @param value The expression to set. - * @return This builder for chaining. - */ - public Builder setExpression( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - expression_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Often a single license can be used to represent the licensing terms.
-     * Sometimes it is necessary to include a choice of one or more licenses
-     * or some combination of license identifiers.
-     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-     * "GPL-2.0-or-later WITH Bison-exception-2.2".
-     * 
- * - * string expression = 1; - * @return This builder for chaining. - */ - public Builder clearExpression() { - expression_ = getDefaultInstance().getExpression(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Often a single license can be used to represent the licensing terms.
-     * Sometimes it is necessary to include a choice of one or more licenses
-     * or some combination of license identifiers.
-     * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-     * "GPL-2.0-or-later WITH Bison-exception-2.2".
-     * 
- * - * string expression = 1; - * @param value The bytes for expression to set. - * @return This builder for chaining. - */ - public Builder setExpressionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - expression_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object comments_ = ""; - /** - *
-     * Comments
-     * 
- * - * string comments = 2; - * @return The comments. - */ - public java.lang.String getComments() { - java.lang.Object ref = comments_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - comments_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Comments
-     * 
- * - * string comments = 2; - * @return The bytes for comments. - */ - public com.google.protobuf.ByteString - getCommentsBytes() { - java.lang.Object ref = comments_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - comments_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Comments
-     * 
- * - * string comments = 2; - * @param value The comments to set. - * @return This builder for chaining. - */ - public Builder setComments( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - comments_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Comments
-     * 
- * - * string comments = 2; - * @return This builder for chaining. - */ - public Builder clearComments() { - comments_ = getDefaultInstance().getComments(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Comments
-     * 
- * - * string comments = 2; - * @param value The bytes for comments to set. - * @return This builder for chaining. - */ - public Builder setCommentsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - comments_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.License) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.License) - private static final io.grafeas.v1.License DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.License(); - } - - public static io.grafeas.v1.License getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public License parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.License getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java deleted file mode 100644 index 0fa178dd2864..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LicenseOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public interface LicenseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.License) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Often a single license can be used to represent the licensing terms.
-   * Sometimes it is necessary to include a choice of one or more licenses
-   * or some combination of license identifiers.
-   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-   * "GPL-2.0-or-later WITH Bison-exception-2.2".
-   * 
- * - * string expression = 1; - * @return The expression. - */ - java.lang.String getExpression(); - /** - *
-   * Often a single license can be used to represent the licensing terms.
-   * Sometimes it is necessary to include a choice of one or more licenses
-   * or some combination of license identifiers.
-   * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
-   * "GPL-2.0-or-later WITH Bison-exception-2.2".
-   * 
- * - * string expression = 1; - * @return The bytes for expression. - */ - com.google.protobuf.ByteString - getExpressionBytes(); - - /** - *
-   * Comments
-   * 
- * - * string comments = 2; - * @return The comments. - */ - java.lang.String getComments(); - /** - *
-   * Comments
-   * 
- * - * string comments = 2; - * @return The bytes for comments. - */ - com.google.protobuf.ByteString - getCommentsBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java deleted file mode 100644 index f10788f12a0a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java +++ /dev/null @@ -1,997 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to list occurrences for a note.
- * 
- * - * Protobuf type {@code grafeas.v1.ListNoteOccurrencesRequest} - */ -public final class ListNoteOccurrencesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ListNoteOccurrencesRequest) - ListNoteOccurrencesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListNoteOccurrencesRequest.newBuilder() to construct. - private ListNoteOccurrencesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListNoteOccurrencesRequest() { - name_ = ""; - filter_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListNoteOccurrencesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNoteOccurrencesRequest.class, io.grafeas.v1.ListNoteOccurrencesRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the note to list occurrences for in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the note to list occurrences for in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 3; - private int pageSize_ = 0; - /** - *
-   * Number of occurrences to return in the list.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); - } - if (pageSize_ != 0) { - output.writeInt32(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ListNoteOccurrencesRequest)) { - return super.equals(obj); - } - io.grafeas.v1.ListNoteOccurrencesRequest other = (io.grafeas.v1.ListNoteOccurrencesRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNoteOccurrencesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ListNoteOccurrencesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to list occurrences for a note.
-   * 
- * - * Protobuf type {@code grafeas.v1.ListNoteOccurrencesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNoteOccurrencesRequest) - io.grafeas.v1.ListNoteOccurrencesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNoteOccurrencesRequest.class, io.grafeas.v1.ListNoteOccurrencesRequest.Builder.class); - } - - // Construct using io.grafeas.v1.ListNoteOccurrencesRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - filter_ = ""; - pageSize_ = 0; - pageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesRequest getDefaultInstanceForType() { - return io.grafeas.v1.ListNoteOccurrencesRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesRequest build() { - io.grafeas.v1.ListNoteOccurrencesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesRequest buildPartial() { - io.grafeas.v1.ListNoteOccurrencesRequest result = new io.grafeas.v1.ListNoteOccurrencesRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.ListNoteOccurrencesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.pageToken_ = pageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ListNoteOccurrencesRequest) { - return mergeFrom((io.grafeas.v1.ListNoteOccurrencesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ListNoteOccurrencesRequest other) { - if (other == io.grafeas.v1.ListNoteOccurrencesRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the note to list occurrences for in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the note to list occurrences for in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the note to list occurrences for in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the note to list occurrences for in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the note to list occurrences for in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - filter_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Number of occurrences to return in the list.
-     * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Number of occurrences to return in the list.
-     * 
- * - * int32 page_size = 3; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Number of occurrences to return in the list.
-     * 
- * - * int32 page_size = 3; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000004); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - pageToken_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNoteOccurrencesRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ListNoteOccurrencesRequest) - private static final io.grafeas.v1.ListNoteOccurrencesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ListNoteOccurrencesRequest(); - } - - public static io.grafeas.v1.ListNoteOccurrencesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNoteOccurrencesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java deleted file mode 100644 index 170d72ff8fcc..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java +++ /dev/null @@ -1,81 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface ListNoteOccurrencesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNoteOccurrencesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the note to list occurrences for in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the note to list occurrences for in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); - - /** - *
-   * Number of occurrences to return in the list.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java deleted file mode 100644 index 8b768f9bac8a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java +++ /dev/null @@ -1,1026 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Response for listing occurrences for a note.
- * 
- * - * Protobuf type {@code grafeas.v1.ListNoteOccurrencesResponse} - */ -public final class ListNoteOccurrencesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ListNoteOccurrencesResponse) - ListNoteOccurrencesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListNoteOccurrencesResponse.newBuilder() to construct. - private ListNoteOccurrencesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListNoteOccurrencesResponse() { - occurrences_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListNoteOccurrencesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNoteOccurrencesResponse.class, io.grafeas.v1.ListNoteOccurrencesResponse.Builder.class); - } - - public static final int OCCURRENCES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List occurrences_; - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public java.util.List getOccurrencesList() { - return occurrences_; - } - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public java.util.List - getOccurrencesOrBuilderList() { - return occurrences_; - } - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public int getOccurrencesCount() { - return occurrences_.size(); - } - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public io.grafeas.v1.Occurrence getOccurrences(int index) { - return occurrences_.get(index); - } - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - return occurrences_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < occurrences_.size(); i++) { - output.writeMessage(1, occurrences_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < occurrences_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, occurrences_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ListNoteOccurrencesResponse)) { - return super.equals(obj); - } - io.grafeas.v1.ListNoteOccurrencesResponse other = (io.grafeas.v1.ListNoteOccurrencesResponse) obj; - - if (!getOccurrencesList() - .equals(other.getOccurrencesList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getOccurrencesCount() > 0) { - hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; - hash = (53 * hash) + getOccurrencesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNoteOccurrencesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ListNoteOccurrencesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response for listing occurrences for a note.
-   * 
- * - * Protobuf type {@code grafeas.v1.ListNoteOccurrencesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNoteOccurrencesResponse) - io.grafeas.v1.ListNoteOccurrencesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNoteOccurrencesResponse.class, io.grafeas.v1.ListNoteOccurrencesResponse.Builder.class); - } - - // Construct using io.grafeas.v1.ListNoteOccurrencesResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - } else { - occurrences_ = null; - occurrencesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNoteOccurrencesResponse_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesResponse getDefaultInstanceForType() { - return io.grafeas.v1.ListNoteOccurrencesResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesResponse build() { - io.grafeas.v1.ListNoteOccurrencesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesResponse buildPartial() { - io.grafeas.v1.ListNoteOccurrencesResponse result = new io.grafeas.v1.ListNoteOccurrencesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.ListNoteOccurrencesResponse result) { - if (occurrencesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - occurrences_ = java.util.Collections.unmodifiableList(occurrences_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.occurrences_ = occurrences_; - } else { - result.occurrences_ = occurrencesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.ListNoteOccurrencesResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ListNoteOccurrencesResponse) { - return mergeFrom((io.grafeas.v1.ListNoteOccurrencesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ListNoteOccurrencesResponse other) { - if (other == io.grafeas.v1.ListNoteOccurrencesResponse.getDefaultInstance()) return this; - if (occurrencesBuilder_ == null) { - if (!other.occurrences_.isEmpty()) { - if (occurrences_.isEmpty()) { - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOccurrencesIsMutable(); - occurrences_.addAll(other.occurrences_); - } - onChanged(); - } - } else { - if (!other.occurrences_.isEmpty()) { - if (occurrencesBuilder_.isEmpty()) { - occurrencesBuilder_.dispose(); - occurrencesBuilder_ = null; - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000001); - occurrencesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getOccurrencesFieldBuilder() : null; - } else { - occurrencesBuilder_.addAllMessages(other.occurrences_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.grafeas.v1.Occurrence m = - input.readMessage( - io.grafeas.v1.Occurrence.parser(), - extensionRegistry); - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(m); - } else { - occurrencesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List occurrences_ = - java.util.Collections.emptyList(); - private void ensureOccurrencesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - occurrences_ = new java.util.ArrayList(occurrences_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; - - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List getOccurrencesList() { - if (occurrencesBuilder_ == null) { - return java.util.Collections.unmodifiableList(occurrences_); - } else { - return occurrencesBuilder_.getMessageList(); - } - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public int getOccurrencesCount() { - if (occurrencesBuilder_ == null) { - return occurrences_.size(); - } else { - return occurrencesBuilder_.getCount(); - } - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence getOccurrences(int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); - } else { - return occurrencesBuilder_.getMessage(index); - } - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.set(index, value); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.set(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences(io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(index, value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addAllOccurrences( - java.lang.Iterable values) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, occurrences_); - onChanged(); - } else { - occurrencesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder clearOccurrences() { - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - occurrencesBuilder_.clear(); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder removeOccurrences(int index) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.remove(index); - onChanged(); - } else { - occurrencesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().getBuilder(index); - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); } else { - return occurrencesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List - getOccurrencesOrBuilderList() { - if (occurrencesBuilder_ != null) { - return occurrencesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(occurrences_); - } - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { - return getOccurrencesFieldBuilder().addBuilder( - io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().addBuilder( - index, io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences attached to the specified note.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List - getOccurrencesBuilderList() { - return getOccurrencesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> - getOccurrencesFieldBuilder() { - if (occurrencesBuilder_ == null) { - occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( - occurrences_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - occurrences_ = null; - } - return occurrencesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNoteOccurrencesResponse) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ListNoteOccurrencesResponse) - private static final io.grafeas.v1.ListNoteOccurrencesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ListNoteOccurrencesResponse(); - } - - public static io.grafeas.v1.ListNoteOccurrencesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNoteOccurrencesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ListNoteOccurrencesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java deleted file mode 100644 index f3ad30711d2d..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java +++ /dev/null @@ -1,73 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface ListNoteOccurrencesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNoteOccurrencesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - java.util.List - getOccurrencesList(); - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - io.grafeas.v1.Occurrence getOccurrences(int index); - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - int getOccurrencesCount(); - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - java.util.List - getOccurrencesOrBuilderList(); - /** - *
-   * The occurrences attached to the specified note.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index); - - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java deleted file mode 100644 index 5a5f75cc706b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequest.java +++ /dev/null @@ -1,1001 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to list notes.
- * 
- * - * Protobuf type {@code grafeas.v1.ListNotesRequest} - */ -public final class ListNotesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ListNotesRequest) - ListNotesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListNotesRequest.newBuilder() to construct. - private ListNotesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListNotesRequest() { - parent_ = ""; - filter_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListNotesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNotesRequest.class, io.grafeas.v1.ListNotesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - *
-   * The name of the project to list notes for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The name of the project to list notes for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 3; - private int pageSize_ = 0; - /** - *
-   * Number of notes to return in the list. Must be positive. Max allowed page
-   * size is 1000. If not specified, page size defaults to 20.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); - } - if (pageSize_ != 0) { - output.writeInt32(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ListNotesRequest)) { - return super.equals(obj); - } - io.grafeas.v1.ListNotesRequest other = (io.grafeas.v1.ListNotesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ListNotesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNotesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNotesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNotesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNotesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNotesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNotesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNotesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNotesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNotesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNotesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNotesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ListNotesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to list notes.
-   * 
- * - * Protobuf type {@code grafeas.v1.ListNotesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNotesRequest) - io.grafeas.v1.ListNotesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNotesRequest.class, io.grafeas.v1.ListNotesRequest.Builder.class); - } - - // Construct using io.grafeas.v1.ListNotesRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - filter_ = ""; - pageSize_ = 0; - pageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ListNotesRequest getDefaultInstanceForType() { - return io.grafeas.v1.ListNotesRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ListNotesRequest build() { - io.grafeas.v1.ListNotesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ListNotesRequest buildPartial() { - io.grafeas.v1.ListNotesRequest result = new io.grafeas.v1.ListNotesRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.ListNotesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.pageToken_ = pageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ListNotesRequest) { - return mergeFrom((io.grafeas.v1.ListNotesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ListNotesRequest other) { - if (other == io.grafeas.v1.ListNotesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * The name of the project to list notes for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the project to list notes for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the project to list notes for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the project to list notes for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the project to list notes for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - filter_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Number of notes to return in the list. Must be positive. Max allowed page
-     * size is 1000. If not specified, page size defaults to 20.
-     * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Number of notes to return in the list. Must be positive. Max allowed page
-     * size is 1000. If not specified, page size defaults to 20.
-     * 
- * - * int32 page_size = 3; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Number of notes to return in the list. Must be positive. Max allowed page
-     * size is 1000. If not specified, page size defaults to 20.
-     * 
- * - * int32 page_size = 3; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000004); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - pageToken_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNotesRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ListNotesRequest) - private static final io.grafeas.v1.ListNotesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ListNotesRequest(); - } - - public static io.grafeas.v1.ListNotesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNotesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ListNotesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java deleted file mode 100644 index eaebab9dbf1b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface ListNotesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNotesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the project to list notes for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The name of the project to list notes for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); - - /** - *
-   * Number of notes to return in the list. Must be positive. Max allowed page
-   * size is 1000. If not specified, page size defaults to 20.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java deleted file mode 100644 index 47debbe86abd..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponse.java +++ /dev/null @@ -1,1040 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Response for listing notes.
- * 
- * - * Protobuf type {@code grafeas.v1.ListNotesResponse} - */ -public final class ListNotesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ListNotesResponse) - ListNotesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListNotesResponse.newBuilder() to construct. - private ListNotesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListNotesResponse() { - notes_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListNotesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNotesResponse.class, io.grafeas.v1.ListNotesResponse.Builder.class); - } - - public static final int NOTES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List notes_; - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public java.util.List getNotesList() { - return notes_; - } - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public java.util.List - getNotesOrBuilderList() { - return notes_; - } - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public int getNotesCount() { - return notes_.size(); - } - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public io.grafeas.v1.Note getNotes(int index) { - return notes_.get(index); - } - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - @java.lang.Override - public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( - int index) { - return notes_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < notes_.size(); i++) { - output.writeMessage(1, notes_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < notes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, notes_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ListNotesResponse)) { - return super.equals(obj); - } - io.grafeas.v1.ListNotesResponse other = (io.grafeas.v1.ListNotesResponse) obj; - - if (!getNotesList() - .equals(other.getNotesList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getNotesCount() > 0) { - hash = (37 * hash) + NOTES_FIELD_NUMBER; - hash = (53 * hash) + getNotesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ListNotesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNotesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNotesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNotesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNotesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListNotesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListNotesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNotesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNotesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNotesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListNotesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListNotesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ListNotesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response for listing notes.
-   * 
- * - * Protobuf type {@code grafeas.v1.ListNotesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ListNotesResponse) - io.grafeas.v1.ListNotesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListNotesResponse.class, io.grafeas.v1.ListNotesResponse.Builder.class); - } - - // Construct using io.grafeas.v1.ListNotesResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (notesBuilder_ == null) { - notes_ = java.util.Collections.emptyList(); - } else { - notes_ = null; - notesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListNotesResponse_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ListNotesResponse getDefaultInstanceForType() { - return io.grafeas.v1.ListNotesResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ListNotesResponse build() { - io.grafeas.v1.ListNotesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ListNotesResponse buildPartial() { - io.grafeas.v1.ListNotesResponse result = new io.grafeas.v1.ListNotesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.ListNotesResponse result) { - if (notesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - notes_ = java.util.Collections.unmodifiableList(notes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.notes_ = notes_; - } else { - result.notes_ = notesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.ListNotesResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ListNotesResponse) { - return mergeFrom((io.grafeas.v1.ListNotesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ListNotesResponse other) { - if (other == io.grafeas.v1.ListNotesResponse.getDefaultInstance()) return this; - if (notesBuilder_ == null) { - if (!other.notes_.isEmpty()) { - if (notes_.isEmpty()) { - notes_ = other.notes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNotesIsMutable(); - notes_.addAll(other.notes_); - } - onChanged(); - } - } else { - if (!other.notes_.isEmpty()) { - if (notesBuilder_.isEmpty()) { - notesBuilder_.dispose(); - notesBuilder_ = null; - notes_ = other.notes_; - bitField0_ = (bitField0_ & ~0x00000001); - notesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNotesFieldBuilder() : null; - } else { - notesBuilder_.addAllMessages(other.notes_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.grafeas.v1.Note m = - input.readMessage( - io.grafeas.v1.Note.parser(), - extensionRegistry); - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.add(m); - } else { - notesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List notes_ = - java.util.Collections.emptyList(); - private void ensureNotesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - notes_ = new java.util.ArrayList(notes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> notesBuilder_; - - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public java.util.List getNotesList() { - if (notesBuilder_ == null) { - return java.util.Collections.unmodifiableList(notes_); - } else { - return notesBuilder_.getMessageList(); - } - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public int getNotesCount() { - if (notesBuilder_ == null) { - return notes_.size(); - } else { - return notesBuilder_.getCount(); - } - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note getNotes(int index) { - if (notesBuilder_ == null) { - return notes_.get(index); - } else { - return notesBuilder_.getMessage(index); - } - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder setNotes( - int index, io.grafeas.v1.Note value) { - if (notesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotesIsMutable(); - notes_.set(index, value); - onChanged(); - } else { - notesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder setNotes( - int index, io.grafeas.v1.Note.Builder builderForValue) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.set(index, builderForValue.build()); - onChanged(); - } else { - notesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes(io.grafeas.v1.Note value) { - if (notesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotesIsMutable(); - notes_.add(value); - onChanged(); - } else { - notesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes( - int index, io.grafeas.v1.Note value) { - if (notesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotesIsMutable(); - notes_.add(index, value); - onChanged(); - } else { - notesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes( - io.grafeas.v1.Note.Builder builderForValue) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.add(builderForValue.build()); - onChanged(); - } else { - notesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addNotes( - int index, io.grafeas.v1.Note.Builder builderForValue) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.add(index, builderForValue.build()); - onChanged(); - } else { - notesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder addAllNotes( - java.lang.Iterable values) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notes_); - onChanged(); - } else { - notesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder clearNotes() { - if (notesBuilder_ == null) { - notes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - notesBuilder_.clear(); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public Builder removeNotes(int index) { - if (notesBuilder_ == null) { - ensureNotesIsMutable(); - notes_.remove(index); - onChanged(); - } else { - notesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note.Builder getNotesBuilder( - int index) { - return getNotesFieldBuilder().getBuilder(index); - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( - int index) { - if (notesBuilder_ == null) { - return notes_.get(index); } else { - return notesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public java.util.List - getNotesOrBuilderList() { - if (notesBuilder_ != null) { - return notesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(notes_); - } - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note.Builder addNotesBuilder() { - return getNotesFieldBuilder().addBuilder( - io.grafeas.v1.Note.getDefaultInstance()); - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public io.grafeas.v1.Note.Builder addNotesBuilder( - int index) { - return getNotesFieldBuilder().addBuilder( - index, io.grafeas.v1.Note.getDefaultInstance()); - } - /** - *
-     * The notes requested.
-     * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - public java.util.List - getNotesBuilderList() { - return getNotesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> - getNotesFieldBuilder() { - if (notesBuilder_ == null) { - notesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( - notes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - notes_ = null; - } - return notesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ListNotesResponse) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ListNotesResponse) - private static final io.grafeas.v1.ListNotesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ListNotesResponse(); - } - - public static io.grafeas.v1.ListNotesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNotesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ListNotesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java deleted file mode 100644 index 41ae132266e5..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface ListNotesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ListNotesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - java.util.List - getNotesList(); - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - io.grafeas.v1.Note getNotes(int index); - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - int getNotesCount(); - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - java.util.List - getNotesOrBuilderList(); - /** - *
-   * The notes requested.
-   * 
- * - * repeated .grafeas.v1.Note notes = 1; - */ - io.grafeas.v1.NoteOrBuilder getNotesOrBuilder( - int index); - - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java deleted file mode 100644 index ca66bb189c1e..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java +++ /dev/null @@ -1,1001 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to list occurrences.
- * 
- * - * Protobuf type {@code grafeas.v1.ListOccurrencesRequest} - */ -public final class ListOccurrencesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ListOccurrencesRequest) - ListOccurrencesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListOccurrencesRequest.newBuilder() to construct. - private ListOccurrencesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListOccurrencesRequest() { - parent_ = ""; - filter_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListOccurrencesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListOccurrencesRequest.class, io.grafeas.v1.ListOccurrencesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - *
-   * The name of the project to list occurrences for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The name of the project to list occurrences for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 3; - private int pageSize_ = 0; - /** - *
-   * Number of occurrences to return in the list. Must be positive. Max allowed
-   * page size is 1000. If not specified, page size defaults to 20.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); - } - if (pageSize_ != 0) { - output.writeInt32(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ListOccurrencesRequest)) { - return super.equals(obj); - } - io.grafeas.v1.ListOccurrencesRequest other = (io.grafeas.v1.ListOccurrencesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListOccurrencesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListOccurrencesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ListOccurrencesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to list occurrences.
-   * 
- * - * Protobuf type {@code grafeas.v1.ListOccurrencesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ListOccurrencesRequest) - io.grafeas.v1.ListOccurrencesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListOccurrencesRequest.class, io.grafeas.v1.ListOccurrencesRequest.Builder.class); - } - - // Construct using io.grafeas.v1.ListOccurrencesRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - filter_ = ""; - pageSize_ = 0; - pageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesRequest getDefaultInstanceForType() { - return io.grafeas.v1.ListOccurrencesRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesRequest build() { - io.grafeas.v1.ListOccurrencesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesRequest buildPartial() { - io.grafeas.v1.ListOccurrencesRequest result = new io.grafeas.v1.ListOccurrencesRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.ListOccurrencesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.pageToken_ = pageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ListOccurrencesRequest) { - return mergeFrom((io.grafeas.v1.ListOccurrencesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ListOccurrencesRequest other) { - if (other == io.grafeas.v1.ListOccurrencesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * The name of the project to list occurrences for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the project to list occurrences for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the project to list occurrences for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the project to list occurrences for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the project to list occurrences for in the form of
-     * `projects/[PROJECT_ID]`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - filter_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The filter expression.
-     * 
- * - * string filter = 2; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Number of occurrences to return in the list. Must be positive. Max allowed
-     * page size is 1000. If not specified, page size defaults to 20.
-     * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Number of occurrences to return in the list. Must be positive. Max allowed
-     * page size is 1000. If not specified, page size defaults to 20.
-     * 
- * - * int32 page_size = 3; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Number of occurrences to return in the list. Must be positive. Max allowed
-     * page size is 1000. If not specified, page size defaults to 20.
-     * 
- * - * int32 page_size = 3; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000004); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - pageToken_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * Token to provide to skip to a particular spot in the list.
-     * 
- * - * string page_token = 4; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ListOccurrencesRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ListOccurrencesRequest) - private static final io.grafeas.v1.ListOccurrencesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ListOccurrencesRequest(); - } - - public static io.grafeas.v1.ListOccurrencesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListOccurrencesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java deleted file mode 100644 index 057e3b26a4d7..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface ListOccurrencesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ListOccurrencesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the project to list occurrences for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The name of the project to list occurrences for in the form of
-   * `projects/[PROJECT_ID]`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * The filter expression.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); - - /** - *
-   * Number of occurrences to return in the list. Must be positive. Max allowed
-   * page size is 1000. If not specified, page size defaults to 20.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Token to provide to skip to a particular spot in the list.
-   * 
- * - * string page_token = 4; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java deleted file mode 100644 index 2a69a922f24e..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponse.java +++ /dev/null @@ -1,1040 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Response for listing occurrences.
- * 
- * - * Protobuf type {@code grafeas.v1.ListOccurrencesResponse} - */ -public final class ListOccurrencesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ListOccurrencesResponse) - ListOccurrencesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListOccurrencesResponse.newBuilder() to construct. - private ListOccurrencesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListOccurrencesResponse() { - occurrences_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListOccurrencesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListOccurrencesResponse.class, io.grafeas.v1.ListOccurrencesResponse.Builder.class); - } - - public static final int OCCURRENCES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List occurrences_; - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public java.util.List getOccurrencesList() { - return occurrences_; - } - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public java.util.List - getOccurrencesOrBuilderList() { - return occurrences_; - } - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public int getOccurrencesCount() { - return occurrences_.size(); - } - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public io.grafeas.v1.Occurrence getOccurrences(int index) { - return occurrences_.get(index); - } - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - @java.lang.Override - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - return occurrences_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < occurrences_.size(); i++) { - output.writeMessage(1, occurrences_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < occurrences_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, occurrences_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ListOccurrencesResponse)) { - return super.equals(obj); - } - io.grafeas.v1.ListOccurrencesResponse other = (io.grafeas.v1.ListOccurrencesResponse) obj; - - if (!getOccurrencesList() - .equals(other.getOccurrencesList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getOccurrencesCount() > 0) { - hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; - hash = (53 * hash) + getOccurrencesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListOccurrencesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ListOccurrencesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ListOccurrencesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response for listing occurrences.
-   * 
- * - * Protobuf type {@code grafeas.v1.ListOccurrencesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ListOccurrencesResponse) - io.grafeas.v1.ListOccurrencesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ListOccurrencesResponse.class, io.grafeas.v1.ListOccurrencesResponse.Builder.class); - } - - // Construct using io.grafeas.v1.ListOccurrencesResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - } else { - occurrences_ = null; - occurrencesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_ListOccurrencesResponse_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesResponse getDefaultInstanceForType() { - return io.grafeas.v1.ListOccurrencesResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesResponse build() { - io.grafeas.v1.ListOccurrencesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesResponse buildPartial() { - io.grafeas.v1.ListOccurrencesResponse result = new io.grafeas.v1.ListOccurrencesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.ListOccurrencesResponse result) { - if (occurrencesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - occurrences_ = java.util.Collections.unmodifiableList(occurrences_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.occurrences_ = occurrences_; - } else { - result.occurrences_ = occurrencesBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.ListOccurrencesResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ListOccurrencesResponse) { - return mergeFrom((io.grafeas.v1.ListOccurrencesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ListOccurrencesResponse other) { - if (other == io.grafeas.v1.ListOccurrencesResponse.getDefaultInstance()) return this; - if (occurrencesBuilder_ == null) { - if (!other.occurrences_.isEmpty()) { - if (occurrences_.isEmpty()) { - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOccurrencesIsMutable(); - occurrences_.addAll(other.occurrences_); - } - onChanged(); - } - } else { - if (!other.occurrences_.isEmpty()) { - if (occurrencesBuilder_.isEmpty()) { - occurrencesBuilder_.dispose(); - occurrencesBuilder_ = null; - occurrences_ = other.occurrences_; - bitField0_ = (bitField0_ & ~0x00000001); - occurrencesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getOccurrencesFieldBuilder() : null; - } else { - occurrencesBuilder_.addAllMessages(other.occurrences_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.grafeas.v1.Occurrence m = - input.readMessage( - io.grafeas.v1.Occurrence.parser(), - extensionRegistry); - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(m); - } else { - occurrencesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List occurrences_ = - java.util.Collections.emptyList(); - private void ensureOccurrencesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - occurrences_ = new java.util.ArrayList(occurrences_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrencesBuilder_; - - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List getOccurrencesList() { - if (occurrencesBuilder_ == null) { - return java.util.Collections.unmodifiableList(occurrences_); - } else { - return occurrencesBuilder_.getMessageList(); - } - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public int getOccurrencesCount() { - if (occurrencesBuilder_ == null) { - return occurrences_.size(); - } else { - return occurrencesBuilder_.getCount(); - } - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence getOccurrences(int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); - } else { - return occurrencesBuilder_.getMessage(index); - } - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.set(index, value); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder setOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.set(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences(io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence value) { - if (occurrencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOccurrencesIsMutable(); - occurrences_.add(index, value); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addOccurrences( - int index, io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.add(index, builderForValue.build()); - onChanged(); - } else { - occurrencesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder addAllOccurrences( - java.lang.Iterable values) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, occurrences_); - onChanged(); - } else { - occurrencesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder clearOccurrences() { - if (occurrencesBuilder_ == null) { - occurrences_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - occurrencesBuilder_.clear(); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public Builder removeOccurrences(int index) { - if (occurrencesBuilder_ == null) { - ensureOccurrencesIsMutable(); - occurrences_.remove(index); - onChanged(); - } else { - occurrencesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().getBuilder(index); - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index) { - if (occurrencesBuilder_ == null) { - return occurrences_.get(index); } else { - return occurrencesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List - getOccurrencesOrBuilderList() { - if (occurrencesBuilder_ != null) { - return occurrencesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(occurrences_); - } - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { - return getOccurrencesFieldBuilder().addBuilder( - io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder( - int index) { - return getOccurrencesFieldBuilder().addBuilder( - index, io.grafeas.v1.Occurrence.getDefaultInstance()); - } - /** - *
-     * The occurrences requested.
-     * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - public java.util.List - getOccurrencesBuilderList() { - return getOccurrencesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> - getOccurrencesFieldBuilder() { - if (occurrencesBuilder_ == null) { - occurrencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( - occurrences_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - occurrences_ = null; - } - return occurrencesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The next pagination token in the list response. It should be used as
-     * `page_token` for the following request. An empty value means no more
-     * results.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ListOccurrencesResponse) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ListOccurrencesResponse) - private static final io.grafeas.v1.ListOccurrencesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ListOccurrencesResponse(); - } - - public static io.grafeas.v1.ListOccurrencesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListOccurrencesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ListOccurrencesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java deleted file mode 100644 index e5e64e4513ca..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface ListOccurrencesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ListOccurrencesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - java.util.List - getOccurrencesList(); - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - io.grafeas.v1.Occurrence getOccurrences(int index); - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - int getOccurrencesCount(); - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - java.util.List - getOccurrencesOrBuilderList(); - /** - *
-   * The occurrences requested.
-   * 
- * - * repeated .grafeas.v1.Occurrence occurrences = 1; - */ - io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder( - int index); - - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * The next pagination token in the list response. It should be used as
-   * `page_token` for the following request. An empty value means no more
-   * results.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java deleted file mode 100644 index 13e84c81b5b1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Location.java +++ /dev/null @@ -1,994 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -/** - *
- * An occurrence of a particular package installation found within a system's
- * filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.
- * 
- * - * Protobuf type {@code grafeas.v1.Location} - */ -public final class Location extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Location) - LocationOrBuilder { -private static final long serialVersionUID = 0L; - // Use Location.newBuilder() to construct. - private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Location() { - cpeUri_ = ""; - path_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Location(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Location.class, io.grafeas.v1.Location.Builder.class); - } - - public static final int CPE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object cpeUri_ = ""; - /** - *
-   * Deprecated.
-   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-   * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - @java.lang.Override - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } - } - /** - *
-   * Deprecated.
-   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-   * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 2; - private io.grafeas.v1.Version version_; - /** - *
-   * Deprecated.
-   * The version installed at this location.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return Whether the version field is set. - */ - @java.lang.Override - public boolean hasVersion() { - return version_ != null; - } - /** - *
-   * Deprecated.
-   * The version installed at this location.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return The version. - */ - @java.lang.Override - public io.grafeas.v1.Version getVersion() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - /** - *
-   * Deprecated.
-   * The version installed at this location.
-   * 
- * - * .grafeas.v1.Version version = 2; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - - public static final int PATH_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object path_ = ""; - /** - *
-   * The path from which we gathered that this package/version is installed.
-   * 
- * - * string path = 3; - * @return The path. - */ - @java.lang.Override - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } - } - /** - *
-   * The path from which we gathered that this package/version is installed.
-   * 
- * - * string path = 3; - * @return The bytes for path. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); - } - if (version_ != null) { - output.writeMessage(2, getVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, path_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); - } - if (version_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, path_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Location)) { - return super.equals(obj); - } - io.grafeas.v1.Location other = (io.grafeas.v1.Location) obj; - - if (!getCpeUri() - .equals(other.getCpeUri())) return false; - if (hasVersion() != other.hasVersion()) return false; - if (hasVersion()) { - if (!getVersion() - .equals(other.getVersion())) return false; - } - if (!getPath() - .equals(other.getPath())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCpeUri().hashCode(); - if (hasVersion()) { - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - } - hash = (37 * hash) + PATH_FIELD_NUMBER; - hash = (53 * hash) + getPath().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Location parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Location parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Location parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Location parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Location parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Location parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Location parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Location parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Location parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Location parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Location parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Location parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Location prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An occurrence of a particular package installation found within a system's
-   * filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.
-   * 
- * - * Protobuf type {@code grafeas.v1.Location} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Location) - io.grafeas.v1.LocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Location.class, io.grafeas.v1.Location.Builder.class); - } - - // Construct using io.grafeas.v1.Location.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - cpeUri_ = ""; - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - path_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Location getDefaultInstanceForType() { - return io.grafeas.v1.Location.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Location build() { - io.grafeas.v1.Location result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Location buildPartial() { - io.grafeas.v1.Location result = new io.grafeas.v1.Location(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Location result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.cpeUri_ = cpeUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.version_ = versionBuilder_ == null - ? version_ - : versionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.path_ = path_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Location) { - return mergeFrom((io.grafeas.v1.Location)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Location other) { - if (other == io.grafeas.v1.Location.getDefaultInstance()) return this; - if (!other.getCpeUri().isEmpty()) { - cpeUri_ = other.cpeUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasVersion()) { - mergeVersion(other.getVersion()); - } - if (!other.getPath().isEmpty()) { - path_ = other.path_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - cpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - path_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object cpeUri_ = ""; - /** - *
-     * Deprecated.
-     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-     * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated.
-     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-     * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated.
-     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-     * 
- * - * string cpe_uri = 1; - * @param value The cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Deprecated.
-     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-     * 
- * - * string cpe_uri = 1; - * @return This builder for chaining. - */ - public Builder clearCpeUri() { - cpeUri_ = getDefaultInstance().getCpeUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Deprecated.
-     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-     * 
- * - * string cpe_uri = 1; - * @param value The bytes for cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.grafeas.v1.Version version_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - * @return Whether the version field is set. - */ - public boolean hasVersion() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - * @return The version. - */ - public io.grafeas.v1.Version getVersion() { - if (versionBuilder_ == null) { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } else { - return versionBuilder_.getMessage(); - } - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder setVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - } else { - versionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder setVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (versionBuilder_ == null) { - version_ = builderForValue.build(); - } else { - versionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder mergeVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - version_ != null && - version_ != io.grafeas.v1.Version.getDefaultInstance()) { - getVersionBuilder().mergeFrom(value); - } else { - version_ = value; - } - } else { - versionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder clearVersion() { - bitField0_ = (bitField0_ & ~0x00000002); - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public io.grafeas.v1.Version.Builder getVersionBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getVersionFieldBuilder().getBuilder(); - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - if (versionBuilder_ != null) { - return versionBuilder_.getMessageOrBuilder(); - } else { - return version_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : version_; - } - } - /** - *
-     * Deprecated.
-     * The version installed at this location.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getVersionFieldBuilder() { - if (versionBuilder_ == null) { - versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getVersion(), - getParentForChildren(), - isClean()); - version_ = null; - } - return versionBuilder_; - } - - private java.lang.Object path_ = ""; - /** - *
-     * The path from which we gathered that this package/version is installed.
-     * 
- * - * string path = 3; - * @return The path. - */ - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The path from which we gathered that this package/version is installed.
-     * 
- * - * string path = 3; - * @return The bytes for path. - */ - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The path from which we gathered that this package/version is installed.
-     * 
- * - * string path = 3; - * @param value The path to set. - * @return This builder for chaining. - */ - public Builder setPath( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - path_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The path from which we gathered that this package/version is installed.
-     * 
- * - * string path = 3; - * @return This builder for chaining. - */ - public Builder clearPath() { - path_ = getDefaultInstance().getPath(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The path from which we gathered that this package/version is installed.
-     * 
- * - * string path = 3; - * @param value The bytes for path to set. - * @return This builder for chaining. - */ - public Builder setPathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - path_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Location) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Location) - private static final io.grafeas.v1.Location DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Location(); - } - - public static io.grafeas.v1.Location getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Location parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Location getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java deleted file mode 100644 index 9b0f8af80d16..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/LocationOrBuilder.java +++ /dev/null @@ -1,81 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -public interface LocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Location) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Deprecated.
-   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-   * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - java.lang.String getCpeUri(); - /** - *
-   * Deprecated.
-   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-   * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - com.google.protobuf.ByteString - getCpeUriBytes(); - - /** - *
-   * Deprecated.
-   * The version installed at this location.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return Whether the version field is set. - */ - boolean hasVersion(); - /** - *
-   * Deprecated.
-   * The version installed at this location.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return The version. - */ - io.grafeas.v1.Version getVersion(); - /** - *
-   * Deprecated.
-   * The version installed at this location.
-   * 
- * - * .grafeas.v1.Version version = 2; - */ - io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); - - /** - *
-   * The path from which we gathered that this package/version is installed.
-   * 
- * - * string path = 3; - * @return The path. - */ - java.lang.String getPath(); - /** - *
-   * The path from which we gathered that this package/version is installed.
-   * 
- * - * string path = 3; - * @return The bytes for path. - */ - com.google.protobuf.ByteString - getPathBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java deleted file mode 100644 index 3aee42f64ca5..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Metadata.java +++ /dev/null @@ -1,1380 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -/** - *
- * Other properties of the build.
- * 
- * - * Protobuf type {@code grafeas.v1.Metadata} - */ -public final class Metadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Metadata) - MetadataOrBuilder { -private static final long serialVersionUID = 0L; - // Use Metadata.newBuilder() to construct. - private Metadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Metadata() { - buildInvocationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Metadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Metadata.class, io.grafeas.v1.Metadata.Builder.class); - } - - public static final int BUILD_INVOCATION_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object buildInvocationId_ = ""; - /** - *
-   * Identifies the particular build invocation, which can be useful for finding
-   * associated logs or other ad-hoc analysis. The value SHOULD be globally
-   * unique, per in-toto Provenance spec.
-   * 
- * - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - @java.lang.Override - public java.lang.String getBuildInvocationId() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildInvocationId_ = s; - return s; - } - } - /** - *
-   * Identifies the particular build invocation, which can be useful for finding
-   * associated logs or other ad-hoc analysis. The value SHOULD be globally
-   * unique, per in-toto Provenance spec.
-   * 
- * - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBuildInvocationIdBytes() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildInvocationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BUILD_STARTED_ON_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp buildStartedOn_; - /** - *
-   * The timestamp of when the build started.
-   * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - @java.lang.Override - public boolean hasBuildStartedOn() { - return buildStartedOn_ != null; - } - /** - *
-   * The timestamp of when the build started.
-   * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getBuildStartedOn() { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - /** - *
-   * The timestamp of when the build started.
-   * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - - public static final int BUILD_FINISHED_ON_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp buildFinishedOn_; - /** - *
-   * The timestamp of when the build completed.
-   * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - @java.lang.Override - public boolean hasBuildFinishedOn() { - return buildFinishedOn_ != null; - } - /** - *
-   * The timestamp of when the build completed.
-   * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getBuildFinishedOn() { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - /** - *
-   * The timestamp of when the build completed.
-   * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - - public static final int COMPLETENESS_FIELD_NUMBER = 4; - private io.grafeas.v1.Completeness completeness_; - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * .grafeas.v1.Completeness completeness = 4; - * @return Whether the completeness field is set. - */ - @java.lang.Override - public boolean hasCompleteness() { - return completeness_ != null; - } - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * .grafeas.v1.Completeness completeness = 4; - * @return The completeness. - */ - @java.lang.Override - public io.grafeas.v1.Completeness getCompleteness() { - return completeness_ == null ? io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; - } - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - @java.lang.Override - public io.grafeas.v1.CompletenessOrBuilder getCompletenessOrBuilder() { - return completeness_ == null ? io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; - } - - public static final int REPRODUCIBLE_FIELD_NUMBER = 5; - private boolean reproducible_ = false; - /** - *
-   * If true, the builder claims that running the recipe on materials will
-   * produce bit-for-bit identical output.
-   * 
- * - * bool reproducible = 5; - * @return The reproducible. - */ - @java.lang.Override - public boolean getReproducible() { - return reproducible_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, buildInvocationId_); - } - if (buildStartedOn_ != null) { - output.writeMessage(2, getBuildStartedOn()); - } - if (buildFinishedOn_ != null) { - output.writeMessage(3, getBuildFinishedOn()); - } - if (completeness_ != null) { - output.writeMessage(4, getCompleteness()); - } - if (reproducible_ != false) { - output.writeBool(5, reproducible_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, buildInvocationId_); - } - if (buildStartedOn_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBuildStartedOn()); - } - if (buildFinishedOn_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getBuildFinishedOn()); - } - if (completeness_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCompleteness()); - } - if (reproducible_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, reproducible_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Metadata)) { - return super.equals(obj); - } - io.grafeas.v1.Metadata other = (io.grafeas.v1.Metadata) obj; - - if (!getBuildInvocationId() - .equals(other.getBuildInvocationId())) return false; - if (hasBuildStartedOn() != other.hasBuildStartedOn()) return false; - if (hasBuildStartedOn()) { - if (!getBuildStartedOn() - .equals(other.getBuildStartedOn())) return false; - } - if (hasBuildFinishedOn() != other.hasBuildFinishedOn()) return false; - if (hasBuildFinishedOn()) { - if (!getBuildFinishedOn() - .equals(other.getBuildFinishedOn())) return false; - } - if (hasCompleteness() != other.hasCompleteness()) return false; - if (hasCompleteness()) { - if (!getCompleteness() - .equals(other.getCompleteness())) return false; - } - if (getReproducible() - != other.getReproducible()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BUILD_INVOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getBuildInvocationId().hashCode(); - if (hasBuildStartedOn()) { - hash = (37 * hash) + BUILD_STARTED_ON_FIELD_NUMBER; - hash = (53 * hash) + getBuildStartedOn().hashCode(); - } - if (hasBuildFinishedOn()) { - hash = (37 * hash) + BUILD_FINISHED_ON_FIELD_NUMBER; - hash = (53 * hash) + getBuildFinishedOn().hashCode(); - } - if (hasCompleteness()) { - hash = (37 * hash) + COMPLETENESS_FIELD_NUMBER; - hash = (53 * hash) + getCompleteness().hashCode(); - } - hash = (37 * hash) + REPRODUCIBLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getReproducible()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Metadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Metadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Metadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Metadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Metadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Metadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Metadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Metadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Metadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Metadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Metadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Metadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Metadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Other properties of the build.
-   * 
- * - * Protobuf type {@code grafeas.v1.Metadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Metadata) - io.grafeas.v1.MetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Metadata.class, io.grafeas.v1.Metadata.Builder.class); - } - - // Construct using io.grafeas.v1.Metadata.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - buildInvocationId_ = ""; - buildStartedOn_ = null; - if (buildStartedOnBuilder_ != null) { - buildStartedOnBuilder_.dispose(); - buildStartedOnBuilder_ = null; - } - buildFinishedOn_ = null; - if (buildFinishedOnBuilder_ != null) { - buildFinishedOnBuilder_.dispose(); - buildFinishedOnBuilder_ = null; - } - completeness_ = null; - if (completenessBuilder_ != null) { - completenessBuilder_.dispose(); - completenessBuilder_ = null; - } - reproducible_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Metadata_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Metadata getDefaultInstanceForType() { - return io.grafeas.v1.Metadata.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Metadata build() { - io.grafeas.v1.Metadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Metadata buildPartial() { - io.grafeas.v1.Metadata result = new io.grafeas.v1.Metadata(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Metadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.buildInvocationId_ = buildInvocationId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.buildStartedOn_ = buildStartedOnBuilder_ == null - ? buildStartedOn_ - : buildStartedOnBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.buildFinishedOn_ = buildFinishedOnBuilder_ == null - ? buildFinishedOn_ - : buildFinishedOnBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.completeness_ = completenessBuilder_ == null - ? completeness_ - : completenessBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.reproducible_ = reproducible_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Metadata) { - return mergeFrom((io.grafeas.v1.Metadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Metadata other) { - if (other == io.grafeas.v1.Metadata.getDefaultInstance()) return this; - if (!other.getBuildInvocationId().isEmpty()) { - buildInvocationId_ = other.buildInvocationId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasBuildStartedOn()) { - mergeBuildStartedOn(other.getBuildStartedOn()); - } - if (other.hasBuildFinishedOn()) { - mergeBuildFinishedOn(other.getBuildFinishedOn()); - } - if (other.hasCompleteness()) { - mergeCompleteness(other.getCompleteness()); - } - if (other.getReproducible() != false) { - setReproducible(other.getReproducible()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - buildInvocationId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getBuildStartedOnFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getBuildFinishedOnFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getCompletenessFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: { - reproducible_ = input.readBool(); - bitField0_ |= 0x00000010; - break; - } // case 40 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object buildInvocationId_ = ""; - /** - *
-     * Identifies the particular build invocation, which can be useful for finding
-     * associated logs or other ad-hoc analysis. The value SHOULD be globally
-     * unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - public java.lang.String getBuildInvocationId() { - java.lang.Object ref = buildInvocationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildInvocationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Identifies the particular build invocation, which can be useful for finding
-     * associated logs or other ad-hoc analysis. The value SHOULD be globally
-     * unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - public com.google.protobuf.ByteString - getBuildInvocationIdBytes() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildInvocationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Identifies the particular build invocation, which can be useful for finding
-     * associated logs or other ad-hoc analysis. The value SHOULD be globally
-     * unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @param value The buildInvocationId to set. - * @return This builder for chaining. - */ - public Builder setBuildInvocationId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - buildInvocationId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Identifies the particular build invocation, which can be useful for finding
-     * associated logs or other ad-hoc analysis. The value SHOULD be globally
-     * unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @return This builder for chaining. - */ - public Builder clearBuildInvocationId() { - buildInvocationId_ = getDefaultInstance().getBuildInvocationId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Identifies the particular build invocation, which can be useful for finding
-     * associated logs or other ad-hoc analysis. The value SHOULD be globally
-     * unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @param value The bytes for buildInvocationId to set. - * @return This builder for chaining. - */ - public Builder setBuildInvocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - buildInvocationId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp buildStartedOn_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildStartedOnBuilder_; - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - public boolean hasBuildStartedOn() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - public com.google.protobuf.Timestamp getBuildStartedOn() { - if (buildStartedOnBuilder_ == null) { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } else { - return buildStartedOnBuilder_.getMessage(); - } - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder setBuildStartedOn(com.google.protobuf.Timestamp value) { - if (buildStartedOnBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - buildStartedOn_ = value; - } else { - buildStartedOnBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder setBuildStartedOn( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (buildStartedOnBuilder_ == null) { - buildStartedOn_ = builderForValue.build(); - } else { - buildStartedOnBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder mergeBuildStartedOn(com.google.protobuf.Timestamp value) { - if (buildStartedOnBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - buildStartedOn_ != null && - buildStartedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getBuildStartedOnBuilder().mergeFrom(value); - } else { - buildStartedOn_ = value; - } - } else { - buildStartedOnBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder clearBuildStartedOn() { - bitField0_ = (bitField0_ & ~0x00000002); - buildStartedOn_ = null; - if (buildStartedOnBuilder_ != null) { - buildStartedOnBuilder_.dispose(); - buildStartedOnBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public com.google.protobuf.Timestamp.Builder getBuildStartedOnBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getBuildStartedOnFieldBuilder().getBuilder(); - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { - if (buildStartedOnBuilder_ != null) { - return buildStartedOnBuilder_.getMessageOrBuilder(); - } else { - return buildStartedOn_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getBuildStartedOnFieldBuilder() { - if (buildStartedOnBuilder_ == null) { - buildStartedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getBuildStartedOn(), - getParentForChildren(), - isClean()); - buildStartedOn_ = null; - } - return buildStartedOnBuilder_; - } - - private com.google.protobuf.Timestamp buildFinishedOn_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildFinishedOnBuilder_; - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - public boolean hasBuildFinishedOn() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - public com.google.protobuf.Timestamp getBuildFinishedOn() { - if (buildFinishedOnBuilder_ == null) { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } else { - return buildFinishedOnBuilder_.getMessage(); - } - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder setBuildFinishedOn(com.google.protobuf.Timestamp value) { - if (buildFinishedOnBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - buildFinishedOn_ = value; - } else { - buildFinishedOnBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder setBuildFinishedOn( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (buildFinishedOnBuilder_ == null) { - buildFinishedOn_ = builderForValue.build(); - } else { - buildFinishedOnBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder mergeBuildFinishedOn(com.google.protobuf.Timestamp value) { - if (buildFinishedOnBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - buildFinishedOn_ != null && - buildFinishedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getBuildFinishedOnBuilder().mergeFrom(value); - } else { - buildFinishedOn_ = value; - } - } else { - buildFinishedOnBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder clearBuildFinishedOn() { - bitField0_ = (bitField0_ & ~0x00000004); - buildFinishedOn_ = null; - if (buildFinishedOnBuilder_ != null) { - buildFinishedOnBuilder_.dispose(); - buildFinishedOnBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public com.google.protobuf.Timestamp.Builder getBuildFinishedOnBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getBuildFinishedOnFieldBuilder().getBuilder(); - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { - if (buildFinishedOnBuilder_ != null) { - return buildFinishedOnBuilder_.getMessageOrBuilder(); - } else { - return buildFinishedOn_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getBuildFinishedOnFieldBuilder() { - if (buildFinishedOnBuilder_ == null) { - buildFinishedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getBuildFinishedOn(), - getParentForChildren(), - isClean()); - buildFinishedOn_ = null; - } - return buildFinishedOnBuilder_; - } - - private io.grafeas.v1.Completeness completeness_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Completeness, io.grafeas.v1.Completeness.Builder, io.grafeas.v1.CompletenessOrBuilder> completenessBuilder_; - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - * @return Whether the completeness field is set. - */ - public boolean hasCompleteness() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - * @return The completeness. - */ - public io.grafeas.v1.Completeness getCompleteness() { - if (completenessBuilder_ == null) { - return completeness_ == null ? io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; - } else { - return completenessBuilder_.getMessage(); - } - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - public Builder setCompleteness(io.grafeas.v1.Completeness value) { - if (completenessBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - completeness_ = value; - } else { - completenessBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - public Builder setCompleteness( - io.grafeas.v1.Completeness.Builder builderForValue) { - if (completenessBuilder_ == null) { - completeness_ = builderForValue.build(); - } else { - completenessBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - public Builder mergeCompleteness(io.grafeas.v1.Completeness value) { - if (completenessBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - completeness_ != null && - completeness_ != io.grafeas.v1.Completeness.getDefaultInstance()) { - getCompletenessBuilder().mergeFrom(value); - } else { - completeness_ = value; - } - } else { - completenessBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - public Builder clearCompleteness() { - bitField0_ = (bitField0_ & ~0x00000008); - completeness_ = null; - if (completenessBuilder_ != null) { - completenessBuilder_.dispose(); - completenessBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - public io.grafeas.v1.Completeness.Builder getCompletenessBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCompletenessFieldBuilder().getBuilder(); - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - public io.grafeas.v1.CompletenessOrBuilder getCompletenessOrBuilder() { - if (completenessBuilder_ != null) { - return completenessBuilder_.getMessageOrBuilder(); - } else { - return completeness_ == null ? - io.grafeas.v1.Completeness.getDefaultInstance() : completeness_; - } - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Completeness, io.grafeas.v1.Completeness.Builder, io.grafeas.v1.CompletenessOrBuilder> - getCompletenessFieldBuilder() { - if (completenessBuilder_ == null) { - completenessBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Completeness, io.grafeas.v1.Completeness.Builder, io.grafeas.v1.CompletenessOrBuilder>( - getCompleteness(), - getParentForChildren(), - isClean()); - completeness_ = null; - } - return completenessBuilder_; - } - - private boolean reproducible_ ; - /** - *
-     * If true, the builder claims that running the recipe on materials will
-     * produce bit-for-bit identical output.
-     * 
- * - * bool reproducible = 5; - * @return The reproducible. - */ - @java.lang.Override - public boolean getReproducible() { - return reproducible_; - } - /** - *
-     * If true, the builder claims that running the recipe on materials will
-     * produce bit-for-bit identical output.
-     * 
- * - * bool reproducible = 5; - * @param value The reproducible to set. - * @return This builder for chaining. - */ - public Builder setReproducible(boolean value) { - - reproducible_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * If true, the builder claims that running the recipe on materials will
-     * produce bit-for-bit identical output.
-     * 
- * - * bool reproducible = 5; - * @return This builder for chaining. - */ - public Builder clearReproducible() { - bitField0_ = (bitField0_ & ~0x00000010); - reproducible_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Metadata) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Metadata) - private static final io.grafeas.v1.Metadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Metadata(); - } - - public static io.grafeas.v1.Metadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Metadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Metadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java deleted file mode 100644 index 9999c1a7ef58..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/MetadataOrBuilder.java +++ /dev/null @@ -1,128 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -public interface MetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Metadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Identifies the particular build invocation, which can be useful for finding
-   * associated logs or other ad-hoc analysis. The value SHOULD be globally
-   * unique, per in-toto Provenance spec.
-   * 
- * - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - java.lang.String getBuildInvocationId(); - /** - *
-   * Identifies the particular build invocation, which can be useful for finding
-   * associated logs or other ad-hoc analysis. The value SHOULD be globally
-   * unique, per in-toto Provenance spec.
-   * 
- * - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - com.google.protobuf.ByteString - getBuildInvocationIdBytes(); - - /** - *
-   * The timestamp of when the build started.
-   * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - boolean hasBuildStartedOn(); - /** - *
-   * The timestamp of when the build started.
-   * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - com.google.protobuf.Timestamp getBuildStartedOn(); - /** - *
-   * The timestamp of when the build started.
-   * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder(); - - /** - *
-   * The timestamp of when the build completed.
-   * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - boolean hasBuildFinishedOn(); - /** - *
-   * The timestamp of when the build completed.
-   * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - com.google.protobuf.Timestamp getBuildFinishedOn(); - /** - *
-   * The timestamp of when the build completed.
-   * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder(); - - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * .grafeas.v1.Completeness completeness = 4; - * @return Whether the completeness field is set. - */ - boolean hasCompleteness(); - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * .grafeas.v1.Completeness completeness = 4; - * @return The completeness. - */ - io.grafeas.v1.Completeness getCompleteness(); - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * .grafeas.v1.Completeness completeness = 4; - */ - io.grafeas.v1.CompletenessOrBuilder getCompletenessOrBuilder(); - - /** - *
-   * If true, the builder claims that running the recipe on materials will
-   * produce bit-for-bit identical output.
-   * 
- * - * bool reproducible = 5; - * @return The reproducible. - */ - boolean getReproducible(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java deleted file mode 100644 index ec17bbcd5c76..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFile.java +++ /dev/null @@ -1,908 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -/** - *
- * Details about files that caused a compliance check to fail.
- * 
- * - * Protobuf type {@code grafeas.v1.NonCompliantFile} - */ -public final class NonCompliantFile extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.NonCompliantFile) - NonCompliantFileOrBuilder { -private static final long serialVersionUID = 0L; - // Use NonCompliantFile.newBuilder() to construct. - private NonCompliantFile(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NonCompliantFile() { - path_ = ""; - displayCommand_ = ""; - reason_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NonCompliantFile(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.NonCompliantFile.class, io.grafeas.v1.NonCompliantFile.Builder.class); - } - - public static final int PATH_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object path_ = ""; - /** - *
-   * Empty if `display_command` is set.
-   * 
- * - * string path = 1; - * @return The path. - */ - @java.lang.Override - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } - } - /** - *
-   * Empty if `display_command` is set.
-   * 
- * - * string path = 1; - * @return The bytes for path. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_COMMAND_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object displayCommand_ = ""; - /** - *
-   * Command to display the non-compliant files.
-   * 
- * - * string display_command = 2; - * @return The displayCommand. - */ - @java.lang.Override - public java.lang.String getDisplayCommand() { - java.lang.Object ref = displayCommand_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayCommand_ = s; - return s; - } - } - /** - *
-   * Command to display the non-compliant files.
-   * 
- * - * string display_command = 2; - * @return The bytes for displayCommand. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayCommandBytes() { - java.lang.Object ref = displayCommand_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayCommand_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REASON_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object reason_ = ""; - /** - *
-   * Explains why a file is non compliant for a CIS check.
-   * 
- * - * string reason = 3; - * @return The reason. - */ - @java.lang.Override - public java.lang.String getReason() { - java.lang.Object ref = reason_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - reason_ = s; - return s; - } - } - /** - *
-   * Explains why a file is non compliant for a CIS check.
-   * 
- * - * string reason = 3; - * @return The bytes for reason. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getReasonBytes() { - java.lang.Object ref = reason_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - reason_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayCommand_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayCommand_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, reason_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayCommand_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayCommand_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, reason_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.NonCompliantFile)) { - return super.equals(obj); - } - io.grafeas.v1.NonCompliantFile other = (io.grafeas.v1.NonCompliantFile) obj; - - if (!getPath() - .equals(other.getPath())) return false; - if (!getDisplayCommand() - .equals(other.getDisplayCommand())) return false; - if (!getReason() - .equals(other.getReason())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PATH_FIELD_NUMBER; - hash = (53 * hash) + getPath().hashCode(); - hash = (37 * hash) + DISPLAY_COMMAND_FIELD_NUMBER; - hash = (53 * hash) + getDisplayCommand().hashCode(); - hash = (37 * hash) + REASON_FIELD_NUMBER; - hash = (53 * hash) + getReason().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.NonCompliantFile parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.NonCompliantFile parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.NonCompliantFile parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.NonCompliantFile parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.NonCompliantFile parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.NonCompliantFile parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.NonCompliantFile parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.NonCompliantFile parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.NonCompliantFile parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.NonCompliantFile parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.NonCompliantFile parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.NonCompliantFile parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.NonCompliantFile prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Details about files that caused a compliance check to fail.
-   * 
- * - * Protobuf type {@code grafeas.v1.NonCompliantFile} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.NonCompliantFile) - io.grafeas.v1.NonCompliantFileOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.NonCompliantFile.class, io.grafeas.v1.NonCompliantFile.Builder.class); - } - - // Construct using io.grafeas.v1.NonCompliantFile.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - path_ = ""; - displayCommand_ = ""; - reason_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.NonCompliantFile getDefaultInstanceForType() { - return io.grafeas.v1.NonCompliantFile.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.NonCompliantFile build() { - io.grafeas.v1.NonCompliantFile result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.NonCompliantFile buildPartial() { - io.grafeas.v1.NonCompliantFile result = new io.grafeas.v1.NonCompliantFile(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.NonCompliantFile result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.path_ = path_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.displayCommand_ = displayCommand_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.reason_ = reason_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.NonCompliantFile) { - return mergeFrom((io.grafeas.v1.NonCompliantFile)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.NonCompliantFile other) { - if (other == io.grafeas.v1.NonCompliantFile.getDefaultInstance()) return this; - if (!other.getPath().isEmpty()) { - path_ = other.path_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getDisplayCommand().isEmpty()) { - displayCommand_ = other.displayCommand_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getReason().isEmpty()) { - reason_ = other.reason_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - path_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - displayCommand_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - reason_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object path_ = ""; - /** - *
-     * Empty if `display_command` is set.
-     * 
- * - * string path = 1; - * @return The path. - */ - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Empty if `display_command` is set.
-     * 
- * - * string path = 1; - * @return The bytes for path. - */ - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Empty if `display_command` is set.
-     * 
- * - * string path = 1; - * @param value The path to set. - * @return This builder for chaining. - */ - public Builder setPath( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - path_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Empty if `display_command` is set.
-     * 
- * - * string path = 1; - * @return This builder for chaining. - */ - public Builder clearPath() { - path_ = getDefaultInstance().getPath(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Empty if `display_command` is set.
-     * 
- * - * string path = 1; - * @param value The bytes for path to set. - * @return This builder for chaining. - */ - public Builder setPathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - path_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object displayCommand_ = ""; - /** - *
-     * Command to display the non-compliant files.
-     * 
- * - * string display_command = 2; - * @return The displayCommand. - */ - public java.lang.String getDisplayCommand() { - java.lang.Object ref = displayCommand_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayCommand_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Command to display the non-compliant files.
-     * 
- * - * string display_command = 2; - * @return The bytes for displayCommand. - */ - public com.google.protobuf.ByteString - getDisplayCommandBytes() { - java.lang.Object ref = displayCommand_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayCommand_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Command to display the non-compliant files.
-     * 
- * - * string display_command = 2; - * @param value The displayCommand to set. - * @return This builder for chaining. - */ - public Builder setDisplayCommand( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - displayCommand_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Command to display the non-compliant files.
-     * 
- * - * string display_command = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayCommand() { - displayCommand_ = getDefaultInstance().getDisplayCommand(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Command to display the non-compliant files.
-     * 
- * - * string display_command = 2; - * @param value The bytes for displayCommand to set. - * @return This builder for chaining. - */ - public Builder setDisplayCommandBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - displayCommand_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object reason_ = ""; - /** - *
-     * Explains why a file is non compliant for a CIS check.
-     * 
- * - * string reason = 3; - * @return The reason. - */ - public java.lang.String getReason() { - java.lang.Object ref = reason_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - reason_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Explains why a file is non compliant for a CIS check.
-     * 
- * - * string reason = 3; - * @return The bytes for reason. - */ - public com.google.protobuf.ByteString - getReasonBytes() { - java.lang.Object ref = reason_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - reason_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Explains why a file is non compliant for a CIS check.
-     * 
- * - * string reason = 3; - * @param value The reason to set. - * @return This builder for chaining. - */ - public Builder setReason( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - reason_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Explains why a file is non compliant for a CIS check.
-     * 
- * - * string reason = 3; - * @return This builder for chaining. - */ - public Builder clearReason() { - reason_ = getDefaultInstance().getReason(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * Explains why a file is non compliant for a CIS check.
-     * 
- * - * string reason = 3; - * @param value The bytes for reason to set. - * @return This builder for chaining. - */ - public Builder setReasonBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - reason_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.NonCompliantFile) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.NonCompliantFile) - private static final io.grafeas.v1.NonCompliantFile DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.NonCompliantFile(); - } - - public static io.grafeas.v1.NonCompliantFile getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NonCompliantFile parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.NonCompliantFile getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java deleted file mode 100644 index fece8f7338c1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NonCompliantFileOrBuilder.java +++ /dev/null @@ -1,69 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/compliance.proto - -package io.grafeas.v1; - -public interface NonCompliantFileOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.NonCompliantFile) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Empty if `display_command` is set.
-   * 
- * - * string path = 1; - * @return The path. - */ - java.lang.String getPath(); - /** - *
-   * Empty if `display_command` is set.
-   * 
- * - * string path = 1; - * @return The bytes for path. - */ - com.google.protobuf.ByteString - getPathBytes(); - - /** - *
-   * Command to display the non-compliant files.
-   * 
- * - * string display_command = 2; - * @return The displayCommand. - */ - java.lang.String getDisplayCommand(); - /** - *
-   * Command to display the non-compliant files.
-   * 
- * - * string display_command = 2; - * @return The bytes for displayCommand. - */ - com.google.protobuf.ByteString - getDisplayCommandBytes(); - - /** - *
-   * Explains why a file is non compliant for a CIS check.
-   * 
- * - * string reason = 3; - * @return The reason. - */ - java.lang.String getReason(); - /** - *
-   * Explains why a file is non compliant for a CIS check.
-   * 
- * - * string reason = 3; - * @return The bytes for reason. - */ - com.google.protobuf.ByteString - getReasonBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java deleted file mode 100644 index bc9400e0b952..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Note.java +++ /dev/null @@ -1,5324 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * A type of analysis that can be done for a resource.
- * 
- * - * Protobuf type {@code grafeas.v1.Note} - */ -public final class Note extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Note) - NoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use Note.newBuilder() to construct. - private Note(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Note() { - name_ = ""; - shortDescription_ = ""; - longDescription_ = ""; - kind_ = 0; - relatedUrl_ = java.util.Collections.emptyList(); - relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Note(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Note.class, io.grafeas.v1.Note.Builder.class); - } - - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VULNERABILITY(10), - BUILD(11), - IMAGE(12), - PACKAGE(13), - DEPLOYMENT(14), - DISCOVERY(15), - ATTESTATION(16), - UPGRADE(17), - COMPLIANCE(18), - DSSE_ATTESTATION(19), - VULNERABILITY_ASSESSMENT(20), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 10: return VULNERABILITY; - case 11: return BUILD; - case 12: return IMAGE; - case 13: return PACKAGE; - case 14: return DEPLOYMENT; - case 15: return DISCOVERY; - case 16: return ATTESTATION; - case 17: return UPGRADE; - case 18: return COMPLIANCE; - case 19: return DSSE_ATTESTATION; - case 20: return VULNERABILITY_ASSESSMENT; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * Output only. The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Output only. The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object shortDescription_ = ""; - /** - *
-   * A one sentence description of this note.
-   * 
- * - * string short_description = 2; - * @return The shortDescription. - */ - @java.lang.Override - public java.lang.String getShortDescription() { - java.lang.Object ref = shortDescription_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - shortDescription_ = s; - return s; - } - } - /** - *
-   * A one sentence description of this note.
-   * 
- * - * string short_description = 2; - * @return The bytes for shortDescription. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getShortDescriptionBytes() { - java.lang.Object ref = shortDescription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - shortDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LONG_DESCRIPTION_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object longDescription_ = ""; - /** - *
-   * A detailed description of this note.
-   * 
- * - * string long_description = 3; - * @return The longDescription. - */ - @java.lang.Override - public java.lang.String getLongDescription() { - java.lang.Object ref = longDescription_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - longDescription_ = s; - return s; - } - } - /** - *
-   * A detailed description of this note.
-   * 
- * - * string long_description = 3; - * @return The bytes for longDescription. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLongDescriptionBytes() { - java.lang.Object ref = longDescription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - longDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KIND_FIELD_NUMBER = 4; - private int kind_ = 0; - /** - *
-   * Output only. The type of analysis. This field can be used as a filter in
-   * list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-   * Output only. The type of analysis. This field can be used as a filter in
-   * list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The kind. - */ - @java.lang.Override public io.grafeas.v1.NoteKind getKind() { - io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); - return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; - } - - public static final int RELATED_URL_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private java.util.List relatedUrl_; - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - @java.lang.Override - public java.util.List getRelatedUrlList() { - return relatedUrl_; - } - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - @java.lang.Override - public java.util.List - getRelatedUrlOrBuilderList() { - return relatedUrl_; - } - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - @java.lang.Override - public int getRelatedUrlCount() { - return relatedUrl_.size(); - } - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - @java.lang.Override - public io.grafeas.v1.RelatedUrl getRelatedUrl(int index) { - return relatedUrl_.get(index); - } - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - @java.lang.Override - public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlOrBuilder( - int index) { - return relatedUrl_.get(index); - } - - public static final int EXPIRATION_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp expirationTime_; - /** - *
-   * Time of expiration for this note. Empty if note does not expire.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - * @return Whether the expirationTime field is set. - */ - @java.lang.Override - public boolean hasExpirationTime() { - return expirationTime_ != null; - } - /** - *
-   * Time of expiration for this note. Empty if note does not expire.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - * @return The expirationTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getExpirationTime() { - return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; - } - /** - *
-   * Time of expiration for this note. Empty if note does not expire.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { - return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; - } - - public static final int CREATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The time this note was created. This field can be used as a
-   * filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The time this note was created. This field can be used as a
-   * filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The time this note was created. This field can be used as a
-   * filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 8; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * Output only. The time this note was last updated. This field can be used as
-   * a filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * Output only. The time this note was last updated. This field can be used as
-   * a filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * Output only. The time this note was last updated. This field can be used as
-   * a filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int RELATED_NOTE_NAMES_FIELD_NUMBER = 9; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList relatedNoteNames_; - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @return A list containing the relatedNoteNames. - */ - public com.google.protobuf.ProtocolStringList - getRelatedNoteNamesList() { - return relatedNoteNames_; - } - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @return The count of relatedNoteNames. - */ - public int getRelatedNoteNamesCount() { - return relatedNoteNames_.size(); - } - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @param index The index of the element to return. - * @return The relatedNoteNames at the given index. - */ - public java.lang.String getRelatedNoteNames(int index) { - return relatedNoteNames_.get(index); - } - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @param index The index of the value to return. - * @return The bytes of the relatedNoteNames at the given index. - */ - public com.google.protobuf.ByteString - getRelatedNoteNamesBytes(int index) { - return relatedNoteNames_.getByteString(index); - } - - public static final int VULNERABILITY_FIELD_NUMBER = 10; - /** - *
-   * A note describing a package vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @return Whether the vulnerability field is set. - */ - @java.lang.Override - public boolean hasVulnerability() { - return typeCase_ == 10; - } - /** - *
-   * A note describing a package vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @return The vulnerability. - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote getVulnerability() { - if (typeCase_ == 10) { - return (io.grafeas.v1.VulnerabilityNote) type_; - } - return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); - } - /** - *
-   * A note describing a package vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNoteOrBuilder getVulnerabilityOrBuilder() { - if (typeCase_ == 10) { - return (io.grafeas.v1.VulnerabilityNote) type_; - } - return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); - } - - public static final int BUILD_FIELD_NUMBER = 11; - /** - *
-   * A note describing build provenance for a verifiable build.
-   * 
- * - * .grafeas.v1.BuildNote build = 11; - * @return Whether the build field is set. - */ - @java.lang.Override - public boolean hasBuild() { - return typeCase_ == 11; - } - /** - *
-   * A note describing build provenance for a verifiable build.
-   * 
- * - * .grafeas.v1.BuildNote build = 11; - * @return The build. - */ - @java.lang.Override - public io.grafeas.v1.BuildNote getBuild() { - if (typeCase_ == 11) { - return (io.grafeas.v1.BuildNote) type_; - } - return io.grafeas.v1.BuildNote.getDefaultInstance(); - } - /** - *
-   * A note describing build provenance for a verifiable build.
-   * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - @java.lang.Override - public io.grafeas.v1.BuildNoteOrBuilder getBuildOrBuilder() { - if (typeCase_ == 11) { - return (io.grafeas.v1.BuildNote) type_; - } - return io.grafeas.v1.BuildNote.getDefaultInstance(); - } - - public static final int IMAGE_FIELD_NUMBER = 12; - /** - *
-   * A note describing a base image.
-   * 
- * - * .grafeas.v1.ImageNote image = 12; - * @return Whether the image field is set. - */ - @java.lang.Override - public boolean hasImage() { - return typeCase_ == 12; - } - /** - *
-   * A note describing a base image.
-   * 
- * - * .grafeas.v1.ImageNote image = 12; - * @return The image. - */ - @java.lang.Override - public io.grafeas.v1.ImageNote getImage() { - if (typeCase_ == 12) { - return (io.grafeas.v1.ImageNote) type_; - } - return io.grafeas.v1.ImageNote.getDefaultInstance(); - } - /** - *
-   * A note describing a base image.
-   * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - @java.lang.Override - public io.grafeas.v1.ImageNoteOrBuilder getImageOrBuilder() { - if (typeCase_ == 12) { - return (io.grafeas.v1.ImageNote) type_; - } - return io.grafeas.v1.ImageNote.getDefaultInstance(); - } - - public static final int PACKAGE_FIELD_NUMBER = 13; - /** - *
-   * A note describing a package hosted by various package managers.
-   * 
- * - * .grafeas.v1.PackageNote package = 13; - * @return Whether the package field is set. - */ - @java.lang.Override - public boolean hasPackage() { - return typeCase_ == 13; - } - /** - *
-   * A note describing a package hosted by various package managers.
-   * 
- * - * .grafeas.v1.PackageNote package = 13; - * @return The package. - */ - @java.lang.Override - public io.grafeas.v1.PackageNote getPackage() { - if (typeCase_ == 13) { - return (io.grafeas.v1.PackageNote) type_; - } - return io.grafeas.v1.PackageNote.getDefaultInstance(); - } - /** - *
-   * A note describing a package hosted by various package managers.
-   * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - @java.lang.Override - public io.grafeas.v1.PackageNoteOrBuilder getPackageOrBuilder() { - if (typeCase_ == 13) { - return (io.grafeas.v1.PackageNote) type_; - } - return io.grafeas.v1.PackageNote.getDefaultInstance(); - } - - public static final int DEPLOYMENT_FIELD_NUMBER = 14; - /** - *
-   * A note describing something that can be deployed.
-   * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - * @return Whether the deployment field is set. - */ - @java.lang.Override - public boolean hasDeployment() { - return typeCase_ == 14; - } - /** - *
-   * A note describing something that can be deployed.
-   * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - * @return The deployment. - */ - @java.lang.Override - public io.grafeas.v1.DeploymentNote getDeployment() { - if (typeCase_ == 14) { - return (io.grafeas.v1.DeploymentNote) type_; - } - return io.grafeas.v1.DeploymentNote.getDefaultInstance(); - } - /** - *
-   * A note describing something that can be deployed.
-   * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - @java.lang.Override - public io.grafeas.v1.DeploymentNoteOrBuilder getDeploymentOrBuilder() { - if (typeCase_ == 14) { - return (io.grafeas.v1.DeploymentNote) type_; - } - return io.grafeas.v1.DeploymentNote.getDefaultInstance(); - } - - public static final int DISCOVERY_FIELD_NUMBER = 15; - /** - *
-   * A note describing the initial analysis of a resource.
-   * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - * @return Whether the discovery field is set. - */ - @java.lang.Override - public boolean hasDiscovery() { - return typeCase_ == 15; - } - /** - *
-   * A note describing the initial analysis of a resource.
-   * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - * @return The discovery. - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryNote getDiscovery() { - if (typeCase_ == 15) { - return (io.grafeas.v1.DiscoveryNote) type_; - } - return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); - } - /** - *
-   * A note describing the initial analysis of a resource.
-   * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryNoteOrBuilder getDiscoveryOrBuilder() { - if (typeCase_ == 15) { - return (io.grafeas.v1.DiscoveryNote) type_; - } - return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); - } - - public static final int ATTESTATION_FIELD_NUMBER = 16; - /** - *
-   * A note describing an attestation role.
-   * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - * @return Whether the attestation field is set. - */ - @java.lang.Override - public boolean hasAttestation() { - return typeCase_ == 16; - } - /** - *
-   * A note describing an attestation role.
-   * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - * @return The attestation. - */ - @java.lang.Override - public io.grafeas.v1.AttestationNote getAttestation() { - if (typeCase_ == 16) { - return (io.grafeas.v1.AttestationNote) type_; - } - return io.grafeas.v1.AttestationNote.getDefaultInstance(); - } - /** - *
-   * A note describing an attestation role.
-   * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - @java.lang.Override - public io.grafeas.v1.AttestationNoteOrBuilder getAttestationOrBuilder() { - if (typeCase_ == 16) { - return (io.grafeas.v1.AttestationNote) type_; - } - return io.grafeas.v1.AttestationNote.getDefaultInstance(); - } - - public static final int UPGRADE_FIELD_NUMBER = 17; - /** - *
-   * A note describing available package upgrades.
-   * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - * @return Whether the upgrade field is set. - */ - @java.lang.Override - public boolean hasUpgrade() { - return typeCase_ == 17; - } - /** - *
-   * A note describing available package upgrades.
-   * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - * @return The upgrade. - */ - @java.lang.Override - public io.grafeas.v1.UpgradeNote getUpgrade() { - if (typeCase_ == 17) { - return (io.grafeas.v1.UpgradeNote) type_; - } - return io.grafeas.v1.UpgradeNote.getDefaultInstance(); - } - /** - *
-   * A note describing available package upgrades.
-   * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - @java.lang.Override - public io.grafeas.v1.UpgradeNoteOrBuilder getUpgradeOrBuilder() { - if (typeCase_ == 17) { - return (io.grafeas.v1.UpgradeNote) type_; - } - return io.grafeas.v1.UpgradeNote.getDefaultInstance(); - } - - public static final int COMPLIANCE_FIELD_NUMBER = 18; - /** - *
-   * A note describing a compliance check.
-   * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - * @return Whether the compliance field is set. - */ - @java.lang.Override - public boolean hasCompliance() { - return typeCase_ == 18; - } - /** - *
-   * A note describing a compliance check.
-   * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - * @return The compliance. - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNote getCompliance() { - if (typeCase_ == 18) { - return (io.grafeas.v1.ComplianceNote) type_; - } - return io.grafeas.v1.ComplianceNote.getDefaultInstance(); - } - /** - *
-   * A note describing a compliance check.
-   * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNoteOrBuilder getComplianceOrBuilder() { - if (typeCase_ == 18) { - return (io.grafeas.v1.ComplianceNote) type_; - } - return io.grafeas.v1.ComplianceNote.getDefaultInstance(); - } - - public static final int DSSE_ATTESTATION_FIELD_NUMBER = 19; - /** - *
-   * A note describing a dsse attestation note.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @return Whether the dsseAttestation field is set. - */ - @java.lang.Override - public boolean hasDsseAttestation() { - return typeCase_ == 19; - } - /** - *
-   * A note describing a dsse attestation note.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @return The dsseAttestation. - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote getDsseAttestation() { - if (typeCase_ == 19) { - return (io.grafeas.v1.DSSEAttestationNote) type_; - } - return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); - } - /** - *
-   * A note describing a dsse attestation note.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder() { - if (typeCase_ == 19) { - return (io.grafeas.v1.DSSEAttestationNote) type_; - } - return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); - } - - public static final int VULNERABILITY_ASSESSMENT_FIELD_NUMBER = 20; - /** - *
-   * A note describing a vulnerability assessment.
-   * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - * @return Whether the vulnerabilityAssessment field is set. - */ - @java.lang.Override - public boolean hasVulnerabilityAssessment() { - return typeCase_ == 20; - } - /** - *
-   * A note describing a vulnerability assessment.
-   * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - * @return The vulnerabilityAssessment. - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNote getVulnerabilityAssessment() { - if (typeCase_ == 20) { - return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; - } - return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); - } - /** - *
-   * A note describing a vulnerability assessment.
-   * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder getVulnerabilityAssessmentOrBuilder() { - if (typeCase_ == 20) { - return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; - } - return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, shortDescription_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, longDescription_); - } - if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { - output.writeEnum(4, kind_); - } - for (int i = 0; i < relatedUrl_.size(); i++) { - output.writeMessage(5, relatedUrl_.get(i)); - } - if (expirationTime_ != null) { - output.writeMessage(6, getExpirationTime()); - } - if (createTime_ != null) { - output.writeMessage(7, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(8, getUpdateTime()); - } - for (int i = 0; i < relatedNoteNames_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, relatedNoteNames_.getRaw(i)); - } - if (typeCase_ == 10) { - output.writeMessage(10, (io.grafeas.v1.VulnerabilityNote) type_); - } - if (typeCase_ == 11) { - output.writeMessage(11, (io.grafeas.v1.BuildNote) type_); - } - if (typeCase_ == 12) { - output.writeMessage(12, (io.grafeas.v1.ImageNote) type_); - } - if (typeCase_ == 13) { - output.writeMessage(13, (io.grafeas.v1.PackageNote) type_); - } - if (typeCase_ == 14) { - output.writeMessage(14, (io.grafeas.v1.DeploymentNote) type_); - } - if (typeCase_ == 15) { - output.writeMessage(15, (io.grafeas.v1.DiscoveryNote) type_); - } - if (typeCase_ == 16) { - output.writeMessage(16, (io.grafeas.v1.AttestationNote) type_); - } - if (typeCase_ == 17) { - output.writeMessage(17, (io.grafeas.v1.UpgradeNote) type_); - } - if (typeCase_ == 18) { - output.writeMessage(18, (io.grafeas.v1.ComplianceNote) type_); - } - if (typeCase_ == 19) { - output.writeMessage(19, (io.grafeas.v1.DSSEAttestationNote) type_); - } - if (typeCase_ == 20) { - output.writeMessage(20, (io.grafeas.v1.VulnerabilityAssessmentNote) type_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, shortDescription_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, longDescription_); - } - if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, kind_); - } - for (int i = 0; i < relatedUrl_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, relatedUrl_.get(i)); - } - if (expirationTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getExpirationTime()); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getUpdateTime()); - } - { - int dataSize = 0; - for (int i = 0; i < relatedNoteNames_.size(); i++) { - dataSize += computeStringSizeNoTag(relatedNoteNames_.getRaw(i)); - } - size += dataSize; - size += 1 * getRelatedNoteNamesList().size(); - } - if (typeCase_ == 10) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, (io.grafeas.v1.VulnerabilityNote) type_); - } - if (typeCase_ == 11) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, (io.grafeas.v1.BuildNote) type_); - } - if (typeCase_ == 12) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, (io.grafeas.v1.ImageNote) type_); - } - if (typeCase_ == 13) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, (io.grafeas.v1.PackageNote) type_); - } - if (typeCase_ == 14) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, (io.grafeas.v1.DeploymentNote) type_); - } - if (typeCase_ == 15) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(15, (io.grafeas.v1.DiscoveryNote) type_); - } - if (typeCase_ == 16) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(16, (io.grafeas.v1.AttestationNote) type_); - } - if (typeCase_ == 17) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(17, (io.grafeas.v1.UpgradeNote) type_); - } - if (typeCase_ == 18) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(18, (io.grafeas.v1.ComplianceNote) type_); - } - if (typeCase_ == 19) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(19, (io.grafeas.v1.DSSEAttestationNote) type_); - } - if (typeCase_ == 20) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(20, (io.grafeas.v1.VulnerabilityAssessmentNote) type_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Note)) { - return super.equals(obj); - } - io.grafeas.v1.Note other = (io.grafeas.v1.Note) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getShortDescription() - .equals(other.getShortDescription())) return false; - if (!getLongDescription() - .equals(other.getLongDescription())) return false; - if (kind_ != other.kind_) return false; - if (!getRelatedUrlList() - .equals(other.getRelatedUrlList())) return false; - if (hasExpirationTime() != other.hasExpirationTime()) return false; - if (hasExpirationTime()) { - if (!getExpirationTime() - .equals(other.getExpirationTime())) return false; - } - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (!getRelatedNoteNamesList() - .equals(other.getRelatedNoteNamesList())) return false; - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 10: - if (!getVulnerability() - .equals(other.getVulnerability())) return false; - break; - case 11: - if (!getBuild() - .equals(other.getBuild())) return false; - break; - case 12: - if (!getImage() - .equals(other.getImage())) return false; - break; - case 13: - if (!getPackage() - .equals(other.getPackage())) return false; - break; - case 14: - if (!getDeployment() - .equals(other.getDeployment())) return false; - break; - case 15: - if (!getDiscovery() - .equals(other.getDiscovery())) return false; - break; - case 16: - if (!getAttestation() - .equals(other.getAttestation())) return false; - break; - case 17: - if (!getUpgrade() - .equals(other.getUpgrade())) return false; - break; - case 18: - if (!getCompliance() - .equals(other.getCompliance())) return false; - break; - case 19: - if (!getDsseAttestation() - .equals(other.getDsseAttestation())) return false; - break; - case 20: - if (!getVulnerabilityAssessment() - .equals(other.getVulnerabilityAssessment())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + SHORT_DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getShortDescription().hashCode(); - hash = (37 * hash) + LONG_DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getLongDescription().hashCode(); - hash = (37 * hash) + KIND_FIELD_NUMBER; - hash = (53 * hash) + kind_; - if (getRelatedUrlCount() > 0) { - hash = (37 * hash) + RELATED_URL_FIELD_NUMBER; - hash = (53 * hash) + getRelatedUrlList().hashCode(); - } - if (hasExpirationTime()) { - hash = (37 * hash) + EXPIRATION_TIME_FIELD_NUMBER; - hash = (53 * hash) + getExpirationTime().hashCode(); - } - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (getRelatedNoteNamesCount() > 0) { - hash = (37 * hash) + RELATED_NOTE_NAMES_FIELD_NUMBER; - hash = (53 * hash) + getRelatedNoteNamesList().hashCode(); - } - switch (typeCase_) { - case 10: - hash = (37 * hash) + VULNERABILITY_FIELD_NUMBER; - hash = (53 * hash) + getVulnerability().hashCode(); - break; - case 11: - hash = (37 * hash) + BUILD_FIELD_NUMBER; - hash = (53 * hash) + getBuild().hashCode(); - break; - case 12: - hash = (37 * hash) + IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getImage().hashCode(); - break; - case 13: - hash = (37 * hash) + PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getPackage().hashCode(); - break; - case 14: - hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER; - hash = (53 * hash) + getDeployment().hashCode(); - break; - case 15: - hash = (37 * hash) + DISCOVERY_FIELD_NUMBER; - hash = (53 * hash) + getDiscovery().hashCode(); - break; - case 16: - hash = (37 * hash) + ATTESTATION_FIELD_NUMBER; - hash = (53 * hash) + getAttestation().hashCode(); - break; - case 17: - hash = (37 * hash) + UPGRADE_FIELD_NUMBER; - hash = (53 * hash) + getUpgrade().hashCode(); - break; - case 18: - hash = (37 * hash) + COMPLIANCE_FIELD_NUMBER; - hash = (53 * hash) + getCompliance().hashCode(); - break; - case 19: - hash = (37 * hash) + DSSE_ATTESTATION_FIELD_NUMBER; - hash = (53 * hash) + getDsseAttestation().hashCode(); - break; - case 20: - hash = (37 * hash) + VULNERABILITY_ASSESSMENT_FIELD_NUMBER; - hash = (53 * hash) + getVulnerabilityAssessment().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Note parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Note parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Note parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Note parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Note parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Note parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Note parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Note parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Note parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Note parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Note parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Note parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Note prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A type of analysis that can be done for a resource.
-   * 
- * - * Protobuf type {@code grafeas.v1.Note} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Note) - io.grafeas.v1.NoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Note.class, io.grafeas.v1.Note.Builder.class); - } - - // Construct using io.grafeas.v1.Note.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - shortDescription_ = ""; - longDescription_ = ""; - kind_ = 0; - if (relatedUrlBuilder_ == null) { - relatedUrl_ = java.util.Collections.emptyList(); - } else { - relatedUrl_ = null; - relatedUrlBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - expirationTime_ = null; - if (expirationTimeBuilder_ != null) { - expirationTimeBuilder_.dispose(); - expirationTimeBuilder_ = null; - } - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000100); - if (vulnerabilityBuilder_ != null) { - vulnerabilityBuilder_.clear(); - } - if (buildBuilder_ != null) { - buildBuilder_.clear(); - } - if (imageBuilder_ != null) { - imageBuilder_.clear(); - } - if (packageBuilder_ != null) { - packageBuilder_.clear(); - } - if (deploymentBuilder_ != null) { - deploymentBuilder_.clear(); - } - if (discoveryBuilder_ != null) { - discoveryBuilder_.clear(); - } - if (attestationBuilder_ != null) { - attestationBuilder_.clear(); - } - if (upgradeBuilder_ != null) { - upgradeBuilder_.clear(); - } - if (complianceBuilder_ != null) { - complianceBuilder_.clear(); - } - if (dsseAttestationBuilder_ != null) { - dsseAttestationBuilder_.clear(); - } - if (vulnerabilityAssessmentBuilder_ != null) { - vulnerabilityAssessmentBuilder_.clear(); - } - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Note_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Note getDefaultInstanceForType() { - return io.grafeas.v1.Note.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Note build() { - io.grafeas.v1.Note result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Note buildPartial() { - io.grafeas.v1.Note result = new io.grafeas.v1.Note(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.Note result) { - if (relatedUrlBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - relatedUrl_ = java.util.Collections.unmodifiableList(relatedUrl_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.relatedUrl_ = relatedUrl_; - } else { - result.relatedUrl_ = relatedUrlBuilder_.build(); - } - if (((bitField0_ & 0x00000100) != 0)) { - relatedNoteNames_ = relatedNoteNames_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.relatedNoteNames_ = relatedNoteNames_; - } - - private void buildPartial0(io.grafeas.v1.Note result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.shortDescription_ = shortDescription_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.longDescription_ = longDescription_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.kind_ = kind_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.expirationTime_ = expirationTimeBuilder_ == null - ? expirationTime_ - : expirationTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.createTime_ = createTimeBuilder_ == null - ? createTime_ - : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null - ? updateTime_ - : updateTimeBuilder_.build(); - } - } - - private void buildPartialOneofs(io.grafeas.v1.Note result) { - result.typeCase_ = typeCase_; - result.type_ = this.type_; - if (typeCase_ == 10 && - vulnerabilityBuilder_ != null) { - result.type_ = vulnerabilityBuilder_.build(); - } - if (typeCase_ == 11 && - buildBuilder_ != null) { - result.type_ = buildBuilder_.build(); - } - if (typeCase_ == 12 && - imageBuilder_ != null) { - result.type_ = imageBuilder_.build(); - } - if (typeCase_ == 13 && - packageBuilder_ != null) { - result.type_ = packageBuilder_.build(); - } - if (typeCase_ == 14 && - deploymentBuilder_ != null) { - result.type_ = deploymentBuilder_.build(); - } - if (typeCase_ == 15 && - discoveryBuilder_ != null) { - result.type_ = discoveryBuilder_.build(); - } - if (typeCase_ == 16 && - attestationBuilder_ != null) { - result.type_ = attestationBuilder_.build(); - } - if (typeCase_ == 17 && - upgradeBuilder_ != null) { - result.type_ = upgradeBuilder_.build(); - } - if (typeCase_ == 18 && - complianceBuilder_ != null) { - result.type_ = complianceBuilder_.build(); - } - if (typeCase_ == 19 && - dsseAttestationBuilder_ != null) { - result.type_ = dsseAttestationBuilder_.build(); - } - if (typeCase_ == 20 && - vulnerabilityAssessmentBuilder_ != null) { - result.type_ = vulnerabilityAssessmentBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Note) { - return mergeFrom((io.grafeas.v1.Note)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Note other) { - if (other == io.grafeas.v1.Note.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getShortDescription().isEmpty()) { - shortDescription_ = other.shortDescription_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getLongDescription().isEmpty()) { - longDescription_ = other.longDescription_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.kind_ != 0) { - setKindValue(other.getKindValue()); - } - if (relatedUrlBuilder_ == null) { - if (!other.relatedUrl_.isEmpty()) { - if (relatedUrl_.isEmpty()) { - relatedUrl_ = other.relatedUrl_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureRelatedUrlIsMutable(); - relatedUrl_.addAll(other.relatedUrl_); - } - onChanged(); - } - } else { - if (!other.relatedUrl_.isEmpty()) { - if (relatedUrlBuilder_.isEmpty()) { - relatedUrlBuilder_.dispose(); - relatedUrlBuilder_ = null; - relatedUrl_ = other.relatedUrl_; - bitField0_ = (bitField0_ & ~0x00000010); - relatedUrlBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRelatedUrlFieldBuilder() : null; - } else { - relatedUrlBuilder_.addAllMessages(other.relatedUrl_); - } - } - } - if (other.hasExpirationTime()) { - mergeExpirationTime(other.getExpirationTime()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (!other.relatedNoteNames_.isEmpty()) { - if (relatedNoteNames_.isEmpty()) { - relatedNoteNames_ = other.relatedNoteNames_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureRelatedNoteNamesIsMutable(); - relatedNoteNames_.addAll(other.relatedNoteNames_); - } - onChanged(); - } - switch (other.getTypeCase()) { - case VULNERABILITY: { - mergeVulnerability(other.getVulnerability()); - break; - } - case BUILD: { - mergeBuild(other.getBuild()); - break; - } - case IMAGE: { - mergeImage(other.getImage()); - break; - } - case PACKAGE: { - mergePackage(other.getPackage()); - break; - } - case DEPLOYMENT: { - mergeDeployment(other.getDeployment()); - break; - } - case DISCOVERY: { - mergeDiscovery(other.getDiscovery()); - break; - } - case ATTESTATION: { - mergeAttestation(other.getAttestation()); - break; - } - case UPGRADE: { - mergeUpgrade(other.getUpgrade()); - break; - } - case COMPLIANCE: { - mergeCompliance(other.getCompliance()); - break; - } - case DSSE_ATTESTATION: { - mergeDsseAttestation(other.getDsseAttestation()); - break; - } - case VULNERABILITY_ASSESSMENT: { - mergeVulnerabilityAssessment(other.getVulnerabilityAssessment()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - shortDescription_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - longDescription_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: { - kind_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: { - io.grafeas.v1.RelatedUrl m = - input.readMessage( - io.grafeas.v1.RelatedUrl.parser(), - extensionRegistry); - if (relatedUrlBuilder_ == null) { - ensureRelatedUrlIsMutable(); - relatedUrl_.add(m); - } else { - relatedUrlBuilder_.addMessage(m); - } - break; - } // case 42 - case 50: { - input.readMessage( - getExpirationTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - input.readMessage( - getCreateTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: { - input.readMessage( - getUpdateTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 66 - case 74: { - java.lang.String s = input.readStringRequireUtf8(); - ensureRelatedNoteNamesIsMutable(); - relatedNoteNames_.add(s); - break; - } // case 74 - case 82: { - input.readMessage( - getVulnerabilityFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 10; - break; - } // case 82 - case 90: { - input.readMessage( - getBuildFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 11; - break; - } // case 90 - case 98: { - input.readMessage( - getImageFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 12; - break; - } // case 98 - case 106: { - input.readMessage( - getPackageFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 13; - break; - } // case 106 - case 114: { - input.readMessage( - getDeploymentFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 14; - break; - } // case 114 - case 122: { - input.readMessage( - getDiscoveryFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 15; - break; - } // case 122 - case 130: { - input.readMessage( - getAttestationFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 16; - break; - } // case 130 - case 138: { - input.readMessage( - getUpgradeFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 17; - break; - } // case 138 - case 146: { - input.readMessage( - getComplianceFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 18; - break; - } // case 146 - case 154: { - input.readMessage( - getDsseAttestationFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 19; - break; - } // case 154 - case 162: { - input.readMessage( - getVulnerabilityAssessmentFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 20; - break; - } // case 162 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Output only. The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Output only. The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Output only. The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object shortDescription_ = ""; - /** - *
-     * A one sentence description of this note.
-     * 
- * - * string short_description = 2; - * @return The shortDescription. - */ - public java.lang.String getShortDescription() { - java.lang.Object ref = shortDescription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - shortDescription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A one sentence description of this note.
-     * 
- * - * string short_description = 2; - * @return The bytes for shortDescription. - */ - public com.google.protobuf.ByteString - getShortDescriptionBytes() { - java.lang.Object ref = shortDescription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - shortDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A one sentence description of this note.
-     * 
- * - * string short_description = 2; - * @param value The shortDescription to set. - * @return This builder for chaining. - */ - public Builder setShortDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - shortDescription_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * A one sentence description of this note.
-     * 
- * - * string short_description = 2; - * @return This builder for chaining. - */ - public Builder clearShortDescription() { - shortDescription_ = getDefaultInstance().getShortDescription(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * A one sentence description of this note.
-     * 
- * - * string short_description = 2; - * @param value The bytes for shortDescription to set. - * @return This builder for chaining. - */ - public Builder setShortDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - shortDescription_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object longDescription_ = ""; - /** - *
-     * A detailed description of this note.
-     * 
- * - * string long_description = 3; - * @return The longDescription. - */ - public java.lang.String getLongDescription() { - java.lang.Object ref = longDescription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - longDescription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A detailed description of this note.
-     * 
- * - * string long_description = 3; - * @return The bytes for longDescription. - */ - public com.google.protobuf.ByteString - getLongDescriptionBytes() { - java.lang.Object ref = longDescription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - longDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A detailed description of this note.
-     * 
- * - * string long_description = 3; - * @param value The longDescription to set. - * @return This builder for chaining. - */ - public Builder setLongDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - longDescription_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * A detailed description of this note.
-     * 
- * - * string long_description = 3; - * @return This builder for chaining. - */ - public Builder clearLongDescription() { - longDescription_ = getDefaultInstance().getLongDescription(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * A detailed description of this note.
-     * 
- * - * string long_description = 3; - * @param value The bytes for longDescription to set. - * @return This builder for chaining. - */ - public Builder setLongDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - longDescription_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private int kind_ = 0; - /** - *
-     * Output only. The type of analysis. This field can be used as a filter in
-     * list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-     * Output only. The type of analysis. This field can be used as a filter in
-     * list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @param value The enum numeric value on the wire for kind to set. - * @return This builder for chaining. - */ - public Builder setKindValue(int value) { - kind_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Output only. The type of analysis. This field can be used as a filter in
-     * list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The kind. - */ - @java.lang.Override - public io.grafeas.v1.NoteKind getKind() { - io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); - return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; - } - /** - *
-     * Output only. The type of analysis. This field can be used as a filter in
-     * list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @param value The kind to set. - * @return This builder for chaining. - */ - public Builder setKind(io.grafeas.v1.NoteKind value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - kind_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. The type of analysis. This field can be used as a filter in
-     * list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return This builder for chaining. - */ - public Builder clearKind() { - bitField0_ = (bitField0_ & ~0x00000008); - kind_ = 0; - onChanged(); - return this; - } - - private java.util.List relatedUrl_ = - java.util.Collections.emptyList(); - private void ensureRelatedUrlIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - relatedUrl_ = new java.util.ArrayList(relatedUrl_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> relatedUrlBuilder_; - - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public java.util.List getRelatedUrlList() { - if (relatedUrlBuilder_ == null) { - return java.util.Collections.unmodifiableList(relatedUrl_); - } else { - return relatedUrlBuilder_.getMessageList(); - } - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public int getRelatedUrlCount() { - if (relatedUrlBuilder_ == null) { - return relatedUrl_.size(); - } else { - return relatedUrlBuilder_.getCount(); - } - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public io.grafeas.v1.RelatedUrl getRelatedUrl(int index) { - if (relatedUrlBuilder_ == null) { - return relatedUrl_.get(index); - } else { - return relatedUrlBuilder_.getMessage(index); - } - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder setRelatedUrl( - int index, io.grafeas.v1.RelatedUrl value) { - if (relatedUrlBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedUrlIsMutable(); - relatedUrl_.set(index, value); - onChanged(); - } else { - relatedUrlBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder setRelatedUrl( - int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { - if (relatedUrlBuilder_ == null) { - ensureRelatedUrlIsMutable(); - relatedUrl_.set(index, builderForValue.build()); - onChanged(); - } else { - relatedUrlBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder addRelatedUrl(io.grafeas.v1.RelatedUrl value) { - if (relatedUrlBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedUrlIsMutable(); - relatedUrl_.add(value); - onChanged(); - } else { - relatedUrlBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder addRelatedUrl( - int index, io.grafeas.v1.RelatedUrl value) { - if (relatedUrlBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedUrlIsMutable(); - relatedUrl_.add(index, value); - onChanged(); - } else { - relatedUrlBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder addRelatedUrl( - io.grafeas.v1.RelatedUrl.Builder builderForValue) { - if (relatedUrlBuilder_ == null) { - ensureRelatedUrlIsMutable(); - relatedUrl_.add(builderForValue.build()); - onChanged(); - } else { - relatedUrlBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder addRelatedUrl( - int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { - if (relatedUrlBuilder_ == null) { - ensureRelatedUrlIsMutable(); - relatedUrl_.add(index, builderForValue.build()); - onChanged(); - } else { - relatedUrlBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder addAllRelatedUrl( - java.lang.Iterable values) { - if (relatedUrlBuilder_ == null) { - ensureRelatedUrlIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, relatedUrl_); - onChanged(); - } else { - relatedUrlBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder clearRelatedUrl() { - if (relatedUrlBuilder_ == null) { - relatedUrl_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - relatedUrlBuilder_.clear(); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public Builder removeRelatedUrl(int index) { - if (relatedUrlBuilder_ == null) { - ensureRelatedUrlIsMutable(); - relatedUrl_.remove(index); - onChanged(); - } else { - relatedUrlBuilder_.remove(index); - } - return this; - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public io.grafeas.v1.RelatedUrl.Builder getRelatedUrlBuilder( - int index) { - return getRelatedUrlFieldBuilder().getBuilder(index); - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlOrBuilder( - int index) { - if (relatedUrlBuilder_ == null) { - return relatedUrl_.get(index); } else { - return relatedUrlBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public java.util.List - getRelatedUrlOrBuilderList() { - if (relatedUrlBuilder_ != null) { - return relatedUrlBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(relatedUrl_); - } - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlBuilder() { - return getRelatedUrlFieldBuilder().addBuilder( - io.grafeas.v1.RelatedUrl.getDefaultInstance()); - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlBuilder( - int index) { - return getRelatedUrlFieldBuilder().addBuilder( - index, io.grafeas.v1.RelatedUrl.getDefaultInstance()); - } - /** - *
-     * URLs associated with this note.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - public java.util.List - getRelatedUrlBuilderList() { - return getRelatedUrlFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> - getRelatedUrlFieldBuilder() { - if (relatedUrlBuilder_ == null) { - relatedUrlBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder>( - relatedUrl_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - relatedUrl_ = null; - } - return relatedUrlBuilder_; - } - - private com.google.protobuf.Timestamp expirationTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expirationTimeBuilder_; - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - * @return Whether the expirationTime field is set. - */ - public boolean hasExpirationTime() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - * @return The expirationTime. - */ - public com.google.protobuf.Timestamp getExpirationTime() { - if (expirationTimeBuilder_ == null) { - return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; - } else { - return expirationTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - public Builder setExpirationTime(com.google.protobuf.Timestamp value) { - if (expirationTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - expirationTime_ = value; - } else { - expirationTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - public Builder setExpirationTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (expirationTimeBuilder_ == null) { - expirationTime_ = builderForValue.build(); - } else { - expirationTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - public Builder mergeExpirationTime(com.google.protobuf.Timestamp value) { - if (expirationTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - expirationTime_ != null && - expirationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getExpirationTimeBuilder().mergeFrom(value); - } else { - expirationTime_ = value; - } - } else { - expirationTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - public Builder clearExpirationTime() { - bitField0_ = (bitField0_ & ~0x00000020); - expirationTime_ = null; - if (expirationTimeBuilder_ != null) { - expirationTimeBuilder_.dispose(); - expirationTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - public com.google.protobuf.Timestamp.Builder getExpirationTimeBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getExpirationTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { - if (expirationTimeBuilder_ != null) { - return expirationTimeBuilder_.getMessageOrBuilder(); - } else { - return expirationTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; - } - } - /** - *
-     * Time of expiration for this note. Empty if note does not expire.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getExpirationTimeFieldBuilder() { - if (expirationTimeBuilder_ == null) { - expirationTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getExpirationTime(), - getParentForChildren(), - isClean()); - expirationTime_ = null; - } - return expirationTimeBuilder_; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - createTime_ != null && - createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000040); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The time this note was created. This field can be used as a
-     * filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) && - updateTime_ != null && - updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000080); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * Output only. The time this note was last updated. This field can be used as
-     * a filter in list requests.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.LazyStringList relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureRelatedNoteNamesIsMutable() { - if (!((bitField0_ & 0x00000100) != 0)) { - relatedNoteNames_ = new com.google.protobuf.LazyStringArrayList(relatedNoteNames_); - bitField0_ |= 0x00000100; - } - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @return A list containing the relatedNoteNames. - */ - public com.google.protobuf.ProtocolStringList - getRelatedNoteNamesList() { - return relatedNoteNames_.getUnmodifiableView(); - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @return The count of relatedNoteNames. - */ - public int getRelatedNoteNamesCount() { - return relatedNoteNames_.size(); - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @param index The index of the element to return. - * @return The relatedNoteNames at the given index. - */ - public java.lang.String getRelatedNoteNames(int index) { - return relatedNoteNames_.get(index); - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @param index The index of the value to return. - * @return The bytes of the relatedNoteNames at the given index. - */ - public com.google.protobuf.ByteString - getRelatedNoteNamesBytes(int index) { - return relatedNoteNames_.getByteString(index); - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @param index The index to set the value at. - * @param value The relatedNoteNames to set. - * @return This builder for chaining. - */ - public Builder setRelatedNoteNames( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureRelatedNoteNamesIsMutable(); - relatedNoteNames_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @param value The relatedNoteNames to add. - * @return This builder for chaining. - */ - public Builder addRelatedNoteNames( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureRelatedNoteNamesIsMutable(); - relatedNoteNames_.add(value); - onChanged(); - return this; - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @param values The relatedNoteNames to add. - * @return This builder for chaining. - */ - public Builder addAllRelatedNoteNames( - java.lang.Iterable values) { - ensureRelatedNoteNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, relatedNoteNames_); - onChanged(); - return this; - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @return This builder for chaining. - */ - public Builder clearRelatedNoteNames() { - relatedNoteNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - *
-     * Other notes related to this note.
-     * 
- * - * repeated string related_note_names = 9; - * @param value The bytes of the relatedNoteNames to add. - * @return This builder for chaining. - */ - public Builder addRelatedNoteNamesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureRelatedNoteNamesIsMutable(); - relatedNoteNames_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote, io.grafeas.v1.VulnerabilityNote.Builder, io.grafeas.v1.VulnerabilityNoteOrBuilder> vulnerabilityBuilder_; - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @return Whether the vulnerability field is set. - */ - @java.lang.Override - public boolean hasVulnerability() { - return typeCase_ == 10; - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @return The vulnerability. - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote getVulnerability() { - if (vulnerabilityBuilder_ == null) { - if (typeCase_ == 10) { - return (io.grafeas.v1.VulnerabilityNote) type_; - } - return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); - } else { - if (typeCase_ == 10) { - return vulnerabilityBuilder_.getMessage(); - } - return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - public Builder setVulnerability(io.grafeas.v1.VulnerabilityNote value) { - if (vulnerabilityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - vulnerabilityBuilder_.setMessage(value); - } - typeCase_ = 10; - return this; - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - public Builder setVulnerability( - io.grafeas.v1.VulnerabilityNote.Builder builderForValue) { - if (vulnerabilityBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - vulnerabilityBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 10; - return this; - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - public Builder mergeVulnerability(io.grafeas.v1.VulnerabilityNote value) { - if (vulnerabilityBuilder_ == null) { - if (typeCase_ == 10 && - type_ != io.grafeas.v1.VulnerabilityNote.getDefaultInstance()) { - type_ = io.grafeas.v1.VulnerabilityNote.newBuilder((io.grafeas.v1.VulnerabilityNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 10) { - vulnerabilityBuilder_.mergeFrom(value); - } else { - vulnerabilityBuilder_.setMessage(value); - } - } - typeCase_ = 10; - return this; - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - public Builder clearVulnerability() { - if (vulnerabilityBuilder_ == null) { - if (typeCase_ == 10) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 10) { - typeCase_ = 0; - type_ = null; - } - vulnerabilityBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - public io.grafeas.v1.VulnerabilityNote.Builder getVulnerabilityBuilder() { - return getVulnerabilityFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNoteOrBuilder getVulnerabilityOrBuilder() { - if ((typeCase_ == 10) && (vulnerabilityBuilder_ != null)) { - return vulnerabilityBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 10) { - return (io.grafeas.v1.VulnerabilityNote) type_; - } - return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a package vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote, io.grafeas.v1.VulnerabilityNote.Builder, io.grafeas.v1.VulnerabilityNoteOrBuilder> - getVulnerabilityFieldBuilder() { - if (vulnerabilityBuilder_ == null) { - if (!(typeCase_ == 10)) { - type_ = io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); - } - vulnerabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote, io.grafeas.v1.VulnerabilityNote.Builder, io.grafeas.v1.VulnerabilityNoteOrBuilder>( - (io.grafeas.v1.VulnerabilityNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 10; - onChanged(); - return vulnerabilityBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildNote, io.grafeas.v1.BuildNote.Builder, io.grafeas.v1.BuildNoteOrBuilder> buildBuilder_; - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - * @return Whether the build field is set. - */ - @java.lang.Override - public boolean hasBuild() { - return typeCase_ == 11; - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - * @return The build. - */ - @java.lang.Override - public io.grafeas.v1.BuildNote getBuild() { - if (buildBuilder_ == null) { - if (typeCase_ == 11) { - return (io.grafeas.v1.BuildNote) type_; - } - return io.grafeas.v1.BuildNote.getDefaultInstance(); - } else { - if (typeCase_ == 11) { - return buildBuilder_.getMessage(); - } - return io.grafeas.v1.BuildNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - public Builder setBuild(io.grafeas.v1.BuildNote value) { - if (buildBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - buildBuilder_.setMessage(value); - } - typeCase_ = 11; - return this; - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - public Builder setBuild( - io.grafeas.v1.BuildNote.Builder builderForValue) { - if (buildBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - buildBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 11; - return this; - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - public Builder mergeBuild(io.grafeas.v1.BuildNote value) { - if (buildBuilder_ == null) { - if (typeCase_ == 11 && - type_ != io.grafeas.v1.BuildNote.getDefaultInstance()) { - type_ = io.grafeas.v1.BuildNote.newBuilder((io.grafeas.v1.BuildNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 11) { - buildBuilder_.mergeFrom(value); - } else { - buildBuilder_.setMessage(value); - } - } - typeCase_ = 11; - return this; - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - public Builder clearBuild() { - if (buildBuilder_ == null) { - if (typeCase_ == 11) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 11) { - typeCase_ = 0; - type_ = null; - } - buildBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - public io.grafeas.v1.BuildNote.Builder getBuildBuilder() { - return getBuildFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - @java.lang.Override - public io.grafeas.v1.BuildNoteOrBuilder getBuildOrBuilder() { - if ((typeCase_ == 11) && (buildBuilder_ != null)) { - return buildBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 11) { - return (io.grafeas.v1.BuildNote) type_; - } - return io.grafeas.v1.BuildNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing build provenance for a verifiable build.
-     * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildNote, io.grafeas.v1.BuildNote.Builder, io.grafeas.v1.BuildNoteOrBuilder> - getBuildFieldBuilder() { - if (buildBuilder_ == null) { - if (!(typeCase_ == 11)) { - type_ = io.grafeas.v1.BuildNote.getDefaultInstance(); - } - buildBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildNote, io.grafeas.v1.BuildNote.Builder, io.grafeas.v1.BuildNoteOrBuilder>( - (io.grafeas.v1.BuildNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 11; - onChanged(); - return buildBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ImageNote, io.grafeas.v1.ImageNote.Builder, io.grafeas.v1.ImageNoteOrBuilder> imageBuilder_; - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - * @return Whether the image field is set. - */ - @java.lang.Override - public boolean hasImage() { - return typeCase_ == 12; - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - * @return The image. - */ - @java.lang.Override - public io.grafeas.v1.ImageNote getImage() { - if (imageBuilder_ == null) { - if (typeCase_ == 12) { - return (io.grafeas.v1.ImageNote) type_; - } - return io.grafeas.v1.ImageNote.getDefaultInstance(); - } else { - if (typeCase_ == 12) { - return imageBuilder_.getMessage(); - } - return io.grafeas.v1.ImageNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - public Builder setImage(io.grafeas.v1.ImageNote value) { - if (imageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - imageBuilder_.setMessage(value); - } - typeCase_ = 12; - return this; - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - public Builder setImage( - io.grafeas.v1.ImageNote.Builder builderForValue) { - if (imageBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - imageBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 12; - return this; - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - public Builder mergeImage(io.grafeas.v1.ImageNote value) { - if (imageBuilder_ == null) { - if (typeCase_ == 12 && - type_ != io.grafeas.v1.ImageNote.getDefaultInstance()) { - type_ = io.grafeas.v1.ImageNote.newBuilder((io.grafeas.v1.ImageNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 12) { - imageBuilder_.mergeFrom(value); - } else { - imageBuilder_.setMessage(value); - } - } - typeCase_ = 12; - return this; - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - public Builder clearImage() { - if (imageBuilder_ == null) { - if (typeCase_ == 12) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 12) { - typeCase_ = 0; - type_ = null; - } - imageBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - public io.grafeas.v1.ImageNote.Builder getImageBuilder() { - return getImageFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - @java.lang.Override - public io.grafeas.v1.ImageNoteOrBuilder getImageOrBuilder() { - if ((typeCase_ == 12) && (imageBuilder_ != null)) { - return imageBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 12) { - return (io.grafeas.v1.ImageNote) type_; - } - return io.grafeas.v1.ImageNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a base image.
-     * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ImageNote, io.grafeas.v1.ImageNote.Builder, io.grafeas.v1.ImageNoteOrBuilder> - getImageFieldBuilder() { - if (imageBuilder_ == null) { - if (!(typeCase_ == 12)) { - type_ = io.grafeas.v1.ImageNote.getDefaultInstance(); - } - imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ImageNote, io.grafeas.v1.ImageNote.Builder, io.grafeas.v1.ImageNoteOrBuilder>( - (io.grafeas.v1.ImageNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 12; - onChanged(); - return imageBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.PackageNote, io.grafeas.v1.PackageNote.Builder, io.grafeas.v1.PackageNoteOrBuilder> packageBuilder_; - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - * @return Whether the package field is set. - */ - @java.lang.Override - public boolean hasPackage() { - return typeCase_ == 13; - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - * @return The package. - */ - @java.lang.Override - public io.grafeas.v1.PackageNote getPackage() { - if (packageBuilder_ == null) { - if (typeCase_ == 13) { - return (io.grafeas.v1.PackageNote) type_; - } - return io.grafeas.v1.PackageNote.getDefaultInstance(); - } else { - if (typeCase_ == 13) { - return packageBuilder_.getMessage(); - } - return io.grafeas.v1.PackageNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - public Builder setPackage(io.grafeas.v1.PackageNote value) { - if (packageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - packageBuilder_.setMessage(value); - } - typeCase_ = 13; - return this; - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - public Builder setPackage( - io.grafeas.v1.PackageNote.Builder builderForValue) { - if (packageBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - packageBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 13; - return this; - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - public Builder mergePackage(io.grafeas.v1.PackageNote value) { - if (packageBuilder_ == null) { - if (typeCase_ == 13 && - type_ != io.grafeas.v1.PackageNote.getDefaultInstance()) { - type_ = io.grafeas.v1.PackageNote.newBuilder((io.grafeas.v1.PackageNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 13) { - packageBuilder_.mergeFrom(value); - } else { - packageBuilder_.setMessage(value); - } - } - typeCase_ = 13; - return this; - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - public Builder clearPackage() { - if (packageBuilder_ == null) { - if (typeCase_ == 13) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 13) { - typeCase_ = 0; - type_ = null; - } - packageBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - public io.grafeas.v1.PackageNote.Builder getPackageBuilder() { - return getPackageFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - @java.lang.Override - public io.grafeas.v1.PackageNoteOrBuilder getPackageOrBuilder() { - if ((typeCase_ == 13) && (packageBuilder_ != null)) { - return packageBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 13) { - return (io.grafeas.v1.PackageNote) type_; - } - return io.grafeas.v1.PackageNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a package hosted by various package managers.
-     * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.PackageNote, io.grafeas.v1.PackageNote.Builder, io.grafeas.v1.PackageNoteOrBuilder> - getPackageFieldBuilder() { - if (packageBuilder_ == null) { - if (!(typeCase_ == 13)) { - type_ = io.grafeas.v1.PackageNote.getDefaultInstance(); - } - packageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.PackageNote, io.grafeas.v1.PackageNote.Builder, io.grafeas.v1.PackageNoteOrBuilder>( - (io.grafeas.v1.PackageNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 13; - onChanged(); - return packageBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DeploymentNote, io.grafeas.v1.DeploymentNote.Builder, io.grafeas.v1.DeploymentNoteOrBuilder> deploymentBuilder_; - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - * @return Whether the deployment field is set. - */ - @java.lang.Override - public boolean hasDeployment() { - return typeCase_ == 14; - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - * @return The deployment. - */ - @java.lang.Override - public io.grafeas.v1.DeploymentNote getDeployment() { - if (deploymentBuilder_ == null) { - if (typeCase_ == 14) { - return (io.grafeas.v1.DeploymentNote) type_; - } - return io.grafeas.v1.DeploymentNote.getDefaultInstance(); - } else { - if (typeCase_ == 14) { - return deploymentBuilder_.getMessage(); - } - return io.grafeas.v1.DeploymentNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - public Builder setDeployment(io.grafeas.v1.DeploymentNote value) { - if (deploymentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - deploymentBuilder_.setMessage(value); - } - typeCase_ = 14; - return this; - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - public Builder setDeployment( - io.grafeas.v1.DeploymentNote.Builder builderForValue) { - if (deploymentBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - deploymentBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 14; - return this; - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - public Builder mergeDeployment(io.grafeas.v1.DeploymentNote value) { - if (deploymentBuilder_ == null) { - if (typeCase_ == 14 && - type_ != io.grafeas.v1.DeploymentNote.getDefaultInstance()) { - type_ = io.grafeas.v1.DeploymentNote.newBuilder((io.grafeas.v1.DeploymentNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 14) { - deploymentBuilder_.mergeFrom(value); - } else { - deploymentBuilder_.setMessage(value); - } - } - typeCase_ = 14; - return this; - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - public Builder clearDeployment() { - if (deploymentBuilder_ == null) { - if (typeCase_ == 14) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 14) { - typeCase_ = 0; - type_ = null; - } - deploymentBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - public io.grafeas.v1.DeploymentNote.Builder getDeploymentBuilder() { - return getDeploymentFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - @java.lang.Override - public io.grafeas.v1.DeploymentNoteOrBuilder getDeploymentOrBuilder() { - if ((typeCase_ == 14) && (deploymentBuilder_ != null)) { - return deploymentBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 14) { - return (io.grafeas.v1.DeploymentNote) type_; - } - return io.grafeas.v1.DeploymentNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing something that can be deployed.
-     * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DeploymentNote, io.grafeas.v1.DeploymentNote.Builder, io.grafeas.v1.DeploymentNoteOrBuilder> - getDeploymentFieldBuilder() { - if (deploymentBuilder_ == null) { - if (!(typeCase_ == 14)) { - type_ = io.grafeas.v1.DeploymentNote.getDefaultInstance(); - } - deploymentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DeploymentNote, io.grafeas.v1.DeploymentNote.Builder, io.grafeas.v1.DeploymentNoteOrBuilder>( - (io.grafeas.v1.DeploymentNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 14; - onChanged(); - return deploymentBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryNote, io.grafeas.v1.DiscoveryNote.Builder, io.grafeas.v1.DiscoveryNoteOrBuilder> discoveryBuilder_; - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - * @return Whether the discovery field is set. - */ - @java.lang.Override - public boolean hasDiscovery() { - return typeCase_ == 15; - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - * @return The discovery. - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryNote getDiscovery() { - if (discoveryBuilder_ == null) { - if (typeCase_ == 15) { - return (io.grafeas.v1.DiscoveryNote) type_; - } - return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); - } else { - if (typeCase_ == 15) { - return discoveryBuilder_.getMessage(); - } - return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - public Builder setDiscovery(io.grafeas.v1.DiscoveryNote value) { - if (discoveryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - discoveryBuilder_.setMessage(value); - } - typeCase_ = 15; - return this; - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - public Builder setDiscovery( - io.grafeas.v1.DiscoveryNote.Builder builderForValue) { - if (discoveryBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - discoveryBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 15; - return this; - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - public Builder mergeDiscovery(io.grafeas.v1.DiscoveryNote value) { - if (discoveryBuilder_ == null) { - if (typeCase_ == 15 && - type_ != io.grafeas.v1.DiscoveryNote.getDefaultInstance()) { - type_ = io.grafeas.v1.DiscoveryNote.newBuilder((io.grafeas.v1.DiscoveryNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 15) { - discoveryBuilder_.mergeFrom(value); - } else { - discoveryBuilder_.setMessage(value); - } - } - typeCase_ = 15; - return this; - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - public Builder clearDiscovery() { - if (discoveryBuilder_ == null) { - if (typeCase_ == 15) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 15) { - typeCase_ = 0; - type_ = null; - } - discoveryBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - public io.grafeas.v1.DiscoveryNote.Builder getDiscoveryBuilder() { - return getDiscoveryFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryNoteOrBuilder getDiscoveryOrBuilder() { - if ((typeCase_ == 15) && (discoveryBuilder_ != null)) { - return discoveryBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 15) { - return (io.grafeas.v1.DiscoveryNote) type_; - } - return io.grafeas.v1.DiscoveryNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing the initial analysis of a resource.
-     * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryNote, io.grafeas.v1.DiscoveryNote.Builder, io.grafeas.v1.DiscoveryNoteOrBuilder> - getDiscoveryFieldBuilder() { - if (discoveryBuilder_ == null) { - if (!(typeCase_ == 15)) { - type_ = io.grafeas.v1.DiscoveryNote.getDefaultInstance(); - } - discoveryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryNote, io.grafeas.v1.DiscoveryNote.Builder, io.grafeas.v1.DiscoveryNoteOrBuilder>( - (io.grafeas.v1.DiscoveryNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 15; - onChanged(); - return discoveryBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationNote, io.grafeas.v1.AttestationNote.Builder, io.grafeas.v1.AttestationNoteOrBuilder> attestationBuilder_; - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - * @return Whether the attestation field is set. - */ - @java.lang.Override - public boolean hasAttestation() { - return typeCase_ == 16; - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - * @return The attestation. - */ - @java.lang.Override - public io.grafeas.v1.AttestationNote getAttestation() { - if (attestationBuilder_ == null) { - if (typeCase_ == 16) { - return (io.grafeas.v1.AttestationNote) type_; - } - return io.grafeas.v1.AttestationNote.getDefaultInstance(); - } else { - if (typeCase_ == 16) { - return attestationBuilder_.getMessage(); - } - return io.grafeas.v1.AttestationNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - public Builder setAttestation(io.grafeas.v1.AttestationNote value) { - if (attestationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - attestationBuilder_.setMessage(value); - } - typeCase_ = 16; - return this; - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - public Builder setAttestation( - io.grafeas.v1.AttestationNote.Builder builderForValue) { - if (attestationBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - attestationBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 16; - return this; - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - public Builder mergeAttestation(io.grafeas.v1.AttestationNote value) { - if (attestationBuilder_ == null) { - if (typeCase_ == 16 && - type_ != io.grafeas.v1.AttestationNote.getDefaultInstance()) { - type_ = io.grafeas.v1.AttestationNote.newBuilder((io.grafeas.v1.AttestationNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 16) { - attestationBuilder_.mergeFrom(value); - } else { - attestationBuilder_.setMessage(value); - } - } - typeCase_ = 16; - return this; - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - public Builder clearAttestation() { - if (attestationBuilder_ == null) { - if (typeCase_ == 16) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 16) { - typeCase_ = 0; - type_ = null; - } - attestationBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - public io.grafeas.v1.AttestationNote.Builder getAttestationBuilder() { - return getAttestationFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - @java.lang.Override - public io.grafeas.v1.AttestationNoteOrBuilder getAttestationOrBuilder() { - if ((typeCase_ == 16) && (attestationBuilder_ != null)) { - return attestationBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 16) { - return (io.grafeas.v1.AttestationNote) type_; - } - return io.grafeas.v1.AttestationNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing an attestation role.
-     * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationNote, io.grafeas.v1.AttestationNote.Builder, io.grafeas.v1.AttestationNoteOrBuilder> - getAttestationFieldBuilder() { - if (attestationBuilder_ == null) { - if (!(typeCase_ == 16)) { - type_ = io.grafeas.v1.AttestationNote.getDefaultInstance(); - } - attestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationNote, io.grafeas.v1.AttestationNote.Builder, io.grafeas.v1.AttestationNoteOrBuilder>( - (io.grafeas.v1.AttestationNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 16; - onChanged(); - return attestationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeNote, io.grafeas.v1.UpgradeNote.Builder, io.grafeas.v1.UpgradeNoteOrBuilder> upgradeBuilder_; - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - * @return Whether the upgrade field is set. - */ - @java.lang.Override - public boolean hasUpgrade() { - return typeCase_ == 17; - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - * @return The upgrade. - */ - @java.lang.Override - public io.grafeas.v1.UpgradeNote getUpgrade() { - if (upgradeBuilder_ == null) { - if (typeCase_ == 17) { - return (io.grafeas.v1.UpgradeNote) type_; - } - return io.grafeas.v1.UpgradeNote.getDefaultInstance(); - } else { - if (typeCase_ == 17) { - return upgradeBuilder_.getMessage(); - } - return io.grafeas.v1.UpgradeNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - public Builder setUpgrade(io.grafeas.v1.UpgradeNote value) { - if (upgradeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - upgradeBuilder_.setMessage(value); - } - typeCase_ = 17; - return this; - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - public Builder setUpgrade( - io.grafeas.v1.UpgradeNote.Builder builderForValue) { - if (upgradeBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - upgradeBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 17; - return this; - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - public Builder mergeUpgrade(io.grafeas.v1.UpgradeNote value) { - if (upgradeBuilder_ == null) { - if (typeCase_ == 17 && - type_ != io.grafeas.v1.UpgradeNote.getDefaultInstance()) { - type_ = io.grafeas.v1.UpgradeNote.newBuilder((io.grafeas.v1.UpgradeNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 17) { - upgradeBuilder_.mergeFrom(value); - } else { - upgradeBuilder_.setMessage(value); - } - } - typeCase_ = 17; - return this; - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - public Builder clearUpgrade() { - if (upgradeBuilder_ == null) { - if (typeCase_ == 17) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 17) { - typeCase_ = 0; - type_ = null; - } - upgradeBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - public io.grafeas.v1.UpgradeNote.Builder getUpgradeBuilder() { - return getUpgradeFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - @java.lang.Override - public io.grafeas.v1.UpgradeNoteOrBuilder getUpgradeOrBuilder() { - if ((typeCase_ == 17) && (upgradeBuilder_ != null)) { - return upgradeBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 17) { - return (io.grafeas.v1.UpgradeNote) type_; - } - return io.grafeas.v1.UpgradeNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing available package upgrades.
-     * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeNote, io.grafeas.v1.UpgradeNote.Builder, io.grafeas.v1.UpgradeNoteOrBuilder> - getUpgradeFieldBuilder() { - if (upgradeBuilder_ == null) { - if (!(typeCase_ == 17)) { - type_ = io.grafeas.v1.UpgradeNote.getDefaultInstance(); - } - upgradeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeNote, io.grafeas.v1.UpgradeNote.Builder, io.grafeas.v1.UpgradeNoteOrBuilder>( - (io.grafeas.v1.UpgradeNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 17; - onChanged(); - return upgradeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceNote, io.grafeas.v1.ComplianceNote.Builder, io.grafeas.v1.ComplianceNoteOrBuilder> complianceBuilder_; - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - * @return Whether the compliance field is set. - */ - @java.lang.Override - public boolean hasCompliance() { - return typeCase_ == 18; - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - * @return The compliance. - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNote getCompliance() { - if (complianceBuilder_ == null) { - if (typeCase_ == 18) { - return (io.grafeas.v1.ComplianceNote) type_; - } - return io.grafeas.v1.ComplianceNote.getDefaultInstance(); - } else { - if (typeCase_ == 18) { - return complianceBuilder_.getMessage(); - } - return io.grafeas.v1.ComplianceNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - public Builder setCompliance(io.grafeas.v1.ComplianceNote value) { - if (complianceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - complianceBuilder_.setMessage(value); - } - typeCase_ = 18; - return this; - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - public Builder setCompliance( - io.grafeas.v1.ComplianceNote.Builder builderForValue) { - if (complianceBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - complianceBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 18; - return this; - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - public Builder mergeCompliance(io.grafeas.v1.ComplianceNote value) { - if (complianceBuilder_ == null) { - if (typeCase_ == 18 && - type_ != io.grafeas.v1.ComplianceNote.getDefaultInstance()) { - type_ = io.grafeas.v1.ComplianceNote.newBuilder((io.grafeas.v1.ComplianceNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 18) { - complianceBuilder_.mergeFrom(value); - } else { - complianceBuilder_.setMessage(value); - } - } - typeCase_ = 18; - return this; - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - public Builder clearCompliance() { - if (complianceBuilder_ == null) { - if (typeCase_ == 18) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 18) { - typeCase_ = 0; - type_ = null; - } - complianceBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - public io.grafeas.v1.ComplianceNote.Builder getComplianceBuilder() { - return getComplianceFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceNoteOrBuilder getComplianceOrBuilder() { - if ((typeCase_ == 18) && (complianceBuilder_ != null)) { - return complianceBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 18) { - return (io.grafeas.v1.ComplianceNote) type_; - } - return io.grafeas.v1.ComplianceNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a compliance check.
-     * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceNote, io.grafeas.v1.ComplianceNote.Builder, io.grafeas.v1.ComplianceNoteOrBuilder> - getComplianceFieldBuilder() { - if (complianceBuilder_ == null) { - if (!(typeCase_ == 18)) { - type_ = io.grafeas.v1.ComplianceNote.getDefaultInstance(); - } - complianceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceNote, io.grafeas.v1.ComplianceNote.Builder, io.grafeas.v1.ComplianceNoteOrBuilder>( - (io.grafeas.v1.ComplianceNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 18; - onChanged(); - return complianceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationNote, io.grafeas.v1.DSSEAttestationNote.Builder, io.grafeas.v1.DSSEAttestationNoteOrBuilder> dsseAttestationBuilder_; - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @return Whether the dsseAttestation field is set. - */ - @java.lang.Override - public boolean hasDsseAttestation() { - return typeCase_ == 19; - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @return The dsseAttestation. - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNote getDsseAttestation() { - if (dsseAttestationBuilder_ == null) { - if (typeCase_ == 19) { - return (io.grafeas.v1.DSSEAttestationNote) type_; - } - return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); - } else { - if (typeCase_ == 19) { - return dsseAttestationBuilder_.getMessage(); - } - return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - public Builder setDsseAttestation(io.grafeas.v1.DSSEAttestationNote value) { - if (dsseAttestationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - dsseAttestationBuilder_.setMessage(value); - } - typeCase_ = 19; - return this; - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - public Builder setDsseAttestation( - io.grafeas.v1.DSSEAttestationNote.Builder builderForValue) { - if (dsseAttestationBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - dsseAttestationBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 19; - return this; - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - public Builder mergeDsseAttestation(io.grafeas.v1.DSSEAttestationNote value) { - if (dsseAttestationBuilder_ == null) { - if (typeCase_ == 19 && - type_ != io.grafeas.v1.DSSEAttestationNote.getDefaultInstance()) { - type_ = io.grafeas.v1.DSSEAttestationNote.newBuilder((io.grafeas.v1.DSSEAttestationNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 19) { - dsseAttestationBuilder_.mergeFrom(value); - } else { - dsseAttestationBuilder_.setMessage(value); - } - } - typeCase_ = 19; - return this; - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - public Builder clearDsseAttestation() { - if (dsseAttestationBuilder_ == null) { - if (typeCase_ == 19) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 19) { - typeCase_ = 0; - type_ = null; - } - dsseAttestationBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - public io.grafeas.v1.DSSEAttestationNote.Builder getDsseAttestationBuilder() { - return getDsseAttestationFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder() { - if ((typeCase_ == 19) && (dsseAttestationBuilder_ != null)) { - return dsseAttestationBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 19) { - return (io.grafeas.v1.DSSEAttestationNote) type_; - } - return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a dsse attestation note.
-     * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationNote, io.grafeas.v1.DSSEAttestationNote.Builder, io.grafeas.v1.DSSEAttestationNoteOrBuilder> - getDsseAttestationFieldBuilder() { - if (dsseAttestationBuilder_ == null) { - if (!(typeCase_ == 19)) { - type_ = io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); - } - dsseAttestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationNote, io.grafeas.v1.DSSEAttestationNote.Builder, io.grafeas.v1.DSSEAttestationNoteOrBuilder>( - (io.grafeas.v1.DSSEAttestationNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 19; - onChanged(); - return dsseAttestationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote, io.grafeas.v1.VulnerabilityAssessmentNote.Builder, io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder> vulnerabilityAssessmentBuilder_; - /** - *
-     * A note describing a vulnerability assessment.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - * @return Whether the vulnerabilityAssessment field is set. - */ - @java.lang.Override - public boolean hasVulnerabilityAssessment() { - return typeCase_ == 20; - } - /** - *
-     * A note describing a vulnerability assessment.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - * @return The vulnerabilityAssessment. - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNote getVulnerabilityAssessment() { - if (vulnerabilityAssessmentBuilder_ == null) { - if (typeCase_ == 20) { - return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; - } - return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); - } else { - if (typeCase_ == 20) { - return vulnerabilityAssessmentBuilder_.getMessage(); - } - return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a vulnerability assessment.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - */ - public Builder setVulnerabilityAssessment(io.grafeas.v1.VulnerabilityAssessmentNote value) { - if (vulnerabilityAssessmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - vulnerabilityAssessmentBuilder_.setMessage(value); - } - typeCase_ = 20; - return this; - } - /** - *
-     * A note describing a vulnerability assessment.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - */ - public Builder setVulnerabilityAssessment( - io.grafeas.v1.VulnerabilityAssessmentNote.Builder builderForValue) { - if (vulnerabilityAssessmentBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - vulnerabilityAssessmentBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 20; - return this; - } - /** - *
-     * A note describing a vulnerability assessment.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - */ - public Builder mergeVulnerabilityAssessment(io.grafeas.v1.VulnerabilityAssessmentNote value) { - if (vulnerabilityAssessmentBuilder_ == null) { - if (typeCase_ == 20 && - type_ != io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance()) { - type_ = io.grafeas.v1.VulnerabilityAssessmentNote.newBuilder((io.grafeas.v1.VulnerabilityAssessmentNote) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 20) { - vulnerabilityAssessmentBuilder_.mergeFrom(value); - } else { - vulnerabilityAssessmentBuilder_.setMessage(value); - } - } - typeCase_ = 20; - return this; - } - /** - *
-     * A note describing a vulnerability assessment.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - */ - public Builder clearVulnerabilityAssessment() { - if (vulnerabilityAssessmentBuilder_ == null) { - if (typeCase_ == 20) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 20) { - typeCase_ = 0; - type_ = null; - } - vulnerabilityAssessmentBuilder_.clear(); - } - return this; - } - /** - *
-     * A note describing a vulnerability assessment.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Builder getVulnerabilityAssessmentBuilder() { - return getVulnerabilityAssessmentFieldBuilder().getBuilder(); - } - /** - *
-     * A note describing a vulnerability assessment.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder getVulnerabilityAssessmentOrBuilder() { - if ((typeCase_ == 20) && (vulnerabilityAssessmentBuilder_ != null)) { - return vulnerabilityAssessmentBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 20) { - return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; - } - return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); - } - } - /** - *
-     * A note describing a vulnerability assessment.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote, io.grafeas.v1.VulnerabilityAssessmentNote.Builder, io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder> - getVulnerabilityAssessmentFieldBuilder() { - if (vulnerabilityAssessmentBuilder_ == null) { - if (!(typeCase_ == 20)) { - type_ = io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); - } - vulnerabilityAssessmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote, io.grafeas.v1.VulnerabilityAssessmentNote.Builder, io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder>( - (io.grafeas.v1.VulnerabilityAssessmentNote) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 20; - onChanged(); - return vulnerabilityAssessmentBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Note) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Note) - private static final io.grafeas.v1.Note DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Note(); - } - - public static io.grafeas.v1.Note getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Note parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Note getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java deleted file mode 100644 index faf5dd358e75..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteKind.java +++ /dev/null @@ -1,303 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - *
- * Kind represents the kinds of notes supported.
- * 
- * - * Protobuf enum {@code grafeas.v1.NoteKind} - */ -public enum NoteKind - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Default value. This value is unused.
-   * 
- * - * NOTE_KIND_UNSPECIFIED = 0; - */ - NOTE_KIND_UNSPECIFIED(0), - /** - *
-   * The note and occurrence represent a package vulnerability.
-   * 
- * - * VULNERABILITY = 1; - */ - VULNERABILITY(1), - /** - *
-   * The note and occurrence assert build provenance.
-   * 
- * - * BUILD = 2; - */ - BUILD(2), - /** - *
-   * This represents an image basis relationship.
-   * 
- * - * IMAGE = 3; - */ - IMAGE(3), - /** - *
-   * This represents a package installed via a package manager.
-   * 
- * - * PACKAGE = 4; - */ - PACKAGE(4), - /** - *
-   * The note and occurrence track deployment events.
-   * 
- * - * DEPLOYMENT = 5; - */ - DEPLOYMENT(5), - /** - *
-   * The note and occurrence track the initial discovery status of a resource.
-   * 
- * - * DISCOVERY = 6; - */ - DISCOVERY(6), - /** - *
-   * This represents a logical "role" that can attest to artifacts.
-   * 
- * - * ATTESTATION = 7; - */ - ATTESTATION(7), - /** - *
-   * This represents an available package upgrade.
-   * 
- * - * UPGRADE = 8; - */ - UPGRADE(8), - /** - *
-   * This represents a Compliance Note
-   * 
- * - * COMPLIANCE = 9; - */ - COMPLIANCE(9), - /** - *
-   * This represents a DSSE attestation Note
-   * 
- * - * DSSE_ATTESTATION = 10; - */ - DSSE_ATTESTATION(10), - /** - *
-   * This represents a Vulnerability Assessment.
-   * 
- * - * VULNERABILITY_ASSESSMENT = 11; - */ - VULNERABILITY_ASSESSMENT(11), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Default value. This value is unused.
-   * 
- * - * NOTE_KIND_UNSPECIFIED = 0; - */ - public static final int NOTE_KIND_UNSPECIFIED_VALUE = 0; - /** - *
-   * The note and occurrence represent a package vulnerability.
-   * 
- * - * VULNERABILITY = 1; - */ - public static final int VULNERABILITY_VALUE = 1; - /** - *
-   * The note and occurrence assert build provenance.
-   * 
- * - * BUILD = 2; - */ - public static final int BUILD_VALUE = 2; - /** - *
-   * This represents an image basis relationship.
-   * 
- * - * IMAGE = 3; - */ - public static final int IMAGE_VALUE = 3; - /** - *
-   * This represents a package installed via a package manager.
-   * 
- * - * PACKAGE = 4; - */ - public static final int PACKAGE_VALUE = 4; - /** - *
-   * The note and occurrence track deployment events.
-   * 
- * - * DEPLOYMENT = 5; - */ - public static final int DEPLOYMENT_VALUE = 5; - /** - *
-   * The note and occurrence track the initial discovery status of a resource.
-   * 
- * - * DISCOVERY = 6; - */ - public static final int DISCOVERY_VALUE = 6; - /** - *
-   * This represents a logical "role" that can attest to artifacts.
-   * 
- * - * ATTESTATION = 7; - */ - public static final int ATTESTATION_VALUE = 7; - /** - *
-   * This represents an available package upgrade.
-   * 
- * - * UPGRADE = 8; - */ - public static final int UPGRADE_VALUE = 8; - /** - *
-   * This represents a Compliance Note
-   * 
- * - * COMPLIANCE = 9; - */ - public static final int COMPLIANCE_VALUE = 9; - /** - *
-   * This represents a DSSE attestation Note
-   * 
- * - * DSSE_ATTESTATION = 10; - */ - public static final int DSSE_ATTESTATION_VALUE = 10; - /** - *
-   * This represents a Vulnerability Assessment.
-   * 
- * - * VULNERABILITY_ASSESSMENT = 11; - */ - public static final int VULNERABILITY_ASSESSMENT_VALUE = 11; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static NoteKind valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static NoteKind forNumber(int value) { - switch (value) { - case 0: return NOTE_KIND_UNSPECIFIED; - case 1: return VULNERABILITY; - case 2: return BUILD; - case 3: return IMAGE; - case 4: return PACKAGE; - case 5: return DEPLOYMENT; - case 6: return DISCOVERY; - case 7: return ATTESTATION; - case 8: return UPGRADE; - case 9: return COMPLIANCE; - case 10: return DSSE_ATTESTATION; - case 11: return VULNERABILITY_ASSESSMENT; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - NoteKind> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public NoteKind findValueByNumber(int number) { - return NoteKind.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.Common.getDescriptor().getEnumTypes().get(0); - } - - private static final NoteKind[] VALUES = values(); - - public static NoteKind valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private NoteKind(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.NoteKind) -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java deleted file mode 100644 index cc46d3b47ff2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteName.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class NoteName implements ResourceName { - private static final PathTemplate PROJECT_NOTE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/notes/{note}"); - private volatile Map fieldValuesMap; - private final String project; - private final String note; - - @Deprecated - protected NoteName() { - project = null; - note = null; - } - - private NoteName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - note = Preconditions.checkNotNull(builder.getNote()); - } - - public String getProject() { - return project; - } - - public String getNote() { - return note; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static NoteName of(String project, String note) { - return newBuilder().setProject(project).setNote(note).build(); - } - - public static String format(String project, String note) { - return newBuilder().setProject(project).setNote(note).build().toString(); - } - - public static NoteName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_NOTE.validatedMatch( - formattedString, "NoteName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("note")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (NoteName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_NOTE.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (note != null) { - fieldMapBuilder.put("note", note); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_NOTE.instantiate("project", project, "note", note); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - NoteName that = ((NoteName) o); - return Objects.equals(this.project, that.project) && Objects.equals(this.note, that.note); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(note); - return h; - } - - /** Builder for projects/{project}/notes/{note}. */ - public static class Builder { - private String project; - private String note; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getNote() { - return note; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setNote(String note) { - this.note = note; - return this; - } - - private Builder(NoteName noteName) { - this.project = noteName.project; - this.note = noteName.note; - } - - public NoteName build() { - return new NoteName(this); - } - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java deleted file mode 100644 index 74cd8e258fd8..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/NoteOrBuilder.java +++ /dev/null @@ -1,563 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface NoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Note) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Output only. The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Output only. The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * A one sentence description of this note.
-   * 
- * - * string short_description = 2; - * @return The shortDescription. - */ - java.lang.String getShortDescription(); - /** - *
-   * A one sentence description of this note.
-   * 
- * - * string short_description = 2; - * @return The bytes for shortDescription. - */ - com.google.protobuf.ByteString - getShortDescriptionBytes(); - - /** - *
-   * A detailed description of this note.
-   * 
- * - * string long_description = 3; - * @return The longDescription. - */ - java.lang.String getLongDescription(); - /** - *
-   * A detailed description of this note.
-   * 
- * - * string long_description = 3; - * @return The bytes for longDescription. - */ - com.google.protobuf.ByteString - getLongDescriptionBytes(); - - /** - *
-   * Output only. The type of analysis. This field can be used as a filter in
-   * list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - int getKindValue(); - /** - *
-   * Output only. The type of analysis. This field can be used as a filter in
-   * list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The kind. - */ - io.grafeas.v1.NoteKind getKind(); - - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - java.util.List - getRelatedUrlList(); - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - io.grafeas.v1.RelatedUrl getRelatedUrl(int index); - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - int getRelatedUrlCount(); - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - java.util.List - getRelatedUrlOrBuilderList(); - /** - *
-   * URLs associated with this note.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlOrBuilder( - int index); - - /** - *
-   * Time of expiration for this note. Empty if note does not expire.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - * @return Whether the expirationTime field is set. - */ - boolean hasExpirationTime(); - /** - *
-   * Time of expiration for this note. Empty if note does not expire.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - * @return The expirationTime. - */ - com.google.protobuf.Timestamp getExpirationTime(); - /** - *
-   * Time of expiration for this note. Empty if note does not expire.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 6; - */ - com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder(); - - /** - *
-   * Output only. The time this note was created. This field can be used as a
-   * filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The time this note was created. This field can be used as a
-   * filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The time this note was created. This field can be used as a
-   * filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. The time this note was last updated. This field can be used as
-   * a filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * Output only. The time this note was last updated. This field can be used as
-   * a filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * Output only. The time this note was last updated. This field can be used as
-   * a filter in list requests.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @return A list containing the relatedNoteNames. - */ - java.util.List - getRelatedNoteNamesList(); - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @return The count of relatedNoteNames. - */ - int getRelatedNoteNamesCount(); - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @param index The index of the element to return. - * @return The relatedNoteNames at the given index. - */ - java.lang.String getRelatedNoteNames(int index); - /** - *
-   * Other notes related to this note.
-   * 
- * - * repeated string related_note_names = 9; - * @param index The index of the value to return. - * @return The bytes of the relatedNoteNames at the given index. - */ - com.google.protobuf.ByteString - getRelatedNoteNamesBytes(int index); - - /** - *
-   * A note describing a package vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @return Whether the vulnerability field is set. - */ - boolean hasVulnerability(); - /** - *
-   * A note describing a package vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @return The vulnerability. - */ - io.grafeas.v1.VulnerabilityNote getVulnerability(); - /** - *
-   * A note describing a package vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityNote vulnerability = 10; - */ - io.grafeas.v1.VulnerabilityNoteOrBuilder getVulnerabilityOrBuilder(); - - /** - *
-   * A note describing build provenance for a verifiable build.
-   * 
- * - * .grafeas.v1.BuildNote build = 11; - * @return Whether the build field is set. - */ - boolean hasBuild(); - /** - *
-   * A note describing build provenance for a verifiable build.
-   * 
- * - * .grafeas.v1.BuildNote build = 11; - * @return The build. - */ - io.grafeas.v1.BuildNote getBuild(); - /** - *
-   * A note describing build provenance for a verifiable build.
-   * 
- * - * .grafeas.v1.BuildNote build = 11; - */ - io.grafeas.v1.BuildNoteOrBuilder getBuildOrBuilder(); - - /** - *
-   * A note describing a base image.
-   * 
- * - * .grafeas.v1.ImageNote image = 12; - * @return Whether the image field is set. - */ - boolean hasImage(); - /** - *
-   * A note describing a base image.
-   * 
- * - * .grafeas.v1.ImageNote image = 12; - * @return The image. - */ - io.grafeas.v1.ImageNote getImage(); - /** - *
-   * A note describing a base image.
-   * 
- * - * .grafeas.v1.ImageNote image = 12; - */ - io.grafeas.v1.ImageNoteOrBuilder getImageOrBuilder(); - - /** - *
-   * A note describing a package hosted by various package managers.
-   * 
- * - * .grafeas.v1.PackageNote package = 13; - * @return Whether the package field is set. - */ - boolean hasPackage(); - /** - *
-   * A note describing a package hosted by various package managers.
-   * 
- * - * .grafeas.v1.PackageNote package = 13; - * @return The package. - */ - io.grafeas.v1.PackageNote getPackage(); - /** - *
-   * A note describing a package hosted by various package managers.
-   * 
- * - * .grafeas.v1.PackageNote package = 13; - */ - io.grafeas.v1.PackageNoteOrBuilder getPackageOrBuilder(); - - /** - *
-   * A note describing something that can be deployed.
-   * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - * @return Whether the deployment field is set. - */ - boolean hasDeployment(); - /** - *
-   * A note describing something that can be deployed.
-   * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - * @return The deployment. - */ - io.grafeas.v1.DeploymentNote getDeployment(); - /** - *
-   * A note describing something that can be deployed.
-   * 
- * - * .grafeas.v1.DeploymentNote deployment = 14; - */ - io.grafeas.v1.DeploymentNoteOrBuilder getDeploymentOrBuilder(); - - /** - *
-   * A note describing the initial analysis of a resource.
-   * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - * @return Whether the discovery field is set. - */ - boolean hasDiscovery(); - /** - *
-   * A note describing the initial analysis of a resource.
-   * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - * @return The discovery. - */ - io.grafeas.v1.DiscoveryNote getDiscovery(); - /** - *
-   * A note describing the initial analysis of a resource.
-   * 
- * - * .grafeas.v1.DiscoveryNote discovery = 15; - */ - io.grafeas.v1.DiscoveryNoteOrBuilder getDiscoveryOrBuilder(); - - /** - *
-   * A note describing an attestation role.
-   * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - * @return Whether the attestation field is set. - */ - boolean hasAttestation(); - /** - *
-   * A note describing an attestation role.
-   * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - * @return The attestation. - */ - io.grafeas.v1.AttestationNote getAttestation(); - /** - *
-   * A note describing an attestation role.
-   * 
- * - * .grafeas.v1.AttestationNote attestation = 16; - */ - io.grafeas.v1.AttestationNoteOrBuilder getAttestationOrBuilder(); - - /** - *
-   * A note describing available package upgrades.
-   * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - * @return Whether the upgrade field is set. - */ - boolean hasUpgrade(); - /** - *
-   * A note describing available package upgrades.
-   * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - * @return The upgrade. - */ - io.grafeas.v1.UpgradeNote getUpgrade(); - /** - *
-   * A note describing available package upgrades.
-   * 
- * - * .grafeas.v1.UpgradeNote upgrade = 17; - */ - io.grafeas.v1.UpgradeNoteOrBuilder getUpgradeOrBuilder(); - - /** - *
-   * A note describing a compliance check.
-   * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - * @return Whether the compliance field is set. - */ - boolean hasCompliance(); - /** - *
-   * A note describing a compliance check.
-   * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - * @return The compliance. - */ - io.grafeas.v1.ComplianceNote getCompliance(); - /** - *
-   * A note describing a compliance check.
-   * 
- * - * .grafeas.v1.ComplianceNote compliance = 18; - */ - io.grafeas.v1.ComplianceNoteOrBuilder getComplianceOrBuilder(); - - /** - *
-   * A note describing a dsse attestation note.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @return Whether the dsseAttestation field is set. - */ - boolean hasDsseAttestation(); - /** - *
-   * A note describing a dsse attestation note.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @return The dsseAttestation. - */ - io.grafeas.v1.DSSEAttestationNote getDsseAttestation(); - /** - *
-   * A note describing a dsse attestation note.
-   * 
- * - * .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - */ - io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder(); - - /** - *
-   * A note describing a vulnerability assessment.
-   * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - * @return Whether the vulnerabilityAssessment field is set. - */ - boolean hasVulnerabilityAssessment(); - /** - *
-   * A note describing a vulnerability assessment.
-   * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - * @return The vulnerabilityAssessment. - */ - io.grafeas.v1.VulnerabilityAssessmentNote getVulnerabilityAssessment(); - /** - *
-   * A note describing a vulnerability assessment.
-   * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - */ - io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder getVulnerabilityAssessmentOrBuilder(); - - public io.grafeas.v1.Note.TypeCase getTypeCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java deleted file mode 100644 index bc2470a2d0cf..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Occurrence.java +++ /dev/null @@ -1,4569 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * An instance of an analysis type that has been found on a resource.
- * 
- * - * Protobuf type {@code grafeas.v1.Occurrence} - */ -public final class Occurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Occurrence) - OccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use Occurrence.newBuilder() to construct. - private Occurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Occurrence() { - name_ = ""; - resourceUri_ = ""; - noteName_ = ""; - kind_ = 0; - remediation_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Occurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Occurrence.class, io.grafeas.v1.Occurrence.Builder.class); - } - - private int detailsCase_ = 0; - private java.lang.Object details_; - public enum DetailsCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VULNERABILITY(8), - BUILD(9), - IMAGE(10), - PACKAGE(11), - DEPLOYMENT(12), - DISCOVERY(13), - ATTESTATION(14), - UPGRADE(15), - COMPLIANCE(16), - DSSE_ATTESTATION(17), - DETAILS_NOT_SET(0); - private final int value; - private DetailsCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DetailsCase valueOf(int value) { - return forNumber(value); - } - - public static DetailsCase forNumber(int value) { - switch (value) { - case 8: return VULNERABILITY; - case 9: return BUILD; - case 10: return IMAGE; - case 11: return PACKAGE; - case 12: return DEPLOYMENT; - case 13: return DISCOVERY; - case 14: return ATTESTATION; - case 15: return UPGRADE; - case 16: return COMPLIANCE; - case 17: return DSSE_ATTESTATION; - case 0: return DETAILS_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public DetailsCase - getDetailsCase() { - return DetailsCase.forNumber( - detailsCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * Output only. The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Output only. The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_URI_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object resourceUri_ = ""; - /** - *
-   * Required. Immutable. A URI that represents the resource for which the
-   * occurrence applies. For example,
-   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-   * 
- * - * string resource_uri = 2; - * @return The resourceUri. - */ - @java.lang.Override - public java.lang.String getResourceUri() { - java.lang.Object ref = resourceUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUri_ = s; - return s; - } - } - /** - *
-   * Required. Immutable. A URI that represents the resource for which the
-   * occurrence applies. For example,
-   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-   * 
- * - * string resource_uri = 2; - * @return The bytes for resourceUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceUriBytes() { - java.lang.Object ref = resourceUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NOTE_NAME_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object noteName_ = ""; - /** - *
-   * Required. Immutable. The analysis note associated with this occurrence, in
-   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-   * used as a filter in list requests.
-   * 
- * - * string note_name = 3; - * @return The noteName. - */ - @java.lang.Override - public java.lang.String getNoteName() { - java.lang.Object ref = noteName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - noteName_ = s; - return s; - } - } - /** - *
-   * Required. Immutable. The analysis note associated with this occurrence, in
-   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-   * used as a filter in list requests.
-   * 
- * - * string note_name = 3; - * @return The bytes for noteName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNoteNameBytes() { - java.lang.Object ref = noteName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - noteName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KIND_FIELD_NUMBER = 4; - private int kind_ = 0; - /** - *
-   * Output only. This explicitly denotes which of the occurrence details are
-   * specified. This field can be used as a filter in list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-   * Output only. This explicitly denotes which of the occurrence details are
-   * specified. This field can be used as a filter in list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The kind. - */ - @java.lang.Override public io.grafeas.v1.NoteKind getKind() { - io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); - return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; - } - - public static final int REMEDIATION_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object remediation_ = ""; - /** - *
-   * A description of actions that can be taken to remedy the note.
-   * 
- * - * string remediation = 5; - * @return The remediation. - */ - @java.lang.Override - public java.lang.String getRemediation() { - java.lang.Object ref = remediation_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - remediation_ = s; - return s; - } - } - /** - *
-   * A description of actions that can be taken to remedy the note.
-   * 
- * - * string remediation = 5; - * @return The bytes for remediation. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRemediationBytes() { - java.lang.Object ref = remediation_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - remediation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The time this occurrence was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The time this occurrence was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The time this occurrence was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * Output only. The time this occurrence was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * Output only. The time this occurrence was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * Output only. The time this occurrence was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int VULNERABILITY_FIELD_NUMBER = 8; - /** - *
-   * Describes a security vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @return Whether the vulnerability field is set. - */ - @java.lang.Override - public boolean hasVulnerability() { - return detailsCase_ == 8; - } - /** - *
-   * Describes a security vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @return The vulnerability. - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence getVulnerability() { - if (detailsCase_ == 8) { - return (io.grafeas.v1.VulnerabilityOccurrence) details_; - } - return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes a security vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrenceOrBuilder getVulnerabilityOrBuilder() { - if (detailsCase_ == 8) { - return (io.grafeas.v1.VulnerabilityOccurrence) details_; - } - return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); - } - - public static final int BUILD_FIELD_NUMBER = 9; - /** - *
-   * Describes a verifiable build.
-   * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - * @return Whether the build field is set. - */ - @java.lang.Override - public boolean hasBuild() { - return detailsCase_ == 9; - } - /** - *
-   * Describes a verifiable build.
-   * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - * @return The build. - */ - @java.lang.Override - public io.grafeas.v1.BuildOccurrence getBuild() { - if (detailsCase_ == 9) { - return (io.grafeas.v1.BuildOccurrence) details_; - } - return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes a verifiable build.
-   * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - @java.lang.Override - public io.grafeas.v1.BuildOccurrenceOrBuilder getBuildOrBuilder() { - if (detailsCase_ == 9) { - return (io.grafeas.v1.BuildOccurrence) details_; - } - return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); - } - - public static final int IMAGE_FIELD_NUMBER = 10; - /** - *
-   * Describes how this resource derives from the basis in the associated
-   * note.
-   * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - * @return Whether the image field is set. - */ - @java.lang.Override - public boolean hasImage() { - return detailsCase_ == 10; - } - /** - *
-   * Describes how this resource derives from the basis in the associated
-   * note.
-   * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - * @return The image. - */ - @java.lang.Override - public io.grafeas.v1.ImageOccurrence getImage() { - if (detailsCase_ == 10) { - return (io.grafeas.v1.ImageOccurrence) details_; - } - return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes how this resource derives from the basis in the associated
-   * note.
-   * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - @java.lang.Override - public io.grafeas.v1.ImageOccurrenceOrBuilder getImageOrBuilder() { - if (detailsCase_ == 10) { - return (io.grafeas.v1.ImageOccurrence) details_; - } - return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); - } - - public static final int PACKAGE_FIELD_NUMBER = 11; - /** - *
-   * Describes the installation of a package on the linked resource.
-   * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - * @return Whether the package field is set. - */ - @java.lang.Override - public boolean hasPackage() { - return detailsCase_ == 11; - } - /** - *
-   * Describes the installation of a package on the linked resource.
-   * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - * @return The package. - */ - @java.lang.Override - public io.grafeas.v1.PackageOccurrence getPackage() { - if (detailsCase_ == 11) { - return (io.grafeas.v1.PackageOccurrence) details_; - } - return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes the installation of a package on the linked resource.
-   * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - @java.lang.Override - public io.grafeas.v1.PackageOccurrenceOrBuilder getPackageOrBuilder() { - if (detailsCase_ == 11) { - return (io.grafeas.v1.PackageOccurrence) details_; - } - return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); - } - - public static final int DEPLOYMENT_FIELD_NUMBER = 12; - /** - *
-   * Describes the deployment of an artifact on a runtime.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - * @return Whether the deployment field is set. - */ - @java.lang.Override - public boolean hasDeployment() { - return detailsCase_ == 12; - } - /** - *
-   * Describes the deployment of an artifact on a runtime.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - * @return The deployment. - */ - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrence getDeployment() { - if (detailsCase_ == 12) { - return (io.grafeas.v1.DeploymentOccurrence) details_; - } - return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes the deployment of an artifact on a runtime.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrenceOrBuilder getDeploymentOrBuilder() { - if (detailsCase_ == 12) { - return (io.grafeas.v1.DeploymentOccurrence) details_; - } - return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); - } - - public static final int DISCOVERY_FIELD_NUMBER = 13; - /** - *
-   * Describes when a resource was discovered.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @return Whether the discovery field is set. - */ - @java.lang.Override - public boolean hasDiscovery() { - return detailsCase_ == 13; - } - /** - *
-   * Describes when a resource was discovered.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @return The discovery. - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence getDiscovery() { - if (detailsCase_ == 13) { - return (io.grafeas.v1.DiscoveryOccurrence) details_; - } - return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes when a resource was discovered.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrenceOrBuilder getDiscoveryOrBuilder() { - if (detailsCase_ == 13) { - return (io.grafeas.v1.DiscoveryOccurrence) details_; - } - return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); - } - - public static final int ATTESTATION_FIELD_NUMBER = 14; - /** - *
-   * Describes an attestation of an artifact.
-   * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - * @return Whether the attestation field is set. - */ - @java.lang.Override - public boolean hasAttestation() { - return detailsCase_ == 14; - } - /** - *
-   * Describes an attestation of an artifact.
-   * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - * @return The attestation. - */ - @java.lang.Override - public io.grafeas.v1.AttestationOccurrence getAttestation() { - if (detailsCase_ == 14) { - return (io.grafeas.v1.AttestationOccurrence) details_; - } - return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes an attestation of an artifact.
-   * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - @java.lang.Override - public io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder() { - if (detailsCase_ == 14) { - return (io.grafeas.v1.AttestationOccurrence) details_; - } - return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); - } - - public static final int UPGRADE_FIELD_NUMBER = 15; - /** - *
-   * Describes an available package upgrade on the linked resource.
-   * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @return Whether the upgrade field is set. - */ - @java.lang.Override - public boolean hasUpgrade() { - return detailsCase_ == 15; - } - /** - *
-   * Describes an available package upgrade on the linked resource.
-   * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @return The upgrade. - */ - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrence getUpgrade() { - if (detailsCase_ == 15) { - return (io.grafeas.v1.UpgradeOccurrence) details_; - } - return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes an available package upgrade on the linked resource.
-   * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrenceOrBuilder getUpgradeOrBuilder() { - if (detailsCase_ == 15) { - return (io.grafeas.v1.UpgradeOccurrence) details_; - } - return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); - } - - public static final int COMPLIANCE_FIELD_NUMBER = 16; - /** - *
-   * Describes a compliance violation on a linked resource.
-   * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - * @return Whether the compliance field is set. - */ - @java.lang.Override - public boolean hasCompliance() { - return detailsCase_ == 16; - } - /** - *
-   * Describes a compliance violation on a linked resource.
-   * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - * @return The compliance. - */ - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrence getCompliance() { - if (detailsCase_ == 16) { - return (io.grafeas.v1.ComplianceOccurrence) details_; - } - return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes a compliance violation on a linked resource.
-   * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrenceOrBuilder getComplianceOrBuilder() { - if (detailsCase_ == 16) { - return (io.grafeas.v1.ComplianceOccurrence) details_; - } - return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); - } - - public static final int DSSE_ATTESTATION_FIELD_NUMBER = 17; - /** - *
-   * Describes an attestation of an artifact using dsse.
-   * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @return Whether the dsseAttestation field is set. - */ - @java.lang.Override - public boolean hasDsseAttestation() { - return detailsCase_ == 17; - } - /** - *
-   * Describes an attestation of an artifact using dsse.
-   * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @return The dsseAttestation. - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrence getDsseAttestation() { - if (detailsCase_ == 17) { - return (io.grafeas.v1.DSSEAttestationOccurrence) details_; - } - return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); - } - /** - *
-   * Describes an attestation of an artifact using dsse.
-   * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder getDsseAttestationOrBuilder() { - if (detailsCase_ == 17) { - return (io.grafeas.v1.DSSEAttestationOccurrence) details_; - } - return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); - } - - public static final int ENVELOPE_FIELD_NUMBER = 18; - private io.grafeas.v1.Envelope envelope_; - /** - *
-   * https://github.com/secure-systems-lab/dsse
-   * 
- * - * .grafeas.v1.Envelope envelope = 18; - * @return Whether the envelope field is set. - */ - @java.lang.Override - public boolean hasEnvelope() { - return envelope_ != null; - } - /** - *
-   * https://github.com/secure-systems-lab/dsse
-   * 
- * - * .grafeas.v1.Envelope envelope = 18; - * @return The envelope. - */ - @java.lang.Override - public io.grafeas.v1.Envelope getEnvelope() { - return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } - /** - *
-   * https://github.com/secure-systems-lab/dsse
-   * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - @java.lang.Override - public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { - return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, noteName_); - } - if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { - output.writeEnum(4, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remediation_); - } - if (createTime_ != null) { - output.writeMessage(6, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(7, getUpdateTime()); - } - if (detailsCase_ == 8) { - output.writeMessage(8, (io.grafeas.v1.VulnerabilityOccurrence) details_); - } - if (detailsCase_ == 9) { - output.writeMessage(9, (io.grafeas.v1.BuildOccurrence) details_); - } - if (detailsCase_ == 10) { - output.writeMessage(10, (io.grafeas.v1.ImageOccurrence) details_); - } - if (detailsCase_ == 11) { - output.writeMessage(11, (io.grafeas.v1.PackageOccurrence) details_); - } - if (detailsCase_ == 12) { - output.writeMessage(12, (io.grafeas.v1.DeploymentOccurrence) details_); - } - if (detailsCase_ == 13) { - output.writeMessage(13, (io.grafeas.v1.DiscoveryOccurrence) details_); - } - if (detailsCase_ == 14) { - output.writeMessage(14, (io.grafeas.v1.AttestationOccurrence) details_); - } - if (detailsCase_ == 15) { - output.writeMessage(15, (io.grafeas.v1.UpgradeOccurrence) details_); - } - if (detailsCase_ == 16) { - output.writeMessage(16, (io.grafeas.v1.ComplianceOccurrence) details_); - } - if (detailsCase_ == 17) { - output.writeMessage(17, (io.grafeas.v1.DSSEAttestationOccurrence) details_); - } - if (envelope_ != null) { - output.writeMessage(18, getEnvelope()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, noteName_); - } - if (kind_ != io.grafeas.v1.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remediation_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remediation_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getUpdateTime()); - } - if (detailsCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, (io.grafeas.v1.VulnerabilityOccurrence) details_); - } - if (detailsCase_ == 9) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, (io.grafeas.v1.BuildOccurrence) details_); - } - if (detailsCase_ == 10) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, (io.grafeas.v1.ImageOccurrence) details_); - } - if (detailsCase_ == 11) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, (io.grafeas.v1.PackageOccurrence) details_); - } - if (detailsCase_ == 12) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, (io.grafeas.v1.DeploymentOccurrence) details_); - } - if (detailsCase_ == 13) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, (io.grafeas.v1.DiscoveryOccurrence) details_); - } - if (detailsCase_ == 14) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, (io.grafeas.v1.AttestationOccurrence) details_); - } - if (detailsCase_ == 15) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(15, (io.grafeas.v1.UpgradeOccurrence) details_); - } - if (detailsCase_ == 16) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(16, (io.grafeas.v1.ComplianceOccurrence) details_); - } - if (detailsCase_ == 17) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(17, (io.grafeas.v1.DSSEAttestationOccurrence) details_); - } - if (envelope_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(18, getEnvelope()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Occurrence)) { - return super.equals(obj); - } - io.grafeas.v1.Occurrence other = (io.grafeas.v1.Occurrence) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getResourceUri() - .equals(other.getResourceUri())) return false; - if (!getNoteName() - .equals(other.getNoteName())) return false; - if (kind_ != other.kind_) return false; - if (!getRemediation() - .equals(other.getRemediation())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (hasEnvelope() != other.hasEnvelope()) return false; - if (hasEnvelope()) { - if (!getEnvelope() - .equals(other.getEnvelope())) return false; - } - if (!getDetailsCase().equals(other.getDetailsCase())) return false; - switch (detailsCase_) { - case 8: - if (!getVulnerability() - .equals(other.getVulnerability())) return false; - break; - case 9: - if (!getBuild() - .equals(other.getBuild())) return false; - break; - case 10: - if (!getImage() - .equals(other.getImage())) return false; - break; - case 11: - if (!getPackage() - .equals(other.getPackage())) return false; - break; - case 12: - if (!getDeployment() - .equals(other.getDeployment())) return false; - break; - case 13: - if (!getDiscovery() - .equals(other.getDiscovery())) return false; - break; - case 14: - if (!getAttestation() - .equals(other.getAttestation())) return false; - break; - case 15: - if (!getUpgrade() - .equals(other.getUpgrade())) return false; - break; - case 16: - if (!getCompliance() - .equals(other.getCompliance())) return false; - break; - case 17: - if (!getDsseAttestation() - .equals(other.getDsseAttestation())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; - hash = (53 * hash) + getResourceUri().hashCode(); - hash = (37 * hash) + NOTE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getNoteName().hashCode(); - hash = (37 * hash) + KIND_FIELD_NUMBER; - hash = (53 * hash) + kind_; - hash = (37 * hash) + REMEDIATION_FIELD_NUMBER; - hash = (53 * hash) + getRemediation().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (hasEnvelope()) { - hash = (37 * hash) + ENVELOPE_FIELD_NUMBER; - hash = (53 * hash) + getEnvelope().hashCode(); - } - switch (detailsCase_) { - case 8: - hash = (37 * hash) + VULNERABILITY_FIELD_NUMBER; - hash = (53 * hash) + getVulnerability().hashCode(); - break; - case 9: - hash = (37 * hash) + BUILD_FIELD_NUMBER; - hash = (53 * hash) + getBuild().hashCode(); - break; - case 10: - hash = (37 * hash) + IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getImage().hashCode(); - break; - case 11: - hash = (37 * hash) + PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getPackage().hashCode(); - break; - case 12: - hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER; - hash = (53 * hash) + getDeployment().hashCode(); - break; - case 13: - hash = (37 * hash) + DISCOVERY_FIELD_NUMBER; - hash = (53 * hash) + getDiscovery().hashCode(); - break; - case 14: - hash = (37 * hash) + ATTESTATION_FIELD_NUMBER; - hash = (53 * hash) + getAttestation().hashCode(); - break; - case 15: - hash = (37 * hash) + UPGRADE_FIELD_NUMBER; - hash = (53 * hash) + getUpgrade().hashCode(); - break; - case 16: - hash = (37 * hash) + COMPLIANCE_FIELD_NUMBER; - hash = (53 * hash) + getCompliance().hashCode(); - break; - case 17: - hash = (37 * hash) + DSSE_ATTESTATION_FIELD_NUMBER; - hash = (53 * hash) + getDsseAttestation().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Occurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Occurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Occurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Occurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Occurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Occurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Occurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Occurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Occurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Occurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Occurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Occurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Occurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An instance of an analysis type that has been found on a resource.
-   * 
- * - * Protobuf type {@code grafeas.v1.Occurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Occurrence) - io.grafeas.v1.OccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Occurrence.class, io.grafeas.v1.Occurrence.Builder.class); - } - - // Construct using io.grafeas.v1.Occurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - resourceUri_ = ""; - noteName_ = ""; - kind_ = 0; - remediation_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - if (vulnerabilityBuilder_ != null) { - vulnerabilityBuilder_.clear(); - } - if (buildBuilder_ != null) { - buildBuilder_.clear(); - } - if (imageBuilder_ != null) { - imageBuilder_.clear(); - } - if (packageBuilder_ != null) { - packageBuilder_.clear(); - } - if (deploymentBuilder_ != null) { - deploymentBuilder_.clear(); - } - if (discoveryBuilder_ != null) { - discoveryBuilder_.clear(); - } - if (attestationBuilder_ != null) { - attestationBuilder_.clear(); - } - if (upgradeBuilder_ != null) { - upgradeBuilder_.clear(); - } - if (complianceBuilder_ != null) { - complianceBuilder_.clear(); - } - if (dsseAttestationBuilder_ != null) { - dsseAttestationBuilder_.clear(); - } - envelope_ = null; - if (envelopeBuilder_ != null) { - envelopeBuilder_.dispose(); - envelopeBuilder_ = null; - } - detailsCase_ = 0; - details_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_Occurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Occurrence getDefaultInstanceForType() { - return io.grafeas.v1.Occurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Occurrence build() { - io.grafeas.v1.Occurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Occurrence buildPartial() { - io.grafeas.v1.Occurrence result = new io.grafeas.v1.Occurrence(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Occurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.resourceUri_ = resourceUri_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.noteName_ = noteName_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.kind_ = kind_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.remediation_ = remediation_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.createTime_ = createTimeBuilder_ == null - ? createTime_ - : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null - ? updateTime_ - : updateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00020000) != 0)) { - result.envelope_ = envelopeBuilder_ == null - ? envelope_ - : envelopeBuilder_.build(); - } - } - - private void buildPartialOneofs(io.grafeas.v1.Occurrence result) { - result.detailsCase_ = detailsCase_; - result.details_ = this.details_; - if (detailsCase_ == 8 && - vulnerabilityBuilder_ != null) { - result.details_ = vulnerabilityBuilder_.build(); - } - if (detailsCase_ == 9 && - buildBuilder_ != null) { - result.details_ = buildBuilder_.build(); - } - if (detailsCase_ == 10 && - imageBuilder_ != null) { - result.details_ = imageBuilder_.build(); - } - if (detailsCase_ == 11 && - packageBuilder_ != null) { - result.details_ = packageBuilder_.build(); - } - if (detailsCase_ == 12 && - deploymentBuilder_ != null) { - result.details_ = deploymentBuilder_.build(); - } - if (detailsCase_ == 13 && - discoveryBuilder_ != null) { - result.details_ = discoveryBuilder_.build(); - } - if (detailsCase_ == 14 && - attestationBuilder_ != null) { - result.details_ = attestationBuilder_.build(); - } - if (detailsCase_ == 15 && - upgradeBuilder_ != null) { - result.details_ = upgradeBuilder_.build(); - } - if (detailsCase_ == 16 && - complianceBuilder_ != null) { - result.details_ = complianceBuilder_.build(); - } - if (detailsCase_ == 17 && - dsseAttestationBuilder_ != null) { - result.details_ = dsseAttestationBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Occurrence) { - return mergeFrom((io.grafeas.v1.Occurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Occurrence other) { - if (other == io.grafeas.v1.Occurrence.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getResourceUri().isEmpty()) { - resourceUri_ = other.resourceUri_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getNoteName().isEmpty()) { - noteName_ = other.noteName_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.kind_ != 0) { - setKindValue(other.getKindValue()); - } - if (!other.getRemediation().isEmpty()) { - remediation_ = other.remediation_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasEnvelope()) { - mergeEnvelope(other.getEnvelope()); - } - switch (other.getDetailsCase()) { - case VULNERABILITY: { - mergeVulnerability(other.getVulnerability()); - break; - } - case BUILD: { - mergeBuild(other.getBuild()); - break; - } - case IMAGE: { - mergeImage(other.getImage()); - break; - } - case PACKAGE: { - mergePackage(other.getPackage()); - break; - } - case DEPLOYMENT: { - mergeDeployment(other.getDeployment()); - break; - } - case DISCOVERY: { - mergeDiscovery(other.getDiscovery()); - break; - } - case ATTESTATION: { - mergeAttestation(other.getAttestation()); - break; - } - case UPGRADE: { - mergeUpgrade(other.getUpgrade()); - break; - } - case COMPLIANCE: { - mergeCompliance(other.getCompliance()); - break; - } - case DSSE_ATTESTATION: { - mergeDsseAttestation(other.getDsseAttestation()); - break; - } - case DETAILS_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - resourceUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - noteName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: { - kind_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: { - remediation_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - input.readMessage( - getCreateTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - input.readMessage( - getUpdateTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: { - input.readMessage( - getVulnerabilityFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 8; - break; - } // case 66 - case 74: { - input.readMessage( - getBuildFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 9; - break; - } // case 74 - case 82: { - input.readMessage( - getImageFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 10; - break; - } // case 82 - case 90: { - input.readMessage( - getPackageFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 11; - break; - } // case 90 - case 98: { - input.readMessage( - getDeploymentFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 12; - break; - } // case 98 - case 106: { - input.readMessage( - getDiscoveryFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 13; - break; - } // case 106 - case 114: { - input.readMessage( - getAttestationFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 14; - break; - } // case 114 - case 122: { - input.readMessage( - getUpgradeFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 15; - break; - } // case 122 - case 130: { - input.readMessage( - getComplianceFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 16; - break; - } // case 130 - case 138: { - input.readMessage( - getDsseAttestationFieldBuilder().getBuilder(), - extensionRegistry); - detailsCase_ = 17; - break; - } // case 138 - case 146: { - input.readMessage( - getEnvelopeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00020000; - break; - } // case 146 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int detailsCase_ = 0; - private java.lang.Object details_; - public DetailsCase - getDetailsCase() { - return DetailsCase.forNumber( - detailsCase_); - } - - public Builder clearDetails() { - detailsCase_ = 0; - details_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Output only. The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Output only. The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Output only. The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object resourceUri_ = ""; - /** - *
-     * Required. Immutable. A URI that represents the resource for which the
-     * occurrence applies. For example,
-     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-     * 
- * - * string resource_uri = 2; - * @return The resourceUri. - */ - public java.lang.String getResourceUri() { - java.lang.Object ref = resourceUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Immutable. A URI that represents the resource for which the
-     * occurrence applies. For example,
-     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-     * 
- * - * string resource_uri = 2; - * @return The bytes for resourceUri. - */ - public com.google.protobuf.ByteString - getResourceUriBytes() { - java.lang.Object ref = resourceUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Immutable. A URI that represents the resource for which the
-     * occurrence applies. For example,
-     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-     * 
- * - * string resource_uri = 2; - * @param value The resourceUri to set. - * @return This builder for chaining. - */ - public Builder setResourceUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - resourceUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. A URI that represents the resource for which the
-     * occurrence applies. For example,
-     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-     * 
- * - * string resource_uri = 2; - * @return This builder for chaining. - */ - public Builder clearResourceUri() { - resourceUri_ = getDefaultInstance().getResourceUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. A URI that represents the resource for which the
-     * occurrence applies. For example,
-     * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-     * 
- * - * string resource_uri = 2; - * @param value The bytes for resourceUri to set. - * @return This builder for chaining. - */ - public Builder setResourceUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - resourceUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object noteName_ = ""; - /** - *
-     * Required. Immutable. The analysis note associated with this occurrence, in
-     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-     * used as a filter in list requests.
-     * 
- * - * string note_name = 3; - * @return The noteName. - */ - public java.lang.String getNoteName() { - java.lang.Object ref = noteName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - noteName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Immutable. The analysis note associated with this occurrence, in
-     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-     * used as a filter in list requests.
-     * 
- * - * string note_name = 3; - * @return The bytes for noteName. - */ - public com.google.protobuf.ByteString - getNoteNameBytes() { - java.lang.Object ref = noteName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - noteName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Immutable. The analysis note associated with this occurrence, in
-     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-     * used as a filter in list requests.
-     * 
- * - * string note_name = 3; - * @param value The noteName to set. - * @return This builder for chaining. - */ - public Builder setNoteName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - noteName_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The analysis note associated with this occurrence, in
-     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-     * used as a filter in list requests.
-     * 
- * - * string note_name = 3; - * @return This builder for chaining. - */ - public Builder clearNoteName() { - noteName_ = getDefaultInstance().getNoteName(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * Required. Immutable. The analysis note associated with this occurrence, in
-     * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-     * used as a filter in list requests.
-     * 
- * - * string note_name = 3; - * @param value The bytes for noteName to set. - * @return This builder for chaining. - */ - public Builder setNoteNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - noteName_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private int kind_ = 0; - /** - *
-     * Output only. This explicitly denotes which of the occurrence details are
-     * specified. This field can be used as a filter in list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-     * Output only. This explicitly denotes which of the occurrence details are
-     * specified. This field can be used as a filter in list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @param value The enum numeric value on the wire for kind to set. - * @return This builder for chaining. - */ - public Builder setKindValue(int value) { - kind_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Output only. This explicitly denotes which of the occurrence details are
-     * specified. This field can be used as a filter in list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The kind. - */ - @java.lang.Override - public io.grafeas.v1.NoteKind getKind() { - io.grafeas.v1.NoteKind result = io.grafeas.v1.NoteKind.forNumber(kind_); - return result == null ? io.grafeas.v1.NoteKind.UNRECOGNIZED : result; - } - /** - *
-     * Output only. This explicitly denotes which of the occurrence details are
-     * specified. This field can be used as a filter in list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @param value The kind to set. - * @return This builder for chaining. - */ - public Builder setKind(io.grafeas.v1.NoteKind value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - kind_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. This explicitly denotes which of the occurrence details are
-     * specified. This field can be used as a filter in list requests.
-     * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return This builder for chaining. - */ - public Builder clearKind() { - bitField0_ = (bitField0_ & ~0x00000008); - kind_ = 0; - onChanged(); - return this; - } - - private java.lang.Object remediation_ = ""; - /** - *
-     * A description of actions that can be taken to remedy the note.
-     * 
- * - * string remediation = 5; - * @return The remediation. - */ - public java.lang.String getRemediation() { - java.lang.Object ref = remediation_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - remediation_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A description of actions that can be taken to remedy the note.
-     * 
- * - * string remediation = 5; - * @return The bytes for remediation. - */ - public com.google.protobuf.ByteString - getRemediationBytes() { - java.lang.Object ref = remediation_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - remediation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A description of actions that can be taken to remedy the note.
-     * 
- * - * string remediation = 5; - * @param value The remediation to set. - * @return This builder for chaining. - */ - public Builder setRemediation( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - remediation_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * A description of actions that can be taken to remedy the note.
-     * 
- * - * string remediation = 5; - * @return This builder for chaining. - */ - public Builder clearRemediation() { - remediation_ = getDefaultInstance().getRemediation(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * A description of actions that can be taken to remedy the note.
-     * 
- * - * string remediation = 5; - * @param value The bytes for remediation to set. - * @return This builder for chaining. - */ - public Builder setRemediationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - remediation_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - createTime_ != null && - createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000020); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The time this occurrence was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - updateTime_ != null && - updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000040); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * Output only. The time this occurrence was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityOccurrence, io.grafeas.v1.VulnerabilityOccurrence.Builder, io.grafeas.v1.VulnerabilityOccurrenceOrBuilder> vulnerabilityBuilder_; - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @return Whether the vulnerability field is set. - */ - @java.lang.Override - public boolean hasVulnerability() { - return detailsCase_ == 8; - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @return The vulnerability. - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence getVulnerability() { - if (vulnerabilityBuilder_ == null) { - if (detailsCase_ == 8) { - return (io.grafeas.v1.VulnerabilityOccurrence) details_; - } - return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 8) { - return vulnerabilityBuilder_.getMessage(); - } - return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - public Builder setVulnerability(io.grafeas.v1.VulnerabilityOccurrence value) { - if (vulnerabilityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - vulnerabilityBuilder_.setMessage(value); - } - detailsCase_ = 8; - return this; - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - public Builder setVulnerability( - io.grafeas.v1.VulnerabilityOccurrence.Builder builderForValue) { - if (vulnerabilityBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - vulnerabilityBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 8; - return this; - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - public Builder mergeVulnerability(io.grafeas.v1.VulnerabilityOccurrence value) { - if (vulnerabilityBuilder_ == null) { - if (detailsCase_ == 8 && - details_ != io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.VulnerabilityOccurrence.newBuilder((io.grafeas.v1.VulnerabilityOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 8) { - vulnerabilityBuilder_.mergeFrom(value); - } else { - vulnerabilityBuilder_.setMessage(value); - } - } - detailsCase_ = 8; - return this; - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - public Builder clearVulnerability() { - if (vulnerabilityBuilder_ == null) { - if (detailsCase_ == 8) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 8) { - detailsCase_ = 0; - details_ = null; - } - vulnerabilityBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - public io.grafeas.v1.VulnerabilityOccurrence.Builder getVulnerabilityBuilder() { - return getVulnerabilityFieldBuilder().getBuilder(); - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrenceOrBuilder getVulnerabilityOrBuilder() { - if ((detailsCase_ == 8) && (vulnerabilityBuilder_ != null)) { - return vulnerabilityBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 8) { - return (io.grafeas.v1.VulnerabilityOccurrence) details_; - } - return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes a security vulnerability.
-     * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityOccurrence, io.grafeas.v1.VulnerabilityOccurrence.Builder, io.grafeas.v1.VulnerabilityOccurrenceOrBuilder> - getVulnerabilityFieldBuilder() { - if (vulnerabilityBuilder_ == null) { - if (!(detailsCase_ == 8)) { - details_ = io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); - } - vulnerabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityOccurrence, io.grafeas.v1.VulnerabilityOccurrence.Builder, io.grafeas.v1.VulnerabilityOccurrenceOrBuilder>( - (io.grafeas.v1.VulnerabilityOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 8; - onChanged(); - return vulnerabilityBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildOccurrence, io.grafeas.v1.BuildOccurrence.Builder, io.grafeas.v1.BuildOccurrenceOrBuilder> buildBuilder_; - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - * @return Whether the build field is set. - */ - @java.lang.Override - public boolean hasBuild() { - return detailsCase_ == 9; - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - * @return The build. - */ - @java.lang.Override - public io.grafeas.v1.BuildOccurrence getBuild() { - if (buildBuilder_ == null) { - if (detailsCase_ == 9) { - return (io.grafeas.v1.BuildOccurrence) details_; - } - return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 9) { - return buildBuilder_.getMessage(); - } - return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - public Builder setBuild(io.grafeas.v1.BuildOccurrence value) { - if (buildBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - buildBuilder_.setMessage(value); - } - detailsCase_ = 9; - return this; - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - public Builder setBuild( - io.grafeas.v1.BuildOccurrence.Builder builderForValue) { - if (buildBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - buildBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 9; - return this; - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - public Builder mergeBuild(io.grafeas.v1.BuildOccurrence value) { - if (buildBuilder_ == null) { - if (detailsCase_ == 9 && - details_ != io.grafeas.v1.BuildOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.BuildOccurrence.newBuilder((io.grafeas.v1.BuildOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 9) { - buildBuilder_.mergeFrom(value); - } else { - buildBuilder_.setMessage(value); - } - } - detailsCase_ = 9; - return this; - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - public Builder clearBuild() { - if (buildBuilder_ == null) { - if (detailsCase_ == 9) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 9) { - detailsCase_ = 0; - details_ = null; - } - buildBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - public io.grafeas.v1.BuildOccurrence.Builder getBuildBuilder() { - return getBuildFieldBuilder().getBuilder(); - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - @java.lang.Override - public io.grafeas.v1.BuildOccurrenceOrBuilder getBuildOrBuilder() { - if ((detailsCase_ == 9) && (buildBuilder_ != null)) { - return buildBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 9) { - return (io.grafeas.v1.BuildOccurrence) details_; - } - return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes a verifiable build.
-     * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildOccurrence, io.grafeas.v1.BuildOccurrence.Builder, io.grafeas.v1.BuildOccurrenceOrBuilder> - getBuildFieldBuilder() { - if (buildBuilder_ == null) { - if (!(detailsCase_ == 9)) { - details_ = io.grafeas.v1.BuildOccurrence.getDefaultInstance(); - } - buildBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.BuildOccurrence, io.grafeas.v1.BuildOccurrence.Builder, io.grafeas.v1.BuildOccurrenceOrBuilder>( - (io.grafeas.v1.BuildOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 9; - onChanged(); - return buildBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ImageOccurrence, io.grafeas.v1.ImageOccurrence.Builder, io.grafeas.v1.ImageOccurrenceOrBuilder> imageBuilder_; - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - * @return Whether the image field is set. - */ - @java.lang.Override - public boolean hasImage() { - return detailsCase_ == 10; - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - * @return The image. - */ - @java.lang.Override - public io.grafeas.v1.ImageOccurrence getImage() { - if (imageBuilder_ == null) { - if (detailsCase_ == 10) { - return (io.grafeas.v1.ImageOccurrence) details_; - } - return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 10) { - return imageBuilder_.getMessage(); - } - return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - public Builder setImage(io.grafeas.v1.ImageOccurrence value) { - if (imageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - imageBuilder_.setMessage(value); - } - detailsCase_ = 10; - return this; - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - public Builder setImage( - io.grafeas.v1.ImageOccurrence.Builder builderForValue) { - if (imageBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - imageBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 10; - return this; - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - public Builder mergeImage(io.grafeas.v1.ImageOccurrence value) { - if (imageBuilder_ == null) { - if (detailsCase_ == 10 && - details_ != io.grafeas.v1.ImageOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.ImageOccurrence.newBuilder((io.grafeas.v1.ImageOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 10) { - imageBuilder_.mergeFrom(value); - } else { - imageBuilder_.setMessage(value); - } - } - detailsCase_ = 10; - return this; - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - public Builder clearImage() { - if (imageBuilder_ == null) { - if (detailsCase_ == 10) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 10) { - detailsCase_ = 0; - details_ = null; - } - imageBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - public io.grafeas.v1.ImageOccurrence.Builder getImageBuilder() { - return getImageFieldBuilder().getBuilder(); - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - @java.lang.Override - public io.grafeas.v1.ImageOccurrenceOrBuilder getImageOrBuilder() { - if ((detailsCase_ == 10) && (imageBuilder_ != null)) { - return imageBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 10) { - return (io.grafeas.v1.ImageOccurrence) details_; - } - return io.grafeas.v1.ImageOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes how this resource derives from the basis in the associated
-     * note.
-     * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ImageOccurrence, io.grafeas.v1.ImageOccurrence.Builder, io.grafeas.v1.ImageOccurrenceOrBuilder> - getImageFieldBuilder() { - if (imageBuilder_ == null) { - if (!(detailsCase_ == 10)) { - details_ = io.grafeas.v1.ImageOccurrence.getDefaultInstance(); - } - imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ImageOccurrence, io.grafeas.v1.ImageOccurrence.Builder, io.grafeas.v1.ImageOccurrenceOrBuilder>( - (io.grafeas.v1.ImageOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 10; - onChanged(); - return imageBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.PackageOccurrence, io.grafeas.v1.PackageOccurrence.Builder, io.grafeas.v1.PackageOccurrenceOrBuilder> packageBuilder_; - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - * @return Whether the package field is set. - */ - @java.lang.Override - public boolean hasPackage() { - return detailsCase_ == 11; - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - * @return The package. - */ - @java.lang.Override - public io.grafeas.v1.PackageOccurrence getPackage() { - if (packageBuilder_ == null) { - if (detailsCase_ == 11) { - return (io.grafeas.v1.PackageOccurrence) details_; - } - return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 11) { - return packageBuilder_.getMessage(); - } - return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - public Builder setPackage(io.grafeas.v1.PackageOccurrence value) { - if (packageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - packageBuilder_.setMessage(value); - } - detailsCase_ = 11; - return this; - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - public Builder setPackage( - io.grafeas.v1.PackageOccurrence.Builder builderForValue) { - if (packageBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - packageBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 11; - return this; - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - public Builder mergePackage(io.grafeas.v1.PackageOccurrence value) { - if (packageBuilder_ == null) { - if (detailsCase_ == 11 && - details_ != io.grafeas.v1.PackageOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.PackageOccurrence.newBuilder((io.grafeas.v1.PackageOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 11) { - packageBuilder_.mergeFrom(value); - } else { - packageBuilder_.setMessage(value); - } - } - detailsCase_ = 11; - return this; - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - public Builder clearPackage() { - if (packageBuilder_ == null) { - if (detailsCase_ == 11) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 11) { - detailsCase_ = 0; - details_ = null; - } - packageBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - public io.grafeas.v1.PackageOccurrence.Builder getPackageBuilder() { - return getPackageFieldBuilder().getBuilder(); - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - @java.lang.Override - public io.grafeas.v1.PackageOccurrenceOrBuilder getPackageOrBuilder() { - if ((detailsCase_ == 11) && (packageBuilder_ != null)) { - return packageBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 11) { - return (io.grafeas.v1.PackageOccurrence) details_; - } - return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes the installation of a package on the linked resource.
-     * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.PackageOccurrence, io.grafeas.v1.PackageOccurrence.Builder, io.grafeas.v1.PackageOccurrenceOrBuilder> - getPackageFieldBuilder() { - if (packageBuilder_ == null) { - if (!(detailsCase_ == 11)) { - details_ = io.grafeas.v1.PackageOccurrence.getDefaultInstance(); - } - packageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.PackageOccurrence, io.grafeas.v1.PackageOccurrence.Builder, io.grafeas.v1.PackageOccurrenceOrBuilder>( - (io.grafeas.v1.PackageOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 11; - onChanged(); - return packageBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DeploymentOccurrence, io.grafeas.v1.DeploymentOccurrence.Builder, io.grafeas.v1.DeploymentOccurrenceOrBuilder> deploymentBuilder_; - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - * @return Whether the deployment field is set. - */ - @java.lang.Override - public boolean hasDeployment() { - return detailsCase_ == 12; - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - * @return The deployment. - */ - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrence getDeployment() { - if (deploymentBuilder_ == null) { - if (detailsCase_ == 12) { - return (io.grafeas.v1.DeploymentOccurrence) details_; - } - return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 12) { - return deploymentBuilder_.getMessage(); - } - return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - public Builder setDeployment(io.grafeas.v1.DeploymentOccurrence value) { - if (deploymentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - deploymentBuilder_.setMessage(value); - } - detailsCase_ = 12; - return this; - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - public Builder setDeployment( - io.grafeas.v1.DeploymentOccurrence.Builder builderForValue) { - if (deploymentBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - deploymentBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 12; - return this; - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - public Builder mergeDeployment(io.grafeas.v1.DeploymentOccurrence value) { - if (deploymentBuilder_ == null) { - if (detailsCase_ == 12 && - details_ != io.grafeas.v1.DeploymentOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.DeploymentOccurrence.newBuilder((io.grafeas.v1.DeploymentOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 12) { - deploymentBuilder_.mergeFrom(value); - } else { - deploymentBuilder_.setMessage(value); - } - } - detailsCase_ = 12; - return this; - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - public Builder clearDeployment() { - if (deploymentBuilder_ == null) { - if (detailsCase_ == 12) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 12) { - detailsCase_ = 0; - details_ = null; - } - deploymentBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - public io.grafeas.v1.DeploymentOccurrence.Builder getDeploymentBuilder() { - return getDeploymentFieldBuilder().getBuilder(); - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - @java.lang.Override - public io.grafeas.v1.DeploymentOccurrenceOrBuilder getDeploymentOrBuilder() { - if ((detailsCase_ == 12) && (deploymentBuilder_ != null)) { - return deploymentBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 12) { - return (io.grafeas.v1.DeploymentOccurrence) details_; - } - return io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes the deployment of an artifact on a runtime.
-     * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DeploymentOccurrence, io.grafeas.v1.DeploymentOccurrence.Builder, io.grafeas.v1.DeploymentOccurrenceOrBuilder> - getDeploymentFieldBuilder() { - if (deploymentBuilder_ == null) { - if (!(detailsCase_ == 12)) { - details_ = io.grafeas.v1.DeploymentOccurrence.getDefaultInstance(); - } - deploymentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DeploymentOccurrence, io.grafeas.v1.DeploymentOccurrence.Builder, io.grafeas.v1.DeploymentOccurrenceOrBuilder>( - (io.grafeas.v1.DeploymentOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 12; - onChanged(); - return deploymentBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryOccurrence, io.grafeas.v1.DiscoveryOccurrence.Builder, io.grafeas.v1.DiscoveryOccurrenceOrBuilder> discoveryBuilder_; - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @return Whether the discovery field is set. - */ - @java.lang.Override - public boolean hasDiscovery() { - return detailsCase_ == 13; - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @return The discovery. - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrence getDiscovery() { - if (discoveryBuilder_ == null) { - if (detailsCase_ == 13) { - return (io.grafeas.v1.DiscoveryOccurrence) details_; - } - return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 13) { - return discoveryBuilder_.getMessage(); - } - return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - public Builder setDiscovery(io.grafeas.v1.DiscoveryOccurrence value) { - if (discoveryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - discoveryBuilder_.setMessage(value); - } - detailsCase_ = 13; - return this; - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - public Builder setDiscovery( - io.grafeas.v1.DiscoveryOccurrence.Builder builderForValue) { - if (discoveryBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - discoveryBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 13; - return this; - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - public Builder mergeDiscovery(io.grafeas.v1.DiscoveryOccurrence value) { - if (discoveryBuilder_ == null) { - if (detailsCase_ == 13 && - details_ != io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.DiscoveryOccurrence.newBuilder((io.grafeas.v1.DiscoveryOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 13) { - discoveryBuilder_.mergeFrom(value); - } else { - discoveryBuilder_.setMessage(value); - } - } - detailsCase_ = 13; - return this; - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - public Builder clearDiscovery() { - if (discoveryBuilder_ == null) { - if (detailsCase_ == 13) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 13) { - detailsCase_ = 0; - details_ = null; - } - discoveryBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - public io.grafeas.v1.DiscoveryOccurrence.Builder getDiscoveryBuilder() { - return getDiscoveryFieldBuilder().getBuilder(); - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - @java.lang.Override - public io.grafeas.v1.DiscoveryOccurrenceOrBuilder getDiscoveryOrBuilder() { - if ((detailsCase_ == 13) && (discoveryBuilder_ != null)) { - return discoveryBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 13) { - return (io.grafeas.v1.DiscoveryOccurrence) details_; - } - return io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes when a resource was discovered.
-     * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryOccurrence, io.grafeas.v1.DiscoveryOccurrence.Builder, io.grafeas.v1.DiscoveryOccurrenceOrBuilder> - getDiscoveryFieldBuilder() { - if (discoveryBuilder_ == null) { - if (!(detailsCase_ == 13)) { - details_ = io.grafeas.v1.DiscoveryOccurrence.getDefaultInstance(); - } - discoveryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DiscoveryOccurrence, io.grafeas.v1.DiscoveryOccurrence.Builder, io.grafeas.v1.DiscoveryOccurrenceOrBuilder>( - (io.grafeas.v1.DiscoveryOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 13; - onChanged(); - return discoveryBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationOccurrence, io.grafeas.v1.AttestationOccurrence.Builder, io.grafeas.v1.AttestationOccurrenceOrBuilder> attestationBuilder_; - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - * @return Whether the attestation field is set. - */ - @java.lang.Override - public boolean hasAttestation() { - return detailsCase_ == 14; - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - * @return The attestation. - */ - @java.lang.Override - public io.grafeas.v1.AttestationOccurrence getAttestation() { - if (attestationBuilder_ == null) { - if (detailsCase_ == 14) { - return (io.grafeas.v1.AttestationOccurrence) details_; - } - return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 14) { - return attestationBuilder_.getMessage(); - } - return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - public Builder setAttestation(io.grafeas.v1.AttestationOccurrence value) { - if (attestationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - attestationBuilder_.setMessage(value); - } - detailsCase_ = 14; - return this; - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - public Builder setAttestation( - io.grafeas.v1.AttestationOccurrence.Builder builderForValue) { - if (attestationBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - attestationBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 14; - return this; - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - public Builder mergeAttestation(io.grafeas.v1.AttestationOccurrence value) { - if (attestationBuilder_ == null) { - if (detailsCase_ == 14 && - details_ != io.grafeas.v1.AttestationOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.AttestationOccurrence.newBuilder((io.grafeas.v1.AttestationOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 14) { - attestationBuilder_.mergeFrom(value); - } else { - attestationBuilder_.setMessage(value); - } - } - detailsCase_ = 14; - return this; - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - public Builder clearAttestation() { - if (attestationBuilder_ == null) { - if (detailsCase_ == 14) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 14) { - detailsCase_ = 0; - details_ = null; - } - attestationBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - public io.grafeas.v1.AttestationOccurrence.Builder getAttestationBuilder() { - return getAttestationFieldBuilder().getBuilder(); - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - @java.lang.Override - public io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder() { - if ((detailsCase_ == 14) && (attestationBuilder_ != null)) { - return attestationBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 14) { - return (io.grafeas.v1.AttestationOccurrence) details_; - } - return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes an attestation of an artifact.
-     * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationOccurrence, io.grafeas.v1.AttestationOccurrence.Builder, io.grafeas.v1.AttestationOccurrenceOrBuilder> - getAttestationFieldBuilder() { - if (attestationBuilder_ == null) { - if (!(detailsCase_ == 14)) { - details_ = io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); - } - attestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationOccurrence, io.grafeas.v1.AttestationOccurrence.Builder, io.grafeas.v1.AttestationOccurrenceOrBuilder>( - (io.grafeas.v1.AttestationOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 14; - onChanged(); - return attestationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeOccurrence, io.grafeas.v1.UpgradeOccurrence.Builder, io.grafeas.v1.UpgradeOccurrenceOrBuilder> upgradeBuilder_; - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @return Whether the upgrade field is set. - */ - @java.lang.Override - public boolean hasUpgrade() { - return detailsCase_ == 15; - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @return The upgrade. - */ - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrence getUpgrade() { - if (upgradeBuilder_ == null) { - if (detailsCase_ == 15) { - return (io.grafeas.v1.UpgradeOccurrence) details_; - } - return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 15) { - return upgradeBuilder_.getMessage(); - } - return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - public Builder setUpgrade(io.grafeas.v1.UpgradeOccurrence value) { - if (upgradeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - upgradeBuilder_.setMessage(value); - } - detailsCase_ = 15; - return this; - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - public Builder setUpgrade( - io.grafeas.v1.UpgradeOccurrence.Builder builderForValue) { - if (upgradeBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - upgradeBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 15; - return this; - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - public Builder mergeUpgrade(io.grafeas.v1.UpgradeOccurrence value) { - if (upgradeBuilder_ == null) { - if (detailsCase_ == 15 && - details_ != io.grafeas.v1.UpgradeOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.UpgradeOccurrence.newBuilder((io.grafeas.v1.UpgradeOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 15) { - upgradeBuilder_.mergeFrom(value); - } else { - upgradeBuilder_.setMessage(value); - } - } - detailsCase_ = 15; - return this; - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - public Builder clearUpgrade() { - if (upgradeBuilder_ == null) { - if (detailsCase_ == 15) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 15) { - detailsCase_ = 0; - details_ = null; - } - upgradeBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - public io.grafeas.v1.UpgradeOccurrence.Builder getUpgradeBuilder() { - return getUpgradeFieldBuilder().getBuilder(); - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrenceOrBuilder getUpgradeOrBuilder() { - if ((detailsCase_ == 15) && (upgradeBuilder_ != null)) { - return upgradeBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 15) { - return (io.grafeas.v1.UpgradeOccurrence) details_; - } - return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes an available package upgrade on the linked resource.
-     * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeOccurrence, io.grafeas.v1.UpgradeOccurrence.Builder, io.grafeas.v1.UpgradeOccurrenceOrBuilder> - getUpgradeFieldBuilder() { - if (upgradeBuilder_ == null) { - if (!(detailsCase_ == 15)) { - details_ = io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); - } - upgradeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeOccurrence, io.grafeas.v1.UpgradeOccurrence.Builder, io.grafeas.v1.UpgradeOccurrenceOrBuilder>( - (io.grafeas.v1.UpgradeOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 15; - onChanged(); - return upgradeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceOccurrence, io.grafeas.v1.ComplianceOccurrence.Builder, io.grafeas.v1.ComplianceOccurrenceOrBuilder> complianceBuilder_; - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - * @return Whether the compliance field is set. - */ - @java.lang.Override - public boolean hasCompliance() { - return detailsCase_ == 16; - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - * @return The compliance. - */ - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrence getCompliance() { - if (complianceBuilder_ == null) { - if (detailsCase_ == 16) { - return (io.grafeas.v1.ComplianceOccurrence) details_; - } - return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 16) { - return complianceBuilder_.getMessage(); - } - return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - public Builder setCompliance(io.grafeas.v1.ComplianceOccurrence value) { - if (complianceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - complianceBuilder_.setMessage(value); - } - detailsCase_ = 16; - return this; - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - public Builder setCompliance( - io.grafeas.v1.ComplianceOccurrence.Builder builderForValue) { - if (complianceBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - complianceBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 16; - return this; - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - public Builder mergeCompliance(io.grafeas.v1.ComplianceOccurrence value) { - if (complianceBuilder_ == null) { - if (detailsCase_ == 16 && - details_ != io.grafeas.v1.ComplianceOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.ComplianceOccurrence.newBuilder((io.grafeas.v1.ComplianceOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 16) { - complianceBuilder_.mergeFrom(value); - } else { - complianceBuilder_.setMessage(value); - } - } - detailsCase_ = 16; - return this; - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - public Builder clearCompliance() { - if (complianceBuilder_ == null) { - if (detailsCase_ == 16) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 16) { - detailsCase_ = 0; - details_ = null; - } - complianceBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - public io.grafeas.v1.ComplianceOccurrence.Builder getComplianceBuilder() { - return getComplianceFieldBuilder().getBuilder(); - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - @java.lang.Override - public io.grafeas.v1.ComplianceOccurrenceOrBuilder getComplianceOrBuilder() { - if ((detailsCase_ == 16) && (complianceBuilder_ != null)) { - return complianceBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 16) { - return (io.grafeas.v1.ComplianceOccurrence) details_; - } - return io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes a compliance violation on a linked resource.
-     * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceOccurrence, io.grafeas.v1.ComplianceOccurrence.Builder, io.grafeas.v1.ComplianceOccurrenceOrBuilder> - getComplianceFieldBuilder() { - if (complianceBuilder_ == null) { - if (!(detailsCase_ == 16)) { - details_ = io.grafeas.v1.ComplianceOccurrence.getDefaultInstance(); - } - complianceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ComplianceOccurrence, io.grafeas.v1.ComplianceOccurrence.Builder, io.grafeas.v1.ComplianceOccurrenceOrBuilder>( - (io.grafeas.v1.ComplianceOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 16; - onChanged(); - return complianceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationOccurrence, io.grafeas.v1.DSSEAttestationOccurrence.Builder, io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder> dsseAttestationBuilder_; - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @return Whether the dsseAttestation field is set. - */ - @java.lang.Override - public boolean hasDsseAttestation() { - return detailsCase_ == 17; - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @return The dsseAttestation. - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrence getDsseAttestation() { - if (dsseAttestationBuilder_ == null) { - if (detailsCase_ == 17) { - return (io.grafeas.v1.DSSEAttestationOccurrence) details_; - } - return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); - } else { - if (detailsCase_ == 17) { - return dsseAttestationBuilder_.getMessage(); - } - return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - public Builder setDsseAttestation(io.grafeas.v1.DSSEAttestationOccurrence value) { - if (dsseAttestationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - dsseAttestationBuilder_.setMessage(value); - } - detailsCase_ = 17; - return this; - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - public Builder setDsseAttestation( - io.grafeas.v1.DSSEAttestationOccurrence.Builder builderForValue) { - if (dsseAttestationBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - dsseAttestationBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 17; - return this; - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - public Builder mergeDsseAttestation(io.grafeas.v1.DSSEAttestationOccurrence value) { - if (dsseAttestationBuilder_ == null) { - if (detailsCase_ == 17 && - details_ != io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance()) { - details_ = io.grafeas.v1.DSSEAttestationOccurrence.newBuilder((io.grafeas.v1.DSSEAttestationOccurrence) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 17) { - dsseAttestationBuilder_.mergeFrom(value); - } else { - dsseAttestationBuilder_.setMessage(value); - } - } - detailsCase_ = 17; - return this; - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - public Builder clearDsseAttestation() { - if (dsseAttestationBuilder_ == null) { - if (detailsCase_ == 17) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 17) { - detailsCase_ = 0; - details_ = null; - } - dsseAttestationBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - public io.grafeas.v1.DSSEAttestationOccurrence.Builder getDsseAttestationBuilder() { - return getDsseAttestationFieldBuilder().getBuilder(); - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - @java.lang.Override - public io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder getDsseAttestationOrBuilder() { - if ((detailsCase_ == 17) && (dsseAttestationBuilder_ != null)) { - return dsseAttestationBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 17) { - return (io.grafeas.v1.DSSEAttestationOccurrence) details_; - } - return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); - } - } - /** - *
-     * Describes an attestation of an artifact using dsse.
-     * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationOccurrence, io.grafeas.v1.DSSEAttestationOccurrence.Builder, io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder> - getDsseAttestationFieldBuilder() { - if (dsseAttestationBuilder_ == null) { - if (!(detailsCase_ == 17)) { - details_ = io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance(); - } - dsseAttestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.DSSEAttestationOccurrence, io.grafeas.v1.DSSEAttestationOccurrence.Builder, io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder>( - (io.grafeas.v1.DSSEAttestationOccurrence) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 17; - onChanged(); - return dsseAttestationBuilder_; - } - - private io.grafeas.v1.Envelope envelope_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> envelopeBuilder_; - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - * @return Whether the envelope field is set. - */ - public boolean hasEnvelope() { - return ((bitField0_ & 0x00020000) != 0); - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - * @return The envelope. - */ - public io.grafeas.v1.Envelope getEnvelope() { - if (envelopeBuilder_ == null) { - return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } else { - return envelopeBuilder_.getMessage(); - } - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - public Builder setEnvelope(io.grafeas.v1.Envelope value) { - if (envelopeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - envelope_ = value; - } else { - envelopeBuilder_.setMessage(value); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - public Builder setEnvelope( - io.grafeas.v1.Envelope.Builder builderForValue) { - if (envelopeBuilder_ == null) { - envelope_ = builderForValue.build(); - } else { - envelopeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - public Builder mergeEnvelope(io.grafeas.v1.Envelope value) { - if (envelopeBuilder_ == null) { - if (((bitField0_ & 0x00020000) != 0) && - envelope_ != null && - envelope_ != io.grafeas.v1.Envelope.getDefaultInstance()) { - getEnvelopeBuilder().mergeFrom(value); - } else { - envelope_ = value; - } - } else { - envelopeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - public Builder clearEnvelope() { - bitField0_ = (bitField0_ & ~0x00020000); - envelope_ = null; - if (envelopeBuilder_ != null) { - envelopeBuilder_.dispose(); - envelopeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - public io.grafeas.v1.Envelope.Builder getEnvelopeBuilder() { - bitField0_ |= 0x00020000; - onChanged(); - return getEnvelopeFieldBuilder().getBuilder(); - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() { - if (envelopeBuilder_ != null) { - return envelopeBuilder_.getMessageOrBuilder(); - } else { - return envelope_ == null ? - io.grafeas.v1.Envelope.getDefaultInstance() : envelope_; - } - } - /** - *
-     * https://github.com/secure-systems-lab/dsse
-     * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder> - getEnvelopeFieldBuilder() { - if (envelopeBuilder_ == null) { - envelopeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder>( - getEnvelope(), - getParentForChildren(), - isClean()); - envelope_ = null; - } - return envelopeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Occurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Occurrence) - private static final io.grafeas.v1.Occurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Occurrence(); - } - - public static io.grafeas.v1.Occurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Occurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Occurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java deleted file mode 100644 index b4dc17a5f67a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class OccurrenceName implements ResourceName { - private static final PathTemplate PROJECT_OCCURRENCE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/occurrences/{occurrence}"); - private volatile Map fieldValuesMap; - private final String project; - private final String occurrence; - - @Deprecated - protected OccurrenceName() { - project = null; - occurrence = null; - } - - private OccurrenceName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - occurrence = Preconditions.checkNotNull(builder.getOccurrence()); - } - - public String getProject() { - return project; - } - - public String getOccurrence() { - return occurrence; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static OccurrenceName of(String project, String occurrence) { - return newBuilder().setProject(project).setOccurrence(occurrence).build(); - } - - public static String format(String project, String occurrence) { - return newBuilder().setProject(project).setOccurrence(occurrence).build().toString(); - } - - public static OccurrenceName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_OCCURRENCE.validatedMatch( - formattedString, "OccurrenceName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("occurrence")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (OccurrenceName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_OCCURRENCE.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (occurrence != null) { - fieldMapBuilder.put("occurrence", occurrence); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_OCCURRENCE.instantiate("project", project, "occurrence", occurrence); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - OccurrenceName that = ((OccurrenceName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.occurrence, that.occurrence); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(occurrence); - return h; - } - - /** Builder for projects/{project}/occurrences/{occurrence}. */ - public static class Builder { - private String project; - private String occurrence; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getOccurrence() { - return occurrence; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setOccurrence(String occurrence) { - this.occurrence = occurrence; - return this; - } - - private Builder(OccurrenceName occurrenceName) { - this.project = occurrenceName.project; - this.occurrence = occurrenceName.occurrence; - } - - public OccurrenceName build() { - return new OccurrenceName(this); - } - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java deleted file mode 100644 index bbc9843777f1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java +++ /dev/null @@ -1,476 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface OccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Occurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Output only. The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Output only. The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. Immutable. A URI that represents the resource for which the
-   * occurrence applies. For example,
-   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-   * 
- * - * string resource_uri = 2; - * @return The resourceUri. - */ - java.lang.String getResourceUri(); - /** - *
-   * Required. Immutable. A URI that represents the resource for which the
-   * occurrence applies. For example,
-   * `https://gcr.io/project/image@sha256:123abc` for a Docker image.
-   * 
- * - * string resource_uri = 2; - * @return The bytes for resourceUri. - */ - com.google.protobuf.ByteString - getResourceUriBytes(); - - /** - *
-   * Required. Immutable. The analysis note associated with this occurrence, in
-   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-   * used as a filter in list requests.
-   * 
- * - * string note_name = 3; - * @return The noteName. - */ - java.lang.String getNoteName(); - /** - *
-   * Required. Immutable. The analysis note associated with this occurrence, in
-   * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
-   * used as a filter in list requests.
-   * 
- * - * string note_name = 3; - * @return The bytes for noteName. - */ - com.google.protobuf.ByteString - getNoteNameBytes(); - - /** - *
-   * Output only. This explicitly denotes which of the occurrence details are
-   * specified. This field can be used as a filter in list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - int getKindValue(); - /** - *
-   * Output only. This explicitly denotes which of the occurrence details are
-   * specified. This field can be used as a filter in list requests.
-   * 
- * - * .grafeas.v1.NoteKind kind = 4; - * @return The kind. - */ - io.grafeas.v1.NoteKind getKind(); - - /** - *
-   * A description of actions that can be taken to remedy the note.
-   * 
- * - * string remediation = 5; - * @return The remediation. - */ - java.lang.String getRemediation(); - /** - *
-   * A description of actions that can be taken to remedy the note.
-   * 
- * - * string remediation = 5; - * @return The bytes for remediation. - */ - com.google.protobuf.ByteString - getRemediationBytes(); - - /** - *
-   * Output only. The time this occurrence was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The time this occurrence was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The time this occurrence was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. The time this occurrence was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * Output only. The time this occurrence was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * Output only. The time this occurrence was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * Describes a security vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @return Whether the vulnerability field is set. - */ - boolean hasVulnerability(); - /** - *
-   * Describes a security vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @return The vulnerability. - */ - io.grafeas.v1.VulnerabilityOccurrence getVulnerability(); - /** - *
-   * Describes a security vulnerability.
-   * 
- * - * .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - */ - io.grafeas.v1.VulnerabilityOccurrenceOrBuilder getVulnerabilityOrBuilder(); - - /** - *
-   * Describes a verifiable build.
-   * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - * @return Whether the build field is set. - */ - boolean hasBuild(); - /** - *
-   * Describes a verifiable build.
-   * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - * @return The build. - */ - io.grafeas.v1.BuildOccurrence getBuild(); - /** - *
-   * Describes a verifiable build.
-   * 
- * - * .grafeas.v1.BuildOccurrence build = 9; - */ - io.grafeas.v1.BuildOccurrenceOrBuilder getBuildOrBuilder(); - - /** - *
-   * Describes how this resource derives from the basis in the associated
-   * note.
-   * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - * @return Whether the image field is set. - */ - boolean hasImage(); - /** - *
-   * Describes how this resource derives from the basis in the associated
-   * note.
-   * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - * @return The image. - */ - io.grafeas.v1.ImageOccurrence getImage(); - /** - *
-   * Describes how this resource derives from the basis in the associated
-   * note.
-   * 
- * - * .grafeas.v1.ImageOccurrence image = 10; - */ - io.grafeas.v1.ImageOccurrenceOrBuilder getImageOrBuilder(); - - /** - *
-   * Describes the installation of a package on the linked resource.
-   * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - * @return Whether the package field is set. - */ - boolean hasPackage(); - /** - *
-   * Describes the installation of a package on the linked resource.
-   * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - * @return The package. - */ - io.grafeas.v1.PackageOccurrence getPackage(); - /** - *
-   * Describes the installation of a package on the linked resource.
-   * 
- * - * .grafeas.v1.PackageOccurrence package = 11; - */ - io.grafeas.v1.PackageOccurrenceOrBuilder getPackageOrBuilder(); - - /** - *
-   * Describes the deployment of an artifact on a runtime.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - * @return Whether the deployment field is set. - */ - boolean hasDeployment(); - /** - *
-   * Describes the deployment of an artifact on a runtime.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - * @return The deployment. - */ - io.grafeas.v1.DeploymentOccurrence getDeployment(); - /** - *
-   * Describes the deployment of an artifact on a runtime.
-   * 
- * - * .grafeas.v1.DeploymentOccurrence deployment = 12; - */ - io.grafeas.v1.DeploymentOccurrenceOrBuilder getDeploymentOrBuilder(); - - /** - *
-   * Describes when a resource was discovered.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @return Whether the discovery field is set. - */ - boolean hasDiscovery(); - /** - *
-   * Describes when a resource was discovered.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @return The discovery. - */ - io.grafeas.v1.DiscoveryOccurrence getDiscovery(); - /** - *
-   * Describes when a resource was discovered.
-   * 
- * - * .grafeas.v1.DiscoveryOccurrence discovery = 13; - */ - io.grafeas.v1.DiscoveryOccurrenceOrBuilder getDiscoveryOrBuilder(); - - /** - *
-   * Describes an attestation of an artifact.
-   * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - * @return Whether the attestation field is set. - */ - boolean hasAttestation(); - /** - *
-   * Describes an attestation of an artifact.
-   * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - * @return The attestation. - */ - io.grafeas.v1.AttestationOccurrence getAttestation(); - /** - *
-   * Describes an attestation of an artifact.
-   * 
- * - * .grafeas.v1.AttestationOccurrence attestation = 14; - */ - io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder(); - - /** - *
-   * Describes an available package upgrade on the linked resource.
-   * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @return Whether the upgrade field is set. - */ - boolean hasUpgrade(); - /** - *
-   * Describes an available package upgrade on the linked resource.
-   * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @return The upgrade. - */ - io.grafeas.v1.UpgradeOccurrence getUpgrade(); - /** - *
-   * Describes an available package upgrade on the linked resource.
-   * 
- * - * .grafeas.v1.UpgradeOccurrence upgrade = 15; - */ - io.grafeas.v1.UpgradeOccurrenceOrBuilder getUpgradeOrBuilder(); - - /** - *
-   * Describes a compliance violation on a linked resource.
-   * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - * @return Whether the compliance field is set. - */ - boolean hasCompliance(); - /** - *
-   * Describes a compliance violation on a linked resource.
-   * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - * @return The compliance. - */ - io.grafeas.v1.ComplianceOccurrence getCompliance(); - /** - *
-   * Describes a compliance violation on a linked resource.
-   * 
- * - * .grafeas.v1.ComplianceOccurrence compliance = 16; - */ - io.grafeas.v1.ComplianceOccurrenceOrBuilder getComplianceOrBuilder(); - - /** - *
-   * Describes an attestation of an artifact using dsse.
-   * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @return Whether the dsseAttestation field is set. - */ - boolean hasDsseAttestation(); - /** - *
-   * Describes an attestation of an artifact using dsse.
-   * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @return The dsseAttestation. - */ - io.grafeas.v1.DSSEAttestationOccurrence getDsseAttestation(); - /** - *
-   * Describes an attestation of an artifact using dsse.
-   * 
- * - * .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - */ - io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder getDsseAttestationOrBuilder(); - - /** - *
-   * https://github.com/secure-systems-lab/dsse
-   * 
- * - * .grafeas.v1.Envelope envelope = 18; - * @return Whether the envelope field is set. - */ - boolean hasEnvelope(); - /** - *
-   * https://github.com/secure-systems-lab/dsse
-   * 
- * - * .grafeas.v1.Envelope envelope = 18; - * @return The envelope. - */ - io.grafeas.v1.Envelope getEnvelope(); - /** - *
-   * https://github.com/secure-systems-lab/dsse
-   * 
- * - * .grafeas.v1.Envelope envelope = 18; - */ - io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder(); - - public io.grafeas.v1.Occurrence.DetailsCase getDetailsCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java deleted file mode 100644 index d25d6b95e71b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Package.java +++ /dev/null @@ -1,132 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -public final class Package { - private Package() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Distribution_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Distribution_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Location_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Location_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_PackageNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_PackageNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_PackageOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Version_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Version_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\030grafeas/v1/package.proto\022\ngrafeas.v1\032\037" + - "google/api/field_behavior.proto\032\027grafeas" + - "/v1/common.proto\"\267\001\n\014Distribution\022\024\n\007cpe" + - "_uri\030\001 \001(\tB\003\340A\002\022.\n\014architecture\030\002 \001(\0162\030." + - "grafeas.v1.Architecture\022+\n\016latest_versio" + - "n\030\003 \001(\0132\023.grafeas.v1.Version\022\022\n\nmaintain" + - "er\030\004 \001(\t\022\013\n\003url\030\005 \001(\t\022\023\n\013description\030\006 \001" + - "(\t\"O\n\010Location\022\017\n\007cpe_uri\030\001 \001(\t\022$\n\007versi" + - "on\030\002 \001(\0132\023.grafeas.v1.Version\022\014\n\004path\030\003 " + - "\001(\t\"\320\002\n\013PackageNote\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A" + - "\005\022.\n\014distribution\030\n \003(\0132\030.grafeas.v1.Dis" + - "tribution\022\024\n\014package_type\030\013 \001(\t\022\017\n\007cpe_u" + - "ri\030\014 \001(\t\022.\n\014architecture\030\r \001(\0162\030.grafeas" + - ".v1.Architecture\022$\n\007version\030\016 \001(\0132\023.graf" + - "eas.v1.Version\022\022\n\nmaintainer\030\017 \001(\t\022\013\n\003ur" + - "l\030\020 \001(\t\022\023\n\013description\030\021 \001(\t\022$\n\007license\030" + - "\022 \001(\0132\023.grafeas.v1.License\022\"\n\006digest\030\023 \003" + - "(\0132\022.grafeas.v1.Digest\"\210\002\n\021PackageOccurr" + - "ence\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\003\022&\n\010location\030\002" + - " \003(\0132\024.grafeas.v1.Location\022\031\n\014package_ty" + - "pe\030\003 \001(\tB\003\340A\003\022\024\n\007cpe_uri\030\004 \001(\tB\003\340A\003\0223\n\014a" + - "rchitecture\030\005 \001(\0162\030.grafeas.v1.Architect" + - "ureB\003\340A\003\022$\n\007license\030\006 \001(\0132\023.grafeas.v1.L" + - "icense\022)\n\007version\030\007 \001(\0132\023.grafeas.v1.Ver" + - "sionB\003\340A\003\"\340\001\n\007Version\022\r\n\005epoch\030\001 \001(\005\022\014\n\004" + - "name\030\002 \001(\t\022\020\n\010revision\030\003 \001(\t\022\021\n\tinclusiv" + - "e\030\006 \001(\010\022-\n\004kind\030\004 \001(\0162\037.grafeas.v1.Versi" + - "on.VersionKind\022\021\n\tfull_name\030\005 \001(\t\"Q\n\013Ver" + - "sionKind\022\034\n\030VERSION_KIND_UNSPECIFIED\020\000\022\n" + - "\n\006NORMAL\020\001\022\013\n\007MINIMUM\020\002\022\013\n\007MAXIMUM\020\003*>\n\014" + - "Architecture\022\034\n\030ARCHITECTURE_UNSPECIFIED" + - "\020\000\022\007\n\003X86\020\001\022\007\n\003X64\020\002BQ\n\rio.grafeas.v1P\001Z" + - "8google.golang.org/genproto/googleapis/g" + - "rafeas/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - io.grafeas.v1.Common.getDescriptor(), - }); - internal_static_grafeas_v1_Distribution_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_Distribution_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Distribution_descriptor, - new java.lang.String[] { "CpeUri", "Architecture", "LatestVersion", "Maintainer", "Url", "Description", }); - internal_static_grafeas_v1_Location_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Location_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Location_descriptor, - new java.lang.String[] { "CpeUri", "Version", "Path", }); - internal_static_grafeas_v1_PackageNote_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_PackageNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_PackageNote_descriptor, - new java.lang.String[] { "Name", "Distribution", "PackageType", "CpeUri", "Architecture", "Version", "Maintainer", "Url", "Description", "License", "Digest", }); - internal_static_grafeas_v1_PackageOccurrence_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_PackageOccurrence_descriptor, - new java.lang.String[] { "Name", "Location", "PackageType", "CpeUri", "Architecture", "License", "Version", }); - internal_static_grafeas_v1_Version_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_grafeas_v1_Version_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Version_descriptor, - new java.lang.String[] { "Epoch", "Name", "Revision", "Inclusive", "Kind", "FullName", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - io.grafeas.v1.Common.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java deleted file mode 100644 index 0ef9a8e9eee2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNote.java +++ /dev/null @@ -1,2942 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -/** - *
- * PackageNote represents a particular package version.
- * 
- * - * Protobuf type {@code grafeas.v1.PackageNote} - */ -public final class PackageNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.PackageNote) - PackageNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use PackageNote.newBuilder() to construct. - private PackageNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PackageNote() { - name_ = ""; - distribution_ = java.util.Collections.emptyList(); - packageType_ = ""; - cpeUri_ = ""; - architecture_ = 0; - maintainer_ = ""; - url_ = ""; - description_ = ""; - digest_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PackageNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.PackageNote.class, io.grafeas.v1.PackageNote.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISTRIBUTION_FIELD_NUMBER = 10; - @SuppressWarnings("serial") - private java.util.List distribution_; - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - @java.lang.Override - public java.util.List getDistributionList() { - return distribution_; - } - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - @java.lang.Override - public java.util.List - getDistributionOrBuilderList() { - return distribution_; - } - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - @java.lang.Override - public int getDistributionCount() { - return distribution_.size(); - } - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - @java.lang.Override - public io.grafeas.v1.Distribution getDistribution(int index) { - return distribution_.get(index); - } - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - @java.lang.Override - public io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder( - int index) { - return distribution_.get(index); - } - - public static final int PACKAGE_TYPE_FIELD_NUMBER = 11; - @SuppressWarnings("serial") - private volatile java.lang.Object packageType_ = ""; - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 11; - * @return The packageType. - */ - @java.lang.Override - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } - } - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 11; - * @return The bytes for packageType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CPE_URI_FIELD_NUMBER = 12; - @SuppressWarnings("serial") - private volatile java.lang.Object cpeUri_ = ""; - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 12; - * @return The cpeUri. - */ - @java.lang.Override - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } - } - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 12; - * @return The bytes for cpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARCHITECTURE_FIELD_NUMBER = 13; - private int architecture_ = 0; - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @return The enum numeric value on the wire for architecture. - */ - @java.lang.Override public int getArchitectureValue() { - return architecture_; - } - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @return The architecture. - */ - @java.lang.Override public io.grafeas.v1.Architecture getArchitecture() { - io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); - return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; - } - - public static final int VERSION_FIELD_NUMBER = 14; - private io.grafeas.v1.Version version_; - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 14; - * @return Whether the version field is set. - */ - @java.lang.Override - public boolean hasVersion() { - return version_ != null; - } - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 14; - * @return The version. - */ - @java.lang.Override - public io.grafeas.v1.Version getVersion() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 14; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - - public static final int MAINTAINER_FIELD_NUMBER = 15; - @SuppressWarnings("serial") - private volatile java.lang.Object maintainer_ = ""; - /** - *
-   * A freeform text denoting the maintainer of this package.
-   * 
- * - * string maintainer = 15; - * @return The maintainer. - */ - @java.lang.Override - public java.lang.String getMaintainer() { - java.lang.Object ref = maintainer_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - maintainer_ = s; - return s; - } - } - /** - *
-   * A freeform text denoting the maintainer of this package.
-   * 
- * - * string maintainer = 15; - * @return The bytes for maintainer. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMaintainerBytes() { - java.lang.Object ref = maintainer_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - maintainer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URL_FIELD_NUMBER = 16; - @SuppressWarnings("serial") - private volatile java.lang.Object url_ = ""; - /** - *
-   * The homepage for this package.
-   * 
- * - * string url = 16; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-   * The homepage for this package.
-   * 
- * - * string url = 16; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 17; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * The description of this package.
-   * 
- * - * string description = 17; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * The description of this package.
-   * 
- * - * string description = 17; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LICENSE_FIELD_NUMBER = 18; - private io.grafeas.v1.License license_; - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 18; - * @return Whether the license field is set. - */ - @java.lang.Override - public boolean hasLicense() { - return license_ != null; - } - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 18; - * @return The license. - */ - @java.lang.Override - public io.grafeas.v1.License getLicense() { - return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; - } - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 18; - */ - @java.lang.Override - public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { - return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; - } - - public static final int DIGEST_FIELD_NUMBER = 19; - @SuppressWarnings("serial") - private java.util.List digest_; - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - @java.lang.Override - public java.util.List getDigestList() { - return digest_; - } - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - @java.lang.Override - public java.util.List - getDigestOrBuilderList() { - return digest_; - } - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - @java.lang.Override - public int getDigestCount() { - return digest_.size(); - } - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - @java.lang.Override - public io.grafeas.v1.Digest getDigest(int index) { - return digest_.get(index); - } - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - @java.lang.Override - public io.grafeas.v1.DigestOrBuilder getDigestOrBuilder( - int index) { - return digest_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < distribution_.size(); i++) { - output.writeMessage(10, distribution_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, packageType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, cpeUri_); - } - if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { - output.writeEnum(13, architecture_); - } - if (version_ != null) { - output.writeMessage(14, getVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 15, maintainer_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 16, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 17, description_); - } - if (license_ != null) { - output.writeMessage(18, getLicense()); - } - for (int i = 0; i < digest_.size(); i++) { - output.writeMessage(19, digest_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - for (int i = 0; i < distribution_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, distribution_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, packageType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, cpeUri_); - } - if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(13, architecture_); - } - if (version_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, getVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, maintainer_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, description_); - } - if (license_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(18, getLicense()); - } - for (int i = 0; i < digest_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(19, digest_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.PackageNote)) { - return super.equals(obj); - } - io.grafeas.v1.PackageNote other = (io.grafeas.v1.PackageNote) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDistributionList() - .equals(other.getDistributionList())) return false; - if (!getPackageType() - .equals(other.getPackageType())) return false; - if (!getCpeUri() - .equals(other.getCpeUri())) return false; - if (architecture_ != other.architecture_) return false; - if (hasVersion() != other.hasVersion()) return false; - if (hasVersion()) { - if (!getVersion() - .equals(other.getVersion())) return false; - } - if (!getMaintainer() - .equals(other.getMaintainer())) return false; - if (!getUrl() - .equals(other.getUrl())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (hasLicense() != other.hasLicense()) return false; - if (hasLicense()) { - if (!getLicense() - .equals(other.getLicense())) return false; - } - if (!getDigestList() - .equals(other.getDigestList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getDistributionCount() > 0) { - hash = (37 * hash) + DISTRIBUTION_FIELD_NUMBER; - hash = (53 * hash) + getDistributionList().hashCode(); - } - hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getPackageType().hashCode(); - hash = (37 * hash) + CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCpeUri().hashCode(); - hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; - hash = (53 * hash) + architecture_; - if (hasVersion()) { - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - } - hash = (37 * hash) + MAINTAINER_FIELD_NUMBER; - hash = (53 * hash) + getMaintainer().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasLicense()) { - hash = (37 * hash) + LICENSE_FIELD_NUMBER; - hash = (53 * hash) + getLicense().hashCode(); - } - if (getDigestCount() > 0) { - hash = (37 * hash) + DIGEST_FIELD_NUMBER; - hash = (53 * hash) + getDigestList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.PackageNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.PackageNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.PackageNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.PackageNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.PackageNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.PackageNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.PackageNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.PackageNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.PackageNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.PackageNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.PackageNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.PackageNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.PackageNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PackageNote represents a particular package version.
-   * 
- * - * Protobuf type {@code grafeas.v1.PackageNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.PackageNote) - io.grafeas.v1.PackageNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.PackageNote.class, io.grafeas.v1.PackageNote.Builder.class); - } - - // Construct using io.grafeas.v1.PackageNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - if (distributionBuilder_ == null) { - distribution_ = java.util.Collections.emptyList(); - } else { - distribution_ = null; - distributionBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - packageType_ = ""; - cpeUri_ = ""; - architecture_ = 0; - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - maintainer_ = ""; - url_ = ""; - description_ = ""; - license_ = null; - if (licenseBuilder_ != null) { - licenseBuilder_.dispose(); - licenseBuilder_ = null; - } - if (digestBuilder_ == null) { - digest_ = java.util.Collections.emptyList(); - } else { - digest_ = null; - digestBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000400); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.PackageNote getDefaultInstanceForType() { - return io.grafeas.v1.PackageNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.PackageNote build() { - io.grafeas.v1.PackageNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.PackageNote buildPartial() { - io.grafeas.v1.PackageNote result = new io.grafeas.v1.PackageNote(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.PackageNote result) { - if (distributionBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - distribution_ = java.util.Collections.unmodifiableList(distribution_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.distribution_ = distribution_; - } else { - result.distribution_ = distributionBuilder_.build(); - } - if (digestBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0)) { - digest_ = java.util.Collections.unmodifiableList(digest_); - bitField0_ = (bitField0_ & ~0x00000400); - } - result.digest_ = digest_; - } else { - result.digest_ = digestBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.PackageNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.packageType_ = packageType_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.cpeUri_ = cpeUri_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.architecture_ = architecture_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.version_ = versionBuilder_ == null - ? version_ - : versionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.maintainer_ = maintainer_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.url_ = url_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.license_ = licenseBuilder_ == null - ? license_ - : licenseBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.PackageNote) { - return mergeFrom((io.grafeas.v1.PackageNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.PackageNote other) { - if (other == io.grafeas.v1.PackageNote.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (distributionBuilder_ == null) { - if (!other.distribution_.isEmpty()) { - if (distribution_.isEmpty()) { - distribution_ = other.distribution_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureDistributionIsMutable(); - distribution_.addAll(other.distribution_); - } - onChanged(); - } - } else { - if (!other.distribution_.isEmpty()) { - if (distributionBuilder_.isEmpty()) { - distributionBuilder_.dispose(); - distributionBuilder_ = null; - distribution_ = other.distribution_; - bitField0_ = (bitField0_ & ~0x00000002); - distributionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDistributionFieldBuilder() : null; - } else { - distributionBuilder_.addAllMessages(other.distribution_); - } - } - } - if (!other.getPackageType().isEmpty()) { - packageType_ = other.packageType_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getCpeUri().isEmpty()) { - cpeUri_ = other.cpeUri_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.architecture_ != 0) { - setArchitectureValue(other.getArchitectureValue()); - } - if (other.hasVersion()) { - mergeVersion(other.getVersion()); - } - if (!other.getMaintainer().isEmpty()) { - maintainer_ = other.maintainer_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - bitField0_ |= 0x00000080; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000100; - onChanged(); - } - if (other.hasLicense()) { - mergeLicense(other.getLicense()); - } - if (digestBuilder_ == null) { - if (!other.digest_.isEmpty()) { - if (digest_.isEmpty()) { - digest_ = other.digest_; - bitField0_ = (bitField0_ & ~0x00000400); - } else { - ensureDigestIsMutable(); - digest_.addAll(other.digest_); - } - onChanged(); - } - } else { - if (!other.digest_.isEmpty()) { - if (digestBuilder_.isEmpty()) { - digestBuilder_.dispose(); - digestBuilder_ = null; - digest_ = other.digest_; - bitField0_ = (bitField0_ & ~0x00000400); - digestBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDigestFieldBuilder() : null; - } else { - digestBuilder_.addAllMessages(other.digest_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 82: { - io.grafeas.v1.Distribution m = - input.readMessage( - io.grafeas.v1.Distribution.parser(), - extensionRegistry); - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - distribution_.add(m); - } else { - distributionBuilder_.addMessage(m); - } - break; - } // case 82 - case 90: { - packageType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 90 - case 98: { - cpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 98 - case 104: { - architecture_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 104 - case 114: { - input.readMessage( - getVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 114 - case 122: { - maintainer_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 122 - case 130: { - url_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 130 - case 138: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - break; - } // case 138 - case 146: { - input.readMessage( - getLicenseFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 146 - case 154: { - io.grafeas.v1.Digest m = - input.readMessage( - io.grafeas.v1.Digest.parser(), - extensionRegistry); - if (digestBuilder_ == null) { - ensureDigestIsMutable(); - digest_.add(m); - } else { - digestBuilder_.addMessage(m); - } - break; - } // case 154 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List distribution_ = - java.util.Collections.emptyList(); - private void ensureDistributionIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - distribution_ = new java.util.ArrayList(distribution_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Distribution, io.grafeas.v1.Distribution.Builder, io.grafeas.v1.DistributionOrBuilder> distributionBuilder_; - - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public java.util.List getDistributionList() { - if (distributionBuilder_ == null) { - return java.util.Collections.unmodifiableList(distribution_); - } else { - return distributionBuilder_.getMessageList(); - } - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public int getDistributionCount() { - if (distributionBuilder_ == null) { - return distribution_.size(); - } else { - return distributionBuilder_.getCount(); - } - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public io.grafeas.v1.Distribution getDistribution(int index) { - if (distributionBuilder_ == null) { - return distribution_.get(index); - } else { - return distributionBuilder_.getMessage(index); - } - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder setDistribution( - int index, io.grafeas.v1.Distribution value) { - if (distributionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDistributionIsMutable(); - distribution_.set(index, value); - onChanged(); - } else { - distributionBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder setDistribution( - int index, io.grafeas.v1.Distribution.Builder builderForValue) { - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - distribution_.set(index, builderForValue.build()); - onChanged(); - } else { - distributionBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder addDistribution(io.grafeas.v1.Distribution value) { - if (distributionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDistributionIsMutable(); - distribution_.add(value); - onChanged(); - } else { - distributionBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder addDistribution( - int index, io.grafeas.v1.Distribution value) { - if (distributionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDistributionIsMutable(); - distribution_.add(index, value); - onChanged(); - } else { - distributionBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder addDistribution( - io.grafeas.v1.Distribution.Builder builderForValue) { - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - distribution_.add(builderForValue.build()); - onChanged(); - } else { - distributionBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder addDistribution( - int index, io.grafeas.v1.Distribution.Builder builderForValue) { - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - distribution_.add(index, builderForValue.build()); - onChanged(); - } else { - distributionBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder addAllDistribution( - java.lang.Iterable values) { - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, distribution_); - onChanged(); - } else { - distributionBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder clearDistribution() { - if (distributionBuilder_ == null) { - distribution_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - distributionBuilder_.clear(); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public Builder removeDistribution(int index) { - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - distribution_.remove(index); - onChanged(); - } else { - distributionBuilder_.remove(index); - } - return this; - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public io.grafeas.v1.Distribution.Builder getDistributionBuilder( - int index) { - return getDistributionFieldBuilder().getBuilder(index); - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder( - int index) { - if (distributionBuilder_ == null) { - return distribution_.get(index); } else { - return distributionBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public java.util.List - getDistributionOrBuilderList() { - if (distributionBuilder_ != null) { - return distributionBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(distribution_); - } - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public io.grafeas.v1.Distribution.Builder addDistributionBuilder() { - return getDistributionFieldBuilder().addBuilder( - io.grafeas.v1.Distribution.getDefaultInstance()); - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public io.grafeas.v1.Distribution.Builder addDistributionBuilder( - int index) { - return getDistributionFieldBuilder().addBuilder( - index, io.grafeas.v1.Distribution.getDefaultInstance()); - } - /** - *
-     * Deprecated.
-     * The various channels by which a package is distributed.
-     * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - public java.util.List - getDistributionBuilderList() { - return getDistributionFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Distribution, io.grafeas.v1.Distribution.Builder, io.grafeas.v1.DistributionOrBuilder> - getDistributionFieldBuilder() { - if (distributionBuilder_ == null) { - distributionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Distribution, io.grafeas.v1.Distribution.Builder, io.grafeas.v1.DistributionOrBuilder>( - distribution_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - distribution_ = null; - } - return distributionBuilder_; - } - - private java.lang.Object packageType_ = ""; - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 11; - * @return The packageType. - */ - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 11; - * @return The bytes for packageType. - */ - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 11; - * @param value The packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - packageType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 11; - * @return This builder for chaining. - */ - public Builder clearPackageType() { - packageType_ = getDefaultInstance().getPackageType(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 11; - * @param value The bytes for packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - packageType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object cpeUri_ = ""; - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 12; - * @return The cpeUri. - */ - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 12; - * @return The bytes for cpeUri. - */ - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 12; - * @param value The cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 12; - * @return This builder for chaining. - */ - public Builder clearCpeUri() { - cpeUri_ = getDefaultInstance().getCpeUri(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 12; - * @param value The bytes for cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private int architecture_ = 0; - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @return The enum numeric value on the wire for architecture. - */ - @java.lang.Override public int getArchitectureValue() { - return architecture_; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @param value The enum numeric value on the wire for architecture to set. - * @return This builder for chaining. - */ - public Builder setArchitectureValue(int value) { - architecture_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @return The architecture. - */ - @java.lang.Override - public io.grafeas.v1.Architecture getArchitecture() { - io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); - return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @param value The architecture to set. - * @return This builder for chaining. - */ - public Builder setArchitecture(io.grafeas.v1.Architecture value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - architecture_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @return This builder for chaining. - */ - public Builder clearArchitecture() { - bitField0_ = (bitField0_ & ~0x00000010); - architecture_ = 0; - onChanged(); - return this; - } - - private io.grafeas.v1.Version version_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - * @return Whether the version field is set. - */ - public boolean hasVersion() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - * @return The version. - */ - public io.grafeas.v1.Version getVersion() { - if (versionBuilder_ == null) { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } else { - return versionBuilder_.getMessage(); - } - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - */ - public Builder setVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - } else { - versionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - */ - public Builder setVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (versionBuilder_ == null) { - version_ = builderForValue.build(); - } else { - versionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - */ - public Builder mergeVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - version_ != null && - version_ != io.grafeas.v1.Version.getDefaultInstance()) { - getVersionBuilder().mergeFrom(value); - } else { - version_ = value; - } - } else { - versionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - */ - public Builder clearVersion() { - bitField0_ = (bitField0_ & ~0x00000020); - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - */ - public io.grafeas.v1.Version.Builder getVersionBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getVersionFieldBuilder().getBuilder(); - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - */ - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - if (versionBuilder_ != null) { - return versionBuilder_.getMessageOrBuilder(); - } else { - return version_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : version_; - } - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 14; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getVersionFieldBuilder() { - if (versionBuilder_ == null) { - versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getVersion(), - getParentForChildren(), - isClean()); - version_ = null; - } - return versionBuilder_; - } - - private java.lang.Object maintainer_ = ""; - /** - *
-     * A freeform text denoting the maintainer of this package.
-     * 
- * - * string maintainer = 15; - * @return The maintainer. - */ - public java.lang.String getMaintainer() { - java.lang.Object ref = maintainer_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - maintainer_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A freeform text denoting the maintainer of this package.
-     * 
- * - * string maintainer = 15; - * @return The bytes for maintainer. - */ - public com.google.protobuf.ByteString - getMaintainerBytes() { - java.lang.Object ref = maintainer_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - maintainer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A freeform text denoting the maintainer of this package.
-     * 
- * - * string maintainer = 15; - * @param value The maintainer to set. - * @return This builder for chaining. - */ - public Builder setMaintainer( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - maintainer_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * A freeform text denoting the maintainer of this package.
-     * 
- * - * string maintainer = 15; - * @return This builder for chaining. - */ - public Builder clearMaintainer() { - maintainer_ = getDefaultInstance().getMaintainer(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - *
-     * A freeform text denoting the maintainer of this package.
-     * 
- * - * string maintainer = 15; - * @param value The bytes for maintainer to set. - * @return This builder for chaining. - */ - public Builder setMaintainerBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - maintainer_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-     * The homepage for this package.
-     * 
- * - * string url = 16; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The homepage for this package.
-     * 
- * - * string url = 16; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The homepage for this package.
-     * 
- * - * string url = 16; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - url_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The homepage for this package.
-     * 
- * - * string url = 16; - * @return This builder for chaining. - */ - public Builder clearUrl() { - url_ = getDefaultInstance().getUrl(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - /** - *
-     * The homepage for this package.
-     * 
- * - * string url = 16; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - url_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * The description of this package.
-     * 
- * - * string description = 17; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The description of this package.
-     * 
- * - * string description = 17; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The description of this package.
-     * 
- * - * string description = 17; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * The description of this package.
-     * 
- * - * string description = 17; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - *
-     * The description of this package.
-     * 
- * - * string description = 17; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - private io.grafeas.v1.License license_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> licenseBuilder_; - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - * @return Whether the license field is set. - */ - public boolean hasLicense() { - return ((bitField0_ & 0x00000200) != 0); - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - * @return The license. - */ - public io.grafeas.v1.License getLicense() { - if (licenseBuilder_ == null) { - return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; - } else { - return licenseBuilder_.getMessage(); - } - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - */ - public Builder setLicense(io.grafeas.v1.License value) { - if (licenseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - license_ = value; - } else { - licenseBuilder_.setMessage(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - */ - public Builder setLicense( - io.grafeas.v1.License.Builder builderForValue) { - if (licenseBuilder_ == null) { - license_ = builderForValue.build(); - } else { - licenseBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - */ - public Builder mergeLicense(io.grafeas.v1.License value) { - if (licenseBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) && - license_ != null && - license_ != io.grafeas.v1.License.getDefaultInstance()) { - getLicenseBuilder().mergeFrom(value); - } else { - license_ = value; - } - } else { - licenseBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - */ - public Builder clearLicense() { - bitField0_ = (bitField0_ & ~0x00000200); - license_ = null; - if (licenseBuilder_ != null) { - licenseBuilder_.dispose(); - licenseBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - */ - public io.grafeas.v1.License.Builder getLicenseBuilder() { - bitField0_ |= 0x00000200; - onChanged(); - return getLicenseFieldBuilder().getBuilder(); - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - */ - public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { - if (licenseBuilder_ != null) { - return licenseBuilder_.getMessageOrBuilder(); - } else { - return license_ == null ? - io.grafeas.v1.License.getDefaultInstance() : license_; - } - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 18; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> - getLicenseFieldBuilder() { - if (licenseBuilder_ == null) { - licenseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder>( - getLicense(), - getParentForChildren(), - isClean()); - license_ = null; - } - return licenseBuilder_; - } - - private java.util.List digest_ = - java.util.Collections.emptyList(); - private void ensureDigestIsMutable() { - if (!((bitField0_ & 0x00000400) != 0)) { - digest_ = new java.util.ArrayList(digest_); - bitField0_ |= 0x00000400; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder> digestBuilder_; - - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public java.util.List getDigestList() { - if (digestBuilder_ == null) { - return java.util.Collections.unmodifiableList(digest_); - } else { - return digestBuilder_.getMessageList(); - } - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public int getDigestCount() { - if (digestBuilder_ == null) { - return digest_.size(); - } else { - return digestBuilder_.getCount(); - } - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public io.grafeas.v1.Digest getDigest(int index) { - if (digestBuilder_ == null) { - return digest_.get(index); - } else { - return digestBuilder_.getMessage(index); - } - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder setDigest( - int index, io.grafeas.v1.Digest value) { - if (digestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDigestIsMutable(); - digest_.set(index, value); - onChanged(); - } else { - digestBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder setDigest( - int index, io.grafeas.v1.Digest.Builder builderForValue) { - if (digestBuilder_ == null) { - ensureDigestIsMutable(); - digest_.set(index, builderForValue.build()); - onChanged(); - } else { - digestBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder addDigest(io.grafeas.v1.Digest value) { - if (digestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDigestIsMutable(); - digest_.add(value); - onChanged(); - } else { - digestBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder addDigest( - int index, io.grafeas.v1.Digest value) { - if (digestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDigestIsMutable(); - digest_.add(index, value); - onChanged(); - } else { - digestBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder addDigest( - io.grafeas.v1.Digest.Builder builderForValue) { - if (digestBuilder_ == null) { - ensureDigestIsMutable(); - digest_.add(builderForValue.build()); - onChanged(); - } else { - digestBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder addDigest( - int index, io.grafeas.v1.Digest.Builder builderForValue) { - if (digestBuilder_ == null) { - ensureDigestIsMutable(); - digest_.add(index, builderForValue.build()); - onChanged(); - } else { - digestBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder addAllDigest( - java.lang.Iterable values) { - if (digestBuilder_ == null) { - ensureDigestIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, digest_); - onChanged(); - } else { - digestBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder clearDigest() { - if (digestBuilder_ == null) { - digest_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - } else { - digestBuilder_.clear(); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public Builder removeDigest(int index) { - if (digestBuilder_ == null) { - ensureDigestIsMutable(); - digest_.remove(index); - onChanged(); - } else { - digestBuilder_.remove(index); - } - return this; - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public io.grafeas.v1.Digest.Builder getDigestBuilder( - int index) { - return getDigestFieldBuilder().getBuilder(index); - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public io.grafeas.v1.DigestOrBuilder getDigestOrBuilder( - int index) { - if (digestBuilder_ == null) { - return digest_.get(index); } else { - return digestBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public java.util.List - getDigestOrBuilderList() { - if (digestBuilder_ != null) { - return digestBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(digest_); - } - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public io.grafeas.v1.Digest.Builder addDigestBuilder() { - return getDigestFieldBuilder().addBuilder( - io.grafeas.v1.Digest.getDefaultInstance()); - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public io.grafeas.v1.Digest.Builder addDigestBuilder( - int index) { - return getDigestFieldBuilder().addBuilder( - index, io.grafeas.v1.Digest.getDefaultInstance()); - } - /** - *
-     * Hash value, typically a file digest, that allows unique
-     * identification a specific package.
-     * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - public java.util.List - getDigestBuilderList() { - return getDigestFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder> - getDigestFieldBuilder() { - if (digestBuilder_ == null) { - digestBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder>( - digest_, - ((bitField0_ & 0x00000400) != 0), - getParentForChildren(), - isClean()); - digest_ = null; - } - return digestBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.PackageNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.PackageNote) - private static final io.grafeas.v1.PackageNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.PackageNote(); - } - - public static io.grafeas.v1.PackageNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PackageNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.PackageNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java deleted file mode 100644 index e9bfeaf13aee..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java +++ /dev/null @@ -1,308 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -public interface PackageNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.PackageNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - java.util.List - getDistributionList(); - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - io.grafeas.v1.Distribution getDistribution(int index); - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - int getDistributionCount(); - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - java.util.List - getDistributionOrBuilderList(); - /** - *
-   * Deprecated.
-   * The various channels by which a package is distributed.
-   * 
- * - * repeated .grafeas.v1.Distribution distribution = 10; - */ - io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder( - int index); - - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 11; - * @return The packageType. - */ - java.lang.String getPackageType(); - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 11; - * @return The bytes for packageType. - */ - com.google.protobuf.ByteString - getPackageTypeBytes(); - - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 12; - * @return The cpeUri. - */ - java.lang.String getCpeUri(); - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 12; - * @return The bytes for cpeUri. - */ - com.google.protobuf.ByteString - getCpeUriBytes(); - - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @return The enum numeric value on the wire for architecture. - */ - int getArchitectureValue(); - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 13; - * @return The architecture. - */ - io.grafeas.v1.Architecture getArchitecture(); - - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 14; - * @return Whether the version field is set. - */ - boolean hasVersion(); - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 14; - * @return The version. - */ - io.grafeas.v1.Version getVersion(); - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 14; - */ - io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); - - /** - *
-   * A freeform text denoting the maintainer of this package.
-   * 
- * - * string maintainer = 15; - * @return The maintainer. - */ - java.lang.String getMaintainer(); - /** - *
-   * A freeform text denoting the maintainer of this package.
-   * 
- * - * string maintainer = 15; - * @return The bytes for maintainer. - */ - com.google.protobuf.ByteString - getMaintainerBytes(); - - /** - *
-   * The homepage for this package.
-   * 
- * - * string url = 16; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-   * The homepage for this package.
-   * 
- * - * string url = 16; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-   * The description of this package.
-   * 
- * - * string description = 17; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * The description of this package.
-   * 
- * - * string description = 17; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 18; - * @return Whether the license field is set. - */ - boolean hasLicense(); - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 18; - * @return The license. - */ - io.grafeas.v1.License getLicense(); - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 18; - */ - io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder(); - - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - java.util.List - getDigestList(); - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - io.grafeas.v1.Digest getDigest(int index); - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - int getDigestCount(); - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - java.util.List - getDigestOrBuilderList(); - /** - *
-   * Hash value, typically a file digest, that allows unique
-   * identification a specific package.
-   * 
- * - * repeated .grafeas.v1.Digest digest = 19; - */ - io.grafeas.v1.DigestOrBuilder getDigestOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java deleted file mode 100644 index c5383f689414..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrence.java +++ /dev/null @@ -1,1985 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -/** - *
- * Details on how a particular software package was installed on a system.
- * 
- * - * Protobuf type {@code grafeas.v1.PackageOccurrence} - */ -public final class PackageOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.PackageOccurrence) - PackageOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use PackageOccurrence.newBuilder() to construct. - private PackageOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PackageOccurrence() { - name_ = ""; - location_ = java.util.Collections.emptyList(); - packageType_ = ""; - cpeUri_ = ""; - architecture_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PackageOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.PackageOccurrence.class, io.grafeas.v1.PackageOccurrence.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the installed package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the installed package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List location_; - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - @java.lang.Override - public java.util.List getLocationList() { - return location_; - } - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - @java.lang.Override - public java.util.List - getLocationOrBuilderList() { - return location_; - } - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - @java.lang.Override - public int getLocationCount() { - return location_.size(); - } - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - @java.lang.Override - public io.grafeas.v1.Location getLocation(int index) { - return location_.get(index); - } - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - @java.lang.Override - public io.grafeas.v1.LocationOrBuilder getLocationOrBuilder( - int index) { - return location_.get(index); - } - - public static final int PACKAGE_TYPE_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object packageType_ = ""; - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The packageType. - */ - @java.lang.Override - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } - } - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for packageType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CPE_URI_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object cpeUri_ = ""; - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The cpeUri. - */ - @java.lang.Override - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } - } - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for cpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARCHITECTURE_FIELD_NUMBER = 5; - private int architecture_ = 0; - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for architecture. - */ - @java.lang.Override public int getArchitectureValue() { - return architecture_; - } - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The architecture. - */ - @java.lang.Override public io.grafeas.v1.Architecture getArchitecture() { - io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); - return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; - } - - public static final int LICENSE_FIELD_NUMBER = 6; - private io.grafeas.v1.License license_; - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 6; - * @return Whether the license field is set. - */ - @java.lang.Override - public boolean hasLicense() { - return license_ != null; - } - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 6; - * @return The license. - */ - @java.lang.Override - public io.grafeas.v1.License getLicense() { - return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; - } - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 6; - */ - @java.lang.Override - public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { - return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; - } - - public static final int VERSION_FIELD_NUMBER = 7; - private io.grafeas.v1.Version version_; - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the version field is set. - */ - @java.lang.Override - public boolean hasVersion() { - return version_ != null; - } - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The version. - */ - @java.lang.Override - public io.grafeas.v1.Version getVersion() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < location_.size(); i++) { - output.writeMessage(2, location_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, packageType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cpeUri_); - } - if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { - output.writeEnum(5, architecture_); - } - if (license_ != null) { - output.writeMessage(6, getLicense()); - } - if (version_ != null) { - output.writeMessage(7, getVersion()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - for (int i = 0; i < location_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, location_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, packageType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cpeUri_); - } - if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, architecture_); - } - if (license_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getLicense()); - } - if (version_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getVersion()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.PackageOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.PackageOccurrence other = (io.grafeas.v1.PackageOccurrence) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getLocationList() - .equals(other.getLocationList())) return false; - if (!getPackageType() - .equals(other.getPackageType())) return false; - if (!getCpeUri() - .equals(other.getCpeUri())) return false; - if (architecture_ != other.architecture_) return false; - if (hasLicense() != other.hasLicense()) return false; - if (hasLicense()) { - if (!getLicense() - .equals(other.getLicense())) return false; - } - if (hasVersion() != other.hasVersion()) return false; - if (hasVersion()) { - if (!getVersion() - .equals(other.getVersion())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getLocationCount() > 0) { - hash = (37 * hash) + LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getLocationList().hashCode(); - } - hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getPackageType().hashCode(); - hash = (37 * hash) + CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCpeUri().hashCode(); - hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; - hash = (53 * hash) + architecture_; - if (hasLicense()) { - hash = (37 * hash) + LICENSE_FIELD_NUMBER; - hash = (53 * hash) + getLicense().hashCode(); - } - if (hasVersion()) { - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.PackageOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.PackageOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.PackageOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.PackageOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.PackageOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.PackageOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.PackageOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.PackageOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.PackageOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.PackageOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.PackageOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.PackageOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.PackageOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Details on how a particular software package was installed on a system.
-   * 
- * - * Protobuf type {@code grafeas.v1.PackageOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.PackageOccurrence) - io.grafeas.v1.PackageOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.PackageOccurrence.class, io.grafeas.v1.PackageOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.PackageOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - if (locationBuilder_ == null) { - location_ = java.util.Collections.emptyList(); - } else { - location_ = null; - locationBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - packageType_ = ""; - cpeUri_ = ""; - architecture_ = 0; - license_ = null; - if (licenseBuilder_ != null) { - licenseBuilder_.dispose(); - licenseBuilder_ = null; - } - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.PackageOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.PackageOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.PackageOccurrence build() { - io.grafeas.v1.PackageOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.PackageOccurrence buildPartial() { - io.grafeas.v1.PackageOccurrence result = new io.grafeas.v1.PackageOccurrence(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.PackageOccurrence result) { - if (locationBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - location_ = java.util.Collections.unmodifiableList(location_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.location_ = location_; - } else { - result.location_ = locationBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.PackageOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.packageType_ = packageType_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.cpeUri_ = cpeUri_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.architecture_ = architecture_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.license_ = licenseBuilder_ == null - ? license_ - : licenseBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.version_ = versionBuilder_ == null - ? version_ - : versionBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.PackageOccurrence) { - return mergeFrom((io.grafeas.v1.PackageOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.PackageOccurrence other) { - if (other == io.grafeas.v1.PackageOccurrence.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (locationBuilder_ == null) { - if (!other.location_.isEmpty()) { - if (location_.isEmpty()) { - location_ = other.location_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLocationIsMutable(); - location_.addAll(other.location_); - } - onChanged(); - } - } else { - if (!other.location_.isEmpty()) { - if (locationBuilder_.isEmpty()) { - locationBuilder_.dispose(); - locationBuilder_ = null; - location_ = other.location_; - bitField0_ = (bitField0_ & ~0x00000002); - locationBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLocationFieldBuilder() : null; - } else { - locationBuilder_.addAllMessages(other.location_); - } - } - } - if (!other.getPackageType().isEmpty()) { - packageType_ = other.packageType_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getCpeUri().isEmpty()) { - cpeUri_ = other.cpeUri_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.architecture_ != 0) { - setArchitectureValue(other.getArchitectureValue()); - } - if (other.hasLicense()) { - mergeLicense(other.getLicense()); - } - if (other.hasVersion()) { - mergeVersion(other.getVersion()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - io.grafeas.v1.Location m = - input.readMessage( - io.grafeas.v1.Location.parser(), - extensionRegistry); - if (locationBuilder_ == null) { - ensureLocationIsMutable(); - location_.add(m); - } else { - locationBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: { - packageType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - cpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: { - architecture_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 50: { - input.readMessage( - getLicenseFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - input.readMessage( - getVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the installed package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the installed package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the installed package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the installed package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the installed package.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List location_ = - java.util.Collections.emptyList(); - private void ensureLocationIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - location_ = new java.util.ArrayList(location_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Location, io.grafeas.v1.Location.Builder, io.grafeas.v1.LocationOrBuilder> locationBuilder_; - - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public java.util.List getLocationList() { - if (locationBuilder_ == null) { - return java.util.Collections.unmodifiableList(location_); - } else { - return locationBuilder_.getMessageList(); - } - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public int getLocationCount() { - if (locationBuilder_ == null) { - return location_.size(); - } else { - return locationBuilder_.getCount(); - } - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public io.grafeas.v1.Location getLocation(int index) { - if (locationBuilder_ == null) { - return location_.get(index); - } else { - return locationBuilder_.getMessage(index); - } - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder setLocation( - int index, io.grafeas.v1.Location value) { - if (locationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationIsMutable(); - location_.set(index, value); - onChanged(); - } else { - locationBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder setLocation( - int index, io.grafeas.v1.Location.Builder builderForValue) { - if (locationBuilder_ == null) { - ensureLocationIsMutable(); - location_.set(index, builderForValue.build()); - onChanged(); - } else { - locationBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder addLocation(io.grafeas.v1.Location value) { - if (locationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationIsMutable(); - location_.add(value); - onChanged(); - } else { - locationBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder addLocation( - int index, io.grafeas.v1.Location value) { - if (locationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationIsMutable(); - location_.add(index, value); - onChanged(); - } else { - locationBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder addLocation( - io.grafeas.v1.Location.Builder builderForValue) { - if (locationBuilder_ == null) { - ensureLocationIsMutable(); - location_.add(builderForValue.build()); - onChanged(); - } else { - locationBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder addLocation( - int index, io.grafeas.v1.Location.Builder builderForValue) { - if (locationBuilder_ == null) { - ensureLocationIsMutable(); - location_.add(index, builderForValue.build()); - onChanged(); - } else { - locationBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder addAllLocation( - java.lang.Iterable values) { - if (locationBuilder_ == null) { - ensureLocationIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, location_); - onChanged(); - } else { - locationBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder clearLocation() { - if (locationBuilder_ == null) { - location_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - locationBuilder_.clear(); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public Builder removeLocation(int index) { - if (locationBuilder_ == null) { - ensureLocationIsMutable(); - location_.remove(index); - onChanged(); - } else { - locationBuilder_.remove(index); - } - return this; - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public io.grafeas.v1.Location.Builder getLocationBuilder( - int index) { - return getLocationFieldBuilder().getBuilder(index); - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public io.grafeas.v1.LocationOrBuilder getLocationOrBuilder( - int index) { - if (locationBuilder_ == null) { - return location_.get(index); } else { - return locationBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public java.util.List - getLocationOrBuilderList() { - if (locationBuilder_ != null) { - return locationBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(location_); - } - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public io.grafeas.v1.Location.Builder addLocationBuilder() { - return getLocationFieldBuilder().addBuilder( - io.grafeas.v1.Location.getDefaultInstance()); - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public io.grafeas.v1.Location.Builder addLocationBuilder( - int index) { - return getLocationFieldBuilder().addBuilder( - index, io.grafeas.v1.Location.getDefaultInstance()); - } - /** - *
-     * All of the places within the filesystem versions of this package
-     * have been found.
-     * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - public java.util.List - getLocationBuilderList() { - return getLocationFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Location, io.grafeas.v1.Location.Builder, io.grafeas.v1.LocationOrBuilder> - getLocationFieldBuilder() { - if (locationBuilder_ == null) { - locationBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Location, io.grafeas.v1.Location.Builder, io.grafeas.v1.LocationOrBuilder>( - location_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - location_ = null; - } - return locationBuilder_; - } - - private java.lang.Object packageType_ = ""; - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The packageType. - */ - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for packageType. - */ - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - packageType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearPackageType() { - packageType_ = getDefaultInstance().getPackageType(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - packageType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object cpeUri_ = ""; - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The cpeUri. - */ - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for cpeUri. - */ - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearCpeUri() { - cpeUri_ = getDefaultInstance().getCpeUri(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
-     * The cpe_uri will be blank for language packages.
-     * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private int architecture_ = 0; - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for architecture. - */ - @java.lang.Override public int getArchitectureValue() { - return architecture_; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The enum numeric value on the wire for architecture to set. - * @return This builder for chaining. - */ - public Builder setArchitectureValue(int value) { - architecture_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The architecture. - */ - @java.lang.Override - public io.grafeas.v1.Architecture getArchitecture() { - io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_); - return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The architecture to set. - * @return This builder for chaining. - */ - public Builder setArchitecture(io.grafeas.v1.Architecture value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - architecture_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The CPU architecture for which packages in this distribution channel were
-     * built. Architecture will be blank for language packages.
-     * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearArchitecture() { - bitField0_ = (bitField0_ & ~0x00000010); - architecture_ = 0; - onChanged(); - return this; - } - - private io.grafeas.v1.License license_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> licenseBuilder_; - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - * @return Whether the license field is set. - */ - public boolean hasLicense() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - * @return The license. - */ - public io.grafeas.v1.License getLicense() { - if (licenseBuilder_ == null) { - return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_; - } else { - return licenseBuilder_.getMessage(); - } - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - */ - public Builder setLicense(io.grafeas.v1.License value) { - if (licenseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - license_ = value; - } else { - licenseBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - */ - public Builder setLicense( - io.grafeas.v1.License.Builder builderForValue) { - if (licenseBuilder_ == null) { - license_ = builderForValue.build(); - } else { - licenseBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - */ - public Builder mergeLicense(io.grafeas.v1.License value) { - if (licenseBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - license_ != null && - license_ != io.grafeas.v1.License.getDefaultInstance()) { - getLicenseBuilder().mergeFrom(value); - } else { - license_ = value; - } - } else { - licenseBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - */ - public Builder clearLicense() { - bitField0_ = (bitField0_ & ~0x00000020); - license_ = null; - if (licenseBuilder_ != null) { - licenseBuilder_.dispose(); - licenseBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - */ - public io.grafeas.v1.License.Builder getLicenseBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getLicenseFieldBuilder().getBuilder(); - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - */ - public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() { - if (licenseBuilder_ != null) { - return licenseBuilder_.getMessageOrBuilder(); - } else { - return license_ == null ? - io.grafeas.v1.License.getDefaultInstance() : license_; - } - } - /** - *
-     * Licenses that have been declared by the authors of the package.
-     * 
- * - * .grafeas.v1.License license = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder> - getLicenseFieldBuilder() { - if (licenseBuilder_ == null) { - licenseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder>( - getLicense(), - getParentForChildren(), - isClean()); - license_ = null; - } - return licenseBuilder_; - } - - private io.grafeas.v1.Version version_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the version field is set. - */ - public boolean hasVersion() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The version. - */ - public io.grafeas.v1.Version getVersion() { - if (versionBuilder_ == null) { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } else { - return versionBuilder_.getMessage(); - } - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - } else { - versionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (versionBuilder_ == null) { - version_ = builderForValue.build(); - } else { - versionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - version_ != null && - version_ != io.grafeas.v1.Version.getDefaultInstance()) { - getVersionBuilder().mergeFrom(value); - } else { - version_ = value; - } - } else { - versionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearVersion() { - bitField0_ = (bitField0_ & ~0x00000040); - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public io.grafeas.v1.Version.Builder getVersionBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getVersionFieldBuilder().getBuilder(); - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - if (versionBuilder_ != null) { - return versionBuilder_.getMessageOrBuilder(); - } else { - return version_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : version_; - } - } - /** - *
-     * The version of the package.
-     * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getVersionFieldBuilder() { - if (versionBuilder_ == null) { - versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getVersion(), - getParentForChildren(), - isClean()); - version_ = null; - } - return versionBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.PackageOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.PackageOccurrence) - private static final io.grafeas.v1.PackageOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.PackageOccurrence(); - } - - public static io.grafeas.v1.PackageOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PackageOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.PackageOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java deleted file mode 100644 index 52fa9a813313..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java +++ /dev/null @@ -1,199 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -public interface PackageOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.PackageOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the installed package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the installed package.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - java.util.List - getLocationList(); - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - io.grafeas.v1.Location getLocation(int index); - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - int getLocationCount(); - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - java.util.List - getLocationOrBuilderList(); - /** - *
-   * All of the places within the filesystem versions of this package
-   * have been found.
-   * 
- * - * repeated .grafeas.v1.Location location = 2; - */ - io.grafeas.v1.LocationOrBuilder getLocationOrBuilder( - int index); - - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The packageType. - */ - java.lang.String getPackageType(); - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems,
-   * node.js packages, etc.).
-   * 
- * - * string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for packageType. - */ - com.google.protobuf.ByteString - getPackageTypeBytes(); - - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The cpeUri. - */ - java.lang.String getCpeUri(); - /** - *
-   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
-   * The cpe_uri will be blank for language packages.
-   * 
- * - * string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for cpeUri. - */ - com.google.protobuf.ByteString - getCpeUriBytes(); - - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for architecture. - */ - int getArchitectureValue(); - /** - *
-   * The CPU architecture for which packages in this distribution channel were
-   * built. Architecture will be blank for language packages.
-   * 
- * - * .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The architecture. - */ - io.grafeas.v1.Architecture getArchitecture(); - - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 6; - * @return Whether the license field is set. - */ - boolean hasLicense(); - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 6; - * @return The license. - */ - io.grafeas.v1.License getLicense(); - /** - *
-   * Licenses that have been declared by the authors of the package.
-   * 
- * - * .grafeas.v1.License license = 6; - */ - io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder(); - - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the version field is set. - */ - boolean hasVersion(); - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The version. - */ - io.grafeas.v1.Version getVersion(); - /** - *
-   * The version of the package.
-   * 
- * - * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java deleted file mode 100644 index 8cfc04621ecb..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectName.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ProjectName implements ResourceName { - private static final PathTemplate PROJECT = - PathTemplate.createWithoutUrlEncoding("projects/{project}"); - private volatile Map fieldValuesMap; - private final String project; - - @Deprecated - protected ProjectName() { - project = null; - } - - private ProjectName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - } - - public String getProject() { - return project; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ProjectName of(String project) { - return newBuilder().setProject(project).build(); - } - - public static String format(String project) { - return newBuilder().setProject(project).build().toString(); - } - - public static ProjectName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT.validatedMatch( - formattedString, "ProjectName.parse: formattedString not in valid format"); - return of(matchMap.get("project")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ProjectName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT.instantiate("project", project); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ProjectName that = ((ProjectName) o); - return Objects.equals(this.project, that.project); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - return h; - } - - /** Builder for projects/{project}. */ - public static class Builder { - private String project; - - protected Builder() {} - - public String getProject() { - return project; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - private Builder(ProjectName projectName) { - this.project = projectName.project; - } - - public ProjectName build() { - return new ProjectName(this); - } - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java deleted file mode 100644 index 2e04badc87e5..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoId.java +++ /dev/null @@ -1,746 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * Selects a repo using a Google Cloud Platform project ID (e.g.,
- * winged-cargo-31) and a repo name within that project.
- * 
- * - * Protobuf type {@code grafeas.v1.ProjectRepoId} - */ -public final class ProjectRepoId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.ProjectRepoId) - ProjectRepoIdOrBuilder { -private static final long serialVersionUID = 0L; - // Use ProjectRepoId.newBuilder() to construct. - private ProjectRepoId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProjectRepoId() { - projectId_ = ""; - repoName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProjectRepoId(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ProjectRepoId.class, io.grafeas.v1.ProjectRepoId.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object projectId_ = ""; - /** - *
-   * The ID of the project.
-   * 
- * - * string project_id = 1; - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - *
-   * The ID of the project.
-   * 
- * - * string project_id = 1; - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REPO_NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object repoName_ = ""; - /** - *
-   * The name of the repo. Leave empty for the default repo.
-   * 
- * - * string repo_name = 2; - * @return The repoName. - */ - @java.lang.Override - public java.lang.String getRepoName() { - java.lang.Object ref = repoName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - repoName_ = s; - return s; - } - } - /** - *
-   * The name of the repo. Leave empty for the default repo.
-   * 
- * - * string repo_name = 2; - * @return The bytes for repoName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRepoNameBytes() { - java.lang.Object ref = repoName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - repoName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repoName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, repoName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repoName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, repoName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.ProjectRepoId)) { - return super.equals(obj); - } - io.grafeas.v1.ProjectRepoId other = (io.grafeas.v1.ProjectRepoId) obj; - - if (!getProjectId() - .equals(other.getProjectId())) return false; - if (!getRepoName() - .equals(other.getRepoName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REPO_NAME_FIELD_NUMBER; - hash = (53 * hash) + getRepoName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.ProjectRepoId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ProjectRepoId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ProjectRepoId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ProjectRepoId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ProjectRepoId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.ProjectRepoId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.ProjectRepoId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ProjectRepoId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ProjectRepoId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.ProjectRepoId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.ProjectRepoId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.ProjectRepoId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.ProjectRepoId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Selects a repo using a Google Cloud Platform project ID (e.g.,
-   * winged-cargo-31) and a repo name within that project.
-   * 
- * - * Protobuf type {@code grafeas.v1.ProjectRepoId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.ProjectRepoId) - io.grafeas.v1.ProjectRepoIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.ProjectRepoId.class, io.grafeas.v1.ProjectRepoId.Builder.class); - } - - // Construct using io.grafeas.v1.ProjectRepoId.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - projectId_ = ""; - repoName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_ProjectRepoId_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.ProjectRepoId getDefaultInstanceForType() { - return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.ProjectRepoId build() { - io.grafeas.v1.ProjectRepoId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.ProjectRepoId buildPartial() { - io.grafeas.v1.ProjectRepoId result = new io.grafeas.v1.ProjectRepoId(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.ProjectRepoId result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.projectId_ = projectId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.repoName_ = repoName_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.ProjectRepoId) { - return mergeFrom((io.grafeas.v1.ProjectRepoId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.ProjectRepoId other) { - if (other == io.grafeas.v1.ProjectRepoId.getDefaultInstance()) return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getRepoName().isEmpty()) { - repoName_ = other.repoName_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - projectId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - repoName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object projectId_ = ""; - /** - *
-     * The ID of the project.
-     * 
- * - * string project_id = 1; - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The ID of the project.
-     * 
- * - * string project_id = 1; - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The ID of the project.
-     * 
- * - * string project_id = 1; - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - projectId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The ID of the project.
-     * 
- * - * string project_id = 1; - * @return This builder for chaining. - */ - public Builder clearProjectId() { - projectId_ = getDefaultInstance().getProjectId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The ID of the project.
-     * 
- * - * string project_id = 1; - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - projectId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object repoName_ = ""; - /** - *
-     * The name of the repo. Leave empty for the default repo.
-     * 
- * - * string repo_name = 2; - * @return The repoName. - */ - public java.lang.String getRepoName() { - java.lang.Object ref = repoName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - repoName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the repo. Leave empty for the default repo.
-     * 
- * - * string repo_name = 2; - * @return The bytes for repoName. - */ - public com.google.protobuf.ByteString - getRepoNameBytes() { - java.lang.Object ref = repoName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - repoName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the repo. Leave empty for the default repo.
-     * 
- * - * string repo_name = 2; - * @param value The repoName to set. - * @return This builder for chaining. - */ - public Builder setRepoName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - repoName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The name of the repo. Leave empty for the default repo.
-     * 
- * - * string repo_name = 2; - * @return This builder for chaining. - */ - public Builder clearRepoName() { - repoName_ = getDefaultInstance().getRepoName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The name of the repo. Leave empty for the default repo.
-     * 
- * - * string repo_name = 2; - * @param value The bytes for repoName to set. - * @return This builder for chaining. - */ - public Builder setRepoNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - repoName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.ProjectRepoId) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.ProjectRepoId) - private static final io.grafeas.v1.ProjectRepoId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.ProjectRepoId(); - } - - public static io.grafeas.v1.ProjectRepoId getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ProjectRepoId parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.ProjectRepoId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java deleted file mode 100644 index 3c9ea6025916..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java +++ /dev/null @@ -1,49 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface ProjectRepoIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.ProjectRepoId) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The ID of the project.
-   * 
- * - * string project_id = 1; - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - *
-   * The ID of the project.
-   * 
- * - * string project_id = 1; - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString - getProjectIdBytes(); - - /** - *
-   * The name of the repo. Leave empty for the default repo.
-   * 
- * - * string repo_name = 2; - * @return The repoName. - */ - java.lang.String getRepoName(); - /** - *
-   * The name of the repo. Leave empty for the default repo.
-   * 
- * - * string repo_name = 2; - * @return The bytes for repoName. - */ - com.google.protobuf.ByteString - getRepoNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java deleted file mode 100644 index 97c8f268ca63..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Provenance.java +++ /dev/null @@ -1,266 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public final class Provenance { - private Provenance() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BuildProvenance_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Source_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Source_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Source_FileHashesEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Source_FileHashesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_FileHashes_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_FileHashes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Hash_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Hash_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Command_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Command_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_Artifact_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_Artifact_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SourceContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SourceContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SourceContext_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_AliasContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_AliasContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_CloudRepoSourceContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_GerritSourceContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_GitSourceContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_RepoId_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_RepoId_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_ProjectRepoId_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\033grafeas/v1/provenance.proto\022\ngrafeas.v" + - "1\032\037google/protobuf/timestamp.proto\"\220\004\n\017B" + - "uildProvenance\022\n\n\002id\030\001 \001(\t\022\022\n\nproject_id" + - "\030\002 \001(\t\022%\n\010commands\030\003 \003(\0132\023.grafeas.v1.Co" + - "mmand\022-\n\017built_artifacts\030\004 \003(\0132\024.grafeas" + - ".v1.Artifact\022/\n\013create_time\030\005 \001(\0132\032.goog" + - "le.protobuf.Timestamp\022.\n\nstart_time\030\006 \001(" + - "\0132\032.google.protobuf.Timestamp\022,\n\010end_tim" + - "e\030\007 \001(\0132\032.google.protobuf.Timestamp\022\017\n\007c" + - "reator\030\010 \001(\t\022\020\n\010logs_uri\030\t \001(\t\022-\n\021source" + - "_provenance\030\n \001(\0132\022.grafeas.v1.Source\022\022\n" + - "\ntrigger_id\030\013 \001(\t\022D\n\rbuild_options\030\014 \003(\013" + - "2-.grafeas.v1.BuildProvenance.BuildOptio" + - "nsEntry\022\027\n\017builder_version\030\r \001(\t\0323\n\021Buil" + - "dOptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + - "\t:\0028\001\"\225\002\n\006Source\022#\n\033artifact_storage_sou" + - "rce_uri\030\001 \001(\t\0227\n\013file_hashes\030\002 \003(\0132\".gra" + - "feas.v1.Source.FileHashesEntry\022*\n\007contex" + - "t\030\003 \001(\0132\031.grafeas.v1.SourceContext\0226\n\023ad" + - "ditional_contexts\030\004 \003(\0132\031.grafeas.v1.Sou" + - "rceContext\032I\n\017FileHashesEntry\022\013\n\003key\030\001 \001" + - "(\t\022%\n\005value\030\002 \001(\0132\026.grafeas.v1.FileHashe" + - "s:\0028\001\"1\n\nFileHashes\022#\n\tfile_hash\030\001 \003(\0132\020" + - ".grafeas.v1.Hash\"#\n\004Hash\022\014\n\004type\030\001 \001(\t\022\r" + - "\n\005value\030\002 \001(\014\"]\n\007Command\022\014\n\004name\030\001 \001(\t\022\013" + - "\n\003env\030\002 \003(\t\022\014\n\004args\030\003 \003(\t\022\013\n\003dir\030\004 \001(\t\022\n" + - "\n\002id\030\005 \001(\t\022\020\n\010wait_for\030\006 \003(\t\"7\n\010Artifact" + - "\022\020\n\010checksum\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\r\n\005names\030" + - "\003 \003(\t\"\232\002\n\rSourceContext\0228\n\ncloud_repo\030\001 " + - "\001(\0132\".grafeas.v1.CloudRepoSourceContextH" + - "\000\0221\n\006gerrit\030\002 \001(\0132\037.grafeas.v1.GerritSou" + - "rceContextH\000\022+\n\003git\030\003 \001(\0132\034.grafeas.v1.G" + - "itSourceContextH\000\0225\n\006labels\030\004 \003(\0132%.graf" + - "eas.v1.SourceContext.LabelsEntry\032-\n\013Labe" + - "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B" + - "\t\n\007context\"\212\001\n\014AliasContext\022+\n\004kind\030\001 \001(" + - "\0162\035.grafeas.v1.AliasContext.Kind\022\014\n\004name" + - "\030\002 \001(\t\"?\n\004Kind\022\024\n\020KIND_UNSPECIFIED\020\000\022\t\n\005" + - "FIXED\020\001\022\013\n\007MOVABLE\020\002\022\t\n\005OTHER\020\004\"\223\001\n\026Clou" + - "dRepoSourceContext\022#\n\007repo_id\030\001 \001(\0132\022.gr" + - "afeas.v1.RepoId\022\025\n\013revision_id\030\002 \001(\tH\000\0221" + - "\n\ralias_context\030\003 \001(\0132\030.grafeas.v1.Alias" + - "ContextH\000B\n\n\010revision\"\225\001\n\023GerritSourceCo" + - "ntext\022\020\n\010host_uri\030\001 \001(\t\022\026\n\016gerrit_projec" + - "t\030\002 \001(\t\022\025\n\013revision_id\030\003 \001(\tH\000\0221\n\ralias_" + - "context\030\004 \001(\0132\030.grafeas.v1.AliasContextH" + - "\000B\n\n\010revision\"4\n\020GitSourceContext\022\013\n\003url" + - "\030\001 \001(\t\022\023\n\013revision_id\030\002 \001(\t\"S\n\006RepoId\0224\n" + - "\017project_repo_id\030\001 \001(\0132\031.grafeas.v1.Proj" + - "ectRepoIdH\000\022\r\n\003uid\030\002 \001(\tH\000B\004\n\002id\"6\n\rProj" + - "ectRepoId\022\022\n\nproject_id\030\001 \001(\t\022\021\n\trepo_na" + - "me\030\002 \001(\tBQ\n\rio.grafeas.v1P\001Z8google.gola" + - "ng.org/genproto/googleapis/grafeas/v1;gr" + - "afeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_grafeas_v1_BuildProvenance_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_BuildProvenance_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BuildProvenance_descriptor, - new java.lang.String[] { "Id", "ProjectId", "Commands", "BuiltArtifacts", "CreateTime", "StartTime", "EndTime", "Creator", "LogsUri", "SourceProvenance", "TriggerId", "BuildOptions", "BuilderVersion", }); - internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor = - internal_static_grafeas_v1_BuildProvenance_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_BuildProvenance_BuildOptionsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grafeas_v1_Source_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_Source_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Source_descriptor, - new java.lang.String[] { "ArtifactStorageSourceUri", "FileHashes", "Context", "AdditionalContexts", }); - internal_static_grafeas_v1_Source_FileHashesEntry_descriptor = - internal_static_grafeas_v1_Source_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_Source_FileHashesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Source_FileHashesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grafeas_v1_FileHashes_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_FileHashes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_FileHashes_descriptor, - new java.lang.String[] { "FileHash", }); - internal_static_grafeas_v1_Hash_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_Hash_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Hash_descriptor, - new java.lang.String[] { "Type", "Value", }); - internal_static_grafeas_v1_Command_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_grafeas_v1_Command_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Command_descriptor, - new java.lang.String[] { "Name", "Env", "Args", "Dir", "Id", "WaitFor", }); - internal_static_grafeas_v1_Artifact_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_grafeas_v1_Artifact_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_Artifact_descriptor, - new java.lang.String[] { "Checksum", "Id", "Names", }); - internal_static_grafeas_v1_SourceContext_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_grafeas_v1_SourceContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SourceContext_descriptor, - new java.lang.String[] { "CloudRepo", "Gerrit", "Git", "Labels", "Context", }); - internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor = - internal_static_grafeas_v1_SourceContext_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_SourceContext_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grafeas_v1_AliasContext_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_grafeas_v1_AliasContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_AliasContext_descriptor, - new java.lang.String[] { "Kind", "Name", }); - internal_static_grafeas_v1_CloudRepoSourceContext_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_grafeas_v1_CloudRepoSourceContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_CloudRepoSourceContext_descriptor, - new java.lang.String[] { "RepoId", "RevisionId", "AliasContext", "Revision", }); - internal_static_grafeas_v1_GerritSourceContext_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_grafeas_v1_GerritSourceContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_GerritSourceContext_descriptor, - new java.lang.String[] { "HostUri", "GerritProject", "RevisionId", "AliasContext", "Revision", }); - internal_static_grafeas_v1_GitSourceContext_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_grafeas_v1_GitSourceContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_GitSourceContext_descriptor, - new java.lang.String[] { "Url", "RevisionId", }); - internal_static_grafeas_v1_RepoId_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_grafeas_v1_RepoId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_RepoId_descriptor, - new java.lang.String[] { "ProjectRepoId", "Uid", "Id", }); - internal_static_grafeas_v1_ProjectRepoId_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_grafeas_v1_ProjectRepoId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_ProjectRepoId_descriptor, - new java.lang.String[] { "ProjectId", "RepoName", }); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java deleted file mode 100644 index eb956626b15c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Recipe.java +++ /dev/null @@ -1,1954 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -/** - *
- * Steps taken to build the artifact.
- * For a TaskRun, typically each container corresponds to one step in the
- * recipe.
- * 
- * - * Protobuf type {@code grafeas.v1.Recipe} - */ -public final class Recipe extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Recipe) - RecipeOrBuilder { -private static final long serialVersionUID = 0L; - // Use Recipe.newBuilder() to construct. - private Recipe(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Recipe() { - type_ = ""; - entryPoint_ = ""; - arguments_ = java.util.Collections.emptyList(); - environment_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Recipe(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Recipe.class, io.grafeas.v1.Recipe.Builder.class); - } - - public static final int TYPE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object type_ = ""; - /** - *
-   * URI indicating what type of recipe was performed. It determines the meaning
-   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-   * 
- * - * string type = 1; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } - } - /** - *
-   * URI indicating what type of recipe was performed. It determines the meaning
-   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-   * 
- * - * string type = 1; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEFINED_IN_MATERIAL_FIELD_NUMBER = 2; - private long definedInMaterial_ = 0L; - /** - *
-   * Index in materials containing the recipe steps that are not implied by
-   * recipe.type. For example, if the recipe type were "make", then this would
-   * point to the source containing the Makefile, not the make program itself.
-   * Set to -1 if the recipe doesn't come from a material, as zero is default
-   * unset value for int64.
-   * 
- * - * int64 defined_in_material = 2; - * @return The definedInMaterial. - */ - @java.lang.Override - public long getDefinedInMaterial() { - return definedInMaterial_; - } - - public static final int ENTRY_POINT_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object entryPoint_ = ""; - /** - *
-   * String identifying the entry point into the build.
-   * This is often a path to a configuration file and/or a target label within
-   * that file. The syntax and meaning are defined by recipe.type. For example,
-   * if the recipe type were "make", then this would reference the directory in
-   * which to run make as well as which target to use.
-   * 
- * - * string entry_point = 3; - * @return The entryPoint. - */ - @java.lang.Override - public java.lang.String getEntryPoint() { - java.lang.Object ref = entryPoint_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entryPoint_ = s; - return s; - } - } - /** - *
-   * String identifying the entry point into the build.
-   * This is often a path to a configuration file and/or a target label within
-   * that file. The syntax and meaning are defined by recipe.type. For example,
-   * if the recipe type were "make", then this would reference the directory in
-   * which to run make as well as which target to use.
-   * 
- * - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEntryPointBytes() { - java.lang.Object ref = entryPoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entryPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARGUMENTS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List arguments_; - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - @java.lang.Override - public java.util.List getArgumentsList() { - return arguments_; - } - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - @java.lang.Override - public java.util.List - getArgumentsOrBuilderList() { - return arguments_; - } - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - @java.lang.Override - public int getArgumentsCount() { - return arguments_.size(); - } - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - @java.lang.Override - public com.google.protobuf.Any getArguments(int index) { - return arguments_.get(index); - } - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder( - int index) { - return arguments_.get(index); - } - - public static final int ENVIRONMENT_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private java.util.List environment_; - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - @java.lang.Override - public java.util.List getEnvironmentList() { - return environment_; - } - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - @java.lang.Override - public java.util.List - getEnvironmentOrBuilderList() { - return environment_; - } - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - @java.lang.Override - public int getEnvironmentCount() { - return environment_.size(); - } - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - @java.lang.Override - public com.google.protobuf.Any getEnvironment(int index) { - return environment_.get(index); - } - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder( - int index) { - return environment_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); - } - if (definedInMaterial_ != 0L) { - output.writeInt64(2, definedInMaterial_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entryPoint_); - } - for (int i = 0; i < arguments_.size(); i++) { - output.writeMessage(4, arguments_.get(i)); - } - for (int i = 0; i < environment_.size(); i++) { - output.writeMessage(5, environment_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); - } - if (definedInMaterial_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, definedInMaterial_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entryPoint_); - } - for (int i = 0; i < arguments_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, arguments_.get(i)); - } - for (int i = 0; i < environment_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, environment_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Recipe)) { - return super.equals(obj); - } - io.grafeas.v1.Recipe other = (io.grafeas.v1.Recipe) obj; - - if (!getType() - .equals(other.getType())) return false; - if (getDefinedInMaterial() - != other.getDefinedInMaterial()) return false; - if (!getEntryPoint() - .equals(other.getEntryPoint())) return false; - if (!getArgumentsList() - .equals(other.getArgumentsList())) return false; - if (!getEnvironmentList() - .equals(other.getEnvironmentList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - hash = (37 * hash) + DEFINED_IN_MATERIAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getDefinedInMaterial()); - hash = (37 * hash) + ENTRY_POINT_FIELD_NUMBER; - hash = (53 * hash) + getEntryPoint().hashCode(); - if (getArgumentsCount() > 0) { - hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; - hash = (53 * hash) + getArgumentsList().hashCode(); - } - if (getEnvironmentCount() > 0) { - hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; - hash = (53 * hash) + getEnvironmentList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Recipe parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Recipe parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Recipe parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Recipe parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Recipe parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Recipe parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Recipe parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Recipe parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Recipe parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Recipe parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Recipe parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Recipe parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Recipe prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Steps taken to build the artifact.
-   * For a TaskRun, typically each container corresponds to one step in the
-   * recipe.
-   * 
- * - * Protobuf type {@code grafeas.v1.Recipe} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Recipe) - io.grafeas.v1.RecipeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Recipe.class, io.grafeas.v1.Recipe.Builder.class); - } - - // Construct using io.grafeas.v1.Recipe.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = ""; - definedInMaterial_ = 0L; - entryPoint_ = ""; - if (argumentsBuilder_ == null) { - arguments_ = java.util.Collections.emptyList(); - } else { - arguments_ = null; - argumentsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - if (environmentBuilder_ == null) { - environment_ = java.util.Collections.emptyList(); - } else { - environment_ = null; - environmentBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.InTotoProvenanceProto.internal_static_grafeas_v1_Recipe_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Recipe getDefaultInstanceForType() { - return io.grafeas.v1.Recipe.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Recipe build() { - io.grafeas.v1.Recipe result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Recipe buildPartial() { - io.grafeas.v1.Recipe result = new io.grafeas.v1.Recipe(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.Recipe result) { - if (argumentsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - arguments_ = java.util.Collections.unmodifiableList(arguments_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.arguments_ = arguments_; - } else { - result.arguments_ = argumentsBuilder_.build(); - } - if (environmentBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - environment_ = java.util.Collections.unmodifiableList(environment_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.environment_ = environment_; - } else { - result.environment_ = environmentBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.Recipe result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.definedInMaterial_ = definedInMaterial_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.entryPoint_ = entryPoint_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Recipe) { - return mergeFrom((io.grafeas.v1.Recipe)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Recipe other) { - if (other == io.grafeas.v1.Recipe.getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getDefinedInMaterial() != 0L) { - setDefinedInMaterial(other.getDefinedInMaterial()); - } - if (!other.getEntryPoint().isEmpty()) { - entryPoint_ = other.entryPoint_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (argumentsBuilder_ == null) { - if (!other.arguments_.isEmpty()) { - if (arguments_.isEmpty()) { - arguments_ = other.arguments_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureArgumentsIsMutable(); - arguments_.addAll(other.arguments_); - } - onChanged(); - } - } else { - if (!other.arguments_.isEmpty()) { - if (argumentsBuilder_.isEmpty()) { - argumentsBuilder_.dispose(); - argumentsBuilder_ = null; - arguments_ = other.arguments_; - bitField0_ = (bitField0_ & ~0x00000008); - argumentsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getArgumentsFieldBuilder() : null; - } else { - argumentsBuilder_.addAllMessages(other.arguments_); - } - } - } - if (environmentBuilder_ == null) { - if (!other.environment_.isEmpty()) { - if (environment_.isEmpty()) { - environment_ = other.environment_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureEnvironmentIsMutable(); - environment_.addAll(other.environment_); - } - onChanged(); - } - } else { - if (!other.environment_.isEmpty()) { - if (environmentBuilder_.isEmpty()) { - environmentBuilder_.dispose(); - environmentBuilder_ = null; - environment_ = other.environment_; - bitField0_ = (bitField0_ & ~0x00000010); - environmentBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getEnvironmentFieldBuilder() : null; - } else { - environmentBuilder_.addAllMessages(other.environment_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - type_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - definedInMaterial_ = input.readInt64(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - entryPoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - com.google.protobuf.Any m = - input.readMessage( - com.google.protobuf.Any.parser(), - extensionRegistry); - if (argumentsBuilder_ == null) { - ensureArgumentsIsMutable(); - arguments_.add(m); - } else { - argumentsBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: { - com.google.protobuf.Any m = - input.readMessage( - com.google.protobuf.Any.parser(), - extensionRegistry); - if (environmentBuilder_ == null) { - ensureEnvironmentIsMutable(); - environment_.add(m); - } else { - environmentBuilder_.addMessage(m); - } - break; - } // case 42 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object type_ = ""; - /** - *
-     * URI indicating what type of recipe was performed. It determines the meaning
-     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-     * 
- * - * string type = 1; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * URI indicating what type of recipe was performed. It determines the meaning
-     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-     * 
- * - * string type = 1; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * URI indicating what type of recipe was performed. It determines the meaning
-     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-     * 
- * - * string type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * URI indicating what type of recipe was performed. It determines the meaning
-     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-     * 
- * - * string type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - type_ = getDefaultInstance().getType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * URI indicating what type of recipe was performed. It determines the meaning
-     * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-     * 
- * - * string type = 1; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private long definedInMaterial_ ; - /** - *
-     * Index in materials containing the recipe steps that are not implied by
-     * recipe.type. For example, if the recipe type were "make", then this would
-     * point to the source containing the Makefile, not the make program itself.
-     * Set to -1 if the recipe doesn't come from a material, as zero is default
-     * unset value for int64.
-     * 
- * - * int64 defined_in_material = 2; - * @return The definedInMaterial. - */ - @java.lang.Override - public long getDefinedInMaterial() { - return definedInMaterial_; - } - /** - *
-     * Index in materials containing the recipe steps that are not implied by
-     * recipe.type. For example, if the recipe type were "make", then this would
-     * point to the source containing the Makefile, not the make program itself.
-     * Set to -1 if the recipe doesn't come from a material, as zero is default
-     * unset value for int64.
-     * 
- * - * int64 defined_in_material = 2; - * @param value The definedInMaterial to set. - * @return This builder for chaining. - */ - public Builder setDefinedInMaterial(long value) { - - definedInMaterial_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Index in materials containing the recipe steps that are not implied by
-     * recipe.type. For example, if the recipe type were "make", then this would
-     * point to the source containing the Makefile, not the make program itself.
-     * Set to -1 if the recipe doesn't come from a material, as zero is default
-     * unset value for int64.
-     * 
- * - * int64 defined_in_material = 2; - * @return This builder for chaining. - */ - public Builder clearDefinedInMaterial() { - bitField0_ = (bitField0_ & ~0x00000002); - definedInMaterial_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object entryPoint_ = ""; - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For example,
-     * if the recipe type were "make", then this would reference the directory in
-     * which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @return The entryPoint. - */ - public java.lang.String getEntryPoint() { - java.lang.Object ref = entryPoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entryPoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For example,
-     * if the recipe type were "make", then this would reference the directory in
-     * which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - public com.google.protobuf.ByteString - getEntryPointBytes() { - java.lang.Object ref = entryPoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entryPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For example,
-     * if the recipe type were "make", then this would reference the directory in
-     * which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @param value The entryPoint to set. - * @return This builder for chaining. - */ - public Builder setEntryPoint( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - entryPoint_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For example,
-     * if the recipe type were "make", then this would reference the directory in
-     * which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @return This builder for chaining. - */ - public Builder clearEntryPoint() { - entryPoint_ = getDefaultInstance().getEntryPoint(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For example,
-     * if the recipe type were "make", then this would reference the directory in
-     * which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @param value The bytes for entryPoint to set. - * @return This builder for chaining. - */ - public Builder setEntryPointBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - entryPoint_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.util.List arguments_ = - java.util.Collections.emptyList(); - private void ensureArgumentsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - arguments_ = new java.util.ArrayList(arguments_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> argumentsBuilder_; - - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public java.util.List getArgumentsList() { - if (argumentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(arguments_); - } else { - return argumentsBuilder_.getMessageList(); - } - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public int getArgumentsCount() { - if (argumentsBuilder_ == null) { - return arguments_.size(); - } else { - return argumentsBuilder_.getCount(); - } - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public com.google.protobuf.Any getArguments(int index) { - if (argumentsBuilder_ == null) { - return arguments_.get(index); - } else { - return argumentsBuilder_.getMessage(index); - } - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder setArguments( - int index, com.google.protobuf.Any value) { - if (argumentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgumentsIsMutable(); - arguments_.set(index, value); - onChanged(); - } else { - argumentsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder setArguments( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (argumentsBuilder_ == null) { - ensureArgumentsIsMutable(); - arguments_.set(index, builderForValue.build()); - onChanged(); - } else { - argumentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder addArguments(com.google.protobuf.Any value) { - if (argumentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgumentsIsMutable(); - arguments_.add(value); - onChanged(); - } else { - argumentsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder addArguments( - int index, com.google.protobuf.Any value) { - if (argumentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgumentsIsMutable(); - arguments_.add(index, value); - onChanged(); - } else { - argumentsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder addArguments( - com.google.protobuf.Any.Builder builderForValue) { - if (argumentsBuilder_ == null) { - ensureArgumentsIsMutable(); - arguments_.add(builderForValue.build()); - onChanged(); - } else { - argumentsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder addArguments( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (argumentsBuilder_ == null) { - ensureArgumentsIsMutable(); - arguments_.add(index, builderForValue.build()); - onChanged(); - } else { - argumentsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder addAllArguments( - java.lang.Iterable values) { - if (argumentsBuilder_ == null) { - ensureArgumentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, arguments_); - onChanged(); - } else { - argumentsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder clearArguments() { - if (argumentsBuilder_ == null) { - arguments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - argumentsBuilder_.clear(); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public Builder removeArguments(int index) { - if (argumentsBuilder_ == null) { - ensureArgumentsIsMutable(); - arguments_.remove(index); - onChanged(); - } else { - argumentsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public com.google.protobuf.Any.Builder getArgumentsBuilder( - int index) { - return getArgumentsFieldBuilder().getBuilder(index); - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder( - int index) { - if (argumentsBuilder_ == null) { - return arguments_.get(index); } else { - return argumentsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public java.util.List - getArgumentsOrBuilderList() { - if (argumentsBuilder_ != null) { - return argumentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(arguments_); - } - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public com.google.protobuf.Any.Builder addArgumentsBuilder() { - return getArgumentsFieldBuilder().addBuilder( - com.google.protobuf.Any.getDefaultInstance()); - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public com.google.protobuf.Any.Builder addArgumentsBuilder( - int index) { - return getArgumentsFieldBuilder().addBuilder( - index, com.google.protobuf.Any.getDefaultInstance()); - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-     * type were "make", then this might be the flags passed to make aside from
-     * the target, which is captured in recipe.entryPoint. Since the arguments
-     * field can greatly vary in structure, depending on the builder and recipe
-     * type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - public java.util.List - getArgumentsBuilderList() { - return getArgumentsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getArgumentsFieldBuilder() { - if (argumentsBuilder_ == null) { - argumentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - arguments_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - arguments_ = null; - } - return argumentsBuilder_; - } - - private java.util.List environment_ = - java.util.Collections.emptyList(); - private void ensureEnvironmentIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - environment_ = new java.util.ArrayList(environment_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> environmentBuilder_; - - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public java.util.List getEnvironmentList() { - if (environmentBuilder_ == null) { - return java.util.Collections.unmodifiableList(environment_); - } else { - return environmentBuilder_.getMessageList(); - } - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public int getEnvironmentCount() { - if (environmentBuilder_ == null) { - return environment_.size(); - } else { - return environmentBuilder_.getCount(); - } - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public com.google.protobuf.Any getEnvironment(int index) { - if (environmentBuilder_ == null) { - return environment_.get(index); - } else { - return environmentBuilder_.getMessage(index); - } - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder setEnvironment( - int index, com.google.protobuf.Any value) { - if (environmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnvironmentIsMutable(); - environment_.set(index, value); - onChanged(); - } else { - environmentBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder setEnvironment( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (environmentBuilder_ == null) { - ensureEnvironmentIsMutable(); - environment_.set(index, builderForValue.build()); - onChanged(); - } else { - environmentBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder addEnvironment(com.google.protobuf.Any value) { - if (environmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnvironmentIsMutable(); - environment_.add(value); - onChanged(); - } else { - environmentBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder addEnvironment( - int index, com.google.protobuf.Any value) { - if (environmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnvironmentIsMutable(); - environment_.add(index, value); - onChanged(); - } else { - environmentBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder addEnvironment( - com.google.protobuf.Any.Builder builderForValue) { - if (environmentBuilder_ == null) { - ensureEnvironmentIsMutable(); - environment_.add(builderForValue.build()); - onChanged(); - } else { - environmentBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder addEnvironment( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (environmentBuilder_ == null) { - ensureEnvironmentIsMutable(); - environment_.add(index, builderForValue.build()); - onChanged(); - } else { - environmentBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder addAllEnvironment( - java.lang.Iterable values) { - if (environmentBuilder_ == null) { - ensureEnvironmentIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, environment_); - onChanged(); - } else { - environmentBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder clearEnvironment() { - if (environmentBuilder_ == null) { - environment_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - environmentBuilder_.clear(); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public Builder removeEnvironment(int index) { - if (environmentBuilder_ == null) { - ensureEnvironmentIsMutable(); - environment_.remove(index); - onChanged(); - } else { - environmentBuilder_.remove(index); - } - return this; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public com.google.protobuf.Any.Builder getEnvironmentBuilder( - int index) { - return getEnvironmentFieldBuilder().getBuilder(index); - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder( - int index) { - if (environmentBuilder_ == null) { - return environment_.get(index); } else { - return environmentBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public java.util.List - getEnvironmentOrBuilderList() { - if (environmentBuilder_ != null) { - return environmentBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(environment_); - } - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public com.google.protobuf.Any.Builder addEnvironmentBuilder() { - return getEnvironmentFieldBuilder().addBuilder( - com.google.protobuf.Any.getDefaultInstance()); - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public com.google.protobuf.Any.Builder addEnvironmentBuilder( - int index) { - return getEnvironmentFieldBuilder().addBuilder( - index, com.google.protobuf.Any.getDefaultInstance()); - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating the
-     * recipe. Usually only needed for reproducing the build but not evaluated as
-     * part of policy. Since the environment field can greatly vary in structure,
-     * depending on the builder and recipe type, this is of form "Any".
-     * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - public java.util.List - getEnvironmentBuilderList() { - return getEnvironmentFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getEnvironmentFieldBuilder() { - if (environmentBuilder_ == null) { - environmentBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - environment_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - environment_ = null; - } - return environmentBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Recipe) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Recipe) - private static final io.grafeas.v1.Recipe DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Recipe(); - } - - public static io.grafeas.v1.Recipe getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Recipe parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Recipe getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java deleted file mode 100644 index c45233e0a691..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RecipeOrBuilder.java +++ /dev/null @@ -1,201 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_provenance.proto - -package io.grafeas.v1; - -public interface RecipeOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Recipe) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * URI indicating what type of recipe was performed. It determines the meaning
-   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-   * 
- * - * string type = 1; - * @return The type. - */ - java.lang.String getType(); - /** - *
-   * URI indicating what type of recipe was performed. It determines the meaning
-   * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
-   * 
- * - * string type = 1; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - *
-   * Index in materials containing the recipe steps that are not implied by
-   * recipe.type. For example, if the recipe type were "make", then this would
-   * point to the source containing the Makefile, not the make program itself.
-   * Set to -1 if the recipe doesn't come from a material, as zero is default
-   * unset value for int64.
-   * 
- * - * int64 defined_in_material = 2; - * @return The definedInMaterial. - */ - long getDefinedInMaterial(); - - /** - *
-   * String identifying the entry point into the build.
-   * This is often a path to a configuration file and/or a target label within
-   * that file. The syntax and meaning are defined by recipe.type. For example,
-   * if the recipe type were "make", then this would reference the directory in
-   * which to run make as well as which target to use.
-   * 
- * - * string entry_point = 3; - * @return The entryPoint. - */ - java.lang.String getEntryPoint(); - /** - *
-   * String identifying the entry point into the build.
-   * This is often a path to a configuration file and/or a target label within
-   * that file. The syntax and meaning are defined by recipe.type. For example,
-   * if the recipe type were "make", then this would reference the directory in
-   * which to run make as well as which target to use.
-   * 
- * - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - com.google.protobuf.ByteString - getEntryPointBytes(); - - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - java.util.List - getArgumentsList(); - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - com.google.protobuf.Any getArguments(int index); - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - int getArgumentsCount(); - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - java.util.List - getArgumentsOrBuilderList(); - /** - *
-   * Collection of all external inputs that influenced the build on top of
-   * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
-   * type were "make", then this might be the flags passed to make aside from
-   * the target, which is captured in recipe.entryPoint. Since the arguments
-   * field can greatly vary in structure, depending on the builder and recipe
-   * type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any arguments = 4; - */ - com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder( - int index); - - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - java.util.List - getEnvironmentList(); - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - com.google.protobuf.Any getEnvironment(int index); - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - int getEnvironmentCount(); - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - java.util.List - getEnvironmentOrBuilderList(); - /** - *
-   * Any other builder-controlled inputs necessary for correctly evaluating the
-   * recipe. Usually only needed for reproducing the build but not evaluated as
-   * part of policy. Since the environment field can greatly vary in structure,
-   * depending on the builder and recipe type, this is of form "Any".
-   * 
- * - * repeated .google.protobuf.Any environment = 5; - */ - com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java deleted file mode 100644 index 6f36de79b4d2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrl.java +++ /dev/null @@ -1,744 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - *
- * Metadata for any related URL information.
- * 
- * - * Protobuf type {@code grafeas.v1.RelatedUrl} - */ -public final class RelatedUrl extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.RelatedUrl) - RelatedUrlOrBuilder { -private static final long serialVersionUID = 0L; - // Use RelatedUrl.newBuilder() to construct. - private RelatedUrl(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RelatedUrl() { - url_ = ""; - label_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RelatedUrl(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.RelatedUrl.class, io.grafeas.v1.RelatedUrl.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object url_ = ""; - /** - *
-   * Specific URL associated with the resource.
-   * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-   * Specific URL associated with the resource.
-   * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABEL_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object label_ = ""; - /** - *
-   * Label to describe usage of the URL.
-   * 
- * - * string label = 2; - * @return The label. - */ - @java.lang.Override - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } - } - /** - *
-   * Label to describe usage of the URL.
-   * 
- * - * string label = 2; - * @return The bytes for label. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, label_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, label_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.RelatedUrl)) { - return super.equals(obj); - } - io.grafeas.v1.RelatedUrl other = (io.grafeas.v1.RelatedUrl) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (!getLabel() - .equals(other.getLabel())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + LABEL_FIELD_NUMBER; - hash = (53 * hash) + getLabel().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.RelatedUrl parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.RelatedUrl parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.RelatedUrl parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.RelatedUrl parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.RelatedUrl parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.RelatedUrl parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.RelatedUrl parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.RelatedUrl parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.RelatedUrl parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.RelatedUrl parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.RelatedUrl parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.RelatedUrl parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.RelatedUrl prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Metadata for any related URL information.
-   * 
- * - * Protobuf type {@code grafeas.v1.RelatedUrl} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.RelatedUrl) - io.grafeas.v1.RelatedUrlOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.RelatedUrl.class, io.grafeas.v1.RelatedUrl.Builder.class); - } - - // Construct using io.grafeas.v1.RelatedUrl.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - url_ = ""; - label_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_RelatedUrl_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.RelatedUrl getDefaultInstanceForType() { - return io.grafeas.v1.RelatedUrl.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.RelatedUrl build() { - io.grafeas.v1.RelatedUrl result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.RelatedUrl buildPartial() { - io.grafeas.v1.RelatedUrl result = new io.grafeas.v1.RelatedUrl(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.RelatedUrl result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.url_ = url_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.label_ = label_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.RelatedUrl) { - return mergeFrom((io.grafeas.v1.RelatedUrl)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.RelatedUrl other) { - if (other == io.grafeas.v1.RelatedUrl.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getLabel().isEmpty()) { - label_ = other.label_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - url_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - label_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object url_ = ""; - /** - *
-     * Specific URL associated with the resource.
-     * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Specific URL associated with the resource.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Specific URL associated with the resource.
-     * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - url_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Specific URL associated with the resource.
-     * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - url_ = getDefaultInstance().getUrl(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Specific URL associated with the resource.
-     * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - url_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object label_ = ""; - /** - *
-     * Label to describe usage of the URL.
-     * 
- * - * string label = 2; - * @return The label. - */ - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Label to describe usage of the URL.
-     * 
- * - * string label = 2; - * @return The bytes for label. - */ - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Label to describe usage of the URL.
-     * 
- * - * string label = 2; - * @param value The label to set. - * @return This builder for chaining. - */ - public Builder setLabel( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - label_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Label to describe usage of the URL.
-     * 
- * - * string label = 2; - * @return This builder for chaining. - */ - public Builder clearLabel() { - label_ = getDefaultInstance().getLabel(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Label to describe usage of the URL.
-     * 
- * - * string label = 2; - * @param value The bytes for label to set. - * @return This builder for chaining. - */ - public Builder setLabelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - label_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.RelatedUrl) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.RelatedUrl) - private static final io.grafeas.v1.RelatedUrl DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.RelatedUrl(); - } - - public static io.grafeas.v1.RelatedUrl getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RelatedUrl parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.RelatedUrl getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java deleted file mode 100644 index f90406db3f4f..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java +++ /dev/null @@ -1,49 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public interface RelatedUrlOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.RelatedUrl) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Specific URL associated with the resource.
-   * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-   * Specific URL associated with the resource.
-   * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-   * Label to describe usage of the URL.
-   * 
- * - * string label = 2; - * @return The label. - */ - java.lang.String getLabel(); - /** - *
-   * Label to describe usage of the URL.
-   * 
- * - * string label = 2; - * @return The bytes for label. - */ - com.google.protobuf.ByteString - getLabelBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java deleted file mode 100644 index 0ee53da9cea2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoId.java +++ /dev/null @@ -1,955 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * A unique identifier for a Cloud Repo.
- * 
- * - * Protobuf type {@code grafeas.v1.RepoId} - */ -public final class RepoId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.RepoId) - RepoIdOrBuilder { -private static final long serialVersionUID = 0L; - // Use RepoId.newBuilder() to construct. - private RepoId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RepoId() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RepoId(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.RepoId.class, io.grafeas.v1.RepoId.Builder.class); - } - - private int idCase_ = 0; - private java.lang.Object id_; - public enum IdCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - PROJECT_REPO_ID(1), - UID(2), - ID_NOT_SET(0); - private final int value; - private IdCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static IdCase valueOf(int value) { - return forNumber(value); - } - - public static IdCase forNumber(int value) { - switch (value) { - case 1: return PROJECT_REPO_ID; - case 2: return UID; - case 0: return ID_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public IdCase - getIdCase() { - return IdCase.forNumber( - idCase_); - } - - public static final int PROJECT_REPO_ID_FIELD_NUMBER = 1; - /** - *
-   * A combination of a project ID and a repo name.
-   * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @return Whether the projectRepoId field is set. - */ - @java.lang.Override - public boolean hasProjectRepoId() { - return idCase_ == 1; - } - /** - *
-   * A combination of a project ID and a repo name.
-   * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @return The projectRepoId. - */ - @java.lang.Override - public io.grafeas.v1.ProjectRepoId getProjectRepoId() { - if (idCase_ == 1) { - return (io.grafeas.v1.ProjectRepoId) id_; - } - return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); - } - /** - *
-   * A combination of a project ID and a repo name.
-   * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - @java.lang.Override - public io.grafeas.v1.ProjectRepoIdOrBuilder getProjectRepoIdOrBuilder() { - if (idCase_ == 1) { - return (io.grafeas.v1.ProjectRepoId) id_; - } - return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); - } - - public static final int UID_FIELD_NUMBER = 2; - /** - *
-   * A server-assigned, globally unique identifier.
-   * 
- * - * string uid = 2; - * @return Whether the uid field is set. - */ - public boolean hasUid() { - return idCase_ == 2; - } - /** - *
-   * A server-assigned, globally unique identifier.
-   * 
- * - * string uid = 2; - * @return The uid. - */ - public java.lang.String getUid() { - java.lang.Object ref = ""; - if (idCase_ == 2) { - ref = id_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (idCase_ == 2) { - id_ = s; - } - return s; - } - } - /** - *
-   * A server-assigned, globally unique identifier.
-   * 
- * - * string uid = 2; - * @return The bytes for uid. - */ - public com.google.protobuf.ByteString - getUidBytes() { - java.lang.Object ref = ""; - if (idCase_ == 2) { - ref = id_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (idCase_ == 2) { - id_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (idCase_ == 1) { - output.writeMessage(1, (io.grafeas.v1.ProjectRepoId) id_); - } - if (idCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (idCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (io.grafeas.v1.ProjectRepoId) id_); - } - if (idCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.RepoId)) { - return super.equals(obj); - } - io.grafeas.v1.RepoId other = (io.grafeas.v1.RepoId) obj; - - if (!getIdCase().equals(other.getIdCase())) return false; - switch (idCase_) { - case 1: - if (!getProjectRepoId() - .equals(other.getProjectRepoId())) return false; - break; - case 2: - if (!getUid() - .equals(other.getUid())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (idCase_) { - case 1: - hash = (37 * hash) + PROJECT_REPO_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectRepoId().hashCode(); - break; - case 2: - hash = (37 * hash) + UID_FIELD_NUMBER; - hash = (53 * hash) + getUid().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.RepoId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.RepoId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.RepoId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.RepoId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.RepoId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.RepoId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.RepoId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.RepoId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.RepoId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.RepoId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.RepoId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.RepoId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.RepoId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A unique identifier for a Cloud Repo.
-   * 
- * - * Protobuf type {@code grafeas.v1.RepoId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.RepoId) - io.grafeas.v1.RepoIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.RepoId.class, io.grafeas.v1.RepoId.Builder.class); - } - - // Construct using io.grafeas.v1.RepoId.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (projectRepoIdBuilder_ != null) { - projectRepoIdBuilder_.clear(); - } - idCase_ = 0; - id_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_RepoId_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.RepoId getDefaultInstanceForType() { - return io.grafeas.v1.RepoId.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.RepoId build() { - io.grafeas.v1.RepoId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.RepoId buildPartial() { - io.grafeas.v1.RepoId result = new io.grafeas.v1.RepoId(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.RepoId result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(io.grafeas.v1.RepoId result) { - result.idCase_ = idCase_; - result.id_ = this.id_; - if (idCase_ == 1 && - projectRepoIdBuilder_ != null) { - result.id_ = projectRepoIdBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.RepoId) { - return mergeFrom((io.grafeas.v1.RepoId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.RepoId other) { - if (other == io.grafeas.v1.RepoId.getDefaultInstance()) return this; - switch (other.getIdCase()) { - case PROJECT_REPO_ID: { - mergeProjectRepoId(other.getProjectRepoId()); - break; - } - case UID: { - idCase_ = 2; - id_ = other.id_; - onChanged(); - break; - } - case ID_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getProjectRepoIdFieldBuilder().getBuilder(), - extensionRegistry); - idCase_ = 1; - break; - } // case 10 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - idCase_ = 2; - id_ = s; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int idCase_ = 0; - private java.lang.Object id_; - public IdCase - getIdCase() { - return IdCase.forNumber( - idCase_); - } - - public Builder clearId() { - idCase_ = 0; - id_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ProjectRepoId, io.grafeas.v1.ProjectRepoId.Builder, io.grafeas.v1.ProjectRepoIdOrBuilder> projectRepoIdBuilder_; - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @return Whether the projectRepoId field is set. - */ - @java.lang.Override - public boolean hasProjectRepoId() { - return idCase_ == 1; - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @return The projectRepoId. - */ - @java.lang.Override - public io.grafeas.v1.ProjectRepoId getProjectRepoId() { - if (projectRepoIdBuilder_ == null) { - if (idCase_ == 1) { - return (io.grafeas.v1.ProjectRepoId) id_; - } - return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); - } else { - if (idCase_ == 1) { - return projectRepoIdBuilder_.getMessage(); - } - return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); - } - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - public Builder setProjectRepoId(io.grafeas.v1.ProjectRepoId value) { - if (projectRepoIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - id_ = value; - onChanged(); - } else { - projectRepoIdBuilder_.setMessage(value); - } - idCase_ = 1; - return this; - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - public Builder setProjectRepoId( - io.grafeas.v1.ProjectRepoId.Builder builderForValue) { - if (projectRepoIdBuilder_ == null) { - id_ = builderForValue.build(); - onChanged(); - } else { - projectRepoIdBuilder_.setMessage(builderForValue.build()); - } - idCase_ = 1; - return this; - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - public Builder mergeProjectRepoId(io.grafeas.v1.ProjectRepoId value) { - if (projectRepoIdBuilder_ == null) { - if (idCase_ == 1 && - id_ != io.grafeas.v1.ProjectRepoId.getDefaultInstance()) { - id_ = io.grafeas.v1.ProjectRepoId.newBuilder((io.grafeas.v1.ProjectRepoId) id_) - .mergeFrom(value).buildPartial(); - } else { - id_ = value; - } - onChanged(); - } else { - if (idCase_ == 1) { - projectRepoIdBuilder_.mergeFrom(value); - } else { - projectRepoIdBuilder_.setMessage(value); - } - } - idCase_ = 1; - return this; - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - public Builder clearProjectRepoId() { - if (projectRepoIdBuilder_ == null) { - if (idCase_ == 1) { - idCase_ = 0; - id_ = null; - onChanged(); - } - } else { - if (idCase_ == 1) { - idCase_ = 0; - id_ = null; - } - projectRepoIdBuilder_.clear(); - } - return this; - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - public io.grafeas.v1.ProjectRepoId.Builder getProjectRepoIdBuilder() { - return getProjectRepoIdFieldBuilder().getBuilder(); - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - @java.lang.Override - public io.grafeas.v1.ProjectRepoIdOrBuilder getProjectRepoIdOrBuilder() { - if ((idCase_ == 1) && (projectRepoIdBuilder_ != null)) { - return projectRepoIdBuilder_.getMessageOrBuilder(); - } else { - if (idCase_ == 1) { - return (io.grafeas.v1.ProjectRepoId) id_; - } - return io.grafeas.v1.ProjectRepoId.getDefaultInstance(); - } - } - /** - *
-     * A combination of a project ID and a repo name.
-     * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ProjectRepoId, io.grafeas.v1.ProjectRepoId.Builder, io.grafeas.v1.ProjectRepoIdOrBuilder> - getProjectRepoIdFieldBuilder() { - if (projectRepoIdBuilder_ == null) { - if (!(idCase_ == 1)) { - id_ = io.grafeas.v1.ProjectRepoId.getDefaultInstance(); - } - projectRepoIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.ProjectRepoId, io.grafeas.v1.ProjectRepoId.Builder, io.grafeas.v1.ProjectRepoIdOrBuilder>( - (io.grafeas.v1.ProjectRepoId) id_, - getParentForChildren(), - isClean()); - id_ = null; - } - idCase_ = 1; - onChanged(); - return projectRepoIdBuilder_; - } - - /** - *
-     * A server-assigned, globally unique identifier.
-     * 
- * - * string uid = 2; - * @return Whether the uid field is set. - */ - @java.lang.Override - public boolean hasUid() { - return idCase_ == 2; - } - /** - *
-     * A server-assigned, globally unique identifier.
-     * 
- * - * string uid = 2; - * @return The uid. - */ - @java.lang.Override - public java.lang.String getUid() { - java.lang.Object ref = ""; - if (idCase_ == 2) { - ref = id_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (idCase_ == 2) { - id_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A server-assigned, globally unique identifier.
-     * 
- * - * string uid = 2; - * @return The bytes for uid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUidBytes() { - java.lang.Object ref = ""; - if (idCase_ == 2) { - ref = id_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (idCase_ == 2) { - id_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A server-assigned, globally unique identifier.
-     * 
- * - * string uid = 2; - * @param value The uid to set. - * @return This builder for chaining. - */ - public Builder setUid( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - idCase_ = 2; - id_ = value; - onChanged(); - return this; - } - /** - *
-     * A server-assigned, globally unique identifier.
-     * 
- * - * string uid = 2; - * @return This builder for chaining. - */ - public Builder clearUid() { - if (idCase_ == 2) { - idCase_ = 0; - id_ = null; - onChanged(); - } - return this; - } - /** - *
-     * A server-assigned, globally unique identifier.
-     * 
- * - * string uid = 2; - * @param value The bytes for uid to set. - * @return This builder for chaining. - */ - public Builder setUidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - idCase_ = 2; - id_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.RepoId) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.RepoId) - private static final io.grafeas.v1.RepoId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.RepoId(); - } - - public static io.grafeas.v1.RepoId getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepoId parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.RepoId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java deleted file mode 100644 index 0bc7c33ef942..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/RepoIdOrBuilder.java +++ /dev/null @@ -1,67 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface RepoIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.RepoId) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A combination of a project ID and a repo name.
-   * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @return Whether the projectRepoId field is set. - */ - boolean hasProjectRepoId(); - /** - *
-   * A combination of a project ID and a repo name.
-   * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @return The projectRepoId. - */ - io.grafeas.v1.ProjectRepoId getProjectRepoId(); - /** - *
-   * A combination of a project ID and a repo name.
-   * 
- * - * .grafeas.v1.ProjectRepoId project_repo_id = 1; - */ - io.grafeas.v1.ProjectRepoIdOrBuilder getProjectRepoIdOrBuilder(); - - /** - *
-   * A server-assigned, globally unique identifier.
-   * 
- * - * string uid = 2; - * @return Whether the uid field is set. - */ - boolean hasUid(); - /** - *
-   * A server-assigned, globally unique identifier.
-   * 
- * - * string uid = 2; - * @return The uid. - */ - java.lang.String getUid(); - /** - *
-   * A server-assigned, globally unique identifier.
-   * 
- * - * string uid = 2; - * @return The bytes for uid. - */ - com.google.protobuf.ByteString - getUidBytes(); - - public io.grafeas.v1.RepoId.IdCase getIdCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java deleted file mode 100644 index 5201a5381fd1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Severity.java +++ /dev/null @@ -1,201 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/severity.proto - -package io.grafeas.v1; - -/** - *
- * Note provider assigned severity/impact ranking.
- * 
- * - * Protobuf enum {@code grafeas.v1.Severity} - */ -public enum Severity - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unknown.
-   * 
- * - * SEVERITY_UNSPECIFIED = 0; - */ - SEVERITY_UNSPECIFIED(0), - /** - *
-   * Minimal severity.
-   * 
- * - * MINIMAL = 1; - */ - MINIMAL(1), - /** - *
-   * Low severity.
-   * 
- * - * LOW = 2; - */ - LOW(2), - /** - *
-   * Medium severity.
-   * 
- * - * MEDIUM = 3; - */ - MEDIUM(3), - /** - *
-   * High severity.
-   * 
- * - * HIGH = 4; - */ - HIGH(4), - /** - *
-   * Critical severity.
-   * 
- * - * CRITICAL = 5; - */ - CRITICAL(5), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unknown.
-   * 
- * - * SEVERITY_UNSPECIFIED = 0; - */ - public static final int SEVERITY_UNSPECIFIED_VALUE = 0; - /** - *
-   * Minimal severity.
-   * 
- * - * MINIMAL = 1; - */ - public static final int MINIMAL_VALUE = 1; - /** - *
-   * Low severity.
-   * 
- * - * LOW = 2; - */ - public static final int LOW_VALUE = 2; - /** - *
-   * Medium severity.
-   * 
- * - * MEDIUM = 3; - */ - public static final int MEDIUM_VALUE = 3; - /** - *
-   * High severity.
-   * 
- * - * HIGH = 4; - */ - public static final int HIGH_VALUE = 4; - /** - *
-   * Critical severity.
-   * 
- * - * CRITICAL = 5; - */ - public static final int CRITICAL_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Severity valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Severity forNumber(int value) { - switch (value) { - case 0: return SEVERITY_UNSPECIFIED; - case 1: return MINIMAL; - case 2: return LOW; - case 3: return MEDIUM; - case 4: return HIGH; - case 5: return CRITICAL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Severity> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Severity findValueByNumber(int number) { - return Severity.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.SeverityOuterClass.getDescriptor().getEnumTypes().get(0); - } - - private static final Severity[] VALUES = values(); - - public static Severity valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Severity(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.Severity) -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java deleted file mode 100644 index 2181e45065aa..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SeverityOuterClass.java +++ /dev/null @@ -1,40 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/severity.proto - -package io.grafeas.v1; - -public final class SeverityOuterClass { - private SeverityOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\031grafeas/v1/severity.proto\022\ngrafeas.v1*" + - "^\n\010Severity\022\030\n\024SEVERITY_UNSPECIFIED\020\000\022\013\n" + - "\007MINIMAL\020\001\022\007\n\003LOW\020\002\022\n\n\006MEDIUM\020\003\022\010\n\004HIGH\020" + - "\004\022\014\n\010CRITICAL\020\005BQ\n\rio.grafeas.v1P\001Z8goog" + - "le.golang.org/genproto/googleapis/grafea" + - "s/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java deleted file mode 100644 index 66964ee7bd73..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Signature.java +++ /dev/null @@ -1,812 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -/** - *
- * Verifiers (e.g. Kritis implementations) MUST verify signatures
- * with respect to the trust anchors defined in policy (e.g. a Kritis policy).
- * Typically this means that the verifier has been configured with a map from
- * `public_key_id` to public key material (and any required parameters, e.g.
- * signing algorithm).
- * In particular, verification implementations MUST NOT treat the signature
- * `public_key_id` as anything more than a key lookup hint. The `public_key_id`
- * DOES NOT validate or authenticate a public key; it only provides a mechanism
- * for quickly selecting a public key ALREADY CONFIGURED on the verifier through
- * a trusted channel. Verification implementations MUST reject signatures in any
- * of the following circumstances:
- *   * The `public_key_id` is not recognized by the verifier.
- *   * The public key that `public_key_id` refers to does not verify the
- *     signature with respect to the payload.
- * The `signature` contents SHOULD NOT be "attached" (where the payload is
- * included with the serialized `signature` bytes). Verifiers MUST ignore any
- * "attached" payload and only verify signatures with respect to explicitly
- * provided payload (e.g. a `payload` field on the proto message that holds
- * this Signature, or the canonical serialization of the proto message that
- * holds this signature).
- * 
- * - * Protobuf type {@code grafeas.v1.Signature} - */ -public final class Signature extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Signature) - SignatureOrBuilder { -private static final long serialVersionUID = 0L; - // Use Signature.newBuilder() to construct. - private Signature(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Signature() { - signature_ = com.google.protobuf.ByteString.EMPTY; - publicKeyId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Signature(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Signature.class, io.grafeas.v1.Signature.Builder.class); - } - - public static final int SIGNATURE_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-   * The content of the signature, an opaque bytestring.
-   * The payload that this signature verifies MUST be unambiguously provided
-   * with the Signature during verification. A wrapper message might provide
-   * the payload explicitly. Alternatively, a message might have a canonical
-   * serialization that can always be unambiguously computed to derive the
-   * payload.
-   * 
- * - * bytes signature = 1; - * @return The signature. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSignature() { - return signature_; - } - - public static final int PUBLIC_KEY_ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object publicKeyId_ = ""; - /** - *
-   * The identifier for the public key that verifies this signature.
-   *   * The `public_key_id` is required.
-   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-   *     such as a cryptographic digest.
-   * Examples of valid `public_key_id`s:
-   * OpenPGP V4 public key fingerprint:
-   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-   * details on this scheme.
-   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-   * serialization):
-   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-   * 
- * - * string public_key_id = 2; - * @return The publicKeyId. - */ - @java.lang.Override - public java.lang.String getPublicKeyId() { - java.lang.Object ref = publicKeyId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKeyId_ = s; - return s; - } - } - /** - *
-   * The identifier for the public key that verifies this signature.
-   *   * The `public_key_id` is required.
-   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-   *     such as a cryptographic digest.
-   * Examples of valid `public_key_id`s:
-   * OpenPGP V4 public key fingerprint:
-   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-   * details on this scheme.
-   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-   * serialization):
-   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-   * 
- * - * string public_key_id = 2; - * @return The bytes for publicKeyId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPublicKeyIdBytes() { - java.lang.Object ref = publicKeyId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKeyId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!signature_.isEmpty()) { - output.writeBytes(1, signature_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, publicKeyId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!signature_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, signature_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, publicKeyId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Signature)) { - return super.equals(obj); - } - io.grafeas.v1.Signature other = (io.grafeas.v1.Signature) obj; - - if (!getSignature() - .equals(other.getSignature())) return false; - if (!getPublicKeyId() - .equals(other.getPublicKeyId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; - hash = (53 * hash) + getSignature().hashCode(); - hash = (37 * hash) + PUBLIC_KEY_ID_FIELD_NUMBER; - hash = (53 * hash) + getPublicKeyId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Signature parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Signature parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Signature parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Signature parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Signature parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Signature parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Signature parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Signature parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Signature parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Signature parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Signature parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Signature parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Signature prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Verifiers (e.g. Kritis implementations) MUST verify signatures
-   * with respect to the trust anchors defined in policy (e.g. a Kritis policy).
-   * Typically this means that the verifier has been configured with a map from
-   * `public_key_id` to public key material (and any required parameters, e.g.
-   * signing algorithm).
-   * In particular, verification implementations MUST NOT treat the signature
-   * `public_key_id` as anything more than a key lookup hint. The `public_key_id`
-   * DOES NOT validate or authenticate a public key; it only provides a mechanism
-   * for quickly selecting a public key ALREADY CONFIGURED on the verifier through
-   * a trusted channel. Verification implementations MUST reject signatures in any
-   * of the following circumstances:
-   *   * The `public_key_id` is not recognized by the verifier.
-   *   * The public key that `public_key_id` refers to does not verify the
-   *     signature with respect to the payload.
-   * The `signature` contents SHOULD NOT be "attached" (where the payload is
-   * included with the serialized `signature` bytes). Verifiers MUST ignore any
-   * "attached" payload and only verify signatures with respect to explicitly
-   * provided payload (e.g. a `payload` field on the proto message that holds
-   * this Signature, or the canonical serialization of the proto message that
-   * holds this signature).
-   * 
- * - * Protobuf type {@code grafeas.v1.Signature} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Signature) - io.grafeas.v1.SignatureOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Signature.class, io.grafeas.v1.Signature.Builder.class); - } - - // Construct using io.grafeas.v1.Signature.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - signature_ = com.google.protobuf.ByteString.EMPTY; - publicKeyId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Common.internal_static_grafeas_v1_Signature_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Signature getDefaultInstanceForType() { - return io.grafeas.v1.Signature.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Signature build() { - io.grafeas.v1.Signature result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Signature buildPartial() { - io.grafeas.v1.Signature result = new io.grafeas.v1.Signature(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Signature result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.signature_ = signature_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.publicKeyId_ = publicKeyId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Signature) { - return mergeFrom((io.grafeas.v1.Signature)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Signature other) { - if (other == io.grafeas.v1.Signature.getDefaultInstance()) return this; - if (other.getSignature() != com.google.protobuf.ByteString.EMPTY) { - setSignature(other.getSignature()); - } - if (!other.getPublicKeyId().isEmpty()) { - publicKeyId_ = other.publicKeyId_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - signature_ = input.readBytes(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - publicKeyId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * The content of the signature, an opaque bytestring.
-     * The payload that this signature verifies MUST be unambiguously provided
-     * with the Signature during verification. A wrapper message might provide
-     * the payload explicitly. Alternatively, a message might have a canonical
-     * serialization that can always be unambiguously computed to derive the
-     * payload.
-     * 
- * - * bytes signature = 1; - * @return The signature. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSignature() { - return signature_; - } - /** - *
-     * The content of the signature, an opaque bytestring.
-     * The payload that this signature verifies MUST be unambiguously provided
-     * with the Signature during verification. A wrapper message might provide
-     * the payload explicitly. Alternatively, a message might have a canonical
-     * serialization that can always be unambiguously computed to derive the
-     * payload.
-     * 
- * - * bytes signature = 1; - * @param value The signature to set. - * @return This builder for chaining. - */ - public Builder setSignature(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - signature_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The content of the signature, an opaque bytestring.
-     * The payload that this signature verifies MUST be unambiguously provided
-     * with the Signature during verification. A wrapper message might provide
-     * the payload explicitly. Alternatively, a message might have a canonical
-     * serialization that can always be unambiguously computed to derive the
-     * payload.
-     * 
- * - * bytes signature = 1; - * @return This builder for chaining. - */ - public Builder clearSignature() { - bitField0_ = (bitField0_ & ~0x00000001); - signature_ = getDefaultInstance().getSignature(); - onChanged(); - return this; - } - - private java.lang.Object publicKeyId_ = ""; - /** - *
-     * The identifier for the public key that verifies this signature.
-     *   * The `public_key_id` is required.
-     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-     *     such as a cryptographic digest.
-     * Examples of valid `public_key_id`s:
-     * OpenPGP V4 public key fingerprint:
-     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-     * details on this scheme.
-     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-     * serialization):
-     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-     * 
- * - * string public_key_id = 2; - * @return The publicKeyId. - */ - public java.lang.String getPublicKeyId() { - java.lang.Object ref = publicKeyId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKeyId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The identifier for the public key that verifies this signature.
-     *   * The `public_key_id` is required.
-     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-     *     such as a cryptographic digest.
-     * Examples of valid `public_key_id`s:
-     * OpenPGP V4 public key fingerprint:
-     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-     * details on this scheme.
-     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-     * serialization):
-     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-     * 
- * - * string public_key_id = 2; - * @return The bytes for publicKeyId. - */ - public com.google.protobuf.ByteString - getPublicKeyIdBytes() { - java.lang.Object ref = publicKeyId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKeyId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The identifier for the public key that verifies this signature.
-     *   * The `public_key_id` is required.
-     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-     *     such as a cryptographic digest.
-     * Examples of valid `public_key_id`s:
-     * OpenPGP V4 public key fingerprint:
-     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-     * details on this scheme.
-     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-     * serialization):
-     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-     * 
- * - * string public_key_id = 2; - * @param value The publicKeyId to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - publicKeyId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The identifier for the public key that verifies this signature.
-     *   * The `public_key_id` is required.
-     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-     *     such as a cryptographic digest.
-     * Examples of valid `public_key_id`s:
-     * OpenPGP V4 public key fingerprint:
-     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-     * details on this scheme.
-     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-     * serialization):
-     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-     * 
- * - * string public_key_id = 2; - * @return This builder for chaining. - */ - public Builder clearPublicKeyId() { - publicKeyId_ = getDefaultInstance().getPublicKeyId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The identifier for the public key that verifies this signature.
-     *   * The `public_key_id` is required.
-     *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-     *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-     *     such as a cryptographic digest.
-     * Examples of valid `public_key_id`s:
-     * OpenPGP V4 public key fingerprint:
-     *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-     * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-     * details on this scheme.
-     * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-     * serialization):
-     *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-     *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-     * 
- * - * string public_key_id = 2; - * @param value The bytes for publicKeyId to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - publicKeyId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Signature) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Signature) - private static final io.grafeas.v1.Signature DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Signature(); - } - - public static io.grafeas.v1.Signature getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Signature parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Signature getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java deleted file mode 100644 index abe4d6a9a8d9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SignatureOrBuilder.java +++ /dev/null @@ -1,70 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/common.proto - -package io.grafeas.v1; - -public interface SignatureOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Signature) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The content of the signature, an opaque bytestring.
-   * The payload that this signature verifies MUST be unambiguously provided
-   * with the Signature during verification. A wrapper message might provide
-   * the payload explicitly. Alternatively, a message might have a canonical
-   * serialization that can always be unambiguously computed to derive the
-   * payload.
-   * 
- * - * bytes signature = 1; - * @return The signature. - */ - com.google.protobuf.ByteString getSignature(); - - /** - *
-   * The identifier for the public key that verifies this signature.
-   *   * The `public_key_id` is required.
-   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-   *     such as a cryptographic digest.
-   * Examples of valid `public_key_id`s:
-   * OpenPGP V4 public key fingerprint:
-   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-   * details on this scheme.
-   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-   * serialization):
-   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-   * 
- * - * string public_key_id = 2; - * @return The publicKeyId. - */ - java.lang.String getPublicKeyId(); - /** - *
-   * The identifier for the public key that verifies this signature.
-   *   * The `public_key_id` is required.
-   *   * The `public_key_id` SHOULD be an RFC3986 conformant URI.
-   *   * When possible, the `public_key_id` SHOULD be an immutable reference,
-   *     such as a cryptographic digest.
-   * Examples of valid `public_key_id`s:
-   * OpenPGP V4 public key fingerprint:
-   *   * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
-   * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
-   * details on this scheme.
-   * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
-   * serialization):
-   *   * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
-   *   * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
-   * 
- * - * string public_key_id = 2; - * @return The bytes for publicKeyId. - */ - com.google.protobuf.ByteString - getPublicKeyIdBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java deleted file mode 100644 index e4dd833a02bd..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenance.java +++ /dev/null @@ -1,6801 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/slsa_provenance.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.SlsaProvenance} - */ -public final class SlsaProvenance extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance) - SlsaProvenanceOrBuilder { -private static final long serialVersionUID = 0L; - // Use SlsaProvenance.newBuilder() to construct. - private SlsaProvenance(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaProvenance() { - materials_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaProvenance(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.class, io.grafeas.v1.SlsaProvenance.Builder.class); - } - - public interface SlsaRecipeOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaRecipe) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * URI indicating what type of recipe was performed. It determines the
-     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-     * materials.
-     * 
- * - * string type = 1; - * @return The type. - */ - java.lang.String getType(); - /** - *
-     * URI indicating what type of recipe was performed. It determines the
-     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-     * materials.
-     * 
- * - * string type = 1; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - *
-     * Index in materials containing the recipe steps that are not implied by
-     * recipe.type. For example, if the recipe type were "make", then this would
-     * point to the source containing the Makefile, not the make program itself.
-     * Set to -1 if the recipe doesn't come from a material, as zero is default
-     * unset value for int64.
-     * 
- * - * int64 defined_in_material = 2; - * @return The definedInMaterial. - */ - long getDefinedInMaterial(); - - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For
-     * example, if the recipe type were "make", then this would reference the
-     * directory in which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @return The entryPoint. - */ - java.lang.String getEntryPoint(); - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For
-     * example, if the recipe type were "make", then this would reference the
-     * directory in which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - com.google.protobuf.ByteString - getEntryPointBytes(); - - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-     * recipe type were "make", then this might be the flags passed to make
-     * aside from the target, which is captured in recipe.entryPoint. Depending
-     * on the recipe Type, the structure may be different.
-     * 
- * - * .google.protobuf.Any arguments = 4; - * @return Whether the arguments field is set. - */ - boolean hasArguments(); - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-     * recipe type were "make", then this might be the flags passed to make
-     * aside from the target, which is captured in recipe.entryPoint. Depending
-     * on the recipe Type, the structure may be different.
-     * 
- * - * .google.protobuf.Any arguments = 4; - * @return The arguments. - */ - com.google.protobuf.Any getArguments(); - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-     * recipe type were "make", then this might be the flags passed to make
-     * aside from the target, which is captured in recipe.entryPoint. Depending
-     * on the recipe Type, the structure may be different.
-     * 
- * - * .google.protobuf.Any arguments = 4; - */ - com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder(); - - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating
-     * the recipe. Usually only needed for reproducing the build but not
-     * evaluated as part of policy. Depending on the recipe Type, the structure
-     * may be different.
-     * 
- * - * .google.protobuf.Any environment = 5; - * @return Whether the environment field is set. - */ - boolean hasEnvironment(); - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating
-     * the recipe. Usually only needed for reproducing the build but not
-     * evaluated as part of policy. Depending on the recipe Type, the structure
-     * may be different.
-     * 
- * - * .google.protobuf.Any environment = 5; - * @return The environment. - */ - com.google.protobuf.Any getEnvironment(); - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating
-     * the recipe. Usually only needed for reproducing the build but not
-     * evaluated as part of policy. Depending on the recipe Type, the structure
-     * may be different.
-     * 
- * - * .google.protobuf.Any environment = 5; - */ - com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder(); - } - /** - *
-   * Steps taken to build the artifact.
-   * For a TaskRun, typically each container corresponds to one step in the
-   * recipe.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaRecipe} - */ - public static final class SlsaRecipe extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaRecipe) - SlsaRecipeOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaRecipe.newBuilder() to construct. - private SlsaRecipe(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaRecipe() { - type_ = ""; - entryPoint_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaRecipe(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaRecipe.class, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder.class); - } - - public static final int TYPE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object type_ = ""; - /** - *
-     * URI indicating what type of recipe was performed. It determines the
-     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-     * materials.
-     * 
- * - * string type = 1; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } - } - /** - *
-     * URI indicating what type of recipe was performed. It determines the
-     * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-     * materials.
-     * 
- * - * string type = 1; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEFINED_IN_MATERIAL_FIELD_NUMBER = 2; - private long definedInMaterial_ = 0L; - /** - *
-     * Index in materials containing the recipe steps that are not implied by
-     * recipe.type. For example, if the recipe type were "make", then this would
-     * point to the source containing the Makefile, not the make program itself.
-     * Set to -1 if the recipe doesn't come from a material, as zero is default
-     * unset value for int64.
-     * 
- * - * int64 defined_in_material = 2; - * @return The definedInMaterial. - */ - @java.lang.Override - public long getDefinedInMaterial() { - return definedInMaterial_; - } - - public static final int ENTRY_POINT_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object entryPoint_ = ""; - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For
-     * example, if the recipe type were "make", then this would reference the
-     * directory in which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @return The entryPoint. - */ - @java.lang.Override - public java.lang.String getEntryPoint() { - java.lang.Object ref = entryPoint_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entryPoint_ = s; - return s; - } - } - /** - *
-     * String identifying the entry point into the build.
-     * This is often a path to a configuration file and/or a target label within
-     * that file. The syntax and meaning are defined by recipe.type. For
-     * example, if the recipe type were "make", then this would reference the
-     * directory in which to run make as well as which target to use.
-     * 
- * - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEntryPointBytes() { - java.lang.Object ref = entryPoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entryPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARGUMENTS_FIELD_NUMBER = 4; - private com.google.protobuf.Any arguments_; - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-     * recipe type were "make", then this might be the flags passed to make
-     * aside from the target, which is captured in recipe.entryPoint. Depending
-     * on the recipe Type, the structure may be different.
-     * 
- * - * .google.protobuf.Any arguments = 4; - * @return Whether the arguments field is set. - */ - @java.lang.Override - public boolean hasArguments() { - return arguments_ != null; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-     * recipe type were "make", then this might be the flags passed to make
-     * aside from the target, which is captured in recipe.entryPoint. Depending
-     * on the recipe Type, the structure may be different.
-     * 
- * - * .google.protobuf.Any arguments = 4; - * @return The arguments. - */ - @java.lang.Override - public com.google.protobuf.Any getArguments() { - return arguments_ == null ? com.google.protobuf.Any.getDefaultInstance() : arguments_; - } - /** - *
-     * Collection of all external inputs that influenced the build on top of
-     * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-     * recipe type were "make", then this might be the flags passed to make
-     * aside from the target, which is captured in recipe.entryPoint. Depending
-     * on the recipe Type, the structure may be different.
-     * 
- * - * .google.protobuf.Any arguments = 4; - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder() { - return arguments_ == null ? com.google.protobuf.Any.getDefaultInstance() : arguments_; - } - - public static final int ENVIRONMENT_FIELD_NUMBER = 5; - private com.google.protobuf.Any environment_; - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating
-     * the recipe. Usually only needed for reproducing the build but not
-     * evaluated as part of policy. Depending on the recipe Type, the structure
-     * may be different.
-     * 
- * - * .google.protobuf.Any environment = 5; - * @return Whether the environment field is set. - */ - @java.lang.Override - public boolean hasEnvironment() { - return environment_ != null; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating
-     * the recipe. Usually only needed for reproducing the build but not
-     * evaluated as part of policy. Depending on the recipe Type, the structure
-     * may be different.
-     * 
- * - * .google.protobuf.Any environment = 5; - * @return The environment. - */ - @java.lang.Override - public com.google.protobuf.Any getEnvironment() { - return environment_ == null ? com.google.protobuf.Any.getDefaultInstance() : environment_; - } - /** - *
-     * Any other builder-controlled inputs necessary for correctly evaluating
-     * the recipe. Usually only needed for reproducing the build but not
-     * evaluated as part of policy. Depending on the recipe Type, the structure
-     * may be different.
-     * 
- * - * .google.protobuf.Any environment = 5; - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder() { - return environment_ == null ? com.google.protobuf.Any.getDefaultInstance() : environment_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); - } - if (definedInMaterial_ != 0L) { - output.writeInt64(2, definedInMaterial_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entryPoint_); - } - if (arguments_ != null) { - output.writeMessage(4, getArguments()); - } - if (environment_ != null) { - output.writeMessage(5, getEnvironment()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); - } - if (definedInMaterial_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, definedInMaterial_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entryPoint_); - } - if (arguments_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getArguments()); - } - if (environment_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getEnvironment()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaRecipe)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenance.SlsaRecipe other = (io.grafeas.v1.SlsaProvenance.SlsaRecipe) obj; - - if (!getType() - .equals(other.getType())) return false; - if (getDefinedInMaterial() - != other.getDefinedInMaterial()) return false; - if (!getEntryPoint() - .equals(other.getEntryPoint())) return false; - if (hasArguments() != other.hasArguments()) return false; - if (hasArguments()) { - if (!getArguments() - .equals(other.getArguments())) return false; - } - if (hasEnvironment() != other.hasEnvironment()) return false; - if (hasEnvironment()) { - if (!getEnvironment() - .equals(other.getEnvironment())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - hash = (37 * hash) + DEFINED_IN_MATERIAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getDefinedInMaterial()); - hash = (37 * hash) + ENTRY_POINT_FIELD_NUMBER; - hash = (53 * hash) + getEntryPoint().hashCode(); - if (hasArguments()) { - hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; - hash = (53 * hash) + getArguments().hashCode(); - } - if (hasEnvironment()) { - hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; - hash = (53 * hash) + getEnvironment().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaRecipe prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Steps taken to build the artifact.
-     * For a TaskRun, typically each container corresponds to one step in the
-     * recipe.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaRecipe} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaRecipe) - io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaRecipe.class, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenance.SlsaRecipe.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = ""; - definedInMaterial_ = 0L; - entryPoint_ = ""; - arguments_ = null; - if (argumentsBuilder_ != null) { - argumentsBuilder_.dispose(); - argumentsBuilder_ = null; - } - environment_ = null; - if (environmentBuilder_ != null) { - environmentBuilder_.dispose(); - environmentBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaRecipe getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaRecipe build() { - io.grafeas.v1.SlsaProvenance.SlsaRecipe result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaRecipe buildPartial() { - io.grafeas.v1.SlsaProvenance.SlsaRecipe result = new io.grafeas.v1.SlsaProvenance.SlsaRecipe(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaRecipe result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.definedInMaterial_ = definedInMaterial_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.entryPoint_ = entryPoint_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.arguments_ = argumentsBuilder_ == null - ? arguments_ - : argumentsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.environment_ = environmentBuilder_ == null - ? environment_ - : environmentBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaRecipe) { - return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaRecipe)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaRecipe other) { - if (other == io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getDefinedInMaterial() != 0L) { - setDefinedInMaterial(other.getDefinedInMaterial()); - } - if (!other.getEntryPoint().isEmpty()) { - entryPoint_ = other.entryPoint_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasArguments()) { - mergeArguments(other.getArguments()); - } - if (other.hasEnvironment()) { - mergeEnvironment(other.getEnvironment()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - type_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - definedInMaterial_ = input.readInt64(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - entryPoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getArgumentsFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - input.readMessage( - getEnvironmentFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object type_ = ""; - /** - *
-       * URI indicating what type of recipe was performed. It determines the
-       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-       * materials.
-       * 
- * - * string type = 1; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * URI indicating what type of recipe was performed. It determines the
-       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-       * materials.
-       * 
- * - * string type = 1; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * URI indicating what type of recipe was performed. It determines the
-       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-       * materials.
-       * 
- * - * string type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * URI indicating what type of recipe was performed. It determines the
-       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-       * materials.
-       * 
- * - * string type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - type_ = getDefaultInstance().getType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * URI indicating what type of recipe was performed. It determines the
-       * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
-       * materials.
-       * 
- * - * string type = 1; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private long definedInMaterial_ ; - /** - *
-       * Index in materials containing the recipe steps that are not implied by
-       * recipe.type. For example, if the recipe type were "make", then this would
-       * point to the source containing the Makefile, not the make program itself.
-       * Set to -1 if the recipe doesn't come from a material, as zero is default
-       * unset value for int64.
-       * 
- * - * int64 defined_in_material = 2; - * @return The definedInMaterial. - */ - @java.lang.Override - public long getDefinedInMaterial() { - return definedInMaterial_; - } - /** - *
-       * Index in materials containing the recipe steps that are not implied by
-       * recipe.type. For example, if the recipe type were "make", then this would
-       * point to the source containing the Makefile, not the make program itself.
-       * Set to -1 if the recipe doesn't come from a material, as zero is default
-       * unset value for int64.
-       * 
- * - * int64 defined_in_material = 2; - * @param value The definedInMaterial to set. - * @return This builder for chaining. - */ - public Builder setDefinedInMaterial(long value) { - - definedInMaterial_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * Index in materials containing the recipe steps that are not implied by
-       * recipe.type. For example, if the recipe type were "make", then this would
-       * point to the source containing the Makefile, not the make program itself.
-       * Set to -1 if the recipe doesn't come from a material, as zero is default
-       * unset value for int64.
-       * 
- * - * int64 defined_in_material = 2; - * @return This builder for chaining. - */ - public Builder clearDefinedInMaterial() { - bitField0_ = (bitField0_ & ~0x00000002); - definedInMaterial_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object entryPoint_ = ""; - /** - *
-       * String identifying the entry point into the build.
-       * This is often a path to a configuration file and/or a target label within
-       * that file. The syntax and meaning are defined by recipe.type. For
-       * example, if the recipe type were "make", then this would reference the
-       * directory in which to run make as well as which target to use.
-       * 
- * - * string entry_point = 3; - * @return The entryPoint. - */ - public java.lang.String getEntryPoint() { - java.lang.Object ref = entryPoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entryPoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * String identifying the entry point into the build.
-       * This is often a path to a configuration file and/or a target label within
-       * that file. The syntax and meaning are defined by recipe.type. For
-       * example, if the recipe type were "make", then this would reference the
-       * directory in which to run make as well as which target to use.
-       * 
- * - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - public com.google.protobuf.ByteString - getEntryPointBytes() { - java.lang.Object ref = entryPoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entryPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * String identifying the entry point into the build.
-       * This is often a path to a configuration file and/or a target label within
-       * that file. The syntax and meaning are defined by recipe.type. For
-       * example, if the recipe type were "make", then this would reference the
-       * directory in which to run make as well as which target to use.
-       * 
- * - * string entry_point = 3; - * @param value The entryPoint to set. - * @return This builder for chaining. - */ - public Builder setEntryPoint( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - entryPoint_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * String identifying the entry point into the build.
-       * This is often a path to a configuration file and/or a target label within
-       * that file. The syntax and meaning are defined by recipe.type. For
-       * example, if the recipe type were "make", then this would reference the
-       * directory in which to run make as well as which target to use.
-       * 
- * - * string entry_point = 3; - * @return This builder for chaining. - */ - public Builder clearEntryPoint() { - entryPoint_ = getDefaultInstance().getEntryPoint(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-       * String identifying the entry point into the build.
-       * This is often a path to a configuration file and/or a target label within
-       * that file. The syntax and meaning are defined by recipe.type. For
-       * example, if the recipe type were "make", then this would reference the
-       * directory in which to run make as well as which target to use.
-       * 
- * - * string entry_point = 3; - * @param value The bytes for entryPoint to set. - * @return This builder for chaining. - */ - public Builder setEntryPointBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - entryPoint_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private com.google.protobuf.Any arguments_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> argumentsBuilder_; - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - * @return Whether the arguments field is set. - */ - public boolean hasArguments() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - * @return The arguments. - */ - public com.google.protobuf.Any getArguments() { - if (argumentsBuilder_ == null) { - return arguments_ == null ? com.google.protobuf.Any.getDefaultInstance() : arguments_; - } else { - return argumentsBuilder_.getMessage(); - } - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - */ - public Builder setArguments(com.google.protobuf.Any value) { - if (argumentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - arguments_ = value; - } else { - argumentsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - */ - public Builder setArguments( - com.google.protobuf.Any.Builder builderForValue) { - if (argumentsBuilder_ == null) { - arguments_ = builderForValue.build(); - } else { - argumentsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - */ - public Builder mergeArguments(com.google.protobuf.Any value) { - if (argumentsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - arguments_ != null && - arguments_ != com.google.protobuf.Any.getDefaultInstance()) { - getArgumentsBuilder().mergeFrom(value); - } else { - arguments_ = value; - } - } else { - argumentsBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - */ - public Builder clearArguments() { - bitField0_ = (bitField0_ & ~0x00000008); - arguments_ = null; - if (argumentsBuilder_ != null) { - argumentsBuilder_.dispose(); - argumentsBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - */ - public com.google.protobuf.Any.Builder getArgumentsBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getArgumentsFieldBuilder().getBuilder(); - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - */ - public com.google.protobuf.AnyOrBuilder getArgumentsOrBuilder() { - if (argumentsBuilder_ != null) { - return argumentsBuilder_.getMessageOrBuilder(); - } else { - return arguments_ == null ? - com.google.protobuf.Any.getDefaultInstance() : arguments_; - } - } - /** - *
-       * Collection of all external inputs that influenced the build on top of
-       * recipe.definedInMaterial and recipe.entryPoint. For example, if the
-       * recipe type were "make", then this might be the flags passed to make
-       * aside from the target, which is captured in recipe.entryPoint. Depending
-       * on the recipe Type, the structure may be different.
-       * 
- * - * .google.protobuf.Any arguments = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getArgumentsFieldBuilder() { - if (argumentsBuilder_ == null) { - argumentsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getArguments(), - getParentForChildren(), - isClean()); - arguments_ = null; - } - return argumentsBuilder_; - } - - private com.google.protobuf.Any environment_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> environmentBuilder_; - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - * @return Whether the environment field is set. - */ - public boolean hasEnvironment() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - * @return The environment. - */ - public com.google.protobuf.Any getEnvironment() { - if (environmentBuilder_ == null) { - return environment_ == null ? com.google.protobuf.Any.getDefaultInstance() : environment_; - } else { - return environmentBuilder_.getMessage(); - } - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - */ - public Builder setEnvironment(com.google.protobuf.Any value) { - if (environmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - environment_ = value; - } else { - environmentBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - */ - public Builder setEnvironment( - com.google.protobuf.Any.Builder builderForValue) { - if (environmentBuilder_ == null) { - environment_ = builderForValue.build(); - } else { - environmentBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - */ - public Builder mergeEnvironment(com.google.protobuf.Any value) { - if (environmentBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - environment_ != null && - environment_ != com.google.protobuf.Any.getDefaultInstance()) { - getEnvironmentBuilder().mergeFrom(value); - } else { - environment_ = value; - } - } else { - environmentBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - */ - public Builder clearEnvironment() { - bitField0_ = (bitField0_ & ~0x00000010); - environment_ = null; - if (environmentBuilder_ != null) { - environmentBuilder_.dispose(); - environmentBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - */ - public com.google.protobuf.Any.Builder getEnvironmentBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getEnvironmentFieldBuilder().getBuilder(); - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - */ - public com.google.protobuf.AnyOrBuilder getEnvironmentOrBuilder() { - if (environmentBuilder_ != null) { - return environmentBuilder_.getMessageOrBuilder(); - } else { - return environment_ == null ? - com.google.protobuf.Any.getDefaultInstance() : environment_; - } - } - /** - *
-       * Any other builder-controlled inputs necessary for correctly evaluating
-       * the recipe. Usually only needed for reproducing the build but not
-       * evaluated as part of policy. Depending on the recipe Type, the structure
-       * may be different.
-       * 
- * - * .google.protobuf.Any environment = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getEnvironmentFieldBuilder() { - if (environmentBuilder_ == null) { - environmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getEnvironment(), - getParentForChildren(), - isClean()); - environment_ = null; - } - return environmentBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaRecipe) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaRecipe) - private static final io.grafeas.v1.SlsaProvenance.SlsaRecipe DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaRecipe(); - } - - public static io.grafeas.v1.SlsaProvenance.SlsaRecipe getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaRecipe parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaRecipe getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaCompletenessOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaCompleteness) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * If true, the builder claims that recipe.arguments is complete, meaning
-     * that all external inputs are properly captured in the recipe.
-     * 
- * - * bool arguments = 1; - * @return The arguments. - */ - boolean getArguments(); - - /** - *
-     * If true, the builder claims that recipe.environment is claimed to be
-     * complete.
-     * 
- * - * bool environment = 2; - * @return The environment. - */ - boolean getEnvironment(); - - /** - *
-     * If true, the builder claims that materials are complete, usually through
-     * some controls to prevent network access. Sometimes called "hermetic".
-     * 
- * - * bool materials = 3; - * @return The materials. - */ - boolean getMaterials(); - } - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaCompleteness} - */ - public static final class SlsaCompleteness extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaCompleteness) - SlsaCompletenessOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaCompleteness.newBuilder() to construct. - private SlsaCompleteness(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaCompleteness() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaCompleteness(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder.class); - } - - public static final int ARGUMENTS_FIELD_NUMBER = 1; - private boolean arguments_ = false; - /** - *
-     * If true, the builder claims that recipe.arguments is complete, meaning
-     * that all external inputs are properly captured in the recipe.
-     * 
- * - * bool arguments = 1; - * @return The arguments. - */ - @java.lang.Override - public boolean getArguments() { - return arguments_; - } - - public static final int ENVIRONMENT_FIELD_NUMBER = 2; - private boolean environment_ = false; - /** - *
-     * If true, the builder claims that recipe.environment is claimed to be
-     * complete.
-     * 
- * - * bool environment = 2; - * @return The environment. - */ - @java.lang.Override - public boolean getEnvironment() { - return environment_; - } - - public static final int MATERIALS_FIELD_NUMBER = 3; - private boolean materials_ = false; - /** - *
-     * If true, the builder claims that materials are complete, usually through
-     * some controls to prevent network access. Sometimes called "hermetic".
-     * 
- * - * bool materials = 3; - * @return The materials. - */ - @java.lang.Override - public boolean getMaterials() { - return materials_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (arguments_ != false) { - output.writeBool(1, arguments_); - } - if (environment_ != false) { - output.writeBool(2, environment_); - } - if (materials_ != false) { - output.writeBool(3, materials_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (arguments_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, arguments_); - } - if (environment_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, environment_); - } - if (materials_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, materials_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaCompleteness)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenance.SlsaCompleteness other = (io.grafeas.v1.SlsaProvenance.SlsaCompleteness) obj; - - if (getArguments() - != other.getArguments()) return false; - if (getEnvironment() - != other.getEnvironment()) return false; - if (getMaterials() - != other.getMaterials()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getArguments()); - hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getEnvironment()); - hash = (37 * hash) + MATERIALS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getMaterials()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaCompleteness prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaCompleteness} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaCompleteness) - io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenance.SlsaCompleteness.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - arguments_ = false; - environment_ = false; - materials_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaCompleteness build() { - io.grafeas.v1.SlsaProvenance.SlsaCompleteness result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaCompleteness buildPartial() { - io.grafeas.v1.SlsaProvenance.SlsaCompleteness result = new io.grafeas.v1.SlsaProvenance.SlsaCompleteness(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaCompleteness result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.arguments_ = arguments_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.environment_ = environment_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.materials_ = materials_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaCompleteness) { - return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaCompleteness)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaCompleteness other) { - if (other == io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance()) return this; - if (other.getArguments() != false) { - setArguments(other.getArguments()); - } - if (other.getEnvironment() != false) { - setEnvironment(other.getEnvironment()); - } - if (other.getMaterials() != false) { - setMaterials(other.getMaterials()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - arguments_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - environment_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: { - materials_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private boolean arguments_ ; - /** - *
-       * If true, the builder claims that recipe.arguments is complete, meaning
-       * that all external inputs are properly captured in the recipe.
-       * 
- * - * bool arguments = 1; - * @return The arguments. - */ - @java.lang.Override - public boolean getArguments() { - return arguments_; - } - /** - *
-       * If true, the builder claims that recipe.arguments is complete, meaning
-       * that all external inputs are properly captured in the recipe.
-       * 
- * - * bool arguments = 1; - * @param value The arguments to set. - * @return This builder for chaining. - */ - public Builder setArguments(boolean value) { - - arguments_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * If true, the builder claims that recipe.arguments is complete, meaning
-       * that all external inputs are properly captured in the recipe.
-       * 
- * - * bool arguments = 1; - * @return This builder for chaining. - */ - public Builder clearArguments() { - bitField0_ = (bitField0_ & ~0x00000001); - arguments_ = false; - onChanged(); - return this; - } - - private boolean environment_ ; - /** - *
-       * If true, the builder claims that recipe.environment is claimed to be
-       * complete.
-       * 
- * - * bool environment = 2; - * @return The environment. - */ - @java.lang.Override - public boolean getEnvironment() { - return environment_; - } - /** - *
-       * If true, the builder claims that recipe.environment is claimed to be
-       * complete.
-       * 
- * - * bool environment = 2; - * @param value The environment to set. - * @return This builder for chaining. - */ - public Builder setEnvironment(boolean value) { - - environment_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * If true, the builder claims that recipe.environment is claimed to be
-       * complete.
-       * 
- * - * bool environment = 2; - * @return This builder for chaining. - */ - public Builder clearEnvironment() { - bitField0_ = (bitField0_ & ~0x00000002); - environment_ = false; - onChanged(); - return this; - } - - private boolean materials_ ; - /** - *
-       * If true, the builder claims that materials are complete, usually through
-       * some controls to prevent network access. Sometimes called "hermetic".
-       * 
- * - * bool materials = 3; - * @return The materials. - */ - @java.lang.Override - public boolean getMaterials() { - return materials_; - } - /** - *
-       * If true, the builder claims that materials are complete, usually through
-       * some controls to prevent network access. Sometimes called "hermetic".
-       * 
- * - * bool materials = 3; - * @param value The materials to set. - * @return This builder for chaining. - */ - public Builder setMaterials(boolean value) { - - materials_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * If true, the builder claims that materials are complete, usually through
-       * some controls to prevent network access. Sometimes called "hermetic".
-       * 
- * - * bool materials = 3; - * @return This builder for chaining. - */ - public Builder clearMaterials() { - bitField0_ = (bitField0_ & ~0x00000004); - materials_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaCompleteness) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaCompleteness) - private static final io.grafeas.v1.SlsaProvenance.SlsaCompleteness DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaCompleteness(); - } - - public static io.grafeas.v1.SlsaProvenance.SlsaCompleteness getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaCompleteness parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Identifies the particular build invocation, which can be useful for
-     * finding associated logs or other ad-hoc analysis. The value SHOULD be
-     * globally unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - java.lang.String getBuildInvocationId(); - /** - *
-     * Identifies the particular build invocation, which can be useful for
-     * finding associated logs or other ad-hoc analysis. The value SHOULD be
-     * globally unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - com.google.protobuf.ByteString - getBuildInvocationIdBytes(); - - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - boolean hasBuildStartedOn(); - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - com.google.protobuf.Timestamp getBuildStartedOn(); - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder(); - - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - boolean hasBuildFinishedOn(); - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - com.google.protobuf.Timestamp getBuildFinishedOn(); - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder(); - - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @return Whether the completeness field is set. - */ - boolean hasCompleteness(); - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @return The completeness. - */ - io.grafeas.v1.SlsaProvenance.SlsaCompleteness getCompleteness(); - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder getCompletenessOrBuilder(); - - /** - *
-     * If true, the builder claims that running the recipe on materials will
-     * produce bit-for-bit identical output.
-     * 
- * - * bool reproducible = 5; - * @return The reproducible. - */ - boolean getReproducible(); - } - /** - *
-   * Other properties of the build.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaMetadata} - */ - public static final class SlsaMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaMetadata) - SlsaMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaMetadata.newBuilder() to construct. - private SlsaMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaMetadata() { - buildInvocationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaMetadata.class, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder.class); - } - - public static final int BUILD_INVOCATION_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object buildInvocationId_ = ""; - /** - *
-     * Identifies the particular build invocation, which can be useful for
-     * finding associated logs or other ad-hoc analysis. The value SHOULD be
-     * globally unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - @java.lang.Override - public java.lang.String getBuildInvocationId() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildInvocationId_ = s; - return s; - } - } - /** - *
-     * Identifies the particular build invocation, which can be useful for
-     * finding associated logs or other ad-hoc analysis. The value SHOULD be
-     * globally unique, per in-toto Provenance spec.
-     * 
- * - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBuildInvocationIdBytes() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildInvocationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BUILD_STARTED_ON_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp buildStartedOn_; - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - @java.lang.Override - public boolean hasBuildStartedOn() { - return buildStartedOn_ != null; - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getBuildStartedOn() { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - /** - *
-     * The timestamp of when the build started.
-     * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - - public static final int BUILD_FINISHED_ON_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp buildFinishedOn_; - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - @java.lang.Override - public boolean hasBuildFinishedOn() { - return buildFinishedOn_ != null; - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getBuildFinishedOn() { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - /** - *
-     * The timestamp of when the build completed.
-     * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - - public static final int COMPLETENESS_FIELD_NUMBER = 4; - private io.grafeas.v1.SlsaProvenance.SlsaCompleteness completeness_; - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @return Whether the completeness field is set. - */ - @java.lang.Override - public boolean hasCompleteness() { - return completeness_ != null; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @return The completeness. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getCompleteness() { - return completeness_ == null ? io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { - return completeness_ == null ? io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; - } - - public static final int REPRODUCIBLE_FIELD_NUMBER = 5; - private boolean reproducible_ = false; - /** - *
-     * If true, the builder claims that running the recipe on materials will
-     * produce bit-for-bit identical output.
-     * 
- * - * bool reproducible = 5; - * @return The reproducible. - */ - @java.lang.Override - public boolean getReproducible() { - return reproducible_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, buildInvocationId_); - } - if (buildStartedOn_ != null) { - output.writeMessage(2, getBuildStartedOn()); - } - if (buildFinishedOn_ != null) { - output.writeMessage(3, getBuildFinishedOn()); - } - if (completeness_ != null) { - output.writeMessage(4, getCompleteness()); - } - if (reproducible_ != false) { - output.writeBool(5, reproducible_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, buildInvocationId_); - } - if (buildStartedOn_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBuildStartedOn()); - } - if (buildFinishedOn_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getBuildFinishedOn()); - } - if (completeness_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCompleteness()); - } - if (reproducible_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, reproducible_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaMetadata)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenance.SlsaMetadata other = (io.grafeas.v1.SlsaProvenance.SlsaMetadata) obj; - - if (!getBuildInvocationId() - .equals(other.getBuildInvocationId())) return false; - if (hasBuildStartedOn() != other.hasBuildStartedOn()) return false; - if (hasBuildStartedOn()) { - if (!getBuildStartedOn() - .equals(other.getBuildStartedOn())) return false; - } - if (hasBuildFinishedOn() != other.hasBuildFinishedOn()) return false; - if (hasBuildFinishedOn()) { - if (!getBuildFinishedOn() - .equals(other.getBuildFinishedOn())) return false; - } - if (hasCompleteness() != other.hasCompleteness()) return false; - if (hasCompleteness()) { - if (!getCompleteness() - .equals(other.getCompleteness())) return false; - } - if (getReproducible() - != other.getReproducible()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BUILD_INVOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getBuildInvocationId().hashCode(); - if (hasBuildStartedOn()) { - hash = (37 * hash) + BUILD_STARTED_ON_FIELD_NUMBER; - hash = (53 * hash) + getBuildStartedOn().hashCode(); - } - if (hasBuildFinishedOn()) { - hash = (37 * hash) + BUILD_FINISHED_ON_FIELD_NUMBER; - hash = (53 * hash) + getBuildFinishedOn().hashCode(); - } - if (hasCompleteness()) { - hash = (37 * hash) + COMPLETENESS_FIELD_NUMBER; - hash = (53 * hash) + getCompleteness().hashCode(); - } - hash = (37 * hash) + REPRODUCIBLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getReproducible()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Other properties of the build.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaMetadata) - io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaMetadata.class, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenance.SlsaMetadata.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - buildInvocationId_ = ""; - buildStartedOn_ = null; - if (buildStartedOnBuilder_ != null) { - buildStartedOnBuilder_.dispose(); - buildStartedOnBuilder_ = null; - } - buildFinishedOn_ = null; - if (buildFinishedOnBuilder_ != null) { - buildFinishedOnBuilder_.dispose(); - buildFinishedOnBuilder_ = null; - } - completeness_ = null; - if (completenessBuilder_ != null) { - completenessBuilder_.dispose(); - completenessBuilder_ = null; - } - reproducible_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaMetadata getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaMetadata build() { - io.grafeas.v1.SlsaProvenance.SlsaMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaMetadata buildPartial() { - io.grafeas.v1.SlsaProvenance.SlsaMetadata result = new io.grafeas.v1.SlsaProvenance.SlsaMetadata(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.buildInvocationId_ = buildInvocationId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.buildStartedOn_ = buildStartedOnBuilder_ == null - ? buildStartedOn_ - : buildStartedOnBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.buildFinishedOn_ = buildFinishedOnBuilder_ == null - ? buildFinishedOn_ - : buildFinishedOnBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.completeness_ = completenessBuilder_ == null - ? completeness_ - : completenessBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.reproducible_ = reproducible_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaMetadata) { - return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaMetadata other) { - if (other == io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance()) return this; - if (!other.getBuildInvocationId().isEmpty()) { - buildInvocationId_ = other.buildInvocationId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasBuildStartedOn()) { - mergeBuildStartedOn(other.getBuildStartedOn()); - } - if (other.hasBuildFinishedOn()) { - mergeBuildFinishedOn(other.getBuildFinishedOn()); - } - if (other.hasCompleteness()) { - mergeCompleteness(other.getCompleteness()); - } - if (other.getReproducible() != false) { - setReproducible(other.getReproducible()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - buildInvocationId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getBuildStartedOnFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getBuildFinishedOnFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getCompletenessFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: { - reproducible_ = input.readBool(); - bitField0_ |= 0x00000010; - break; - } // case 40 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object buildInvocationId_ = ""; - /** - *
-       * Identifies the particular build invocation, which can be useful for
-       * finding associated logs or other ad-hoc analysis. The value SHOULD be
-       * globally unique, per in-toto Provenance spec.
-       * 
- * - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - public java.lang.String getBuildInvocationId() { - java.lang.Object ref = buildInvocationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildInvocationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Identifies the particular build invocation, which can be useful for
-       * finding associated logs or other ad-hoc analysis. The value SHOULD be
-       * globally unique, per in-toto Provenance spec.
-       * 
- * - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - public com.google.protobuf.ByteString - getBuildInvocationIdBytes() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildInvocationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Identifies the particular build invocation, which can be useful for
-       * finding associated logs or other ad-hoc analysis. The value SHOULD be
-       * globally unique, per in-toto Provenance spec.
-       * 
- * - * string build_invocation_id = 1; - * @param value The buildInvocationId to set. - * @return This builder for chaining. - */ - public Builder setBuildInvocationId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - buildInvocationId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * Identifies the particular build invocation, which can be useful for
-       * finding associated logs or other ad-hoc analysis. The value SHOULD be
-       * globally unique, per in-toto Provenance spec.
-       * 
- * - * string build_invocation_id = 1; - * @return This builder for chaining. - */ - public Builder clearBuildInvocationId() { - buildInvocationId_ = getDefaultInstance().getBuildInvocationId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * Identifies the particular build invocation, which can be useful for
-       * finding associated logs or other ad-hoc analysis. The value SHOULD be
-       * globally unique, per in-toto Provenance spec.
-       * 
- * - * string build_invocation_id = 1; - * @param value The bytes for buildInvocationId to set. - * @return This builder for chaining. - */ - public Builder setBuildInvocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - buildInvocationId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp buildStartedOn_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildStartedOnBuilder_; - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - public boolean hasBuildStartedOn() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - public com.google.protobuf.Timestamp getBuildStartedOn() { - if (buildStartedOnBuilder_ == null) { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } else { - return buildStartedOnBuilder_.getMessage(); - } - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder setBuildStartedOn(com.google.protobuf.Timestamp value) { - if (buildStartedOnBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - buildStartedOn_ = value; - } else { - buildStartedOnBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder setBuildStartedOn( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (buildStartedOnBuilder_ == null) { - buildStartedOn_ = builderForValue.build(); - } else { - buildStartedOnBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder mergeBuildStartedOn(com.google.protobuf.Timestamp value) { - if (buildStartedOnBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - buildStartedOn_ != null && - buildStartedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getBuildStartedOnBuilder().mergeFrom(value); - } else { - buildStartedOn_ = value; - } - } else { - buildStartedOnBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder clearBuildStartedOn() { - bitField0_ = (bitField0_ & ~0x00000002); - buildStartedOn_ = null; - if (buildStartedOnBuilder_ != null) { - buildStartedOnBuilder_.dispose(); - buildStartedOnBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public com.google.protobuf.Timestamp.Builder getBuildStartedOnBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getBuildStartedOnFieldBuilder().getBuilder(); - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { - if (buildStartedOnBuilder_ != null) { - return buildStartedOnBuilder_.getMessageOrBuilder(); - } else { - return buildStartedOn_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - } - /** - *
-       * The timestamp of when the build started.
-       * 
- * - * .google.protobuf.Timestamp build_started_on = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getBuildStartedOnFieldBuilder() { - if (buildStartedOnBuilder_ == null) { - buildStartedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getBuildStartedOn(), - getParentForChildren(), - isClean()); - buildStartedOn_ = null; - } - return buildStartedOnBuilder_; - } - - private com.google.protobuf.Timestamp buildFinishedOn_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildFinishedOnBuilder_; - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - public boolean hasBuildFinishedOn() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - public com.google.protobuf.Timestamp getBuildFinishedOn() { - if (buildFinishedOnBuilder_ == null) { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } else { - return buildFinishedOnBuilder_.getMessage(); - } - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder setBuildFinishedOn(com.google.protobuf.Timestamp value) { - if (buildFinishedOnBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - buildFinishedOn_ = value; - } else { - buildFinishedOnBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder setBuildFinishedOn( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (buildFinishedOnBuilder_ == null) { - buildFinishedOn_ = builderForValue.build(); - } else { - buildFinishedOnBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder mergeBuildFinishedOn(com.google.protobuf.Timestamp value) { - if (buildFinishedOnBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - buildFinishedOn_ != null && - buildFinishedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getBuildFinishedOnBuilder().mergeFrom(value); - } else { - buildFinishedOn_ = value; - } - } else { - buildFinishedOnBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder clearBuildFinishedOn() { - bitField0_ = (bitField0_ & ~0x00000004); - buildFinishedOn_ = null; - if (buildFinishedOnBuilder_ != null) { - buildFinishedOnBuilder_.dispose(); - buildFinishedOnBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public com.google.protobuf.Timestamp.Builder getBuildFinishedOnBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getBuildFinishedOnFieldBuilder().getBuilder(); - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { - if (buildFinishedOnBuilder_ != null) { - return buildFinishedOnBuilder_.getMessageOrBuilder(); - } else { - return buildFinishedOn_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - } - /** - *
-       * The timestamp of when the build completed.
-       * 
- * - * .google.protobuf.Timestamp build_finished_on = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getBuildFinishedOnFieldBuilder() { - if (buildFinishedOnBuilder_ == null) { - buildFinishedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getBuildFinishedOn(), - getParentForChildren(), - isClean()); - buildFinishedOn_ = null; - } - return buildFinishedOnBuilder_; - } - - private io.grafeas.v1.SlsaProvenance.SlsaCompleteness completeness_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaCompleteness, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder> completenessBuilder_; - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @return Whether the completeness field is set. - */ - public boolean hasCompleteness() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @return The completeness. - */ - public io.grafeas.v1.SlsaProvenance.SlsaCompleteness getCompleteness() { - if (completenessBuilder_ == null) { - return completeness_ == null ? io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; - } else { - return completenessBuilder_.getMessage(); - } - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - public Builder setCompleteness(io.grafeas.v1.SlsaProvenance.SlsaCompleteness value) { - if (completenessBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - completeness_ = value; - } else { - completenessBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - public Builder setCompleteness( - io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder builderForValue) { - if (completenessBuilder_ == null) { - completeness_ = builderForValue.build(); - } else { - completenessBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - public Builder mergeCompleteness(io.grafeas.v1.SlsaProvenance.SlsaCompleteness value) { - if (completenessBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - completeness_ != null && - completeness_ != io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance()) { - getCompletenessBuilder().mergeFrom(value); - } else { - completeness_ = value; - } - } else { - completenessBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - public Builder clearCompleteness() { - bitField0_ = (bitField0_ & ~0x00000008); - completeness_ = null; - if (completenessBuilder_ != null) { - completenessBuilder_.dispose(); - completenessBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - public io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder getCompletenessBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCompletenessFieldBuilder().getBuilder(); - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - public io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { - if (completenessBuilder_ != null) { - return completenessBuilder_.getMessageOrBuilder(); - } else { - return completeness_ == null ? - io.grafeas.v1.SlsaProvenance.SlsaCompleteness.getDefaultInstance() : completeness_; - } - } - /** - *
-       * Indicates that the builder claims certain fields in this message to be
-       * complete.
-       * 
- * - * .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaCompleteness, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder> - getCompletenessFieldBuilder() { - if (completenessBuilder_ == null) { - completenessBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaCompleteness, io.grafeas.v1.SlsaProvenance.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenance.SlsaCompletenessOrBuilder>( - getCompleteness(), - getParentForChildren(), - isClean()); - completeness_ = null; - } - return completenessBuilder_; - } - - private boolean reproducible_ ; - /** - *
-       * If true, the builder claims that running the recipe on materials will
-       * produce bit-for-bit identical output.
-       * 
- * - * bool reproducible = 5; - * @return The reproducible. - */ - @java.lang.Override - public boolean getReproducible() { - return reproducible_; - } - /** - *
-       * If true, the builder claims that running the recipe on materials will
-       * produce bit-for-bit identical output.
-       * 
- * - * bool reproducible = 5; - * @param value The reproducible to set. - * @return This builder for chaining. - */ - public Builder setReproducible(boolean value) { - - reproducible_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-       * If true, the builder claims that running the recipe on materials will
-       * produce bit-for-bit identical output.
-       * 
- * - * bool reproducible = 5; - * @return This builder for chaining. - */ - public Builder clearReproducible() { - bitField0_ = (bitField0_ & ~0x00000010); - reproducible_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaMetadata) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaMetadata) - private static final io.grafeas.v1.SlsaProvenance.SlsaMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaMetadata(); - } - - public static io.grafeas.v1.SlsaProvenance.SlsaMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaBuilderOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.SlsaBuilder) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1; - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - } - /** - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaBuilder} - */ - public static final class SlsaBuilder extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.SlsaBuilder) - SlsaBuilderOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaBuilder.newBuilder() to construct. - private SlsaBuilder(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaBuilder() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaBuilder(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaBuilder.class, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenance.SlsaBuilder)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenance.SlsaBuilder other = (io.grafeas.v1.SlsaProvenance.SlsaBuilder) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.SlsaBuilder prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.SlsaProvenance.SlsaBuilder} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.SlsaBuilder) - io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.SlsaBuilder.class, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenance.SlsaBuilder.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaBuilder getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaBuilder build() { - io.grafeas.v1.SlsaProvenance.SlsaBuilder result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaBuilder buildPartial() { - io.grafeas.v1.SlsaProvenance.SlsaBuilder result = new io.grafeas.v1.SlsaProvenance.SlsaBuilder(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenance.SlsaBuilder result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenance.SlsaBuilder) { - return mergeFrom((io.grafeas.v1.SlsaProvenance.SlsaBuilder)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.SlsaBuilder other) { - if (other == io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.SlsaBuilder) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.SlsaBuilder) - private static final io.grafeas.v1.SlsaProvenance.SlsaBuilder DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.SlsaBuilder(); - } - - public static io.grafeas.v1.SlsaProvenance.SlsaBuilder getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaBuilder parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaBuilder getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface MaterialOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance.Material) - com.google.protobuf.MessageOrBuilder { - - /** - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - * map<string, string> digest = 2; - */ - int getDigestCount(); - /** - * map<string, string> digest = 2; - */ - boolean containsDigest( - java.lang.String key); - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getDigest(); - /** - * map<string, string> digest = 2; - */ - java.util.Map - getDigestMap(); - /** - * map<string, string> digest = 2; - */ - /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<string, string> digest = 2; - */ - java.lang.String getDigestOrThrow( - java.lang.String key); - } - /** - * Protobuf type {@code grafeas.v1.SlsaProvenance.Material} - */ - public static final class Material extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenance.Material) - MaterialOrBuilder { - private static final long serialVersionUID = 0L; - // Use Material.newBuilder() to construct. - private Material(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Material() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Material(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.Material.class, io.grafeas.v1.SlsaProvenance.Material.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - /** - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DIGEST_FIELD_NUMBER = 2; - private static final class DigestDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetDigest(), - DigestDefaultEntryHolder.defaultEntry, - 2); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - for (java.util.Map.Entry entry - : internalGetDigest().getMap().entrySet()) { - com.google.protobuf.MapEntry - digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, digest__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenance.Material)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenance.Material other = (io.grafeas.v1.SlsaProvenance.Material) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (!internalGetDigest().equals( - other.internalGetDigest())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - if (!internalGetDigest().getMap().isEmpty()) { - hash = (37 * hash) + DIGEST_FIELD_NUMBER; - hash = (53 * hash) + internalGetDigest().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.Material parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.Material parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance.Material parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenance.Material prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.SlsaProvenance.Material} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance.Material) - io.grafeas.v1.SlsaProvenance.MaterialOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.Material.class, io.grafeas.v1.SlsaProvenance.Material.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenance.Material.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - uri_ = ""; - internalGetMutableDigest().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.Material getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.Material build() { - io.grafeas.v1.SlsaProvenance.Material result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.Material buildPartial() { - io.grafeas.v1.SlsaProvenance.Material result = new io.grafeas.v1.SlsaProvenance.Material(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenance.Material result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.uri_ = uri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.digest_ = internalGetDigest(); - result.digest_.makeImmutable(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenance.Material) { - return mergeFrom((io.grafeas.v1.SlsaProvenance.Material)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenance.Material other) { - if (other == io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableDigest().mergeFrom( - other.internalGetDigest()); - bitField0_ |= 0x00000002; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - com.google.protobuf.MapEntry - digest__ = input.readMessage( - DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableDigest().getMutableMap().put( - digest__.getKey(), digest__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object uri_ = ""; - /** - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - private com.google.protobuf.MapField - internalGetMutableDigest() { - if (digest_ == null) { - digest_ = com.google.protobuf.MapField.newMapField( - DigestDefaultEntryHolder.defaultEntry); - } - if (!digest_.isMutable()) { - digest_ = digest_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearDigest() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableDigest().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> digest = 2; - */ - public Builder removeDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableDigest().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableDigest() { - bitField0_ |= 0x00000002; - return internalGetMutableDigest().getMutableMap(); - } - /** - * map<string, string> digest = 2; - */ - public Builder putDigest( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableDigest().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - * map<string, string> digest = 2; - */ - public Builder putAllDigest( - java.util.Map values) { - internalGetMutableDigest().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000002; - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance.Material) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance.Material) - private static final io.grafeas.v1.SlsaProvenance.Material DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance.Material(); - } - - public static io.grafeas.v1.SlsaProvenance.Material getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Material parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.Material getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int BUILDER_FIELD_NUMBER = 1; - private io.grafeas.v1.SlsaProvenance.SlsaBuilder builder_; - /** - *
-   * required
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @return Whether the builder field is set. - */ - @java.lang.Override - public boolean hasBuilder() { - return builder_ != null; - } - /** - *
-   * required
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @return The builder. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaBuilder getBuilder() { - return builder_ == null ? io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; - } - /** - *
-   * required
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder getBuilderOrBuilder() { - return builder_ == null ? io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; - } - - public static final int RECIPE_FIELD_NUMBER = 2; - private io.grafeas.v1.SlsaProvenance.SlsaRecipe recipe_; - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @return Whether the recipe field is set. - */ - @java.lang.Override - public boolean hasRecipe() { - return recipe_ != null; - } - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @return The recipe. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaRecipe getRecipe() { - return recipe_ == null ? io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; - } - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder getRecipeOrBuilder() { - return recipe_ == null ? io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; - } - - public static final int METADATA_FIELD_NUMBER = 3; - private io.grafeas.v1.SlsaProvenance.SlsaMetadata metadata_; - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return metadata_ != null; - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @return The metadata. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaMetadata getMetadata() { - return metadata_ == null ? io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; - } - - public static final int MATERIALS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List materials_; - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - @java.lang.Override - public java.util.List getMaterialsList() { - return materials_; - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - @java.lang.Override - public java.util.List - getMaterialsOrBuilderList() { - return materials_; - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - @java.lang.Override - public int getMaterialsCount() { - return materials_.size(); - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.Material getMaterials(int index) { - return materials_.get(index); - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenance.MaterialOrBuilder getMaterialsOrBuilder( - int index) { - return materials_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (builder_ != null) { - output.writeMessage(1, getBuilder()); - } - if (recipe_ != null) { - output.writeMessage(2, getRecipe()); - } - if (metadata_ != null) { - output.writeMessage(3, getMetadata()); - } - for (int i = 0; i < materials_.size(); i++) { - output.writeMessage(4, materials_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (builder_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBuilder()); - } - if (recipe_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getRecipe()); - } - if (metadata_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getMetadata()); - } - for (int i = 0; i < materials_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, materials_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenance)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenance other = (io.grafeas.v1.SlsaProvenance) obj; - - if (hasBuilder() != other.hasBuilder()) return false; - if (hasBuilder()) { - if (!getBuilder() - .equals(other.getBuilder())) return false; - } - if (hasRecipe() != other.hasRecipe()) return false; - if (hasRecipe()) { - if (!getRecipe() - .equals(other.getRecipe())) return false; - } - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getMaterialsList() - .equals(other.getMaterialsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBuilder()) { - hash = (37 * hash) + BUILDER_FIELD_NUMBER; - hash = (53 * hash) + getBuilder().hashCode(); - } - if (hasRecipe()) { - hash = (37 * hash) + RECIPE_FIELD_NUMBER; - hash = (53 * hash) + getRecipe().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - if (getMaterialsCount() > 0) { - hash = (37 * hash) + MATERIALS_FIELD_NUMBER; - hash = (53 * hash) + getMaterialsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenance parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenance parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenance parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenance parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenance prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.SlsaProvenance} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenance) - io.grafeas.v1.SlsaProvenanceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenance.class, io.grafeas.v1.SlsaProvenance.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenance.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - builder_ = null; - if (builderBuilder_ != null) { - builderBuilder_.dispose(); - builderBuilder_ = null; - } - recipe_ = null; - if (recipeBuilder_ != null) { - recipeBuilder_.dispose(); - recipeBuilder_ = null; - } - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - if (materialsBuilder_ == null) { - materials_ = java.util.Collections.emptyList(); - } else { - materials_ = null; - materialsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenance.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance build() { - io.grafeas.v1.SlsaProvenance result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance buildPartial() { - io.grafeas.v1.SlsaProvenance result = new io.grafeas.v1.SlsaProvenance(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.SlsaProvenance result) { - if (materialsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - materials_ = java.util.Collections.unmodifiableList(materials_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.materials_ = materials_; - } else { - result.materials_ = materialsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenance result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.builder_ = builderBuilder_ == null - ? builder_ - : builderBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.recipe_ = recipeBuilder_ == null - ? recipe_ - : recipeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenance) { - return mergeFrom((io.grafeas.v1.SlsaProvenance)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenance other) { - if (other == io.grafeas.v1.SlsaProvenance.getDefaultInstance()) return this; - if (other.hasBuilder()) { - mergeBuilder(other.getBuilder()); - } - if (other.hasRecipe()) { - mergeRecipe(other.getRecipe()); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (materialsBuilder_ == null) { - if (!other.materials_.isEmpty()) { - if (materials_.isEmpty()) { - materials_ = other.materials_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureMaterialsIsMutable(); - materials_.addAll(other.materials_); - } - onChanged(); - } - } else { - if (!other.materials_.isEmpty()) { - if (materialsBuilder_.isEmpty()) { - materialsBuilder_.dispose(); - materialsBuilder_ = null; - materials_ = other.materials_; - bitField0_ = (bitField0_ & ~0x00000008); - materialsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getMaterialsFieldBuilder() : null; - } else { - materialsBuilder_.addAllMessages(other.materials_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getBuilderFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getRecipeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - io.grafeas.v1.SlsaProvenance.Material m = - input.readMessage( - io.grafeas.v1.SlsaProvenance.Material.parser(), - extensionRegistry); - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.add(m); - } else { - materialsBuilder_.addMessage(m); - } - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.SlsaProvenance.SlsaBuilder builder_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaBuilder, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder> builderBuilder_; - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @return Whether the builder field is set. - */ - public boolean hasBuilder() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @return The builder. - */ - public io.grafeas.v1.SlsaProvenance.SlsaBuilder getBuilder() { - if (builderBuilder_ == null) { - return builder_ == null ? io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; - } else { - return builderBuilder_.getMessage(); - } - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - public Builder setBuilder(io.grafeas.v1.SlsaProvenance.SlsaBuilder value) { - if (builderBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - builder_ = value; - } else { - builderBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - public Builder setBuilder( - io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder builderForValue) { - if (builderBuilder_ == null) { - builder_ = builderForValue.build(); - } else { - builderBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - public Builder mergeBuilder(io.grafeas.v1.SlsaProvenance.SlsaBuilder value) { - if (builderBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - builder_ != null && - builder_ != io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance()) { - getBuilderBuilder().mergeFrom(value); - } else { - builder_ = value; - } - } else { - builderBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - public Builder clearBuilder() { - bitField0_ = (bitField0_ & ~0x00000001); - builder_ = null; - if (builderBuilder_ != null) { - builderBuilder_.dispose(); - builderBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - public io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder getBuilderBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getBuilderFieldBuilder().getBuilder(); - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - public io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder getBuilderOrBuilder() { - if (builderBuilder_ != null) { - return builderBuilder_.getMessageOrBuilder(); - } else { - return builder_ == null ? - io.grafeas.v1.SlsaProvenance.SlsaBuilder.getDefaultInstance() : builder_; - } - } - /** - *
-     * required
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaBuilder, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder> - getBuilderFieldBuilder() { - if (builderBuilder_ == null) { - builderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaBuilder, io.grafeas.v1.SlsaProvenance.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder>( - getBuilder(), - getParentForChildren(), - isClean()); - builder_ = null; - } - return builderBuilder_; - } - - private io.grafeas.v1.SlsaProvenance.SlsaRecipe recipe_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaRecipe, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder, io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder> recipeBuilder_; - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @return Whether the recipe field is set. - */ - public boolean hasRecipe() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @return The recipe. - */ - public io.grafeas.v1.SlsaProvenance.SlsaRecipe getRecipe() { - if (recipeBuilder_ == null) { - return recipe_ == null ? io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; - } else { - return recipeBuilder_.getMessage(); - } - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - public Builder setRecipe(io.grafeas.v1.SlsaProvenance.SlsaRecipe value) { - if (recipeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - recipe_ = value; - } else { - recipeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - public Builder setRecipe( - io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder builderForValue) { - if (recipeBuilder_ == null) { - recipe_ = builderForValue.build(); - } else { - recipeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - public Builder mergeRecipe(io.grafeas.v1.SlsaProvenance.SlsaRecipe value) { - if (recipeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - recipe_ != null && - recipe_ != io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance()) { - getRecipeBuilder().mergeFrom(value); - } else { - recipe_ = value; - } - } else { - recipeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - public Builder clearRecipe() { - bitField0_ = (bitField0_ & ~0x00000002); - recipe_ = null; - if (recipeBuilder_ != null) { - recipeBuilder_.dispose(); - recipeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - public io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder getRecipeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getRecipeFieldBuilder().getBuilder(); - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - public io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder getRecipeOrBuilder() { - if (recipeBuilder_ != null) { - return recipeBuilder_.getMessageOrBuilder(); - } else { - return recipe_ == null ? - io.grafeas.v1.SlsaProvenance.SlsaRecipe.getDefaultInstance() : recipe_; - } - } - /** - *
-     * Identifies the configuration used for the build.
-     * When combined with materials, this SHOULD fully describe the build,
-     * such that re-running this recipe results in bit-for-bit identical output
-     * (if the build is reproducible).
-     * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaRecipe, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder, io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder> - getRecipeFieldBuilder() { - if (recipeBuilder_ == null) { - recipeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaRecipe, io.grafeas.v1.SlsaProvenance.SlsaRecipe.Builder, io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder>( - getRecipe(), - getParentForChildren(), - isClean()); - recipe_ = null; - } - return recipeBuilder_; - } - - private io.grafeas.v1.SlsaProvenance.SlsaMetadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaMetadata, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder> metadataBuilder_; - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @return The metadata. - */ - public io.grafeas.v1.SlsaProvenance.SlsaMetadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - public Builder setMetadata(io.grafeas.v1.SlsaProvenance.SlsaMetadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - public Builder setMetadata( - io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - public Builder mergeMetadata(io.grafeas.v1.SlsaProvenance.SlsaMetadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - metadata_ != null && - metadata_ != io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000004); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - public io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - public io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.grafeas.v1.SlsaProvenance.SlsaMetadata.getDefaultInstance() : metadata_; - } - } - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaMetadata, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.SlsaMetadata, io.grafeas.v1.SlsaProvenance.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private java.util.List materials_ = - java.util.Collections.emptyList(); - private void ensureMaterialsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - materials_ = new java.util.ArrayList(materials_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.Material, io.grafeas.v1.SlsaProvenance.Material.Builder, io.grafeas.v1.SlsaProvenance.MaterialOrBuilder> materialsBuilder_; - - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public java.util.List getMaterialsList() { - if (materialsBuilder_ == null) { - return java.util.Collections.unmodifiableList(materials_); - } else { - return materialsBuilder_.getMessageList(); - } - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public int getMaterialsCount() { - if (materialsBuilder_ == null) { - return materials_.size(); - } else { - return materialsBuilder_.getCount(); - } - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public io.grafeas.v1.SlsaProvenance.Material getMaterials(int index) { - if (materialsBuilder_ == null) { - return materials_.get(index); - } else { - return materialsBuilder_.getMessage(index); - } - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder setMaterials( - int index, io.grafeas.v1.SlsaProvenance.Material value) { - if (materialsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMaterialsIsMutable(); - materials_.set(index, value); - onChanged(); - } else { - materialsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder setMaterials( - int index, io.grafeas.v1.SlsaProvenance.Material.Builder builderForValue) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.set(index, builderForValue.build()); - onChanged(); - } else { - materialsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder addMaterials(io.grafeas.v1.SlsaProvenance.Material value) { - if (materialsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMaterialsIsMutable(); - materials_.add(value); - onChanged(); - } else { - materialsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder addMaterials( - int index, io.grafeas.v1.SlsaProvenance.Material value) { - if (materialsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMaterialsIsMutable(); - materials_.add(index, value); - onChanged(); - } else { - materialsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder addMaterials( - io.grafeas.v1.SlsaProvenance.Material.Builder builderForValue) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.add(builderForValue.build()); - onChanged(); - } else { - materialsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder addMaterials( - int index, io.grafeas.v1.SlsaProvenance.Material.Builder builderForValue) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.add(index, builderForValue.build()); - onChanged(); - } else { - materialsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder addAllMaterials( - java.lang.Iterable values) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, materials_); - onChanged(); - } else { - materialsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder clearMaterials() { - if (materialsBuilder_ == null) { - materials_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - materialsBuilder_.clear(); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public Builder removeMaterials(int index) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.remove(index); - onChanged(); - } else { - materialsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public io.grafeas.v1.SlsaProvenance.Material.Builder getMaterialsBuilder( - int index) { - return getMaterialsFieldBuilder().getBuilder(index); - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public io.grafeas.v1.SlsaProvenance.MaterialOrBuilder getMaterialsOrBuilder( - int index) { - if (materialsBuilder_ == null) { - return materials_.get(index); } else { - return materialsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public java.util.List - getMaterialsOrBuilderList() { - if (materialsBuilder_ != null) { - return materialsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(materials_); - } - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public io.grafeas.v1.SlsaProvenance.Material.Builder addMaterialsBuilder() { - return getMaterialsFieldBuilder().addBuilder( - io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance()); - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public io.grafeas.v1.SlsaProvenance.Material.Builder addMaterialsBuilder( - int index) { - return getMaterialsFieldBuilder().addBuilder( - index, io.grafeas.v1.SlsaProvenance.Material.getDefaultInstance()); - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on. This is considered to be
-     * incomplete unless metadata.completeness.materials is true. Unset or null is
-     * equivalent to empty.
-     * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - public java.util.List - getMaterialsBuilderList() { - return getMaterialsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.Material, io.grafeas.v1.SlsaProvenance.Material.Builder, io.grafeas.v1.SlsaProvenance.MaterialOrBuilder> - getMaterialsFieldBuilder() { - if (materialsBuilder_ == null) { - materialsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SlsaProvenance.Material, io.grafeas.v1.SlsaProvenance.Material.Builder, io.grafeas.v1.SlsaProvenance.MaterialOrBuilder>( - materials_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - materials_ = null; - } - return materialsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenance) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenance) - private static final io.grafeas.v1.SlsaProvenance DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenance(); - } - - public static io.grafeas.v1.SlsaProvenance getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaProvenance parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenance getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java deleted file mode 100644 index d7b66088f1c3..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceOrBuilder.java +++ /dev/null @@ -1,146 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/slsa_provenance.proto - -package io.grafeas.v1; - -public interface SlsaProvenanceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenance) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * required
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @return Whether the builder field is set. - */ - boolean hasBuilder(); - /** - *
-   * required
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @return The builder. - */ - io.grafeas.v1.SlsaProvenance.SlsaBuilder getBuilder(); - /** - *
-   * required
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - io.grafeas.v1.SlsaProvenance.SlsaBuilderOrBuilder getBuilderOrBuilder(); - - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @return Whether the recipe field is set. - */ - boolean hasRecipe(); - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @return The recipe. - */ - io.grafeas.v1.SlsaProvenance.SlsaRecipe getRecipe(); - /** - *
-   * Identifies the configuration used for the build.
-   * When combined with materials, this SHOULD fully describe the build,
-   * such that re-running this recipe results in bit-for-bit identical output
-   * (if the build is reproducible).
-   * 
- * - * .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - io.grafeas.v1.SlsaProvenance.SlsaRecipeOrBuilder getRecipeOrBuilder(); - - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @return The metadata. - */ - io.grafeas.v1.SlsaProvenance.SlsaMetadata getMetadata(); - /** - * .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - io.grafeas.v1.SlsaProvenance.SlsaMetadataOrBuilder getMetadataOrBuilder(); - - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - java.util.List - getMaterialsList(); - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - io.grafeas.v1.SlsaProvenance.Material getMaterials(int index); - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - int getMaterialsCount(); - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - java.util.List - getMaterialsOrBuilderList(); - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on. This is considered to be
-   * incomplete unless metadata.completeness.materials is true. Unset or null is
-   * equivalent to empty.
-   * 
- * - * repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - io.grafeas.v1.SlsaProvenance.MaterialOrBuilder getMaterialsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java deleted file mode 100644 index f58193641147..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java +++ /dev/null @@ -1,143 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/slsa_provenance.proto - -package io.grafeas.v1; - -public final class SlsaProvenanceProto { - private SlsaProvenanceProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenance_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n grafeas/v1/slsa_provenance.proto\022\ngraf" + - "eas.v1\032\031google/protobuf/any.proto\032\037googl" + - "e/protobuf/timestamp.proto\"\376\006\n\016SlsaProve" + - "nance\0227\n\007builder\030\001 \001(\0132&.grafeas.v1.Slsa" + - "Provenance.SlsaBuilder\0225\n\006recipe\030\002 \001(\0132%" + - ".grafeas.v1.SlsaProvenance.SlsaRecipe\0229\n" + - "\010metadata\030\003 \001(\0132\'.grafeas.v1.SlsaProvena" + - "nce.SlsaMetadata\0226\n\tmaterials\030\004 \003(\0132#.gr" + - "afeas.v1.SlsaProvenance.Material\032\240\001\n\nSls" + - "aRecipe\022\014\n\004type\030\001 \001(\t\022\033\n\023defined_in_mate" + - "rial\030\002 \001(\003\022\023\n\013entry_point\030\003 \001(\t\022\'\n\targum" + - "ents\030\004 \001(\0132\024.google.protobuf.Any\022)\n\013envi" + - "ronment\030\005 \001(\0132\024.google.protobuf.Any\032M\n\020S" + - "lsaCompleteness\022\021\n\targuments\030\001 \001(\010\022\023\n\013en" + - "vironment\030\002 \001(\010\022\021\n\tmaterials\030\003 \001(\010\032\361\001\n\014S" + - "lsaMetadata\022\033\n\023build_invocation_id\030\001 \001(\t" + - "\0224\n\020build_started_on\030\002 \001(\0132\032.google.prot" + - "obuf.Timestamp\0225\n\021build_finished_on\030\003 \001(" + - "\0132\032.google.protobuf.Timestamp\022A\n\014complet" + - "eness\030\004 \001(\0132+.grafeas.v1.SlsaProvenance." + - "SlsaCompleteness\022\024\n\014reproducible\030\005 \001(\010\032\031" + - "\n\013SlsaBuilder\022\n\n\002id\030\001 \001(\t\032\207\001\n\010Material\022\013" + - "\n\003uri\030\001 \001(\t\022?\n\006digest\030\002 \003(\0132/.grafeas.v1" + - ".SlsaProvenance.Material.DigestEntry\032-\n\013" + - "DigestEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + - "\0028\001Bf\n\rio.grafeas.v1B\023SlsaProvenanceProt" + - "oP\001Z8google.golang.org/genproto/googleap" + - "is/grafeas/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.AnyProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_grafeas_v1_SlsaProvenance_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenance_descriptor, - new java.lang.String[] { "Builder", "Recipe", "Metadata", "Materials", }); - internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor = - internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor, - new java.lang.String[] { "Type", "DefinedInMaterial", "EntryPoint", "Arguments", "Environment", }); - internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor = - internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(1); - internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor, - new java.lang.String[] { "Arguments", "Environment", "Materials", }); - internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor = - internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(2); - internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor, - new java.lang.String[] { "BuildInvocationId", "BuildStartedOn", "BuildFinishedOn", "Completeness", "Reproducible", }); - internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor = - internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(3); - internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor, - new java.lang.String[] { "Id", }); - internal_static_grafeas_v1_SlsaProvenance_Material_descriptor = - internal_static_grafeas_v1_SlsaProvenance_descriptor.getNestedTypes().get(4); - internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenance_Material_descriptor, - new java.lang.String[] { "Uri", "Digest", }); - internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor = - internal_static_grafeas_v1_SlsaProvenance_Material_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - com.google.protobuf.AnyProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java deleted file mode 100644 index 41831c9804aa..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java +++ /dev/null @@ -1,6962 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/slsa_provenance_zero_two.proto - -package io.grafeas.v1; - -/** - *
- * See full explanation of fields at slsa.dev/provenance/v0.2.
- * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo} - */ -public final class SlsaProvenanceZeroTwo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo) - SlsaProvenanceZeroTwoOrBuilder { -private static final long serialVersionUID = 0L; - // Use SlsaProvenanceZeroTwo.newBuilder() to construct. - private SlsaProvenanceZeroTwo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaProvenanceZeroTwo() { - buildType_ = ""; - materials_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaProvenanceZeroTwo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.class, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder.class); - } - - public interface SlsaBuilderOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1; - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - } - /** - *
-   * Identifies the entity that executed the recipe, which is trusted to have
-   * correctly performed the operation and populated this provenance.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder} - */ - public static final class SlsaBuilder extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) - SlsaBuilderOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaBuilder.newBuilder() to construct. - private SlsaBuilder(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaBuilder() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaBuilder(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Identifies the entity that executed the recipe, which is trusted to have
-     * correctly performed the operation and populated this provenance.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder build() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder buildPartial() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) { - return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder other) { - if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) - private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder(); - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaBuilder parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaMaterialOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) - com.google.protobuf.MessageOrBuilder { - - /** - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - * map<string, string> digest = 2; - */ - int getDigestCount(); - /** - * map<string, string> digest = 2; - */ - boolean containsDigest( - java.lang.String key); - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getDigest(); - /** - * map<string, string> digest = 2; - */ - java.util.Map - getDigestMap(); - /** - * map<string, string> digest = 2; - */ - /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<string, string> digest = 2; - */ - java.lang.String getDigestOrThrow( - java.lang.String key); - } - /** - *
-   * The collection of artifacts that influenced the build including sources,
-   * dependencies, build tools, base images, and so on.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial} - */ - public static final class SlsaMaterial extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) - SlsaMaterialOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaMaterial.newBuilder() to construct. - private SlsaMaterial(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaMaterial() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaMaterial(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - /** - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DIGEST_FIELD_NUMBER = 2; - private static final class DigestDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetDigest(), - DigestDefaultEntryHolder.defaultEntry, - 2); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - for (java.util.Map.Entry entry - : internalGetDigest().getMap().entrySet()) { - com.google.protobuf.MapEntry - digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, digest__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (!internalGetDigest().equals( - other.internalGetDigest())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - if (!internalGetDigest().getMap().isEmpty()) { - hash = (37 * hash) + DIGEST_FIELD_NUMBER; - hash = (53 * hash) + internalGetDigest().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * The collection of artifacts that influenced the build including sources,
-     * dependencies, build tools, base images, and so on.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - uri_ = ""; - internalGetMutableDigest().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial build() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial buildPartial() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.uri_ = uri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.digest_ = internalGetDigest(); - result.digest_.makeImmutable(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) { - return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial other) { - if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableDigest().mergeFrom( - other.internalGetDigest()); - bitField0_ |= 0x00000002; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - com.google.protobuf.MapEntry - digest__ = input.readMessage( - DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableDigest().getMutableMap().put( - digest__.getKey(), digest__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object uri_ = ""; - /** - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - private com.google.protobuf.MapField - internalGetMutableDigest() { - if (digest_ == null) { - digest_ = com.google.protobuf.MapField.newMapField( - DigestDefaultEntryHolder.defaultEntry); - } - if (!digest_.isMutable()) { - digest_ = digest_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearDigest() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableDigest().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> digest = 2; - */ - public Builder removeDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableDigest().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableDigest() { - bitField0_ |= 0x00000002; - return internalGetMutableDigest().getMutableMap(); - } - /** - * map<string, string> digest = 2; - */ - public Builder putDigest( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableDigest().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - * map<string, string> digest = 2; - */ - public Builder putAllDigest( - java.util.Map values) { - internalGetMutableDigest().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000002; - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) - private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial(); - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaMaterial parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaInvocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) - com.google.protobuf.MessageOrBuilder { - - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @return Whether the configSource field is set. - */ - boolean hasConfigSource(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @return The configSource. - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getConfigSource(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder getConfigSourceOrBuilder(); - - /** - * .google.protobuf.Struct parameters = 2; - * @return Whether the parameters field is set. - */ - boolean hasParameters(); - /** - * .google.protobuf.Struct parameters = 2; - * @return The parameters. - */ - com.google.protobuf.Struct getParameters(); - /** - * .google.protobuf.Struct parameters = 2; - */ - com.google.protobuf.StructOrBuilder getParametersOrBuilder(); - - /** - * .google.protobuf.Struct environment = 3; - * @return Whether the environment field is set. - */ - boolean hasEnvironment(); - /** - * .google.protobuf.Struct environment = 3; - * @return The environment. - */ - com.google.protobuf.Struct getEnvironment(); - /** - * .google.protobuf.Struct environment = 3; - */ - com.google.protobuf.StructOrBuilder getEnvironmentOrBuilder(); - } - /** - *
-   * Identifies the event that kicked off the build.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation} - */ - public static final class SlsaInvocation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) - SlsaInvocationOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaInvocation.newBuilder() to construct. - private SlsaInvocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaInvocation() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaInvocation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder.class); - } - - public static final int CONFIG_SOURCE_FIELD_NUMBER = 1; - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource configSource_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @return Whether the configSource field is set. - */ - @java.lang.Override - public boolean hasConfigSource() { - return configSource_ != null; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @return The configSource. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getConfigSource() { - return configSource_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder getConfigSourceOrBuilder() { - return configSource_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; - } - - public static final int PARAMETERS_FIELD_NUMBER = 2; - private com.google.protobuf.Struct parameters_; - /** - * .google.protobuf.Struct parameters = 2; - * @return Whether the parameters field is set. - */ - @java.lang.Override - public boolean hasParameters() { - return parameters_ != null; - } - /** - * .google.protobuf.Struct parameters = 2; - * @return The parameters. - */ - @java.lang.Override - public com.google.protobuf.Struct getParameters() { - return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; - } - /** - * .google.protobuf.Struct parameters = 2; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { - return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; - } - - public static final int ENVIRONMENT_FIELD_NUMBER = 3; - private com.google.protobuf.Struct environment_; - /** - * .google.protobuf.Struct environment = 3; - * @return Whether the environment field is set. - */ - @java.lang.Override - public boolean hasEnvironment() { - return environment_ != null; - } - /** - * .google.protobuf.Struct environment = 3; - * @return The environment. - */ - @java.lang.Override - public com.google.protobuf.Struct getEnvironment() { - return environment_ == null ? com.google.protobuf.Struct.getDefaultInstance() : environment_; - } - /** - * .google.protobuf.Struct environment = 3; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getEnvironmentOrBuilder() { - return environment_ == null ? com.google.protobuf.Struct.getDefaultInstance() : environment_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (configSource_ != null) { - output.writeMessage(1, getConfigSource()); - } - if (parameters_ != null) { - output.writeMessage(2, getParameters()); - } - if (environment_ != null) { - output.writeMessage(3, getEnvironment()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (configSource_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getConfigSource()); - } - if (parameters_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getParameters()); - } - if (environment_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getEnvironment()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) obj; - - if (hasConfigSource() != other.hasConfigSource()) return false; - if (hasConfigSource()) { - if (!getConfigSource() - .equals(other.getConfigSource())) return false; - } - if (hasParameters() != other.hasParameters()) return false; - if (hasParameters()) { - if (!getParameters() - .equals(other.getParameters())) return false; - } - if (hasEnvironment() != other.hasEnvironment()) return false; - if (hasEnvironment()) { - if (!getEnvironment() - .equals(other.getEnvironment())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConfigSource()) { - hash = (37 * hash) + CONFIG_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getConfigSource().hashCode(); - } - if (hasParameters()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParameters().hashCode(); - } - if (hasEnvironment()) { - hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; - hash = (53 * hash) + getEnvironment().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Identifies the event that kicked off the build.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - configSource_ = null; - if (configSourceBuilder_ != null) { - configSourceBuilder_.dispose(); - configSourceBuilder_ = null; - } - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - environment_ = null; - if (environmentBuilder_ != null) { - environmentBuilder_.dispose(); - environmentBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation build() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation buildPartial() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.configSource_ = configSourceBuilder_ == null - ? configSource_ - : configSourceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.parameters_ = parametersBuilder_ == null - ? parameters_ - : parametersBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.environment_ = environmentBuilder_ == null - ? environment_ - : environmentBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) { - return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation other) { - if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance()) return this; - if (other.hasConfigSource()) { - mergeConfigSource(other.getConfigSource()); - } - if (other.hasParameters()) { - mergeParameters(other.getParameters()); - } - if (other.hasEnvironment()) { - mergeEnvironment(other.getEnvironment()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getConfigSourceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getParametersFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getEnvironmentFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource configSource_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder> configSourceBuilder_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @return Whether the configSource field is set. - */ - public boolean hasConfigSource() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @return The configSource. - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getConfigSource() { - if (configSourceBuilder_ == null) { - return configSource_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; - } else { - return configSourceBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - public Builder setConfigSource(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource value) { - if (configSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - configSource_ = value; - } else { - configSourceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - public Builder setConfigSource( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder builderForValue) { - if (configSourceBuilder_ == null) { - configSource_ = builderForValue.build(); - } else { - configSourceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - public Builder mergeConfigSource(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource value) { - if (configSourceBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - configSource_ != null && - configSource_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance()) { - getConfigSourceBuilder().mergeFrom(value); - } else { - configSource_ = value; - } - } else { - configSourceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - public Builder clearConfigSource() { - bitField0_ = (bitField0_ & ~0x00000001); - configSource_ = null; - if (configSourceBuilder_ != null) { - configSourceBuilder_.dispose(); - configSourceBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder getConfigSourceBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getConfigSourceFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder getConfigSourceOrBuilder() { - if (configSourceBuilder_ != null) { - return configSourceBuilder_.getMessageOrBuilder(); - } else { - return configSource_ == null ? - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance() : configSource_; - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder> - getConfigSourceFieldBuilder() { - if (configSourceBuilder_ == null) { - configSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder>( - getConfigSource(), - getParentForChildren(), - isClean()); - configSource_ = null; - } - return configSourceBuilder_; - } - - private com.google.protobuf.Struct parameters_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> parametersBuilder_; - /** - * .google.protobuf.Struct parameters = 2; - * @return Whether the parameters field is set. - */ - public boolean hasParameters() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .google.protobuf.Struct parameters = 2; - * @return The parameters. - */ - public com.google.protobuf.Struct getParameters() { - if (parametersBuilder_ == null) { - return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; - } else { - return parametersBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Struct parameters = 2; - */ - public Builder setParameters(com.google.protobuf.Struct value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parameters_ = value; - } else { - parametersBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct parameters = 2; - */ - public Builder setParameters( - com.google.protobuf.Struct.Builder builderForValue) { - if (parametersBuilder_ == null) { - parameters_ = builderForValue.build(); - } else { - parametersBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct parameters = 2; - */ - public Builder mergeParameters(com.google.protobuf.Struct value) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - parameters_ != null && - parameters_ != com.google.protobuf.Struct.getDefaultInstance()) { - getParametersBuilder().mergeFrom(value); - } else { - parameters_ = value; - } - } else { - parametersBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct parameters = 2; - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00000002); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Struct parameters = 2; - */ - public com.google.protobuf.Struct.Builder getParametersBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getParametersFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Struct parameters = 2; - */ - public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilder(); - } else { - return parameters_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : parameters_; - } - } - /** - * .google.protobuf.Struct parameters = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getParameters(), - getParentForChildren(), - isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - private com.google.protobuf.Struct environment_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> environmentBuilder_; - /** - * .google.protobuf.Struct environment = 3; - * @return Whether the environment field is set. - */ - public boolean hasEnvironment() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .google.protobuf.Struct environment = 3; - * @return The environment. - */ - public com.google.protobuf.Struct getEnvironment() { - if (environmentBuilder_ == null) { - return environment_ == null ? com.google.protobuf.Struct.getDefaultInstance() : environment_; - } else { - return environmentBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Struct environment = 3; - */ - public Builder setEnvironment(com.google.protobuf.Struct value) { - if (environmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - environment_ = value; - } else { - environmentBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct environment = 3; - */ - public Builder setEnvironment( - com.google.protobuf.Struct.Builder builderForValue) { - if (environmentBuilder_ == null) { - environment_ = builderForValue.build(); - } else { - environmentBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct environment = 3; - */ - public Builder mergeEnvironment(com.google.protobuf.Struct value) { - if (environmentBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - environment_ != null && - environment_ != com.google.protobuf.Struct.getDefaultInstance()) { - getEnvironmentBuilder().mergeFrom(value); - } else { - environment_ = value; - } - } else { - environmentBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct environment = 3; - */ - public Builder clearEnvironment() { - bitField0_ = (bitField0_ & ~0x00000004); - environment_ = null; - if (environmentBuilder_ != null) { - environmentBuilder_.dispose(); - environmentBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Struct environment = 3; - */ - public com.google.protobuf.Struct.Builder getEnvironmentBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getEnvironmentFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Struct environment = 3; - */ - public com.google.protobuf.StructOrBuilder getEnvironmentOrBuilder() { - if (environmentBuilder_ != null) { - return environmentBuilder_.getMessageOrBuilder(); - } else { - return environment_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : environment_; - } - } - /** - * .google.protobuf.Struct environment = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getEnvironmentFieldBuilder() { - if (environmentBuilder_ == null) { - environmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getEnvironment(), - getParentForChildren(), - isClean()); - environment_ = null; - } - return environmentBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) - private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation(); - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaInvocation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaConfigSourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) - com.google.protobuf.MessageOrBuilder { - - /** - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - * map<string, string> digest = 2; - */ - int getDigestCount(); - /** - * map<string, string> digest = 2; - */ - boolean containsDigest( - java.lang.String key); - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getDigest(); - /** - * map<string, string> digest = 2; - */ - java.util.Map - getDigestMap(); - /** - * map<string, string> digest = 2; - */ - /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<string, string> digest = 2; - */ - java.lang.String getDigestOrThrow( - java.lang.String key); - - /** - * string entry_point = 3; - * @return The entryPoint. - */ - java.lang.String getEntryPoint(); - /** - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - com.google.protobuf.ByteString - getEntryPointBytes(); - } - /** - *
-   * Describes where the config file that kicked off the build came from.
-   * This is effectively a pointer to the source where buildConfig came from.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource} - */ - public static final class SlsaConfigSource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) - SlsaConfigSourceOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaConfigSource.newBuilder() to construct. - private SlsaConfigSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaConfigSource() { - uri_ = ""; - entryPoint_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaConfigSource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - /** - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DIGEST_FIELD_NUMBER = 2; - private static final class DigestDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ENTRY_POINT_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object entryPoint_ = ""; - /** - * string entry_point = 3; - * @return The entryPoint. - */ - @java.lang.Override - public java.lang.String getEntryPoint() { - java.lang.Object ref = entryPoint_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entryPoint_ = s; - return s; - } - } - /** - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEntryPointBytes() { - java.lang.Object ref = entryPoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entryPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetDigest(), - DigestDefaultEntryHolder.defaultEntry, - 2); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entryPoint_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - for (java.util.Map.Entry entry - : internalGetDigest().getMap().entrySet()) { - com.google.protobuf.MapEntry - digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, digest__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entryPoint_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (!internalGetDigest().equals( - other.internalGetDigest())) return false; - if (!getEntryPoint() - .equals(other.getEntryPoint())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - if (!internalGetDigest().getMap().isEmpty()) { - hash = (37 * hash) + DIGEST_FIELD_NUMBER; - hash = (53 * hash) + internalGetDigest().hashCode(); - } - hash = (37 * hash) + ENTRY_POINT_FIELD_NUMBER; - hash = (53 * hash) + getEntryPoint().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Describes where the config file that kicked off the build came from.
-     * This is effectively a pointer to the source where buildConfig came from.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - uri_ = ""; - internalGetMutableDigest().clear(); - entryPoint_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource build() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource buildPartial() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.uri_ = uri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.digest_ = internalGetDigest(); - result.digest_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.entryPoint_ = entryPoint_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) { - return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource other) { - if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableDigest().mergeFrom( - other.internalGetDigest()); - bitField0_ |= 0x00000002; - if (!other.getEntryPoint().isEmpty()) { - entryPoint_ = other.entryPoint_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - com.google.protobuf.MapEntry - digest__ = input.readMessage( - DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableDigest().getMutableMap().put( - digest__.getKey(), digest__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - entryPoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object uri_ = ""; - /** - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - private com.google.protobuf.MapField - internalGetMutableDigest() { - if (digest_ == null) { - digest_ = com.google.protobuf.MapField.newMapField( - DigestDefaultEntryHolder.defaultEntry); - } - if (!digest_.isMutable()) { - digest_ = digest_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearDigest() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableDigest().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> digest = 2; - */ - public Builder removeDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableDigest().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableDigest() { - bitField0_ |= 0x00000002; - return internalGetMutableDigest().getMutableMap(); - } - /** - * map<string, string> digest = 2; - */ - public Builder putDigest( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableDigest().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - * map<string, string> digest = 2; - */ - public Builder putAllDigest( - java.util.Map values) { - internalGetMutableDigest().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000002; - return this; - } - - private java.lang.Object entryPoint_ = ""; - /** - * string entry_point = 3; - * @return The entryPoint. - */ - public java.lang.String getEntryPoint() { - java.lang.Object ref = entryPoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entryPoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string entry_point = 3; - * @return The bytes for entryPoint. - */ - public com.google.protobuf.ByteString - getEntryPointBytes() { - java.lang.Object ref = entryPoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entryPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string entry_point = 3; - * @param value The entryPoint to set. - * @return This builder for chaining. - */ - public Builder setEntryPoint( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - entryPoint_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * string entry_point = 3; - * @return This builder for chaining. - */ - public Builder clearEntryPoint() { - entryPoint_ = getDefaultInstance().getEntryPoint(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * string entry_point = 3; - * @param value The bytes for entryPoint to set. - * @return This builder for chaining. - */ - public Builder setEntryPointBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - entryPoint_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) - private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource(); - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaConfigSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - java.lang.String getBuildInvocationId(); - /** - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - com.google.protobuf.ByteString - getBuildInvocationIdBytes(); - - /** - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - boolean hasBuildStartedOn(); - /** - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - com.google.protobuf.Timestamp getBuildStartedOn(); - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder(); - - /** - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - boolean hasBuildFinishedOn(); - /** - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - com.google.protobuf.Timestamp getBuildFinishedOn(); - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder(); - - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @return Whether the completeness field is set. - */ - boolean hasCompleteness(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @return The completeness. - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getCompleteness(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder getCompletenessOrBuilder(); - - /** - * bool reproducible = 5; - * @return The reproducible. - */ - boolean getReproducible(); - } - /** - *
-   * Other properties of the build.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata} - */ - public static final class SlsaMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) - SlsaMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaMetadata.newBuilder() to construct. - private SlsaMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaMetadata() { - buildInvocationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder.class); - } - - public static final int BUILD_INVOCATION_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object buildInvocationId_ = ""; - /** - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - @java.lang.Override - public java.lang.String getBuildInvocationId() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildInvocationId_ = s; - return s; - } - } - /** - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBuildInvocationIdBytes() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildInvocationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BUILD_STARTED_ON_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp buildStartedOn_; - /** - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - @java.lang.Override - public boolean hasBuildStartedOn() { - return buildStartedOn_ != null; - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getBuildStartedOn() { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - - public static final int BUILD_FINISHED_ON_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp buildFinishedOn_; - /** - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - @java.lang.Override - public boolean hasBuildFinishedOn() { - return buildFinishedOn_ != null; - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getBuildFinishedOn() { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - - public static final int COMPLETENESS_FIELD_NUMBER = 4; - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @return Whether the completeness field is set. - */ - @java.lang.Override - public boolean hasCompleteness() { - return completeness_ != null; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @return The completeness. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getCompleteness() { - return completeness_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { - return completeness_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; - } - - public static final int REPRODUCIBLE_FIELD_NUMBER = 5; - private boolean reproducible_ = false; - /** - * bool reproducible = 5; - * @return The reproducible. - */ - @java.lang.Override - public boolean getReproducible() { - return reproducible_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, buildInvocationId_); - } - if (buildStartedOn_ != null) { - output.writeMessage(2, getBuildStartedOn()); - } - if (buildFinishedOn_ != null) { - output.writeMessage(3, getBuildFinishedOn()); - } - if (completeness_ != null) { - output.writeMessage(4, getCompleteness()); - } - if (reproducible_ != false) { - output.writeBool(5, reproducible_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildInvocationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, buildInvocationId_); - } - if (buildStartedOn_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBuildStartedOn()); - } - if (buildFinishedOn_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getBuildFinishedOn()); - } - if (completeness_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCompleteness()); - } - if (reproducible_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, reproducible_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) obj; - - if (!getBuildInvocationId() - .equals(other.getBuildInvocationId())) return false; - if (hasBuildStartedOn() != other.hasBuildStartedOn()) return false; - if (hasBuildStartedOn()) { - if (!getBuildStartedOn() - .equals(other.getBuildStartedOn())) return false; - } - if (hasBuildFinishedOn() != other.hasBuildFinishedOn()) return false; - if (hasBuildFinishedOn()) { - if (!getBuildFinishedOn() - .equals(other.getBuildFinishedOn())) return false; - } - if (hasCompleteness() != other.hasCompleteness()) return false; - if (hasCompleteness()) { - if (!getCompleteness() - .equals(other.getCompleteness())) return false; - } - if (getReproducible() - != other.getReproducible()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BUILD_INVOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getBuildInvocationId().hashCode(); - if (hasBuildStartedOn()) { - hash = (37 * hash) + BUILD_STARTED_ON_FIELD_NUMBER; - hash = (53 * hash) + getBuildStartedOn().hashCode(); - } - if (hasBuildFinishedOn()) { - hash = (37 * hash) + BUILD_FINISHED_ON_FIELD_NUMBER; - hash = (53 * hash) + getBuildFinishedOn().hashCode(); - } - if (hasCompleteness()) { - hash = (37 * hash) + COMPLETENESS_FIELD_NUMBER; - hash = (53 * hash) + getCompleteness().hashCode(); - } - hash = (37 * hash) + REPRODUCIBLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getReproducible()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Other properties of the build.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - buildInvocationId_ = ""; - buildStartedOn_ = null; - if (buildStartedOnBuilder_ != null) { - buildStartedOnBuilder_.dispose(); - buildStartedOnBuilder_ = null; - } - buildFinishedOn_ = null; - if (buildFinishedOnBuilder_ != null) { - buildFinishedOnBuilder_.dispose(); - buildFinishedOnBuilder_ = null; - } - completeness_ = null; - if (completenessBuilder_ != null) { - completenessBuilder_.dispose(); - completenessBuilder_ = null; - } - reproducible_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata build() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata buildPartial() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.buildInvocationId_ = buildInvocationId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.buildStartedOn_ = buildStartedOnBuilder_ == null - ? buildStartedOn_ - : buildStartedOnBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.buildFinishedOn_ = buildFinishedOnBuilder_ == null - ? buildFinishedOn_ - : buildFinishedOnBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.completeness_ = completenessBuilder_ == null - ? completeness_ - : completenessBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.reproducible_ = reproducible_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) { - return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata other) { - if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance()) return this; - if (!other.getBuildInvocationId().isEmpty()) { - buildInvocationId_ = other.buildInvocationId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasBuildStartedOn()) { - mergeBuildStartedOn(other.getBuildStartedOn()); - } - if (other.hasBuildFinishedOn()) { - mergeBuildFinishedOn(other.getBuildFinishedOn()); - } - if (other.hasCompleteness()) { - mergeCompleteness(other.getCompleteness()); - } - if (other.getReproducible() != false) { - setReproducible(other.getReproducible()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - buildInvocationId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getBuildStartedOnFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getBuildFinishedOnFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getCompletenessFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: { - reproducible_ = input.readBool(); - bitField0_ |= 0x00000010; - break; - } // case 40 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object buildInvocationId_ = ""; - /** - * string build_invocation_id = 1; - * @return The buildInvocationId. - */ - public java.lang.String getBuildInvocationId() { - java.lang.Object ref = buildInvocationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildInvocationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string build_invocation_id = 1; - * @return The bytes for buildInvocationId. - */ - public com.google.protobuf.ByteString - getBuildInvocationIdBytes() { - java.lang.Object ref = buildInvocationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildInvocationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string build_invocation_id = 1; - * @param value The buildInvocationId to set. - * @return This builder for chaining. - */ - public Builder setBuildInvocationId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - buildInvocationId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string build_invocation_id = 1; - * @return This builder for chaining. - */ - public Builder clearBuildInvocationId() { - buildInvocationId_ = getDefaultInstance().getBuildInvocationId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string build_invocation_id = 1; - * @param value The bytes for buildInvocationId to set. - * @return This builder for chaining. - */ - public Builder setBuildInvocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - buildInvocationId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp buildStartedOn_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildStartedOnBuilder_; - /** - * .google.protobuf.Timestamp build_started_on = 2; - * @return Whether the buildStartedOn field is set. - */ - public boolean hasBuildStartedOn() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - * @return The buildStartedOn. - */ - public com.google.protobuf.Timestamp getBuildStartedOn() { - if (buildStartedOnBuilder_ == null) { - return buildStartedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } else { - return buildStartedOnBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder setBuildStartedOn(com.google.protobuf.Timestamp value) { - if (buildStartedOnBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - buildStartedOn_ = value; - } else { - buildStartedOnBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder setBuildStartedOn( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (buildStartedOnBuilder_ == null) { - buildStartedOn_ = builderForValue.build(); - } else { - buildStartedOnBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder mergeBuildStartedOn(com.google.protobuf.Timestamp value) { - if (buildStartedOnBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - buildStartedOn_ != null && - buildStartedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getBuildStartedOnBuilder().mergeFrom(value); - } else { - buildStartedOn_ = value; - } - } else { - buildStartedOnBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - public Builder clearBuildStartedOn() { - bitField0_ = (bitField0_ & ~0x00000002); - buildStartedOn_ = null; - if (buildStartedOnBuilder_ != null) { - buildStartedOnBuilder_.dispose(); - buildStartedOnBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - public com.google.protobuf.Timestamp.Builder getBuildStartedOnBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getBuildStartedOnFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - public com.google.protobuf.TimestampOrBuilder getBuildStartedOnOrBuilder() { - if (buildStartedOnBuilder_ != null) { - return buildStartedOnBuilder_.getMessageOrBuilder(); - } else { - return buildStartedOn_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : buildStartedOn_; - } - } - /** - * .google.protobuf.Timestamp build_started_on = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getBuildStartedOnFieldBuilder() { - if (buildStartedOnBuilder_ == null) { - buildStartedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getBuildStartedOn(), - getParentForChildren(), - isClean()); - buildStartedOn_ = null; - } - return buildStartedOnBuilder_; - } - - private com.google.protobuf.Timestamp buildFinishedOn_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> buildFinishedOnBuilder_; - /** - * .google.protobuf.Timestamp build_finished_on = 3; - * @return Whether the buildFinishedOn field is set. - */ - public boolean hasBuildFinishedOn() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - * @return The buildFinishedOn. - */ - public com.google.protobuf.Timestamp getBuildFinishedOn() { - if (buildFinishedOnBuilder_ == null) { - return buildFinishedOn_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } else { - return buildFinishedOnBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder setBuildFinishedOn(com.google.protobuf.Timestamp value) { - if (buildFinishedOnBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - buildFinishedOn_ = value; - } else { - buildFinishedOnBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder setBuildFinishedOn( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (buildFinishedOnBuilder_ == null) { - buildFinishedOn_ = builderForValue.build(); - } else { - buildFinishedOnBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder mergeBuildFinishedOn(com.google.protobuf.Timestamp value) { - if (buildFinishedOnBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - buildFinishedOn_ != null && - buildFinishedOn_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getBuildFinishedOnBuilder().mergeFrom(value); - } else { - buildFinishedOn_ = value; - } - } else { - buildFinishedOnBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public Builder clearBuildFinishedOn() { - bitField0_ = (bitField0_ & ~0x00000004); - buildFinishedOn_ = null; - if (buildFinishedOnBuilder_ != null) { - buildFinishedOnBuilder_.dispose(); - buildFinishedOnBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public com.google.protobuf.Timestamp.Builder getBuildFinishedOnBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getBuildFinishedOnFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuilder() { - if (buildFinishedOnBuilder_ != null) { - return buildFinishedOnBuilder_.getMessageOrBuilder(); - } else { - return buildFinishedOn_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : buildFinishedOn_; - } - } - /** - * .google.protobuf.Timestamp build_finished_on = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getBuildFinishedOnFieldBuilder() { - if (buildFinishedOnBuilder_ == null) { - buildFinishedOnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getBuildFinishedOn(), - getParentForChildren(), - isClean()); - buildFinishedOn_ = null; - } - return buildFinishedOnBuilder_; - } - - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder> completenessBuilder_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @return Whether the completeness field is set. - */ - public boolean hasCompleteness() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @return The completeness. - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getCompleteness() { - if (completenessBuilder_ == null) { - return completeness_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; - } else { - return completenessBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - public Builder setCompleteness(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness value) { - if (completenessBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - completeness_ = value; - } else { - completenessBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - public Builder setCompleteness( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder builderForValue) { - if (completenessBuilder_ == null) { - completeness_ = builderForValue.build(); - } else { - completenessBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - public Builder mergeCompleteness(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness value) { - if (completenessBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - completeness_ != null && - completeness_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance()) { - getCompletenessBuilder().mergeFrom(value); - } else { - completeness_ = value; - } - } else { - completenessBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - public Builder clearCompleteness() { - bitField0_ = (bitField0_ & ~0x00000008); - completeness_ = null; - if (completenessBuilder_ != null) { - completenessBuilder_.dispose(); - completenessBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder getCompletenessBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCompletenessFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder getCompletenessOrBuilder() { - if (completenessBuilder_ != null) { - return completenessBuilder_.getMessageOrBuilder(); - } else { - return completeness_ == null ? - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance() : completeness_; - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder> - getCompletenessFieldBuilder() { - if (completenessBuilder_ == null) { - completenessBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder>( - getCompleteness(), - getParentForChildren(), - isClean()); - completeness_ = null; - } - return completenessBuilder_; - } - - private boolean reproducible_ ; - /** - * bool reproducible = 5; - * @return The reproducible. - */ - @java.lang.Override - public boolean getReproducible() { - return reproducible_; - } - /** - * bool reproducible = 5; - * @param value The reproducible to set. - * @return This builder for chaining. - */ - public Builder setReproducible(boolean value) { - - reproducible_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * bool reproducible = 5; - * @return This builder for chaining. - */ - public Builder clearReproducible() { - bitField0_ = (bitField0_ & ~0x00000010); - reproducible_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) - private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata(); - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SlsaCompletenessOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) - com.google.protobuf.MessageOrBuilder { - - /** - * bool parameters = 1; - * @return The parameters. - */ - boolean getParameters(); - - /** - * bool environment = 2; - * @return The environment. - */ - boolean getEnvironment(); - - /** - * bool materials = 3; - * @return The materials. - */ - boolean getMaterials(); - } - /** - *
-   * Indicates that the builder claims certain fields in this message to be
-   * complete.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness} - */ - public static final class SlsaCompleteness extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) - SlsaCompletenessOrBuilder { - private static final long serialVersionUID = 0L; - // Use SlsaCompleteness.newBuilder() to construct. - private SlsaCompleteness(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SlsaCompleteness() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SlsaCompleteness(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder.class); - } - - public static final int PARAMETERS_FIELD_NUMBER = 1; - private boolean parameters_ = false; - /** - * bool parameters = 1; - * @return The parameters. - */ - @java.lang.Override - public boolean getParameters() { - return parameters_; - } - - public static final int ENVIRONMENT_FIELD_NUMBER = 2; - private boolean environment_ = false; - /** - * bool environment = 2; - * @return The environment. - */ - @java.lang.Override - public boolean getEnvironment() { - return environment_; - } - - public static final int MATERIALS_FIELD_NUMBER = 3; - private boolean materials_ = false; - /** - * bool materials = 3; - * @return The materials. - */ - @java.lang.Override - public boolean getMaterials() { - return materials_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (parameters_ != false) { - output.writeBool(1, parameters_); - } - if (environment_ != false) { - output.writeBool(2, environment_); - } - if (materials_ != false) { - output.writeBool(3, materials_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (parameters_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, parameters_); - } - if (environment_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, environment_); - } - if (materials_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, materials_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness other = (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) obj; - - if (getParameters() - != other.getParameters()) return false; - if (getEnvironment() - != other.getEnvironment()) return false; - if (getMaterials() - != other.getMaterials()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getParameters()); - hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getEnvironment()); - hash = (37 * hash) + MATERIALS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getMaterials()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Indicates that the builder claims certain fields in this message to be
-     * complete.
-     * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompletenessOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.class, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parameters_ = false; - environment_ = false; - materials_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness build() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness buildPartial() { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness result = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parameters_ = parameters_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.environment_ = environment_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.materials_ = materials_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) { - return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness other) { - if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.getDefaultInstance()) return this; - if (other.getParameters() != false) { - setParameters(other.getParameters()); - } - if (other.getEnvironment() != false) { - setEnvironment(other.getEnvironment()); - } - if (other.getMaterials() != false) { - setMaterials(other.getMaterials()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - parameters_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - environment_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: { - materials_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private boolean parameters_ ; - /** - * bool parameters = 1; - * @return The parameters. - */ - @java.lang.Override - public boolean getParameters() { - return parameters_; - } - /** - * bool parameters = 1; - * @param value The parameters to set. - * @return This builder for chaining. - */ - public Builder setParameters(boolean value) { - - parameters_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bool parameters = 1; - * @return This builder for chaining. - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00000001); - parameters_ = false; - onChanged(); - return this; - } - - private boolean environment_ ; - /** - * bool environment = 2; - * @return The environment. - */ - @java.lang.Override - public boolean getEnvironment() { - return environment_; - } - /** - * bool environment = 2; - * @param value The environment to set. - * @return This builder for chaining. - */ - public Builder setEnvironment(boolean value) { - - environment_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * bool environment = 2; - * @return This builder for chaining. - */ - public Builder clearEnvironment() { - bitField0_ = (bitField0_ & ~0x00000002); - environment_ = false; - onChanged(); - return this; - } - - private boolean materials_ ; - /** - * bool materials = 3; - * @return The materials. - */ - @java.lang.Override - public boolean getMaterials() { - return materials_; - } - /** - * bool materials = 3; - * @param value The materials to set. - * @return This builder for chaining. - */ - public Builder setMaterials(boolean value) { - - materials_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * bool materials = 3; - * @return This builder for chaining. - */ - public Builder clearMaterials() { - bitField0_ = (bitField0_ & ~0x00000004); - materials_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) - private static final io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness(); - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaCompleteness parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int BUILDER_FIELD_NUMBER = 1; - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @return Whether the builder field is set. - */ - @java.lang.Override - public boolean hasBuilder() { - return builder_ != null; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @return The builder. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getBuilder() { - return builder_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder getBuilderOrBuilder() { - return builder_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; - } - - public static final int BUILD_TYPE_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object buildType_ = ""; - /** - * string build_type = 2; - * @return The buildType. - */ - @java.lang.Override - public java.lang.String getBuildType() { - java.lang.Object ref = buildType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildType_ = s; - return s; - } - } - /** - * string build_type = 2; - * @return The bytes for buildType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBuildTypeBytes() { - java.lang.Object ref = buildType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INVOCATION_FIELD_NUMBER = 3; - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @return Whether the invocation field is set. - */ - @java.lang.Override - public boolean hasInvocation() { - return invocation_ != null; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @return The invocation. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getInvocation() { - return invocation_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder getInvocationOrBuilder() { - return invocation_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; - } - - public static final int BUILD_CONFIG_FIELD_NUMBER = 4; - private com.google.protobuf.Struct buildConfig_; - /** - * .google.protobuf.Struct build_config = 4; - * @return Whether the buildConfig field is set. - */ - @java.lang.Override - public boolean hasBuildConfig() { - return buildConfig_ != null; - } - /** - * .google.protobuf.Struct build_config = 4; - * @return The buildConfig. - */ - @java.lang.Override - public com.google.protobuf.Struct getBuildConfig() { - return buildConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; - } - /** - * .google.protobuf.Struct build_config = 4; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getBuildConfigOrBuilder() { - return buildConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; - } - - public static final int METADATA_FIELD_NUMBER = 5; - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return metadata_ != null; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @return The metadata. - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getMetadata() { - return metadata_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; - } - - public static final int MATERIALS_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private java.util.List materials_; - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - @java.lang.Override - public java.util.List getMaterialsList() { - return materials_; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - @java.lang.Override - public java.util.List - getMaterialsOrBuilderList() { - return materials_; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - @java.lang.Override - public int getMaterialsCount() { - return materials_.size(); - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getMaterials(int index) { - return materials_.get(index); - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder getMaterialsOrBuilder( - int index) { - return materials_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (builder_ != null) { - output.writeMessage(1, getBuilder()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, buildType_); - } - if (invocation_ != null) { - output.writeMessage(3, getInvocation()); - } - if (buildConfig_ != null) { - output.writeMessage(4, getBuildConfig()); - } - if (metadata_ != null) { - output.writeMessage(5, getMetadata()); - } - for (int i = 0; i < materials_.size(); i++) { - output.writeMessage(6, materials_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (builder_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBuilder()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, buildType_); - } - if (invocation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getInvocation()); - } - if (buildConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getBuildConfig()); - } - if (metadata_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getMetadata()); - } - for (int i = 0; i < materials_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, materials_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SlsaProvenanceZeroTwo)) { - return super.equals(obj); - } - io.grafeas.v1.SlsaProvenanceZeroTwo other = (io.grafeas.v1.SlsaProvenanceZeroTwo) obj; - - if (hasBuilder() != other.hasBuilder()) return false; - if (hasBuilder()) { - if (!getBuilder() - .equals(other.getBuilder())) return false; - } - if (!getBuildType() - .equals(other.getBuildType())) return false; - if (hasInvocation() != other.hasInvocation()) return false; - if (hasInvocation()) { - if (!getInvocation() - .equals(other.getInvocation())) return false; - } - if (hasBuildConfig() != other.hasBuildConfig()) return false; - if (hasBuildConfig()) { - if (!getBuildConfig() - .equals(other.getBuildConfig())) return false; - } - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getMaterialsList() - .equals(other.getMaterialsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBuilder()) { - hash = (37 * hash) + BUILDER_FIELD_NUMBER; - hash = (53 * hash) + getBuilder().hashCode(); - } - hash = (37 * hash) + BUILD_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getBuildType().hashCode(); - if (hasInvocation()) { - hash = (37 * hash) + INVOCATION_FIELD_NUMBER; - hash = (53 * hash) + getInvocation().hashCode(); - } - if (hasBuildConfig()) { - hash = (37 * hash) + BUILD_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getBuildConfig().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - if (getMaterialsCount() > 0) { - hash = (37 * hash) + MATERIALS_FIELD_NUMBER; - hash = (53 * hash) + getMaterialsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SlsaProvenanceZeroTwo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * See full explanation of fields at slsa.dev/provenance/v0.2.
-   * 
- * - * Protobuf type {@code grafeas.v1.SlsaProvenanceZeroTwo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SlsaProvenanceZeroTwo) - io.grafeas.v1.SlsaProvenanceZeroTwoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SlsaProvenanceZeroTwo.class, io.grafeas.v1.SlsaProvenanceZeroTwo.Builder.class); - } - - // Construct using io.grafeas.v1.SlsaProvenanceZeroTwo.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - builder_ = null; - if (builderBuilder_ != null) { - builderBuilder_.dispose(); - builderBuilder_ = null; - } - buildType_ = ""; - invocation_ = null; - if (invocationBuilder_ != null) { - invocationBuilder_.dispose(); - invocationBuilder_ = null; - } - buildConfig_ = null; - if (buildConfigBuilder_ != null) { - buildConfigBuilder_.dispose(); - buildConfigBuilder_ = null; - } - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - if (materialsBuilder_ == null) { - materials_ = java.util.Collections.emptyList(); - } else { - materials_ = null; - materialsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwoProto.internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo getDefaultInstanceForType() { - return io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo build() { - io.grafeas.v1.SlsaProvenanceZeroTwo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo buildPartial() { - io.grafeas.v1.SlsaProvenanceZeroTwo result = new io.grafeas.v1.SlsaProvenanceZeroTwo(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.SlsaProvenanceZeroTwo result) { - if (materialsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - materials_ = java.util.Collections.unmodifiableList(materials_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.materials_ = materials_; - } else { - result.materials_ = materialsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.SlsaProvenanceZeroTwo result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.builder_ = builderBuilder_ == null - ? builder_ - : builderBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.buildType_ = buildType_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.invocation_ = invocationBuilder_ == null - ? invocation_ - : invocationBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.buildConfig_ = buildConfigBuilder_ == null - ? buildConfig_ - : buildConfigBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SlsaProvenanceZeroTwo) { - return mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SlsaProvenanceZeroTwo other) { - if (other == io.grafeas.v1.SlsaProvenanceZeroTwo.getDefaultInstance()) return this; - if (other.hasBuilder()) { - mergeBuilder(other.getBuilder()); - } - if (!other.getBuildType().isEmpty()) { - buildType_ = other.buildType_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasInvocation()) { - mergeInvocation(other.getInvocation()); - } - if (other.hasBuildConfig()) { - mergeBuildConfig(other.getBuildConfig()); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (materialsBuilder_ == null) { - if (!other.materials_.isEmpty()) { - if (materials_.isEmpty()) { - materials_ = other.materials_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureMaterialsIsMutable(); - materials_.addAll(other.materials_); - } - onChanged(); - } - } else { - if (!other.materials_.isEmpty()) { - if (materialsBuilder_.isEmpty()) { - materialsBuilder_.dispose(); - materialsBuilder_ = null; - materials_ = other.materials_; - bitField0_ = (bitField0_ & ~0x00000020); - materialsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getMaterialsFieldBuilder() : null; - } else { - materialsBuilder_.addAllMessages(other.materials_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getBuilderFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - buildType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getInvocationFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getBuildConfigFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial m = - input.readMessage( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.parser(), - extensionRegistry); - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.add(m); - } else { - materialsBuilder_.addMessage(m); - } - break; - } // case 50 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder> builderBuilder_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @return Whether the builder field is set. - */ - public boolean hasBuilder() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @return The builder. - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getBuilder() { - if (builderBuilder_ == null) { - return builder_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; - } else { - return builderBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - public Builder setBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder value) { - if (builderBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - builder_ = value; - } else { - builderBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - public Builder setBuilder( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder builderForValue) { - if (builderBuilder_ == null) { - builder_ = builderForValue.build(); - } else { - builderBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - public Builder mergeBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder value) { - if (builderBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - builder_ != null && - builder_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance()) { - getBuilderBuilder().mergeFrom(value); - } else { - builder_ = value; - } - } else { - builderBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - public Builder clearBuilder() { - bitField0_ = (bitField0_ & ~0x00000001); - builder_ = null; - if (builderBuilder_ != null) { - builderBuilder_.dispose(); - builderBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder getBuilderBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getBuilderFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder getBuilderOrBuilder() { - if (builderBuilder_ != null) { - return builderBuilder_.getMessageOrBuilder(); - } else { - return builder_ == null ? - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.getDefaultInstance() : builder_; - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder> - getBuilderFieldBuilder() { - if (builderBuilder_ == null) { - builderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder>( - getBuilder(), - getParentForChildren(), - isClean()); - builder_ = null; - } - return builderBuilder_; - } - - private java.lang.Object buildType_ = ""; - /** - * string build_type = 2; - * @return The buildType. - */ - public java.lang.String getBuildType() { - java.lang.Object ref = buildType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - buildType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string build_type = 2; - * @return The bytes for buildType. - */ - public com.google.protobuf.ByteString - getBuildTypeBytes() { - java.lang.Object ref = buildType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - buildType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string build_type = 2; - * @param value The buildType to set. - * @return This builder for chaining. - */ - public Builder setBuildType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - buildType_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string build_type = 2; - * @return This builder for chaining. - */ - public Builder clearBuildType() { - buildType_ = getDefaultInstance().getBuildType(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string build_type = 2; - * @param value The bytes for buildType to set. - * @return This builder for chaining. - */ - public Builder setBuildTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - buildType_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder> invocationBuilder_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @return Whether the invocation field is set. - */ - public boolean hasInvocation() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @return The invocation. - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getInvocation() { - if (invocationBuilder_ == null) { - return invocation_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; - } else { - return invocationBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - public Builder setInvocation(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation value) { - if (invocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - invocation_ = value; - } else { - invocationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - public Builder setInvocation( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder builderForValue) { - if (invocationBuilder_ == null) { - invocation_ = builderForValue.build(); - } else { - invocationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - public Builder mergeInvocation(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation value) { - if (invocationBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - invocation_ != null && - invocation_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance()) { - getInvocationBuilder().mergeFrom(value); - } else { - invocation_ = value; - } - } else { - invocationBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - public Builder clearInvocation() { - bitField0_ = (bitField0_ & ~0x00000004); - invocation_ = null; - if (invocationBuilder_ != null) { - invocationBuilder_.dispose(); - invocationBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder getInvocationBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getInvocationFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder getInvocationOrBuilder() { - if (invocationBuilder_ != null) { - return invocationBuilder_.getMessageOrBuilder(); - } else { - return invocation_ == null ? - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.getDefaultInstance() : invocation_; - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder> - getInvocationFieldBuilder() { - if (invocationBuilder_ == null) { - invocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder>( - getInvocation(), - getParentForChildren(), - isClean()); - invocation_ = null; - } - return invocationBuilder_; - } - - private com.google.protobuf.Struct buildConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> buildConfigBuilder_; - /** - * .google.protobuf.Struct build_config = 4; - * @return Whether the buildConfig field is set. - */ - public boolean hasBuildConfig() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * .google.protobuf.Struct build_config = 4; - * @return The buildConfig. - */ - public com.google.protobuf.Struct getBuildConfig() { - if (buildConfigBuilder_ == null) { - return buildConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; - } else { - return buildConfigBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Struct build_config = 4; - */ - public Builder setBuildConfig(com.google.protobuf.Struct value) { - if (buildConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - buildConfig_ = value; - } else { - buildConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct build_config = 4; - */ - public Builder setBuildConfig( - com.google.protobuf.Struct.Builder builderForValue) { - if (buildConfigBuilder_ == null) { - buildConfig_ = builderForValue.build(); - } else { - buildConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct build_config = 4; - */ - public Builder mergeBuildConfig(com.google.protobuf.Struct value) { - if (buildConfigBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - buildConfig_ != null && - buildConfig_ != com.google.protobuf.Struct.getDefaultInstance()) { - getBuildConfigBuilder().mergeFrom(value); - } else { - buildConfig_ = value; - } - } else { - buildConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct build_config = 4; - */ - public Builder clearBuildConfig() { - bitField0_ = (bitField0_ & ~0x00000008); - buildConfig_ = null; - if (buildConfigBuilder_ != null) { - buildConfigBuilder_.dispose(); - buildConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Struct build_config = 4; - */ - public com.google.protobuf.Struct.Builder getBuildConfigBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getBuildConfigFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Struct build_config = 4; - */ - public com.google.protobuf.StructOrBuilder getBuildConfigOrBuilder() { - if (buildConfigBuilder_ != null) { - return buildConfigBuilder_.getMessageOrBuilder(); - } else { - return buildConfig_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : buildConfig_; - } - } - /** - * .google.protobuf.Struct build_config = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getBuildConfigFieldBuilder() { - if (buildConfigBuilder_ == null) { - buildConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getBuildConfig(), - getParentForChildren(), - isClean()); - buildConfig_ = null; - } - return buildConfigBuilder_; - } - - private io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder> metadataBuilder_; - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @return The metadata. - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - public Builder setMetadata(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - public Builder setMetadata( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - public Builder mergeMetadata(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - metadata_ != null && - metadata_ != io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000010); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.getDefaultInstance() : metadata_; - } - } - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private java.util.List materials_ = - java.util.Collections.emptyList(); - private void ensureMaterialsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - materials_ = new java.util.ArrayList(materials_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder> materialsBuilder_; - - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public java.util.List getMaterialsList() { - if (materialsBuilder_ == null) { - return java.util.Collections.unmodifiableList(materials_); - } else { - return materialsBuilder_.getMessageList(); - } - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public int getMaterialsCount() { - if (materialsBuilder_ == null) { - return materials_.size(); - } else { - return materialsBuilder_.getCount(); - } - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getMaterials(int index) { - if (materialsBuilder_ == null) { - return materials_.get(index); - } else { - return materialsBuilder_.getMessage(index); - } - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder setMaterials( - int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial value) { - if (materialsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMaterialsIsMutable(); - materials_.set(index, value); - onChanged(); - } else { - materialsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder setMaterials( - int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder builderForValue) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.set(index, builderForValue.build()); - onChanged(); - } else { - materialsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder addMaterials(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial value) { - if (materialsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMaterialsIsMutable(); - materials_.add(value); - onChanged(); - } else { - materialsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder addMaterials( - int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial value) { - if (materialsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMaterialsIsMutable(); - materials_.add(index, value); - onChanged(); - } else { - materialsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder addMaterials( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder builderForValue) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.add(builderForValue.build()); - onChanged(); - } else { - materialsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder addMaterials( - int index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder builderForValue) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.add(index, builderForValue.build()); - onChanged(); - } else { - materialsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder addAllMaterials( - java.lang.Iterable values) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, materials_); - onChanged(); - } else { - materialsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder clearMaterials() { - if (materialsBuilder_ == null) { - materials_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - materialsBuilder_.clear(); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public Builder removeMaterials(int index) { - if (materialsBuilder_ == null) { - ensureMaterialsIsMutable(); - materials_.remove(index); - onChanged(); - } else { - materialsBuilder_.remove(index); - } - return this; - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder getMaterialsBuilder( - int index) { - return getMaterialsFieldBuilder().getBuilder(index); - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder getMaterialsOrBuilder( - int index) { - if (materialsBuilder_ == null) { - return materials_.get(index); } else { - return materialsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public java.util.List - getMaterialsOrBuilderList() { - if (materialsBuilder_ != null) { - return materialsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(materials_); - } - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder addMaterialsBuilder() { - return getMaterialsFieldBuilder().addBuilder( - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder addMaterialsBuilder( - int index) { - return getMaterialsFieldBuilder().addBuilder( - index, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.getDefaultInstance()); - } - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - public java.util.List - getMaterialsBuilderList() { - return getMaterialsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder> - getMaterialsFieldBuilder() { - if (materialsBuilder_ == null) { - materialsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.Builder, io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder>( - materials_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - materials_ = null; - } - return materialsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SlsaProvenanceZeroTwo) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SlsaProvenanceZeroTwo) - private static final io.grafeas.v1.SlsaProvenanceZeroTwo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SlsaProvenanceZeroTwo(); - } - - public static io.grafeas.v1.SlsaProvenanceZeroTwo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlsaProvenanceZeroTwo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SlsaProvenanceZeroTwo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java deleted file mode 100644 index 42e35172f0ca..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java +++ /dev/null @@ -1,105 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/slsa_provenance_zero_two.proto - -package io.grafeas.v1; - -public interface SlsaProvenanceZeroTwoOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SlsaProvenanceZeroTwo) - com.google.protobuf.MessageOrBuilder { - - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @return Whether the builder field is set. - */ - boolean hasBuilder(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @return The builder. - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder getBuilder(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilderOrBuilder getBuilderOrBuilder(); - - /** - * string build_type = 2; - * @return The buildType. - */ - java.lang.String getBuildType(); - /** - * string build_type = 2; - * @return The bytes for buildType. - */ - com.google.protobuf.ByteString - getBuildTypeBytes(); - - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @return Whether the invocation field is set. - */ - boolean hasInvocation(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @return The invocation. - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation getInvocation(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocationOrBuilder getInvocationOrBuilder(); - - /** - * .google.protobuf.Struct build_config = 4; - * @return Whether the buildConfig field is set. - */ - boolean hasBuildConfig(); - /** - * .google.protobuf.Struct build_config = 4; - * @return The buildConfig. - */ - com.google.protobuf.Struct getBuildConfig(); - /** - * .google.protobuf.Struct build_config = 4; - */ - com.google.protobuf.StructOrBuilder getBuildConfigOrBuilder(); - - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @return The metadata. - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata getMetadata(); - /** - * .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataOrBuilder getMetadataOrBuilder(); - - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - java.util.List - getMaterialsList(); - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial getMaterials(int index); - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - int getMaterialsCount(); - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - java.util.List - getMaterialsOrBuilderList(); - /** - * repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterialOrBuilder getMaterialsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java deleted file mode 100644 index eec7126b0270..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java +++ /dev/null @@ -1,174 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/slsa_provenance_zero_two.proto - -package io.grafeas.v1; - -public final class SlsaProvenanceZeroTwoProto { - private SlsaProvenanceZeroTwoProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n)grafeas/v1/slsa_provenance_zero_two.pr" + - "oto\022\ngrafeas.v1\032\034google/protobuf/struct." + - "proto\032\037google/protobuf/timestamp.proto\"\323" + - "\t\n\025SlsaProvenanceZeroTwo\022>\n\007builder\030\001 \001(" + - "\0132-.grafeas.v1.SlsaProvenanceZeroTwo.Sls" + - "aBuilder\022\022\n\nbuild_type\030\002 \001(\t\022D\n\ninvocati" + - "on\030\003 \001(\01320.grafeas.v1.SlsaProvenanceZero" + - "Two.SlsaInvocation\022-\n\014build_config\030\004 \001(\013" + - "2\027.google.protobuf.Struct\022@\n\010metadata\030\005 " + - "\001(\0132..grafeas.v1.SlsaProvenanceZeroTwo.S" + - "lsaMetadata\022A\n\tmaterials\030\006 \003(\0132..grafeas" + - ".v1.SlsaProvenanceZeroTwo.SlsaMaterial\032\031" + - "\n\013SlsaBuilder\022\n\n\002id\030\001 \001(\t\032\226\001\n\014SlsaMateri" + - "al\022\013\n\003uri\030\001 \001(\t\022J\n\006digest\030\002 \003(\0132:.grafea" + - "s.v1.SlsaProvenanceZeroTwo.SlsaMaterial." + - "DigestEntry\032-\n\013DigestEntry\022\013\n\003key\030\001 \001(\t\022" + - "\r\n\005value\030\002 \001(\t:\0028\001\032\266\001\n\016SlsaInvocation\022I\n" + - "\rconfig_source\030\001 \001(\01322.grafeas.v1.SlsaPr" + - "ovenanceZeroTwo.SlsaConfigSource\022+\n\npara" + - "meters\030\002 \001(\0132\027.google.protobuf.Struct\022,\n" + - "\013environment\030\003 \001(\0132\027.google.protobuf.Str" + - "uct\032\263\001\n\020SlsaConfigSource\022\013\n\003uri\030\001 \001(\t\022N\n" + - "\006digest\030\002 \003(\0132>.grafeas.v1.SlsaProvenanc" + - "eZeroTwo.SlsaConfigSource.DigestEntry\022\023\n" + - "\013entry_point\030\003 \001(\t\032-\n\013DigestEntry\022\013\n\003key" + - "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032\370\001\n\014SlsaMetada" + - "ta\022\033\n\023build_invocation_id\030\001 \001(\t\0224\n\020build" + - "_started_on\030\002 \001(\0132\032.google.protobuf.Time" + - "stamp\0225\n\021build_finished_on\030\003 \001(\0132\032.googl" + - "e.protobuf.Timestamp\022H\n\014completeness\030\004 \001" + - "(\01322.grafeas.v1.SlsaProvenanceZeroTwo.Sl" + - "saCompleteness\022\024\n\014reproducible\030\005 \001(\010\032N\n\020" + - "SlsaCompleteness\022\022\n\nparameters\030\001 \001(\010\022\023\n\013" + - "environment\030\002 \001(\010\022\021\n\tmaterials\030\003 \001(\010Bm\n\r" + - "io.grafeas.v1B\032SlsaProvenanceZeroTwoProt" + - "oP\001Z8google.golang.org/genproto/googleap" + - "is/grafeas/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.StructProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor, - new java.lang.String[] { "Builder", "BuildType", "Invocation", "BuildConfig", "Metadata", "Materials", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaBuilder_descriptor, - new java.lang.String[] { "Id", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(1); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor, - new java.lang.String[] { "Uri", "Digest", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMaterial_DigestEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(2); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaInvocation_descriptor, - new java.lang.String[] { "ConfigSource", "Parameters", "Environment", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(3); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor, - new java.lang.String[] { "Uri", "Digest", "EntryPoint", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaConfigSource_DigestEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(4); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaMetadata_descriptor, - new java.lang.String[] { "BuildInvocationId", "BuildStartedOn", "BuildFinishedOn", "Completeness", "Reproducible", }); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor = - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_descriptor.getNestedTypes().get(5); - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_SlsaProvenanceZeroTwo_SlsaCompleteness_descriptor, - new java.lang.String[] { "Parameters", "Environment", "Materials", }); - com.google.protobuf.StructProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java deleted file mode 100644 index 17dcda68fad0..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Source.java +++ /dev/null @@ -1,1709 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * Source describes the location of the source used for the build.
- * 
- * - * Protobuf type {@code grafeas.v1.Source} - */ -public final class Source extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Source) - SourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use Source.newBuilder() to construct. - private Source(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Source() { - artifactStorageSourceUri_ = ""; - additionalContexts_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Source(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetFileHashes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Source.class, io.grafeas.v1.Source.Builder.class); - } - - public static final int ARTIFACT_STORAGE_SOURCE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object artifactStorageSourceUri_ = ""; - /** - *
-   * If provided, the input binary artifacts for the build came from this
-   * location.
-   * 
- * - * string artifact_storage_source_uri = 1; - * @return The artifactStorageSourceUri. - */ - @java.lang.Override - public java.lang.String getArtifactStorageSourceUri() { - java.lang.Object ref = artifactStorageSourceUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - artifactStorageSourceUri_ = s; - return s; - } - } - /** - *
-   * If provided, the input binary artifacts for the build came from this
-   * location.
-   * 
- * - * string artifact_storage_source_uri = 1; - * @return The bytes for artifactStorageSourceUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getArtifactStorageSourceUriBytes() { - java.lang.Object ref = artifactStorageSourceUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - artifactStorageSourceUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILE_HASHES_FIELD_NUMBER = 2; - private static final class FileHashesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, io.grafeas.v1.FileHashes> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_FileHashesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - io.grafeas.v1.FileHashes.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, io.grafeas.v1.FileHashes> fileHashes_; - private com.google.protobuf.MapField - internalGetFileHashes() { - if (fileHashes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - FileHashesDefaultEntryHolder.defaultEntry); - } - return fileHashes_; - } - public int getFileHashesCount() { - return internalGetFileHashes().getMap().size(); - } - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public boolean containsFileHashes( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetFileHashes().getMap().containsKey(key); - } - /** - * Use {@link #getFileHashesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getFileHashes() { - return getFileHashesMap(); - } - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public java.util.Map getFileHashesMap() { - return internalGetFileHashes().getMap(); - } - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public /* nullable */ -io.grafeas.v1.FileHashes getFileHashesOrDefault( - java.lang.String key, - /* nullable */ -io.grafeas.v1.FileHashes defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetFileHashes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public io.grafeas.v1.FileHashes getFileHashesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetFileHashes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int CONTEXT_FIELD_NUMBER = 3; - private io.grafeas.v1.SourceContext context_; - /** - *
-   * If provided, the source code used for the build came from this location.
-   * 
- * - * .grafeas.v1.SourceContext context = 3; - * @return Whether the context field is set. - */ - @java.lang.Override - public boolean hasContext() { - return context_ != null; - } - /** - *
-   * If provided, the source code used for the build came from this location.
-   * 
- * - * .grafeas.v1.SourceContext context = 3; - * @return The context. - */ - @java.lang.Override - public io.grafeas.v1.SourceContext getContext() { - return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_; - } - /** - *
-   * If provided, the source code used for the build came from this location.
-   * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - @java.lang.Override - public io.grafeas.v1.SourceContextOrBuilder getContextOrBuilder() { - return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_; - } - - public static final int ADDITIONAL_CONTEXTS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List additionalContexts_; - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - @java.lang.Override - public java.util.List getAdditionalContextsList() { - return additionalContexts_; - } - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - @java.lang.Override - public java.util.List - getAdditionalContextsOrBuilderList() { - return additionalContexts_; - } - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - @java.lang.Override - public int getAdditionalContextsCount() { - return additionalContexts_.size(); - } - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - @java.lang.Override - public io.grafeas.v1.SourceContext getAdditionalContexts(int index) { - return additionalContexts_.get(index); - } - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - @java.lang.Override - public io.grafeas.v1.SourceContextOrBuilder getAdditionalContextsOrBuilder( - int index) { - return additionalContexts_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorageSourceUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, artifactStorageSourceUri_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetFileHashes(), - FileHashesDefaultEntryHolder.defaultEntry, - 2); - if (context_ != null) { - output.writeMessage(3, getContext()); - } - for (int i = 0; i < additionalContexts_.size(); i++) { - output.writeMessage(4, additionalContexts_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorageSourceUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, artifactStorageSourceUri_); - } - for (java.util.Map.Entry entry - : internalGetFileHashes().getMap().entrySet()) { - com.google.protobuf.MapEntry - fileHashes__ = FileHashesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, fileHashes__); - } - if (context_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getContext()); - } - for (int i = 0; i < additionalContexts_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, additionalContexts_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Source)) { - return super.equals(obj); - } - io.grafeas.v1.Source other = (io.grafeas.v1.Source) obj; - - if (!getArtifactStorageSourceUri() - .equals(other.getArtifactStorageSourceUri())) return false; - if (!internalGetFileHashes().equals( - other.internalGetFileHashes())) return false; - if (hasContext() != other.hasContext()) return false; - if (hasContext()) { - if (!getContext() - .equals(other.getContext())) return false; - } - if (!getAdditionalContextsList() - .equals(other.getAdditionalContextsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ARTIFACT_STORAGE_SOURCE_URI_FIELD_NUMBER; - hash = (53 * hash) + getArtifactStorageSourceUri().hashCode(); - if (!internalGetFileHashes().getMap().isEmpty()) { - hash = (37 * hash) + FILE_HASHES_FIELD_NUMBER; - hash = (53 * hash) + internalGetFileHashes().hashCode(); - } - if (hasContext()) { - hash = (37 * hash) + CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getContext().hashCode(); - } - if (getAdditionalContextsCount() > 0) { - hash = (37 * hash) + ADDITIONAL_CONTEXTS_FIELD_NUMBER; - hash = (53 * hash) + getAdditionalContextsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Source parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Source parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Source parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Source parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Source parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Source parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Source parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Source parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Source parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Source parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Source parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Source parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Source prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Source describes the location of the source used for the build.
-   * 
- * - * Protobuf type {@code grafeas.v1.Source} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Source) - io.grafeas.v1.SourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetFileHashes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableFileHashes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Source.class, io.grafeas.v1.Source.Builder.class); - } - - // Construct using io.grafeas.v1.Source.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - artifactStorageSourceUri_ = ""; - internalGetMutableFileHashes().clear(); - context_ = null; - if (contextBuilder_ != null) { - contextBuilder_.dispose(); - contextBuilder_ = null; - } - if (additionalContextsBuilder_ == null) { - additionalContexts_ = java.util.Collections.emptyList(); - } else { - additionalContexts_ = null; - additionalContextsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Source getDefaultInstanceForType() { - return io.grafeas.v1.Source.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Source build() { - io.grafeas.v1.Source result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Source buildPartial() { - io.grafeas.v1.Source result = new io.grafeas.v1.Source(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.Source result) { - if (additionalContextsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - additionalContexts_ = java.util.Collections.unmodifiableList(additionalContexts_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.additionalContexts_ = additionalContexts_; - } else { - result.additionalContexts_ = additionalContextsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.Source result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.artifactStorageSourceUri_ = artifactStorageSourceUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.fileHashes_ = internalGetFileHashes(); - result.fileHashes_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.context_ = contextBuilder_ == null - ? context_ - : contextBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Source) { - return mergeFrom((io.grafeas.v1.Source)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Source other) { - if (other == io.grafeas.v1.Source.getDefaultInstance()) return this; - if (!other.getArtifactStorageSourceUri().isEmpty()) { - artifactStorageSourceUri_ = other.artifactStorageSourceUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableFileHashes().mergeFrom( - other.internalGetFileHashes()); - bitField0_ |= 0x00000002; - if (other.hasContext()) { - mergeContext(other.getContext()); - } - if (additionalContextsBuilder_ == null) { - if (!other.additionalContexts_.isEmpty()) { - if (additionalContexts_.isEmpty()) { - additionalContexts_ = other.additionalContexts_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAdditionalContextsIsMutable(); - additionalContexts_.addAll(other.additionalContexts_); - } - onChanged(); - } - } else { - if (!other.additionalContexts_.isEmpty()) { - if (additionalContextsBuilder_.isEmpty()) { - additionalContextsBuilder_.dispose(); - additionalContextsBuilder_ = null; - additionalContexts_ = other.additionalContexts_; - bitField0_ = (bitField0_ & ~0x00000008); - additionalContextsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAdditionalContextsFieldBuilder() : null; - } else { - additionalContextsBuilder_.addAllMessages(other.additionalContexts_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - artifactStorageSourceUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - com.google.protobuf.MapEntry - fileHashes__ = input.readMessage( - FileHashesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableFileHashes().getMutableMap().put( - fileHashes__.getKey(), fileHashes__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getContextFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - io.grafeas.v1.SourceContext m = - input.readMessage( - io.grafeas.v1.SourceContext.parser(), - extensionRegistry); - if (additionalContextsBuilder_ == null) { - ensureAdditionalContextsIsMutable(); - additionalContexts_.add(m); - } else { - additionalContextsBuilder_.addMessage(m); - } - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object artifactStorageSourceUri_ = ""; - /** - *
-     * If provided, the input binary artifacts for the build came from this
-     * location.
-     * 
- * - * string artifact_storage_source_uri = 1; - * @return The artifactStorageSourceUri. - */ - public java.lang.String getArtifactStorageSourceUri() { - java.lang.Object ref = artifactStorageSourceUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - artifactStorageSourceUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * If provided, the input binary artifacts for the build came from this
-     * location.
-     * 
- * - * string artifact_storage_source_uri = 1; - * @return The bytes for artifactStorageSourceUri. - */ - public com.google.protobuf.ByteString - getArtifactStorageSourceUriBytes() { - java.lang.Object ref = artifactStorageSourceUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - artifactStorageSourceUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * If provided, the input binary artifacts for the build came from this
-     * location.
-     * 
- * - * string artifact_storage_source_uri = 1; - * @param value The artifactStorageSourceUri to set. - * @return This builder for chaining. - */ - public Builder setArtifactStorageSourceUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - artifactStorageSourceUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * If provided, the input binary artifacts for the build came from this
-     * location.
-     * 
- * - * string artifact_storage_source_uri = 1; - * @return This builder for chaining. - */ - public Builder clearArtifactStorageSourceUri() { - artifactStorageSourceUri_ = getDefaultInstance().getArtifactStorageSourceUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * If provided, the input binary artifacts for the build came from this
-     * location.
-     * 
- * - * string artifact_storage_source_uri = 1; - * @param value The bytes for artifactStorageSourceUri to set. - * @return This builder for chaining. - */ - public Builder setArtifactStorageSourceUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - artifactStorageSourceUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, io.grafeas.v1.FileHashes> fileHashes_; - private com.google.protobuf.MapField - internalGetFileHashes() { - if (fileHashes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - FileHashesDefaultEntryHolder.defaultEntry); - } - return fileHashes_; - } - private com.google.protobuf.MapField - internalGetMutableFileHashes() { - if (fileHashes_ == null) { - fileHashes_ = com.google.protobuf.MapField.newMapField( - FileHashesDefaultEntryHolder.defaultEntry); - } - if (!fileHashes_.isMutable()) { - fileHashes_ = fileHashes_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return fileHashes_; - } - public int getFileHashesCount() { - return internalGetFileHashes().getMap().size(); - } - /** - *
-     * Hash(es) of the build source, which can be used to verify that the original
-     * source integrity was maintained in the build.
-     * The keys to this map are file paths used as build source and the values
-     * contain the hash values for those files.
-     * If the build source came in a single package such as a gzipped tarfile
-     * (.tar.gz), the FileHash will be for the single path to that file.
-     * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public boolean containsFileHashes( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetFileHashes().getMap().containsKey(key); - } - /** - * Use {@link #getFileHashesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getFileHashes() { - return getFileHashesMap(); - } - /** - *
-     * Hash(es) of the build source, which can be used to verify that the original
-     * source integrity was maintained in the build.
-     * The keys to this map are file paths used as build source and the values
-     * contain the hash values for those files.
-     * If the build source came in a single package such as a gzipped tarfile
-     * (.tar.gz), the FileHash will be for the single path to that file.
-     * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public java.util.Map getFileHashesMap() { - return internalGetFileHashes().getMap(); - } - /** - *
-     * Hash(es) of the build source, which can be used to verify that the original
-     * source integrity was maintained in the build.
-     * The keys to this map are file paths used as build source and the values
-     * contain the hash values for those files.
-     * If the build source came in a single package such as a gzipped tarfile
-     * (.tar.gz), the FileHash will be for the single path to that file.
-     * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public /* nullable */ -io.grafeas.v1.FileHashes getFileHashesOrDefault( - java.lang.String key, - /* nullable */ -io.grafeas.v1.FileHashes defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetFileHashes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Hash(es) of the build source, which can be used to verify that the original
-     * source integrity was maintained in the build.
-     * The keys to this map are file paths used as build source and the values
-     * contain the hash values for those files.
-     * If the build source came in a single package such as a gzipped tarfile
-     * (.tar.gz), the FileHash will be for the single path to that file.
-     * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - @java.lang.Override - public io.grafeas.v1.FileHashes getFileHashesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetFileHashes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearFileHashes() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableFileHashes().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Hash(es) of the build source, which can be used to verify that the original
-     * source integrity was maintained in the build.
-     * The keys to this map are file paths used as build source and the values
-     * contain the hash values for those files.
-     * If the build source came in a single package such as a gzipped tarfile
-     * (.tar.gz), the FileHash will be for the single path to that file.
-     * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - public Builder removeFileHashes( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableFileHashes().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableFileHashes() { - bitField0_ |= 0x00000002; - return internalGetMutableFileHashes().getMutableMap(); - } - /** - *
-     * Hash(es) of the build source, which can be used to verify that the original
-     * source integrity was maintained in the build.
-     * The keys to this map are file paths used as build source and the values
-     * contain the hash values for those files.
-     * If the build source came in a single package such as a gzipped tarfile
-     * (.tar.gz), the FileHash will be for the single path to that file.
-     * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - public Builder putFileHashes( - java.lang.String key, - io.grafeas.v1.FileHashes value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableFileHashes().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - *
-     * Hash(es) of the build source, which can be used to verify that the original
-     * source integrity was maintained in the build.
-     * The keys to this map are file paths used as build source and the values
-     * contain the hash values for those files.
-     * If the build source came in a single package such as a gzipped tarfile
-     * (.tar.gz), the FileHash will be for the single path to that file.
-     * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - public Builder putAllFileHashes( - java.util.Map values) { - internalGetMutableFileHashes().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000002; - return this; - } - - private io.grafeas.v1.SourceContext context_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> contextBuilder_; - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - * @return Whether the context field is set. - */ - public boolean hasContext() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - * @return The context. - */ - public io.grafeas.v1.SourceContext getContext() { - if (contextBuilder_ == null) { - return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_; - } else { - return contextBuilder_.getMessage(); - } - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - public Builder setContext(io.grafeas.v1.SourceContext value) { - if (contextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - } else { - contextBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - public Builder setContext( - io.grafeas.v1.SourceContext.Builder builderForValue) { - if (contextBuilder_ == null) { - context_ = builderForValue.build(); - } else { - contextBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - public Builder mergeContext(io.grafeas.v1.SourceContext value) { - if (contextBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - context_ != null && - context_ != io.grafeas.v1.SourceContext.getDefaultInstance()) { - getContextBuilder().mergeFrom(value); - } else { - context_ = value; - } - } else { - contextBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - public Builder clearContext() { - bitField0_ = (bitField0_ & ~0x00000004); - context_ = null; - if (contextBuilder_ != null) { - contextBuilder_.dispose(); - contextBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - public io.grafeas.v1.SourceContext.Builder getContextBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getContextFieldBuilder().getBuilder(); - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - public io.grafeas.v1.SourceContextOrBuilder getContextOrBuilder() { - if (contextBuilder_ != null) { - return contextBuilder_.getMessageOrBuilder(); - } else { - return context_ == null ? - io.grafeas.v1.SourceContext.getDefaultInstance() : context_; - } - } - /** - *
-     * If provided, the source code used for the build came from this location.
-     * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> - getContextFieldBuilder() { - if (contextBuilder_ == null) { - contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder>( - getContext(), - getParentForChildren(), - isClean()); - context_ = null; - } - return contextBuilder_; - } - - private java.util.List additionalContexts_ = - java.util.Collections.emptyList(); - private void ensureAdditionalContextsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - additionalContexts_ = new java.util.ArrayList(additionalContexts_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> additionalContextsBuilder_; - - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public java.util.List getAdditionalContextsList() { - if (additionalContextsBuilder_ == null) { - return java.util.Collections.unmodifiableList(additionalContexts_); - } else { - return additionalContextsBuilder_.getMessageList(); - } - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public int getAdditionalContextsCount() { - if (additionalContextsBuilder_ == null) { - return additionalContexts_.size(); - } else { - return additionalContextsBuilder_.getCount(); - } - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public io.grafeas.v1.SourceContext getAdditionalContexts(int index) { - if (additionalContextsBuilder_ == null) { - return additionalContexts_.get(index); - } else { - return additionalContextsBuilder_.getMessage(index); - } - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder setAdditionalContexts( - int index, io.grafeas.v1.SourceContext value) { - if (additionalContextsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdditionalContextsIsMutable(); - additionalContexts_.set(index, value); - onChanged(); - } else { - additionalContextsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder setAdditionalContexts( - int index, io.grafeas.v1.SourceContext.Builder builderForValue) { - if (additionalContextsBuilder_ == null) { - ensureAdditionalContextsIsMutable(); - additionalContexts_.set(index, builderForValue.build()); - onChanged(); - } else { - additionalContextsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder addAdditionalContexts(io.grafeas.v1.SourceContext value) { - if (additionalContextsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdditionalContextsIsMutable(); - additionalContexts_.add(value); - onChanged(); - } else { - additionalContextsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder addAdditionalContexts( - int index, io.grafeas.v1.SourceContext value) { - if (additionalContextsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdditionalContextsIsMutable(); - additionalContexts_.add(index, value); - onChanged(); - } else { - additionalContextsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder addAdditionalContexts( - io.grafeas.v1.SourceContext.Builder builderForValue) { - if (additionalContextsBuilder_ == null) { - ensureAdditionalContextsIsMutable(); - additionalContexts_.add(builderForValue.build()); - onChanged(); - } else { - additionalContextsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder addAdditionalContexts( - int index, io.grafeas.v1.SourceContext.Builder builderForValue) { - if (additionalContextsBuilder_ == null) { - ensureAdditionalContextsIsMutable(); - additionalContexts_.add(index, builderForValue.build()); - onChanged(); - } else { - additionalContextsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder addAllAdditionalContexts( - java.lang.Iterable values) { - if (additionalContextsBuilder_ == null) { - ensureAdditionalContextsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, additionalContexts_); - onChanged(); - } else { - additionalContextsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder clearAdditionalContexts() { - if (additionalContextsBuilder_ == null) { - additionalContexts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - additionalContextsBuilder_.clear(); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public Builder removeAdditionalContexts(int index) { - if (additionalContextsBuilder_ == null) { - ensureAdditionalContextsIsMutable(); - additionalContexts_.remove(index); - onChanged(); - } else { - additionalContextsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public io.grafeas.v1.SourceContext.Builder getAdditionalContextsBuilder( - int index) { - return getAdditionalContextsFieldBuilder().getBuilder(index); - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public io.grafeas.v1.SourceContextOrBuilder getAdditionalContextsOrBuilder( - int index) { - if (additionalContextsBuilder_ == null) { - return additionalContexts_.get(index); } else { - return additionalContextsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public java.util.List - getAdditionalContextsOrBuilderList() { - if (additionalContextsBuilder_ != null) { - return additionalContextsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(additionalContexts_); - } - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public io.grafeas.v1.SourceContext.Builder addAdditionalContextsBuilder() { - return getAdditionalContextsFieldBuilder().addBuilder( - io.grafeas.v1.SourceContext.getDefaultInstance()); - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public io.grafeas.v1.SourceContext.Builder addAdditionalContextsBuilder( - int index) { - return getAdditionalContextsFieldBuilder().addBuilder( - index, io.grafeas.v1.SourceContext.getDefaultInstance()); - } - /** - *
-     * If provided, some of the source code used for the build may be found in
-     * these locations, in the case where the source repository had multiple
-     * remotes or submodules. This list will not include the context specified in
-     * the context field.
-     * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - public java.util.List - getAdditionalContextsBuilderList() { - return getAdditionalContextsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder> - getAdditionalContextsFieldBuilder() { - if (additionalContextsBuilder_ == null) { - additionalContextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.SourceContext, io.grafeas.v1.SourceContext.Builder, io.grafeas.v1.SourceContextOrBuilder>( - additionalContexts_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - additionalContexts_ = null; - } - return additionalContextsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Source) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Source) - private static final io.grafeas.v1.Source DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Source(); - } - - public static io.grafeas.v1.Source getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Source parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Source getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java deleted file mode 100644 index bb5845b66bc9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContext.java +++ /dev/null @@ -1,1583 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -/** - *
- * A SourceContext is a reference to a tree of files. A SourceContext together
- * with a path point to a unique revision of a single file or directory.
- * 
- * - * Protobuf type {@code grafeas.v1.SourceContext} - */ -public final class SourceContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.SourceContext) - SourceContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use SourceContext.newBuilder() to construct. - private SourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SourceContext() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SourceContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SourceContext.class, io.grafeas.v1.SourceContext.Builder.class); - } - - private int contextCase_ = 0; - private java.lang.Object context_; - public enum ContextCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CLOUD_REPO(1), - GERRIT(2), - GIT(3), - CONTEXT_NOT_SET(0); - private final int value; - private ContextCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ContextCase valueOf(int value) { - return forNumber(value); - } - - public static ContextCase forNumber(int value) { - switch (value) { - case 1: return CLOUD_REPO; - case 2: return GERRIT; - case 3: return GIT; - case 0: return CONTEXT_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ContextCase - getContextCase() { - return ContextCase.forNumber( - contextCase_); - } - - public static final int CLOUD_REPO_FIELD_NUMBER = 1; - /** - *
-   * A SourceContext referring to a revision in a Google Cloud Source Repo.
-   * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @return Whether the cloudRepo field is set. - */ - @java.lang.Override - public boolean hasCloudRepo() { - return contextCase_ == 1; - } - /** - *
-   * A SourceContext referring to a revision in a Google Cloud Source Repo.
-   * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @return The cloudRepo. - */ - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContext getCloudRepo() { - if (contextCase_ == 1) { - return (io.grafeas.v1.CloudRepoSourceContext) context_; - } - return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); - } - /** - *
-   * A SourceContext referring to a revision in a Google Cloud Source Repo.
-   * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder() { - if (contextCase_ == 1) { - return (io.grafeas.v1.CloudRepoSourceContext) context_; - } - return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); - } - - public static final int GERRIT_FIELD_NUMBER = 2; - /** - *
-   * A SourceContext referring to a Gerrit project.
-   * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - * @return Whether the gerrit field is set. - */ - @java.lang.Override - public boolean hasGerrit() { - return contextCase_ == 2; - } - /** - *
-   * A SourceContext referring to a Gerrit project.
-   * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - * @return The gerrit. - */ - @java.lang.Override - public io.grafeas.v1.GerritSourceContext getGerrit() { - if (contextCase_ == 2) { - return (io.grafeas.v1.GerritSourceContext) context_; - } - return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); - } - /** - *
-   * A SourceContext referring to a Gerrit project.
-   * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - @java.lang.Override - public io.grafeas.v1.GerritSourceContextOrBuilder getGerritOrBuilder() { - if (contextCase_ == 2) { - return (io.grafeas.v1.GerritSourceContext) context_; - } - return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); - } - - public static final int GIT_FIELD_NUMBER = 3; - /** - *
-   * A SourceContext referring to any third party Git repo (e.g., GitHub).
-   * 
- * - * .grafeas.v1.GitSourceContext git = 3; - * @return Whether the git field is set. - */ - @java.lang.Override - public boolean hasGit() { - return contextCase_ == 3; - } - /** - *
-   * A SourceContext referring to any third party Git repo (e.g., GitHub).
-   * 
- * - * .grafeas.v1.GitSourceContext git = 3; - * @return The git. - */ - @java.lang.Override - public io.grafeas.v1.GitSourceContext getGit() { - if (contextCase_ == 3) { - return (io.grafeas.v1.GitSourceContext) context_; - } - return io.grafeas.v1.GitSourceContext.getDefaultInstance(); - } - /** - *
-   * A SourceContext referring to any third party Git repo (e.g., GitHub).
-   * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - @java.lang.Override - public io.grafeas.v1.GitSourceContextOrBuilder getGitOrBuilder() { - if (contextCase_ == 3) { - return (io.grafeas.v1.GitSourceContext) context_; - } - return io.grafeas.v1.GitSourceContext.getDefaultInstance(); - } - - public static final int LABELS_FIELD_NUMBER = 4; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextCase_ == 1) { - output.writeMessage(1, (io.grafeas.v1.CloudRepoSourceContext) context_); - } - if (contextCase_ == 2) { - output.writeMessage(2, (io.grafeas.v1.GerritSourceContext) context_); - } - if (contextCase_ == 3) { - output.writeMessage(3, (io.grafeas.v1.GitSourceContext) context_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 4); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (io.grafeas.v1.CloudRepoSourceContext) context_); - } - if (contextCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (io.grafeas.v1.GerritSourceContext) context_); - } - if (contextCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (io.grafeas.v1.GitSourceContext) context_); - } - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, labels__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.SourceContext)) { - return super.equals(obj); - } - io.grafeas.v1.SourceContext other = (io.grafeas.v1.SourceContext) obj; - - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (!getContextCase().equals(other.getContextCase())) return false; - switch (contextCase_) { - case 1: - if (!getCloudRepo() - .equals(other.getCloudRepo())) return false; - break; - case 2: - if (!getGerrit() - .equals(other.getGerrit())) return false; - break; - case 3: - if (!getGit() - .equals(other.getGit())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - switch (contextCase_) { - case 1: - hash = (37 * hash) + CLOUD_REPO_FIELD_NUMBER; - hash = (53 * hash) + getCloudRepo().hashCode(); - break; - case 2: - hash = (37 * hash) + GERRIT_FIELD_NUMBER; - hash = (53 * hash) + getGerrit().hashCode(); - break; - case 3: - hash = (37 * hash) + GIT_FIELD_NUMBER; - hash = (53 * hash) + getGit().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.SourceContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SourceContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SourceContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SourceContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SourceContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.SourceContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.SourceContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SourceContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SourceContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.SourceContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.SourceContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.SourceContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.SourceContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A SourceContext is a reference to a tree of files. A SourceContext together
-   * with a path point to a unique revision of a single file or directory.
-   * 
- * - * Protobuf type {@code grafeas.v1.SourceContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.SourceContext) - io.grafeas.v1.SourceContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 4: - return internalGetMutableLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.SourceContext.class, io.grafeas.v1.SourceContext.Builder.class); - } - - // Construct using io.grafeas.v1.SourceContext.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (cloudRepoBuilder_ != null) { - cloudRepoBuilder_.clear(); - } - if (gerritBuilder_ != null) { - gerritBuilder_.clear(); - } - if (gitBuilder_ != null) { - gitBuilder_.clear(); - } - internalGetMutableLabels().clear(); - contextCase_ = 0; - context_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.SourceContext getDefaultInstanceForType() { - return io.grafeas.v1.SourceContext.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.SourceContext build() { - io.grafeas.v1.SourceContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.SourceContext buildPartial() { - io.grafeas.v1.SourceContext result = new io.grafeas.v1.SourceContext(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.SourceContext result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - } - - private void buildPartialOneofs(io.grafeas.v1.SourceContext result) { - result.contextCase_ = contextCase_; - result.context_ = this.context_; - if (contextCase_ == 1 && - cloudRepoBuilder_ != null) { - result.context_ = cloudRepoBuilder_.build(); - } - if (contextCase_ == 2 && - gerritBuilder_ != null) { - result.context_ = gerritBuilder_.build(); - } - if (contextCase_ == 3 && - gitBuilder_ != null) { - result.context_ = gitBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.SourceContext) { - return mergeFrom((io.grafeas.v1.SourceContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.SourceContext other) { - if (other == io.grafeas.v1.SourceContext.getDefaultInstance()) return this; - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - bitField0_ |= 0x00000008; - switch (other.getContextCase()) { - case CLOUD_REPO: { - mergeCloudRepo(other.getCloudRepo()); - break; - } - case GERRIT: { - mergeGerrit(other.getGerrit()); - break; - } - case GIT: { - mergeGit(other.getGit()); - break; - } - case CONTEXT_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getCloudRepoFieldBuilder().getBuilder(), - extensionRegistry); - contextCase_ = 1; - break; - } // case 10 - case 18: { - input.readMessage( - getGerritFieldBuilder().getBuilder(), - extensionRegistry); - contextCase_ = 2; - break; - } // case 18 - case 26: { - input.readMessage( - getGitFieldBuilder().getBuilder(), - extensionRegistry); - contextCase_ = 3; - break; - } // case 26 - case 34: { - com.google.protobuf.MapEntry - labels__ = input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableLabels().getMutableMap().put( - labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int contextCase_ = 0; - private java.lang.Object context_; - public ContextCase - getContextCase() { - return ContextCase.forNumber( - contextCase_); - } - - public Builder clearContext() { - contextCase_ = 0; - context_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CloudRepoSourceContext, io.grafeas.v1.CloudRepoSourceContext.Builder, io.grafeas.v1.CloudRepoSourceContextOrBuilder> cloudRepoBuilder_; - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @return Whether the cloudRepo field is set. - */ - @java.lang.Override - public boolean hasCloudRepo() { - return contextCase_ == 1; - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @return The cloudRepo. - */ - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContext getCloudRepo() { - if (cloudRepoBuilder_ == null) { - if (contextCase_ == 1) { - return (io.grafeas.v1.CloudRepoSourceContext) context_; - } - return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); - } else { - if (contextCase_ == 1) { - return cloudRepoBuilder_.getMessage(); - } - return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); - } - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - public Builder setCloudRepo(io.grafeas.v1.CloudRepoSourceContext value) { - if (cloudRepoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - onChanged(); - } else { - cloudRepoBuilder_.setMessage(value); - } - contextCase_ = 1; - return this; - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - public Builder setCloudRepo( - io.grafeas.v1.CloudRepoSourceContext.Builder builderForValue) { - if (cloudRepoBuilder_ == null) { - context_ = builderForValue.build(); - onChanged(); - } else { - cloudRepoBuilder_.setMessage(builderForValue.build()); - } - contextCase_ = 1; - return this; - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - public Builder mergeCloudRepo(io.grafeas.v1.CloudRepoSourceContext value) { - if (cloudRepoBuilder_ == null) { - if (contextCase_ == 1 && - context_ != io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance()) { - context_ = io.grafeas.v1.CloudRepoSourceContext.newBuilder((io.grafeas.v1.CloudRepoSourceContext) context_) - .mergeFrom(value).buildPartial(); - } else { - context_ = value; - } - onChanged(); - } else { - if (contextCase_ == 1) { - cloudRepoBuilder_.mergeFrom(value); - } else { - cloudRepoBuilder_.setMessage(value); - } - } - contextCase_ = 1; - return this; - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - public Builder clearCloudRepo() { - if (cloudRepoBuilder_ == null) { - if (contextCase_ == 1) { - contextCase_ = 0; - context_ = null; - onChanged(); - } - } else { - if (contextCase_ == 1) { - contextCase_ = 0; - context_ = null; - } - cloudRepoBuilder_.clear(); - } - return this; - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - public io.grafeas.v1.CloudRepoSourceContext.Builder getCloudRepoBuilder() { - return getCloudRepoFieldBuilder().getBuilder(); - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - @java.lang.Override - public io.grafeas.v1.CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder() { - if ((contextCase_ == 1) && (cloudRepoBuilder_ != null)) { - return cloudRepoBuilder_.getMessageOrBuilder(); - } else { - if (contextCase_ == 1) { - return (io.grafeas.v1.CloudRepoSourceContext) context_; - } - return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); - } - } - /** - *
-     * A SourceContext referring to a revision in a Google Cloud Source Repo.
-     * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CloudRepoSourceContext, io.grafeas.v1.CloudRepoSourceContext.Builder, io.grafeas.v1.CloudRepoSourceContextOrBuilder> - getCloudRepoFieldBuilder() { - if (cloudRepoBuilder_ == null) { - if (!(contextCase_ == 1)) { - context_ = io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance(); - } - cloudRepoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CloudRepoSourceContext, io.grafeas.v1.CloudRepoSourceContext.Builder, io.grafeas.v1.CloudRepoSourceContextOrBuilder>( - (io.grafeas.v1.CloudRepoSourceContext) context_, - getParentForChildren(), - isClean()); - context_ = null; - } - contextCase_ = 1; - onChanged(); - return cloudRepoBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.GerritSourceContext, io.grafeas.v1.GerritSourceContext.Builder, io.grafeas.v1.GerritSourceContextOrBuilder> gerritBuilder_; - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - * @return Whether the gerrit field is set. - */ - @java.lang.Override - public boolean hasGerrit() { - return contextCase_ == 2; - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - * @return The gerrit. - */ - @java.lang.Override - public io.grafeas.v1.GerritSourceContext getGerrit() { - if (gerritBuilder_ == null) { - if (contextCase_ == 2) { - return (io.grafeas.v1.GerritSourceContext) context_; - } - return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); - } else { - if (contextCase_ == 2) { - return gerritBuilder_.getMessage(); - } - return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); - } - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - public Builder setGerrit(io.grafeas.v1.GerritSourceContext value) { - if (gerritBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - onChanged(); - } else { - gerritBuilder_.setMessage(value); - } - contextCase_ = 2; - return this; - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - public Builder setGerrit( - io.grafeas.v1.GerritSourceContext.Builder builderForValue) { - if (gerritBuilder_ == null) { - context_ = builderForValue.build(); - onChanged(); - } else { - gerritBuilder_.setMessage(builderForValue.build()); - } - contextCase_ = 2; - return this; - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - public Builder mergeGerrit(io.grafeas.v1.GerritSourceContext value) { - if (gerritBuilder_ == null) { - if (contextCase_ == 2 && - context_ != io.grafeas.v1.GerritSourceContext.getDefaultInstance()) { - context_ = io.grafeas.v1.GerritSourceContext.newBuilder((io.grafeas.v1.GerritSourceContext) context_) - .mergeFrom(value).buildPartial(); - } else { - context_ = value; - } - onChanged(); - } else { - if (contextCase_ == 2) { - gerritBuilder_.mergeFrom(value); - } else { - gerritBuilder_.setMessage(value); - } - } - contextCase_ = 2; - return this; - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - public Builder clearGerrit() { - if (gerritBuilder_ == null) { - if (contextCase_ == 2) { - contextCase_ = 0; - context_ = null; - onChanged(); - } - } else { - if (contextCase_ == 2) { - contextCase_ = 0; - context_ = null; - } - gerritBuilder_.clear(); - } - return this; - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - public io.grafeas.v1.GerritSourceContext.Builder getGerritBuilder() { - return getGerritFieldBuilder().getBuilder(); - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - @java.lang.Override - public io.grafeas.v1.GerritSourceContextOrBuilder getGerritOrBuilder() { - if ((contextCase_ == 2) && (gerritBuilder_ != null)) { - return gerritBuilder_.getMessageOrBuilder(); - } else { - if (contextCase_ == 2) { - return (io.grafeas.v1.GerritSourceContext) context_; - } - return io.grafeas.v1.GerritSourceContext.getDefaultInstance(); - } - } - /** - *
-     * A SourceContext referring to a Gerrit project.
-     * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.GerritSourceContext, io.grafeas.v1.GerritSourceContext.Builder, io.grafeas.v1.GerritSourceContextOrBuilder> - getGerritFieldBuilder() { - if (gerritBuilder_ == null) { - if (!(contextCase_ == 2)) { - context_ = io.grafeas.v1.GerritSourceContext.getDefaultInstance(); - } - gerritBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.GerritSourceContext, io.grafeas.v1.GerritSourceContext.Builder, io.grafeas.v1.GerritSourceContextOrBuilder>( - (io.grafeas.v1.GerritSourceContext) context_, - getParentForChildren(), - isClean()); - context_ = null; - } - contextCase_ = 2; - onChanged(); - return gerritBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.GitSourceContext, io.grafeas.v1.GitSourceContext.Builder, io.grafeas.v1.GitSourceContextOrBuilder> gitBuilder_; - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - * @return Whether the git field is set. - */ - @java.lang.Override - public boolean hasGit() { - return contextCase_ == 3; - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - * @return The git. - */ - @java.lang.Override - public io.grafeas.v1.GitSourceContext getGit() { - if (gitBuilder_ == null) { - if (contextCase_ == 3) { - return (io.grafeas.v1.GitSourceContext) context_; - } - return io.grafeas.v1.GitSourceContext.getDefaultInstance(); - } else { - if (contextCase_ == 3) { - return gitBuilder_.getMessage(); - } - return io.grafeas.v1.GitSourceContext.getDefaultInstance(); - } - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - public Builder setGit(io.grafeas.v1.GitSourceContext value) { - if (gitBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - onChanged(); - } else { - gitBuilder_.setMessage(value); - } - contextCase_ = 3; - return this; - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - public Builder setGit( - io.grafeas.v1.GitSourceContext.Builder builderForValue) { - if (gitBuilder_ == null) { - context_ = builderForValue.build(); - onChanged(); - } else { - gitBuilder_.setMessage(builderForValue.build()); - } - contextCase_ = 3; - return this; - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - public Builder mergeGit(io.grafeas.v1.GitSourceContext value) { - if (gitBuilder_ == null) { - if (contextCase_ == 3 && - context_ != io.grafeas.v1.GitSourceContext.getDefaultInstance()) { - context_ = io.grafeas.v1.GitSourceContext.newBuilder((io.grafeas.v1.GitSourceContext) context_) - .mergeFrom(value).buildPartial(); - } else { - context_ = value; - } - onChanged(); - } else { - if (contextCase_ == 3) { - gitBuilder_.mergeFrom(value); - } else { - gitBuilder_.setMessage(value); - } - } - contextCase_ = 3; - return this; - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - public Builder clearGit() { - if (gitBuilder_ == null) { - if (contextCase_ == 3) { - contextCase_ = 0; - context_ = null; - onChanged(); - } - } else { - if (contextCase_ == 3) { - contextCase_ = 0; - context_ = null; - } - gitBuilder_.clear(); - } - return this; - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - public io.grafeas.v1.GitSourceContext.Builder getGitBuilder() { - return getGitFieldBuilder().getBuilder(); - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - @java.lang.Override - public io.grafeas.v1.GitSourceContextOrBuilder getGitOrBuilder() { - if ((contextCase_ == 3) && (gitBuilder_ != null)) { - return gitBuilder_.getMessageOrBuilder(); - } else { - if (contextCase_ == 3) { - return (io.grafeas.v1.GitSourceContext) context_; - } - return io.grafeas.v1.GitSourceContext.getDefaultInstance(); - } - } - /** - *
-     * A SourceContext referring to any third party Git repo (e.g., GitHub).
-     * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.GitSourceContext, io.grafeas.v1.GitSourceContext.Builder, io.grafeas.v1.GitSourceContextOrBuilder> - getGitFieldBuilder() { - if (gitBuilder_ == null) { - if (!(contextCase_ == 3)) { - context_ = io.grafeas.v1.GitSourceContext.getDefaultInstance(); - } - gitBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.GitSourceContext, io.grafeas.v1.GitSourceContext.Builder, io.grafeas.v1.GitSourceContextOrBuilder>( - (io.grafeas.v1.GitSourceContext) context_, - getParentForChildren(), - isClean()); - context_ = null; - } - contextCase_ = 3; - onChanged(); - return gitBuilder_; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - bitField0_ |= 0x00000008; - onChanged(); - return labels_; - } - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-     * Labels with user defined metadata.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-     * Labels with user defined metadata.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * Labels with user defined metadata.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Labels with user defined metadata.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableLabels().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Labels with user defined metadata.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder removeLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableLabels().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableLabels() { - bitField0_ |= 0x00000008; - return internalGetMutableLabels().getMutableMap(); - } - /** - *
-     * Labels with user defined metadata.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putLabels( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableLabels().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000008; - return this; - } - /** - *
-     * Labels with user defined metadata.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000008; - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.SourceContext) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.SourceContext) - private static final io.grafeas.v1.SourceContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.SourceContext(); - } - - public static io.grafeas.v1.SourceContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SourceContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.SourceContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java deleted file mode 100644 index 3c735c2fd76a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceContextOrBuilder.java +++ /dev/null @@ -1,146 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface SourceContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.SourceContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A SourceContext referring to a revision in a Google Cloud Source Repo.
-   * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @return Whether the cloudRepo field is set. - */ - boolean hasCloudRepo(); - /** - *
-   * A SourceContext referring to a revision in a Google Cloud Source Repo.
-   * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @return The cloudRepo. - */ - io.grafeas.v1.CloudRepoSourceContext getCloudRepo(); - /** - *
-   * A SourceContext referring to a revision in a Google Cloud Source Repo.
-   * 
- * - * .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - */ - io.grafeas.v1.CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder(); - - /** - *
-   * A SourceContext referring to a Gerrit project.
-   * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - * @return Whether the gerrit field is set. - */ - boolean hasGerrit(); - /** - *
-   * A SourceContext referring to a Gerrit project.
-   * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - * @return The gerrit. - */ - io.grafeas.v1.GerritSourceContext getGerrit(); - /** - *
-   * A SourceContext referring to a Gerrit project.
-   * 
- * - * .grafeas.v1.GerritSourceContext gerrit = 2; - */ - io.grafeas.v1.GerritSourceContextOrBuilder getGerritOrBuilder(); - - /** - *
-   * A SourceContext referring to any third party Git repo (e.g., GitHub).
-   * 
- * - * .grafeas.v1.GitSourceContext git = 3; - * @return Whether the git field is set. - */ - boolean hasGit(); - /** - *
-   * A SourceContext referring to any third party Git repo (e.g., GitHub).
-   * 
- * - * .grafeas.v1.GitSourceContext git = 3; - * @return The git. - */ - io.grafeas.v1.GitSourceContext getGit(); - /** - *
-   * A SourceContext referring to any third party Git repo (e.g., GitHub).
-   * 
- * - * .grafeas.v1.GitSourceContext git = 3; - */ - io.grafeas.v1.GitSourceContextOrBuilder getGitOrBuilder(); - - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - int getLabelsCount(); - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Labels with user defined metadata.
-   * 
- * - * map<string, string> labels = 4; - */ - java.lang.String getLabelsOrThrow( - java.lang.String key); - - public io.grafeas.v1.SourceContext.ContextCase getContextCase(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java deleted file mode 100644 index 875eea1d4768..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SourceOrBuilder.java +++ /dev/null @@ -1,196 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/provenance.proto - -package io.grafeas.v1; - -public interface SourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Source) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If provided, the input binary artifacts for the build came from this
-   * location.
-   * 
- * - * string artifact_storage_source_uri = 1; - * @return The artifactStorageSourceUri. - */ - java.lang.String getArtifactStorageSourceUri(); - /** - *
-   * If provided, the input binary artifacts for the build came from this
-   * location.
-   * 
- * - * string artifact_storage_source_uri = 1; - * @return The bytes for artifactStorageSourceUri. - */ - com.google.protobuf.ByteString - getArtifactStorageSourceUriBytes(); - - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - int getFileHashesCount(); - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - boolean containsFileHashes( - java.lang.String key); - /** - * Use {@link #getFileHashesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getFileHashes(); - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - java.util.Map - getFileHashesMap(); - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - /* nullable */ -io.grafeas.v1.FileHashes getFileHashesOrDefault( - java.lang.String key, - /* nullable */ -io.grafeas.v1.FileHashes defaultValue); - /** - *
-   * Hash(es) of the build source, which can be used to verify that the original
-   * source integrity was maintained in the build.
-   * The keys to this map are file paths used as build source and the values
-   * contain the hash values for those files.
-   * If the build source came in a single package such as a gzipped tarfile
-   * (.tar.gz), the FileHash will be for the single path to that file.
-   * 
- * - * map<string, .grafeas.v1.FileHashes> file_hashes = 2; - */ - io.grafeas.v1.FileHashes getFileHashesOrThrow( - java.lang.String key); - - /** - *
-   * If provided, the source code used for the build came from this location.
-   * 
- * - * .grafeas.v1.SourceContext context = 3; - * @return Whether the context field is set. - */ - boolean hasContext(); - /** - *
-   * If provided, the source code used for the build came from this location.
-   * 
- * - * .grafeas.v1.SourceContext context = 3; - * @return The context. - */ - io.grafeas.v1.SourceContext getContext(); - /** - *
-   * If provided, the source code used for the build came from this location.
-   * 
- * - * .grafeas.v1.SourceContext context = 3; - */ - io.grafeas.v1.SourceContextOrBuilder getContextOrBuilder(); - - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - java.util.List - getAdditionalContextsList(); - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - io.grafeas.v1.SourceContext getAdditionalContexts(int index); - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - int getAdditionalContextsCount(); - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - java.util.List - getAdditionalContextsOrBuilderList(); - /** - *
-   * If provided, some of the source code used for the build may be found in
-   * these locations, in the case where the source repository had multiple
-   * remotes or submodules. This list will not include the context specified in
-   * the context field.
-   * 
- * - * repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - io.grafeas.v1.SourceContextOrBuilder getAdditionalContextsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java deleted file mode 100644 index b5d14fc26d97..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Subject.java +++ /dev/null @@ -1,900 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_statement.proto - -package io.grafeas.v1; - -/** - * Protobuf type {@code grafeas.v1.Subject} - */ -public final class Subject extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Subject) - SubjectOrBuilder { -private static final long serialVersionUID = 0L; - // Use Subject.newBuilder() to construct. - private Subject(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Subject() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Subject(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Subject.class, io.grafeas.v1.Subject.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DIGEST_FIELD_NUMBER = 2; - private static final class DigestDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_DigestEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetDigest(), - DigestDefaultEntryHolder.defaultEntry, - 2); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - for (java.util.Map.Entry entry - : internalGetDigest().getMap().entrySet()) { - com.google.protobuf.MapEntry - digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, digest__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Subject)) { - return super.equals(obj); - } - io.grafeas.v1.Subject other = (io.grafeas.v1.Subject) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!internalGetDigest().equals( - other.internalGetDigest())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (!internalGetDigest().getMap().isEmpty()) { - hash = (37 * hash) + DIGEST_FIELD_NUMBER; - hash = (53 * hash) + internalGetDigest().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Subject parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Subject parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Subject parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Subject parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Subject parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Subject parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Subject parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Subject parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Subject parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Subject parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Subject parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Subject parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Subject prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.Subject} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Subject) - io.grafeas.v1.SubjectOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableDigest(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Subject.class, io.grafeas.v1.Subject.Builder.class); - } - - // Construct using io.grafeas.v1.Subject.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - internalGetMutableDigest().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.InTotoStatementProto.internal_static_grafeas_v1_Subject_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Subject getDefaultInstanceForType() { - return io.grafeas.v1.Subject.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Subject build() { - io.grafeas.v1.Subject result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Subject buildPartial() { - io.grafeas.v1.Subject result = new io.grafeas.v1.Subject(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Subject result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.digest_ = internalGetDigest(); - result.digest_.makeImmutable(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Subject) { - return mergeFrom((io.grafeas.v1.Subject)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Subject other) { - if (other == io.grafeas.v1.Subject.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableDigest().mergeFrom( - other.internalGetDigest()); - bitField0_ |= 0x00000002; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - com.google.protobuf.MapEntry - digest__ = input.readMessage( - DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableDigest().getMutableMap().put( - digest__.getKey(), digest__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> digest_; - private com.google.protobuf.MapField - internalGetDigest() { - if (digest_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DigestDefaultEntryHolder.defaultEntry); - } - return digest_; - } - private com.google.protobuf.MapField - internalGetMutableDigest() { - if (digest_ == null) { - digest_ = com.google.protobuf.MapField.newMapField( - DigestDefaultEntryHolder.defaultEntry); - } - if (!digest_.isMutable()) { - digest_ = digest_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return digest_; - } - public int getDigestCount() { - return internalGetDigest().getMap().size(); - } - /** - *
-     * `"<ALGORITHM>": "<HEX_VALUE>"`
-     * Algorithms can be e.g. sha256, sha512
-     * See
-     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-     * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public boolean containsDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetDigest().getMap().containsKey(key); - } - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDigest() { - return getDigestMap(); - } - /** - *
-     * `"<ALGORITHM>": "<HEX_VALUE>"`
-     * Algorithms can be e.g. sha256, sha512
-     * See
-     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-     * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.util.Map getDigestMap() { - return internalGetDigest().getMap(); - } - /** - *
-     * `"<ALGORITHM>": "<HEX_VALUE>"`
-     * Algorithms can be e.g. sha256, sha512
-     * See
-     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-     * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * `"<ALGORITHM>": "<HEX_VALUE>"`
-     * Algorithms can be e.g. sha256, sha512
-     * See
-     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-     * 
- * - * map<string, string> digest = 2; - */ - @java.lang.Override - public java.lang.String getDigestOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetDigest().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearDigest() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableDigest().getMutableMap() - .clear(); - return this; - } - /** - *
-     * `"<ALGORITHM>": "<HEX_VALUE>"`
-     * Algorithms can be e.g. sha256, sha512
-     * See
-     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-     * 
- * - * map<string, string> digest = 2; - */ - public Builder removeDigest( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableDigest().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableDigest() { - bitField0_ |= 0x00000002; - return internalGetMutableDigest().getMutableMap(); - } - /** - *
-     * `"<ALGORITHM>": "<HEX_VALUE>"`
-     * Algorithms can be e.g. sha256, sha512
-     * See
-     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-     * 
- * - * map<string, string> digest = 2; - */ - public Builder putDigest( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableDigest().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - *
-     * `"<ALGORITHM>": "<HEX_VALUE>"`
-     * Algorithms can be e.g. sha256, sha512
-     * See
-     * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-     * 
- * - * map<string, string> digest = 2; - */ - public Builder putAllDigest( - java.util.Map values) { - internalGetMutableDigest().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000002; - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Subject) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Subject) - private static final io.grafeas.v1.Subject DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Subject(); - } - - public static io.grafeas.v1.Subject getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Subject parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Subject getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java deleted file mode 100644 index b196d4c7afe9..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/SubjectOrBuilder.java +++ /dev/null @@ -1,90 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/intoto_statement.proto - -package io.grafeas.v1; - -public interface SubjectOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Subject) - com.google.protobuf.MessageOrBuilder { - - /** - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - int getDigestCount(); - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - boolean containsDigest( - java.lang.String key); - /** - * Use {@link #getDigestMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getDigest(); - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - java.util.Map - getDigestMap(); - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - /* nullable */ -java.lang.String getDigestOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * `"<ALGORITHM>": "<HEX_VALUE>"`
-   * Algorithms can be e.g. sha256, sha512
-   * See
-   * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
-   * 
- * - * map<string, string> digest = 2; - */ - java.lang.String getDigestOrThrow( - java.lang.String key); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java deleted file mode 100644 index 3f5c80409510..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequest.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to update a note.
- * 
- * - * Protobuf type {@code grafeas.v1.UpdateNoteRequest} - */ -public final class UpdateNoteRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.UpdateNoteRequest) - UpdateNoteRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateNoteRequest.newBuilder() to construct. - private UpdateNoteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateNoteRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateNoteRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpdateNoteRequest.class, io.grafeas.v1.UpdateNoteRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NOTE_FIELD_NUMBER = 2; - private io.grafeas.v1.Note note_; - /** - *
-   * The updated note.
-   * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the note field is set. - */ - @java.lang.Override - public boolean hasNote() { - return note_ != null; - } - /** - *
-   * The updated note.
-   * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The note. - */ - @java.lang.Override - public io.grafeas.v1.Note getNote() { - return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; - } - /** - *
-   * The updated note.
-   * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { - return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 3; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (note_ != null) { - output.writeMessage(2, getNote()); - } - if (updateMask_ != null) { - output.writeMessage(3, getUpdateMask()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (note_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getNote()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getUpdateMask()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.UpdateNoteRequest)) { - return super.equals(obj); - } - io.grafeas.v1.UpdateNoteRequest other = (io.grafeas.v1.UpdateNoteRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (hasNote() != other.hasNote()) return false; - if (hasNote()) { - if (!getNote() - .equals(other.getNote())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasNote()) { - hash = (37 * hash) + NOTE_FIELD_NUMBER; - hash = (53 * hash) + getNote().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpdateNoteRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpdateNoteRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpdateNoteRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.UpdateNoteRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to update a note.
-   * 
- * - * Protobuf type {@code grafeas.v1.UpdateNoteRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.UpdateNoteRequest) - io.grafeas.v1.UpdateNoteRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpdateNoteRequest.class, io.grafeas.v1.UpdateNoteRequest.Builder.class); - } - - // Construct using io.grafeas.v1.UpdateNoteRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - note_ = null; - if (noteBuilder_ != null) { - noteBuilder_.dispose(); - noteBuilder_ = null; - } - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateNoteRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.UpdateNoteRequest getDefaultInstanceForType() { - return io.grafeas.v1.UpdateNoteRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.UpdateNoteRequest build() { - io.grafeas.v1.UpdateNoteRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.UpdateNoteRequest buildPartial() { - io.grafeas.v1.UpdateNoteRequest result = new io.grafeas.v1.UpdateNoteRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.UpdateNoteRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.note_ = noteBuilder_ == null - ? note_ - : noteBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null - ? updateMask_ - : updateMaskBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.UpdateNoteRequest) { - return mergeFrom((io.grafeas.v1.UpdateNoteRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.UpdateNoteRequest other) { - if (other == io.grafeas.v1.UpdateNoteRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasNote()) { - mergeNote(other.getNote()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getNoteFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getUpdateMaskFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the note in the form of
-     * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.grafeas.v1.Note note_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> noteBuilder_; - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the note field is set. - */ - public boolean hasNote() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The note. - */ - public io.grafeas.v1.Note getNote() { - if (noteBuilder_ == null) { - return note_ == null ? io.grafeas.v1.Note.getDefaultInstance() : note_; - } else { - return noteBuilder_.getMessage(); - } - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setNote(io.grafeas.v1.Note value) { - if (noteBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - note_ = value; - } else { - noteBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setNote( - io.grafeas.v1.Note.Builder builderForValue) { - if (noteBuilder_ == null) { - note_ = builderForValue.build(); - } else { - noteBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeNote(io.grafeas.v1.Note value) { - if (noteBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - note_ != null && - note_ != io.grafeas.v1.Note.getDefaultInstance()) { - getNoteBuilder().mergeFrom(value); - } else { - note_ = value; - } - } else { - noteBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearNote() { - bitField0_ = (bitField0_ & ~0x00000002); - note_ = null; - if (noteBuilder_ != null) { - noteBuilder_.dispose(); - noteBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Note.Builder getNoteBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getNoteFieldBuilder().getBuilder(); - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { - if (noteBuilder_ != null) { - return noteBuilder_.getMessageOrBuilder(); - } else { - return note_ == null ? - io.grafeas.v1.Note.getDefaultInstance() : note_; - } - } - /** - *
-     * The updated note.
-     * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> - getNoteFieldBuilder() { - if (noteBuilder_ == null) { - noteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder>( - getNote(), - getParentForChildren(), - isClean()); - note_ = null; - } - return noteBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - } else { - updateMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - updateMask_ != null && - updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000004); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.UpdateNoteRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.UpdateNoteRequest) - private static final io.grafeas.v1.UpdateNoteRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.UpdateNoteRequest(); - } - - public static io.grafeas.v1.UpdateNoteRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateNoteRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.UpdateNoteRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java deleted file mode 100644 index 4d7ef876c432..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface UpdateNoteRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.UpdateNoteRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the note in the form of
-   * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The updated note.
-   * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the note field is set. - */ - boolean hasNote(); - /** - *
-   * The updated note.
-   * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The note. - */ - io.grafeas.v1.Note getNote(); - /** - *
-   * The updated note.
-   * 
- * - * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - io.grafeas.v1.NoteOrBuilder getNoteOrBuilder(); - - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java deleted file mode 100644 index f6f6febe0d11..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -/** - *
- * Request to update an occurrence.
- * 
- * - * Protobuf type {@code grafeas.v1.UpdateOccurrenceRequest} - */ -public final class UpdateOccurrenceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.UpdateOccurrenceRequest) - UpdateOccurrenceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateOccurrenceRequest.newBuilder() to construct. - private UpdateOccurrenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateOccurrenceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateOccurrenceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpdateOccurrenceRequest.class, io.grafeas.v1.UpdateOccurrenceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OCCURRENCE_FIELD_NUMBER = 2; - private io.grafeas.v1.Occurrence occurrence_; - /** - *
-   * The updated occurrence.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the occurrence field is set. - */ - @java.lang.Override - public boolean hasOccurrence() { - return occurrence_ != null; - } - /** - *
-   * The updated occurrence.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The occurrence. - */ - @java.lang.Override - public io.grafeas.v1.Occurrence getOccurrence() { - return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } - /** - *
-   * The updated occurrence.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { - return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 3; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (occurrence_ != null) { - output.writeMessage(2, getOccurrence()); - } - if (updateMask_ != null) { - output.writeMessage(3, getUpdateMask()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (occurrence_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getOccurrence()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getUpdateMask()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.UpdateOccurrenceRequest)) { - return super.equals(obj); - } - io.grafeas.v1.UpdateOccurrenceRequest other = (io.grafeas.v1.UpdateOccurrenceRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (hasOccurrence() != other.hasOccurrence()) return false; - if (hasOccurrence()) { - if (!getOccurrence() - .equals(other.getOccurrence())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasOccurrence()) { - hash = (37 * hash) + OCCURRENCE_FIELD_NUMBER; - hash = (53 * hash) + getOccurrence().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpdateOccurrenceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.UpdateOccurrenceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to update an occurrence.
-   * 
- * - * Protobuf type {@code grafeas.v1.UpdateOccurrenceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.UpdateOccurrenceRequest) - io.grafeas.v1.UpdateOccurrenceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpdateOccurrenceRequest.class, io.grafeas.v1.UpdateOccurrenceRequest.Builder.class); - } - - // Construct using io.grafeas.v1.UpdateOccurrenceRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - occurrence_ = null; - if (occurrenceBuilder_ != null) { - occurrenceBuilder_.dispose(); - occurrenceBuilder_ = null; - } - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.GrafeasOuterClass.internal_static_grafeas_v1_UpdateOccurrenceRequest_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.UpdateOccurrenceRequest getDefaultInstanceForType() { - return io.grafeas.v1.UpdateOccurrenceRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.UpdateOccurrenceRequest build() { - io.grafeas.v1.UpdateOccurrenceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.UpdateOccurrenceRequest buildPartial() { - io.grafeas.v1.UpdateOccurrenceRequest result = new io.grafeas.v1.UpdateOccurrenceRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.UpdateOccurrenceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.occurrence_ = occurrenceBuilder_ == null - ? occurrence_ - : occurrenceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null - ? updateMask_ - : updateMaskBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.UpdateOccurrenceRequest) { - return mergeFrom((io.grafeas.v1.UpdateOccurrenceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.UpdateOccurrenceRequest other) { - if (other == io.grafeas.v1.UpdateOccurrenceRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasOccurrence()) { - mergeOccurrence(other.getOccurrence()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getOccurrenceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getUpdateMaskFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the occurrence in the form of
-     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.grafeas.v1.Occurrence occurrence_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> occurrenceBuilder_; - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the occurrence field is set. - */ - public boolean hasOccurrence() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The occurrence. - */ - public io.grafeas.v1.Occurrence getOccurrence() { - if (occurrenceBuilder_ == null) { - return occurrence_ == null ? io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } else { - return occurrenceBuilder_.getMessage(); - } - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOccurrence(io.grafeas.v1.Occurrence value) { - if (occurrenceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - occurrence_ = value; - } else { - occurrenceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOccurrence( - io.grafeas.v1.Occurrence.Builder builderForValue) { - if (occurrenceBuilder_ == null) { - occurrence_ = builderForValue.build(); - } else { - occurrenceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeOccurrence(io.grafeas.v1.Occurrence value) { - if (occurrenceBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - occurrence_ != null && - occurrence_ != io.grafeas.v1.Occurrence.getDefaultInstance()) { - getOccurrenceBuilder().mergeFrom(value); - } else { - occurrence_ = value; - } - } else { - occurrenceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearOccurrence() { - bitField0_ = (bitField0_ & ~0x00000002); - occurrence_ = null; - if (occurrenceBuilder_ != null) { - occurrenceBuilder_.dispose(); - occurrenceBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.Occurrence.Builder getOccurrenceBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getOccurrenceFieldBuilder().getBuilder(); - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { - if (occurrenceBuilder_ != null) { - return occurrenceBuilder_.getMessageOrBuilder(); - } else { - return occurrence_ == null ? - io.grafeas.v1.Occurrence.getDefaultInstance() : occurrence_; - } - } - /** - *
-     * The updated occurrence.
-     * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder> - getOccurrenceFieldBuilder() { - if (occurrenceBuilder_ == null) { - occurrenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Occurrence, io.grafeas.v1.Occurrence.Builder, io.grafeas.v1.OccurrenceOrBuilder>( - getOccurrence(), - getParentForChildren(), - isClean()); - occurrence_ = null; - } - return occurrenceBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - } else { - updateMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - updateMask_ != null && - updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000004); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * The fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.UpdateOccurrenceRequest) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.UpdateOccurrenceRequest) - private static final io.grafeas.v1.UpdateOccurrenceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.UpdateOccurrenceRequest(); - } - - public static io.grafeas.v1.UpdateOccurrenceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateOccurrenceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.UpdateOccurrenceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java deleted file mode 100644 index ccec13dc04a7..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/grafeas.proto - -package io.grafeas.v1; - -public interface UpdateOccurrenceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.UpdateOccurrenceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the occurrence in the form of
-   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The updated occurrence.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the occurrence field is set. - */ - boolean hasOccurrence(); - /** - *
-   * The updated occurrence.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The occurrence. - */ - io.grafeas.v1.Occurrence getOccurrence(); - /** - *
-   * The updated occurrence.
-   * 
- * - * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder(); - - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * The fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java deleted file mode 100644 index 4872b0e752da..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Upgrade.java +++ /dev/null @@ -1,130 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -public final class Upgrade { - private Upgrade() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_UpgradeNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_UpgradeDistribution_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_WindowsUpdate_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_UpgradeOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\030grafeas/v1/upgrade.proto\022\ngrafeas.v1\032\037" + - "google/protobuf/timestamp.proto\032\030grafeas" + - "/v1/package.proto\"\257\001\n\013UpgradeNote\022\017\n\007pac" + - "kage\030\001 \001(\t\022$\n\007version\030\002 \001(\0132\023.grafeas.v1" + - ".Version\0226\n\rdistributions\030\003 \003(\0132\037.grafea" + - "s.v1.UpgradeDistribution\0221\n\016windows_upda" + - "te\030\004 \001(\0132\031.grafeas.v1.WindowsUpdate\"]\n\023U" + - "pgradeDistribution\022\017\n\007cpe_uri\030\001 \001(\t\022\026\n\016c" + - "lassification\030\002 \001(\t\022\020\n\010severity\030\003 \001(\t\022\013\n" + - "\003cve\030\004 \003(\t\"\354\002\n\rWindowsUpdate\0224\n\010identity" + - "\030\001 \001(\0132\".grafeas.v1.WindowsUpdate.Identi" + - "ty\022\r\n\005title\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\0226" + - "\n\ncategories\030\004 \003(\0132\".grafeas.v1.WindowsU" + - "pdate.Category\022\026\n\016kb_article_ids\030\005 \003(\t\022\023" + - "\n\013support_url\030\006 \001(\t\022<\n\030last_published_ti" + - "mestamp\030\007 \001(\0132\032.google.protobuf.Timestam" + - "p\032/\n\010Identity\022\021\n\tupdate_id\030\001 \001(\t\022\020\n\010revi" + - "sion\030\002 \001(\005\032-\n\010Category\022\023\n\013category_id\030\001 " + - "\001(\t\022\014\n\004name\030\002 \001(\t\"\273\001\n\021UpgradeOccurrence\022" + - "\017\n\007package\030\001 \001(\t\022+\n\016parsed_version\030\003 \001(\013" + - "2\023.grafeas.v1.Version\0225\n\014distribution\030\004 " + - "\001(\0132\037.grafeas.v1.UpgradeDistribution\0221\n\016" + - "windows_update\030\005 \001(\0132\031.grafeas.v1.Window" + - "sUpdateBQ\n\rio.grafeas.v1P\001Z8google.golan" + - "g.org/genproto/googleapis/grafeas/v1;gra" + - "feas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.TimestampProto.getDescriptor(), - io.grafeas.v1.Package.getDescriptor(), - }); - internal_static_grafeas_v1_UpgradeNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_UpgradeNote_descriptor, - new java.lang.String[] { "Package", "Version", "Distributions", "WindowsUpdate", }); - internal_static_grafeas_v1_UpgradeDistribution_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_UpgradeDistribution_descriptor, - new java.lang.String[] { "CpeUri", "Classification", "Severity", "Cve", }); - internal_static_grafeas_v1_WindowsUpdate_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_WindowsUpdate_descriptor, - new java.lang.String[] { "Identity", "Title", "Description", "Categories", "KbArticleIds", "SupportUrl", "LastPublishedTimestamp", }); - internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor = - internal_static_grafeas_v1_WindowsUpdate_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor, - new java.lang.String[] { "UpdateId", "Revision", }); - internal_static_grafeas_v1_WindowsUpdate_Category_descriptor = - internal_static_grafeas_v1_WindowsUpdate_descriptor.getNestedTypes().get(1); - internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_WindowsUpdate_Category_descriptor, - new java.lang.String[] { "CategoryId", "Name", }); - internal_static_grafeas_v1_UpgradeOccurrence_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_UpgradeOccurrence_descriptor, - new java.lang.String[] { "Package", "ParsedVersion", "Distribution", "WindowsUpdate", }); - com.google.protobuf.TimestampProto.getDescriptor(); - io.grafeas.v1.Package.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java deleted file mode 100644 index 0a867618fecf..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistribution.java +++ /dev/null @@ -1,1177 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -/** - *
- * The Upgrade Distribution represents metadata about the Upgrade for each
- * operating system (CPE). Some distributions have additional metadata around
- * updates, classifying them into various categories and severities.
- * 
- * - * Protobuf type {@code grafeas.v1.UpgradeDistribution} - */ -public final class UpgradeDistribution extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeDistribution) - UpgradeDistributionOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpgradeDistribution.newBuilder() to construct. - private UpgradeDistribution(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpgradeDistribution() { - cpeUri_ = ""; - classification_ = ""; - severity_ = ""; - cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpgradeDistribution(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpgradeDistribution.class, io.grafeas.v1.UpgradeDistribution.Builder.class); - } - - public static final int CPE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object cpeUri_ = ""; - /** - *
-   * Required - The specific operating system this metadata applies to. See
-   * https://cpe.mitre.org/specification/.
-   * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - @java.lang.Override - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } - } - /** - *
-   * Required - The specific operating system this metadata applies to. See
-   * https://cpe.mitre.org/specification/.
-   * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLASSIFICATION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object classification_ = ""; - /** - *
-   * The operating system classification of this Upgrade, as specified by the
-   * upstream operating system upgrade feed. For Windows the classification is
-   * one of the category_ids listed at
-   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-   * 
- * - * string classification = 2; - * @return The classification. - */ - @java.lang.Override - public java.lang.String getClassification() { - java.lang.Object ref = classification_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - classification_ = s; - return s; - } - } - /** - *
-   * The operating system classification of this Upgrade, as specified by the
-   * upstream operating system upgrade feed. For Windows the classification is
-   * one of the category_ids listed at
-   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-   * 
- * - * string classification = 2; - * @return The bytes for classification. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getClassificationBytes() { - java.lang.Object ref = classification_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - classification_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SEVERITY_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object severity_ = ""; - /** - *
-   * The severity as specified by the upstream operating system.
-   * 
- * - * string severity = 3; - * @return The severity. - */ - @java.lang.Override - public java.lang.String getSeverity() { - java.lang.Object ref = severity_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - severity_ = s; - return s; - } - } - /** - *
-   * The severity as specified by the upstream operating system.
-   * 
- * - * string severity = 3; - * @return The bytes for severity. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSeverityBytes() { - java.lang.Object ref = severity_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - severity_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CVE_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList cve_; - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @return A list containing the cve. - */ - public com.google.protobuf.ProtocolStringList - getCveList() { - return cve_; - } - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @return The count of cve. - */ - public int getCveCount() { - return cve_.size(); - } - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @param index The index of the element to return. - * @return The cve at the given index. - */ - public java.lang.String getCve(int index) { - return cve_.get(index); - } - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @param index The index of the value to return. - * @return The bytes of the cve at the given index. - */ - public com.google.protobuf.ByteString - getCveBytes(int index) { - return cve_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(classification_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, classification_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severity_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, severity_); - } - for (int i = 0; i < cve_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cve_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(classification_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, classification_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severity_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, severity_); - } - { - int dataSize = 0; - for (int i = 0; i < cve_.size(); i++) { - dataSize += computeStringSizeNoTag(cve_.getRaw(i)); - } - size += dataSize; - size += 1 * getCveList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.UpgradeDistribution)) { - return super.equals(obj); - } - io.grafeas.v1.UpgradeDistribution other = (io.grafeas.v1.UpgradeDistribution) obj; - - if (!getCpeUri() - .equals(other.getCpeUri())) return false; - if (!getClassification() - .equals(other.getClassification())) return false; - if (!getSeverity() - .equals(other.getSeverity())) return false; - if (!getCveList() - .equals(other.getCveList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCpeUri().hashCode(); - hash = (37 * hash) + CLASSIFICATION_FIELD_NUMBER; - hash = (53 * hash) + getClassification().hashCode(); - hash = (37 * hash) + SEVERITY_FIELD_NUMBER; - hash = (53 * hash) + getSeverity().hashCode(); - if (getCveCount() > 0) { - hash = (37 * hash) + CVE_FIELD_NUMBER; - hash = (53 * hash) + getCveList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.UpgradeDistribution parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpgradeDistribution parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeDistribution parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeDistribution parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.UpgradeDistribution prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The Upgrade Distribution represents metadata about the Upgrade for each
-   * operating system (CPE). Some distributions have additional metadata around
-   * updates, classifying them into various categories and severities.
-   * 
- * - * Protobuf type {@code grafeas.v1.UpgradeDistribution} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeDistribution) - io.grafeas.v1.UpgradeDistributionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpgradeDistribution.class, io.grafeas.v1.UpgradeDistribution.Builder.class); - } - - // Construct using io.grafeas.v1.UpgradeDistribution.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - cpeUri_ = ""; - classification_ = ""; - severity_ = ""; - cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeDistribution getDefaultInstanceForType() { - return io.grafeas.v1.UpgradeDistribution.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.UpgradeDistribution build() { - io.grafeas.v1.UpgradeDistribution result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeDistribution buildPartial() { - io.grafeas.v1.UpgradeDistribution result = new io.grafeas.v1.UpgradeDistribution(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.UpgradeDistribution result) { - if (((bitField0_ & 0x00000008) != 0)) { - cve_ = cve_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.cve_ = cve_; - } - - private void buildPartial0(io.grafeas.v1.UpgradeDistribution result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.cpeUri_ = cpeUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.classification_ = classification_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.severity_ = severity_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.UpgradeDistribution) { - return mergeFrom((io.grafeas.v1.UpgradeDistribution)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.UpgradeDistribution other) { - if (other == io.grafeas.v1.UpgradeDistribution.getDefaultInstance()) return this; - if (!other.getCpeUri().isEmpty()) { - cpeUri_ = other.cpeUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getClassification().isEmpty()) { - classification_ = other.classification_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getSeverity().isEmpty()) { - severity_ = other.severity_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.cve_.isEmpty()) { - if (cve_.isEmpty()) { - cve_ = other.cve_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureCveIsMutable(); - cve_.addAll(other.cve_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - cpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - classification_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - severity_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - ensureCveIsMutable(); - cve_.add(s); - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object cpeUri_ = ""; - /** - *
-     * Required - The specific operating system this metadata applies to. See
-     * https://cpe.mitre.org/specification/.
-     * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required - The specific operating system this metadata applies to. See
-     * https://cpe.mitre.org/specification/.
-     * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required - The specific operating system this metadata applies to. See
-     * https://cpe.mitre.org/specification/.
-     * 
- * - * string cpe_uri = 1; - * @param value The cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required - The specific operating system this metadata applies to. See
-     * https://cpe.mitre.org/specification/.
-     * 
- * - * string cpe_uri = 1; - * @return This builder for chaining. - */ - public Builder clearCpeUri() { - cpeUri_ = getDefaultInstance().getCpeUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required - The specific operating system this metadata applies to. See
-     * https://cpe.mitre.org/specification/.
-     * 
- * - * string cpe_uri = 1; - * @param value The bytes for cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object classification_ = ""; - /** - *
-     * The operating system classification of this Upgrade, as specified by the
-     * upstream operating system upgrade feed. For Windows the classification is
-     * one of the category_ids listed at
-     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-     * 
- * - * string classification = 2; - * @return The classification. - */ - public java.lang.String getClassification() { - java.lang.Object ref = classification_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - classification_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The operating system classification of this Upgrade, as specified by the
-     * upstream operating system upgrade feed. For Windows the classification is
-     * one of the category_ids listed at
-     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-     * 
- * - * string classification = 2; - * @return The bytes for classification. - */ - public com.google.protobuf.ByteString - getClassificationBytes() { - java.lang.Object ref = classification_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - classification_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The operating system classification of this Upgrade, as specified by the
-     * upstream operating system upgrade feed. For Windows the classification is
-     * one of the category_ids listed at
-     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-     * 
- * - * string classification = 2; - * @param value The classification to set. - * @return This builder for chaining. - */ - public Builder setClassification( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - classification_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The operating system classification of this Upgrade, as specified by the
-     * upstream operating system upgrade feed. For Windows the classification is
-     * one of the category_ids listed at
-     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-     * 
- * - * string classification = 2; - * @return This builder for chaining. - */ - public Builder clearClassification() { - classification_ = getDefaultInstance().getClassification(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The operating system classification of this Upgrade, as specified by the
-     * upstream operating system upgrade feed. For Windows the classification is
-     * one of the category_ids listed at
-     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-     * 
- * - * string classification = 2; - * @param value The bytes for classification to set. - * @return This builder for chaining. - */ - public Builder setClassificationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - classification_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object severity_ = ""; - /** - *
-     * The severity as specified by the upstream operating system.
-     * 
- * - * string severity = 3; - * @return The severity. - */ - public java.lang.String getSeverity() { - java.lang.Object ref = severity_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - severity_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The severity as specified by the upstream operating system.
-     * 
- * - * string severity = 3; - * @return The bytes for severity. - */ - public com.google.protobuf.ByteString - getSeverityBytes() { - java.lang.Object ref = severity_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - severity_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The severity as specified by the upstream operating system.
-     * 
- * - * string severity = 3; - * @param value The severity to set. - * @return This builder for chaining. - */ - public Builder setSeverity( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - severity_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The severity as specified by the upstream operating system.
-     * 
- * - * string severity = 3; - * @return This builder for chaining. - */ - public Builder clearSeverity() { - severity_ = getDefaultInstance().getSeverity(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The severity as specified by the upstream operating system.
-     * 
- * - * string severity = 3; - * @param value The bytes for severity to set. - * @return This builder for chaining. - */ - public Builder setSeverityBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - severity_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureCveIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - cve_ = new com.google.protobuf.LazyStringArrayList(cve_); - bitField0_ |= 0x00000008; - } - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @return A list containing the cve. - */ - public com.google.protobuf.ProtocolStringList - getCveList() { - return cve_.getUnmodifiableView(); - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @return The count of cve. - */ - public int getCveCount() { - return cve_.size(); - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @param index The index of the element to return. - * @return The cve at the given index. - */ - public java.lang.String getCve(int index) { - return cve_.get(index); - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @param index The index of the value to return. - * @return The bytes of the cve at the given index. - */ - public com.google.protobuf.ByteString - getCveBytes(int index) { - return cve_.getByteString(index); - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @param index The index to set the value at. - * @param value The cve to set. - * @return This builder for chaining. - */ - public Builder setCve( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureCveIsMutable(); - cve_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @param value The cve to add. - * @return This builder for chaining. - */ - public Builder addCve( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureCveIsMutable(); - cve_.add(value); - onChanged(); - return this; - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @param values The cve to add. - * @return This builder for chaining. - */ - public Builder addAllCve( - java.lang.Iterable values) { - ensureCveIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, cve_); - onChanged(); - return this; - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @return This builder for chaining. - */ - public Builder clearCve() { - cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * The cve tied to this Upgrade.
-     * 
- * - * repeated string cve = 4; - * @param value The bytes of the cve to add. - * @return This builder for chaining. - */ - public Builder addCveBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureCveIsMutable(); - cve_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.UpgradeDistribution) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeDistribution) - private static final io.grafeas.v1.UpgradeDistribution DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeDistribution(); - } - - public static io.grafeas.v1.UpgradeDistribution getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpgradeDistribution parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeDistribution getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java deleted file mode 100644 index ae654ff74cbf..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -public interface UpgradeDistributionOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.UpgradeDistribution) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required - The specific operating system this metadata applies to. See
-   * https://cpe.mitre.org/specification/.
-   * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - java.lang.String getCpeUri(); - /** - *
-   * Required - The specific operating system this metadata applies to. See
-   * https://cpe.mitre.org/specification/.
-   * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - com.google.protobuf.ByteString - getCpeUriBytes(); - - /** - *
-   * The operating system classification of this Upgrade, as specified by the
-   * upstream operating system upgrade feed. For Windows the classification is
-   * one of the category_ids listed at
-   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-   * 
- * - * string classification = 2; - * @return The classification. - */ - java.lang.String getClassification(); - /** - *
-   * The operating system classification of this Upgrade, as specified by the
-   * upstream operating system upgrade feed. For Windows the classification is
-   * one of the category_ids listed at
-   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
-   * 
- * - * string classification = 2; - * @return The bytes for classification. - */ - com.google.protobuf.ByteString - getClassificationBytes(); - - /** - *
-   * The severity as specified by the upstream operating system.
-   * 
- * - * string severity = 3; - * @return The severity. - */ - java.lang.String getSeverity(); - /** - *
-   * The severity as specified by the upstream operating system.
-   * 
- * - * string severity = 3; - * @return The bytes for severity. - */ - com.google.protobuf.ByteString - getSeverityBytes(); - - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @return A list containing the cve. - */ - java.util.List - getCveList(); - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @return The count of cve. - */ - int getCveCount(); - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @param index The index of the element to return. - * @return The cve at the given index. - */ - java.lang.String getCve(int index); - /** - *
-   * The cve tied to this Upgrade.
-   * 
- * - * repeated string cve = 4; - * @param index The index of the value to return. - * @return The bytes of the cve at the given index. - */ - com.google.protobuf.ByteString - getCveBytes(int index); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java deleted file mode 100644 index 98cf3755164e..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNote.java +++ /dev/null @@ -1,1502 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -/** - *
- * An Upgrade Note represents a potential upgrade of a package to a given
- * version. For each package version combination (i.e. bash 4.0, bash 4.1,
- * bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field
- * represents the information related to the update.
- * 
- * - * Protobuf type {@code grafeas.v1.UpgradeNote} - */ -public final class UpgradeNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeNote) - UpgradeNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpgradeNote.newBuilder() to construct. - private UpgradeNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpgradeNote() { - package_ = ""; - distributions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpgradeNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpgradeNote.class, io.grafeas.v1.UpgradeNote.Builder.class); - } - - public static final int PACKAGE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object package_ = ""; - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The package. - */ - @java.lang.Override - public java.lang.String getPackage() { - java.lang.Object ref = package_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - package_ = s; - return s; - } - } - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The bytes for package. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPackageBytes() { - java.lang.Object ref = package_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - package_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 2; - private io.grafeas.v1.Version version_; - /** - *
-   * Required for non-Windows OS. The version of the package in machine + human
-   * readable form.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return Whether the version field is set. - */ - @java.lang.Override - public boolean hasVersion() { - return version_ != null; - } - /** - *
-   * Required for non-Windows OS. The version of the package in machine + human
-   * readable form.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return The version. - */ - @java.lang.Override - public io.grafeas.v1.Version getVersion() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - /** - *
-   * Required for non-Windows OS. The version of the package in machine + human
-   * readable form.
-   * 
- * - * .grafeas.v1.Version version = 2; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } - - public static final int DISTRIBUTIONS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List distributions_; - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - @java.lang.Override - public java.util.List getDistributionsList() { - return distributions_; - } - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - @java.lang.Override - public java.util.List - getDistributionsOrBuilderList() { - return distributions_; - } - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - @java.lang.Override - public int getDistributionsCount() { - return distributions_.size(); - } - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - @java.lang.Override - public io.grafeas.v1.UpgradeDistribution getDistributions(int index) { - return distributions_.get(index); - } - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - @java.lang.Override - public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder( - int index) { - return distributions_.get(index); - } - - public static final int WINDOWS_UPDATE_FIELD_NUMBER = 4; - private io.grafeas.v1.WindowsUpdate windowsUpdate_; - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - * @return Whether the windowsUpdate field is set. - */ - @java.lang.Override - public boolean hasWindowsUpdate() { - return windowsUpdate_ != null; - } - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - * @return The windowsUpdate. - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { - return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { - return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, package_); - } - if (version_ != null) { - output.writeMessage(2, getVersion()); - } - for (int i = 0; i < distributions_.size(); i++) { - output.writeMessage(3, distributions_.get(i)); - } - if (windowsUpdate_ != null) { - output.writeMessage(4, getWindowsUpdate()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, package_); - } - if (version_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getVersion()); - } - for (int i = 0; i < distributions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, distributions_.get(i)); - } - if (windowsUpdate_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getWindowsUpdate()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.UpgradeNote)) { - return super.equals(obj); - } - io.grafeas.v1.UpgradeNote other = (io.grafeas.v1.UpgradeNote) obj; - - if (!getPackage() - .equals(other.getPackage())) return false; - if (hasVersion() != other.hasVersion()) return false; - if (hasVersion()) { - if (!getVersion() - .equals(other.getVersion())) return false; - } - if (!getDistributionsList() - .equals(other.getDistributionsList())) return false; - if (hasWindowsUpdate() != other.hasWindowsUpdate()) return false; - if (hasWindowsUpdate()) { - if (!getWindowsUpdate() - .equals(other.getWindowsUpdate())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getPackage().hashCode(); - if (hasVersion()) { - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - } - if (getDistributionsCount() > 0) { - hash = (37 * hash) + DISTRIBUTIONS_FIELD_NUMBER; - hash = (53 * hash) + getDistributionsList().hashCode(); - } - if (hasWindowsUpdate()) { - hash = (37 * hash) + WINDOWS_UPDATE_FIELD_NUMBER; - hash = (53 * hash) + getWindowsUpdate().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.UpgradeNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpgradeNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpgradeNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.UpgradeNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An Upgrade Note represents a potential upgrade of a package to a given
-   * version. For each package version combination (i.e. bash 4.0, bash 4.1,
-   * bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field
-   * represents the information related to the update.
-   * 
- * - * Protobuf type {@code grafeas.v1.UpgradeNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeNote) - io.grafeas.v1.UpgradeNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpgradeNote.class, io.grafeas.v1.UpgradeNote.Builder.class); - } - - // Construct using io.grafeas.v1.UpgradeNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - package_ = ""; - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - if (distributionsBuilder_ == null) { - distributions_ = java.util.Collections.emptyList(); - } else { - distributions_ = null; - distributionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - windowsUpdate_ = null; - if (windowsUpdateBuilder_ != null) { - windowsUpdateBuilder_.dispose(); - windowsUpdateBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeNote getDefaultInstanceForType() { - return io.grafeas.v1.UpgradeNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.UpgradeNote build() { - io.grafeas.v1.UpgradeNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeNote buildPartial() { - io.grafeas.v1.UpgradeNote result = new io.grafeas.v1.UpgradeNote(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.UpgradeNote result) { - if (distributionsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - distributions_ = java.util.Collections.unmodifiableList(distributions_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.distributions_ = distributions_; - } else { - result.distributions_ = distributionsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.UpgradeNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.package_ = package_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.version_ = versionBuilder_ == null - ? version_ - : versionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.windowsUpdate_ = windowsUpdateBuilder_ == null - ? windowsUpdate_ - : windowsUpdateBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.UpgradeNote) { - return mergeFrom((io.grafeas.v1.UpgradeNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.UpgradeNote other) { - if (other == io.grafeas.v1.UpgradeNote.getDefaultInstance()) return this; - if (!other.getPackage().isEmpty()) { - package_ = other.package_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasVersion()) { - mergeVersion(other.getVersion()); - } - if (distributionsBuilder_ == null) { - if (!other.distributions_.isEmpty()) { - if (distributions_.isEmpty()) { - distributions_ = other.distributions_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureDistributionsIsMutable(); - distributions_.addAll(other.distributions_); - } - onChanged(); - } - } else { - if (!other.distributions_.isEmpty()) { - if (distributionsBuilder_.isEmpty()) { - distributionsBuilder_.dispose(); - distributionsBuilder_ = null; - distributions_ = other.distributions_; - bitField0_ = (bitField0_ & ~0x00000004); - distributionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDistributionsFieldBuilder() : null; - } else { - distributionsBuilder_.addAllMessages(other.distributions_); - } - } - } - if (other.hasWindowsUpdate()) { - mergeWindowsUpdate(other.getWindowsUpdate()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - package_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - io.grafeas.v1.UpgradeDistribution m = - input.readMessage( - io.grafeas.v1.UpgradeDistribution.parser(), - extensionRegistry); - if (distributionsBuilder_ == null) { - ensureDistributionsIsMutable(); - distributions_.add(m); - } else { - distributionsBuilder_.addMessage(m); - } - break; - } // case 26 - case 34: { - input.readMessage( - getWindowsUpdateFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object package_ = ""; - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @return The package. - */ - public java.lang.String getPackage() { - java.lang.Object ref = package_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - package_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @return The bytes for package. - */ - public com.google.protobuf.ByteString - getPackageBytes() { - java.lang.Object ref = package_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - package_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @param value The package to set. - * @return This builder for chaining. - */ - public Builder setPackage( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - package_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @return This builder for chaining. - */ - public Builder clearPackage() { - package_ = getDefaultInstance().getPackage(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @param value The bytes for package to set. - * @return This builder for chaining. - */ - public Builder setPackageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - package_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.grafeas.v1.Version version_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> versionBuilder_; - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - * @return Whether the version field is set. - */ - public boolean hasVersion() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - * @return The version. - */ - public io.grafeas.v1.Version getVersion() { - if (versionBuilder_ == null) { - return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; - } else { - return versionBuilder_.getMessage(); - } - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder setVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - } else { - versionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder setVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (versionBuilder_ == null) { - version_ = builderForValue.build(); - } else { - versionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder mergeVersion(io.grafeas.v1.Version value) { - if (versionBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - version_ != null && - version_ != io.grafeas.v1.Version.getDefaultInstance()) { - getVersionBuilder().mergeFrom(value); - } else { - version_ = value; - } - } else { - versionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public Builder clearVersion() { - bitField0_ = (bitField0_ & ~0x00000002); - version_ = null; - if (versionBuilder_ != null) { - versionBuilder_.dispose(); - versionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public io.grafeas.v1.Version.Builder getVersionBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getVersionFieldBuilder().getBuilder(); - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { - if (versionBuilder_ != null) { - return versionBuilder_.getMessageOrBuilder(); - } else { - return version_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : version_; - } - } - /** - *
-     * Required for non-Windows OS. The version of the package in machine + human
-     * readable form.
-     * 
- * - * .grafeas.v1.Version version = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getVersionFieldBuilder() { - if (versionBuilder_ == null) { - versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getVersion(), - getParentForChildren(), - isClean()); - version_ = null; - } - return versionBuilder_; - } - - private java.util.List distributions_ = - java.util.Collections.emptyList(); - private void ensureDistributionsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - distributions_ = new java.util.ArrayList(distributions_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> distributionsBuilder_; - - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public java.util.List getDistributionsList() { - if (distributionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(distributions_); - } else { - return distributionsBuilder_.getMessageList(); - } - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public int getDistributionsCount() { - if (distributionsBuilder_ == null) { - return distributions_.size(); - } else { - return distributionsBuilder_.getCount(); - } - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public io.grafeas.v1.UpgradeDistribution getDistributions(int index) { - if (distributionsBuilder_ == null) { - return distributions_.get(index); - } else { - return distributionsBuilder_.getMessage(index); - } - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder setDistributions( - int index, io.grafeas.v1.UpgradeDistribution value) { - if (distributionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDistributionsIsMutable(); - distributions_.set(index, value); - onChanged(); - } else { - distributionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder setDistributions( - int index, io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { - if (distributionsBuilder_ == null) { - ensureDistributionsIsMutable(); - distributions_.set(index, builderForValue.build()); - onChanged(); - } else { - distributionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder addDistributions(io.grafeas.v1.UpgradeDistribution value) { - if (distributionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDistributionsIsMutable(); - distributions_.add(value); - onChanged(); - } else { - distributionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder addDistributions( - int index, io.grafeas.v1.UpgradeDistribution value) { - if (distributionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDistributionsIsMutable(); - distributions_.add(index, value); - onChanged(); - } else { - distributionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder addDistributions( - io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { - if (distributionsBuilder_ == null) { - ensureDistributionsIsMutable(); - distributions_.add(builderForValue.build()); - onChanged(); - } else { - distributionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder addDistributions( - int index, io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { - if (distributionsBuilder_ == null) { - ensureDistributionsIsMutable(); - distributions_.add(index, builderForValue.build()); - onChanged(); - } else { - distributionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder addAllDistributions( - java.lang.Iterable values) { - if (distributionsBuilder_ == null) { - ensureDistributionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, distributions_); - onChanged(); - } else { - distributionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder clearDistributions() { - if (distributionsBuilder_ == null) { - distributions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - distributionsBuilder_.clear(); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public Builder removeDistributions(int index) { - if (distributionsBuilder_ == null) { - ensureDistributionsIsMutable(); - distributions_.remove(index); - onChanged(); - } else { - distributionsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public io.grafeas.v1.UpgradeDistribution.Builder getDistributionsBuilder( - int index) { - return getDistributionsFieldBuilder().getBuilder(index); - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder( - int index) { - if (distributionsBuilder_ == null) { - return distributions_.get(index); } else { - return distributionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public java.util.List - getDistributionsOrBuilderList() { - if (distributionsBuilder_ != null) { - return distributionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(distributions_); - } - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public io.grafeas.v1.UpgradeDistribution.Builder addDistributionsBuilder() { - return getDistributionsFieldBuilder().addBuilder( - io.grafeas.v1.UpgradeDistribution.getDefaultInstance()); - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public io.grafeas.v1.UpgradeDistribution.Builder addDistributionsBuilder( - int index) { - return getDistributionsFieldBuilder().addBuilder( - index, io.grafeas.v1.UpgradeDistribution.getDefaultInstance()); - } - /** - *
-     * Metadata about the upgrade for each specific operating system.
-     * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - public java.util.List - getDistributionsBuilderList() { - return getDistributionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> - getDistributionsFieldBuilder() { - if (distributionsBuilder_ == null) { - distributionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder>( - distributions_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - distributions_ = null; - } - return distributionsBuilder_; - } - - private io.grafeas.v1.WindowsUpdate windowsUpdate_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> windowsUpdateBuilder_; - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - * @return Whether the windowsUpdate field is set. - */ - public boolean hasWindowsUpdate() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - * @return The windowsUpdate. - */ - public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { - if (windowsUpdateBuilder_ == null) { - return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } else { - return windowsUpdateBuilder_.getMessage(); - } - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - public Builder setWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { - if (windowsUpdateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - windowsUpdate_ = value; - } else { - windowsUpdateBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - public Builder setWindowsUpdate( - io.grafeas.v1.WindowsUpdate.Builder builderForValue) { - if (windowsUpdateBuilder_ == null) { - windowsUpdate_ = builderForValue.build(); - } else { - windowsUpdateBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - public Builder mergeWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { - if (windowsUpdateBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - windowsUpdate_ != null && - windowsUpdate_ != io.grafeas.v1.WindowsUpdate.getDefaultInstance()) { - getWindowsUpdateBuilder().mergeFrom(value); - } else { - windowsUpdate_ = value; - } - } else { - windowsUpdateBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - public Builder clearWindowsUpdate() { - bitField0_ = (bitField0_ & ~0x00000008); - windowsUpdate_ = null; - if (windowsUpdateBuilder_ != null) { - windowsUpdateBuilder_.dispose(); - windowsUpdateBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - public io.grafeas.v1.WindowsUpdate.Builder getWindowsUpdateBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getWindowsUpdateFieldBuilder().getBuilder(); - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { - if (windowsUpdateBuilder_ != null) { - return windowsUpdateBuilder_.getMessageOrBuilder(); - } else { - return windowsUpdate_ == null ? - io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> - getWindowsUpdateFieldBuilder() { - if (windowsUpdateBuilder_ == null) { - windowsUpdateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder>( - getWindowsUpdate(), - getParentForChildren(), - isClean()); - windowsUpdate_ = null; - } - return windowsUpdateBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.UpgradeNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeNote) - private static final io.grafeas.v1.UpgradeNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeNote(); - } - - public static io.grafeas.v1.UpgradeNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpgradeNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java deleted file mode 100644 index 5ba319277bdd..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java +++ /dev/null @@ -1,130 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -public interface UpgradeNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.UpgradeNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The package. - */ - java.lang.String getPackage(); - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The bytes for package. - */ - com.google.protobuf.ByteString - getPackageBytes(); - - /** - *
-   * Required for non-Windows OS. The version of the package in machine + human
-   * readable form.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return Whether the version field is set. - */ - boolean hasVersion(); - /** - *
-   * Required for non-Windows OS. The version of the package in machine + human
-   * readable form.
-   * 
- * - * .grafeas.v1.Version version = 2; - * @return The version. - */ - io.grafeas.v1.Version getVersion(); - /** - *
-   * Required for non-Windows OS. The version of the package in machine + human
-   * readable form.
-   * 
- * - * .grafeas.v1.Version version = 2; - */ - io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); - - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - java.util.List - getDistributionsList(); - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - io.grafeas.v1.UpgradeDistribution getDistributions(int index); - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - int getDistributionsCount(); - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - java.util.List - getDistributionsOrBuilderList(); - /** - *
-   * Metadata about the upgrade for each specific operating system.
-   * 
- * - * repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder( - int index); - - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - * @return Whether the windowsUpdate field is set. - */ - boolean hasWindowsUpdate(); - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - * @return The windowsUpdate. - */ - io.grafeas.v1.WindowsUpdate getWindowsUpdate(); - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 4; - */ - io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java deleted file mode 100644 index c82c44559daa..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrence.java +++ /dev/null @@ -1,1311 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -/** - *
- * An Upgrade Occurrence represents that a specific resource_url could install a
- * specific upgrade. This presence is supplied via local sources (i.e. it is
- * present in the mirror and the running system has noticed its availability).
- * For Windows, both distribution and windows_update contain information for the
- * Windows update.
- * 
- * - * Protobuf type {@code grafeas.v1.UpgradeOccurrence} - */ -public final class UpgradeOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeOccurrence) - UpgradeOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpgradeOccurrence.newBuilder() to construct. - private UpgradeOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpgradeOccurrence() { - package_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpgradeOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpgradeOccurrence.class, io.grafeas.v1.UpgradeOccurrence.Builder.class); - } - - public static final int PACKAGE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object package_ = ""; - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The package. - */ - @java.lang.Override - public java.lang.String getPackage() { - java.lang.Object ref = package_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - package_ = s; - return s; - } - } - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The bytes for package. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPackageBytes() { - java.lang.Object ref = package_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - package_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARSED_VERSION_FIELD_NUMBER = 3; - private io.grafeas.v1.Version parsedVersion_; - /** - *
-   * Required for non-Windows OS. The version of the package in a machine +
-   * human readable form.
-   * 
- * - * .grafeas.v1.Version parsed_version = 3; - * @return Whether the parsedVersion field is set. - */ - @java.lang.Override - public boolean hasParsedVersion() { - return parsedVersion_ != null; - } - /** - *
-   * Required for non-Windows OS. The version of the package in a machine +
-   * human readable form.
-   * 
- * - * .grafeas.v1.Version parsed_version = 3; - * @return The parsedVersion. - */ - @java.lang.Override - public io.grafeas.v1.Version getParsedVersion() { - return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; - } - /** - *
-   * Required for non-Windows OS. The version of the package in a machine +
-   * human readable form.
-   * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder() { - return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; - } - - public static final int DISTRIBUTION_FIELD_NUMBER = 4; - private io.grafeas.v1.UpgradeDistribution distribution_; - /** - *
-   * Metadata about the upgrade for available for the specific operating system
-   * for the resource_url. This allows efficient filtering, as well as
-   * making it easier to use the occurrence.
-   * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - * @return Whether the distribution field is set. - */ - @java.lang.Override - public boolean hasDistribution() { - return distribution_ != null; - } - /** - *
-   * Metadata about the upgrade for available for the specific operating system
-   * for the resource_url. This allows efficient filtering, as well as
-   * making it easier to use the occurrence.
-   * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - * @return The distribution. - */ - @java.lang.Override - public io.grafeas.v1.UpgradeDistribution getDistribution() { - return distribution_ == null ? io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; - } - /** - *
-   * Metadata about the upgrade for available for the specific operating system
-   * for the resource_url. This allows efficient filtering, as well as
-   * making it easier to use the occurrence.
-   * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - @java.lang.Override - public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder() { - return distribution_ == null ? io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; - } - - public static final int WINDOWS_UPDATE_FIELD_NUMBER = 5; - private io.grafeas.v1.WindowsUpdate windowsUpdate_; - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - * @return Whether the windowsUpdate field is set. - */ - @java.lang.Override - public boolean hasWindowsUpdate() { - return windowsUpdate_ != null; - } - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - * @return The windowsUpdate. - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { - return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { - return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, package_); - } - if (parsedVersion_ != null) { - output.writeMessage(3, getParsedVersion()); - } - if (distribution_ != null) { - output.writeMessage(4, getDistribution()); - } - if (windowsUpdate_ != null) { - output.writeMessage(5, getWindowsUpdate()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(package_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, package_); - } - if (parsedVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getParsedVersion()); - } - if (distribution_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getDistribution()); - } - if (windowsUpdate_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getWindowsUpdate()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.UpgradeOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.UpgradeOccurrence other = (io.grafeas.v1.UpgradeOccurrence) obj; - - if (!getPackage() - .equals(other.getPackage())) return false; - if (hasParsedVersion() != other.hasParsedVersion()) return false; - if (hasParsedVersion()) { - if (!getParsedVersion() - .equals(other.getParsedVersion())) return false; - } - if (hasDistribution() != other.hasDistribution()) return false; - if (hasDistribution()) { - if (!getDistribution() - .equals(other.getDistribution())) return false; - } - if (hasWindowsUpdate() != other.hasWindowsUpdate()) return false; - if (hasWindowsUpdate()) { - if (!getWindowsUpdate() - .equals(other.getWindowsUpdate())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getPackage().hashCode(); - if (hasParsedVersion()) { - hash = (37 * hash) + PARSED_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getParsedVersion().hashCode(); - } - if (hasDistribution()) { - hash = (37 * hash) + DISTRIBUTION_FIELD_NUMBER; - hash = (53 * hash) + getDistribution().hashCode(); - } - if (hasWindowsUpdate()) { - hash = (37 * hash) + WINDOWS_UPDATE_FIELD_NUMBER; - hash = (53 * hash) + getWindowsUpdate().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpgradeOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.UpgradeOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.UpgradeOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An Upgrade Occurrence represents that a specific resource_url could install a
-   * specific upgrade. This presence is supplied via local sources (i.e. it is
-   * present in the mirror and the running system has noticed its availability).
-   * For Windows, both distribution and windows_update contain information for the
-   * Windows update.
-   * 
- * - * Protobuf type {@code grafeas.v1.UpgradeOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeOccurrence) - io.grafeas.v1.UpgradeOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.UpgradeOccurrence.class, io.grafeas.v1.UpgradeOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.UpgradeOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - package_ = ""; - parsedVersion_ = null; - if (parsedVersionBuilder_ != null) { - parsedVersionBuilder_.dispose(); - parsedVersionBuilder_ = null; - } - distribution_ = null; - if (distributionBuilder_ != null) { - distributionBuilder_.dispose(); - distributionBuilder_ = null; - } - windowsUpdate_ = null; - if (windowsUpdateBuilder_ != null) { - windowsUpdateBuilder_.dispose(); - windowsUpdateBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrence build() { - io.grafeas.v1.UpgradeOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrence buildPartial() { - io.grafeas.v1.UpgradeOccurrence result = new io.grafeas.v1.UpgradeOccurrence(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.UpgradeOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.package_ = package_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.parsedVersion_ = parsedVersionBuilder_ == null - ? parsedVersion_ - : parsedVersionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.distribution_ = distributionBuilder_ == null - ? distribution_ - : distributionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.windowsUpdate_ = windowsUpdateBuilder_ == null - ? windowsUpdate_ - : windowsUpdateBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.UpgradeOccurrence) { - return mergeFrom((io.grafeas.v1.UpgradeOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.UpgradeOccurrence other) { - if (other == io.grafeas.v1.UpgradeOccurrence.getDefaultInstance()) return this; - if (!other.getPackage().isEmpty()) { - package_ = other.package_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasParsedVersion()) { - mergeParsedVersion(other.getParsedVersion()); - } - if (other.hasDistribution()) { - mergeDistribution(other.getDistribution()); - } - if (other.hasWindowsUpdate()) { - mergeWindowsUpdate(other.getWindowsUpdate()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - package_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 26: { - input.readMessage( - getParsedVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 26 - case 34: { - input.readMessage( - getDistributionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 34 - case 42: { - input.readMessage( - getWindowsUpdateFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 42 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object package_ = ""; - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @return The package. - */ - public java.lang.String getPackage() { - java.lang.Object ref = package_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - package_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @return The bytes for package. - */ - public com.google.protobuf.ByteString - getPackageBytes() { - java.lang.Object ref = package_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - package_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @param value The package to set. - * @return This builder for chaining. - */ - public Builder setPackage( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - package_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @return This builder for chaining. - */ - public Builder clearPackage() { - package_ = getDefaultInstance().getPackage(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The package this Upgrade is for.
-     * 
- * - * string package = 1; - * @param value The bytes for package to set. - * @return This builder for chaining. - */ - public Builder setPackageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - package_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.grafeas.v1.Version parsedVersion_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> parsedVersionBuilder_; - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - * @return Whether the parsedVersion field is set. - */ - public boolean hasParsedVersion() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - * @return The parsedVersion. - */ - public io.grafeas.v1.Version getParsedVersion() { - if (parsedVersionBuilder_ == null) { - return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; - } else { - return parsedVersionBuilder_.getMessage(); - } - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - public Builder setParsedVersion(io.grafeas.v1.Version value) { - if (parsedVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parsedVersion_ = value; - } else { - parsedVersionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - public Builder setParsedVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (parsedVersionBuilder_ == null) { - parsedVersion_ = builderForValue.build(); - } else { - parsedVersionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - public Builder mergeParsedVersion(io.grafeas.v1.Version value) { - if (parsedVersionBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - parsedVersion_ != null && - parsedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { - getParsedVersionBuilder().mergeFrom(value); - } else { - parsedVersion_ = value; - } - } else { - parsedVersionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - public Builder clearParsedVersion() { - bitField0_ = (bitField0_ & ~0x00000002); - parsedVersion_ = null; - if (parsedVersionBuilder_ != null) { - parsedVersionBuilder_.dispose(); - parsedVersionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - public io.grafeas.v1.Version.Builder getParsedVersionBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getParsedVersionFieldBuilder().getBuilder(); - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - public io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder() { - if (parsedVersionBuilder_ != null) { - return parsedVersionBuilder_.getMessageOrBuilder(); - } else { - return parsedVersion_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; - } - } - /** - *
-     * Required for non-Windows OS. The version of the package in a machine +
-     * human readable form.
-     * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getParsedVersionFieldBuilder() { - if (parsedVersionBuilder_ == null) { - parsedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getParsedVersion(), - getParentForChildren(), - isClean()); - parsedVersion_ = null; - } - return parsedVersionBuilder_; - } - - private io.grafeas.v1.UpgradeDistribution distribution_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> distributionBuilder_; - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - * @return Whether the distribution field is set. - */ - public boolean hasDistribution() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - * @return The distribution. - */ - public io.grafeas.v1.UpgradeDistribution getDistribution() { - if (distributionBuilder_ == null) { - return distribution_ == null ? io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; - } else { - return distributionBuilder_.getMessage(); - } - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - public Builder setDistribution(io.grafeas.v1.UpgradeDistribution value) { - if (distributionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - distribution_ = value; - } else { - distributionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - public Builder setDistribution( - io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { - if (distributionBuilder_ == null) { - distribution_ = builderForValue.build(); - } else { - distributionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - public Builder mergeDistribution(io.grafeas.v1.UpgradeDistribution value) { - if (distributionBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - distribution_ != null && - distribution_ != io.grafeas.v1.UpgradeDistribution.getDefaultInstance()) { - getDistributionBuilder().mergeFrom(value); - } else { - distribution_ = value; - } - } else { - distributionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - public Builder clearDistribution() { - bitField0_ = (bitField0_ & ~0x00000004); - distribution_ = null; - if (distributionBuilder_ != null) { - distributionBuilder_.dispose(); - distributionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - public io.grafeas.v1.UpgradeDistribution.Builder getDistributionBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getDistributionFieldBuilder().getBuilder(); - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder() { - if (distributionBuilder_ != null) { - return distributionBuilder_.getMessageOrBuilder(); - } else { - return distribution_ == null ? - io.grafeas.v1.UpgradeDistribution.getDefaultInstance() : distribution_; - } - } - /** - *
-     * Metadata about the upgrade for available for the specific operating system
-     * for the resource_url. This allows efficient filtering, as well as
-     * making it easier to use the occurrence.
-     * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder> - getDistributionFieldBuilder() { - if (distributionBuilder_ == null) { - distributionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.UpgradeDistribution, io.grafeas.v1.UpgradeDistribution.Builder, io.grafeas.v1.UpgradeDistributionOrBuilder>( - getDistribution(), - getParentForChildren(), - isClean()); - distribution_ = null; - } - return distributionBuilder_; - } - - private io.grafeas.v1.WindowsUpdate windowsUpdate_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> windowsUpdateBuilder_; - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - * @return Whether the windowsUpdate field is set. - */ - public boolean hasWindowsUpdate() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - * @return The windowsUpdate. - */ - public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { - if (windowsUpdateBuilder_ == null) { - return windowsUpdate_ == null ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } else { - return windowsUpdateBuilder_.getMessage(); - } - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - public Builder setWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { - if (windowsUpdateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - windowsUpdate_ = value; - } else { - windowsUpdateBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - public Builder setWindowsUpdate( - io.grafeas.v1.WindowsUpdate.Builder builderForValue) { - if (windowsUpdateBuilder_ == null) { - windowsUpdate_ = builderForValue.build(); - } else { - windowsUpdateBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - public Builder mergeWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { - if (windowsUpdateBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - windowsUpdate_ != null && - windowsUpdate_ != io.grafeas.v1.WindowsUpdate.getDefaultInstance()) { - getWindowsUpdateBuilder().mergeFrom(value); - } else { - windowsUpdate_ = value; - } - } else { - windowsUpdateBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - public Builder clearWindowsUpdate() { - bitField0_ = (bitField0_ & ~0x00000008); - windowsUpdate_ = null; - if (windowsUpdateBuilder_ != null) { - windowsUpdateBuilder_.dispose(); - windowsUpdateBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - public io.grafeas.v1.WindowsUpdate.Builder getWindowsUpdateBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getWindowsUpdateFieldBuilder().getBuilder(); - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { - if (windowsUpdateBuilder_ != null) { - return windowsUpdateBuilder_.getMessageOrBuilder(); - } else { - return windowsUpdate_ == null ? - io.grafeas.v1.WindowsUpdate.getDefaultInstance() : windowsUpdate_; - } - } - /** - *
-     * Required for Windows OS. Represents the metadata about the Windows update.
-     * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder> - getWindowsUpdateFieldBuilder() { - if (windowsUpdateBuilder_ == null) { - windowsUpdateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate, io.grafeas.v1.WindowsUpdate.Builder, io.grafeas.v1.WindowsUpdateOrBuilder>( - getWindowsUpdate(), - getParentForChildren(), - isClean()); - windowsUpdate_ = null; - } - return windowsUpdateBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.UpgradeOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeOccurrence) - private static final io.grafeas.v1.UpgradeOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeOccurrence(); - } - - public static io.grafeas.v1.UpgradeOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpgradeOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.UpgradeOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java deleted file mode 100644 index 0b38a1018b82..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java +++ /dev/null @@ -1,119 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -public interface UpgradeOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.UpgradeOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The package. - */ - java.lang.String getPackage(); - /** - *
-   * Required for non-Windows OS. The package this Upgrade is for.
-   * 
- * - * string package = 1; - * @return The bytes for package. - */ - com.google.protobuf.ByteString - getPackageBytes(); - - /** - *
-   * Required for non-Windows OS. The version of the package in a machine +
-   * human readable form.
-   * 
- * - * .grafeas.v1.Version parsed_version = 3; - * @return Whether the parsedVersion field is set. - */ - boolean hasParsedVersion(); - /** - *
-   * Required for non-Windows OS. The version of the package in a machine +
-   * human readable form.
-   * 
- * - * .grafeas.v1.Version parsed_version = 3; - * @return The parsedVersion. - */ - io.grafeas.v1.Version getParsedVersion(); - /** - *
-   * Required for non-Windows OS. The version of the package in a machine +
-   * human readable form.
-   * 
- * - * .grafeas.v1.Version parsed_version = 3; - */ - io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder(); - - /** - *
-   * Metadata about the upgrade for available for the specific operating system
-   * for the resource_url. This allows efficient filtering, as well as
-   * making it easier to use the occurrence.
-   * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - * @return Whether the distribution field is set. - */ - boolean hasDistribution(); - /** - *
-   * Metadata about the upgrade for available for the specific operating system
-   * for the resource_url. This allows efficient filtering, as well as
-   * making it easier to use the occurrence.
-   * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - * @return The distribution. - */ - io.grafeas.v1.UpgradeDistribution getDistribution(); - /** - *
-   * Metadata about the upgrade for available for the specific operating system
-   * for the resource_url. This allows efficient filtering, as well as
-   * making it easier to use the occurrence.
-   * 
- * - * .grafeas.v1.UpgradeDistribution distribution = 4; - */ - io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder(); - - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - * @return Whether the windowsUpdate field is set. - */ - boolean hasWindowsUpdate(); - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - * @return The windowsUpdate. - */ - io.grafeas.v1.WindowsUpdate getWindowsUpdate(); - /** - *
-   * Required for Windows OS. Represents the metadata about the Windows update.
-   * 
- * - * .grafeas.v1.WindowsUpdate windows_update = 5; - */ - io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java deleted file mode 100644 index 327a4d2a0671..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Version.java +++ /dev/null @@ -1,1398 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -/** - *
- * Version contains structured information about the version of a package.
- * 
- * - * Protobuf type {@code grafeas.v1.Version} - */ -public final class Version extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.Version) - VersionOrBuilder { -private static final long serialVersionUID = 0L; - // Use Version.newBuilder() to construct. - private Version(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Version() { - name_ = ""; - revision_ = ""; - kind_ = 0; - fullName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Version(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Version.class, io.grafeas.v1.Version.Builder.class); - } - - /** - *
-   * Whether this is an ordinary package version or a sentinel MIN/MAX version.
-   * 
- * - * Protobuf enum {@code grafeas.v1.Version.VersionKind} - */ - public enum VersionKind - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown.
-     * 
- * - * VERSION_KIND_UNSPECIFIED = 0; - */ - VERSION_KIND_UNSPECIFIED(0), - /** - *
-     * A standard package version.
-     * 
- * - * NORMAL = 1; - */ - NORMAL(1), - /** - *
-     * A special version representing negative infinity.
-     * 
- * - * MINIMUM = 2; - */ - MINIMUM(2), - /** - *
-     * A special version representing positive infinity.
-     * 
- * - * MAXIMUM = 3; - */ - MAXIMUM(3), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unknown.
-     * 
- * - * VERSION_KIND_UNSPECIFIED = 0; - */ - public static final int VERSION_KIND_UNSPECIFIED_VALUE = 0; - /** - *
-     * A standard package version.
-     * 
- * - * NORMAL = 1; - */ - public static final int NORMAL_VALUE = 1; - /** - *
-     * A special version representing negative infinity.
-     * 
- * - * MINIMUM = 2; - */ - public static final int MINIMUM_VALUE = 2; - /** - *
-     * A special version representing positive infinity.
-     * 
- * - * MAXIMUM = 3; - */ - public static final int MAXIMUM_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static VersionKind valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static VersionKind forNumber(int value) { - switch (value) { - case 0: return VERSION_KIND_UNSPECIFIED; - case 1: return NORMAL; - case 2: return MINIMUM; - case 3: return MAXIMUM; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - VersionKind> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public VersionKind findValueByNumber(int number) { - return VersionKind.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grafeas.v1.Version.getDescriptor().getEnumTypes().get(0); - } - - private static final VersionKind[] VALUES = values(); - - public static VersionKind valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private VersionKind(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grafeas.v1.Version.VersionKind) - } - - public static final int EPOCH_FIELD_NUMBER = 1; - private int epoch_ = 0; - /** - *
-   * Used to correct mistakes in the version numbering scheme.
-   * 
- * - * int32 epoch = 1; - * @return The epoch. - */ - @java.lang.Override - public int getEpoch() { - return epoch_; - } - - public static final int NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * Required only when version kind is NORMAL. The main part of the version
-   * name.
-   * 
- * - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required only when version kind is NORMAL. The main part of the version
-   * name.
-   * 
- * - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REVISION_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object revision_ = ""; - /** - *
-   * The iteration of the package build from the above version.
-   * 
- * - * string revision = 3; - * @return The revision. - */ - @java.lang.Override - public java.lang.String getRevision() { - java.lang.Object ref = revision_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revision_ = s; - return s; - } - } - /** - *
-   * The iteration of the package build from the above version.
-   * 
- * - * string revision = 3; - * @return The bytes for revision. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRevisionBytes() { - java.lang.Object ref = revision_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revision_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INCLUSIVE_FIELD_NUMBER = 6; - private boolean inclusive_ = false; - /** - *
-   * Whether this version is specifying part of an inclusive range. Grafeas
-   * does not have the capability to specify version ranges; instead we have
-   * fields that specify start version and end versions. At times this is
-   * insufficient - we also need to specify whether the version is included in
-   * the range or is excluded from the range. This boolean is expected to be set
-   * to true when the version is included in a range.
-   * 
- * - * bool inclusive = 6; - * @return The inclusive. - */ - @java.lang.Override - public boolean getInclusive() { - return inclusive_; - } - - public static final int KIND_FIELD_NUMBER = 4; - private int kind_ = 0; - /** - *
-   * Required. Distinguishes between sentinel MIN/MAX versions and normal
-   * versions.
-   * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-   * Required. Distinguishes between sentinel MIN/MAX versions and normal
-   * versions.
-   * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @return The kind. - */ - @java.lang.Override public io.grafeas.v1.Version.VersionKind getKind() { - io.grafeas.v1.Version.VersionKind result = io.grafeas.v1.Version.VersionKind.forNumber(kind_); - return result == null ? io.grafeas.v1.Version.VersionKind.UNRECOGNIZED : result; - } - - public static final int FULL_NAME_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object fullName_ = ""; - /** - *
-   * Human readable version string. This string is of the form
-   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-   * 
- * - * string full_name = 5; - * @return The fullName. - */ - @java.lang.Override - public java.lang.String getFullName() { - java.lang.Object ref = fullName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullName_ = s; - return s; - } - } - /** - *
-   * Human readable version string. This string is of the form
-   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-   * 
- * - * string full_name = 5; - * @return The bytes for fullName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFullNameBytes() { - java.lang.Object ref = fullName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (epoch_ != 0) { - output.writeInt32(1, epoch_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, revision_); - } - if (kind_ != io.grafeas.v1.Version.VersionKind.VERSION_KIND_UNSPECIFIED.getNumber()) { - output.writeEnum(4, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fullName_); - } - if (inclusive_ != false) { - output.writeBool(6, inclusive_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (epoch_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, epoch_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, revision_); - } - if (kind_ != io.grafeas.v1.Version.VersionKind.VERSION_KIND_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, fullName_); - } - if (inclusive_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, inclusive_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.Version)) { - return super.equals(obj); - } - io.grafeas.v1.Version other = (io.grafeas.v1.Version) obj; - - if (getEpoch() - != other.getEpoch()) return false; - if (!getName() - .equals(other.getName())) return false; - if (!getRevision() - .equals(other.getRevision())) return false; - if (getInclusive() - != other.getInclusive()) return false; - if (kind_ != other.kind_) return false; - if (!getFullName() - .equals(other.getFullName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + EPOCH_FIELD_NUMBER; - hash = (53 * hash) + getEpoch(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + REVISION_FIELD_NUMBER; - hash = (53 * hash) + getRevision().hashCode(); - hash = (37 * hash) + INCLUSIVE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getInclusive()); - hash = (37 * hash) + KIND_FIELD_NUMBER; - hash = (53 * hash) + kind_; - hash = (37 * hash) + FULL_NAME_FIELD_NUMBER; - hash = (53 * hash) + getFullName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.Version parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Version parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Version parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Version parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Version parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.Version parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.Version parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Version parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Version parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.Version parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.Version parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.Version parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.Version prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Version contains structured information about the version of a package.
-   * 
- * - * Protobuf type {@code grafeas.v1.Version} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.Version) - io.grafeas.v1.VersionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.Version.class, io.grafeas.v1.Version.Builder.class); - } - - // Construct using io.grafeas.v1.Version.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - epoch_ = 0; - name_ = ""; - revision_ = ""; - inclusive_ = false; - kind_ = 0; - fullName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_Version_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.Version getDefaultInstanceForType() { - return io.grafeas.v1.Version.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.Version build() { - io.grafeas.v1.Version result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.Version buildPartial() { - io.grafeas.v1.Version result = new io.grafeas.v1.Version(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.Version result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.epoch_ = epoch_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.revision_ = revision_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.inclusive_ = inclusive_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.kind_ = kind_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.fullName_ = fullName_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.Version) { - return mergeFrom((io.grafeas.v1.Version)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.Version other) { - if (other == io.grafeas.v1.Version.getDefaultInstance()) return this; - if (other.getEpoch() != 0) { - setEpoch(other.getEpoch()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getRevision().isEmpty()) { - revision_ = other.revision_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.getInclusive() != false) { - setInclusive(other.getInclusive()); - } - if (other.kind_ != 0) { - setKindValue(other.getKindValue()); - } - if (!other.getFullName().isEmpty()) { - fullName_ = other.fullName_; - bitField0_ |= 0x00000020; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - epoch_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - revision_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: { - kind_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 32 - case 42: { - fullName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 42 - case 48: { - inclusive_ = input.readBool(); - bitField0_ |= 0x00000008; - break; - } // case 48 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int epoch_ ; - /** - *
-     * Used to correct mistakes in the version numbering scheme.
-     * 
- * - * int32 epoch = 1; - * @return The epoch. - */ - @java.lang.Override - public int getEpoch() { - return epoch_; - } - /** - *
-     * Used to correct mistakes in the version numbering scheme.
-     * 
- * - * int32 epoch = 1; - * @param value The epoch to set. - * @return This builder for chaining. - */ - public Builder setEpoch(int value) { - - epoch_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Used to correct mistakes in the version numbering scheme.
-     * 
- * - * int32 epoch = 1; - * @return This builder for chaining. - */ - public Builder clearEpoch() { - bitField0_ = (bitField0_ & ~0x00000001); - epoch_ = 0; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required only when version kind is NORMAL. The main part of the version
-     * name.
-     * 
- * - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required only when version kind is NORMAL. The main part of the version
-     * name.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required only when version kind is NORMAL. The main part of the version
-     * name.
-     * 
- * - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Required only when version kind is NORMAL. The main part of the version
-     * name.
-     * 
- * - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Required only when version kind is NORMAL. The main part of the version
-     * name.
-     * 
- * - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object revision_ = ""; - /** - *
-     * The iteration of the package build from the above version.
-     * 
- * - * string revision = 3; - * @return The revision. - */ - public java.lang.String getRevision() { - java.lang.Object ref = revision_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revision_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The iteration of the package build from the above version.
-     * 
- * - * string revision = 3; - * @return The bytes for revision. - */ - public com.google.protobuf.ByteString - getRevisionBytes() { - java.lang.Object ref = revision_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revision_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The iteration of the package build from the above version.
-     * 
- * - * string revision = 3; - * @param value The revision to set. - * @return This builder for chaining. - */ - public Builder setRevision( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - revision_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The iteration of the package build from the above version.
-     * 
- * - * string revision = 3; - * @return This builder for chaining. - */ - public Builder clearRevision() { - revision_ = getDefaultInstance().getRevision(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The iteration of the package build from the above version.
-     * 
- * - * string revision = 3; - * @param value The bytes for revision to set. - * @return This builder for chaining. - */ - public Builder setRevisionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - revision_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private boolean inclusive_ ; - /** - *
-     * Whether this version is specifying part of an inclusive range. Grafeas
-     * does not have the capability to specify version ranges; instead we have
-     * fields that specify start version and end versions. At times this is
-     * insufficient - we also need to specify whether the version is included in
-     * the range or is excluded from the range. This boolean is expected to be set
-     * to true when the version is included in a range.
-     * 
- * - * bool inclusive = 6; - * @return The inclusive. - */ - @java.lang.Override - public boolean getInclusive() { - return inclusive_; - } - /** - *
-     * Whether this version is specifying part of an inclusive range. Grafeas
-     * does not have the capability to specify version ranges; instead we have
-     * fields that specify start version and end versions. At times this is
-     * insufficient - we also need to specify whether the version is included in
-     * the range or is excluded from the range. This boolean is expected to be set
-     * to true when the version is included in a range.
-     * 
- * - * bool inclusive = 6; - * @param value The inclusive to set. - * @return This builder for chaining. - */ - public Builder setInclusive(boolean value) { - - inclusive_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Whether this version is specifying part of an inclusive range. Grafeas
-     * does not have the capability to specify version ranges; instead we have
-     * fields that specify start version and end versions. At times this is
-     * insufficient - we also need to specify whether the version is included in
-     * the range or is excluded from the range. This boolean is expected to be set
-     * to true when the version is included in a range.
-     * 
- * - * bool inclusive = 6; - * @return This builder for chaining. - */ - public Builder clearInclusive() { - bitField0_ = (bitField0_ & ~0x00000008); - inclusive_ = false; - onChanged(); - return this; - } - - private int kind_ = 0; - /** - *
-     * Required. Distinguishes between sentinel MIN/MAX versions and normal
-     * versions.
-     * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-     * Required. Distinguishes between sentinel MIN/MAX versions and normal
-     * versions.
-     * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @param value The enum numeric value on the wire for kind to set. - * @return This builder for chaining. - */ - public Builder setKindValue(int value) { - kind_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Required. Distinguishes between sentinel MIN/MAX versions and normal
-     * versions.
-     * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @return The kind. - */ - @java.lang.Override - public io.grafeas.v1.Version.VersionKind getKind() { - io.grafeas.v1.Version.VersionKind result = io.grafeas.v1.Version.VersionKind.forNumber(kind_); - return result == null ? io.grafeas.v1.Version.VersionKind.UNRECOGNIZED : result; - } - /** - *
-     * Required. Distinguishes between sentinel MIN/MAX versions and normal
-     * versions.
-     * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @param value The kind to set. - * @return This builder for chaining. - */ - public Builder setKind(io.grafeas.v1.Version.VersionKind value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - kind_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Required. Distinguishes between sentinel MIN/MAX versions and normal
-     * versions.
-     * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @return This builder for chaining. - */ - public Builder clearKind() { - bitField0_ = (bitField0_ & ~0x00000010); - kind_ = 0; - onChanged(); - return this; - } - - private java.lang.Object fullName_ = ""; - /** - *
-     * Human readable version string. This string is of the form
-     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-     * 
- * - * string full_name = 5; - * @return The fullName. - */ - public java.lang.String getFullName() { - java.lang.Object ref = fullName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Human readable version string. This string is of the form
-     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-     * 
- * - * string full_name = 5; - * @return The bytes for fullName. - */ - public com.google.protobuf.ByteString - getFullNameBytes() { - java.lang.Object ref = fullName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Human readable version string. This string is of the form
-     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-     * 
- * - * string full_name = 5; - * @param value The fullName to set. - * @return This builder for chaining. - */ - public Builder setFullName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fullName_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Human readable version string. This string is of the form
-     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-     * 
- * - * string full_name = 5; - * @return This builder for chaining. - */ - public Builder clearFullName() { - fullName_ = getDefaultInstance().getFullName(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * Human readable version string. This string is of the form
-     * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-     * 
- * - * string full_name = 5; - * @param value The bytes for fullName to set. - * @return This builder for chaining. - */ - public Builder setFullNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fullName_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.Version) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.Version) - private static final io.grafeas.v1.Version DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.Version(); - } - - public static io.grafeas.v1.Version getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Version parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.Version getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java deleted file mode 100644 index 07895ef1f299..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VersionOrBuilder.java +++ /dev/null @@ -1,119 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/package.proto - -package io.grafeas.v1; - -public interface VersionOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.Version) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Used to correct mistakes in the version numbering scheme.
-   * 
- * - * int32 epoch = 1; - * @return The epoch. - */ - int getEpoch(); - - /** - *
-   * Required only when version kind is NORMAL. The main part of the version
-   * name.
-   * 
- * - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required only when version kind is NORMAL. The main part of the version
-   * name.
-   * 
- * - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The iteration of the package build from the above version.
-   * 
- * - * string revision = 3; - * @return The revision. - */ - java.lang.String getRevision(); - /** - *
-   * The iteration of the package build from the above version.
-   * 
- * - * string revision = 3; - * @return The bytes for revision. - */ - com.google.protobuf.ByteString - getRevisionBytes(); - - /** - *
-   * Whether this version is specifying part of an inclusive range. Grafeas
-   * does not have the capability to specify version ranges; instead we have
-   * fields that specify start version and end versions. At times this is
-   * insufficient - we also need to specify whether the version is included in
-   * the range or is excluded from the range. This boolean is expected to be set
-   * to true when the version is included in a range.
-   * 
- * - * bool inclusive = 6; - * @return The inclusive. - */ - boolean getInclusive(); - - /** - *
-   * Required. Distinguishes between sentinel MIN/MAX versions and normal
-   * versions.
-   * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @return The enum numeric value on the wire for kind. - */ - int getKindValue(); - /** - *
-   * Required. Distinguishes between sentinel MIN/MAX versions and normal
-   * versions.
-   * 
- * - * .grafeas.v1.Version.VersionKind kind = 4; - * @return The kind. - */ - io.grafeas.v1.Version.VersionKind getKind(); - - /** - *
-   * Human readable version string. This string is of the form
-   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-   * 
- * - * string full_name = 5; - * @return The fullName. - */ - java.lang.String getFullName(); - /** - *
-   * Human readable version string. This string is of the form
-   * <epoch>:<name>-<revision> and is only set when kind is NORMAL.
-   * 
- * - * string full_name = 5; - * @return The bytes for fullName. - */ - com.google.protobuf.ByteString - getFullNameBytes(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vex.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vex.java deleted file mode 100644 index c6a1aab7670b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vex.java +++ /dev/null @@ -1,149 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/vex.proto - -package io.grafeas.v1; - -public final class Vex { - private Vex() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\024grafeas/v1/vex.proto\022\ngrafeas.v1\032\027graf" + - "eas/v1/common.proto\"\252\r\n\033VulnerabilityAss" + - "essmentNote\022\r\n\005title\030\001 \001(\t\022\031\n\021short_desc" + - "ription\030\002 \001(\t\022\030\n\020long_description\030\003 \001(\t\022" + - "\025\n\rlanguage_code\030\004 \001(\t\022D\n\tpublisher\030\005 \001(" + - "\01321.grafeas.v1.VulnerabilityAssessmentNo" + - "te.Publisher\022@\n\007product\030\006 \001(\0132/.grafeas." + - "v1.VulnerabilityAssessmentNote.Product\022F" + - "\n\nassessment\030\007 \001(\01322.grafeas.v1.Vulnerab" + - "ilityAssessmentNote.Assessment\032Q\n\tPublis" + - "her\022\014\n\004name\030\001 \001(\t\022\031\n\021issuing_authority\030\002" + - " \001(\t\022\033\n\023publisher_namespace\030\003 \001(\t\032H\n\007Pro" + - "duct\022\014\n\004name\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\025\n\013generi" + - "c_uri\030\003 \001(\tH\000B\014\n\nidentifier\032\302\t\n\nAssessme" + - "nt\022\013\n\003cve\030\001 \001(\t\022\031\n\021short_description\030\002 \001" + - "(\t\022\030\n\020long_description\030\003 \001(\t\022,\n\014related_" + - "uris\030\004 \003(\0132\026.grafeas.v1.RelatedUrl\022G\n\005st" + - "ate\030\005 \001(\01628.grafeas.v1.VulnerabilityAsse" + - "ssmentNote.Assessment.State\022\017\n\007impacts\030\006" + - " \003(\t\022W\n\rjustification\030\007 \001(\0132@.grafeas.v1" + - ".VulnerabilityAssessmentNote.Assessment." + - "Justification\022T\n\014remediations\030\010 \003(\0132>.gr" + - "afeas.v1.VulnerabilityAssessmentNote.Ass" + - "essment.Remediation\032\214\003\n\rJustification\022n\n" + - "\022justification_type\030\001 \001(\0162R.grafeas.v1.V" + - "ulnerabilityAssessmentNote.Assessment.Ju" + - "stification.JustificationType\022\017\n\007details" + - "\030\002 \001(\t\"\371\001\n\021JustificationType\022\"\n\036JUSTIFIC" + - "ATION_TYPE_UNSPECIFIED\020\000\022\031\n\025COMPONENT_NO" + - "T_PRESENT\020\001\022\037\n\033VULNERABLE_CODE_NOT_PRESE" + - "NT\020\002\022\'\n#VULNERABLE_CODE_NOT_IN_EXECUTE_P" + - "ATH\020\003\0225\n1VULNERABLE_CODE_CANNOT_BE_CONTR" + - "OLLED_BY_ADVERSARY\020\004\022$\n INLINE_MITIGATIO" + - "NS_ALREADY_EXIST\020\005\032\307\002\n\013Remediation\022h\n\020re" + - "mediation_type\030\001 \001(\0162N.grafeas.v1.Vulner" + - "abilityAssessmentNote.Assessment.Remedia" + - "tion.RemediationType\022\017\n\007details\030\002 \001(\t\022/\n" + - "\017remediation_uri\030\003 \001(\0132\026.grafeas.v1.Rela" + - "tedUrl\"\213\001\n\017RemediationType\022 \n\034REMEDIATIO" + - "N_TYPE_UNSPECIFIED\020\000\022\016\n\nMITIGATION\020\001\022\022\n\016" + - "NO_FIX_PLANNED\020\002\022\022\n\016NONE_AVAILABLE\020\003\022\016\n\n" + - "VENDOR_FIX\020\004\022\016\n\nWORKAROUND\020\005\"b\n\005State\022\025\n" + - "\021STATE_UNSPECIFIED\020\000\022\014\n\010AFFECTED\020\001\022\020\n\014NO" + - "T_AFFECTED\020\002\022\t\n\005FIXED\020\003\022\027\n\023UNDER_INVESTI" + - "GATION\020\004BQ\n\rio.grafeas.v1P\001Z8google.gola" + - "ng.org/genproto/googleapis/grafeas/v1;gr" + - "afeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.grafeas.v1.Common.getDescriptor(), - }); - internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor, - new java.lang.String[] { "Title", "ShortDescription", "LongDescription", "LanguageCode", "Publisher", "Product", "Assessment", }); - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor = - internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor, - new java.lang.String[] { "Name", "IssuingAuthority", "PublisherNamespace", }); - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor = - internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor.getNestedTypes().get(1); - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor, - new java.lang.String[] { "Name", "Id", "GenericUri", "Identifier", }); - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor = - internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor.getNestedTypes().get(2); - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor, - new java.lang.String[] { "Cve", "ShortDescription", "LongDescription", "RelatedUris", "State", "Impacts", "Justification", "Remediations", }); - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor = - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor, - new java.lang.String[] { "JustificationType", "Details", }); - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor = - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor.getNestedTypes().get(1); - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor, - new java.lang.String[] { "RemediationType", "Details", "RemediationUri", }); - io.grafeas.v1.Common.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java deleted file mode 100644 index 8ed5bc66fe1b..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/Vulnerability.java +++ /dev/null @@ -1,195 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/vulnerability.proto - -package io.grafeas.v1; - -public final class Vulnerability { - private Vulnerability() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityNote_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\036grafeas/v1/vulnerability.proto\022\ngrafea" + - "s.v1\032\037google/api/field_behavior.proto\032\037g" + - "oogle/protobuf/timestamp.proto\032\027grafeas/" + - "v1/common.proto\032\025grafeas/v1/cvss.proto\032\030" + - "grafeas/v1/package.proto\032\031grafeas/v1/sev" + - "erity.proto\032\024grafeas/v1/vex.proto\"\354\007\n\021Vu" + - "lnerabilityNote\022\022\n\ncvss_score\030\001 \001(\002\022&\n\010s" + - "everity\030\002 \001(\0162\024.grafeas.v1.Severity\0225\n\007d" + - "etails\030\003 \003(\0132$.grafeas.v1.VulnerabilityN" + - "ote.Detail\022#\n\007cvss_v3\030\004 \001(\0132\022.grafeas.v1" + - ".CVSSv3\022D\n\017windows_details\030\005 \003(\0132+.grafe" + - "as.v1.VulnerabilityNote.WindowsDetail\0226\n" + - "\022source_update_time\030\006 \001(\0132\032.google.proto" + - "buf.Timestamp\022-\n\014cvss_version\030\007 \001(\0162\027.gr" + - "afeas.v1.CVSSVersion\022!\n\007cvss_v2\030\010 \001(\0132\020." + - "grafeas.v1.CVSS\032\255\003\n\006Detail\022\025\n\rseverity_n" + - "ame\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\024\n\014packag" + - "e_type\030\003 \001(\t\022\030\n\020affected_cpe_uri\030\004 \001(\t\022\030" + - "\n\020affected_package\030\005 \001(\t\0223\n\026affected_ver" + - "sion_start\030\006 \001(\0132\023.grafeas.v1.Version\0221\n" + - "\024affected_version_end\030\007 \001(\0132\023.grafeas.v1" + - ".Version\022\025\n\rfixed_cpe_uri\030\010 \001(\t\022\025\n\rfixed" + - "_package\030\t \001(\t\022*\n\rfixed_version\030\n \001(\0132\023." + - "grafeas.v1.Version\022\023\n\013is_obsolete\030\013 \001(\010\022" + - "6\n\022source_update_time\030\014 \001(\0132\032.google.pro" + - "tobuf.Timestamp\022\016\n\006source\030\r \001(\t\022\016\n\006vendo" + - "r\030\016 \001(\t\032\276\001\n\rWindowsDetail\022\017\n\007cpe_uri\030\001 \001" + - "(\t\022\014\n\004name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022M\n" + - "\nfixing_kbs\030\004 \003(\01329.grafeas.v1.Vulnerabi" + - "lityNote.WindowsDetail.KnowledgeBase\032*\n\r" + - "KnowledgeBase\022\014\n\004name\030\001 \001(\t\022\013\n\003url\030\002 \001(\t" + - "\"\343\t\n\027VulnerabilityOccurrence\022\014\n\004type\030\001 \001" + - "(\t\022&\n\010severity\030\002 \001(\0162\024.grafeas.v1.Severi" + - "ty\022\022\n\ncvss_score\030\003 \001(\002\022 \n\006cvssv3\030\n \001(\0132\020" + - ".grafeas.v1.CVSS\022G\n\rpackage_issue\030\004 \003(\0132" + - "0.grafeas.v1.VulnerabilityOccurrence.Pac" + - "kageIssue\022\031\n\021short_description\030\005 \001(\t\022\030\n\020" + - "long_description\030\006 \001(\t\022,\n\014related_urls\030\007" + - " \003(\0132\026.grafeas.v1.RelatedUrl\0220\n\022effectiv" + - "e_severity\030\010 \001(\0162\024.grafeas.v1.Severity\022\025" + - "\n\rfix_available\030\t \001(\010\022-\n\014cvss_version\030\013 " + - "\001(\0162\027.grafeas.v1.CVSSVersion\022!\n\007cvss_v2\030" + - "\014 \001(\0132\020.grafeas.v1.CVSS\022I\n\016vex_assessmen" + - "t\030\r \001(\01321.grafeas.v1.VulnerabilityOccurr" + - "ence.VexAssessment\032\340\002\n\014PackageIssue\022\030\n\020a" + - "ffected_cpe_uri\030\001 \001(\t\022\030\n\020affected_packag" + - "e\030\002 \001(\t\022-\n\020affected_version\030\003 \001(\0132\023.graf" + - "eas.v1.Version\022\025\n\rfixed_cpe_uri\030\004 \001(\t\022\025\n" + - "\rfixed_package\030\005 \001(\t\022*\n\rfixed_version\030\006 " + - "\001(\0132\023.grafeas.v1.Version\022\025\n\rfix_availabl" + - "e\030\007 \001(\010\022\024\n\014package_type\030\010 \001(\t\0225\n\022effecti" + - "ve_severity\030\t \001(\0162\024.grafeas.v1.SeverityB" + - "\003\340A\003\022/\n\rfile_location\030\n \003(\0132\030.grafeas.v1" + - ".FileLocation\032\346\002\n\rVexAssessment\022\013\n\003cve\030\001" + - " \001(\t\022,\n\014related_uris\030\002 \003(\0132\026.grafeas.v1." + - "RelatedUrl\022\021\n\tnote_name\030\003 \001(\t\022G\n\005state\030\004" + - " \001(\01628.grafeas.v1.VulnerabilityAssessmen" + - "tNote.Assessment.State\022\017\n\007impacts\030\005 \003(\t\022" + - "T\n\014remediations\030\006 \003(\0132>.grafeas.v1.Vulne" + - "rabilityAssessmentNote.Assessment.Remedi" + - "ation\022W\n\rjustification\030\007 \001(\0132@.grafeas.v" + - "1.VulnerabilityAssessmentNote.Assessment" + - ".JustificationBQ\n\rio.grafeas.v1P\001Z8googl" + - "e.golang.org/genproto/googleapis/grafeas" + - "/v1;grafeas\242\002\003GRAb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - io.grafeas.v1.Common.getDescriptor(), - io.grafeas.v1.CVSSProto.getDescriptor(), - io.grafeas.v1.Package.getDescriptor(), - io.grafeas.v1.SeverityOuterClass.getDescriptor(), - io.grafeas.v1.Vex.getDescriptor(), - }); - internal_static_grafeas_v1_VulnerabilityNote_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityNote_descriptor, - new java.lang.String[] { "CvssScore", "Severity", "Details", "CvssV3", "WindowsDetails", "SourceUpdateTime", "CvssVersion", "CvssV2", }); - internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor = - internal_static_grafeas_v1_VulnerabilityNote_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor, - new java.lang.String[] { "SeverityName", "Description", "PackageType", "AffectedCpeUri", "AffectedPackage", "AffectedVersionStart", "AffectedVersionEnd", "FixedCpeUri", "FixedPackage", "FixedVersion", "IsObsolete", "SourceUpdateTime", "Source", "Vendor", }); - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor = - internal_static_grafeas_v1_VulnerabilityNote_descriptor.getNestedTypes().get(1); - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor, - new java.lang.String[] { "CpeUri", "Name", "Description", "FixingKbs", }); - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor = - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor, - new java.lang.String[] { "Name", "Url", }); - internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor, - new java.lang.String[] { "Type", "Severity", "CvssScore", "Cvssv3", "PackageIssue", "ShortDescription", "LongDescription", "RelatedUrls", "EffectiveSeverity", "FixAvailable", "CvssVersion", "CvssV2", "VexAssessment", }); - internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor = - internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor.getNestedTypes().get(0); - internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor, - new java.lang.String[] { "AffectedCpeUri", "AffectedPackage", "AffectedVersion", "FixedCpeUri", "FixedPackage", "FixedVersion", "FixAvailable", "PackageType", "EffectiveSeverity", "FileLocation", }); - internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor = - internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor.getNestedTypes().get(1); - internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor, - new java.lang.String[] { "Cve", "RelatedUris", "NoteName", "State", "Impacts", "Remediations", "Justification", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - io.grafeas.v1.Common.getDescriptor(); - io.grafeas.v1.CVSSProto.getDescriptor(); - io.grafeas.v1.Package.getDescriptor(); - io.grafeas.v1.SeverityOuterClass.getDescriptor(); - io.grafeas.v1.Vex.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java deleted file mode 100644 index 30c6784762cc..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNote.java +++ /dev/null @@ -1,8231 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/vulnerability.proto - -package io.grafeas.v1; - -/** - *
- * A security vulnerability that can be found in resources.
- * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityNote} - */ -public final class VulnerabilityNote extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote) - VulnerabilityNoteOrBuilder { -private static final long serialVersionUID = 0L; - // Use VulnerabilityNote.newBuilder() to construct. - private VulnerabilityNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private VulnerabilityNote() { - severity_ = 0; - details_ = java.util.Collections.emptyList(); - windowsDetails_ = java.util.Collections.emptyList(); - cvssVersion_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new VulnerabilityNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.class, io.grafeas.v1.VulnerabilityNote.Builder.class); - } - - public interface DetailOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote.Detail) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The distro assigned severity of this vulnerability.
-     * 
- * - * string severity_name = 1; - * @return The severityName. - */ - java.lang.String getSeverityName(); - /** - *
-     * The distro assigned severity of this vulnerability.
-     * 
- * - * string severity_name = 1; - * @return The bytes for severityName. - */ - com.google.protobuf.ByteString - getSeverityNameBytes(); - - /** - *
-     * A vendor-specific description of this vulnerability.
-     * 
- * - * string description = 2; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-     * A vendor-specific description of this vulnerability.
-     * 
- * - * string description = 2; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3; - * @return The packageType. - */ - java.lang.String getPackageType(); - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3; - * @return The bytes for packageType. - */ - com.google.protobuf.ByteString - getPackageTypeBytes(); - - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string affected_cpe_uri = 4; - * @return The affectedCpeUri. - */ - java.lang.String getAffectedCpeUri(); - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string affected_cpe_uri = 4; - * @return The bytes for affectedCpeUri. - */ - com.google.protobuf.ByteString - getAffectedCpeUriBytes(); - - /** - *
-     * Required. The package this vulnerability affects.
-     * 
- * - * string affected_package = 5; - * @return The affectedPackage. - */ - java.lang.String getAffectedPackage(); - /** - *
-     * Required. The package this vulnerability affects.
-     * 
- * - * string affected_package = 5; - * @return The bytes for affectedPackage. - */ - com.google.protobuf.ByteString - getAffectedPackageBytes(); - - /** - *
-     * The version number at the start of an interval in which this
-     * vulnerability exists. A vulnerability can affect a package between
-     * version numbers that are disjoint sets of intervals (example:
-     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-     * represented in its own Detail. If a specific affected version is provided
-     * by a vulnerability database, affected_version_start and
-     * affected_version_end will be the same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_start = 6; - * @return Whether the affectedVersionStart field is set. - */ - boolean hasAffectedVersionStart(); - /** - *
-     * The version number at the start of an interval in which this
-     * vulnerability exists. A vulnerability can affect a package between
-     * version numbers that are disjoint sets of intervals (example:
-     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-     * represented in its own Detail. If a specific affected version is provided
-     * by a vulnerability database, affected_version_start and
-     * affected_version_end will be the same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_start = 6; - * @return The affectedVersionStart. - */ - io.grafeas.v1.Version getAffectedVersionStart(); - /** - *
-     * The version number at the start of an interval in which this
-     * vulnerability exists. A vulnerability can affect a package between
-     * version numbers that are disjoint sets of intervals (example:
-     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-     * represented in its own Detail. If a specific affected version is provided
-     * by a vulnerability database, affected_version_start and
-     * affected_version_end will be the same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - io.grafeas.v1.VersionOrBuilder getAffectedVersionStartOrBuilder(); - - /** - *
-     * The version number at the end of an interval in which this vulnerability
-     * exists. A vulnerability can affect a package between version numbers
-     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-     * own Detail. If a specific affected version is provided by a vulnerability
-     * database, affected_version_start and affected_version_end will be the
-     * same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_end = 7; - * @return Whether the affectedVersionEnd field is set. - */ - boolean hasAffectedVersionEnd(); - /** - *
-     * The version number at the end of an interval in which this vulnerability
-     * exists. A vulnerability can affect a package between version numbers
-     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-     * own Detail. If a specific affected version is provided by a vulnerability
-     * database, affected_version_start and affected_version_end will be the
-     * same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_end = 7; - * @return The affectedVersionEnd. - */ - io.grafeas.v1.Version getAffectedVersionEnd(); - /** - *
-     * The version number at the end of an interval in which this vulnerability
-     * exists. A vulnerability can affect a package between version numbers
-     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-     * own Detail. If a specific affected version is provided by a vulnerability
-     * database, affected_version_start and affected_version_end will be the
-     * same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - io.grafeas.v1.VersionOrBuilder getAffectedVersionEndOrBuilder(); - - /** - *
-     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-     * to update to that contains a fix for this vulnerability. It is possible
-     * for this to be different from the affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 8; - * @return The fixedCpeUri. - */ - java.lang.String getFixedCpeUri(); - /** - *
-     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-     * to update to that contains a fix for this vulnerability. It is possible
-     * for this to be different from the affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 8; - * @return The bytes for fixedCpeUri. - */ - com.google.protobuf.ByteString - getFixedCpeUriBytes(); - - /** - *
-     * The distro recommended package to update to that contains a fix for this
-     * vulnerability. It is possible for this to be different from the
-     * affected_package.
-     * 
- * - * string fixed_package = 9; - * @return The fixedPackage. - */ - java.lang.String getFixedPackage(); - /** - *
-     * The distro recommended package to update to that contains a fix for this
-     * vulnerability. It is possible for this to be different from the
-     * affected_package.
-     * 
- * - * string fixed_package = 9; - * @return The bytes for fixedPackage. - */ - com.google.protobuf.ByteString - getFixedPackageBytes(); - - /** - *
-     * The distro recommended version to update to that contains a
-     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-     * such version is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 10; - * @return Whether the fixedVersion field is set. - */ - boolean hasFixedVersion(); - /** - *
-     * The distro recommended version to update to that contains a
-     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-     * such version is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 10; - * @return The fixedVersion. - */ - io.grafeas.v1.Version getFixedVersion(); - /** - *
-     * The distro recommended version to update to that contains a
-     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-     * such version is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder(); - - /** - *
-     * Whether this detail is obsolete. Occurrences are expected not to point to
-     * obsolete details.
-     * 
- * - * bool is_obsolete = 11; - * @return The isObsolete. - */ - boolean getIsObsolete(); - - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - * @return Whether the sourceUpdateTime field is set. - */ - boolean hasSourceUpdateTime(); - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - * @return The sourceUpdateTime. - */ - com.google.protobuf.Timestamp getSourceUpdateTime(); - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder(); - - /** - *
-     * The source from which the information in this Detail was obtained.
-     * 
- * - * string source = 13; - * @return The source. - */ - java.lang.String getSource(); - /** - *
-     * The source from which the information in this Detail was obtained.
-     * 
- * - * string source = 13; - * @return The bytes for source. - */ - com.google.protobuf.ByteString - getSourceBytes(); - - /** - *
-     * The name of the vendor of the product.
-     * 
- * - * string vendor = 14; - * @return The vendor. - */ - java.lang.String getVendor(); - /** - *
-     * The name of the vendor of the product.
-     * 
- * - * string vendor = 14; - * @return The bytes for vendor. - */ - com.google.protobuf.ByteString - getVendorBytes(); - } - /** - *
-   * A detail for a distro and package affected by this vulnerability and its
-   * associated fix (if one is available).
-   * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityNote.Detail} - */ - public static final class Detail extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote.Detail) - DetailOrBuilder { - private static final long serialVersionUID = 0L; - // Use Detail.newBuilder() to construct. - private Detail(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Detail() { - severityName_ = ""; - description_ = ""; - packageType_ = ""; - affectedCpeUri_ = ""; - affectedPackage_ = ""; - fixedCpeUri_ = ""; - fixedPackage_ = ""; - source_ = ""; - vendor_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Detail(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.Detail.class, io.grafeas.v1.VulnerabilityNote.Detail.Builder.class); - } - - public static final int SEVERITY_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object severityName_ = ""; - /** - *
-     * The distro assigned severity of this vulnerability.
-     * 
- * - * string severity_name = 1; - * @return The severityName. - */ - @java.lang.Override - public java.lang.String getSeverityName() { - java.lang.Object ref = severityName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - severityName_ = s; - return s; - } - } - /** - *
-     * The distro assigned severity of this vulnerability.
-     * 
- * - * string severity_name = 1; - * @return The bytes for severityName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSeverityNameBytes() { - java.lang.Object ref = severityName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - severityName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-     * A vendor-specific description of this vulnerability.
-     * 
- * - * string description = 2; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-     * A vendor-specific description of this vulnerability.
-     * 
- * - * string description = 2; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PACKAGE_TYPE_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object packageType_ = ""; - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3; - * @return The packageType. - */ - @java.lang.Override - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems,
-     * node.js packages, etc.).
-     * 
- * - * string package_type = 3; - * @return The bytes for packageType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AFFECTED_CPE_URI_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object affectedCpeUri_ = ""; - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string affected_cpe_uri = 4; - * @return The affectedCpeUri. - */ - @java.lang.Override - public java.lang.String getAffectedCpeUri() { - java.lang.Object ref = affectedCpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedCpeUri_ = s; - return s; - } - } - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string affected_cpe_uri = 4; - * @return The bytes for affectedCpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAffectedCpeUriBytes() { - java.lang.Object ref = affectedCpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AFFECTED_PACKAGE_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object affectedPackage_ = ""; - /** - *
-     * Required. The package this vulnerability affects.
-     * 
- * - * string affected_package = 5; - * @return The affectedPackage. - */ - @java.lang.Override - public java.lang.String getAffectedPackage() { - java.lang.Object ref = affectedPackage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedPackage_ = s; - return s; - } - } - /** - *
-     * Required. The package this vulnerability affects.
-     * 
- * - * string affected_package = 5; - * @return The bytes for affectedPackage. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAffectedPackageBytes() { - java.lang.Object ref = affectedPackage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AFFECTED_VERSION_START_FIELD_NUMBER = 6; - private io.grafeas.v1.Version affectedVersionStart_; - /** - *
-     * The version number at the start of an interval in which this
-     * vulnerability exists. A vulnerability can affect a package between
-     * version numbers that are disjoint sets of intervals (example:
-     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-     * represented in its own Detail. If a specific affected version is provided
-     * by a vulnerability database, affected_version_start and
-     * affected_version_end will be the same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_start = 6; - * @return Whether the affectedVersionStart field is set. - */ - @java.lang.Override - public boolean hasAffectedVersionStart() { - return affectedVersionStart_ != null; - } - /** - *
-     * The version number at the start of an interval in which this
-     * vulnerability exists. A vulnerability can affect a package between
-     * version numbers that are disjoint sets of intervals (example:
-     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-     * represented in its own Detail. If a specific affected version is provided
-     * by a vulnerability database, affected_version_start and
-     * affected_version_end will be the same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_start = 6; - * @return The affectedVersionStart. - */ - @java.lang.Override - public io.grafeas.v1.Version getAffectedVersionStart() { - return affectedVersionStart_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; - } - /** - *
-     * The version number at the start of an interval in which this
-     * vulnerability exists. A vulnerability can affect a package between
-     * version numbers that are disjoint sets of intervals (example:
-     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-     * represented in its own Detail. If a specific affected version is provided
-     * by a vulnerability database, affected_version_start and
-     * affected_version_end will be the same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getAffectedVersionStartOrBuilder() { - return affectedVersionStart_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; - } - - public static final int AFFECTED_VERSION_END_FIELD_NUMBER = 7; - private io.grafeas.v1.Version affectedVersionEnd_; - /** - *
-     * The version number at the end of an interval in which this vulnerability
-     * exists. A vulnerability can affect a package between version numbers
-     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-     * own Detail. If a specific affected version is provided by a vulnerability
-     * database, affected_version_start and affected_version_end will be the
-     * same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_end = 7; - * @return Whether the affectedVersionEnd field is set. - */ - @java.lang.Override - public boolean hasAffectedVersionEnd() { - return affectedVersionEnd_ != null; - } - /** - *
-     * The version number at the end of an interval in which this vulnerability
-     * exists. A vulnerability can affect a package between version numbers
-     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-     * own Detail. If a specific affected version is provided by a vulnerability
-     * database, affected_version_start and affected_version_end will be the
-     * same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_end = 7; - * @return The affectedVersionEnd. - */ - @java.lang.Override - public io.grafeas.v1.Version getAffectedVersionEnd() { - return affectedVersionEnd_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; - } - /** - *
-     * The version number at the end of an interval in which this vulnerability
-     * exists. A vulnerability can affect a package between version numbers
-     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-     * own Detail. If a specific affected version is provided by a vulnerability
-     * database, affected_version_start and affected_version_end will be the
-     * same in that Detail.
-     * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getAffectedVersionEndOrBuilder() { - return affectedVersionEnd_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; - } - - public static final int FIXED_CPE_URI_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private volatile java.lang.Object fixedCpeUri_ = ""; - /** - *
-     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-     * to update to that contains a fix for this vulnerability. It is possible
-     * for this to be different from the affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 8; - * @return The fixedCpeUri. - */ - @java.lang.Override - public java.lang.String getFixedCpeUri() { - java.lang.Object ref = fixedCpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedCpeUri_ = s; - return s; - } - } - /** - *
-     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-     * to update to that contains a fix for this vulnerability. It is possible
-     * for this to be different from the affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 8; - * @return The bytes for fixedCpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFixedCpeUriBytes() { - java.lang.Object ref = fixedCpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FIXED_PACKAGE_FIELD_NUMBER = 9; - @SuppressWarnings("serial") - private volatile java.lang.Object fixedPackage_ = ""; - /** - *
-     * The distro recommended package to update to that contains a fix for this
-     * vulnerability. It is possible for this to be different from the
-     * affected_package.
-     * 
- * - * string fixed_package = 9; - * @return The fixedPackage. - */ - @java.lang.Override - public java.lang.String getFixedPackage() { - java.lang.Object ref = fixedPackage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedPackage_ = s; - return s; - } - } - /** - *
-     * The distro recommended package to update to that contains a fix for this
-     * vulnerability. It is possible for this to be different from the
-     * affected_package.
-     * 
- * - * string fixed_package = 9; - * @return The bytes for fixedPackage. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFixedPackageBytes() { - java.lang.Object ref = fixedPackage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FIXED_VERSION_FIELD_NUMBER = 10; - private io.grafeas.v1.Version fixedVersion_; - /** - *
-     * The distro recommended version to update to that contains a
-     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-     * such version is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 10; - * @return Whether the fixedVersion field is set. - */ - @java.lang.Override - public boolean hasFixedVersion() { - return fixedVersion_ != null; - } - /** - *
-     * The distro recommended version to update to that contains a
-     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-     * such version is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 10; - * @return The fixedVersion. - */ - @java.lang.Override - public io.grafeas.v1.Version getFixedVersion() { - return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } - /** - *
-     * The distro recommended version to update to that contains a
-     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-     * such version is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { - return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } - - public static final int IS_OBSOLETE_FIELD_NUMBER = 11; - private boolean isObsolete_ = false; - /** - *
-     * Whether this detail is obsolete. Occurrences are expected not to point to
-     * obsolete details.
-     * 
- * - * bool is_obsolete = 11; - * @return The isObsolete. - */ - @java.lang.Override - public boolean getIsObsolete() { - return isObsolete_; - } - - public static final int SOURCE_UPDATE_TIME_FIELD_NUMBER = 12; - private com.google.protobuf.Timestamp sourceUpdateTime_; - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - * @return Whether the sourceUpdateTime field is set. - */ - @java.lang.Override - public boolean hasSourceUpdateTime() { - return sourceUpdateTime_ != null; - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - * @return The sourceUpdateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getSourceUpdateTime() { - return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { - return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } - - public static final int SOURCE_FIELD_NUMBER = 13; - @SuppressWarnings("serial") - private volatile java.lang.Object source_ = ""; - /** - *
-     * The source from which the information in this Detail was obtained.
-     * 
- * - * string source = 13; - * @return The source. - */ - @java.lang.Override - public java.lang.String getSource() { - java.lang.Object ref = source_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - source_ = s; - return s; - } - } - /** - *
-     * The source from which the information in this Detail was obtained.
-     * 
- * - * string source = 13; - * @return The bytes for source. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VENDOR_FIELD_NUMBER = 14; - @SuppressWarnings("serial") - private volatile java.lang.Object vendor_ = ""; - /** - *
-     * The name of the vendor of the product.
-     * 
- * - * string vendor = 14; - * @return The vendor. - */ - @java.lang.Override - public java.lang.String getVendor() { - java.lang.Object ref = vendor_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - vendor_ = s; - return s; - } - } - /** - *
-     * The name of the vendor of the product.
-     * 
- * - * string vendor = 14; - * @return The bytes for vendor. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVendorBytes() { - java.lang.Object ref = vendor_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - vendor_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severityName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, severityName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, packageType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, affectedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, affectedPackage_); - } - if (affectedVersionStart_ != null) { - output.writeMessage(6, getAffectedVersionStart()); - } - if (affectedVersionEnd_ != null) { - output.writeMessage(7, getAffectedVersionEnd()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, fixedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, fixedPackage_); - } - if (fixedVersion_ != null) { - output.writeMessage(10, getFixedVersion()); - } - if (isObsolete_ != false) { - output.writeBool(11, isObsolete_); - } - if (sourceUpdateTime_ != null) { - output.writeMessage(12, getSourceUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, source_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vendor_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 14, vendor_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severityName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, severityName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, packageType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, affectedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, affectedPackage_); - } - if (affectedVersionStart_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getAffectedVersionStart()); - } - if (affectedVersionEnd_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getAffectedVersionEnd()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, fixedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, fixedPackage_); - } - if (fixedVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getFixedVersion()); - } - if (isObsolete_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(11, isObsolete_); - } - if (sourceUpdateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getSourceUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, source_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vendor_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, vendor_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.VulnerabilityNote.Detail)) { - return super.equals(obj); - } - io.grafeas.v1.VulnerabilityNote.Detail other = (io.grafeas.v1.VulnerabilityNote.Detail) obj; - - if (!getSeverityName() - .equals(other.getSeverityName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getPackageType() - .equals(other.getPackageType())) return false; - if (!getAffectedCpeUri() - .equals(other.getAffectedCpeUri())) return false; - if (!getAffectedPackage() - .equals(other.getAffectedPackage())) return false; - if (hasAffectedVersionStart() != other.hasAffectedVersionStart()) return false; - if (hasAffectedVersionStart()) { - if (!getAffectedVersionStart() - .equals(other.getAffectedVersionStart())) return false; - } - if (hasAffectedVersionEnd() != other.hasAffectedVersionEnd()) return false; - if (hasAffectedVersionEnd()) { - if (!getAffectedVersionEnd() - .equals(other.getAffectedVersionEnd())) return false; - } - if (!getFixedCpeUri() - .equals(other.getFixedCpeUri())) return false; - if (!getFixedPackage() - .equals(other.getFixedPackage())) return false; - if (hasFixedVersion() != other.hasFixedVersion()) return false; - if (hasFixedVersion()) { - if (!getFixedVersion() - .equals(other.getFixedVersion())) return false; - } - if (getIsObsolete() - != other.getIsObsolete()) return false; - if (hasSourceUpdateTime() != other.hasSourceUpdateTime()) return false; - if (hasSourceUpdateTime()) { - if (!getSourceUpdateTime() - .equals(other.getSourceUpdateTime())) return false; - } - if (!getSource() - .equals(other.getSource())) return false; - if (!getVendor() - .equals(other.getVendor())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SEVERITY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getSeverityName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getPackageType().hashCode(); - hash = (37 * hash) + AFFECTED_CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getAffectedCpeUri().hashCode(); - hash = (37 * hash) + AFFECTED_PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getAffectedPackage().hashCode(); - if (hasAffectedVersionStart()) { - hash = (37 * hash) + AFFECTED_VERSION_START_FIELD_NUMBER; - hash = (53 * hash) + getAffectedVersionStart().hashCode(); - } - if (hasAffectedVersionEnd()) { - hash = (37 * hash) + AFFECTED_VERSION_END_FIELD_NUMBER; - hash = (53 * hash) + getAffectedVersionEnd().hashCode(); - } - hash = (37 * hash) + FIXED_CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getFixedCpeUri().hashCode(); - hash = (37 * hash) + FIXED_PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getFixedPackage().hashCode(); - if (hasFixedVersion()) { - hash = (37 * hash) + FIXED_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getFixedVersion().hashCode(); - } - hash = (37 * hash) + IS_OBSOLETE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsObsolete()); - if (hasSourceUpdateTime()) { - hash = (37 * hash) + SOURCE_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getSourceUpdateTime().hashCode(); - } - hash = (37 * hash) + SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getSource().hashCode(); - hash = (37 * hash) + VENDOR_FIELD_NUMBER; - hash = (53 * hash) + getVendor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.Detail parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote.Detail prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A detail for a distro and package affected by this vulnerability and its
-     * associated fix (if one is available).
-     * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityNote.Detail} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote.Detail) - io.grafeas.v1.VulnerabilityNote.DetailOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.Detail.class, io.grafeas.v1.VulnerabilityNote.Detail.Builder.class); - } - - // Construct using io.grafeas.v1.VulnerabilityNote.Detail.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - severityName_ = ""; - description_ = ""; - packageType_ = ""; - affectedCpeUri_ = ""; - affectedPackage_ = ""; - affectedVersionStart_ = null; - if (affectedVersionStartBuilder_ != null) { - affectedVersionStartBuilder_.dispose(); - affectedVersionStartBuilder_ = null; - } - affectedVersionEnd_ = null; - if (affectedVersionEndBuilder_ != null) { - affectedVersionEndBuilder_.dispose(); - affectedVersionEndBuilder_ = null; - } - fixedCpeUri_ = ""; - fixedPackage_ = ""; - fixedVersion_ = null; - if (fixedVersionBuilder_ != null) { - fixedVersionBuilder_.dispose(); - fixedVersionBuilder_ = null; - } - isObsolete_ = false; - sourceUpdateTime_ = null; - if (sourceUpdateTimeBuilder_ != null) { - sourceUpdateTimeBuilder_.dispose(); - sourceUpdateTimeBuilder_ = null; - } - source_ = ""; - vendor_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.Detail getDefaultInstanceForType() { - return io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.Detail build() { - io.grafeas.v1.VulnerabilityNote.Detail result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.Detail buildPartial() { - io.grafeas.v1.VulnerabilityNote.Detail result = new io.grafeas.v1.VulnerabilityNote.Detail(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.VulnerabilityNote.Detail result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.severityName_ = severityName_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.packageType_ = packageType_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.affectedCpeUri_ = affectedCpeUri_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.affectedPackage_ = affectedPackage_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.affectedVersionStart_ = affectedVersionStartBuilder_ == null - ? affectedVersionStart_ - : affectedVersionStartBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.affectedVersionEnd_ = affectedVersionEndBuilder_ == null - ? affectedVersionEnd_ - : affectedVersionEndBuilder_.build(); - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.fixedCpeUri_ = fixedCpeUri_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.fixedPackage_ = fixedPackage_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.fixedVersion_ = fixedVersionBuilder_ == null - ? fixedVersion_ - : fixedVersionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.isObsolete_ = isObsolete_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.sourceUpdateTime_ = sourceUpdateTimeBuilder_ == null - ? sourceUpdateTime_ - : sourceUpdateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.source_ = source_; - } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.vendor_ = vendor_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.VulnerabilityNote.Detail) { - return mergeFrom((io.grafeas.v1.VulnerabilityNote.Detail)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote.Detail other) { - if (other == io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance()) return this; - if (!other.getSeverityName().isEmpty()) { - severityName_ = other.severityName_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getPackageType().isEmpty()) { - packageType_ = other.packageType_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getAffectedCpeUri().isEmpty()) { - affectedCpeUri_ = other.affectedCpeUri_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getAffectedPackage().isEmpty()) { - affectedPackage_ = other.affectedPackage_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasAffectedVersionStart()) { - mergeAffectedVersionStart(other.getAffectedVersionStart()); - } - if (other.hasAffectedVersionEnd()) { - mergeAffectedVersionEnd(other.getAffectedVersionEnd()); - } - if (!other.getFixedCpeUri().isEmpty()) { - fixedCpeUri_ = other.fixedCpeUri_; - bitField0_ |= 0x00000080; - onChanged(); - } - if (!other.getFixedPackage().isEmpty()) { - fixedPackage_ = other.fixedPackage_; - bitField0_ |= 0x00000100; - onChanged(); - } - if (other.hasFixedVersion()) { - mergeFixedVersion(other.getFixedVersion()); - } - if (other.getIsObsolete() != false) { - setIsObsolete(other.getIsObsolete()); - } - if (other.hasSourceUpdateTime()) { - mergeSourceUpdateTime(other.getSourceUpdateTime()); - } - if (!other.getSource().isEmpty()) { - source_ = other.source_; - bitField0_ |= 0x00001000; - onChanged(); - } - if (!other.getVendor().isEmpty()) { - vendor_ = other.vendor_; - bitField0_ |= 0x00002000; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - severityName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - packageType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - affectedCpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - affectedPackage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - input.readMessage( - getAffectedVersionStartFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - input.readMessage( - getAffectedVersionEndFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: { - fixedCpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 66 - case 74: { - fixedPackage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - break; - } // case 74 - case 82: { - input.readMessage( - getFixedVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 82 - case 88: { - isObsolete_ = input.readBool(); - bitField0_ |= 0x00000400; - break; - } // case 88 - case 98: { - input.readMessage( - getSourceUpdateTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000800; - break; - } // case 98 - case 106: { - source_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - break; - } // case 106 - case 114: { - vendor_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - break; - } // case 114 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object severityName_ = ""; - /** - *
-       * The distro assigned severity of this vulnerability.
-       * 
- * - * string severity_name = 1; - * @return The severityName. - */ - public java.lang.String getSeverityName() { - java.lang.Object ref = severityName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - severityName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The distro assigned severity of this vulnerability.
-       * 
- * - * string severity_name = 1; - * @return The bytes for severityName. - */ - public com.google.protobuf.ByteString - getSeverityNameBytes() { - java.lang.Object ref = severityName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - severityName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The distro assigned severity of this vulnerability.
-       * 
- * - * string severity_name = 1; - * @param value The severityName to set. - * @return This builder for chaining. - */ - public Builder setSeverityName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - severityName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * The distro assigned severity of this vulnerability.
-       * 
- * - * string severity_name = 1; - * @return This builder for chaining. - */ - public Builder clearSeverityName() { - severityName_ = getDefaultInstance().getSeverityName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * The distro assigned severity of this vulnerability.
-       * 
- * - * string severity_name = 1; - * @param value The bytes for severityName to set. - * @return This builder for chaining. - */ - public Builder setSeverityNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - severityName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-       * A vendor-specific description of this vulnerability.
-       * 
- * - * string description = 2; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * A vendor-specific description of this vulnerability.
-       * 
- * - * string description = 2; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * A vendor-specific description of this vulnerability.
-       * 
- * - * string description = 2; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * A vendor-specific description of this vulnerability.
-       * 
- * - * string description = 2; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-       * A vendor-specific description of this vulnerability.
-       * 
- * - * string description = 2; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object packageType_ = ""; - /** - *
-       * The type of package; whether native or non native (e.g., ruby gems,
-       * node.js packages, etc.).
-       * 
- * - * string package_type = 3; - * @return The packageType. - */ - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The type of package; whether native or non native (e.g., ruby gems,
-       * node.js packages, etc.).
-       * 
- * - * string package_type = 3; - * @return The bytes for packageType. - */ - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The type of package; whether native or non native (e.g., ruby gems,
-       * node.js packages, etc.).
-       * 
- * - * string package_type = 3; - * @param value The packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - packageType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * The type of package; whether native or non native (e.g., ruby gems,
-       * node.js packages, etc.).
-       * 
- * - * string package_type = 3; - * @return This builder for chaining. - */ - public Builder clearPackageType() { - packageType_ = getDefaultInstance().getPackageType(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-       * The type of package; whether native or non native (e.g., ruby gems,
-       * node.js packages, etc.).
-       * 
- * - * string package_type = 3; - * @param value The bytes for packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - packageType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object affectedCpeUri_ = ""; - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string affected_cpe_uri = 4; - * @return The affectedCpeUri. - */ - public java.lang.String getAffectedCpeUri() { - java.lang.Object ref = affectedCpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedCpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string affected_cpe_uri = 4; - * @return The bytes for affectedCpeUri. - */ - public com.google.protobuf.ByteString - getAffectedCpeUriBytes() { - java.lang.Object ref = affectedCpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string affected_cpe_uri = 4; - * @param value The affectedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setAffectedCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - affectedCpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string affected_cpe_uri = 4; - * @return This builder for chaining. - */ - public Builder clearAffectedCpeUri() { - affectedCpeUri_ = getDefaultInstance().getAffectedCpeUri(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string affected_cpe_uri = 4; - * @param value The bytes for affectedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setAffectedCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - affectedCpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object affectedPackage_ = ""; - /** - *
-       * Required. The package this vulnerability affects.
-       * 
- * - * string affected_package = 5; - * @return The affectedPackage. - */ - public java.lang.String getAffectedPackage() { - java.lang.Object ref = affectedPackage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedPackage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The package this vulnerability affects.
-       * 
- * - * string affected_package = 5; - * @return The bytes for affectedPackage. - */ - public com.google.protobuf.ByteString - getAffectedPackageBytes() { - java.lang.Object ref = affectedPackage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The package this vulnerability affects.
-       * 
- * - * string affected_package = 5; - * @param value The affectedPackage to set. - * @return This builder for chaining. - */ - public Builder setAffectedPackage( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - affectedPackage_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-       * Required. The package this vulnerability affects.
-       * 
- * - * string affected_package = 5; - * @return This builder for chaining. - */ - public Builder clearAffectedPackage() { - affectedPackage_ = getDefaultInstance().getAffectedPackage(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-       * Required. The package this vulnerability affects.
-       * 
- * - * string affected_package = 5; - * @param value The bytes for affectedPackage to set. - * @return This builder for chaining. - */ - public Builder setAffectedPackageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - affectedPackage_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private io.grafeas.v1.Version affectedVersionStart_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> affectedVersionStartBuilder_; - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - * @return Whether the affectedVersionStart field is set. - */ - public boolean hasAffectedVersionStart() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - * @return The affectedVersionStart. - */ - public io.grafeas.v1.Version getAffectedVersionStart() { - if (affectedVersionStartBuilder_ == null) { - return affectedVersionStart_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; - } else { - return affectedVersionStartBuilder_.getMessage(); - } - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - public Builder setAffectedVersionStart(io.grafeas.v1.Version value) { - if (affectedVersionStartBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - affectedVersionStart_ = value; - } else { - affectedVersionStartBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - public Builder setAffectedVersionStart( - io.grafeas.v1.Version.Builder builderForValue) { - if (affectedVersionStartBuilder_ == null) { - affectedVersionStart_ = builderForValue.build(); - } else { - affectedVersionStartBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - public Builder mergeAffectedVersionStart(io.grafeas.v1.Version value) { - if (affectedVersionStartBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - affectedVersionStart_ != null && - affectedVersionStart_ != io.grafeas.v1.Version.getDefaultInstance()) { - getAffectedVersionStartBuilder().mergeFrom(value); - } else { - affectedVersionStart_ = value; - } - } else { - affectedVersionStartBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - public Builder clearAffectedVersionStart() { - bitField0_ = (bitField0_ & ~0x00000020); - affectedVersionStart_ = null; - if (affectedVersionStartBuilder_ != null) { - affectedVersionStartBuilder_.dispose(); - affectedVersionStartBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - public io.grafeas.v1.Version.Builder getAffectedVersionStartBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getAffectedVersionStartFieldBuilder().getBuilder(); - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - public io.grafeas.v1.VersionOrBuilder getAffectedVersionStartOrBuilder() { - if (affectedVersionStartBuilder_ != null) { - return affectedVersionStartBuilder_.getMessageOrBuilder(); - } else { - return affectedVersionStart_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : affectedVersionStart_; - } - } - /** - *
-       * The version number at the start of an interval in which this
-       * vulnerability exists. A vulnerability can affect a package between
-       * version numbers that are disjoint sets of intervals (example:
-       * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
-       * represented in its own Detail. If a specific affected version is provided
-       * by a vulnerability database, affected_version_start and
-       * affected_version_end will be the same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_start = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getAffectedVersionStartFieldBuilder() { - if (affectedVersionStartBuilder_ == null) { - affectedVersionStartBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getAffectedVersionStart(), - getParentForChildren(), - isClean()); - affectedVersionStart_ = null; - } - return affectedVersionStartBuilder_; - } - - private io.grafeas.v1.Version affectedVersionEnd_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> affectedVersionEndBuilder_; - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - * @return Whether the affectedVersionEnd field is set. - */ - public boolean hasAffectedVersionEnd() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - * @return The affectedVersionEnd. - */ - public io.grafeas.v1.Version getAffectedVersionEnd() { - if (affectedVersionEndBuilder_ == null) { - return affectedVersionEnd_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; - } else { - return affectedVersionEndBuilder_.getMessage(); - } - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - public Builder setAffectedVersionEnd(io.grafeas.v1.Version value) { - if (affectedVersionEndBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - affectedVersionEnd_ = value; - } else { - affectedVersionEndBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - public Builder setAffectedVersionEnd( - io.grafeas.v1.Version.Builder builderForValue) { - if (affectedVersionEndBuilder_ == null) { - affectedVersionEnd_ = builderForValue.build(); - } else { - affectedVersionEndBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - public Builder mergeAffectedVersionEnd(io.grafeas.v1.Version value) { - if (affectedVersionEndBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - affectedVersionEnd_ != null && - affectedVersionEnd_ != io.grafeas.v1.Version.getDefaultInstance()) { - getAffectedVersionEndBuilder().mergeFrom(value); - } else { - affectedVersionEnd_ = value; - } - } else { - affectedVersionEndBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - public Builder clearAffectedVersionEnd() { - bitField0_ = (bitField0_ & ~0x00000040); - affectedVersionEnd_ = null; - if (affectedVersionEndBuilder_ != null) { - affectedVersionEndBuilder_.dispose(); - affectedVersionEndBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - public io.grafeas.v1.Version.Builder getAffectedVersionEndBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getAffectedVersionEndFieldBuilder().getBuilder(); - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - public io.grafeas.v1.VersionOrBuilder getAffectedVersionEndOrBuilder() { - if (affectedVersionEndBuilder_ != null) { - return affectedVersionEndBuilder_.getMessageOrBuilder(); - } else { - return affectedVersionEnd_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : affectedVersionEnd_; - } - } - /** - *
-       * The version number at the end of an interval in which this vulnerability
-       * exists. A vulnerability can affect a package between version numbers
-       * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
-       * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
-       * own Detail. If a specific affected version is provided by a vulnerability
-       * database, affected_version_start and affected_version_end will be the
-       * same in that Detail.
-       * 
- * - * .grafeas.v1.Version affected_version_end = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getAffectedVersionEndFieldBuilder() { - if (affectedVersionEndBuilder_ == null) { - affectedVersionEndBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getAffectedVersionEnd(), - getParentForChildren(), - isClean()); - affectedVersionEnd_ = null; - } - return affectedVersionEndBuilder_; - } - - private java.lang.Object fixedCpeUri_ = ""; - /** - *
-       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-       * to update to that contains a fix for this vulnerability. It is possible
-       * for this to be different from the affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 8; - * @return The fixedCpeUri. - */ - public java.lang.String getFixedCpeUri() { - java.lang.Object ref = fixedCpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedCpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-       * to update to that contains a fix for this vulnerability. It is possible
-       * for this to be different from the affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 8; - * @return The bytes for fixedCpeUri. - */ - public com.google.protobuf.ByteString - getFixedCpeUriBytes() { - java.lang.Object ref = fixedCpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-       * to update to that contains a fix for this vulnerability. It is possible
-       * for this to be different from the affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 8; - * @param value The fixedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setFixedCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fixedCpeUri_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-       * to update to that contains a fix for this vulnerability. It is possible
-       * for this to be different from the affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 8; - * @return This builder for chaining. - */ - public Builder clearFixedCpeUri() { - fixedCpeUri_ = getDefaultInstance().getFixedCpeUri(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - /** - *
-       * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
-       * to update to that contains a fix for this vulnerability. It is possible
-       * for this to be different from the affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 8; - * @param value The bytes for fixedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setFixedCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fixedCpeUri_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - private java.lang.Object fixedPackage_ = ""; - /** - *
-       * The distro recommended package to update to that contains a fix for this
-       * vulnerability. It is possible for this to be different from the
-       * affected_package.
-       * 
- * - * string fixed_package = 9; - * @return The fixedPackage. - */ - public java.lang.String getFixedPackage() { - java.lang.Object ref = fixedPackage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedPackage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The distro recommended package to update to that contains a fix for this
-       * vulnerability. It is possible for this to be different from the
-       * affected_package.
-       * 
- * - * string fixed_package = 9; - * @return The bytes for fixedPackage. - */ - public com.google.protobuf.ByteString - getFixedPackageBytes() { - java.lang.Object ref = fixedPackage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The distro recommended package to update to that contains a fix for this
-       * vulnerability. It is possible for this to be different from the
-       * affected_package.
-       * 
- * - * string fixed_package = 9; - * @param value The fixedPackage to set. - * @return This builder for chaining. - */ - public Builder setFixedPackage( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fixedPackage_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-       * The distro recommended package to update to that contains a fix for this
-       * vulnerability. It is possible for this to be different from the
-       * affected_package.
-       * 
- * - * string fixed_package = 9; - * @return This builder for chaining. - */ - public Builder clearFixedPackage() { - fixedPackage_ = getDefaultInstance().getFixedPackage(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - *
-       * The distro recommended package to update to that contains a fix for this
-       * vulnerability. It is possible for this to be different from the
-       * affected_package.
-       * 
- * - * string fixed_package = 9; - * @param value The bytes for fixedPackage to set. - * @return This builder for chaining. - */ - public Builder setFixedPackageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fixedPackage_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - private io.grafeas.v1.Version fixedVersion_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> fixedVersionBuilder_; - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - * @return Whether the fixedVersion field is set. - */ - public boolean hasFixedVersion() { - return ((bitField0_ & 0x00000200) != 0); - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - * @return The fixedVersion. - */ - public io.grafeas.v1.Version getFixedVersion() { - if (fixedVersionBuilder_ == null) { - return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } else { - return fixedVersionBuilder_.getMessage(); - } - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - public Builder setFixedVersion(io.grafeas.v1.Version value) { - if (fixedVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fixedVersion_ = value; - } else { - fixedVersionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - public Builder setFixedVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (fixedVersionBuilder_ == null) { - fixedVersion_ = builderForValue.build(); - } else { - fixedVersionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - public Builder mergeFixedVersion(io.grafeas.v1.Version value) { - if (fixedVersionBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) && - fixedVersion_ != null && - fixedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { - getFixedVersionBuilder().mergeFrom(value); - } else { - fixedVersion_ = value; - } - } else { - fixedVersionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - public Builder clearFixedVersion() { - bitField0_ = (bitField0_ & ~0x00000200); - fixedVersion_ = null; - if (fixedVersionBuilder_ != null) { - fixedVersionBuilder_.dispose(); - fixedVersionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - public io.grafeas.v1.Version.Builder getFixedVersionBuilder() { - bitField0_ |= 0x00000200; - onChanged(); - return getFixedVersionFieldBuilder().getBuilder(); - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { - if (fixedVersionBuilder_ != null) { - return fixedVersionBuilder_.getMessageOrBuilder(); - } else { - return fixedVersion_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } - } - /** - *
-       * The distro recommended version to update to that contains a
-       * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
-       * such version is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getFixedVersionFieldBuilder() { - if (fixedVersionBuilder_ == null) { - fixedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getFixedVersion(), - getParentForChildren(), - isClean()); - fixedVersion_ = null; - } - return fixedVersionBuilder_; - } - - private boolean isObsolete_ ; - /** - *
-       * Whether this detail is obsolete. Occurrences are expected not to point to
-       * obsolete details.
-       * 
- * - * bool is_obsolete = 11; - * @return The isObsolete. - */ - @java.lang.Override - public boolean getIsObsolete() { - return isObsolete_; - } - /** - *
-       * Whether this detail is obsolete. Occurrences are expected not to point to
-       * obsolete details.
-       * 
- * - * bool is_obsolete = 11; - * @param value The isObsolete to set. - * @return This builder for chaining. - */ - public Builder setIsObsolete(boolean value) { - - isObsolete_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - *
-       * Whether this detail is obsolete. Occurrences are expected not to point to
-       * obsolete details.
-       * 
- * - * bool is_obsolete = 11; - * @return This builder for chaining. - */ - public Builder clearIsObsolete() { - bitField0_ = (bitField0_ & ~0x00000400); - isObsolete_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp sourceUpdateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> sourceUpdateTimeBuilder_; - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - * @return Whether the sourceUpdateTime field is set. - */ - public boolean hasSourceUpdateTime() { - return ((bitField0_ & 0x00000800) != 0); - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - * @return The sourceUpdateTime. - */ - public com.google.protobuf.Timestamp getSourceUpdateTime() { - if (sourceUpdateTimeBuilder_ == null) { - return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } else { - return sourceUpdateTimeBuilder_.getMessage(); - } - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - public Builder setSourceUpdateTime(com.google.protobuf.Timestamp value) { - if (sourceUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sourceUpdateTime_ = value; - } else { - sourceUpdateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - public Builder setSourceUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (sourceUpdateTimeBuilder_ == null) { - sourceUpdateTime_ = builderForValue.build(); - } else { - sourceUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - public Builder mergeSourceUpdateTime(com.google.protobuf.Timestamp value) { - if (sourceUpdateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000800) != 0) && - sourceUpdateTime_ != null && - sourceUpdateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getSourceUpdateTimeBuilder().mergeFrom(value); - } else { - sourceUpdateTime_ = value; - } - } else { - sourceUpdateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - public Builder clearSourceUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000800); - sourceUpdateTime_ = null; - if (sourceUpdateTimeBuilder_ != null) { - sourceUpdateTimeBuilder_.dispose(); - sourceUpdateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - public com.google.protobuf.Timestamp.Builder getSourceUpdateTimeBuilder() { - bitField0_ |= 0x00000800; - onChanged(); - return getSourceUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { - if (sourceUpdateTimeBuilder_ != null) { - return sourceUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return sourceUpdateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } - } - /** - *
-       * The time this information was last changed at the source. This is an
-       * upstream timestamp from the underlying information source - e.g. Ubuntu
-       * security tracker.
-       * 
- * - * .google.protobuf.Timestamp source_update_time = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getSourceUpdateTimeFieldBuilder() { - if (sourceUpdateTimeBuilder_ == null) { - sourceUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getSourceUpdateTime(), - getParentForChildren(), - isClean()); - sourceUpdateTime_ = null; - } - return sourceUpdateTimeBuilder_; - } - - private java.lang.Object source_ = ""; - /** - *
-       * The source from which the information in this Detail was obtained.
-       * 
- * - * string source = 13; - * @return The source. - */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - source_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The source from which the information in this Detail was obtained.
-       * 
- * - * string source = 13; - * @return The bytes for source. - */ - public com.google.protobuf.ByteString - getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - source_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The source from which the information in this Detail was obtained.
-       * 
- * - * string source = 13; - * @param value The source to set. - * @return This builder for chaining. - */ - public Builder setSource( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - source_ = value; - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - *
-       * The source from which the information in this Detail was obtained.
-       * 
- * - * string source = 13; - * @return This builder for chaining. - */ - public Builder clearSource() { - source_ = getDefaultInstance().getSource(); - bitField0_ = (bitField0_ & ~0x00001000); - onChanged(); - return this; - } - /** - *
-       * The source from which the information in this Detail was obtained.
-       * 
- * - * string source = 13; - * @param value The bytes for source to set. - * @return This builder for chaining. - */ - public Builder setSourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - source_ = value; - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - - private java.lang.Object vendor_ = ""; - /** - *
-       * The name of the vendor of the product.
-       * 
- * - * string vendor = 14; - * @return The vendor. - */ - public java.lang.String getVendor() { - java.lang.Object ref = vendor_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - vendor_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the vendor of the product.
-       * 
- * - * string vendor = 14; - * @return The bytes for vendor. - */ - public com.google.protobuf.ByteString - getVendorBytes() { - java.lang.Object ref = vendor_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - vendor_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the vendor of the product.
-       * 
- * - * string vendor = 14; - * @param value The vendor to set. - * @return This builder for chaining. - */ - public Builder setVendor( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - vendor_ = value; - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - *
-       * The name of the vendor of the product.
-       * 
- * - * string vendor = 14; - * @return This builder for chaining. - */ - public Builder clearVendor() { - vendor_ = getDefaultInstance().getVendor(); - bitField0_ = (bitField0_ & ~0x00002000); - onChanged(); - return this; - } - /** - *
-       * The name of the vendor of the product.
-       * 
- * - * string vendor = 14; - * @param value The bytes for vendor to set. - * @return This builder for chaining. - */ - public Builder setVendorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - vendor_ = value; - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote.Detail) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote.Detail) - private static final io.grafeas.v1.VulnerabilityNote.Detail DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote.Detail(); - } - - public static io.grafeas.v1.VulnerabilityNote.Detail getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Detail parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.Detail getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WindowsDetailOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote.WindowsDetail) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - java.lang.String getCpeUri(); - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - com.google.protobuf.ByteString - getCpeUriBytes(); - - /** - *
-     * Required. The name of this vulnerability.
-     * 
- * - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * Required. The name of this vulnerability.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-     * The description of this vulnerability.
-     * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-     * The description of this vulnerability.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - java.util.List - getFixingKbsList(); - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getFixingKbs(int index); - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - int getFixingKbsCount(); - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - java.util.List - getFixingKbsOrBuilderList(); - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder getFixingKbsOrBuilder( - int index); - } - /** - * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail} - */ - public static final class WindowsDetail extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote.WindowsDetail) - WindowsDetailOrBuilder { - private static final long serialVersionUID = 0L; - // Use WindowsDetail.newBuilder() to construct. - private WindowsDetail(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WindowsDetail() { - cpeUri_ = ""; - name_ = ""; - description_ = ""; - fixingKbs_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WindowsDetail(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder.class); - } - - public interface KnowledgeBaseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-       * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-       * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-       * A link to the KB in the [Windows update catalog]
-       * (https://www.catalog.update.microsoft.com/).
-       * 
- * - * string url = 2; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-       * A link to the KB in the [Windows update catalog]
-       * (https://www.catalog.update.microsoft.com/).
-       * 
- * - * string url = 2; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - } - /** - * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} - */ - public static final class KnowledgeBase extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) - KnowledgeBaseOrBuilder { - private static final long serialVersionUID = 0L; - // Use KnowledgeBase.newBuilder() to construct. - private KnowledgeBase(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KnowledgeBase() { - name_ = ""; - url_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KnowledgeBase(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-       * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-       * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-       * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URL_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object url_ = ""; - /** - *
-       * A link to the KB in the [Windows update catalog]
-       * (https://www.catalog.update.microsoft.com/).
-       * 
- * - * string url = 2; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-       * A link to the KB in the [Windows update catalog]
-       * (https://www.catalog.update.microsoft.com/).
-       * 
- * - * string url = 2; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase)) { - return super.equals(obj); - } - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase other = (io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUrl() - .equals(other.getUrl())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder.class); - } - - // Construct using io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - url_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_KnowledgeBase_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getDefaultInstanceForType() { - return io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase build() { - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase buildPartial() { - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase result = new io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.url_ = url_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) { - return mergeFrom((io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase other) { - if (other == io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - url_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-         * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-         * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-         * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-         * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-         * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)).
-         * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-         * A link to the KB in the [Windows update catalog]
-         * (https://www.catalog.update.microsoft.com/).
-         * 
- * - * string url = 2; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-         * A link to the KB in the [Windows update catalog]
-         * (https://www.catalog.update.microsoft.com/).
-         * 
- * - * string url = 2; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-         * A link to the KB in the [Windows update catalog]
-         * (https://www.catalog.update.microsoft.com/).
-         * 
- * - * string url = 2; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - url_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-         * A link to the KB in the [Windows update catalog]
-         * (https://www.catalog.update.microsoft.com/).
-         * 
- * - * string url = 2; - * @return This builder for chaining. - */ - public Builder clearUrl() { - url_ = getDefaultInstance().getUrl(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-         * A link to the KB in the [Windows update catalog]
-         * (https://www.catalog.update.microsoft.com/).
-         * 
- * - * string url = 2; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - url_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) - private static final io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase(); - } - - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KnowledgeBase parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int CPE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object cpeUri_ = ""; - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - @java.lang.Override - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } - } - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability affects.
-     * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-     * Required. The name of this vulnerability.
-     * 
- * - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-     * Required. The name of this vulnerability.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-     * The description of this vulnerability.
-     * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-     * The description of this vulnerability.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FIXING_KBS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List fixingKbs_; - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - @java.lang.Override - public java.util.List getFixingKbsList() { - return fixingKbs_; - } - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - @java.lang.Override - public java.util.List - getFixingKbsOrBuilderList() { - return fixingKbs_; - } - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - @java.lang.Override - public int getFixingKbsCount() { - return fixingKbs_.size(); - } - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getFixingKbs(int index) { - return fixingKbs_.get(index); - } - /** - *
-     * Required. The names of the KBs which have hotfixes to mitigate this
-     * vulnerability. Note that there may be multiple hotfixes (and thus
-     * multiple KBs) that mitigate a given vulnerability. Currently any listed
-     * KBs presence is considered a fix.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder getFixingKbsOrBuilder( - int index) { - return fixingKbs_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - for (int i = 0; i < fixingKbs_.size(); i++) { - output.writeMessage(4, fixingKbs_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - for (int i = 0; i < fixingKbs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, fixingKbs_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail)) { - return super.equals(obj); - } - io.grafeas.v1.VulnerabilityNote.WindowsDetail other = (io.grafeas.v1.VulnerabilityNote.WindowsDetail) obj; - - if (!getCpeUri() - .equals(other.getCpeUri())) return false; - if (!getName() - .equals(other.getName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getFixingKbsList() - .equals(other.getFixingKbsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCpeUri().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (getFixingKbsCount() > 0) { - hash = (37 * hash) + FIXING_KBS_FIELD_NUMBER; - hash = (53 * hash) + getFixingKbsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote.WindowsDetail prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grafeas.v1.VulnerabilityNote.WindowsDetail} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote.WindowsDetail) - io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.class, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder.class); - } - - // Construct using io.grafeas.v1.VulnerabilityNote.WindowsDetail.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - cpeUri_ = ""; - name_ = ""; - description_ = ""; - if (fixingKbsBuilder_ == null) { - fixingKbs_ = java.util.Collections.emptyList(); - } else { - fixingKbs_ = null; - fixingKbsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail getDefaultInstanceForType() { - return io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail build() { - io.grafeas.v1.VulnerabilityNote.WindowsDetail result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail buildPartial() { - io.grafeas.v1.VulnerabilityNote.WindowsDetail result = new io.grafeas.v1.VulnerabilityNote.WindowsDetail(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityNote.WindowsDetail result) { - if (fixingKbsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - fixingKbs_ = java.util.Collections.unmodifiableList(fixingKbs_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.fixingKbs_ = fixingKbs_; - } else { - result.fixingKbs_ = fixingKbsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.VulnerabilityNote.WindowsDetail result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.cpeUri_ = cpeUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.description_ = description_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.VulnerabilityNote.WindowsDetail) { - return mergeFrom((io.grafeas.v1.VulnerabilityNote.WindowsDetail)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote.WindowsDetail other) { - if (other == io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance()) return this; - if (!other.getCpeUri().isEmpty()) { - cpeUri_ = other.cpeUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (fixingKbsBuilder_ == null) { - if (!other.fixingKbs_.isEmpty()) { - if (fixingKbs_.isEmpty()) { - fixingKbs_ = other.fixingKbs_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureFixingKbsIsMutable(); - fixingKbs_.addAll(other.fixingKbs_); - } - onChanged(); - } - } else { - if (!other.fixingKbs_.isEmpty()) { - if (fixingKbsBuilder_.isEmpty()) { - fixingKbsBuilder_.dispose(); - fixingKbsBuilder_ = null; - fixingKbs_ = other.fixingKbs_; - bitField0_ = (bitField0_ & ~0x00000008); - fixingKbsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFixingKbsFieldBuilder() : null; - } else { - fixingKbsBuilder_.addAllMessages(other.fixingKbs_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - cpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase m = - input.readMessage( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.parser(), - extensionRegistry); - if (fixingKbsBuilder_ == null) { - ensureFixingKbsIsMutable(); - fixingKbs_.add(m); - } else { - fixingKbsBuilder_.addMessage(m); - } - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object cpeUri_ = ""; - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string cpe_uri = 1; - * @return The cpeUri. - */ - public java.lang.String getCpeUri() { - java.lang.Object ref = cpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string cpe_uri = 1; - * @return The bytes for cpeUri. - */ - public com.google.protobuf.ByteString - getCpeUriBytes() { - java.lang.Object ref = cpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string cpe_uri = 1; - * @param value The cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string cpe_uri = 1; - * @return This builder for chaining. - */ - public Builder clearCpeUri() { - cpeUri_ = getDefaultInstance().getCpeUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability affects.
-       * 
- * - * string cpe_uri = 1; - * @param value The bytes for cpeUri to set. - * @return This builder for chaining. - */ - public Builder setCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-       * Required. The name of this vulnerability.
-       * 
- * - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The name of this vulnerability.
-       * 
- * - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The name of this vulnerability.
-       * 
- * - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * Required. The name of this vulnerability.
-       * 
- * - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-       * Required. The name of this vulnerability.
-       * 
- * - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-       * The description of this vulnerability.
-       * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The description of this vulnerability.
-       * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The description of this vulnerability.
-       * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * The description of this vulnerability.
-       * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-       * The description of this vulnerability.
-       * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.util.List fixingKbs_ = - java.util.Collections.emptyList(); - private void ensureFixingKbsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - fixingKbs_ = new java.util.ArrayList(fixingKbs_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder> fixingKbsBuilder_; - - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public java.util.List getFixingKbsList() { - if (fixingKbsBuilder_ == null) { - return java.util.Collections.unmodifiableList(fixingKbs_); - } else { - return fixingKbsBuilder_.getMessageList(); - } - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public int getFixingKbsCount() { - if (fixingKbsBuilder_ == null) { - return fixingKbs_.size(); - } else { - return fixingKbsBuilder_.getCount(); - } - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase getFixingKbs(int index) { - if (fixingKbsBuilder_ == null) { - return fixingKbs_.get(index); - } else { - return fixingKbsBuilder_.getMessage(index); - } - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder setFixingKbs( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase value) { - if (fixingKbsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFixingKbsIsMutable(); - fixingKbs_.set(index, value); - onChanged(); - } else { - fixingKbsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder setFixingKbs( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder builderForValue) { - if (fixingKbsBuilder_ == null) { - ensureFixingKbsIsMutable(); - fixingKbs_.set(index, builderForValue.build()); - onChanged(); - } else { - fixingKbsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder addFixingKbs(io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase value) { - if (fixingKbsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFixingKbsIsMutable(); - fixingKbs_.add(value); - onChanged(); - } else { - fixingKbsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder addFixingKbs( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase value) { - if (fixingKbsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFixingKbsIsMutable(); - fixingKbs_.add(index, value); - onChanged(); - } else { - fixingKbsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder addFixingKbs( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder builderForValue) { - if (fixingKbsBuilder_ == null) { - ensureFixingKbsIsMutable(); - fixingKbs_.add(builderForValue.build()); - onChanged(); - } else { - fixingKbsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder addFixingKbs( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder builderForValue) { - if (fixingKbsBuilder_ == null) { - ensureFixingKbsIsMutable(); - fixingKbs_.add(index, builderForValue.build()); - onChanged(); - } else { - fixingKbsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder addAllFixingKbs( - java.lang.Iterable values) { - if (fixingKbsBuilder_ == null) { - ensureFixingKbsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fixingKbs_); - onChanged(); - } else { - fixingKbsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder clearFixingKbs() { - if (fixingKbsBuilder_ == null) { - fixingKbs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - fixingKbsBuilder_.clear(); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public Builder removeFixingKbs(int index) { - if (fixingKbsBuilder_ == null) { - ensureFixingKbsIsMutable(); - fixingKbs_.remove(index); - onChanged(); - } else { - fixingKbsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder getFixingKbsBuilder( - int index) { - return getFixingKbsFieldBuilder().getBuilder(index); - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder getFixingKbsOrBuilder( - int index) { - if (fixingKbsBuilder_ == null) { - return fixingKbs_.get(index); } else { - return fixingKbsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public java.util.List - getFixingKbsOrBuilderList() { - if (fixingKbsBuilder_ != null) { - return fixingKbsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fixingKbs_); - } - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder addFixingKbsBuilder() { - return getFixingKbsFieldBuilder().addBuilder( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance()); - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder addFixingKbsBuilder( - int index) { - return getFixingKbsFieldBuilder().addBuilder( - index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.getDefaultInstance()); - } - /** - *
-       * Required. The names of the KBs which have hotfixes to mitigate this
-       * vulnerability. Note that there may be multiple hotfixes (and thus
-       * multiple KBs) that mitigate a given vulnerability. Currently any listed
-       * KBs presence is considered a fix.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - public java.util.List - getFixingKbsBuilderList() { - return getFixingKbsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder> - getFixingKbsFieldBuilder() { - if (fixingKbsBuilder_ == null) { - fixingKbsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBaseOrBuilder>( - fixingKbs_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - fixingKbs_ = null; - } - return fixingKbsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote.WindowsDetail) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote.WindowsDetail) - private static final io.grafeas.v1.VulnerabilityNote.WindowsDetail DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote.WindowsDetail(); - } - - public static io.grafeas.v1.VulnerabilityNote.WindowsDetail getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WindowsDetail parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int CVSS_SCORE_FIELD_NUMBER = 1; - private float cvssScore_ = 0F; - /** - *
-   * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
-   * where 0 indicates low severity and 10 indicates high severity.
-   * 
- * - * float cvss_score = 1; - * @return The cvssScore. - */ - @java.lang.Override - public float getCvssScore() { - return cvssScore_; - } - - public static final int SEVERITY_FIELD_NUMBER = 2; - private int severity_ = 0; - /** - *
-   * The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override public int getSeverityValue() { - return severity_; - } - /** - *
-   * The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - @java.lang.Override public io.grafeas.v1.Severity getSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - - public static final int DETAILS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List details_; - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - @java.lang.Override - public java.util.List getDetailsList() { - return details_; - } - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - @java.lang.Override - public java.util.List - getDetailsOrBuilderList() { - return details_; - } - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - @java.lang.Override - public int getDetailsCount() { - return details_.size(); - } - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.Detail getDetails(int index) { - return details_.get(index); - } - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.DetailOrBuilder getDetailsOrBuilder( - int index) { - return details_.get(index); - } - - public static final int CVSS_V3_FIELD_NUMBER = 4; - private io.grafeas.v1.CVSSv3 cvssV3_; - /** - *
-   * The full description of the CVSSv3 for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @return Whether the cvssV3 field is set. - */ - @java.lang.Override - public boolean hasCvssV3() { - return cvssV3_ != null; - } - /** - *
-   * The full description of the CVSSv3 for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @return The cvssV3. - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3 getCvssV3() { - return cvssV3_ == null ? io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; - } - /** - *
-   * The full description of the CVSSv3 for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - @java.lang.Override - public io.grafeas.v1.CVSSv3OrBuilder getCvssV3OrBuilder() { - return cvssV3_ == null ? io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; - } - - public static final int WINDOWS_DETAILS_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private java.util.List windowsDetails_; - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - @java.lang.Override - public java.util.List getWindowsDetailsList() { - return windowsDetails_; - } - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - @java.lang.Override - public java.util.List - getWindowsDetailsOrBuilderList() { - return windowsDetails_; - } - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - @java.lang.Override - public int getWindowsDetailsCount() { - return windowsDetails_.size(); - } - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetail getWindowsDetails(int index) { - return windowsDetails_.get(index); - } - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder getWindowsDetailsOrBuilder( - int index) { - return windowsDetails_.get(index); - } - - public static final int SOURCE_UPDATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp sourceUpdateTime_; - /** - *
-   * The time this information was last changed at the source. This is an
-   * upstream timestamp from the underlying information source - e.g. Ubuntu
-   * security tracker.
-   * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - * @return Whether the sourceUpdateTime field is set. - */ - @java.lang.Override - public boolean hasSourceUpdateTime() { - return sourceUpdateTime_ != null; - } - /** - *
-   * The time this information was last changed at the source. This is an
-   * upstream timestamp from the underlying information source - e.g. Ubuntu
-   * security tracker.
-   * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - * @return The sourceUpdateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getSourceUpdateTime() { - return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } - /** - *
-   * The time this information was last changed at the source. This is an
-   * upstream timestamp from the underlying information source - e.g. Ubuntu
-   * security tracker.
-   * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { - return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } - - public static final int CVSS_VERSION_FIELD_NUMBER = 7; - private int cvssVersion_ = 0; - /** - *
-   * CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @return The enum numeric value on the wire for cvssVersion. - */ - @java.lang.Override public int getCvssVersionValue() { - return cvssVersion_; - } - /** - *
-   * CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @return The cvssVersion. - */ - @java.lang.Override public io.grafeas.v1.CVSSVersion getCvssVersion() { - io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); - return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; - } - - public static final int CVSS_V2_FIELD_NUMBER = 8; - private io.grafeas.v1.CVSS cvssV2_; - /** - *
-   * The full description of the v2 CVSS for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - * @return Whether the cvssV2 field is set. - */ - @java.lang.Override - public boolean hasCvssV2() { - return cvssV2_ != null; - } - /** - *
-   * The full description of the v2 CVSS for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - * @return The cvssV2. - */ - @java.lang.Override - public io.grafeas.v1.CVSS getCvssV2() { - return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } - /** - *
-   * The full description of the v2 CVSS for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - @java.lang.Override - public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { - return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { - output.writeFloat(1, cvssScore_); - } - if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - output.writeEnum(2, severity_); - } - for (int i = 0; i < details_.size(); i++) { - output.writeMessage(3, details_.get(i)); - } - if (cvssV3_ != null) { - output.writeMessage(4, getCvssV3()); - } - for (int i = 0; i < windowsDetails_.size(); i++) { - output.writeMessage(5, windowsDetails_.get(i)); - } - if (sourceUpdateTime_ != null) { - output.writeMessage(6, getSourceUpdateTime()); - } - if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { - output.writeEnum(7, cvssVersion_); - } - if (cvssV2_ != null) { - output.writeMessage(8, getCvssV2()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, cvssScore_); - } - if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, severity_); - } - for (int i = 0; i < details_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, details_.get(i)); - } - if (cvssV3_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCvssV3()); - } - for (int i = 0; i < windowsDetails_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, windowsDetails_.get(i)); - } - if (sourceUpdateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getSourceUpdateTime()); - } - if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(7, cvssVersion_); - } - if (cvssV2_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getCvssV2()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.VulnerabilityNote)) { - return super.equals(obj); - } - io.grafeas.v1.VulnerabilityNote other = (io.grafeas.v1.VulnerabilityNote) obj; - - if (java.lang.Float.floatToIntBits(getCvssScore()) - != java.lang.Float.floatToIntBits( - other.getCvssScore())) return false; - if (severity_ != other.severity_) return false; - if (!getDetailsList() - .equals(other.getDetailsList())) return false; - if (hasCvssV3() != other.hasCvssV3()) return false; - if (hasCvssV3()) { - if (!getCvssV3() - .equals(other.getCvssV3())) return false; - } - if (!getWindowsDetailsList() - .equals(other.getWindowsDetailsList())) return false; - if (hasSourceUpdateTime() != other.hasSourceUpdateTime()) return false; - if (hasSourceUpdateTime()) { - if (!getSourceUpdateTime() - .equals(other.getSourceUpdateTime())) return false; - } - if (cvssVersion_ != other.cvssVersion_) return false; - if (hasCvssV2() != other.hasCvssV2()) return false; - if (hasCvssV2()) { - if (!getCvssV2() - .equals(other.getCvssV2())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CVSS_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getCvssScore()); - hash = (37 * hash) + SEVERITY_FIELD_NUMBER; - hash = (53 * hash) + severity_; - if (getDetailsCount() > 0) { - hash = (37 * hash) + DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getDetailsList().hashCode(); - } - if (hasCvssV3()) { - hash = (37 * hash) + CVSS_V3_FIELD_NUMBER; - hash = (53 * hash) + getCvssV3().hashCode(); - } - if (getWindowsDetailsCount() > 0) { - hash = (37 * hash) + WINDOWS_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getWindowsDetailsList().hashCode(); - } - if (hasSourceUpdateTime()) { - hash = (37 * hash) + SOURCE_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getSourceUpdateTime().hashCode(); - } - hash = (37 * hash) + CVSS_VERSION_FIELD_NUMBER; - hash = (53 * hash) + cvssVersion_; - if (hasCvssV2()) { - hash = (37 * hash) + CVSS_V2_FIELD_NUMBER; - hash = (53 * hash) + getCvssV2().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.VulnerabilityNote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A security vulnerability that can be found in resources.
-   * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityNote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityNote) - io.grafeas.v1.VulnerabilityNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityNote.class, io.grafeas.v1.VulnerabilityNote.Builder.class); - } - - // Construct using io.grafeas.v1.VulnerabilityNote.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - cvssScore_ = 0F; - severity_ = 0; - if (detailsBuilder_ == null) { - details_ = java.util.Collections.emptyList(); - } else { - details_ = null; - detailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - cvssV3_ = null; - if (cvssV3Builder_ != null) { - cvssV3Builder_.dispose(); - cvssV3Builder_ = null; - } - if (windowsDetailsBuilder_ == null) { - windowsDetails_ = java.util.Collections.emptyList(); - } else { - windowsDetails_ = null; - windowsDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - sourceUpdateTime_ = null; - if (sourceUpdateTimeBuilder_ != null) { - sourceUpdateTimeBuilder_.dispose(); - sourceUpdateTimeBuilder_ = null; - } - cvssVersion_ = 0; - cvssV2_ = null; - if (cvssV2Builder_ != null) { - cvssV2Builder_.dispose(); - cvssV2Builder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityNote_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote getDefaultInstanceForType() { - return io.grafeas.v1.VulnerabilityNote.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote build() { - io.grafeas.v1.VulnerabilityNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote buildPartial() { - io.grafeas.v1.VulnerabilityNote result = new io.grafeas.v1.VulnerabilityNote(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityNote result) { - if (detailsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - details_ = java.util.Collections.unmodifiableList(details_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.details_ = details_; - } else { - result.details_ = detailsBuilder_.build(); - } - if (windowsDetailsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - windowsDetails_ = java.util.Collections.unmodifiableList(windowsDetails_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.windowsDetails_ = windowsDetails_; - } else { - result.windowsDetails_ = windowsDetailsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.VulnerabilityNote result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.cvssScore_ = cvssScore_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.severity_ = severity_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.cvssV3_ = cvssV3Builder_ == null - ? cvssV3_ - : cvssV3Builder_.build(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.sourceUpdateTime_ = sourceUpdateTimeBuilder_ == null - ? sourceUpdateTime_ - : sourceUpdateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.cvssVersion_ = cvssVersion_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.cvssV2_ = cvssV2Builder_ == null - ? cvssV2_ - : cvssV2Builder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.VulnerabilityNote) { - return mergeFrom((io.grafeas.v1.VulnerabilityNote)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote other) { - if (other == io.grafeas.v1.VulnerabilityNote.getDefaultInstance()) return this; - if (other.getCvssScore() != 0F) { - setCvssScore(other.getCvssScore()); - } - if (other.severity_ != 0) { - setSeverityValue(other.getSeverityValue()); - } - if (detailsBuilder_ == null) { - if (!other.details_.isEmpty()) { - if (details_.isEmpty()) { - details_ = other.details_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureDetailsIsMutable(); - details_.addAll(other.details_); - } - onChanged(); - } - } else { - if (!other.details_.isEmpty()) { - if (detailsBuilder_.isEmpty()) { - detailsBuilder_.dispose(); - detailsBuilder_ = null; - details_ = other.details_; - bitField0_ = (bitField0_ & ~0x00000004); - detailsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDetailsFieldBuilder() : null; - } else { - detailsBuilder_.addAllMessages(other.details_); - } - } - } - if (other.hasCvssV3()) { - mergeCvssV3(other.getCvssV3()); - } - if (windowsDetailsBuilder_ == null) { - if (!other.windowsDetails_.isEmpty()) { - if (windowsDetails_.isEmpty()) { - windowsDetails_ = other.windowsDetails_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureWindowsDetailsIsMutable(); - windowsDetails_.addAll(other.windowsDetails_); - } - onChanged(); - } - } else { - if (!other.windowsDetails_.isEmpty()) { - if (windowsDetailsBuilder_.isEmpty()) { - windowsDetailsBuilder_.dispose(); - windowsDetailsBuilder_ = null; - windowsDetails_ = other.windowsDetails_; - bitField0_ = (bitField0_ & ~0x00000010); - windowsDetailsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getWindowsDetailsFieldBuilder() : null; - } else { - windowsDetailsBuilder_.addAllMessages(other.windowsDetails_); - } - } - } - if (other.hasSourceUpdateTime()) { - mergeSourceUpdateTime(other.getSourceUpdateTime()); - } - if (other.cvssVersion_ != 0) { - setCvssVersionValue(other.getCvssVersionValue()); - } - if (other.hasCvssV2()) { - mergeCvssV2(other.getCvssV2()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - cvssScore_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - case 16: { - severity_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - io.grafeas.v1.VulnerabilityNote.Detail m = - input.readMessage( - io.grafeas.v1.VulnerabilityNote.Detail.parser(), - extensionRegistry); - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - details_.add(m); - } else { - detailsBuilder_.addMessage(m); - } - break; - } // case 26 - case 34: { - input.readMessage( - getCvssV3FieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - io.grafeas.v1.VulnerabilityNote.WindowsDetail m = - input.readMessage( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.parser(), - extensionRegistry); - if (windowsDetailsBuilder_ == null) { - ensureWindowsDetailsIsMutable(); - windowsDetails_.add(m); - } else { - windowsDetailsBuilder_.addMessage(m); - } - break; - } // case 42 - case 50: { - input.readMessage( - getSourceUpdateTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 56: { - cvssVersion_ = input.readEnum(); - bitField0_ |= 0x00000040; - break; - } // case 56 - case 66: { - input.readMessage( - getCvssV2FieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 66 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private float cvssScore_ ; - /** - *
-     * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
-     * where 0 indicates low severity and 10 indicates high severity.
-     * 
- * - * float cvss_score = 1; - * @return The cvssScore. - */ - @java.lang.Override - public float getCvssScore() { - return cvssScore_; - } - /** - *
-     * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
-     * where 0 indicates low severity and 10 indicates high severity.
-     * 
- * - * float cvss_score = 1; - * @param value The cvssScore to set. - * @return This builder for chaining. - */ - public Builder setCvssScore(float value) { - - cvssScore_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
-     * where 0 indicates low severity and 10 indicates high severity.
-     * 
- * - * float cvss_score = 1; - * @return This builder for chaining. - */ - public Builder clearCvssScore() { - bitField0_ = (bitField0_ & ~0x00000001); - cvssScore_ = 0F; - onChanged(); - return this; - } - - private int severity_ = 0; - /** - *
-     * The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override public int getSeverityValue() { - return severity_; - } - /** - *
-     * The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @param value The enum numeric value on the wire for severity to set. - * @return This builder for chaining. - */ - public Builder setSeverityValue(int value) { - severity_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - @java.lang.Override - public io.grafeas.v1.Severity getSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - /** - *
-     * The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @param value The severity to set. - * @return This builder for chaining. - */ - public Builder setSeverity(io.grafeas.v1.Severity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - severity_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @return This builder for chaining. - */ - public Builder clearSeverity() { - bitField0_ = (bitField0_ & ~0x00000002); - severity_ = 0; - onChanged(); - return this; - } - - private java.util.List details_ = - java.util.Collections.emptyList(); - private void ensureDetailsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - details_ = new java.util.ArrayList(details_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.Detail, io.grafeas.v1.VulnerabilityNote.Detail.Builder, io.grafeas.v1.VulnerabilityNote.DetailOrBuilder> detailsBuilder_; - - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public java.util.List getDetailsList() { - if (detailsBuilder_ == null) { - return java.util.Collections.unmodifiableList(details_); - } else { - return detailsBuilder_.getMessageList(); - } - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public int getDetailsCount() { - if (detailsBuilder_ == null) { - return details_.size(); - } else { - return detailsBuilder_.getCount(); - } - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public io.grafeas.v1.VulnerabilityNote.Detail getDetails(int index) { - if (detailsBuilder_ == null) { - return details_.get(index); - } else { - return detailsBuilder_.getMessage(index); - } - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder setDetails( - int index, io.grafeas.v1.VulnerabilityNote.Detail value) { - if (detailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetailsIsMutable(); - details_.set(index, value); - onChanged(); - } else { - detailsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder setDetails( - int index, io.grafeas.v1.VulnerabilityNote.Detail.Builder builderForValue) { - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - details_.set(index, builderForValue.build()); - onChanged(); - } else { - detailsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder addDetails(io.grafeas.v1.VulnerabilityNote.Detail value) { - if (detailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetailsIsMutable(); - details_.add(value); - onChanged(); - } else { - detailsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder addDetails( - int index, io.grafeas.v1.VulnerabilityNote.Detail value) { - if (detailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetailsIsMutable(); - details_.add(index, value); - onChanged(); - } else { - detailsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder addDetails( - io.grafeas.v1.VulnerabilityNote.Detail.Builder builderForValue) { - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - details_.add(builderForValue.build()); - onChanged(); - } else { - detailsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder addDetails( - int index, io.grafeas.v1.VulnerabilityNote.Detail.Builder builderForValue) { - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - details_.add(index, builderForValue.build()); - onChanged(); - } else { - detailsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder addAllDetails( - java.lang.Iterable values) { - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, details_); - onChanged(); - } else { - detailsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder clearDetails() { - if (detailsBuilder_ == null) { - details_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - detailsBuilder_.clear(); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public Builder removeDetails(int index) { - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - details_.remove(index); - onChanged(); - } else { - detailsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public io.grafeas.v1.VulnerabilityNote.Detail.Builder getDetailsBuilder( - int index) { - return getDetailsFieldBuilder().getBuilder(index); - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public io.grafeas.v1.VulnerabilityNote.DetailOrBuilder getDetailsOrBuilder( - int index) { - if (detailsBuilder_ == null) { - return details_.get(index); } else { - return detailsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public java.util.List - getDetailsOrBuilderList() { - if (detailsBuilder_ != null) { - return detailsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(details_); - } - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public io.grafeas.v1.VulnerabilityNote.Detail.Builder addDetailsBuilder() { - return getDetailsFieldBuilder().addBuilder( - io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance()); - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public io.grafeas.v1.VulnerabilityNote.Detail.Builder addDetailsBuilder( - int index) { - return getDetailsFieldBuilder().addBuilder( - index, io.grafeas.v1.VulnerabilityNote.Detail.getDefaultInstance()); - } - /** - *
-     * Details of all known distros and packages affected by this vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - public java.util.List - getDetailsBuilderList() { - return getDetailsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.Detail, io.grafeas.v1.VulnerabilityNote.Detail.Builder, io.grafeas.v1.VulnerabilityNote.DetailOrBuilder> - getDetailsFieldBuilder() { - if (detailsBuilder_ == null) { - detailsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.Detail, io.grafeas.v1.VulnerabilityNote.Detail.Builder, io.grafeas.v1.VulnerabilityNote.DetailOrBuilder>( - details_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - details_ = null; - } - return detailsBuilder_; - } - - private io.grafeas.v1.CVSSv3 cvssV3_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSSv3, io.grafeas.v1.CVSSv3.Builder, io.grafeas.v1.CVSSv3OrBuilder> cvssV3Builder_; - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @return Whether the cvssV3 field is set. - */ - public boolean hasCvssV3() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @return The cvssV3. - */ - public io.grafeas.v1.CVSSv3 getCvssV3() { - if (cvssV3Builder_ == null) { - return cvssV3_ == null ? io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; - } else { - return cvssV3Builder_.getMessage(); - } - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - public Builder setCvssV3(io.grafeas.v1.CVSSv3 value) { - if (cvssV3Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cvssV3_ = value; - } else { - cvssV3Builder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - public Builder setCvssV3( - io.grafeas.v1.CVSSv3.Builder builderForValue) { - if (cvssV3Builder_ == null) { - cvssV3_ = builderForValue.build(); - } else { - cvssV3Builder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - public Builder mergeCvssV3(io.grafeas.v1.CVSSv3 value) { - if (cvssV3Builder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - cvssV3_ != null && - cvssV3_ != io.grafeas.v1.CVSSv3.getDefaultInstance()) { - getCvssV3Builder().mergeFrom(value); - } else { - cvssV3_ = value; - } - } else { - cvssV3Builder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - public Builder clearCvssV3() { - bitField0_ = (bitField0_ & ~0x00000008); - cvssV3_ = null; - if (cvssV3Builder_ != null) { - cvssV3Builder_.dispose(); - cvssV3Builder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - public io.grafeas.v1.CVSSv3.Builder getCvssV3Builder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCvssV3FieldBuilder().getBuilder(); - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - public io.grafeas.v1.CVSSv3OrBuilder getCvssV3OrBuilder() { - if (cvssV3Builder_ != null) { - return cvssV3Builder_.getMessageOrBuilder(); - } else { - return cvssV3_ == null ? - io.grafeas.v1.CVSSv3.getDefaultInstance() : cvssV3_; - } - } - /** - *
-     * The full description of the CVSSv3 for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSSv3, io.grafeas.v1.CVSSv3.Builder, io.grafeas.v1.CVSSv3OrBuilder> - getCvssV3FieldBuilder() { - if (cvssV3Builder_ == null) { - cvssV3Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSSv3, io.grafeas.v1.CVSSv3.Builder, io.grafeas.v1.CVSSv3OrBuilder>( - getCvssV3(), - getParentForChildren(), - isClean()); - cvssV3_ = null; - } - return cvssV3Builder_; - } - - private java.util.List windowsDetails_ = - java.util.Collections.emptyList(); - private void ensureWindowsDetailsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - windowsDetails_ = new java.util.ArrayList(windowsDetails_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.WindowsDetail, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder> windowsDetailsBuilder_; - - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public java.util.List getWindowsDetailsList() { - if (windowsDetailsBuilder_ == null) { - return java.util.Collections.unmodifiableList(windowsDetails_); - } else { - return windowsDetailsBuilder_.getMessageList(); - } - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public int getWindowsDetailsCount() { - if (windowsDetailsBuilder_ == null) { - return windowsDetails_.size(); - } else { - return windowsDetailsBuilder_.getCount(); - } - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail getWindowsDetails(int index) { - if (windowsDetailsBuilder_ == null) { - return windowsDetails_.get(index); - } else { - return windowsDetailsBuilder_.getMessage(index); - } - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder setWindowsDetails( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail value) { - if (windowsDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWindowsDetailsIsMutable(); - windowsDetails_.set(index, value); - onChanged(); - } else { - windowsDetailsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder setWindowsDetails( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder builderForValue) { - if (windowsDetailsBuilder_ == null) { - ensureWindowsDetailsIsMutable(); - windowsDetails_.set(index, builderForValue.build()); - onChanged(); - } else { - windowsDetailsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder addWindowsDetails(io.grafeas.v1.VulnerabilityNote.WindowsDetail value) { - if (windowsDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWindowsDetailsIsMutable(); - windowsDetails_.add(value); - onChanged(); - } else { - windowsDetailsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder addWindowsDetails( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail value) { - if (windowsDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWindowsDetailsIsMutable(); - windowsDetails_.add(index, value); - onChanged(); - } else { - windowsDetailsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder addWindowsDetails( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder builderForValue) { - if (windowsDetailsBuilder_ == null) { - ensureWindowsDetailsIsMutable(); - windowsDetails_.add(builderForValue.build()); - onChanged(); - } else { - windowsDetailsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder addWindowsDetails( - int index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder builderForValue) { - if (windowsDetailsBuilder_ == null) { - ensureWindowsDetailsIsMutable(); - windowsDetails_.add(index, builderForValue.build()); - onChanged(); - } else { - windowsDetailsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder addAllWindowsDetails( - java.lang.Iterable values) { - if (windowsDetailsBuilder_ == null) { - ensureWindowsDetailsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, windowsDetails_); - onChanged(); - } else { - windowsDetailsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder clearWindowsDetails() { - if (windowsDetailsBuilder_ == null) { - windowsDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - windowsDetailsBuilder_.clear(); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public Builder removeWindowsDetails(int index) { - if (windowsDetailsBuilder_ == null) { - ensureWindowsDetailsIsMutable(); - windowsDetails_.remove(index); - onChanged(); - } else { - windowsDetailsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder getWindowsDetailsBuilder( - int index) { - return getWindowsDetailsFieldBuilder().getBuilder(index); - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder getWindowsDetailsOrBuilder( - int index) { - if (windowsDetailsBuilder_ == null) { - return windowsDetails_.get(index); } else { - return windowsDetailsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public java.util.List - getWindowsDetailsOrBuilderList() { - if (windowsDetailsBuilder_ != null) { - return windowsDetailsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(windowsDetails_); - } - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder addWindowsDetailsBuilder() { - return getWindowsDetailsFieldBuilder().addBuilder( - io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance()); - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder addWindowsDetailsBuilder( - int index) { - return getWindowsDetailsFieldBuilder().addBuilder( - index, io.grafeas.v1.VulnerabilityNote.WindowsDetail.getDefaultInstance()); - } - /** - *
-     * Windows details get their own format because the information format and
-     * model don't match a normal detail. Specifically Windows updates are done as
-     * patches, thus Windows vulnerabilities really are a missing package, rather
-     * than a package being at an incorrect version.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - public java.util.List - getWindowsDetailsBuilderList() { - return getWindowsDetailsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.WindowsDetail, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder> - getWindowsDetailsFieldBuilder() { - if (windowsDetailsBuilder_ == null) { - windowsDetailsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityNote.WindowsDetail, io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder, io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder>( - windowsDetails_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - windowsDetails_ = null; - } - return windowsDetailsBuilder_; - } - - private com.google.protobuf.Timestamp sourceUpdateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> sourceUpdateTimeBuilder_; - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - * @return Whether the sourceUpdateTime field is set. - */ - public boolean hasSourceUpdateTime() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - * @return The sourceUpdateTime. - */ - public com.google.protobuf.Timestamp getSourceUpdateTime() { - if (sourceUpdateTimeBuilder_ == null) { - return sourceUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } else { - return sourceUpdateTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - public Builder setSourceUpdateTime(com.google.protobuf.Timestamp value) { - if (sourceUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sourceUpdateTime_ = value; - } else { - sourceUpdateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - public Builder setSourceUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (sourceUpdateTimeBuilder_ == null) { - sourceUpdateTime_ = builderForValue.build(); - } else { - sourceUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - public Builder mergeSourceUpdateTime(com.google.protobuf.Timestamp value) { - if (sourceUpdateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - sourceUpdateTime_ != null && - sourceUpdateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getSourceUpdateTimeBuilder().mergeFrom(value); - } else { - sourceUpdateTime_ = value; - } - } else { - sourceUpdateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - public Builder clearSourceUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000020); - sourceUpdateTime_ = null; - if (sourceUpdateTimeBuilder_ != null) { - sourceUpdateTimeBuilder_.dispose(); - sourceUpdateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - public com.google.protobuf.Timestamp.Builder getSourceUpdateTimeBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getSourceUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { - if (sourceUpdateTimeBuilder_ != null) { - return sourceUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return sourceUpdateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : sourceUpdateTime_; - } - } - /** - *
-     * The time this information was last changed at the source. This is an
-     * upstream timestamp from the underlying information source - e.g. Ubuntu
-     * security tracker.
-     * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getSourceUpdateTimeFieldBuilder() { - if (sourceUpdateTimeBuilder_ == null) { - sourceUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getSourceUpdateTime(), - getParentForChildren(), - isClean()); - sourceUpdateTime_ = null; - } - return sourceUpdateTimeBuilder_; - } - - private int cvssVersion_ = 0; - /** - *
-     * CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @return The enum numeric value on the wire for cvssVersion. - */ - @java.lang.Override public int getCvssVersionValue() { - return cvssVersion_; - } - /** - *
-     * CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @param value The enum numeric value on the wire for cvssVersion to set. - * @return This builder for chaining. - */ - public Builder setCvssVersionValue(int value) { - cvssVersion_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @return The cvssVersion. - */ - @java.lang.Override - public io.grafeas.v1.CVSSVersion getCvssVersion() { - io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); - return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; - } - /** - *
-     * CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @param value The cvssVersion to set. - * @return This builder for chaining. - */ - public Builder setCvssVersion(io.grafeas.v1.CVSSVersion value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - cvssVersion_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @return This builder for chaining. - */ - public Builder clearCvssVersion() { - bitField0_ = (bitField0_ & ~0x00000040); - cvssVersion_ = 0; - onChanged(); - return this; - } - - private io.grafeas.v1.CVSS cvssV2_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> cvssV2Builder_; - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - * @return Whether the cvssV2 field is set. - */ - public boolean hasCvssV2() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - * @return The cvssV2. - */ - public io.grafeas.v1.CVSS getCvssV2() { - if (cvssV2Builder_ == null) { - return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } else { - return cvssV2Builder_.getMessage(); - } - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - public Builder setCvssV2(io.grafeas.v1.CVSS value) { - if (cvssV2Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cvssV2_ = value; - } else { - cvssV2Builder_.setMessage(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - public Builder setCvssV2( - io.grafeas.v1.CVSS.Builder builderForValue) { - if (cvssV2Builder_ == null) { - cvssV2_ = builderForValue.build(); - } else { - cvssV2Builder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - public Builder mergeCvssV2(io.grafeas.v1.CVSS value) { - if (cvssV2Builder_ == null) { - if (((bitField0_ & 0x00000080) != 0) && - cvssV2_ != null && - cvssV2_ != io.grafeas.v1.CVSS.getDefaultInstance()) { - getCvssV2Builder().mergeFrom(value); - } else { - cvssV2_ = value; - } - } else { - cvssV2Builder_.mergeFrom(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - public Builder clearCvssV2() { - bitField0_ = (bitField0_ & ~0x00000080); - cvssV2_ = null; - if (cvssV2Builder_ != null) { - cvssV2Builder_.dispose(); - cvssV2Builder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - public io.grafeas.v1.CVSS.Builder getCvssV2Builder() { - bitField0_ |= 0x00000080; - onChanged(); - return getCvssV2FieldBuilder().getBuilder(); - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { - if (cvssV2Builder_ != null) { - return cvssV2Builder_.getMessageOrBuilder(); - } else { - return cvssV2_ == null ? - io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } - } - /** - *
-     * The full description of the v2 CVSS for this vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> - getCvssV2FieldBuilder() { - if (cvssV2Builder_ == null) { - cvssV2Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( - getCvssV2(), - getParentForChildren(), - isClean()); - cvssV2_ = null; - } - return cvssV2Builder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityNote) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote) - private static final io.grafeas.v1.VulnerabilityNote DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityNote(); - } - - public static io.grafeas.v1.VulnerabilityNote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VulnerabilityNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityNote getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java deleted file mode 100644 index 1e1b884465be..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java +++ /dev/null @@ -1,248 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/vulnerability.proto - -package io.grafeas.v1; - -public interface VulnerabilityNoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityNote) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
-   * where 0 indicates low severity and 10 indicates high severity.
-   * 
- * - * float cvss_score = 1; - * @return The cvssScore. - */ - float getCvssScore(); - - /** - *
-   * The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - int getSeverityValue(); - /** - *
-   * The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - io.grafeas.v1.Severity getSeverity(); - - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - java.util.List - getDetailsList(); - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - io.grafeas.v1.VulnerabilityNote.Detail getDetails(int index); - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - int getDetailsCount(); - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - java.util.List - getDetailsOrBuilderList(); - /** - *
-   * Details of all known distros and packages affected by this vulnerability.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - io.grafeas.v1.VulnerabilityNote.DetailOrBuilder getDetailsOrBuilder( - int index); - - /** - *
-   * The full description of the CVSSv3 for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @return Whether the cvssV3 field is set. - */ - boolean hasCvssV3(); - /** - *
-   * The full description of the CVSSv3 for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @return The cvssV3. - */ - io.grafeas.v1.CVSSv3 getCvssV3(); - /** - *
-   * The full description of the CVSSv3 for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - io.grafeas.v1.CVSSv3OrBuilder getCvssV3OrBuilder(); - - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - java.util.List - getWindowsDetailsList(); - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - io.grafeas.v1.VulnerabilityNote.WindowsDetail getWindowsDetails(int index); - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - int getWindowsDetailsCount(); - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - java.util.List - getWindowsDetailsOrBuilderList(); - /** - *
-   * Windows details get their own format because the information format and
-   * model don't match a normal detail. Specifically Windows updates are done as
-   * patches, thus Windows vulnerabilities really are a missing package, rather
-   * than a package being at an incorrect version.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder getWindowsDetailsOrBuilder( - int index); - - /** - *
-   * The time this information was last changed at the source. This is an
-   * upstream timestamp from the underlying information source - e.g. Ubuntu
-   * security tracker.
-   * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - * @return Whether the sourceUpdateTime field is set. - */ - boolean hasSourceUpdateTime(); - /** - *
-   * The time this information was last changed at the source. This is an
-   * upstream timestamp from the underlying information source - e.g. Ubuntu
-   * security tracker.
-   * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - * @return The sourceUpdateTime. - */ - com.google.protobuf.Timestamp getSourceUpdateTime(); - /** - *
-   * The time this information was last changed at the source. This is an
-   * upstream timestamp from the underlying information source - e.g. Ubuntu
-   * security tracker.
-   * 
- * - * .google.protobuf.Timestamp source_update_time = 6; - */ - com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder(); - - /** - *
-   * CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @return The enum numeric value on the wire for cvssVersion. - */ - int getCvssVersionValue(); - /** - *
-   * CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 7; - * @return The cvssVersion. - */ - io.grafeas.v1.CVSSVersion getCvssVersion(); - - /** - *
-   * The full description of the v2 CVSS for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - * @return Whether the cvssV2 field is set. - */ - boolean hasCvssV2(); - /** - *
-   * The full description of the v2 CVSS for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - * @return The cvssV2. - */ - io.grafeas.v1.CVSS getCvssV2(); - /** - *
-   * The full description of the v2 CVSS for this vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 8; - */ - io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java deleted file mode 100644 index 8544d0e881a8..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java +++ /dev/null @@ -1,8260 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/vulnerability.proto - -package io.grafeas.v1; - -/** - *
- * An occurrence of a severity vulnerability on a resource.
- * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence} - */ -public final class VulnerabilityOccurrence extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityOccurrence) - VulnerabilityOccurrenceOrBuilder { -private static final long serialVersionUID = 0L; - // Use VulnerabilityOccurrence.newBuilder() to construct. - private VulnerabilityOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private VulnerabilityOccurrence() { - type_ = ""; - severity_ = 0; - packageIssue_ = java.util.Collections.emptyList(); - shortDescription_ = ""; - longDescription_ = ""; - relatedUrls_ = java.util.Collections.emptyList(); - effectiveSeverity_ = 0; - cvssVersion_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new VulnerabilityOccurrence(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityOccurrence.class, io.grafeas.v1.VulnerabilityOccurrence.Builder.class); - } - - public interface PackageIssueOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityOccurrence.PackageIssue) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability was found in.
-     * 
- * - * string affected_cpe_uri = 1; - * @return The affectedCpeUri. - */ - java.lang.String getAffectedCpeUri(); - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability was found in.
-     * 
- * - * string affected_cpe_uri = 1; - * @return The bytes for affectedCpeUri. - */ - com.google.protobuf.ByteString - getAffectedCpeUriBytes(); - - /** - *
-     * Required. The package this vulnerability was found in.
-     * 
- * - * string affected_package = 2; - * @return The affectedPackage. - */ - java.lang.String getAffectedPackage(); - /** - *
-     * Required. The package this vulnerability was found in.
-     * 
- * - * string affected_package = 2; - * @return The bytes for affectedPackage. - */ - com.google.protobuf.ByteString - getAffectedPackageBytes(); - - /** - *
-     * Required. The version of the package that is installed on the resource
-     * affected by this vulnerability.
-     * 
- * - * .grafeas.v1.Version affected_version = 3; - * @return Whether the affectedVersion field is set. - */ - boolean hasAffectedVersion(); - /** - *
-     * Required. The version of the package that is installed on the resource
-     * affected by this vulnerability.
-     * 
- * - * .grafeas.v1.Version affected_version = 3; - * @return The affectedVersion. - */ - io.grafeas.v1.Version getAffectedVersion(); - /** - *
-     * Required. The version of the package that is installed on the resource
-     * affected by this vulnerability.
-     * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - io.grafeas.v1.VersionOrBuilder getAffectedVersionOrBuilder(); - - /** - *
-     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-     * was fixed in. It is possible for this to be different from the
-     * affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 4; - * @return The fixedCpeUri. - */ - java.lang.String getFixedCpeUri(); - /** - *
-     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-     * was fixed in. It is possible for this to be different from the
-     * affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 4; - * @return The bytes for fixedCpeUri. - */ - com.google.protobuf.ByteString - getFixedCpeUriBytes(); - - /** - *
-     * The package this vulnerability was fixed in. It is possible for this to
-     * be different from the affected_package.
-     * 
- * - * string fixed_package = 5; - * @return The fixedPackage. - */ - java.lang.String getFixedPackage(); - /** - *
-     * The package this vulnerability was fixed in. It is possible for this to
-     * be different from the affected_package.
-     * 
- * - * string fixed_package = 5; - * @return The bytes for fixedPackage. - */ - com.google.protobuf.ByteString - getFixedPackageBytes(); - - /** - *
-     * Required. The version of the package this vulnerability was fixed in.
-     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 6; - * @return Whether the fixedVersion field is set. - */ - boolean hasFixedVersion(); - /** - *
-     * Required. The version of the package this vulnerability was fixed in.
-     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 6; - * @return The fixedVersion. - */ - io.grafeas.v1.Version getFixedVersion(); - /** - *
-     * Required. The version of the package this vulnerability was fixed in.
-     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder(); - - /** - *
-     * Output only. Whether a fix is available for this package.
-     * 
- * - * bool fix_available = 7; - * @return The fixAvailable. - */ - boolean getFixAvailable(); - - /** - *
-     * The type of package (e.g. OS, MAVEN, GO).
-     * 
- * - * string package_type = 8; - * @return The packageType. - */ - java.lang.String getPackageType(); - /** - *
-     * The type of package (e.g. OS, MAVEN, GO).
-     * 
- * - * string package_type = 8; - * @return The bytes for packageType. - */ - com.google.protobuf.ByteString - getPackageTypeBytes(); - - /** - *
-     * The distro or language system assigned severity for this vulnerability
-     * when that is available and note provider assigned severity when it is not
-     * available.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for effectiveSeverity. - */ - int getEffectiveSeverityValue(); - /** - *
-     * The distro or language system assigned severity for this vulnerability
-     * when that is available and note provider assigned severity when it is not
-     * available.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The effectiveSeverity. - */ - io.grafeas.v1.Severity getEffectiveSeverity(); - - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - java.util.List - getFileLocationList(); - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - io.grafeas.v1.FileLocation getFileLocation(int index); - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - int getFileLocationCount(); - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - java.util.List - getFileLocationOrBuilderList(); - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - io.grafeas.v1.FileLocationOrBuilder getFileLocationOrBuilder( - int index); - } - /** - *
-   * A detail for a distro and package this vulnerability occurrence was found
-   * in and its associated fix (if one is available).
-   * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.PackageIssue} - */ - public static final class PackageIssue extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityOccurrence.PackageIssue) - PackageIssueOrBuilder { - private static final long serialVersionUID = 0L; - // Use PackageIssue.newBuilder() to construct. - private PackageIssue(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PackageIssue() { - affectedCpeUri_ = ""; - affectedPackage_ = ""; - fixedCpeUri_ = ""; - fixedPackage_ = ""; - packageType_ = ""; - effectiveSeverity_ = 0; - fileLocation_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PackageIssue(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.class, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder.class); - } - - public static final int AFFECTED_CPE_URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object affectedCpeUri_ = ""; - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability was found in.
-     * 
- * - * string affected_cpe_uri = 1; - * @return The affectedCpeUri. - */ - @java.lang.Override - public java.lang.String getAffectedCpeUri() { - java.lang.Object ref = affectedCpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedCpeUri_ = s; - return s; - } - } - /** - *
-     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-     * vulnerability was found in.
-     * 
- * - * string affected_cpe_uri = 1; - * @return The bytes for affectedCpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAffectedCpeUriBytes() { - java.lang.Object ref = affectedCpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AFFECTED_PACKAGE_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object affectedPackage_ = ""; - /** - *
-     * Required. The package this vulnerability was found in.
-     * 
- * - * string affected_package = 2; - * @return The affectedPackage. - */ - @java.lang.Override - public java.lang.String getAffectedPackage() { - java.lang.Object ref = affectedPackage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedPackage_ = s; - return s; - } - } - /** - *
-     * Required. The package this vulnerability was found in.
-     * 
- * - * string affected_package = 2; - * @return The bytes for affectedPackage. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAffectedPackageBytes() { - java.lang.Object ref = affectedPackage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AFFECTED_VERSION_FIELD_NUMBER = 3; - private io.grafeas.v1.Version affectedVersion_; - /** - *
-     * Required. The version of the package that is installed on the resource
-     * affected by this vulnerability.
-     * 
- * - * .grafeas.v1.Version affected_version = 3; - * @return Whether the affectedVersion field is set. - */ - @java.lang.Override - public boolean hasAffectedVersion() { - return affectedVersion_ != null; - } - /** - *
-     * Required. The version of the package that is installed on the resource
-     * affected by this vulnerability.
-     * 
- * - * .grafeas.v1.Version affected_version = 3; - * @return The affectedVersion. - */ - @java.lang.Override - public io.grafeas.v1.Version getAffectedVersion() { - return affectedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; - } - /** - *
-     * Required. The version of the package that is installed on the resource
-     * affected by this vulnerability.
-     * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getAffectedVersionOrBuilder() { - return affectedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; - } - - public static final int FIXED_CPE_URI_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object fixedCpeUri_ = ""; - /** - *
-     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-     * was fixed in. It is possible for this to be different from the
-     * affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 4; - * @return The fixedCpeUri. - */ - @java.lang.Override - public java.lang.String getFixedCpeUri() { - java.lang.Object ref = fixedCpeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedCpeUri_ = s; - return s; - } - } - /** - *
-     * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-     * was fixed in. It is possible for this to be different from the
-     * affected_cpe_uri.
-     * 
- * - * string fixed_cpe_uri = 4; - * @return The bytes for fixedCpeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFixedCpeUriBytes() { - java.lang.Object ref = fixedCpeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FIXED_PACKAGE_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object fixedPackage_ = ""; - /** - *
-     * The package this vulnerability was fixed in. It is possible for this to
-     * be different from the affected_package.
-     * 
- * - * string fixed_package = 5; - * @return The fixedPackage. - */ - @java.lang.Override - public java.lang.String getFixedPackage() { - java.lang.Object ref = fixedPackage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedPackage_ = s; - return s; - } - } - /** - *
-     * The package this vulnerability was fixed in. It is possible for this to
-     * be different from the affected_package.
-     * 
- * - * string fixed_package = 5; - * @return The bytes for fixedPackage. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFixedPackageBytes() { - java.lang.Object ref = fixedPackage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FIXED_VERSION_FIELD_NUMBER = 6; - private io.grafeas.v1.Version fixedVersion_; - /** - *
-     * Required. The version of the package this vulnerability was fixed in.
-     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 6; - * @return Whether the fixedVersion field is set. - */ - @java.lang.Override - public boolean hasFixedVersion() { - return fixedVersion_ != null; - } - /** - *
-     * Required. The version of the package this vulnerability was fixed in.
-     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 6; - * @return The fixedVersion. - */ - @java.lang.Override - public io.grafeas.v1.Version getFixedVersion() { - return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } - /** - *
-     * Required. The version of the package this vulnerability was fixed in.
-     * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-     * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - @java.lang.Override - public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { - return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } - - public static final int FIX_AVAILABLE_FIELD_NUMBER = 7; - private boolean fixAvailable_ = false; - /** - *
-     * Output only. Whether a fix is available for this package.
-     * 
- * - * bool fix_available = 7; - * @return The fixAvailable. - */ - @java.lang.Override - public boolean getFixAvailable() { - return fixAvailable_; - } - - public static final int PACKAGE_TYPE_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private volatile java.lang.Object packageType_ = ""; - /** - *
-     * The type of package (e.g. OS, MAVEN, GO).
-     * 
- * - * string package_type = 8; - * @return The packageType. - */ - @java.lang.Override - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } - } - /** - *
-     * The type of package (e.g. OS, MAVEN, GO).
-     * 
- * - * string package_type = 8; - * @return The bytes for packageType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EFFECTIVE_SEVERITY_FIELD_NUMBER = 9; - private int effectiveSeverity_ = 0; - /** - *
-     * The distro or language system assigned severity for this vulnerability
-     * when that is available and note provider assigned severity when it is not
-     * available.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for effectiveSeverity. - */ - @java.lang.Override public int getEffectiveSeverityValue() { - return effectiveSeverity_; - } - /** - *
-     * The distro or language system assigned severity for this vulnerability
-     * when that is available and note provider assigned severity when it is not
-     * available.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The effectiveSeverity. - */ - @java.lang.Override public io.grafeas.v1.Severity getEffectiveSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - - public static final int FILE_LOCATION_FIELD_NUMBER = 10; - @SuppressWarnings("serial") - private java.util.List fileLocation_; - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - @java.lang.Override - public java.util.List getFileLocationList() { - return fileLocation_; - } - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - @java.lang.Override - public java.util.List - getFileLocationOrBuilderList() { - return fileLocation_; - } - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - @java.lang.Override - public int getFileLocationCount() { - return fileLocation_.size(); - } - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - @java.lang.Override - public io.grafeas.v1.FileLocation getFileLocation(int index) { - return fileLocation_.get(index); - } - /** - *
-     * The location at which this package was found.
-     * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - @java.lang.Override - public io.grafeas.v1.FileLocationOrBuilder getFileLocationOrBuilder( - int index) { - return fileLocation_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, affectedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, affectedPackage_); - } - if (affectedVersion_ != null) { - output.writeMessage(3, getAffectedVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, fixedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fixedPackage_); - } - if (fixedVersion_ != null) { - output.writeMessage(6, getFixedVersion()); - } - if (fixAvailable_ != false) { - output.writeBool(7, fixAvailable_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, packageType_); - } - if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - output.writeEnum(9, effectiveSeverity_); - } - for (int i = 0; i < fileLocation_.size(); i++) { - output.writeMessage(10, fileLocation_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedCpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, affectedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(affectedPackage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, affectedPackage_); - } - if (affectedVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getAffectedVersion()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, fixedCpeUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedPackage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, fixedPackage_); - } - if (fixedVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getFixedVersion()); - } - if (fixAvailable_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(7, fixAvailable_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, packageType_); - } - if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, effectiveSeverity_); - } - for (int i = 0; i < fileLocation_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, fileLocation_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.VulnerabilityOccurrence.PackageIssue)) { - return super.equals(obj); - } - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue other = (io.grafeas.v1.VulnerabilityOccurrence.PackageIssue) obj; - - if (!getAffectedCpeUri() - .equals(other.getAffectedCpeUri())) return false; - if (!getAffectedPackage() - .equals(other.getAffectedPackage())) return false; - if (hasAffectedVersion() != other.hasAffectedVersion()) return false; - if (hasAffectedVersion()) { - if (!getAffectedVersion() - .equals(other.getAffectedVersion())) return false; - } - if (!getFixedCpeUri() - .equals(other.getFixedCpeUri())) return false; - if (!getFixedPackage() - .equals(other.getFixedPackage())) return false; - if (hasFixedVersion() != other.hasFixedVersion()) return false; - if (hasFixedVersion()) { - if (!getFixedVersion() - .equals(other.getFixedVersion())) return false; - } - if (getFixAvailable() - != other.getFixAvailable()) return false; - if (!getPackageType() - .equals(other.getPackageType())) return false; - if (effectiveSeverity_ != other.effectiveSeverity_) return false; - if (!getFileLocationList() - .equals(other.getFileLocationList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + AFFECTED_CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getAffectedCpeUri().hashCode(); - hash = (37 * hash) + AFFECTED_PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getAffectedPackage().hashCode(); - if (hasAffectedVersion()) { - hash = (37 * hash) + AFFECTED_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getAffectedVersion().hashCode(); - } - hash = (37 * hash) + FIXED_CPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getFixedCpeUri().hashCode(); - hash = (37 * hash) + FIXED_PACKAGE_FIELD_NUMBER; - hash = (53 * hash) + getFixedPackage().hashCode(); - if (hasFixedVersion()) { - hash = (37 * hash) + FIXED_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getFixedVersion().hashCode(); - } - hash = (37 * hash) + FIX_AVAILABLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getFixAvailable()); - hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getPackageType().hashCode(); - hash = (37 * hash) + EFFECTIVE_SEVERITY_FIELD_NUMBER; - hash = (53 * hash) + effectiveSeverity_; - if (getFileLocationCount() > 0) { - hash = (37 * hash) + FILE_LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getFileLocationList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A detail for a distro and package this vulnerability occurrence was found
-     * in and its associated fix (if one is available).
-     * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.PackageIssue} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityOccurrence.PackageIssue) - io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.class, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder.class); - } - - // Construct using io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - affectedCpeUri_ = ""; - affectedPackage_ = ""; - affectedVersion_ = null; - if (affectedVersionBuilder_ != null) { - affectedVersionBuilder_.dispose(); - affectedVersionBuilder_ = null; - } - fixedCpeUri_ = ""; - fixedPackage_ = ""; - fixedVersion_ = null; - if (fixedVersionBuilder_ != null) { - fixedVersionBuilder_.dispose(); - fixedVersionBuilder_ = null; - } - fixAvailable_ = false; - packageType_ = ""; - effectiveSeverity_ = 0; - if (fileLocationBuilder_ == null) { - fileLocation_ = java.util.Collections.emptyList(); - } else { - fileLocation_ = null; - fileLocationBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000200); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getDefaultInstanceForType() { - return io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue build() { - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue buildPartial() { - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result = new io.grafeas.v1.VulnerabilityOccurrence.PackageIssue(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result) { - if (fileLocationBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0)) { - fileLocation_ = java.util.Collections.unmodifiableList(fileLocation_); - bitField0_ = (bitField0_ & ~0x00000200); - } - result.fileLocation_ = fileLocation_; - } else { - result.fileLocation_ = fileLocationBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.affectedCpeUri_ = affectedCpeUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.affectedPackage_ = affectedPackage_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.affectedVersion_ = affectedVersionBuilder_ == null - ? affectedVersion_ - : affectedVersionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.fixedCpeUri_ = fixedCpeUri_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.fixedPackage_ = fixedPackage_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.fixedVersion_ = fixedVersionBuilder_ == null - ? fixedVersion_ - : fixedVersionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.fixAvailable_ = fixAvailable_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.packageType_ = packageType_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.effectiveSeverity_ = effectiveSeverity_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.VulnerabilityOccurrence.PackageIssue) { - return mergeFrom((io.grafeas.v1.VulnerabilityOccurrence.PackageIssue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue other) { - if (other == io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance()) return this; - if (!other.getAffectedCpeUri().isEmpty()) { - affectedCpeUri_ = other.affectedCpeUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getAffectedPackage().isEmpty()) { - affectedPackage_ = other.affectedPackage_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasAffectedVersion()) { - mergeAffectedVersion(other.getAffectedVersion()); - } - if (!other.getFixedCpeUri().isEmpty()) { - fixedCpeUri_ = other.fixedCpeUri_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getFixedPackage().isEmpty()) { - fixedPackage_ = other.fixedPackage_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasFixedVersion()) { - mergeFixedVersion(other.getFixedVersion()); - } - if (other.getFixAvailable() != false) { - setFixAvailable(other.getFixAvailable()); - } - if (!other.getPackageType().isEmpty()) { - packageType_ = other.packageType_; - bitField0_ |= 0x00000080; - onChanged(); - } - if (other.effectiveSeverity_ != 0) { - setEffectiveSeverityValue(other.getEffectiveSeverityValue()); - } - if (fileLocationBuilder_ == null) { - if (!other.fileLocation_.isEmpty()) { - if (fileLocation_.isEmpty()) { - fileLocation_ = other.fileLocation_; - bitField0_ = (bitField0_ & ~0x00000200); - } else { - ensureFileLocationIsMutable(); - fileLocation_.addAll(other.fileLocation_); - } - onChanged(); - } - } else { - if (!other.fileLocation_.isEmpty()) { - if (fileLocationBuilder_.isEmpty()) { - fileLocationBuilder_.dispose(); - fileLocationBuilder_ = null; - fileLocation_ = other.fileLocation_; - bitField0_ = (bitField0_ & ~0x00000200); - fileLocationBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFileLocationFieldBuilder() : null; - } else { - fileLocationBuilder_.addAllMessages(other.fileLocation_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - affectedCpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - affectedPackage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getAffectedVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - fixedCpeUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - fixedPackage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - input.readMessage( - getFixedVersionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 56: { - fixAvailable_ = input.readBool(); - bitField0_ |= 0x00000040; - break; - } // case 56 - case 66: { - packageType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 66 - case 72: { - effectiveSeverity_ = input.readEnum(); - bitField0_ |= 0x00000100; - break; - } // case 72 - case 82: { - io.grafeas.v1.FileLocation m = - input.readMessage( - io.grafeas.v1.FileLocation.parser(), - extensionRegistry); - if (fileLocationBuilder_ == null) { - ensureFileLocationIsMutable(); - fileLocation_.add(m); - } else { - fileLocationBuilder_.addMessage(m); - } - break; - } // case 82 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object affectedCpeUri_ = ""; - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability was found in.
-       * 
- * - * string affected_cpe_uri = 1; - * @return The affectedCpeUri. - */ - public java.lang.String getAffectedCpeUri() { - java.lang.Object ref = affectedCpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedCpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability was found in.
-       * 
- * - * string affected_cpe_uri = 1; - * @return The bytes for affectedCpeUri. - */ - public com.google.protobuf.ByteString - getAffectedCpeUriBytes() { - java.lang.Object ref = affectedCpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability was found in.
-       * 
- * - * string affected_cpe_uri = 1; - * @param value The affectedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setAffectedCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - affectedCpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability was found in.
-       * 
- * - * string affected_cpe_uri = 1; - * @return This builder for chaining. - */ - public Builder clearAffectedCpeUri() { - affectedCpeUri_ = getDefaultInstance().getAffectedCpeUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
-       * vulnerability was found in.
-       * 
- * - * string affected_cpe_uri = 1; - * @param value The bytes for affectedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setAffectedCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - affectedCpeUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object affectedPackage_ = ""; - /** - *
-       * Required. The package this vulnerability was found in.
-       * 
- * - * string affected_package = 2; - * @return The affectedPackage. - */ - public java.lang.String getAffectedPackage() { - java.lang.Object ref = affectedPackage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - affectedPackage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The package this vulnerability was found in.
-       * 
- * - * string affected_package = 2; - * @return The bytes for affectedPackage. - */ - public com.google.protobuf.ByteString - getAffectedPackageBytes() { - java.lang.Object ref = affectedPackage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - affectedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The package this vulnerability was found in.
-       * 
- * - * string affected_package = 2; - * @param value The affectedPackage to set. - * @return This builder for chaining. - */ - public Builder setAffectedPackage( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - affectedPackage_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * Required. The package this vulnerability was found in.
-       * 
- * - * string affected_package = 2; - * @return This builder for chaining. - */ - public Builder clearAffectedPackage() { - affectedPackage_ = getDefaultInstance().getAffectedPackage(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-       * Required. The package this vulnerability was found in.
-       * 
- * - * string affected_package = 2; - * @param value The bytes for affectedPackage to set. - * @return This builder for chaining. - */ - public Builder setAffectedPackageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - affectedPackage_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private io.grafeas.v1.Version affectedVersion_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> affectedVersionBuilder_; - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - * @return Whether the affectedVersion field is set. - */ - public boolean hasAffectedVersion() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - * @return The affectedVersion. - */ - public io.grafeas.v1.Version getAffectedVersion() { - if (affectedVersionBuilder_ == null) { - return affectedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; - } else { - return affectedVersionBuilder_.getMessage(); - } - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - public Builder setAffectedVersion(io.grafeas.v1.Version value) { - if (affectedVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - affectedVersion_ = value; - } else { - affectedVersionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - public Builder setAffectedVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (affectedVersionBuilder_ == null) { - affectedVersion_ = builderForValue.build(); - } else { - affectedVersionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - public Builder mergeAffectedVersion(io.grafeas.v1.Version value) { - if (affectedVersionBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - affectedVersion_ != null && - affectedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { - getAffectedVersionBuilder().mergeFrom(value); - } else { - affectedVersion_ = value; - } - } else { - affectedVersionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - public Builder clearAffectedVersion() { - bitField0_ = (bitField0_ & ~0x00000004); - affectedVersion_ = null; - if (affectedVersionBuilder_ != null) { - affectedVersionBuilder_.dispose(); - affectedVersionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - public io.grafeas.v1.Version.Builder getAffectedVersionBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getAffectedVersionFieldBuilder().getBuilder(); - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - public io.grafeas.v1.VersionOrBuilder getAffectedVersionOrBuilder() { - if (affectedVersionBuilder_ != null) { - return affectedVersionBuilder_.getMessageOrBuilder(); - } else { - return affectedVersion_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : affectedVersion_; - } - } - /** - *
-       * Required. The version of the package that is installed on the resource
-       * affected by this vulnerability.
-       * 
- * - * .grafeas.v1.Version affected_version = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getAffectedVersionFieldBuilder() { - if (affectedVersionBuilder_ == null) { - affectedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getAffectedVersion(), - getParentForChildren(), - isClean()); - affectedVersion_ = null; - } - return affectedVersionBuilder_; - } - - private java.lang.Object fixedCpeUri_ = ""; - /** - *
-       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-       * was fixed in. It is possible for this to be different from the
-       * affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 4; - * @return The fixedCpeUri. - */ - public java.lang.String getFixedCpeUri() { - java.lang.Object ref = fixedCpeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedCpeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-       * was fixed in. It is possible for this to be different from the
-       * affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 4; - * @return The bytes for fixedCpeUri. - */ - public com.google.protobuf.ByteString - getFixedCpeUriBytes() { - java.lang.Object ref = fixedCpeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedCpeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-       * was fixed in. It is possible for this to be different from the
-       * affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 4; - * @param value The fixedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setFixedCpeUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fixedCpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-       * was fixed in. It is possible for this to be different from the
-       * affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 4; - * @return This builder for chaining. - */ - public Builder clearFixedCpeUri() { - fixedCpeUri_ = getDefaultInstance().getFixedCpeUri(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-       * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability
-       * was fixed in. It is possible for this to be different from the
-       * affected_cpe_uri.
-       * 
- * - * string fixed_cpe_uri = 4; - * @param value The bytes for fixedCpeUri to set. - * @return This builder for chaining. - */ - public Builder setFixedCpeUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fixedCpeUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object fixedPackage_ = ""; - /** - *
-       * The package this vulnerability was fixed in. It is possible for this to
-       * be different from the affected_package.
-       * 
- * - * string fixed_package = 5; - * @return The fixedPackage. - */ - public java.lang.String getFixedPackage() { - java.lang.Object ref = fixedPackage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fixedPackage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The package this vulnerability was fixed in. It is possible for this to
-       * be different from the affected_package.
-       * 
- * - * string fixed_package = 5; - * @return The bytes for fixedPackage. - */ - public com.google.protobuf.ByteString - getFixedPackageBytes() { - java.lang.Object ref = fixedPackage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fixedPackage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The package this vulnerability was fixed in. It is possible for this to
-       * be different from the affected_package.
-       * 
- * - * string fixed_package = 5; - * @param value The fixedPackage to set. - * @return This builder for chaining. - */ - public Builder setFixedPackage( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fixedPackage_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-       * The package this vulnerability was fixed in. It is possible for this to
-       * be different from the affected_package.
-       * 
- * - * string fixed_package = 5; - * @return This builder for chaining. - */ - public Builder clearFixedPackage() { - fixedPackage_ = getDefaultInstance().getFixedPackage(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-       * The package this vulnerability was fixed in. It is possible for this to
-       * be different from the affected_package.
-       * 
- * - * string fixed_package = 5; - * @param value The bytes for fixedPackage to set. - * @return This builder for chaining. - */ - public Builder setFixedPackageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fixedPackage_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private io.grafeas.v1.Version fixedVersion_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> fixedVersionBuilder_; - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - * @return Whether the fixedVersion field is set. - */ - public boolean hasFixedVersion() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - * @return The fixedVersion. - */ - public io.grafeas.v1.Version getFixedVersion() { - if (fixedVersionBuilder_ == null) { - return fixedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } else { - return fixedVersionBuilder_.getMessage(); - } - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - public Builder setFixedVersion(io.grafeas.v1.Version value) { - if (fixedVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fixedVersion_ = value; - } else { - fixedVersionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - public Builder setFixedVersion( - io.grafeas.v1.Version.Builder builderForValue) { - if (fixedVersionBuilder_ == null) { - fixedVersion_ = builderForValue.build(); - } else { - fixedVersionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - public Builder mergeFixedVersion(io.grafeas.v1.Version value) { - if (fixedVersionBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - fixedVersion_ != null && - fixedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) { - getFixedVersionBuilder().mergeFrom(value); - } else { - fixedVersion_ = value; - } - } else { - fixedVersionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - public Builder clearFixedVersion() { - bitField0_ = (bitField0_ & ~0x00000020); - fixedVersion_ = null; - if (fixedVersionBuilder_ != null) { - fixedVersionBuilder_.dispose(); - fixedVersionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - public io.grafeas.v1.Version.Builder getFixedVersionBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getFixedVersionFieldBuilder().getBuilder(); - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - public io.grafeas.v1.VersionOrBuilder getFixedVersionOrBuilder() { - if (fixedVersionBuilder_ != null) { - return fixedVersionBuilder_.getMessageOrBuilder(); - } else { - return fixedVersion_ == null ? - io.grafeas.v1.Version.getDefaultInstance() : fixedVersion_; - } - } - /** - *
-       * Required. The version of the package this vulnerability was fixed in.
-       * Setting this to VersionKind.MAXIMUM means no fix is yet available.
-       * 
- * - * .grafeas.v1.Version fixed_version = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> - getFixedVersionFieldBuilder() { - if (fixedVersionBuilder_ == null) { - fixedVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>( - getFixedVersion(), - getParentForChildren(), - isClean()); - fixedVersion_ = null; - } - return fixedVersionBuilder_; - } - - private boolean fixAvailable_ ; - /** - *
-       * Output only. Whether a fix is available for this package.
-       * 
- * - * bool fix_available = 7; - * @return The fixAvailable. - */ - @java.lang.Override - public boolean getFixAvailable() { - return fixAvailable_; - } - /** - *
-       * Output only. Whether a fix is available for this package.
-       * 
- * - * bool fix_available = 7; - * @param value The fixAvailable to set. - * @return This builder for chaining. - */ - public Builder setFixAvailable(boolean value) { - - fixAvailable_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-       * Output only. Whether a fix is available for this package.
-       * 
- * - * bool fix_available = 7; - * @return This builder for chaining. - */ - public Builder clearFixAvailable() { - bitField0_ = (bitField0_ & ~0x00000040); - fixAvailable_ = false; - onChanged(); - return this; - } - - private java.lang.Object packageType_ = ""; - /** - *
-       * The type of package (e.g. OS, MAVEN, GO).
-       * 
- * - * string package_type = 8; - * @return The packageType. - */ - public java.lang.String getPackageType() { - java.lang.Object ref = packageType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - packageType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The type of package (e.g. OS, MAVEN, GO).
-       * 
- * - * string package_type = 8; - * @return The bytes for packageType. - */ - public com.google.protobuf.ByteString - getPackageTypeBytes() { - java.lang.Object ref = packageType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The type of package (e.g. OS, MAVEN, GO).
-       * 
- * - * string package_type = 8; - * @param value The packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - packageType_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-       * The type of package (e.g. OS, MAVEN, GO).
-       * 
- * - * string package_type = 8; - * @return This builder for chaining. - */ - public Builder clearPackageType() { - packageType_ = getDefaultInstance().getPackageType(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - /** - *
-       * The type of package (e.g. OS, MAVEN, GO).
-       * 
- * - * string package_type = 8; - * @param value The bytes for packageType to set. - * @return This builder for chaining. - */ - public Builder setPackageTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - packageType_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - private int effectiveSeverity_ = 0; - /** - *
-       * The distro or language system assigned severity for this vulnerability
-       * when that is available and note provider assigned severity when it is not
-       * available.
-       * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for effectiveSeverity. - */ - @java.lang.Override public int getEffectiveSeverityValue() { - return effectiveSeverity_; - } - /** - *
-       * The distro or language system assigned severity for this vulnerability
-       * when that is available and note provider assigned severity when it is not
-       * available.
-       * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The enum numeric value on the wire for effectiveSeverity to set. - * @return This builder for chaining. - */ - public Builder setEffectiveSeverityValue(int value) { - effectiveSeverity_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-       * The distro or language system assigned severity for this vulnerability
-       * when that is available and note provider assigned severity when it is not
-       * available.
-       * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The effectiveSeverity. - */ - @java.lang.Override - public io.grafeas.v1.Severity getEffectiveSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - /** - *
-       * The distro or language system assigned severity for this vulnerability
-       * when that is available and note provider assigned severity when it is not
-       * available.
-       * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The effectiveSeverity to set. - * @return This builder for chaining. - */ - public Builder setEffectiveSeverity(io.grafeas.v1.Severity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - effectiveSeverity_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The distro or language system assigned severity for this vulnerability
-       * when that is available and note provider assigned severity when it is not
-       * available.
-       * 
- * - * .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearEffectiveSeverity() { - bitField0_ = (bitField0_ & ~0x00000100); - effectiveSeverity_ = 0; - onChanged(); - return this; - } - - private java.util.List fileLocation_ = - java.util.Collections.emptyList(); - private void ensureFileLocationIsMutable() { - if (!((bitField0_ & 0x00000200) != 0)) { - fileLocation_ = new java.util.ArrayList(fileLocation_); - bitField0_ |= 0x00000200; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.FileLocation, io.grafeas.v1.FileLocation.Builder, io.grafeas.v1.FileLocationOrBuilder> fileLocationBuilder_; - - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public java.util.List getFileLocationList() { - if (fileLocationBuilder_ == null) { - return java.util.Collections.unmodifiableList(fileLocation_); - } else { - return fileLocationBuilder_.getMessageList(); - } - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public int getFileLocationCount() { - if (fileLocationBuilder_ == null) { - return fileLocation_.size(); - } else { - return fileLocationBuilder_.getCount(); - } - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public io.grafeas.v1.FileLocation getFileLocation(int index) { - if (fileLocationBuilder_ == null) { - return fileLocation_.get(index); - } else { - return fileLocationBuilder_.getMessage(index); - } - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder setFileLocation( - int index, io.grafeas.v1.FileLocation value) { - if (fileLocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileLocationIsMutable(); - fileLocation_.set(index, value); - onChanged(); - } else { - fileLocationBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder setFileLocation( - int index, io.grafeas.v1.FileLocation.Builder builderForValue) { - if (fileLocationBuilder_ == null) { - ensureFileLocationIsMutable(); - fileLocation_.set(index, builderForValue.build()); - onChanged(); - } else { - fileLocationBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder addFileLocation(io.grafeas.v1.FileLocation value) { - if (fileLocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileLocationIsMutable(); - fileLocation_.add(value); - onChanged(); - } else { - fileLocationBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder addFileLocation( - int index, io.grafeas.v1.FileLocation value) { - if (fileLocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileLocationIsMutable(); - fileLocation_.add(index, value); - onChanged(); - } else { - fileLocationBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder addFileLocation( - io.grafeas.v1.FileLocation.Builder builderForValue) { - if (fileLocationBuilder_ == null) { - ensureFileLocationIsMutable(); - fileLocation_.add(builderForValue.build()); - onChanged(); - } else { - fileLocationBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder addFileLocation( - int index, io.grafeas.v1.FileLocation.Builder builderForValue) { - if (fileLocationBuilder_ == null) { - ensureFileLocationIsMutable(); - fileLocation_.add(index, builderForValue.build()); - onChanged(); - } else { - fileLocationBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder addAllFileLocation( - java.lang.Iterable values) { - if (fileLocationBuilder_ == null) { - ensureFileLocationIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fileLocation_); - onChanged(); - } else { - fileLocationBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder clearFileLocation() { - if (fileLocationBuilder_ == null) { - fileLocation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - } else { - fileLocationBuilder_.clear(); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public Builder removeFileLocation(int index) { - if (fileLocationBuilder_ == null) { - ensureFileLocationIsMutable(); - fileLocation_.remove(index); - onChanged(); - } else { - fileLocationBuilder_.remove(index); - } - return this; - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public io.grafeas.v1.FileLocation.Builder getFileLocationBuilder( - int index) { - return getFileLocationFieldBuilder().getBuilder(index); - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public io.grafeas.v1.FileLocationOrBuilder getFileLocationOrBuilder( - int index) { - if (fileLocationBuilder_ == null) { - return fileLocation_.get(index); } else { - return fileLocationBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public java.util.List - getFileLocationOrBuilderList() { - if (fileLocationBuilder_ != null) { - return fileLocationBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fileLocation_); - } - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public io.grafeas.v1.FileLocation.Builder addFileLocationBuilder() { - return getFileLocationFieldBuilder().addBuilder( - io.grafeas.v1.FileLocation.getDefaultInstance()); - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public io.grafeas.v1.FileLocation.Builder addFileLocationBuilder( - int index) { - return getFileLocationFieldBuilder().addBuilder( - index, io.grafeas.v1.FileLocation.getDefaultInstance()); - } - /** - *
-       * The location at which this package was found.
-       * 
- * - * repeated .grafeas.v1.FileLocation file_location = 10; - */ - public java.util.List - getFileLocationBuilderList() { - return getFileLocationFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.FileLocation, io.grafeas.v1.FileLocation.Builder, io.grafeas.v1.FileLocationOrBuilder> - getFileLocationFieldBuilder() { - if (fileLocationBuilder_ == null) { - fileLocationBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.FileLocation, io.grafeas.v1.FileLocation.Builder, io.grafeas.v1.FileLocationOrBuilder>( - fileLocation_, - ((bitField0_ & 0x00000200) != 0), - getParentForChildren(), - isClean()); - fileLocation_ = null; - } - return fileLocationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityOccurrence.PackageIssue) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityOccurrence.PackageIssue) - private static final io.grafeas.v1.VulnerabilityOccurrence.PackageIssue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityOccurrence.PackageIssue(); - } - - public static io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PackageIssue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface VexAssessmentOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityOccurrence.VexAssessment) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
-     * tracking number for the vulnerability.
-     * 
- * - * string cve = 1; - * @return The cve. - */ - java.lang.String getCve(); - /** - *
-     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
-     * tracking number for the vulnerability.
-     * 
- * - * string cve = 1; - * @return The bytes for cve. - */ - com.google.protobuf.ByteString - getCveBytes(); - - /** - *
-     * Holds a list of references associated with this vulnerability item and
-     * assessment.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - java.util.List - getRelatedUrisList(); - /** - *
-     * Holds a list of references associated with this vulnerability item and
-     * assessment.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - io.grafeas.v1.RelatedUrl getRelatedUris(int index); - /** - *
-     * Holds a list of references associated with this vulnerability item and
-     * assessment.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - int getRelatedUrisCount(); - /** - *
-     * Holds a list of references associated with this vulnerability item and
-     * assessment.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - java.util.List - getRelatedUrisOrBuilderList(); - /** - *
-     * Holds a list of references associated with this vulnerability item and
-     * assessment.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder( - int index); - - /** - *
-     * The VulnerabilityAssessment note from which this VexAssessment was
-     * generated.
-     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
-     * (-- api-linter: core::0122::name-suffix=disabled
-     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
-     * 
- * - * string note_name = 3; - * @return The noteName. - */ - java.lang.String getNoteName(); - /** - *
-     * The VulnerabilityAssessment note from which this VexAssessment was
-     * generated.
-     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
-     * (-- api-linter: core::0122::name-suffix=disabled
-     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
-     * 
- * - * string note_name = 3; - * @return The bytes for noteName. - */ - com.google.protobuf.ByteString - getNoteNameBytes(); - - /** - *
-     * Provides the state of this Vulnerability assessment.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-     * Provides the state of this Vulnerability assessment.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; - * @return The state. - */ - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState(); - - /** - *
-     * Contains information about the impact of this vulnerability,
-     * this will change with time.
-     * 
- * - * repeated string impacts = 5; - * @return A list containing the impacts. - */ - java.util.List - getImpactsList(); - /** - *
-     * Contains information about the impact of this vulnerability,
-     * this will change with time.
-     * 
- * - * repeated string impacts = 5; - * @return The count of impacts. - */ - int getImpactsCount(); - /** - *
-     * Contains information about the impact of this vulnerability,
-     * this will change with time.
-     * 
- * - * repeated string impacts = 5; - * @param index The index of the element to return. - * @return The impacts at the given index. - */ - java.lang.String getImpacts(int index); - /** - *
-     * Contains information about the impact of this vulnerability,
-     * this will change with time.
-     * 
- * - * repeated string impacts = 5; - * @param index The index of the value to return. - * @return The bytes of the impacts at the given index. - */ - com.google.protobuf.ByteString - getImpactsBytes(int index); - - /** - *
-     * Specifies details on how to handle (and presumably, fix) a vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - java.util.List - getRemediationsList(); - /** - *
-     * Specifies details on how to handle (and presumably, fix) a vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index); - /** - *
-     * Specifies details on how to handle (and presumably, fix) a vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - int getRemediationsCount(); - /** - *
-     * Specifies details on how to handle (and presumably, fix) a vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - java.util.List - getRemediationsOrBuilderList(); - /** - *
-     * Specifies details on how to handle (and presumably, fix) a vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder getRemediationsOrBuilder( - int index); - - /** - *
-     * Justification provides the justification when the state of the
-     * assessment if NOT_AFFECTED.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - * @return Whether the justification field is set. - */ - boolean hasJustification(); - /** - *
-     * Justification provides the justification when the state of the
-     * assessment if NOT_AFFECTED.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - * @return The justification. - */ - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification(); - /** - *
-     * Justification provides the justification when the state of the
-     * assessment if NOT_AFFECTED.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - */ - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder getJustificationOrBuilder(); - } - /** - *
-   * VexAssessment provides all publisher provided Vex information that is
-   * related to this vulnerability.
-   * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.VexAssessment} - */ - public static final class VexAssessment extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityOccurrence.VexAssessment) - VexAssessmentOrBuilder { - private static final long serialVersionUID = 0L; - // Use VexAssessment.newBuilder() to construct. - private VexAssessment(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private VexAssessment() { - cve_ = ""; - relatedUris_ = java.util.Collections.emptyList(); - noteName_ = ""; - state_ = 0; - impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; - remediations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new VexAssessment(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.class, io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder.class); - } - - public static final int CVE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object cve_ = ""; - /** - *
-     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
-     * tracking number for the vulnerability.
-     * 
- * - * string cve = 1; - * @return The cve. - */ - @java.lang.Override - public java.lang.String getCve() { - java.lang.Object ref = cve_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cve_ = s; - return s; - } - } - /** - *
-     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
-     * tracking number for the vulnerability.
-     * 
- * - * string cve = 1; - * @return The bytes for cve. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCveBytes() { - java.lang.Object ref = cve_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cve_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RELATED_URIS_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List relatedUris_; - /** - *
-     * Holds a list of references associated with this vulnerability item and
-     * assessment.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - @java.lang.Override - public java.util.List getRelatedUrisList() { - return relatedUris_; - } - /** - *
-     * Holds a list of references associated with this vulnerability item and
-     * assessment.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - @java.lang.Override - public java.util.List - getRelatedUrisOrBuilderList() { - return relatedUris_; - } - /** - *
-     * Holds a list of references associated with this vulnerability item and
-     * assessment.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - @java.lang.Override - public int getRelatedUrisCount() { - return relatedUris_.size(); - } - /** - *
-     * Holds a list of references associated with this vulnerability item and
-     * assessment.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - @java.lang.Override - public io.grafeas.v1.RelatedUrl getRelatedUris(int index) { - return relatedUris_.get(index); - } - /** - *
-     * Holds a list of references associated with this vulnerability item and
-     * assessment.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - @java.lang.Override - public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder( - int index) { - return relatedUris_.get(index); - } - - public static final int NOTE_NAME_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object noteName_ = ""; - /** - *
-     * The VulnerabilityAssessment note from which this VexAssessment was
-     * generated.
-     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
-     * (-- api-linter: core::0122::name-suffix=disabled
-     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
-     * 
- * - * string note_name = 3; - * @return The noteName. - */ - @java.lang.Override - public java.lang.String getNoteName() { - java.lang.Object ref = noteName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - noteName_ = s; - return s; - } - } - /** - *
-     * The VulnerabilityAssessment note from which this VexAssessment was
-     * generated.
-     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
-     * (-- api-linter: core::0122::name-suffix=disabled
-     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
-     * 
- * - * string note_name = 3; - * @return The bytes for noteName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNoteNameBytes() { - java.lang.Object ref = noteName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - noteName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_FIELD_NUMBER = 4; - private int state_ = 0; - /** - *
-     * Provides the state of this Vulnerability assessment.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * Provides the state of this Vulnerability assessment.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; - * @return The state. - */ - @java.lang.Override public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() { - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); - return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED : result; - } - - public static final int IMPACTS_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList impacts_; - /** - *
-     * Contains information about the impact of this vulnerability,
-     * this will change with time.
-     * 
- * - * repeated string impacts = 5; - * @return A list containing the impacts. - */ - public com.google.protobuf.ProtocolStringList - getImpactsList() { - return impacts_; - } - /** - *
-     * Contains information about the impact of this vulnerability,
-     * this will change with time.
-     * 
- * - * repeated string impacts = 5; - * @return The count of impacts. - */ - public int getImpactsCount() { - return impacts_.size(); - } - /** - *
-     * Contains information about the impact of this vulnerability,
-     * this will change with time.
-     * 
- * - * repeated string impacts = 5; - * @param index The index of the element to return. - * @return The impacts at the given index. - */ - public java.lang.String getImpacts(int index) { - return impacts_.get(index); - } - /** - *
-     * Contains information about the impact of this vulnerability,
-     * this will change with time.
-     * 
- * - * repeated string impacts = 5; - * @param index The index of the value to return. - * @return The bytes of the impacts at the given index. - */ - public com.google.protobuf.ByteString - getImpactsBytes(int index) { - return impacts_.getByteString(index); - } - - public static final int REMEDIATIONS_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private java.util.List remediations_; - /** - *
-     * Specifies details on how to handle (and presumably, fix) a vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - @java.lang.Override - public java.util.List getRemediationsList() { - return remediations_; - } - /** - *
-     * Specifies details on how to handle (and presumably, fix) a vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - @java.lang.Override - public java.util.List - getRemediationsOrBuilderList() { - return remediations_; - } - /** - *
-     * Specifies details on how to handle (and presumably, fix) a vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - @java.lang.Override - public int getRemediationsCount() { - return remediations_.size(); - } - /** - *
-     * Specifies details on how to handle (and presumably, fix) a vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index) { - return remediations_.get(index); - } - /** - *
-     * Specifies details on how to handle (and presumably, fix) a vulnerability.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder getRemediationsOrBuilder( - int index) { - return remediations_.get(index); - } - - public static final int JUSTIFICATION_FIELD_NUMBER = 7; - private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_; - /** - *
-     * Justification provides the justification when the state of the
-     * assessment if NOT_AFFECTED.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - * @return Whether the justification field is set. - */ - @java.lang.Override - public boolean hasJustification() { - return justification_ != null; - } - /** - *
-     * Justification provides the justification when the state of the
-     * assessment if NOT_AFFECTED.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - * @return The justification. - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() { - return justification_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; - } - /** - *
-     * Justification provides the justification when the state of the
-     * assessment if NOT_AFFECTED.
-     * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder getJustificationOrBuilder() { - return justification_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cve_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cve_); - } - for (int i = 0; i < relatedUris_.size(); i++) { - output.writeMessage(2, relatedUris_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, noteName_); - } - if (state_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, state_); - } - for (int i = 0; i < impacts_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, impacts_.getRaw(i)); - } - for (int i = 0; i < remediations_.size(); i++) { - output.writeMessage(6, remediations_.get(i)); - } - if (justification_ != null) { - output.writeMessage(7, getJustification()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cve_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cve_); - } - for (int i = 0; i < relatedUris_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, relatedUris_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, noteName_); - } - if (state_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, state_); - } - { - int dataSize = 0; - for (int i = 0; i < impacts_.size(); i++) { - dataSize += computeStringSizeNoTag(impacts_.getRaw(i)); - } - size += dataSize; - size += 1 * getImpactsList().size(); - } - for (int i = 0; i < remediations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, remediations_.get(i)); - } - if (justification_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getJustification()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.VulnerabilityOccurrence.VexAssessment)) { - return super.equals(obj); - } - io.grafeas.v1.VulnerabilityOccurrence.VexAssessment other = (io.grafeas.v1.VulnerabilityOccurrence.VexAssessment) obj; - - if (!getCve() - .equals(other.getCve())) return false; - if (!getRelatedUrisList() - .equals(other.getRelatedUrisList())) return false; - if (!getNoteName() - .equals(other.getNoteName())) return false; - if (state_ != other.state_) return false; - if (!getImpactsList() - .equals(other.getImpactsList())) return false; - if (!getRemediationsList() - .equals(other.getRemediationsList())) return false; - if (hasJustification() != other.hasJustification()) return false; - if (hasJustification()) { - if (!getJustification() - .equals(other.getJustification())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CVE_FIELD_NUMBER; - hash = (53 * hash) + getCve().hashCode(); - if (getRelatedUrisCount() > 0) { - hash = (37 * hash) + RELATED_URIS_FIELD_NUMBER; - hash = (53 * hash) + getRelatedUrisList().hashCode(); - } - hash = (37 * hash) + NOTE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getNoteName().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (getImpactsCount() > 0) { - hash = (37 * hash) + IMPACTS_FIELD_NUMBER; - hash = (53 * hash) + getImpactsList().hashCode(); - } - if (getRemediationsCount() > 0) { - hash = (37 * hash) + REMEDIATIONS_FIELD_NUMBER; - hash = (53 * hash) + getRemediationsList().hashCode(); - } - if (hasJustification()) { - hash = (37 * hash) + JUSTIFICATION_FIELD_NUMBER; - hash = (53 * hash) + getJustification().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * VexAssessment provides all publisher provided Vex information that is
-     * related to this vulnerability.
-     * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.VexAssessment} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityOccurrence.VexAssessment) - io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.class, io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder.class); - } - - // Construct using io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - cve_ = ""; - if (relatedUrisBuilder_ == null) { - relatedUris_ = java.util.Collections.emptyList(); - } else { - relatedUris_ = null; - relatedUrisBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - noteName_ = ""; - state_ = 0; - impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - if (remediationsBuilder_ == null) { - remediations_ = java.util.Collections.emptyList(); - } else { - remediations_ = null; - remediationsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - justification_ = null; - if (justificationBuilder_ != null) { - justificationBuilder_.dispose(); - justificationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getDefaultInstanceForType() { - return io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment build() { - io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment buildPartial() { - io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result = new io.grafeas.v1.VulnerabilityOccurrence.VexAssessment(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result) { - if (relatedUrisBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - relatedUris_ = java.util.Collections.unmodifiableList(relatedUris_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.relatedUris_ = relatedUris_; - } else { - result.relatedUris_ = relatedUrisBuilder_.build(); - } - if (((bitField0_ & 0x00000010) != 0)) { - impacts_ = impacts_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.impacts_ = impacts_; - if (remediationsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - remediations_ = java.util.Collections.unmodifiableList(remediations_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.remediations_ = remediations_; - } else { - result.remediations_ = remediationsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.cve_ = cve_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.noteName_ = noteName_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.justification_ = justificationBuilder_ == null - ? justification_ - : justificationBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.VulnerabilityOccurrence.VexAssessment) { - return mergeFrom((io.grafeas.v1.VulnerabilityOccurrence.VexAssessment)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment other) { - if (other == io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance()) return this; - if (!other.getCve().isEmpty()) { - cve_ = other.cve_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (relatedUrisBuilder_ == null) { - if (!other.relatedUris_.isEmpty()) { - if (relatedUris_.isEmpty()) { - relatedUris_ = other.relatedUris_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRelatedUrisIsMutable(); - relatedUris_.addAll(other.relatedUris_); - } - onChanged(); - } - } else { - if (!other.relatedUris_.isEmpty()) { - if (relatedUrisBuilder_.isEmpty()) { - relatedUrisBuilder_.dispose(); - relatedUrisBuilder_ = null; - relatedUris_ = other.relatedUris_; - bitField0_ = (bitField0_ & ~0x00000002); - relatedUrisBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRelatedUrisFieldBuilder() : null; - } else { - relatedUrisBuilder_.addAllMessages(other.relatedUris_); - } - } - } - if (!other.getNoteName().isEmpty()) { - noteName_ = other.noteName_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.impacts_.isEmpty()) { - if (impacts_.isEmpty()) { - impacts_ = other.impacts_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureImpactsIsMutable(); - impacts_.addAll(other.impacts_); - } - onChanged(); - } - if (remediationsBuilder_ == null) { - if (!other.remediations_.isEmpty()) { - if (remediations_.isEmpty()) { - remediations_ = other.remediations_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureRemediationsIsMutable(); - remediations_.addAll(other.remediations_); - } - onChanged(); - } - } else { - if (!other.remediations_.isEmpty()) { - if (remediationsBuilder_.isEmpty()) { - remediationsBuilder_.dispose(); - remediationsBuilder_ = null; - remediations_ = other.remediations_; - bitField0_ = (bitField0_ & ~0x00000020); - remediationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRemediationsFieldBuilder() : null; - } else { - remediationsBuilder_.addAllMessages(other.remediations_); - } - } - } - if (other.hasJustification()) { - mergeJustification(other.getJustification()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - cve_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - io.grafeas.v1.RelatedUrl m = - input.readMessage( - io.grafeas.v1.RelatedUrl.parser(), - extensionRegistry); - if (relatedUrisBuilder_ == null) { - ensureRelatedUrisIsMutable(); - relatedUris_.add(m); - } else { - relatedUrisBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: { - noteName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: { - state_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - ensureImpactsIsMutable(); - impacts_.add(s); - break; - } // case 42 - case 50: { - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation m = - input.readMessage( - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.parser(), - extensionRegistry); - if (remediationsBuilder_ == null) { - ensureRemediationsIsMutable(); - remediations_.add(m); - } else { - remediationsBuilder_.addMessage(m); - } - break; - } // case 50 - case 58: { - input.readMessage( - getJustificationFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object cve_ = ""; - /** - *
-       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
-       * tracking number for the vulnerability.
-       * 
- * - * string cve = 1; - * @return The cve. - */ - public java.lang.String getCve() { - java.lang.Object ref = cve_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cve_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
-       * tracking number for the vulnerability.
-       * 
- * - * string cve = 1; - * @return The bytes for cve. - */ - public com.google.protobuf.ByteString - getCveBytes() { - java.lang.Object ref = cve_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cve_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
-       * tracking number for the vulnerability.
-       * 
- * - * string cve = 1; - * @param value The cve to set. - * @return This builder for chaining. - */ - public Builder setCve( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - cve_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
-       * tracking number for the vulnerability.
-       * 
- * - * string cve = 1; - * @return This builder for chaining. - */ - public Builder clearCve() { - cve_ = getDefaultInstance().getCve(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
-       * tracking number for the vulnerability.
-       * 
- * - * string cve = 1; - * @param value The bytes for cve to set. - * @return This builder for chaining. - */ - public Builder setCveBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - cve_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List relatedUris_ = - java.util.Collections.emptyList(); - private void ensureRelatedUrisIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - relatedUris_ = new java.util.ArrayList(relatedUris_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> relatedUrisBuilder_; - - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public java.util.List getRelatedUrisList() { - if (relatedUrisBuilder_ == null) { - return java.util.Collections.unmodifiableList(relatedUris_); - } else { - return relatedUrisBuilder_.getMessageList(); - } - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public int getRelatedUrisCount() { - if (relatedUrisBuilder_ == null) { - return relatedUris_.size(); - } else { - return relatedUrisBuilder_.getCount(); - } - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public io.grafeas.v1.RelatedUrl getRelatedUris(int index) { - if (relatedUrisBuilder_ == null) { - return relatedUris_.get(index); - } else { - return relatedUrisBuilder_.getMessage(index); - } - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public Builder setRelatedUris( - int index, io.grafeas.v1.RelatedUrl value) { - if (relatedUrisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedUrisIsMutable(); - relatedUris_.set(index, value); - onChanged(); - } else { - relatedUrisBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public Builder setRelatedUris( - int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { - if (relatedUrisBuilder_ == null) { - ensureRelatedUrisIsMutable(); - relatedUris_.set(index, builderForValue.build()); - onChanged(); - } else { - relatedUrisBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public Builder addRelatedUris(io.grafeas.v1.RelatedUrl value) { - if (relatedUrisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedUrisIsMutable(); - relatedUris_.add(value); - onChanged(); - } else { - relatedUrisBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public Builder addRelatedUris( - int index, io.grafeas.v1.RelatedUrl value) { - if (relatedUrisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedUrisIsMutable(); - relatedUris_.add(index, value); - onChanged(); - } else { - relatedUrisBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public Builder addRelatedUris( - io.grafeas.v1.RelatedUrl.Builder builderForValue) { - if (relatedUrisBuilder_ == null) { - ensureRelatedUrisIsMutable(); - relatedUris_.add(builderForValue.build()); - onChanged(); - } else { - relatedUrisBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public Builder addRelatedUris( - int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { - if (relatedUrisBuilder_ == null) { - ensureRelatedUrisIsMutable(); - relatedUris_.add(index, builderForValue.build()); - onChanged(); - } else { - relatedUrisBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public Builder addAllRelatedUris( - java.lang.Iterable values) { - if (relatedUrisBuilder_ == null) { - ensureRelatedUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, relatedUris_); - onChanged(); - } else { - relatedUrisBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public Builder clearRelatedUris() { - if (relatedUrisBuilder_ == null) { - relatedUris_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - relatedUrisBuilder_.clear(); - } - return this; - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public Builder removeRelatedUris(int index) { - if (relatedUrisBuilder_ == null) { - ensureRelatedUrisIsMutable(); - relatedUris_.remove(index); - onChanged(); - } else { - relatedUrisBuilder_.remove(index); - } - return this; - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public io.grafeas.v1.RelatedUrl.Builder getRelatedUrisBuilder( - int index) { - return getRelatedUrisFieldBuilder().getBuilder(index); - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder( - int index) { - if (relatedUrisBuilder_ == null) { - return relatedUris_.get(index); } else { - return relatedUrisBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public java.util.List - getRelatedUrisOrBuilderList() { - if (relatedUrisBuilder_ != null) { - return relatedUrisBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(relatedUris_); - } - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder() { - return getRelatedUrisFieldBuilder().addBuilder( - io.grafeas.v1.RelatedUrl.getDefaultInstance()); - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder( - int index) { - return getRelatedUrisFieldBuilder().addBuilder( - index, io.grafeas.v1.RelatedUrl.getDefaultInstance()); - } - /** - *
-       * Holds a list of references associated with this vulnerability item and
-       * assessment.
-       * 
- * - * repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - public java.util.List - getRelatedUrisBuilderList() { - return getRelatedUrisFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> - getRelatedUrisFieldBuilder() { - if (relatedUrisBuilder_ == null) { - relatedUrisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder>( - relatedUris_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - relatedUris_ = null; - } - return relatedUrisBuilder_; - } - - private java.lang.Object noteName_ = ""; - /** - *
-       * The VulnerabilityAssessment note from which this VexAssessment was
-       * generated.
-       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
-       * (-- api-linter: core::0122::name-suffix=disabled
-       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
-       * 
- * - * string note_name = 3; - * @return The noteName. - */ - public java.lang.String getNoteName() { - java.lang.Object ref = noteName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - noteName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The VulnerabilityAssessment note from which this VexAssessment was
-       * generated.
-       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
-       * (-- api-linter: core::0122::name-suffix=disabled
-       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
-       * 
- * - * string note_name = 3; - * @return The bytes for noteName. - */ - public com.google.protobuf.ByteString - getNoteNameBytes() { - java.lang.Object ref = noteName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - noteName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The VulnerabilityAssessment note from which this VexAssessment was
-       * generated.
-       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
-       * (-- api-linter: core::0122::name-suffix=disabled
-       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
-       * 
- * - * string note_name = 3; - * @param value The noteName to set. - * @return This builder for chaining. - */ - public Builder setNoteName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - noteName_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-       * The VulnerabilityAssessment note from which this VexAssessment was
-       * generated.
-       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
-       * (-- api-linter: core::0122::name-suffix=disabled
-       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
-       * 
- * - * string note_name = 3; - * @return This builder for chaining. - */ - public Builder clearNoteName() { - noteName_ = getDefaultInstance().getNoteName(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-       * The VulnerabilityAssessment note from which this VexAssessment was
-       * generated.
-       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
-       * (-- api-linter: core::0122::name-suffix=disabled
-       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
-       * 
- * - * string note_name = 3; - * @param value The bytes for noteName to set. - * @return This builder for chaining. - */ - public Builder setNoteNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - noteName_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private int state_ = 0; - /** - *
-       * Provides the state of this Vulnerability assessment.
-       * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-       * Provides the state of this Vulnerability assessment.
-       * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-       * Provides the state of this Vulnerability assessment.
-       * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; - * @return The state. - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() { - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); - return result == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED : result; - } - /** - *
-       * Provides the state of this Vulnerability assessment.
-       * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Provides the state of this Vulnerability assessment.
-       * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000008); - state_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureImpactsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - impacts_ = new com.google.protobuf.LazyStringArrayList(impacts_); - bitField0_ |= 0x00000010; - } - } - /** - *
-       * Contains information about the impact of this vulnerability,
-       * this will change with time.
-       * 
- * - * repeated string impacts = 5; - * @return A list containing the impacts. - */ - public com.google.protobuf.ProtocolStringList - getImpactsList() { - return impacts_.getUnmodifiableView(); - } - /** - *
-       * Contains information about the impact of this vulnerability,
-       * this will change with time.
-       * 
- * - * repeated string impacts = 5; - * @return The count of impacts. - */ - public int getImpactsCount() { - return impacts_.size(); - } - /** - *
-       * Contains information about the impact of this vulnerability,
-       * this will change with time.
-       * 
- * - * repeated string impacts = 5; - * @param index The index of the element to return. - * @return The impacts at the given index. - */ - public java.lang.String getImpacts(int index) { - return impacts_.get(index); - } - /** - *
-       * Contains information about the impact of this vulnerability,
-       * this will change with time.
-       * 
- * - * repeated string impacts = 5; - * @param index The index of the value to return. - * @return The bytes of the impacts at the given index. - */ - public com.google.protobuf.ByteString - getImpactsBytes(int index) { - return impacts_.getByteString(index); - } - /** - *
-       * Contains information about the impact of this vulnerability,
-       * this will change with time.
-       * 
- * - * repeated string impacts = 5; - * @param index The index to set the value at. - * @param value The impacts to set. - * @return This builder for chaining. - */ - public Builder setImpacts( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureImpactsIsMutable(); - impacts_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * Contains information about the impact of this vulnerability,
-       * this will change with time.
-       * 
- * - * repeated string impacts = 5; - * @param value The impacts to add. - * @return This builder for chaining. - */ - public Builder addImpacts( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureImpactsIsMutable(); - impacts_.add(value); - onChanged(); - return this; - } - /** - *
-       * Contains information about the impact of this vulnerability,
-       * this will change with time.
-       * 
- * - * repeated string impacts = 5; - * @param values The impacts to add. - * @return This builder for chaining. - */ - public Builder addAllImpacts( - java.lang.Iterable values) { - ensureImpactsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, impacts_); - onChanged(); - return this; - } - /** - *
-       * Contains information about the impact of this vulnerability,
-       * this will change with time.
-       * 
- * - * repeated string impacts = 5; - * @return This builder for chaining. - */ - public Builder clearImpacts() { - impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-       * Contains information about the impact of this vulnerability,
-       * this will change with time.
-       * 
- * - * repeated string impacts = 5; - * @param value The bytes of the impacts to add. - * @return This builder for chaining. - */ - public Builder addImpactsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureImpactsIsMutable(); - impacts_.add(value); - onChanged(); - return this; - } - - private java.util.List remediations_ = - java.util.Collections.emptyList(); - private void ensureRemediationsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - remediations_ = new java.util.ArrayList(remediations_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> remediationsBuilder_; - - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public java.util.List getRemediationsList() { - if (remediationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(remediations_); - } else { - return remediationsBuilder_.getMessageList(); - } - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public int getRemediationsCount() { - if (remediationsBuilder_ == null) { - return remediations_.size(); - } else { - return remediationsBuilder_.getCount(); - } - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index) { - if (remediationsBuilder_ == null) { - return remediations_.get(index); - } else { - return remediationsBuilder_.getMessage(index); - } - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public Builder setRemediations( - int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { - if (remediationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRemediationsIsMutable(); - remediations_.set(index, value); - onChanged(); - } else { - remediationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public Builder setRemediations( - int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder builderForValue) { - if (remediationsBuilder_ == null) { - ensureRemediationsIsMutable(); - remediations_.set(index, builderForValue.build()); - onChanged(); - } else { - remediationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public Builder addRemediations(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { - if (remediationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRemediationsIsMutable(); - remediations_.add(value); - onChanged(); - } else { - remediationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public Builder addRemediations( - int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { - if (remediationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRemediationsIsMutable(); - remediations_.add(index, value); - onChanged(); - } else { - remediationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public Builder addRemediations( - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder builderForValue) { - if (remediationsBuilder_ == null) { - ensureRemediationsIsMutable(); - remediations_.add(builderForValue.build()); - onChanged(); - } else { - remediationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public Builder addRemediations( - int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder builderForValue) { - if (remediationsBuilder_ == null) { - ensureRemediationsIsMutable(); - remediations_.add(index, builderForValue.build()); - onChanged(); - } else { - remediationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public Builder addAllRemediations( - java.lang.Iterable values) { - if (remediationsBuilder_ == null) { - ensureRemediationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, remediations_); - onChanged(); - } else { - remediationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public Builder clearRemediations() { - if (remediationsBuilder_ == null) { - remediations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - remediationsBuilder_.clear(); - } - return this; - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public Builder removeRemediations(int index) { - if (remediationsBuilder_ == null) { - ensureRemediationsIsMutable(); - remediations_.remove(index); - onChanged(); - } else { - remediationsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder getRemediationsBuilder( - int index) { - return getRemediationsFieldBuilder().getBuilder(index); - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder getRemediationsOrBuilder( - int index) { - if (remediationsBuilder_ == null) { - return remediations_.get(index); } else { - return remediationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public java.util.List - getRemediationsOrBuilderList() { - if (remediationsBuilder_ != null) { - return remediationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(remediations_); - } - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder addRemediationsBuilder() { - return getRemediationsFieldBuilder().addBuilder( - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDefaultInstance()); - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder addRemediationsBuilder( - int index) { - return getRemediationsFieldBuilder().addBuilder( - index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDefaultInstance()); - } - /** - *
-       * Specifies details on how to handle (and presumably, fix) a vulnerability.
-       * 
- * - * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - public java.util.List - getRemediationsBuilderList() { - return getRemediationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> - getRemediationsFieldBuilder() { - if (remediationsBuilder_ == null) { - remediationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder>( - remediations_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - remediations_ = null; - } - return remediationsBuilder_; - } - - private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> justificationBuilder_; - /** - *
-       * Justification provides the justification when the state of the
-       * assessment if NOT_AFFECTED.
-       * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - * @return Whether the justification field is set. - */ - public boolean hasJustification() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-       * Justification provides the justification when the state of the
-       * assessment if NOT_AFFECTED.
-       * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - * @return The justification. - */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() { - if (justificationBuilder_ == null) { - return justification_ == null ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; - } else { - return justificationBuilder_.getMessage(); - } - } - /** - *
-       * Justification provides the justification when the state of the
-       * assessment if NOT_AFFECTED.
-       * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - */ - public Builder setJustification(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { - if (justificationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - justification_ = value; - } else { - justificationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-       * Justification provides the justification when the state of the
-       * assessment if NOT_AFFECTED.
-       * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - */ - public Builder setJustification( - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder builderForValue) { - if (justificationBuilder_ == null) { - justification_ = builderForValue.build(); - } else { - justificationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-       * Justification provides the justification when the state of the
-       * assessment if NOT_AFFECTED.
-       * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - */ - public Builder mergeJustification(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { - if (justificationBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - justification_ != null && - justification_ != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance()) { - getJustificationBuilder().mergeFrom(value); - } else { - justification_ = value; - } - } else { - justificationBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-       * Justification provides the justification when the state of the
-       * assessment if NOT_AFFECTED.
-       * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - */ - public Builder clearJustification() { - bitField0_ = (bitField0_ & ~0x00000040); - justification_ = null; - if (justificationBuilder_ != null) { - justificationBuilder_.dispose(); - justificationBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-       * Justification provides the justification when the state of the
-       * assessment if NOT_AFFECTED.
-       * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder getJustificationBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getJustificationFieldBuilder().getBuilder(); - } - /** - *
-       * Justification provides the justification when the state of the
-       * assessment if NOT_AFFECTED.
-       * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - */ - public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder getJustificationOrBuilder() { - if (justificationBuilder_ != null) { - return justificationBuilder_.getMessageOrBuilder(); - } else { - return justification_ == null ? - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() : justification_; - } - } - /** - *
-       * Justification provides the justification when the state of the
-       * assessment if NOT_AFFECTED.
-       * 
- * - * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> - getJustificationFieldBuilder() { - if (justificationBuilder_ == null) { - justificationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder>( - getJustification(), - getParentForChildren(), - isClean()); - justification_ = null; - } - return justificationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityOccurrence.VexAssessment) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityOccurrence.VexAssessment) - private static final io.grafeas.v1.VulnerabilityOccurrence.VexAssessment DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityOccurrence.VexAssessment(); - } - - public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VexAssessment parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int TYPE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object type_ = ""; - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems, node.js
-   * packages, etc.).
-   * 
- * - * string type = 1; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } - } - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems, node.js
-   * packages, etc.).
-   * 
- * - * string type = 1; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SEVERITY_FIELD_NUMBER = 2; - private int severity_ = 0; - /** - *
-   * Output only. The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override public int getSeverityValue() { - return severity_; - } - /** - *
-   * Output only. The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - @java.lang.Override public io.grafeas.v1.Severity getSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - - public static final int CVSS_SCORE_FIELD_NUMBER = 3; - private float cvssScore_ = 0F; - /** - *
-   * Output only. The CVSS score of this vulnerability. CVSS score is on a
-   * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
-   * severity.
-   * 
- * - * float cvss_score = 3; - * @return The cvssScore. - */ - @java.lang.Override - public float getCvssScore() { - return cvssScore_; - } - - public static final int CVSSV3_FIELD_NUMBER = 10; - private io.grafeas.v1.CVSS cvssv3_; - /** - *
-   * The cvss v3 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - * @return Whether the cvssv3 field is set. - */ - @java.lang.Override - public boolean hasCvssv3() { - return cvssv3_ != null; - } - /** - *
-   * The cvss v3 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - * @return The cvssv3. - */ - @java.lang.Override - public io.grafeas.v1.CVSS getCvssv3() { - return cvssv3_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; - } - /** - *
-   * The cvss v3 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - @java.lang.Override - public io.grafeas.v1.CVSSOrBuilder getCvssv3OrBuilder() { - return cvssv3_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; - } - - public static final int PACKAGE_ISSUE_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List packageIssue_; - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - @java.lang.Override - public java.util.List getPackageIssueList() { - return packageIssue_; - } - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - @java.lang.Override - public java.util.List - getPackageIssueOrBuilderList() { - return packageIssue_; - } - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - @java.lang.Override - public int getPackageIssueCount() { - return packageIssue_.size(); - } - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getPackageIssue(int index) { - return packageIssue_.get(index); - } - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder getPackageIssueOrBuilder( - int index) { - return packageIssue_.get(index); - } - - public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object shortDescription_ = ""; - /** - *
-   * Output only. A one sentence description of this vulnerability.
-   * 
- * - * string short_description = 5; - * @return The shortDescription. - */ - @java.lang.Override - public java.lang.String getShortDescription() { - java.lang.Object ref = shortDescription_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - shortDescription_ = s; - return s; - } - } - /** - *
-   * Output only. A one sentence description of this vulnerability.
-   * 
- * - * string short_description = 5; - * @return The bytes for shortDescription. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getShortDescriptionBytes() { - java.lang.Object ref = shortDescription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - shortDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LONG_DESCRIPTION_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private volatile java.lang.Object longDescription_ = ""; - /** - *
-   * Output only. A detailed description of this vulnerability.
-   * 
- * - * string long_description = 6; - * @return The longDescription. - */ - @java.lang.Override - public java.lang.String getLongDescription() { - java.lang.Object ref = longDescription_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - longDescription_ = s; - return s; - } - } - /** - *
-   * Output only. A detailed description of this vulnerability.
-   * 
- * - * string long_description = 6; - * @return The bytes for longDescription. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLongDescriptionBytes() { - java.lang.Object ref = longDescription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - longDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RELATED_URLS_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private java.util.List relatedUrls_; - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - @java.lang.Override - public java.util.List getRelatedUrlsList() { - return relatedUrls_; - } - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - @java.lang.Override - public java.util.List - getRelatedUrlsOrBuilderList() { - return relatedUrls_; - } - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - @java.lang.Override - public int getRelatedUrlsCount() { - return relatedUrls_.size(); - } - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - @java.lang.Override - public io.grafeas.v1.RelatedUrl getRelatedUrls(int index) { - return relatedUrls_.get(index); - } - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - @java.lang.Override - public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlsOrBuilder( - int index) { - return relatedUrls_.get(index); - } - - public static final int EFFECTIVE_SEVERITY_FIELD_NUMBER = 8; - private int effectiveSeverity_ = 0; - /** - *
-   * The distro assigned severity for this vulnerability when it is available,
-   * otherwise this is the note provider assigned severity.
-   * When there are multiple PackageIssues for this vulnerability, they can have
-   * different effective severities because some might be provided by the distro
-   * while others are provided by the language ecosystem for a language pack.
-   * For this reason, it is advised to use the effective severity on the
-   * PackageIssue level. In the case where multiple PackageIssues have differing
-   * effective severities, this field should be the highest severity for any of
-   * the PackageIssues.
-   * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @return The enum numeric value on the wire for effectiveSeverity. - */ - @java.lang.Override public int getEffectiveSeverityValue() { - return effectiveSeverity_; - } - /** - *
-   * The distro assigned severity for this vulnerability when it is available,
-   * otherwise this is the note provider assigned severity.
-   * When there are multiple PackageIssues for this vulnerability, they can have
-   * different effective severities because some might be provided by the distro
-   * while others are provided by the language ecosystem for a language pack.
-   * For this reason, it is advised to use the effective severity on the
-   * PackageIssue level. In the case where multiple PackageIssues have differing
-   * effective severities, this field should be the highest severity for any of
-   * the PackageIssues.
-   * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @return The effectiveSeverity. - */ - @java.lang.Override public io.grafeas.v1.Severity getEffectiveSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - - public static final int FIX_AVAILABLE_FIELD_NUMBER = 9; - private boolean fixAvailable_ = false; - /** - *
-   * Output only. Whether at least one of the affected packages has a fix
-   * available.
-   * 
- * - * bool fix_available = 9; - * @return The fixAvailable. - */ - @java.lang.Override - public boolean getFixAvailable() { - return fixAvailable_; - } - - public static final int CVSS_VERSION_FIELD_NUMBER = 11; - private int cvssVersion_ = 0; - /** - *
-   * Output only. CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @return The enum numeric value on the wire for cvssVersion. - */ - @java.lang.Override public int getCvssVersionValue() { - return cvssVersion_; - } - /** - *
-   * Output only. CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @return The cvssVersion. - */ - @java.lang.Override public io.grafeas.v1.CVSSVersion getCvssVersion() { - io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); - return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; - } - - public static final int CVSS_V2_FIELD_NUMBER = 12; - private io.grafeas.v1.CVSS cvssV2_; - /** - *
-   * The cvss v2 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - * @return Whether the cvssV2 field is set. - */ - @java.lang.Override - public boolean hasCvssV2() { - return cvssV2_ != null; - } - /** - *
-   * The cvss v2 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - * @return The cvssV2. - */ - @java.lang.Override - public io.grafeas.v1.CVSS getCvssV2() { - return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } - /** - *
-   * The cvss v2 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - @java.lang.Override - public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { - return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } - - public static final int VEX_ASSESSMENT_FIELD_NUMBER = 13; - private io.grafeas.v1.VulnerabilityOccurrence.VexAssessment vexAssessment_; - /** - * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - * @return Whether the vexAssessment field is set. - */ - @java.lang.Override - public boolean hasVexAssessment() { - return vexAssessment_ != null; - } - /** - * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - * @return The vexAssessment. - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getVexAssessment() { - return vexAssessment_ == null ? io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() : vexAssessment_; - } - /** - * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - */ - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder getVexAssessmentOrBuilder() { - return vexAssessment_ == null ? io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() : vexAssessment_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); - } - if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - output.writeEnum(2, severity_); - } - if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { - output.writeFloat(3, cvssScore_); - } - for (int i = 0; i < packageIssue_.size(); i++) { - output.writeMessage(4, packageIssue_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, shortDescription_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, longDescription_); - } - for (int i = 0; i < relatedUrls_.size(); i++) { - output.writeMessage(7, relatedUrls_.get(i)); - } - if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - output.writeEnum(8, effectiveSeverity_); - } - if (fixAvailable_ != false) { - output.writeBool(9, fixAvailable_); - } - if (cvssv3_ != null) { - output.writeMessage(10, getCvssv3()); - } - if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { - output.writeEnum(11, cvssVersion_); - } - if (cvssV2_ != null) { - output.writeMessage(12, getCvssV2()); - } - if (vexAssessment_ != null) { - output.writeMessage(13, getVexAssessment()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); - } - if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, severity_); - } - if (java.lang.Float.floatToRawIntBits(cvssScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, cvssScore_); - } - for (int i = 0; i < packageIssue_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, packageIssue_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, shortDescription_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, longDescription_); - } - for (int i = 0; i < relatedUrls_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, relatedUrls_.get(i)); - } - if (effectiveSeverity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(8, effectiveSeverity_); - } - if (fixAvailable_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(9, fixAvailable_); - } - if (cvssv3_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getCvssv3()); - } - if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, cvssVersion_); - } - if (cvssV2_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getCvssV2()); - } - if (vexAssessment_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, getVexAssessment()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.VulnerabilityOccurrence)) { - return super.equals(obj); - } - io.grafeas.v1.VulnerabilityOccurrence other = (io.grafeas.v1.VulnerabilityOccurrence) obj; - - if (!getType() - .equals(other.getType())) return false; - if (severity_ != other.severity_) return false; - if (java.lang.Float.floatToIntBits(getCvssScore()) - != java.lang.Float.floatToIntBits( - other.getCvssScore())) return false; - if (hasCvssv3() != other.hasCvssv3()) return false; - if (hasCvssv3()) { - if (!getCvssv3() - .equals(other.getCvssv3())) return false; - } - if (!getPackageIssueList() - .equals(other.getPackageIssueList())) return false; - if (!getShortDescription() - .equals(other.getShortDescription())) return false; - if (!getLongDescription() - .equals(other.getLongDescription())) return false; - if (!getRelatedUrlsList() - .equals(other.getRelatedUrlsList())) return false; - if (effectiveSeverity_ != other.effectiveSeverity_) return false; - if (getFixAvailable() - != other.getFixAvailable()) return false; - if (cvssVersion_ != other.cvssVersion_) return false; - if (hasCvssV2() != other.hasCvssV2()) return false; - if (hasCvssV2()) { - if (!getCvssV2() - .equals(other.getCvssV2())) return false; - } - if (hasVexAssessment() != other.hasVexAssessment()) return false; - if (hasVexAssessment()) { - if (!getVexAssessment() - .equals(other.getVexAssessment())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - hash = (37 * hash) + SEVERITY_FIELD_NUMBER; - hash = (53 * hash) + severity_; - hash = (37 * hash) + CVSS_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getCvssScore()); - if (hasCvssv3()) { - hash = (37 * hash) + CVSSV3_FIELD_NUMBER; - hash = (53 * hash) + getCvssv3().hashCode(); - } - if (getPackageIssueCount() > 0) { - hash = (37 * hash) + PACKAGE_ISSUE_FIELD_NUMBER; - hash = (53 * hash) + getPackageIssueList().hashCode(); - } - hash = (37 * hash) + SHORT_DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getShortDescription().hashCode(); - hash = (37 * hash) + LONG_DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getLongDescription().hashCode(); - if (getRelatedUrlsCount() > 0) { - hash = (37 * hash) + RELATED_URLS_FIELD_NUMBER; - hash = (53 * hash) + getRelatedUrlsList().hashCode(); - } - hash = (37 * hash) + EFFECTIVE_SEVERITY_FIELD_NUMBER; - hash = (53 * hash) + effectiveSeverity_; - hash = (37 * hash) + FIX_AVAILABLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getFixAvailable()); - hash = (37 * hash) + CVSS_VERSION_FIELD_NUMBER; - hash = (53 * hash) + cvssVersion_; - if (hasCvssV2()) { - hash = (37 * hash) + CVSS_V2_FIELD_NUMBER; - hash = (53 * hash) + getCvssV2().hashCode(); - } - if (hasVexAssessment()) { - hash = (37 * hash) + VEX_ASSESSMENT_FIELD_NUMBER; - hash = (53 * hash) + getVexAssessment().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.VulnerabilityOccurrence parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.VulnerabilityOccurrence prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An occurrence of a severity vulnerability on a resource.
-   * 
- * - * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityOccurrence) - io.grafeas.v1.VulnerabilityOccurrenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.VulnerabilityOccurrence.class, io.grafeas.v1.VulnerabilityOccurrence.Builder.class); - } - - // Construct using io.grafeas.v1.VulnerabilityOccurrence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = ""; - severity_ = 0; - cvssScore_ = 0F; - cvssv3_ = null; - if (cvssv3Builder_ != null) { - cvssv3Builder_.dispose(); - cvssv3Builder_ = null; - } - if (packageIssueBuilder_ == null) { - packageIssue_ = java.util.Collections.emptyList(); - } else { - packageIssue_ = null; - packageIssueBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - shortDescription_ = ""; - longDescription_ = ""; - if (relatedUrlsBuilder_ == null) { - relatedUrls_ = java.util.Collections.emptyList(); - } else { - relatedUrls_ = null; - relatedUrlsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000080); - effectiveSeverity_ = 0; - fixAvailable_ = false; - cvssVersion_ = 0; - cvssV2_ = null; - if (cvssV2Builder_ != null) { - cvssV2Builder_.dispose(); - cvssV2Builder_ = null; - } - vexAssessment_ = null; - if (vexAssessmentBuilder_ != null) { - vexAssessmentBuilder_.dispose(); - vexAssessmentBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Vulnerability.internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence getDefaultInstanceForType() { - return io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence build() { - io.grafeas.v1.VulnerabilityOccurrence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence buildPartial() { - io.grafeas.v1.VulnerabilityOccurrence result = new io.grafeas.v1.VulnerabilityOccurrence(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.VulnerabilityOccurrence result) { - if (packageIssueBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - packageIssue_ = java.util.Collections.unmodifiableList(packageIssue_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.packageIssue_ = packageIssue_; - } else { - result.packageIssue_ = packageIssueBuilder_.build(); - } - if (relatedUrlsBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0)) { - relatedUrls_ = java.util.Collections.unmodifiableList(relatedUrls_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.relatedUrls_ = relatedUrls_; - } else { - result.relatedUrls_ = relatedUrlsBuilder_.build(); - } - } - - private void buildPartial0(io.grafeas.v1.VulnerabilityOccurrence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.severity_ = severity_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.cvssScore_ = cvssScore_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.cvssv3_ = cvssv3Builder_ == null - ? cvssv3_ - : cvssv3Builder_.build(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.shortDescription_ = shortDescription_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.longDescription_ = longDescription_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.effectiveSeverity_ = effectiveSeverity_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.fixAvailable_ = fixAvailable_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.cvssVersion_ = cvssVersion_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.cvssV2_ = cvssV2Builder_ == null - ? cvssV2_ - : cvssV2Builder_.build(); - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.vexAssessment_ = vexAssessmentBuilder_ == null - ? vexAssessment_ - : vexAssessmentBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.VulnerabilityOccurrence) { - return mergeFrom((io.grafeas.v1.VulnerabilityOccurrence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence other) { - if (other == io.grafeas.v1.VulnerabilityOccurrence.getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.severity_ != 0) { - setSeverityValue(other.getSeverityValue()); - } - if (other.getCvssScore() != 0F) { - setCvssScore(other.getCvssScore()); - } - if (other.hasCvssv3()) { - mergeCvssv3(other.getCvssv3()); - } - if (packageIssueBuilder_ == null) { - if (!other.packageIssue_.isEmpty()) { - if (packageIssue_.isEmpty()) { - packageIssue_ = other.packageIssue_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensurePackageIssueIsMutable(); - packageIssue_.addAll(other.packageIssue_); - } - onChanged(); - } - } else { - if (!other.packageIssue_.isEmpty()) { - if (packageIssueBuilder_.isEmpty()) { - packageIssueBuilder_.dispose(); - packageIssueBuilder_ = null; - packageIssue_ = other.packageIssue_; - bitField0_ = (bitField0_ & ~0x00000010); - packageIssueBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPackageIssueFieldBuilder() : null; - } else { - packageIssueBuilder_.addAllMessages(other.packageIssue_); - } - } - } - if (!other.getShortDescription().isEmpty()) { - shortDescription_ = other.shortDescription_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (!other.getLongDescription().isEmpty()) { - longDescription_ = other.longDescription_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (relatedUrlsBuilder_ == null) { - if (!other.relatedUrls_.isEmpty()) { - if (relatedUrls_.isEmpty()) { - relatedUrls_ = other.relatedUrls_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureRelatedUrlsIsMutable(); - relatedUrls_.addAll(other.relatedUrls_); - } - onChanged(); - } - } else { - if (!other.relatedUrls_.isEmpty()) { - if (relatedUrlsBuilder_.isEmpty()) { - relatedUrlsBuilder_.dispose(); - relatedUrlsBuilder_ = null; - relatedUrls_ = other.relatedUrls_; - bitField0_ = (bitField0_ & ~0x00000080); - relatedUrlsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRelatedUrlsFieldBuilder() : null; - } else { - relatedUrlsBuilder_.addAllMessages(other.relatedUrls_); - } - } - } - if (other.effectiveSeverity_ != 0) { - setEffectiveSeverityValue(other.getEffectiveSeverityValue()); - } - if (other.getFixAvailable() != false) { - setFixAvailable(other.getFixAvailable()); - } - if (other.cvssVersion_ != 0) { - setCvssVersionValue(other.getCvssVersionValue()); - } - if (other.hasCvssV2()) { - mergeCvssV2(other.getCvssV2()); - } - if (other.hasVexAssessment()) { - mergeVexAssessment(other.getVexAssessment()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - type_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - severity_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 29: { - cvssScore_ = input.readFloat(); - bitField0_ |= 0x00000004; - break; - } // case 29 - case 34: { - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue m = - input.readMessage( - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.parser(), - extensionRegistry); - if (packageIssueBuilder_ == null) { - ensurePackageIssueIsMutable(); - packageIssue_.add(m); - } else { - packageIssueBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: { - shortDescription_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 42 - case 50: { - longDescription_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 50 - case 58: { - io.grafeas.v1.RelatedUrl m = - input.readMessage( - io.grafeas.v1.RelatedUrl.parser(), - extensionRegistry); - if (relatedUrlsBuilder_ == null) { - ensureRelatedUrlsIsMutable(); - relatedUrls_.add(m); - } else { - relatedUrlsBuilder_.addMessage(m); - } - break; - } // case 58 - case 64: { - effectiveSeverity_ = input.readEnum(); - bitField0_ |= 0x00000100; - break; - } // case 64 - case 72: { - fixAvailable_ = input.readBool(); - bitField0_ |= 0x00000200; - break; - } // case 72 - case 82: { - input.readMessage( - getCvssv3FieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 82 - case 88: { - cvssVersion_ = input.readEnum(); - bitField0_ |= 0x00000400; - break; - } // case 88 - case 98: { - input.readMessage( - getCvssV2FieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000800; - break; - } // case 98 - case 106: { - input.readMessage( - getVexAssessmentFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00001000; - break; - } // case 106 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object type_ = ""; - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems, node.js
-     * packages, etc.).
-     * 
- * - * string type = 1; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems, node.js
-     * packages, etc.).
-     * 
- * - * string type = 1; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems, node.js
-     * packages, etc.).
-     * 
- * - * string type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems, node.js
-     * packages, etc.).
-     * 
- * - * string type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - type_ = getDefaultInstance().getType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The type of package; whether native or non native (e.g., ruby gems, node.js
-     * packages, etc.).
-     * 
- * - * string type = 1; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int severity_ = 0; - /** - *
-     * Output only. The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override public int getSeverityValue() { - return severity_; - } - /** - *
-     * Output only. The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @param value The enum numeric value on the wire for severity to set. - * @return This builder for chaining. - */ - public Builder setSeverityValue(int value) { - severity_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Output only. The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - @java.lang.Override - public io.grafeas.v1.Severity getSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(severity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - /** - *
-     * Output only. The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @param value The severity to set. - * @return This builder for chaining. - */ - public Builder setSeverity(io.grafeas.v1.Severity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - severity_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. The note provider assigned severity of this vulnerability.
-     * 
- * - * .grafeas.v1.Severity severity = 2; - * @return This builder for chaining. - */ - public Builder clearSeverity() { - bitField0_ = (bitField0_ & ~0x00000002); - severity_ = 0; - onChanged(); - return this; - } - - private float cvssScore_ ; - /** - *
-     * Output only. The CVSS score of this vulnerability. CVSS score is on a
-     * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
-     * severity.
-     * 
- * - * float cvss_score = 3; - * @return The cvssScore. - */ - @java.lang.Override - public float getCvssScore() { - return cvssScore_; - } - /** - *
-     * Output only. The CVSS score of this vulnerability. CVSS score is on a
-     * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
-     * severity.
-     * 
- * - * float cvss_score = 3; - * @param value The cvssScore to set. - * @return This builder for chaining. - */ - public Builder setCvssScore(float value) { - - cvssScore_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Output only. The CVSS score of this vulnerability. CVSS score is on a
-     * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
-     * severity.
-     * 
- * - * float cvss_score = 3; - * @return This builder for chaining. - */ - public Builder clearCvssScore() { - bitField0_ = (bitField0_ & ~0x00000004); - cvssScore_ = 0F; - onChanged(); - return this; - } - - private io.grafeas.v1.CVSS cvssv3_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> cvssv3Builder_; - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - * @return Whether the cvssv3 field is set. - */ - public boolean hasCvssv3() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - * @return The cvssv3. - */ - public io.grafeas.v1.CVSS getCvssv3() { - if (cvssv3Builder_ == null) { - return cvssv3_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; - } else { - return cvssv3Builder_.getMessage(); - } - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - public Builder setCvssv3(io.grafeas.v1.CVSS value) { - if (cvssv3Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cvssv3_ = value; - } else { - cvssv3Builder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - public Builder setCvssv3( - io.grafeas.v1.CVSS.Builder builderForValue) { - if (cvssv3Builder_ == null) { - cvssv3_ = builderForValue.build(); - } else { - cvssv3Builder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - public Builder mergeCvssv3(io.grafeas.v1.CVSS value) { - if (cvssv3Builder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - cvssv3_ != null && - cvssv3_ != io.grafeas.v1.CVSS.getDefaultInstance()) { - getCvssv3Builder().mergeFrom(value); - } else { - cvssv3_ = value; - } - } else { - cvssv3Builder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - public Builder clearCvssv3() { - bitField0_ = (bitField0_ & ~0x00000008); - cvssv3_ = null; - if (cvssv3Builder_ != null) { - cvssv3Builder_.dispose(); - cvssv3Builder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - public io.grafeas.v1.CVSS.Builder getCvssv3Builder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCvssv3FieldBuilder().getBuilder(); - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - public io.grafeas.v1.CVSSOrBuilder getCvssv3OrBuilder() { - if (cvssv3Builder_ != null) { - return cvssv3Builder_.getMessageOrBuilder(); - } else { - return cvssv3_ == null ? - io.grafeas.v1.CVSS.getDefaultInstance() : cvssv3_; - } - } - /** - *
-     * The cvss v3 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> - getCvssv3FieldBuilder() { - if (cvssv3Builder_ == null) { - cvssv3Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( - getCvssv3(), - getParentForChildren(), - isClean()); - cvssv3_ = null; - } - return cvssv3Builder_; - } - - private java.util.List packageIssue_ = - java.util.Collections.emptyList(); - private void ensurePackageIssueIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - packageIssue_ = new java.util.ArrayList(packageIssue_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder, io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder> packageIssueBuilder_; - - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public java.util.List getPackageIssueList() { - if (packageIssueBuilder_ == null) { - return java.util.Collections.unmodifiableList(packageIssue_); - } else { - return packageIssueBuilder_.getMessageList(); - } - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public int getPackageIssueCount() { - if (packageIssueBuilder_ == null) { - return packageIssue_.size(); - } else { - return packageIssueBuilder_.getCount(); - } - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getPackageIssue(int index) { - if (packageIssueBuilder_ == null) { - return packageIssue_.get(index); - } else { - return packageIssueBuilder_.getMessage(index); - } - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder setPackageIssue( - int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue value) { - if (packageIssueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePackageIssueIsMutable(); - packageIssue_.set(index, value); - onChanged(); - } else { - packageIssueBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder setPackageIssue( - int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder builderForValue) { - if (packageIssueBuilder_ == null) { - ensurePackageIssueIsMutable(); - packageIssue_.set(index, builderForValue.build()); - onChanged(); - } else { - packageIssueBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder addPackageIssue(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue value) { - if (packageIssueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePackageIssueIsMutable(); - packageIssue_.add(value); - onChanged(); - } else { - packageIssueBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder addPackageIssue( - int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue value) { - if (packageIssueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePackageIssueIsMutable(); - packageIssue_.add(index, value); - onChanged(); - } else { - packageIssueBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder addPackageIssue( - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder builderForValue) { - if (packageIssueBuilder_ == null) { - ensurePackageIssueIsMutable(); - packageIssue_.add(builderForValue.build()); - onChanged(); - } else { - packageIssueBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder addPackageIssue( - int index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder builderForValue) { - if (packageIssueBuilder_ == null) { - ensurePackageIssueIsMutable(); - packageIssue_.add(index, builderForValue.build()); - onChanged(); - } else { - packageIssueBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder addAllPackageIssue( - java.lang.Iterable values) { - if (packageIssueBuilder_ == null) { - ensurePackageIssueIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, packageIssue_); - onChanged(); - } else { - packageIssueBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder clearPackageIssue() { - if (packageIssueBuilder_ == null) { - packageIssue_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - packageIssueBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public Builder removePackageIssue(int index) { - if (packageIssueBuilder_ == null) { - ensurePackageIssueIsMutable(); - packageIssue_.remove(index); - onChanged(); - } else { - packageIssueBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder getPackageIssueBuilder( - int index) { - return getPackageIssueFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder getPackageIssueOrBuilder( - int index) { - if (packageIssueBuilder_ == null) { - return packageIssue_.get(index); } else { - return packageIssueBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public java.util.List - getPackageIssueOrBuilderList() { - if (packageIssueBuilder_ != null) { - return packageIssueBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(packageIssue_); - } - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder addPackageIssueBuilder() { - return getPackageIssueFieldBuilder().addBuilder( - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance()); - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder addPackageIssueBuilder( - int index) { - return getPackageIssueFieldBuilder().addBuilder( - index, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.getDefaultInstance()); - } - /** - *
-     * Required. The set of affected locations and their fixes (if available)
-     * within the associated resource.
-     * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - public java.util.List - getPackageIssueBuilderList() { - return getPackageIssueFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder, io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder> - getPackageIssueFieldBuilder() { - if (packageIssueBuilder_ == null) { - packageIssueBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue, io.grafeas.v1.VulnerabilityOccurrence.PackageIssue.Builder, io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder>( - packageIssue_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - packageIssue_ = null; - } - return packageIssueBuilder_; - } - - private java.lang.Object shortDescription_ = ""; - /** - *
-     * Output only. A one sentence description of this vulnerability.
-     * 
- * - * string short_description = 5; - * @return The shortDescription. - */ - public java.lang.String getShortDescription() { - java.lang.Object ref = shortDescription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - shortDescription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. A one sentence description of this vulnerability.
-     * 
- * - * string short_description = 5; - * @return The bytes for shortDescription. - */ - public com.google.protobuf.ByteString - getShortDescriptionBytes() { - java.lang.Object ref = shortDescription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - shortDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. A one sentence description of this vulnerability.
-     * 
- * - * string short_description = 5; - * @param value The shortDescription to set. - * @return This builder for chaining. - */ - public Builder setShortDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - shortDescription_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Output only. A one sentence description of this vulnerability.
-     * 
- * - * string short_description = 5; - * @return This builder for chaining. - */ - public Builder clearShortDescription() { - shortDescription_ = getDefaultInstance().getShortDescription(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * Output only. A one sentence description of this vulnerability.
-     * 
- * - * string short_description = 5; - * @param value The bytes for shortDescription to set. - * @return This builder for chaining. - */ - public Builder setShortDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - shortDescription_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private java.lang.Object longDescription_ = ""; - /** - *
-     * Output only. A detailed description of this vulnerability.
-     * 
- * - * string long_description = 6; - * @return The longDescription. - */ - public java.lang.String getLongDescription() { - java.lang.Object ref = longDescription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - longDescription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. A detailed description of this vulnerability.
-     * 
- * - * string long_description = 6; - * @return The bytes for longDescription. - */ - public com.google.protobuf.ByteString - getLongDescriptionBytes() { - java.lang.Object ref = longDescription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - longDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. A detailed description of this vulnerability.
-     * 
- * - * string long_description = 6; - * @param value The longDescription to set. - * @return This builder for chaining. - */ - public Builder setLongDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - longDescription_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * Output only. A detailed description of this vulnerability.
-     * 
- * - * string long_description = 6; - * @return This builder for chaining. - */ - public Builder clearLongDescription() { - longDescription_ = getDefaultInstance().getLongDescription(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - *
-     * Output only. A detailed description of this vulnerability.
-     * 
- * - * string long_description = 6; - * @param value The bytes for longDescription to set. - * @return This builder for chaining. - */ - public Builder setLongDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - longDescription_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private java.util.List relatedUrls_ = - java.util.Collections.emptyList(); - private void ensureRelatedUrlsIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { - relatedUrls_ = new java.util.ArrayList(relatedUrls_); - bitField0_ |= 0x00000080; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> relatedUrlsBuilder_; - - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public java.util.List getRelatedUrlsList() { - if (relatedUrlsBuilder_ == null) { - return java.util.Collections.unmodifiableList(relatedUrls_); - } else { - return relatedUrlsBuilder_.getMessageList(); - } - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public int getRelatedUrlsCount() { - if (relatedUrlsBuilder_ == null) { - return relatedUrls_.size(); - } else { - return relatedUrlsBuilder_.getCount(); - } - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public io.grafeas.v1.RelatedUrl getRelatedUrls(int index) { - if (relatedUrlsBuilder_ == null) { - return relatedUrls_.get(index); - } else { - return relatedUrlsBuilder_.getMessage(index); - } - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder setRelatedUrls( - int index, io.grafeas.v1.RelatedUrl value) { - if (relatedUrlsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedUrlsIsMutable(); - relatedUrls_.set(index, value); - onChanged(); - } else { - relatedUrlsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder setRelatedUrls( - int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { - if (relatedUrlsBuilder_ == null) { - ensureRelatedUrlsIsMutable(); - relatedUrls_.set(index, builderForValue.build()); - onChanged(); - } else { - relatedUrlsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder addRelatedUrls(io.grafeas.v1.RelatedUrl value) { - if (relatedUrlsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedUrlsIsMutable(); - relatedUrls_.add(value); - onChanged(); - } else { - relatedUrlsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder addRelatedUrls( - int index, io.grafeas.v1.RelatedUrl value) { - if (relatedUrlsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedUrlsIsMutable(); - relatedUrls_.add(index, value); - onChanged(); - } else { - relatedUrlsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder addRelatedUrls( - io.grafeas.v1.RelatedUrl.Builder builderForValue) { - if (relatedUrlsBuilder_ == null) { - ensureRelatedUrlsIsMutable(); - relatedUrls_.add(builderForValue.build()); - onChanged(); - } else { - relatedUrlsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder addRelatedUrls( - int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { - if (relatedUrlsBuilder_ == null) { - ensureRelatedUrlsIsMutable(); - relatedUrls_.add(index, builderForValue.build()); - onChanged(); - } else { - relatedUrlsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder addAllRelatedUrls( - java.lang.Iterable values) { - if (relatedUrlsBuilder_ == null) { - ensureRelatedUrlsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, relatedUrls_); - onChanged(); - } else { - relatedUrlsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder clearRelatedUrls() { - if (relatedUrlsBuilder_ == null) { - relatedUrls_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - } else { - relatedUrlsBuilder_.clear(); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public Builder removeRelatedUrls(int index) { - if (relatedUrlsBuilder_ == null) { - ensureRelatedUrlsIsMutable(); - relatedUrls_.remove(index); - onChanged(); - } else { - relatedUrlsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public io.grafeas.v1.RelatedUrl.Builder getRelatedUrlsBuilder( - int index) { - return getRelatedUrlsFieldBuilder().getBuilder(index); - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlsOrBuilder( - int index) { - if (relatedUrlsBuilder_ == null) { - return relatedUrls_.get(index); } else { - return relatedUrlsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public java.util.List - getRelatedUrlsOrBuilderList() { - if (relatedUrlsBuilder_ != null) { - return relatedUrlsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(relatedUrls_); - } - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlsBuilder() { - return getRelatedUrlsFieldBuilder().addBuilder( - io.grafeas.v1.RelatedUrl.getDefaultInstance()); - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public io.grafeas.v1.RelatedUrl.Builder addRelatedUrlsBuilder( - int index) { - return getRelatedUrlsFieldBuilder().addBuilder( - index, io.grafeas.v1.RelatedUrl.getDefaultInstance()); - } - /** - *
-     * Output only. URLs related to this vulnerability.
-     * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - public java.util.List - getRelatedUrlsBuilderList() { - return getRelatedUrlsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder> - getRelatedUrlsFieldBuilder() { - if (relatedUrlsBuilder_ == null) { - relatedUrlsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.RelatedUrl, io.grafeas.v1.RelatedUrl.Builder, io.grafeas.v1.RelatedUrlOrBuilder>( - relatedUrls_, - ((bitField0_ & 0x00000080) != 0), - getParentForChildren(), - isClean()); - relatedUrls_ = null; - } - return relatedUrlsBuilder_; - } - - private int effectiveSeverity_ = 0; - /** - *
-     * The distro assigned severity for this vulnerability when it is available,
-     * otherwise this is the note provider assigned severity.
-     * When there are multiple PackageIssues for this vulnerability, they can have
-     * different effective severities because some might be provided by the distro
-     * while others are provided by the language ecosystem for a language pack.
-     * For this reason, it is advised to use the effective severity on the
-     * PackageIssue level. In the case where multiple PackageIssues have differing
-     * effective severities, this field should be the highest severity for any of
-     * the PackageIssues.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @return The enum numeric value on the wire for effectiveSeverity. - */ - @java.lang.Override public int getEffectiveSeverityValue() { - return effectiveSeverity_; - } - /** - *
-     * The distro assigned severity for this vulnerability when it is available,
-     * otherwise this is the note provider assigned severity.
-     * When there are multiple PackageIssues for this vulnerability, they can have
-     * different effective severities because some might be provided by the distro
-     * while others are provided by the language ecosystem for a language pack.
-     * For this reason, it is advised to use the effective severity on the
-     * PackageIssue level. In the case where multiple PackageIssues have differing
-     * effective severities, this field should be the highest severity for any of
-     * the PackageIssues.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @param value The enum numeric value on the wire for effectiveSeverity to set. - * @return This builder for chaining. - */ - public Builder setEffectiveSeverityValue(int value) { - effectiveSeverity_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * The distro assigned severity for this vulnerability when it is available,
-     * otherwise this is the note provider assigned severity.
-     * When there are multiple PackageIssues for this vulnerability, they can have
-     * different effective severities because some might be provided by the distro
-     * while others are provided by the language ecosystem for a language pack.
-     * For this reason, it is advised to use the effective severity on the
-     * PackageIssue level. In the case where multiple PackageIssues have differing
-     * effective severities, this field should be the highest severity for any of
-     * the PackageIssues.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @return The effectiveSeverity. - */ - @java.lang.Override - public io.grafeas.v1.Severity getEffectiveSeverity() { - io.grafeas.v1.Severity result = io.grafeas.v1.Severity.forNumber(effectiveSeverity_); - return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; - } - /** - *
-     * The distro assigned severity for this vulnerability when it is available,
-     * otherwise this is the note provider assigned severity.
-     * When there are multiple PackageIssues for this vulnerability, they can have
-     * different effective severities because some might be provided by the distro
-     * while others are provided by the language ecosystem for a language pack.
-     * For this reason, it is advised to use the effective severity on the
-     * PackageIssue level. In the case where multiple PackageIssues have differing
-     * effective severities, this field should be the highest severity for any of
-     * the PackageIssues.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @param value The effectiveSeverity to set. - * @return This builder for chaining. - */ - public Builder setEffectiveSeverity(io.grafeas.v1.Severity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - effectiveSeverity_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The distro assigned severity for this vulnerability when it is available,
-     * otherwise this is the note provider assigned severity.
-     * When there are multiple PackageIssues for this vulnerability, they can have
-     * different effective severities because some might be provided by the distro
-     * while others are provided by the language ecosystem for a language pack.
-     * For this reason, it is advised to use the effective severity on the
-     * PackageIssue level. In the case where multiple PackageIssues have differing
-     * effective severities, this field should be the highest severity for any of
-     * the PackageIssues.
-     * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @return This builder for chaining. - */ - public Builder clearEffectiveSeverity() { - bitField0_ = (bitField0_ & ~0x00000100); - effectiveSeverity_ = 0; - onChanged(); - return this; - } - - private boolean fixAvailable_ ; - /** - *
-     * Output only. Whether at least one of the affected packages has a fix
-     * available.
-     * 
- * - * bool fix_available = 9; - * @return The fixAvailable. - */ - @java.lang.Override - public boolean getFixAvailable() { - return fixAvailable_; - } - /** - *
-     * Output only. Whether at least one of the affected packages has a fix
-     * available.
-     * 
- * - * bool fix_available = 9; - * @param value The fixAvailable to set. - * @return This builder for chaining. - */ - public Builder setFixAvailable(boolean value) { - - fixAvailable_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * Output only. Whether at least one of the affected packages has a fix
-     * available.
-     * 
- * - * bool fix_available = 9; - * @return This builder for chaining. - */ - public Builder clearFixAvailable() { - bitField0_ = (bitField0_ & ~0x00000200); - fixAvailable_ = false; - onChanged(); - return this; - } - - private int cvssVersion_ = 0; - /** - *
-     * Output only. CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @return The enum numeric value on the wire for cvssVersion. - */ - @java.lang.Override public int getCvssVersionValue() { - return cvssVersion_; - } - /** - *
-     * Output only. CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @param value The enum numeric value on the wire for cvssVersion to set. - * @return This builder for chaining. - */ - public Builder setCvssVersionValue(int value) { - cvssVersion_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - *
-     * Output only. CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @return The cvssVersion. - */ - @java.lang.Override - public io.grafeas.v1.CVSSVersion getCvssVersion() { - io.grafeas.v1.CVSSVersion result = io.grafeas.v1.CVSSVersion.forNumber(cvssVersion_); - return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; - } - /** - *
-     * Output only. CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @param value The cvssVersion to set. - * @return This builder for chaining. - */ - public Builder setCvssVersion(io.grafeas.v1.CVSSVersion value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - cvssVersion_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. CVSS version used to populate cvss_score and severity.
-     * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @return This builder for chaining. - */ - public Builder clearCvssVersion() { - bitField0_ = (bitField0_ & ~0x00000400); - cvssVersion_ = 0; - onChanged(); - return this; - } - - private io.grafeas.v1.CVSS cvssV2_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> cvssV2Builder_; - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - * @return Whether the cvssV2 field is set. - */ - public boolean hasCvssV2() { - return ((bitField0_ & 0x00000800) != 0); - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - * @return The cvssV2. - */ - public io.grafeas.v1.CVSS getCvssV2() { - if (cvssV2Builder_ == null) { - return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } else { - return cvssV2Builder_.getMessage(); - } - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - public Builder setCvssV2(io.grafeas.v1.CVSS value) { - if (cvssV2Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cvssV2_ = value; - } else { - cvssV2Builder_.setMessage(value); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - public Builder setCvssV2( - io.grafeas.v1.CVSS.Builder builderForValue) { - if (cvssV2Builder_ == null) { - cvssV2_ = builderForValue.build(); - } else { - cvssV2Builder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - public Builder mergeCvssV2(io.grafeas.v1.CVSS value) { - if (cvssV2Builder_ == null) { - if (((bitField0_ & 0x00000800) != 0) && - cvssV2_ != null && - cvssV2_ != io.grafeas.v1.CVSS.getDefaultInstance()) { - getCvssV2Builder().mergeFrom(value); - } else { - cvssV2_ = value; - } - } else { - cvssV2Builder_.mergeFrom(value); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - public Builder clearCvssV2() { - bitField0_ = (bitField0_ & ~0x00000800); - cvssV2_ = null; - if (cvssV2Builder_ != null) { - cvssV2Builder_.dispose(); - cvssV2Builder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - public io.grafeas.v1.CVSS.Builder getCvssV2Builder() { - bitField0_ |= 0x00000800; - onChanged(); - return getCvssV2FieldBuilder().getBuilder(); - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { - if (cvssV2Builder_ != null) { - return cvssV2Builder_.getMessageOrBuilder(); - } else { - return cvssV2_ == null ? - io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; - } - } - /** - *
-     * The cvss v2 score for the vulnerability.
-     * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> - getCvssV2FieldBuilder() { - if (cvssV2Builder_ == null) { - cvssV2Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( - getCvssV2(), - getParentForChildren(), - isClean()); - cvssV2_ = null; - } - return cvssV2Builder_; - } - - private io.grafeas.v1.VulnerabilityOccurrence.VexAssessment vexAssessment_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityOccurrence.VexAssessment, io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder, io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder> vexAssessmentBuilder_; - /** - * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - * @return Whether the vexAssessment field is set. - */ - public boolean hasVexAssessment() { - return ((bitField0_ & 0x00001000) != 0); - } - /** - * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - * @return The vexAssessment. - */ - public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getVexAssessment() { - if (vexAssessmentBuilder_ == null) { - return vexAssessment_ == null ? io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() : vexAssessment_; - } else { - return vexAssessmentBuilder_.getMessage(); - } - } - /** - * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - */ - public Builder setVexAssessment(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment value) { - if (vexAssessmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - vexAssessment_ = value; - } else { - vexAssessmentBuilder_.setMessage(value); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - */ - public Builder setVexAssessment( - io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder builderForValue) { - if (vexAssessmentBuilder_ == null) { - vexAssessment_ = builderForValue.build(); - } else { - vexAssessmentBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - */ - public Builder mergeVexAssessment(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment value) { - if (vexAssessmentBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) && - vexAssessment_ != null && - vexAssessment_ != io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance()) { - getVexAssessmentBuilder().mergeFrom(value); - } else { - vexAssessment_ = value; - } - } else { - vexAssessmentBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - */ - public Builder clearVexAssessment() { - bitField0_ = (bitField0_ & ~0x00001000); - vexAssessment_ = null; - if (vexAssessmentBuilder_ != null) { - vexAssessmentBuilder_.dispose(); - vexAssessmentBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - */ - public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder getVexAssessmentBuilder() { - bitField0_ |= 0x00001000; - onChanged(); - return getVexAssessmentFieldBuilder().getBuilder(); - } - /** - * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - */ - public io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder getVexAssessmentOrBuilder() { - if (vexAssessmentBuilder_ != null) { - return vexAssessmentBuilder_.getMessageOrBuilder(); - } else { - return vexAssessment_ == null ? - io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() : vexAssessment_; - } - } - /** - * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityOccurrence.VexAssessment, io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder, io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder> - getVexAssessmentFieldBuilder() { - if (vexAssessmentBuilder_ == null) { - vexAssessmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.VulnerabilityOccurrence.VexAssessment, io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder, io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder>( - getVexAssessment(), - getParentForChildren(), - isClean()); - vexAssessment_ = null; - } - return vexAssessmentBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityOccurrence) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityOccurrence) - private static final io.grafeas.v1.VulnerabilityOccurrence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityOccurrence(); - } - - public static io.grafeas.v1.VulnerabilityOccurrence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VulnerabilityOccurrence parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.VulnerabilityOccurrence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java deleted file mode 100644 index df2a8b1f74cc..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java +++ /dev/null @@ -1,329 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/vulnerability.proto - -package io.grafeas.v1; - -public interface VulnerabilityOccurrenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityOccurrence) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems, node.js
-   * packages, etc.).
-   * 
- * - * string type = 1; - * @return The type. - */ - java.lang.String getType(); - /** - *
-   * The type of package; whether native or non native (e.g., ruby gems, node.js
-   * packages, etc.).
-   * 
- * - * string type = 1; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - *
-   * Output only. The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The enum numeric value on the wire for severity. - */ - int getSeverityValue(); - /** - *
-   * Output only. The note provider assigned severity of this vulnerability.
-   * 
- * - * .grafeas.v1.Severity severity = 2; - * @return The severity. - */ - io.grafeas.v1.Severity getSeverity(); - - /** - *
-   * Output only. The CVSS score of this vulnerability. CVSS score is on a
-   * scale of 0 - 10 where 0 indicates low severity and 10 indicates high
-   * severity.
-   * 
- * - * float cvss_score = 3; - * @return The cvssScore. - */ - float getCvssScore(); - - /** - *
-   * The cvss v3 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - * @return Whether the cvssv3 field is set. - */ - boolean hasCvssv3(); - /** - *
-   * The cvss v3 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - * @return The cvssv3. - */ - io.grafeas.v1.CVSS getCvssv3(); - /** - *
-   * The cvss v3 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvssv3 = 10; - */ - io.grafeas.v1.CVSSOrBuilder getCvssv3OrBuilder(); - - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - java.util.List - getPackageIssueList(); - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getPackageIssue(int index); - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - int getPackageIssueCount(); - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - java.util.List - getPackageIssueOrBuilderList(); - /** - *
-   * Required. The set of affected locations and their fixes (if available)
-   * within the associated resource.
-   * 
- * - * repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - io.grafeas.v1.VulnerabilityOccurrence.PackageIssueOrBuilder getPackageIssueOrBuilder( - int index); - - /** - *
-   * Output only. A one sentence description of this vulnerability.
-   * 
- * - * string short_description = 5; - * @return The shortDescription. - */ - java.lang.String getShortDescription(); - /** - *
-   * Output only. A one sentence description of this vulnerability.
-   * 
- * - * string short_description = 5; - * @return The bytes for shortDescription. - */ - com.google.protobuf.ByteString - getShortDescriptionBytes(); - - /** - *
-   * Output only. A detailed description of this vulnerability.
-   * 
- * - * string long_description = 6; - * @return The longDescription. - */ - java.lang.String getLongDescription(); - /** - *
-   * Output only. A detailed description of this vulnerability.
-   * 
- * - * string long_description = 6; - * @return The bytes for longDescription. - */ - com.google.protobuf.ByteString - getLongDescriptionBytes(); - - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - java.util.List - getRelatedUrlsList(); - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - io.grafeas.v1.RelatedUrl getRelatedUrls(int index); - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - int getRelatedUrlsCount(); - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - java.util.List - getRelatedUrlsOrBuilderList(); - /** - *
-   * Output only. URLs related to this vulnerability.
-   * 
- * - * repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlsOrBuilder( - int index); - - /** - *
-   * The distro assigned severity for this vulnerability when it is available,
-   * otherwise this is the note provider assigned severity.
-   * When there are multiple PackageIssues for this vulnerability, they can have
-   * different effective severities because some might be provided by the distro
-   * while others are provided by the language ecosystem for a language pack.
-   * For this reason, it is advised to use the effective severity on the
-   * PackageIssue level. In the case where multiple PackageIssues have differing
-   * effective severities, this field should be the highest severity for any of
-   * the PackageIssues.
-   * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @return The enum numeric value on the wire for effectiveSeverity. - */ - int getEffectiveSeverityValue(); - /** - *
-   * The distro assigned severity for this vulnerability when it is available,
-   * otherwise this is the note provider assigned severity.
-   * When there are multiple PackageIssues for this vulnerability, they can have
-   * different effective severities because some might be provided by the distro
-   * while others are provided by the language ecosystem for a language pack.
-   * For this reason, it is advised to use the effective severity on the
-   * PackageIssue level. In the case where multiple PackageIssues have differing
-   * effective severities, this field should be the highest severity for any of
-   * the PackageIssues.
-   * 
- * - * .grafeas.v1.Severity effective_severity = 8; - * @return The effectiveSeverity. - */ - io.grafeas.v1.Severity getEffectiveSeverity(); - - /** - *
-   * Output only. Whether at least one of the affected packages has a fix
-   * available.
-   * 
- * - * bool fix_available = 9; - * @return The fixAvailable. - */ - boolean getFixAvailable(); - - /** - *
-   * Output only. CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @return The enum numeric value on the wire for cvssVersion. - */ - int getCvssVersionValue(); - /** - *
-   * Output only. CVSS version used to populate cvss_score and severity.
-   * 
- * - * .grafeas.v1.CVSSVersion cvss_version = 11; - * @return The cvssVersion. - */ - io.grafeas.v1.CVSSVersion getCvssVersion(); - - /** - *
-   * The cvss v2 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - * @return Whether the cvssV2 field is set. - */ - boolean hasCvssV2(); - /** - *
-   * The cvss v2 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - * @return The cvssV2. - */ - io.grafeas.v1.CVSS getCvssV2(); - /** - *
-   * The cvss v2 score for the vulnerability.
-   * 
- * - * .grafeas.v1.CVSS cvss_v2 = 12; - */ - io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder(); - - /** - * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - * @return Whether the vexAssessment field is set. - */ - boolean hasVexAssessment(); - /** - * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - * @return The vexAssessment. - */ - io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getVexAssessment(); - /** - * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - */ - io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder getVexAssessmentOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java deleted file mode 100644 index 1491d466fd35..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdate.java +++ /dev/null @@ -1,3538 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -/** - *
- * Windows Update represents the metadata about the update for the Windows
- * operating system. The fields in this message come from the Windows Update API
- * documented at
- * https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate.
- * 
- * - * Protobuf type {@code grafeas.v1.WindowsUpdate} - */ -public final class WindowsUpdate extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.WindowsUpdate) - WindowsUpdateOrBuilder { -private static final long serialVersionUID = 0L; - // Use WindowsUpdate.newBuilder() to construct. - private WindowsUpdate(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WindowsUpdate() { - title_ = ""; - description_ = ""; - categories_ = java.util.Collections.emptyList(); - kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - supportUrl_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WindowsUpdate(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.WindowsUpdate.class, io.grafeas.v1.WindowsUpdate.Builder.class); - } - - public interface IdentityOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.WindowsUpdate.Identity) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The revision independent identifier of the update.
-     * 
- * - * string update_id = 1; - * @return The updateId. - */ - java.lang.String getUpdateId(); - /** - *
-     * The revision independent identifier of the update.
-     * 
- * - * string update_id = 1; - * @return The bytes for updateId. - */ - com.google.protobuf.ByteString - getUpdateIdBytes(); - - /** - *
-     * The revision number of the update.
-     * 
- * - * int32 revision = 2; - * @return The revision. - */ - int getRevision(); - } - /** - *
-   * The unique identifier of the update.
-   * 
- * - * Protobuf type {@code grafeas.v1.WindowsUpdate.Identity} - */ - public static final class Identity extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.WindowsUpdate.Identity) - IdentityOrBuilder { - private static final long serialVersionUID = 0L; - // Use Identity.newBuilder() to construct. - private Identity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Identity() { - updateId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Identity(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.WindowsUpdate.Identity.class, io.grafeas.v1.WindowsUpdate.Identity.Builder.class); - } - - public static final int UPDATE_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object updateId_ = ""; - /** - *
-     * The revision independent identifier of the update.
-     * 
- * - * string update_id = 1; - * @return The updateId. - */ - @java.lang.Override - public java.lang.String getUpdateId() { - java.lang.Object ref = updateId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - updateId_ = s; - return s; - } - } - /** - *
-     * The revision independent identifier of the update.
-     * 
- * - * string update_id = 1; - * @return The bytes for updateId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUpdateIdBytes() { - java.lang.Object ref = updateId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - updateId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REVISION_FIELD_NUMBER = 2; - private int revision_ = 0; - /** - *
-     * The revision number of the update.
-     * 
- * - * int32 revision = 2; - * @return The revision. - */ - @java.lang.Override - public int getRevision() { - return revision_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, updateId_); - } - if (revision_ != 0) { - output.writeInt32(2, revision_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, updateId_); - } - if (revision_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, revision_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.WindowsUpdate.Identity)) { - return super.equals(obj); - } - io.grafeas.v1.WindowsUpdate.Identity other = (io.grafeas.v1.WindowsUpdate.Identity) obj; - - if (!getUpdateId() - .equals(other.getUpdateId())) return false; - if (getRevision() - != other.getRevision()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + UPDATE_ID_FIELD_NUMBER; - hash = (53 * hash) + getUpdateId().hashCode(); - hash = (37 * hash) + REVISION_FIELD_NUMBER; - hash = (53 * hash) + getRevision(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.WindowsUpdate.Identity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * The unique identifier of the update.
-     * 
- * - * Protobuf type {@code grafeas.v1.WindowsUpdate.Identity} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.WindowsUpdate.Identity) - io.grafeas.v1.WindowsUpdate.IdentityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.WindowsUpdate.Identity.class, io.grafeas.v1.WindowsUpdate.Identity.Builder.class); - } - - // Construct using io.grafeas.v1.WindowsUpdate.Identity.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - updateId_ = ""; - revision_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Identity getDefaultInstanceForType() { - return io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Identity build() { - io.grafeas.v1.WindowsUpdate.Identity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Identity buildPartial() { - io.grafeas.v1.WindowsUpdate.Identity result = new io.grafeas.v1.WindowsUpdate.Identity(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.WindowsUpdate.Identity result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.updateId_ = updateId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.revision_ = revision_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.WindowsUpdate.Identity) { - return mergeFrom((io.grafeas.v1.WindowsUpdate.Identity)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.WindowsUpdate.Identity other) { - if (other == io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance()) return this; - if (!other.getUpdateId().isEmpty()) { - updateId_ = other.updateId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getRevision() != 0) { - setRevision(other.getRevision()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - updateId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - revision_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object updateId_ = ""; - /** - *
-       * The revision independent identifier of the update.
-       * 
- * - * string update_id = 1; - * @return The updateId. - */ - public java.lang.String getUpdateId() { - java.lang.Object ref = updateId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - updateId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The revision independent identifier of the update.
-       * 
- * - * string update_id = 1; - * @return The bytes for updateId. - */ - public com.google.protobuf.ByteString - getUpdateIdBytes() { - java.lang.Object ref = updateId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - updateId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The revision independent identifier of the update.
-       * 
- * - * string update_id = 1; - * @param value The updateId to set. - * @return This builder for chaining. - */ - public Builder setUpdateId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - updateId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * The revision independent identifier of the update.
-       * 
- * - * string update_id = 1; - * @return This builder for chaining. - */ - public Builder clearUpdateId() { - updateId_ = getDefaultInstance().getUpdateId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * The revision independent identifier of the update.
-       * 
- * - * string update_id = 1; - * @param value The bytes for updateId to set. - * @return This builder for chaining. - */ - public Builder setUpdateIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - updateId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int revision_ ; - /** - *
-       * The revision number of the update.
-       * 
- * - * int32 revision = 2; - * @return The revision. - */ - @java.lang.Override - public int getRevision() { - return revision_; - } - /** - *
-       * The revision number of the update.
-       * 
- * - * int32 revision = 2; - * @param value The revision to set. - * @return This builder for chaining. - */ - public Builder setRevision(int value) { - - revision_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * The revision number of the update.
-       * 
- * - * int32 revision = 2; - * @return This builder for chaining. - */ - public Builder clearRevision() { - bitField0_ = (bitField0_ & ~0x00000002); - revision_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.WindowsUpdate.Identity) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate.Identity) - private static final io.grafeas.v1.WindowsUpdate.Identity DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.WindowsUpdate.Identity(); - } - - public static io.grafeas.v1.WindowsUpdate.Identity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Identity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Identity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface CategoryOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.WindowsUpdate.Category) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The identifier of the category.
-     * 
- * - * string category_id = 1; - * @return The categoryId. - */ - java.lang.String getCategoryId(); - /** - *
-     * The identifier of the category.
-     * 
- * - * string category_id = 1; - * @return The bytes for categoryId. - */ - com.google.protobuf.ByteString - getCategoryIdBytes(); - - /** - *
-     * The localized name of the category.
-     * 
- * - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * The localized name of the category.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - } - /** - *
-   * The category to which the update belongs.
-   * 
- * - * Protobuf type {@code grafeas.v1.WindowsUpdate.Category} - */ - public static final class Category extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grafeas.v1.WindowsUpdate.Category) - CategoryOrBuilder { - private static final long serialVersionUID = 0L; - // Use Category.newBuilder() to construct. - private Category(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Category() { - categoryId_ = ""; - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Category(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.WindowsUpdate.Category.class, io.grafeas.v1.WindowsUpdate.Category.Builder.class); - } - - public static final int CATEGORY_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object categoryId_ = ""; - /** - *
-     * The identifier of the category.
-     * 
- * - * string category_id = 1; - * @return The categoryId. - */ - @java.lang.Override - public java.lang.String getCategoryId() { - java.lang.Object ref = categoryId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - categoryId_ = s; - return s; - } - } - /** - *
-     * The identifier of the category.
-     * 
- * - * string category_id = 1; - * @return The bytes for categoryId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCategoryIdBytes() { - java.lang.Object ref = categoryId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - categoryId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-     * The localized name of the category.
-     * 
- * - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-     * The localized name of the category.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(categoryId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, categoryId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(categoryId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, categoryId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.WindowsUpdate.Category)) { - return super.equals(obj); - } - io.grafeas.v1.WindowsUpdate.Category other = (io.grafeas.v1.WindowsUpdate.Category) obj; - - if (!getCategoryId() - .equals(other.getCategoryId())) return false; - if (!getName() - .equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CATEGORY_ID_FIELD_NUMBER; - hash = (53 * hash) + getCategoryId().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Category parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate.Category parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate.Category parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.WindowsUpdate.Category prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * The category to which the update belongs.
-     * 
- * - * Protobuf type {@code grafeas.v1.WindowsUpdate.Category} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.WindowsUpdate.Category) - io.grafeas.v1.WindowsUpdate.CategoryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.WindowsUpdate.Category.class, io.grafeas.v1.WindowsUpdate.Category.Builder.class); - } - - // Construct using io.grafeas.v1.WindowsUpdate.Category.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - categoryId_ = ""; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Category getDefaultInstanceForType() { - return io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Category build() { - io.grafeas.v1.WindowsUpdate.Category result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Category buildPartial() { - io.grafeas.v1.WindowsUpdate.Category result = new io.grafeas.v1.WindowsUpdate.Category(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.grafeas.v1.WindowsUpdate.Category result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.categoryId_ = categoryId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.WindowsUpdate.Category) { - return mergeFrom((io.grafeas.v1.WindowsUpdate.Category)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.WindowsUpdate.Category other) { - if (other == io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance()) return this; - if (!other.getCategoryId().isEmpty()) { - categoryId_ = other.categoryId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - categoryId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object categoryId_ = ""; - /** - *
-       * The identifier of the category.
-       * 
- * - * string category_id = 1; - * @return The categoryId. - */ - public java.lang.String getCategoryId() { - java.lang.Object ref = categoryId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - categoryId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The identifier of the category.
-       * 
- * - * string category_id = 1; - * @return The bytes for categoryId. - */ - public com.google.protobuf.ByteString - getCategoryIdBytes() { - java.lang.Object ref = categoryId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - categoryId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The identifier of the category.
-       * 
- * - * string category_id = 1; - * @param value The categoryId to set. - * @return This builder for chaining. - */ - public Builder setCategoryId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - categoryId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * The identifier of the category.
-       * 
- * - * string category_id = 1; - * @return This builder for chaining. - */ - public Builder clearCategoryId() { - categoryId_ = getDefaultInstance().getCategoryId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * The identifier of the category.
-       * 
- * - * string category_id = 1; - * @param value The bytes for categoryId to set. - * @return This builder for chaining. - */ - public Builder setCategoryIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - categoryId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-       * The localized name of the category.
-       * 
- * - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The localized name of the category.
-       * 
- * - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The localized name of the category.
-       * 
- * - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-       * The localized name of the category.
-       * 
- * - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-       * The localized name of the category.
-       * 
- * - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.WindowsUpdate.Category) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate.Category) - private static final io.grafeas.v1.WindowsUpdate.Category DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.WindowsUpdate.Category(); - } - - public static io.grafeas.v1.WindowsUpdate.Category getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Category parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Category getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int IDENTITY_FIELD_NUMBER = 1; - private io.grafeas.v1.WindowsUpdate.Identity identity_; - /** - *
-   * Required - The unique identifier for the update.
-   * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @return Whether the identity field is set. - */ - @java.lang.Override - public boolean hasIdentity() { - return identity_ != null; - } - /** - *
-   * Required - The unique identifier for the update.
-   * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @return The identity. - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Identity getIdentity() { - return identity_ == null ? io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; - } - /** - *
-   * Required - The unique identifier for the update.
-   * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.IdentityOrBuilder getIdentityOrBuilder() { - return identity_ == null ? io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; - } - - public static final int TITLE_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; - /** - *
-   * The localized title of the update.
-   * 
- * - * string title = 2; - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } - } - /** - *
-   * The localized title of the update.
-   * 
- * - * string title = 2; - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * The localized description of the update.
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * The localized description of the update.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CATEGORIES_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List categories_; - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - @java.lang.Override - public java.util.List getCategoriesList() { - return categories_; - } - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - @java.lang.Override - public java.util.List - getCategoriesOrBuilderList() { - return categories_; - } - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - @java.lang.Override - public int getCategoriesCount() { - return categories_.size(); - } - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.Category getCategories(int index) { - return categories_.get(index); - } - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - @java.lang.Override - public io.grafeas.v1.WindowsUpdate.CategoryOrBuilder getCategoriesOrBuilder( - int index) { - return categories_.get(index); - } - - public static final int KB_ARTICLE_IDS_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList kbArticleIds_; - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @return A list containing the kbArticleIds. - */ - public com.google.protobuf.ProtocolStringList - getKbArticleIdsList() { - return kbArticleIds_; - } - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @return The count of kbArticleIds. - */ - public int getKbArticleIdsCount() { - return kbArticleIds_.size(); - } - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @param index The index of the element to return. - * @return The kbArticleIds at the given index. - */ - public java.lang.String getKbArticleIds(int index) { - return kbArticleIds_.get(index); - } - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @param index The index of the value to return. - * @return The bytes of the kbArticleIds at the given index. - */ - public com.google.protobuf.ByteString - getKbArticleIdsBytes(int index) { - return kbArticleIds_.getByteString(index); - } - - public static final int SUPPORT_URL_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private volatile java.lang.Object supportUrl_ = ""; - /** - *
-   * The hyperlink to the support information for the update.
-   * 
- * - * string support_url = 6; - * @return The supportUrl. - */ - @java.lang.Override - public java.lang.String getSupportUrl() { - java.lang.Object ref = supportUrl_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - supportUrl_ = s; - return s; - } - } - /** - *
-   * The hyperlink to the support information for the update.
-   * 
- * - * string support_url = 6; - * @return The bytes for supportUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSupportUrlBytes() { - java.lang.Object ref = supportUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - supportUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LAST_PUBLISHED_TIMESTAMP_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp lastPublishedTimestamp_; - /** - *
-   * The last published timestamp of the update.
-   * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - * @return Whether the lastPublishedTimestamp field is set. - */ - @java.lang.Override - public boolean hasLastPublishedTimestamp() { - return lastPublishedTimestamp_ != null; - } - /** - *
-   * The last published timestamp of the update.
-   * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - * @return The lastPublishedTimestamp. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLastPublishedTimestamp() { - return lastPublishedTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; - } - /** - *
-   * The last published timestamp of the update.
-   * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLastPublishedTimestampOrBuilder() { - return lastPublishedTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (identity_ != null) { - output.writeMessage(1, getIdentity()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - for (int i = 0; i < categories_.size(); i++) { - output.writeMessage(4, categories_.get(i)); - } - for (int i = 0; i < kbArticleIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, kbArticleIds_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(supportUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, supportUrl_); - } - if (lastPublishedTimestamp_ != null) { - output.writeMessage(7, getLastPublishedTimestamp()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (identity_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getIdentity()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - for (int i = 0; i < categories_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, categories_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < kbArticleIds_.size(); i++) { - dataSize += computeStringSizeNoTag(kbArticleIds_.getRaw(i)); - } - size += dataSize; - size += 1 * getKbArticleIdsList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(supportUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, supportUrl_); - } - if (lastPublishedTimestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getLastPublishedTimestamp()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.WindowsUpdate)) { - return super.equals(obj); - } - io.grafeas.v1.WindowsUpdate other = (io.grafeas.v1.WindowsUpdate) obj; - - if (hasIdentity() != other.hasIdentity()) return false; - if (hasIdentity()) { - if (!getIdentity() - .equals(other.getIdentity())) return false; - } - if (!getTitle() - .equals(other.getTitle())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getCategoriesList() - .equals(other.getCategoriesList())) return false; - if (!getKbArticleIdsList() - .equals(other.getKbArticleIdsList())) return false; - if (!getSupportUrl() - .equals(other.getSupportUrl())) return false; - if (hasLastPublishedTimestamp() != other.hasLastPublishedTimestamp()) return false; - if (hasLastPublishedTimestamp()) { - if (!getLastPublishedTimestamp() - .equals(other.getLastPublishedTimestamp())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasIdentity()) { - hash = (37 * hash) + IDENTITY_FIELD_NUMBER; - hash = (53 * hash) + getIdentity().hashCode(); - } - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (getCategoriesCount() > 0) { - hash = (37 * hash) + CATEGORIES_FIELD_NUMBER; - hash = (53 * hash) + getCategoriesList().hashCode(); - } - if (getKbArticleIdsCount() > 0) { - hash = (37 * hash) + KB_ARTICLE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getKbArticleIdsList().hashCode(); - } - hash = (37 * hash) + SUPPORT_URL_FIELD_NUMBER; - hash = (53 * hash) + getSupportUrl().hashCode(); - if (hasLastPublishedTimestamp()) { - hash = (37 * hash) + LAST_PUBLISHED_TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getLastPublishedTimestamp().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grafeas.v1.WindowsUpdate parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grafeas.v1.WindowsUpdate parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.grafeas.v1.WindowsUpdate parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grafeas.v1.WindowsUpdate parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.grafeas.v1.WindowsUpdate prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Windows Update represents the metadata about the update for the Windows
-   * operating system. The fields in this message come from the Windows Update API
-   * documented at
-   * https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate.
-   * 
- * - * Protobuf type {@code grafeas.v1.WindowsUpdate} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grafeas.v1.WindowsUpdate) - io.grafeas.v1.WindowsUpdateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grafeas.v1.WindowsUpdate.class, io.grafeas.v1.WindowsUpdate.Builder.class); - } - - // Construct using io.grafeas.v1.WindowsUpdate.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - identity_ = null; - if (identityBuilder_ != null) { - identityBuilder_.dispose(); - identityBuilder_ = null; - } - title_ = ""; - description_ = ""; - if (categoriesBuilder_ == null) { - categories_ = java.util.Collections.emptyList(); - } else { - categories_ = null; - categoriesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - supportUrl_ = ""; - lastPublishedTimestamp_ = null; - if (lastPublishedTimestampBuilder_ != null) { - lastPublishedTimestampBuilder_.dispose(); - lastPublishedTimestampBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_descriptor; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate getDefaultInstanceForType() { - return io.grafeas.v1.WindowsUpdate.getDefaultInstance(); - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate build() { - io.grafeas.v1.WindowsUpdate result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate buildPartial() { - io.grafeas.v1.WindowsUpdate result = new io.grafeas.v1.WindowsUpdate(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.grafeas.v1.WindowsUpdate result) { - if (categoriesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - categories_ = java.util.Collections.unmodifiableList(categories_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.categories_ = categories_; - } else { - result.categories_ = categoriesBuilder_.build(); - } - if (((bitField0_ & 0x00000010) != 0)) { - kbArticleIds_ = kbArticleIds_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.kbArticleIds_ = kbArticleIds_; - } - - private void buildPartial0(io.grafeas.v1.WindowsUpdate result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.identity_ = identityBuilder_ == null - ? identity_ - : identityBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.title_ = title_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.supportUrl_ = supportUrl_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.lastPublishedTimestamp_ = lastPublishedTimestampBuilder_ == null - ? lastPublishedTimestamp_ - : lastPublishedTimestampBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.grafeas.v1.WindowsUpdate) { - return mergeFrom((io.grafeas.v1.WindowsUpdate)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grafeas.v1.WindowsUpdate other) { - if (other == io.grafeas.v1.WindowsUpdate.getDefaultInstance()) return this; - if (other.hasIdentity()) { - mergeIdentity(other.getIdentity()); - } - if (!other.getTitle().isEmpty()) { - title_ = other.title_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (categoriesBuilder_ == null) { - if (!other.categories_.isEmpty()) { - if (categories_.isEmpty()) { - categories_ = other.categories_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureCategoriesIsMutable(); - categories_.addAll(other.categories_); - } - onChanged(); - } - } else { - if (!other.categories_.isEmpty()) { - if (categoriesBuilder_.isEmpty()) { - categoriesBuilder_.dispose(); - categoriesBuilder_ = null; - categories_ = other.categories_; - bitField0_ = (bitField0_ & ~0x00000008); - categoriesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getCategoriesFieldBuilder() : null; - } else { - categoriesBuilder_.addAllMessages(other.categories_); - } - } - } - if (!other.kbArticleIds_.isEmpty()) { - if (kbArticleIds_.isEmpty()) { - kbArticleIds_ = other.kbArticleIds_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureKbArticleIdsIsMutable(); - kbArticleIds_.addAll(other.kbArticleIds_); - } - onChanged(); - } - if (!other.getSupportUrl().isEmpty()) { - supportUrl_ = other.supportUrl_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (other.hasLastPublishedTimestamp()) { - mergeLastPublishedTimestamp(other.getLastPublishedTimestamp()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getIdentityFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - io.grafeas.v1.WindowsUpdate.Category m = - input.readMessage( - io.grafeas.v1.WindowsUpdate.Category.parser(), - extensionRegistry); - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - categories_.add(m); - } else { - categoriesBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - ensureKbArticleIdsIsMutable(); - kbArticleIds_.add(s); - break; - } // case 42 - case 50: { - supportUrl_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - input.readMessage( - getLastPublishedTimestampFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.grafeas.v1.WindowsUpdate.Identity identity_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate.Identity, io.grafeas.v1.WindowsUpdate.Identity.Builder, io.grafeas.v1.WindowsUpdate.IdentityOrBuilder> identityBuilder_; - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @return Whether the identity field is set. - */ - public boolean hasIdentity() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @return The identity. - */ - public io.grafeas.v1.WindowsUpdate.Identity getIdentity() { - if (identityBuilder_ == null) { - return identity_ == null ? io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; - } else { - return identityBuilder_.getMessage(); - } - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - public Builder setIdentity(io.grafeas.v1.WindowsUpdate.Identity value) { - if (identityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - identity_ = value; - } else { - identityBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - public Builder setIdentity( - io.grafeas.v1.WindowsUpdate.Identity.Builder builderForValue) { - if (identityBuilder_ == null) { - identity_ = builderForValue.build(); - } else { - identityBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - public Builder mergeIdentity(io.grafeas.v1.WindowsUpdate.Identity value) { - if (identityBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - identity_ != null && - identity_ != io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance()) { - getIdentityBuilder().mergeFrom(value); - } else { - identity_ = value; - } - } else { - identityBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - public Builder clearIdentity() { - bitField0_ = (bitField0_ & ~0x00000001); - identity_ = null; - if (identityBuilder_ != null) { - identityBuilder_.dispose(); - identityBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - public io.grafeas.v1.WindowsUpdate.Identity.Builder getIdentityBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getIdentityFieldBuilder().getBuilder(); - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - public io.grafeas.v1.WindowsUpdate.IdentityOrBuilder getIdentityOrBuilder() { - if (identityBuilder_ != null) { - return identityBuilder_.getMessageOrBuilder(); - } else { - return identity_ == null ? - io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() : identity_; - } - } - /** - *
-     * Required - The unique identifier for the update.
-     * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate.Identity, io.grafeas.v1.WindowsUpdate.Identity.Builder, io.grafeas.v1.WindowsUpdate.IdentityOrBuilder> - getIdentityFieldBuilder() { - if (identityBuilder_ == null) { - identityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.WindowsUpdate.Identity, io.grafeas.v1.WindowsUpdate.Identity.Builder, io.grafeas.v1.WindowsUpdate.IdentityOrBuilder>( - getIdentity(), - getParentForChildren(), - isClean()); - identity_ = null; - } - return identityBuilder_; - } - - private java.lang.Object title_ = ""; - /** - *
-     * The localized title of the update.
-     * 
- * - * string title = 2; - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The localized title of the update.
-     * 
- * - * string title = 2; - * @return The bytes for title. - */ - public com.google.protobuf.ByteString - getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The localized title of the update.
-     * 
- * - * string title = 2; - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - title_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The localized title of the update.
-     * 
- * - * string title = 2; - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The localized title of the update.
-     * 
- * - * string title = 2; - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * The localized description of the update.
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The localized description of the update.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The localized description of the update.
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The localized description of the update.
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The localized description of the update.
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.util.List categories_ = - java.util.Collections.emptyList(); - private void ensureCategoriesIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - categories_ = new java.util.ArrayList(categories_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.WindowsUpdate.Category, io.grafeas.v1.WindowsUpdate.Category.Builder, io.grafeas.v1.WindowsUpdate.CategoryOrBuilder> categoriesBuilder_; - - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public java.util.List getCategoriesList() { - if (categoriesBuilder_ == null) { - return java.util.Collections.unmodifiableList(categories_); - } else { - return categoriesBuilder_.getMessageList(); - } - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public int getCategoriesCount() { - if (categoriesBuilder_ == null) { - return categories_.size(); - } else { - return categoriesBuilder_.getCount(); - } - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public io.grafeas.v1.WindowsUpdate.Category getCategories(int index) { - if (categoriesBuilder_ == null) { - return categories_.get(index); - } else { - return categoriesBuilder_.getMessage(index); - } - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder setCategories( - int index, io.grafeas.v1.WindowsUpdate.Category value) { - if (categoriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCategoriesIsMutable(); - categories_.set(index, value); - onChanged(); - } else { - categoriesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder setCategories( - int index, io.grafeas.v1.WindowsUpdate.Category.Builder builderForValue) { - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - categories_.set(index, builderForValue.build()); - onChanged(); - } else { - categoriesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder addCategories(io.grafeas.v1.WindowsUpdate.Category value) { - if (categoriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCategoriesIsMutable(); - categories_.add(value); - onChanged(); - } else { - categoriesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder addCategories( - int index, io.grafeas.v1.WindowsUpdate.Category value) { - if (categoriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCategoriesIsMutable(); - categories_.add(index, value); - onChanged(); - } else { - categoriesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder addCategories( - io.grafeas.v1.WindowsUpdate.Category.Builder builderForValue) { - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - categories_.add(builderForValue.build()); - onChanged(); - } else { - categoriesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder addCategories( - int index, io.grafeas.v1.WindowsUpdate.Category.Builder builderForValue) { - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - categories_.add(index, builderForValue.build()); - onChanged(); - } else { - categoriesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder addAllCategories( - java.lang.Iterable values) { - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, categories_); - onChanged(); - } else { - categoriesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder clearCategories() { - if (categoriesBuilder_ == null) { - categories_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - categoriesBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public Builder removeCategories(int index) { - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - categories_.remove(index); - onChanged(); - } else { - categoriesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public io.grafeas.v1.WindowsUpdate.Category.Builder getCategoriesBuilder( - int index) { - return getCategoriesFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public io.grafeas.v1.WindowsUpdate.CategoryOrBuilder getCategoriesOrBuilder( - int index) { - if (categoriesBuilder_ == null) { - return categories_.get(index); } else { - return categoriesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public java.util.List - getCategoriesOrBuilderList() { - if (categoriesBuilder_ != null) { - return categoriesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(categories_); - } - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public io.grafeas.v1.WindowsUpdate.Category.Builder addCategoriesBuilder() { - return getCategoriesFieldBuilder().addBuilder( - io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance()); - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public io.grafeas.v1.WindowsUpdate.Category.Builder addCategoriesBuilder( - int index) { - return getCategoriesFieldBuilder().addBuilder( - index, io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance()); - } - /** - *
-     * The list of categories to which the update belongs.
-     * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - public java.util.List - getCategoriesBuilderList() { - return getCategoriesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.WindowsUpdate.Category, io.grafeas.v1.WindowsUpdate.Category.Builder, io.grafeas.v1.WindowsUpdate.CategoryOrBuilder> - getCategoriesFieldBuilder() { - if (categoriesBuilder_ == null) { - categoriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.WindowsUpdate.Category, io.grafeas.v1.WindowsUpdate.Category.Builder, io.grafeas.v1.WindowsUpdate.CategoryOrBuilder>( - categories_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - categories_ = null; - } - return categoriesBuilder_; - } - - private com.google.protobuf.LazyStringList kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureKbArticleIdsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - kbArticleIds_ = new com.google.protobuf.LazyStringArrayList(kbArticleIds_); - bitField0_ |= 0x00000010; - } - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @return A list containing the kbArticleIds. - */ - public com.google.protobuf.ProtocolStringList - getKbArticleIdsList() { - return kbArticleIds_.getUnmodifiableView(); - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @return The count of kbArticleIds. - */ - public int getKbArticleIdsCount() { - return kbArticleIds_.size(); - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @param index The index of the element to return. - * @return The kbArticleIds at the given index. - */ - public java.lang.String getKbArticleIds(int index) { - return kbArticleIds_.get(index); - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @param index The index of the value to return. - * @return The bytes of the kbArticleIds at the given index. - */ - public com.google.protobuf.ByteString - getKbArticleIdsBytes(int index) { - return kbArticleIds_.getByteString(index); - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @param index The index to set the value at. - * @param value The kbArticleIds to set. - * @return This builder for chaining. - */ - public Builder setKbArticleIds( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureKbArticleIdsIsMutable(); - kbArticleIds_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @param value The kbArticleIds to add. - * @return This builder for chaining. - */ - public Builder addKbArticleIds( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureKbArticleIdsIsMutable(); - kbArticleIds_.add(value); - onChanged(); - return this; - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @param values The kbArticleIds to add. - * @return This builder for chaining. - */ - public Builder addAllKbArticleIds( - java.lang.Iterable values) { - ensureKbArticleIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kbArticleIds_); - onChanged(); - return this; - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @return This builder for chaining. - */ - public Builder clearKbArticleIds() { - kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * The Microsoft Knowledge Base article IDs that are associated with the
-     * update.
-     * 
- * - * repeated string kb_article_ids = 5; - * @param value The bytes of the kbArticleIds to add. - * @return This builder for chaining. - */ - public Builder addKbArticleIdsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureKbArticleIdsIsMutable(); - kbArticleIds_.add(value); - onChanged(); - return this; - } - - private java.lang.Object supportUrl_ = ""; - /** - *
-     * The hyperlink to the support information for the update.
-     * 
- * - * string support_url = 6; - * @return The supportUrl. - */ - public java.lang.String getSupportUrl() { - java.lang.Object ref = supportUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - supportUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The hyperlink to the support information for the update.
-     * 
- * - * string support_url = 6; - * @return The bytes for supportUrl. - */ - public com.google.protobuf.ByteString - getSupportUrlBytes() { - java.lang.Object ref = supportUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - supportUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The hyperlink to the support information for the update.
-     * 
- * - * string support_url = 6; - * @param value The supportUrl to set. - * @return This builder for chaining. - */ - public Builder setSupportUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - supportUrl_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The hyperlink to the support information for the update.
-     * 
- * - * string support_url = 6; - * @return This builder for chaining. - */ - public Builder clearSupportUrl() { - supportUrl_ = getDefaultInstance().getSupportUrl(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * The hyperlink to the support information for the update.
-     * 
- * - * string support_url = 6; - * @param value The bytes for supportUrl to set. - * @return This builder for chaining. - */ - public Builder setSupportUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - supportUrl_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp lastPublishedTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastPublishedTimestampBuilder_; - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - * @return Whether the lastPublishedTimestamp field is set. - */ - public boolean hasLastPublishedTimestamp() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - * @return The lastPublishedTimestamp. - */ - public com.google.protobuf.Timestamp getLastPublishedTimestamp() { - if (lastPublishedTimestampBuilder_ == null) { - return lastPublishedTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; - } else { - return lastPublishedTimestampBuilder_.getMessage(); - } - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - public Builder setLastPublishedTimestamp(com.google.protobuf.Timestamp value) { - if (lastPublishedTimestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lastPublishedTimestamp_ = value; - } else { - lastPublishedTimestampBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - public Builder setLastPublishedTimestamp( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (lastPublishedTimestampBuilder_ == null) { - lastPublishedTimestamp_ = builderForValue.build(); - } else { - lastPublishedTimestampBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - public Builder mergeLastPublishedTimestamp(com.google.protobuf.Timestamp value) { - if (lastPublishedTimestampBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - lastPublishedTimestamp_ != null && - lastPublishedTimestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getLastPublishedTimestampBuilder().mergeFrom(value); - } else { - lastPublishedTimestamp_ = value; - } - } else { - lastPublishedTimestampBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - public Builder clearLastPublishedTimestamp() { - bitField0_ = (bitField0_ & ~0x00000040); - lastPublishedTimestamp_ = null; - if (lastPublishedTimestampBuilder_ != null) { - lastPublishedTimestampBuilder_.dispose(); - lastPublishedTimestampBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - public com.google.protobuf.Timestamp.Builder getLastPublishedTimestampBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getLastPublishedTimestampFieldBuilder().getBuilder(); - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - public com.google.protobuf.TimestampOrBuilder getLastPublishedTimestampOrBuilder() { - if (lastPublishedTimestampBuilder_ != null) { - return lastPublishedTimestampBuilder_.getMessageOrBuilder(); - } else { - return lastPublishedTimestamp_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : lastPublishedTimestamp_; - } - } - /** - *
-     * The last published timestamp of the update.
-     * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getLastPublishedTimestampFieldBuilder() { - if (lastPublishedTimestampBuilder_ == null) { - lastPublishedTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getLastPublishedTimestamp(), - getParentForChildren(), - isClean()); - lastPublishedTimestamp_ = null; - } - return lastPublishedTimestampBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grafeas.v1.WindowsUpdate) - } - - // @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate) - private static final io.grafeas.v1.WindowsUpdate DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grafeas.v1.WindowsUpdate(); - } - - public static io.grafeas.v1.WindowsUpdate getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WindowsUpdate parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.grafeas.v1.WindowsUpdate getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java deleted file mode 100644 index 730df0265e64..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java +++ /dev/null @@ -1,212 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grafeas/v1/upgrade.proto - -package io.grafeas.v1; - -public interface WindowsUpdateOrBuilder extends - // @@protoc_insertion_point(interface_extends:grafeas.v1.WindowsUpdate) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required - The unique identifier for the update.
-   * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @return Whether the identity field is set. - */ - boolean hasIdentity(); - /** - *
-   * Required - The unique identifier for the update.
-   * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @return The identity. - */ - io.grafeas.v1.WindowsUpdate.Identity getIdentity(); - /** - *
-   * Required - The unique identifier for the update.
-   * 
- * - * .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - io.grafeas.v1.WindowsUpdate.IdentityOrBuilder getIdentityOrBuilder(); - - /** - *
-   * The localized title of the update.
-   * 
- * - * string title = 2; - * @return The title. - */ - java.lang.String getTitle(); - /** - *
-   * The localized title of the update.
-   * 
- * - * string title = 2; - * @return The bytes for title. - */ - com.google.protobuf.ByteString - getTitleBytes(); - - /** - *
-   * The localized description of the update.
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * The localized description of the update.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - java.util.List - getCategoriesList(); - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - io.grafeas.v1.WindowsUpdate.Category getCategories(int index); - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - int getCategoriesCount(); - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - java.util.List - getCategoriesOrBuilderList(); - /** - *
-   * The list of categories to which the update belongs.
-   * 
- * - * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - io.grafeas.v1.WindowsUpdate.CategoryOrBuilder getCategoriesOrBuilder( - int index); - - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @return A list containing the kbArticleIds. - */ - java.util.List - getKbArticleIdsList(); - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @return The count of kbArticleIds. - */ - int getKbArticleIdsCount(); - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @param index The index of the element to return. - * @return The kbArticleIds at the given index. - */ - java.lang.String getKbArticleIds(int index); - /** - *
-   * The Microsoft Knowledge Base article IDs that are associated with the
-   * update.
-   * 
- * - * repeated string kb_article_ids = 5; - * @param index The index of the value to return. - * @return The bytes of the kbArticleIds at the given index. - */ - com.google.protobuf.ByteString - getKbArticleIdsBytes(int index); - - /** - *
-   * The hyperlink to the support information for the update.
-   * 
- * - * string support_url = 6; - * @return The supportUrl. - */ - java.lang.String getSupportUrl(); - /** - *
-   * The hyperlink to the support information for the update.
-   * 
- * - * string support_url = 6; - * @return The bytes for supportUrl. - */ - com.google.protobuf.ByteString - getSupportUrlBytes(); - - /** - *
-   * The last published timestamp of the update.
-   * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - * @return Whether the lastPublishedTimestamp field is set. - */ - boolean hasLastPublishedTimestamp(); - /** - *
-   * The last published timestamp of the update.
-   * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - * @return The lastPublishedTimestamp. - */ - com.google.protobuf.Timestamp getLastPublishedTimestamp(); - /** - *
-   * The last published timestamp of the update.
-   * 
- * - * .google.protobuf.Timestamp last_published_timestamp = 7; - */ - com.google.protobuf.TimestampOrBuilder getLastPublishedTimestampOrBuilder(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json deleted file mode 100644 index 2fad5f7d0feb..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/gapic_metadata.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "grafeas.v1", - "libraryPackage": "io.grafeas.v1", - "services": { - "Grafeas": { - "clients": { - "grpc": { - "libraryClient": "GrafeasClient", - "rpcs": { - "BatchCreateNotes": { - "methods": ["batchCreateNotes", "batchCreateNotes", "batchCreateNotes", "batchCreateNotesCallable"] - }, - "BatchCreateOccurrences": { - "methods": ["batchCreateOccurrences", "batchCreateOccurrences", "batchCreateOccurrences", "batchCreateOccurrencesCallable"] - }, - "CreateNote": { - "methods": ["createNote", "createNote", "createNote", "createNoteCallable"] - }, - "CreateOccurrence": { - "methods": ["createOccurrence", "createOccurrence", "createOccurrence", "createOccurrenceCallable"] - }, - "DeleteNote": { - "methods": ["deleteNote", "deleteNote", "deleteNote", "deleteNoteCallable"] - }, - "DeleteOccurrence": { - "methods": ["deleteOccurrence", "deleteOccurrence", "deleteOccurrence", "deleteOccurrenceCallable"] - }, - "GetNote": { - "methods": ["getNote", "getNote", "getNote", "getNoteCallable"] - }, - "GetOccurrence": { - "methods": ["getOccurrence", "getOccurrence", "getOccurrence", "getOccurrenceCallable"] - }, - "GetOccurrenceNote": { - "methods": ["getOccurrenceNote", "getOccurrenceNote", "getOccurrenceNote", "getOccurrenceNoteCallable"] - }, - "ListNoteOccurrences": { - "methods": ["listNoteOccurrences", "listNoteOccurrences", "listNoteOccurrences", "listNoteOccurrencesPagedCallable", "listNoteOccurrencesCallable"] - }, - "ListNotes": { - "methods": ["listNotes", "listNotes", "listNotes", "listNotesPagedCallable", "listNotesCallable"] - }, - "ListOccurrences": { - "methods": ["listOccurrences", "listOccurrences", "listOccurrences", "listOccurrencesPagedCallable", "listOccurrencesCallable"] - }, - "UpdateNote": { - "methods": ["updateNote", "updateNote", "updateNote", "updateNoteCallable"] - }, - "UpdateOccurrence": { - "methods": ["updateOccurrence", "updateOccurrence", "updateOccurrence", "updateOccurrenceCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java deleted file mode 100644 index 925587289f71..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/package-info.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A client to Container Analysis API - * - *

The interfaces provided are listed below, along with usage samples. - * - *

======================= GrafeasClient ======================= - * - *

Service Description: [Grafeas](https://grafeas.io) API. - * - *

Retrieves analysis results of Cloud components such as Docker container images. - * - *

Analysis results are stored as a series of occurrences. An `Occurrence` contains information - * about a specific analysis instance on a resource. An occurrence refers to a `Note`. A note - * contains details describing the analysis and is generally stored in a separate project, called a - * `Provider`. Multiple occurrences can refer to the same note. - * - *

For example, an SSL vulnerability could affect multiple images. In this case, there would be - * one note for the vulnerability and an occurrence for each image with the vulnerability referring - * to that note. - * - *

Sample for GrafeasClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
- *   OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
- *   Occurrence response = grafeasClient.getOccurrence(name);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package io.grafeas.v1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java deleted file mode 100644 index 671d1b9faa7c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStub.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1.stub; - -import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.protobuf.Empty; -import io.grafeas.v1.BatchCreateNotesRequest; -import io.grafeas.v1.BatchCreateNotesResponse; -import io.grafeas.v1.BatchCreateOccurrencesRequest; -import io.grafeas.v1.BatchCreateOccurrencesResponse; -import io.grafeas.v1.CreateNoteRequest; -import io.grafeas.v1.CreateOccurrenceRequest; -import io.grafeas.v1.DeleteNoteRequest; -import io.grafeas.v1.DeleteOccurrenceRequest; -import io.grafeas.v1.GetNoteRequest; -import io.grafeas.v1.GetOccurrenceNoteRequest; -import io.grafeas.v1.GetOccurrenceRequest; -import io.grafeas.v1.ListNoteOccurrencesRequest; -import io.grafeas.v1.ListNoteOccurrencesResponse; -import io.grafeas.v1.ListNotesRequest; -import io.grafeas.v1.ListNotesResponse; -import io.grafeas.v1.ListOccurrencesRequest; -import io.grafeas.v1.ListOccurrencesResponse; -import io.grafeas.v1.Note; -import io.grafeas.v1.Occurrence; -import io.grafeas.v1.UpdateNoteRequest; -import io.grafeas.v1.UpdateOccurrenceRequest; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the Grafeas service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class GrafeasStub implements BackgroundResource { - - public UnaryCallable getOccurrenceCallable() { - throw new UnsupportedOperationException("Not implemented: getOccurrenceCallable()"); - } - - public UnaryCallable - listOccurrencesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listOccurrencesPagedCallable()"); - } - - public UnaryCallable listOccurrencesCallable() { - throw new UnsupportedOperationException("Not implemented: listOccurrencesCallable()"); - } - - public UnaryCallable deleteOccurrenceCallable() { - throw new UnsupportedOperationException("Not implemented: deleteOccurrenceCallable()"); - } - - public UnaryCallable createOccurrenceCallable() { - throw new UnsupportedOperationException("Not implemented: createOccurrenceCallable()"); - } - - public UnaryCallable - batchCreateOccurrencesCallable() { - throw new UnsupportedOperationException("Not implemented: batchCreateOccurrencesCallable()"); - } - - public UnaryCallable updateOccurrenceCallable() { - throw new UnsupportedOperationException("Not implemented: updateOccurrenceCallable()"); - } - - public UnaryCallable getOccurrenceNoteCallable() { - throw new UnsupportedOperationException("Not implemented: getOccurrenceNoteCallable()"); - } - - public UnaryCallable getNoteCallable() { - throw new UnsupportedOperationException("Not implemented: getNoteCallable()"); - } - - public UnaryCallable listNotesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listNotesPagedCallable()"); - } - - public UnaryCallable listNotesCallable() { - throw new UnsupportedOperationException("Not implemented: listNotesCallable()"); - } - - public UnaryCallable deleteNoteCallable() { - throw new UnsupportedOperationException("Not implemented: deleteNoteCallable()"); - } - - public UnaryCallable createNoteCallable() { - throw new UnsupportedOperationException("Not implemented: createNoteCallable()"); - } - - public UnaryCallable - batchCreateNotesCallable() { - throw new UnsupportedOperationException("Not implemented: batchCreateNotesCallable()"); - } - - public UnaryCallable updateNoteCallable() { - throw new UnsupportedOperationException("Not implemented: updateNoteCallable()"); - } - - public UnaryCallable - listNoteOccurrencesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listNoteOccurrencesPagedCallable()"); - } - - public UnaryCallable - listNoteOccurrencesCallable() { - throw new UnsupportedOperationException("Not implemented: listNoteOccurrencesCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java deleted file mode 100644 index e240f1e74096..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java +++ /dev/null @@ -1,819 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1.stub; - -import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.protobuf.Empty; -import io.grafeas.v1.BatchCreateNotesRequest; -import io.grafeas.v1.BatchCreateNotesResponse; -import io.grafeas.v1.BatchCreateOccurrencesRequest; -import io.grafeas.v1.BatchCreateOccurrencesResponse; -import io.grafeas.v1.CreateNoteRequest; -import io.grafeas.v1.CreateOccurrenceRequest; -import io.grafeas.v1.DeleteNoteRequest; -import io.grafeas.v1.DeleteOccurrenceRequest; -import io.grafeas.v1.GetNoteRequest; -import io.grafeas.v1.GetOccurrenceNoteRequest; -import io.grafeas.v1.GetOccurrenceRequest; -import io.grafeas.v1.ListNoteOccurrencesRequest; -import io.grafeas.v1.ListNoteOccurrencesResponse; -import io.grafeas.v1.ListNotesRequest; -import io.grafeas.v1.ListNotesResponse; -import io.grafeas.v1.ListOccurrencesRequest; -import io.grafeas.v1.ListOccurrencesResponse; -import io.grafeas.v1.Note; -import io.grafeas.v1.Occurrence; -import io.grafeas.v1.UpdateNoteRequest; -import io.grafeas.v1.UpdateOccurrenceRequest; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link GrafeasStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (containeranalysis.googleapis.com) and default port (443) are - * used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of getOccurrence to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GrafeasStubSettings.Builder grafeasSettingsBuilder = GrafeasStubSettings.newBuilder();
- * grafeasSettingsBuilder
- *     .getOccurrenceSettings()
- *     .setRetrySettings(
- *         grafeasSettingsBuilder
- *             .getOccurrenceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * GrafeasStubSettings grafeasSettings = grafeasSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class GrafeasStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().build(); - - private final UnaryCallSettings getOccurrenceSettings; - private final PagedCallSettings< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> - listOccurrencesSettings; - private final UnaryCallSettings deleteOccurrenceSettings; - private final UnaryCallSettings createOccurrenceSettings; - private final UnaryCallSettings - batchCreateOccurrencesSettings; - private final UnaryCallSettings updateOccurrenceSettings; - private final UnaryCallSettings getOccurrenceNoteSettings; - private final UnaryCallSettings getNoteSettings; - private final PagedCallSettings - listNotesSettings; - private final UnaryCallSettings deleteNoteSettings; - private final UnaryCallSettings createNoteSettings; - private final UnaryCallSettings - batchCreateNotesSettings; - private final UnaryCallSettings updateNoteSettings; - private final PagedCallSettings< - ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> - listNoteOccurrencesSettings; - - private static final PagedListDescriptor< - ListOccurrencesRequest, ListOccurrencesResponse, Occurrence> - LIST_OCCURRENCES_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListOccurrencesRequest injectToken( - ListOccurrencesRequest payload, String token) { - return ListOccurrencesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListOccurrencesRequest injectPageSize( - ListOccurrencesRequest payload, int pageSize) { - return ListOccurrencesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListOccurrencesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListOccurrencesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListOccurrencesResponse payload) { - return payload.getOccurrencesList() == null - ? ImmutableList.of() - : payload.getOccurrencesList(); - } - }; - - private static final PagedListDescriptor - LIST_NOTES_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListNotesRequest injectToken(ListNotesRequest payload, String token) { - return ListNotesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListNotesRequest injectPageSize(ListNotesRequest payload, int pageSize) { - return ListNotesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListNotesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListNotesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListNotesResponse payload) { - return payload.getNotesList() == null - ? ImmutableList.of() - : payload.getNotesList(); - } - }; - - private static final PagedListDescriptor< - ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, Occurrence> - LIST_NOTE_OCCURRENCES_PAGE_STR_DESC = - new PagedListDescriptor< - ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, Occurrence>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListNoteOccurrencesRequest injectToken( - ListNoteOccurrencesRequest payload, String token) { - return ListNoteOccurrencesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListNoteOccurrencesRequest injectPageSize( - ListNoteOccurrencesRequest payload, int pageSize) { - return ListNoteOccurrencesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListNoteOccurrencesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListNoteOccurrencesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListNoteOccurrencesResponse payload) { - return payload.getOccurrencesList() == null - ? ImmutableList.of() - : payload.getOccurrencesList(); - } - }; - - private static final PagedListResponseFactory< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> - LIST_OCCURRENCES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListOccurrencesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_OCCURRENCES_PAGE_STR_DESC, request, context); - return ListOccurrencesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListNotesRequest, ListNotesResponse, ListNotesPagedResponse> - LIST_NOTES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListNotesRequest, ListNotesResponse, ListNotesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListNotesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_NOTES_PAGE_STR_DESC, request, context); - return ListNotesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> - LIST_NOTE_OCCURRENCES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListNoteOccurrencesRequest, - ListNoteOccurrencesResponse, - ListNoteOccurrencesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListNoteOccurrencesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_NOTE_OCCURRENCES_PAGE_STR_DESC, request, context); - return ListNoteOccurrencesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to getOccurrence. */ - public UnaryCallSettings getOccurrenceSettings() { - return getOccurrenceSettings; - } - - /** Returns the object with the settings used for calls to listOccurrences. */ - public PagedCallSettings< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> - listOccurrencesSettings() { - return listOccurrencesSettings; - } - - /** Returns the object with the settings used for calls to deleteOccurrence. */ - public UnaryCallSettings deleteOccurrenceSettings() { - return deleteOccurrenceSettings; - } - - /** Returns the object with the settings used for calls to createOccurrence. */ - public UnaryCallSettings createOccurrenceSettings() { - return createOccurrenceSettings; - } - - /** Returns the object with the settings used for calls to batchCreateOccurrences. */ - public UnaryCallSettings - batchCreateOccurrencesSettings() { - return batchCreateOccurrencesSettings; - } - - /** Returns the object with the settings used for calls to updateOccurrence. */ - public UnaryCallSettings updateOccurrenceSettings() { - return updateOccurrenceSettings; - } - - /** Returns the object with the settings used for calls to getOccurrenceNote. */ - public UnaryCallSettings getOccurrenceNoteSettings() { - return getOccurrenceNoteSettings; - } - - /** Returns the object with the settings used for calls to getNote. */ - public UnaryCallSettings getNoteSettings() { - return getNoteSettings; - } - - /** Returns the object with the settings used for calls to listNotes. */ - public PagedCallSettings - listNotesSettings() { - return listNotesSettings; - } - - /** Returns the object with the settings used for calls to deleteNote. */ - public UnaryCallSettings deleteNoteSettings() { - return deleteNoteSettings; - } - - /** Returns the object with the settings used for calls to createNote. */ - public UnaryCallSettings createNoteSettings() { - return createNoteSettings; - } - - /** Returns the object with the settings used for calls to batchCreateNotes. */ - public UnaryCallSettings - batchCreateNotesSettings() { - return batchCreateNotesSettings; - } - - /** Returns the object with the settings used for calls to updateNote. */ - public UnaryCallSettings updateNoteSettings() { - return updateNoteSettings; - } - - /** Returns the object with the settings used for calls to listNoteOccurrences. */ - public PagedCallSettings< - ListNoteOccurrencesRequest, ListNoteOccurrencesResponse, ListNoteOccurrencesPagedResponse> - listNoteOccurrencesSettings() { - return listNoteOccurrencesSettings; - } - - public GrafeasStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcGrafeasStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "containeranalysis.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "containeranalysis.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(GrafeasStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected GrafeasStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - getOccurrenceSettings = settingsBuilder.getOccurrenceSettings().build(); - listOccurrencesSettings = settingsBuilder.listOccurrencesSettings().build(); - deleteOccurrenceSettings = settingsBuilder.deleteOccurrenceSettings().build(); - createOccurrenceSettings = settingsBuilder.createOccurrenceSettings().build(); - batchCreateOccurrencesSettings = settingsBuilder.batchCreateOccurrencesSettings().build(); - updateOccurrenceSettings = settingsBuilder.updateOccurrenceSettings().build(); - getOccurrenceNoteSettings = settingsBuilder.getOccurrenceNoteSettings().build(); - getNoteSettings = settingsBuilder.getNoteSettings().build(); - listNotesSettings = settingsBuilder.listNotesSettings().build(); - deleteNoteSettings = settingsBuilder.deleteNoteSettings().build(); - createNoteSettings = settingsBuilder.createNoteSettings().build(); - batchCreateNotesSettings = settingsBuilder.batchCreateNotesSettings().build(); - updateNoteSettings = settingsBuilder.updateNoteSettings().build(); - listNoteOccurrencesSettings = settingsBuilder.listNoteOccurrencesSettings().build(); - } - - /** Builder for GrafeasStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder getOccurrenceSettings; - private final PagedCallSettings.Builder< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> - listOccurrencesSettings; - private final UnaryCallSettings.Builder - deleteOccurrenceSettings; - private final UnaryCallSettings.Builder - createOccurrenceSettings; - private final UnaryCallSettings.Builder< - BatchCreateOccurrencesRequest, BatchCreateOccurrencesResponse> - batchCreateOccurrencesSettings; - private final UnaryCallSettings.Builder - updateOccurrenceSettings; - private final UnaryCallSettings.Builder - getOccurrenceNoteSettings; - private final UnaryCallSettings.Builder getNoteSettings; - private final PagedCallSettings.Builder< - ListNotesRequest, ListNotesResponse, ListNotesPagedResponse> - listNotesSettings; - private final UnaryCallSettings.Builder deleteNoteSettings; - private final UnaryCallSettings.Builder createNoteSettings; - private final UnaryCallSettings.Builder - batchCreateNotesSettings; - private final UnaryCallSettings.Builder updateNoteSettings; - private final PagedCallSettings.Builder< - ListNoteOccurrencesRequest, - ListNoteOccurrencesResponse, - ListNoteOccurrencesPagedResponse> - listNoteOccurrencesSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(30000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(30000L)) - .setTotalTimeout(Duration.ofMillis(30000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(30000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(30000L)) - .setTotalTimeout(Duration.ofMillis(30000L)) - .build(); - definitions.put("no_retry_1_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - getOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listOccurrencesSettings = PagedCallSettings.newBuilder(LIST_OCCURRENCES_PAGE_STR_FACT); - deleteOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchCreateOccurrencesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getOccurrenceNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listNotesSettings = PagedCallSettings.newBuilder(LIST_NOTES_PAGE_STR_FACT); - deleteNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchCreateNotesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateNoteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listNoteOccurrencesSettings = - PagedCallSettings.newBuilder(LIST_NOTE_OCCURRENCES_PAGE_STR_FACT); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - getOccurrenceSettings, - listOccurrencesSettings, - deleteOccurrenceSettings, - createOccurrenceSettings, - batchCreateOccurrencesSettings, - updateOccurrenceSettings, - getOccurrenceNoteSettings, - getNoteSettings, - listNotesSettings, - deleteNoteSettings, - createNoteSettings, - batchCreateNotesSettings, - updateNoteSettings, - listNoteOccurrencesSettings); - initDefaults(this); - } - - protected Builder(GrafeasStubSettings settings) { - super(settings); - - getOccurrenceSettings = settings.getOccurrenceSettings.toBuilder(); - listOccurrencesSettings = settings.listOccurrencesSettings.toBuilder(); - deleteOccurrenceSettings = settings.deleteOccurrenceSettings.toBuilder(); - createOccurrenceSettings = settings.createOccurrenceSettings.toBuilder(); - batchCreateOccurrencesSettings = settings.batchCreateOccurrencesSettings.toBuilder(); - updateOccurrenceSettings = settings.updateOccurrenceSettings.toBuilder(); - getOccurrenceNoteSettings = settings.getOccurrenceNoteSettings.toBuilder(); - getNoteSettings = settings.getNoteSettings.toBuilder(); - listNotesSettings = settings.listNotesSettings.toBuilder(); - deleteNoteSettings = settings.deleteNoteSettings.toBuilder(); - createNoteSettings = settings.createNoteSettings.toBuilder(); - batchCreateNotesSettings = settings.batchCreateNotesSettings.toBuilder(); - updateNoteSettings = settings.updateNoteSettings.toBuilder(); - listNoteOccurrencesSettings = settings.listNoteOccurrencesSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - getOccurrenceSettings, - listOccurrencesSettings, - deleteOccurrenceSettings, - createOccurrenceSettings, - batchCreateOccurrencesSettings, - updateOccurrenceSettings, - getOccurrenceNoteSettings, - getNoteSettings, - listNotesSettings, - deleteNoteSettings, - createNoteSettings, - batchCreateNotesSettings, - updateNoteSettings, - listNoteOccurrencesSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .getOccurrenceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listOccurrencesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteOccurrenceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createOccurrenceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .batchCreateOccurrencesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateOccurrenceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .getOccurrenceNoteSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getNoteSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listNotesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteNoteSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createNoteSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .batchCreateNotesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateNoteSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .listNoteOccurrencesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to getOccurrence. */ - public UnaryCallSettings.Builder getOccurrenceSettings() { - return getOccurrenceSettings; - } - - /** Returns the builder for the settings used for calls to listOccurrences. */ - public PagedCallSettings.Builder< - ListOccurrencesRequest, ListOccurrencesResponse, ListOccurrencesPagedResponse> - listOccurrencesSettings() { - return listOccurrencesSettings; - } - - /** Returns the builder for the settings used for calls to deleteOccurrence. */ - public UnaryCallSettings.Builder deleteOccurrenceSettings() { - return deleteOccurrenceSettings; - } - - /** Returns the builder for the settings used for calls to createOccurrence. */ - public UnaryCallSettings.Builder - createOccurrenceSettings() { - return createOccurrenceSettings; - } - - /** Returns the builder for the settings used for calls to batchCreateOccurrences. */ - public UnaryCallSettings.Builder - batchCreateOccurrencesSettings() { - return batchCreateOccurrencesSettings; - } - - /** Returns the builder for the settings used for calls to updateOccurrence. */ - public UnaryCallSettings.Builder - updateOccurrenceSettings() { - return updateOccurrenceSettings; - } - - /** Returns the builder for the settings used for calls to getOccurrenceNote. */ - public UnaryCallSettings.Builder getOccurrenceNoteSettings() { - return getOccurrenceNoteSettings; - } - - /** Returns the builder for the settings used for calls to getNote. */ - public UnaryCallSettings.Builder getNoteSettings() { - return getNoteSettings; - } - - /** Returns the builder for the settings used for calls to listNotes. */ - public PagedCallSettings.Builder - listNotesSettings() { - return listNotesSettings; - } - - /** Returns the builder for the settings used for calls to deleteNote. */ - public UnaryCallSettings.Builder deleteNoteSettings() { - return deleteNoteSettings; - } - - /** Returns the builder for the settings used for calls to createNote. */ - public UnaryCallSettings.Builder createNoteSettings() { - return createNoteSettings; - } - - /** Returns the builder for the settings used for calls to batchCreateNotes. */ - public UnaryCallSettings.Builder - batchCreateNotesSettings() { - return batchCreateNotesSettings; - } - - /** Returns the builder for the settings used for calls to updateNote. */ - public UnaryCallSettings.Builder updateNoteSettings() { - return updateNoteSettings; - } - - /** Returns the builder for the settings used for calls to listNoteOccurrences. */ - public PagedCallSettings.Builder< - ListNoteOccurrencesRequest, - ListNoteOccurrencesResponse, - ListNoteOccurrencesPagedResponse> - listNoteOccurrencesSettings() { - return listNoteOccurrencesSettings; - } - - @Override - public GrafeasStubSettings build() throws IOException { - return new GrafeasStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java deleted file mode 100644 index b5a6c1879d69..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1.stub; - -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the Grafeas service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcGrafeasCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java b/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java deleted file mode 100644 index ef18c902d9f3..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java +++ /dev/null @@ -1,607 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1.stub; - -import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grafeas.v1.BatchCreateNotesRequest; -import io.grafeas.v1.BatchCreateNotesResponse; -import io.grafeas.v1.BatchCreateOccurrencesRequest; -import io.grafeas.v1.BatchCreateOccurrencesResponse; -import io.grafeas.v1.CreateNoteRequest; -import io.grafeas.v1.CreateOccurrenceRequest; -import io.grafeas.v1.DeleteNoteRequest; -import io.grafeas.v1.DeleteOccurrenceRequest; -import io.grafeas.v1.GetNoteRequest; -import io.grafeas.v1.GetOccurrenceNoteRequest; -import io.grafeas.v1.GetOccurrenceRequest; -import io.grafeas.v1.ListNoteOccurrencesRequest; -import io.grafeas.v1.ListNoteOccurrencesResponse; -import io.grafeas.v1.ListNotesRequest; -import io.grafeas.v1.ListNotesResponse; -import io.grafeas.v1.ListOccurrencesRequest; -import io.grafeas.v1.ListOccurrencesResponse; -import io.grafeas.v1.Note; -import io.grafeas.v1.Occurrence; -import io.grafeas.v1.UpdateNoteRequest; -import io.grafeas.v1.UpdateOccurrenceRequest; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the Grafeas service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcGrafeasStub extends GrafeasStub { - private static final MethodDescriptor - getOccurrenceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/GetOccurrence") - .setRequestMarshaller( - ProtoUtils.marshaller(GetOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Occurrence.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listOccurrencesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/ListOccurrences") - .setRequestMarshaller( - ProtoUtils.marshaller(ListOccurrencesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListOccurrencesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteOccurrenceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/DeleteOccurrence") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createOccurrenceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/CreateOccurrence") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Occurrence.getDefaultInstance())) - .build(); - - private static final MethodDescriptor< - BatchCreateOccurrencesRequest, BatchCreateOccurrencesResponse> - batchCreateOccurrencesMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/BatchCreateOccurrences") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchCreateOccurrencesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchCreateOccurrencesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateOccurrenceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/UpdateOccurrence") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Occurrence.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getOccurrenceNoteMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/GetOccurrenceNote") - .setRequestMarshaller( - ProtoUtils.marshaller(GetOccurrenceNoteRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getNoteMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/GetNote") - .setRequestMarshaller(ProtoUtils.marshaller(GetNoteRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listNotesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/ListNotes") - .setRequestMarshaller(ProtoUtils.marshaller(ListNotesRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ListNotesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor deleteNoteMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/DeleteNote") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteNoteRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor createNoteMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/CreateNote") - .setRequestMarshaller(ProtoUtils.marshaller(CreateNoteRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - batchCreateNotesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/BatchCreateNotes") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchCreateNotesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchCreateNotesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor updateNoteMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/UpdateNote") - .setRequestMarshaller(ProtoUtils.marshaller(UpdateNoteRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Note.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listNoteOccurrencesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("grafeas.v1.Grafeas/ListNoteOccurrences") - .setRequestMarshaller( - ProtoUtils.marshaller(ListNoteOccurrencesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListNoteOccurrencesResponse.getDefaultInstance())) - .build(); - - private final UnaryCallable getOccurrenceCallable; - private final UnaryCallable - listOccurrencesCallable; - private final UnaryCallable - listOccurrencesPagedCallable; - private final UnaryCallable deleteOccurrenceCallable; - private final UnaryCallable createOccurrenceCallable; - private final UnaryCallable - batchCreateOccurrencesCallable; - private final UnaryCallable updateOccurrenceCallable; - private final UnaryCallable getOccurrenceNoteCallable; - private final UnaryCallable getNoteCallable; - private final UnaryCallable listNotesCallable; - private final UnaryCallable listNotesPagedCallable; - private final UnaryCallable deleteNoteCallable; - private final UnaryCallable createNoteCallable; - private final UnaryCallable - batchCreateNotesCallable; - private final UnaryCallable updateNoteCallable; - private final UnaryCallable - listNoteOccurrencesCallable; - private final UnaryCallable - listNoteOccurrencesPagedCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcGrafeasStub create(GrafeasStubSettings settings) throws IOException { - return new GrpcGrafeasStub(settings, ClientContext.create(settings)); - } - - public static final GrpcGrafeasStub create(ClientContext clientContext) throws IOException { - return new GrpcGrafeasStub(GrafeasStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcGrafeasStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcGrafeasStub( - GrafeasStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcGrafeasStub, using the given settings. This is protected so that - * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. - */ - protected GrpcGrafeasStub(GrafeasStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcGrafeasCallableFactory()); - } - - /** - * Constructs an instance of GrpcGrafeasStub, using the given settings. This is protected so that - * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. - */ - protected GrpcGrafeasStub( - GrafeasStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings getOccurrenceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getOccurrenceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listOccurrencesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listOccurrencesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteOccurrenceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteOccurrenceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createOccurrenceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createOccurrenceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - batchCreateOccurrencesTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(batchCreateOccurrencesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateOccurrenceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateOccurrenceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings getOccurrenceNoteTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getOccurrenceNoteMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings getNoteTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getNoteMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings listNotesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listNotesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteNoteTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteNoteMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createNoteTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createNoteMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - batchCreateNotesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchCreateNotesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateNoteTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateNoteMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listNoteOccurrencesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listNoteOccurrencesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - - this.getOccurrenceCallable = - callableFactory.createUnaryCallable( - getOccurrenceTransportSettings, settings.getOccurrenceSettings(), clientContext); - this.listOccurrencesCallable = - callableFactory.createUnaryCallable( - listOccurrencesTransportSettings, settings.listOccurrencesSettings(), clientContext); - this.listOccurrencesPagedCallable = - callableFactory.createPagedCallable( - listOccurrencesTransportSettings, settings.listOccurrencesSettings(), clientContext); - this.deleteOccurrenceCallable = - callableFactory.createUnaryCallable( - deleteOccurrenceTransportSettings, settings.deleteOccurrenceSettings(), clientContext); - this.createOccurrenceCallable = - callableFactory.createUnaryCallable( - createOccurrenceTransportSettings, settings.createOccurrenceSettings(), clientContext); - this.batchCreateOccurrencesCallable = - callableFactory.createUnaryCallable( - batchCreateOccurrencesTransportSettings, - settings.batchCreateOccurrencesSettings(), - clientContext); - this.updateOccurrenceCallable = - callableFactory.createUnaryCallable( - updateOccurrenceTransportSettings, settings.updateOccurrenceSettings(), clientContext); - this.getOccurrenceNoteCallable = - callableFactory.createUnaryCallable( - getOccurrenceNoteTransportSettings, - settings.getOccurrenceNoteSettings(), - clientContext); - this.getNoteCallable = - callableFactory.createUnaryCallable( - getNoteTransportSettings, settings.getNoteSettings(), clientContext); - this.listNotesCallable = - callableFactory.createUnaryCallable( - listNotesTransportSettings, settings.listNotesSettings(), clientContext); - this.listNotesPagedCallable = - callableFactory.createPagedCallable( - listNotesTransportSettings, settings.listNotesSettings(), clientContext); - this.deleteNoteCallable = - callableFactory.createUnaryCallable( - deleteNoteTransportSettings, settings.deleteNoteSettings(), clientContext); - this.createNoteCallable = - callableFactory.createUnaryCallable( - createNoteTransportSettings, settings.createNoteSettings(), clientContext); - this.batchCreateNotesCallable = - callableFactory.createUnaryCallable( - batchCreateNotesTransportSettings, settings.batchCreateNotesSettings(), clientContext); - this.updateNoteCallable = - callableFactory.createUnaryCallable( - updateNoteTransportSettings, settings.updateNoteSettings(), clientContext); - this.listNoteOccurrencesCallable = - callableFactory.createUnaryCallable( - listNoteOccurrencesTransportSettings, - settings.listNoteOccurrencesSettings(), - clientContext); - this.listNoteOccurrencesPagedCallable = - callableFactory.createPagedCallable( - listNoteOccurrencesTransportSettings, - settings.listNoteOccurrencesSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable getOccurrenceCallable() { - return getOccurrenceCallable; - } - - @Override - public UnaryCallable listOccurrencesCallable() { - return listOccurrencesCallable; - } - - @Override - public UnaryCallable - listOccurrencesPagedCallable() { - return listOccurrencesPagedCallable; - } - - @Override - public UnaryCallable deleteOccurrenceCallable() { - return deleteOccurrenceCallable; - } - - @Override - public UnaryCallable createOccurrenceCallable() { - return createOccurrenceCallable; - } - - @Override - public UnaryCallable - batchCreateOccurrencesCallable() { - return batchCreateOccurrencesCallable; - } - - @Override - public UnaryCallable updateOccurrenceCallable() { - return updateOccurrenceCallable; - } - - @Override - public UnaryCallable getOccurrenceNoteCallable() { - return getOccurrenceNoteCallable; - } - - @Override - public UnaryCallable getNoteCallable() { - return getNoteCallable; - } - - @Override - public UnaryCallable listNotesCallable() { - return listNotesCallable; - } - - @Override - public UnaryCallable listNotesPagedCallable() { - return listNotesPagedCallable; - } - - @Override - public UnaryCallable deleteNoteCallable() { - return deleteNoteCallable; - } - - @Override - public UnaryCallable createNoteCallable() { - return createNoteCallable; - } - - @Override - public UnaryCallable - batchCreateNotesCallable() { - return batchCreateNotesCallable; - } - - @Override - public UnaryCallable updateNoteCallable() { - return updateNoteCallable; - } - - @Override - public UnaryCallable - listNoteOccurrencesCallable() { - return listNoteOccurrencesCallable; - } - - @Override - public UnaryCallable - listNoteOccurrencesPagedCallable() { - return listNoteOccurrencesPagedCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto deleted file mode 100644 index f2854fe686b2..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/attestation.proto +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "grafeas/v1/common.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// An attestation wrapper with a PGP-compatible signature. This message only -// supports `ATTACHED` signatures, where the payload that is signed is included -// alongside the signature itself in the same file. - -// Note kind that represents a logical attestation "role" or "authority". For -// example, an organization might have one `Authority` for "QA" and one for -// "build". This note is intended to act strictly as a grouping mechanism for -// the attached occurrences (Attestations). This grouping mechanism also -// provides a security boundary, since IAM ACLs gate the ability for a principle -// to attach an occurrence to a given note. It also provides a single point of -// lookup to find all attached attestation occurrences, even if they don't all -// live in the same project. -message AttestationNote { - // This submessage provides human-readable hints about the purpose of the - // authority. Because the name of a note acts as its resource reference, it is - // important to disambiguate the canonical name of the Note (which might be a - // UUID for security purposes) from "readable" names more suitable for debug - // output. Note that these hints should not be used to look up authorities in - // security sensitive contexts, such as when looking up attestations to - // verify. - message Hint { - // Required. The human readable name of this attestation authority, for - // example "qa". - string human_readable_name = 1; - } - - // Hint hints at the purpose of the attestation authority. - Hint hint = 1; -} - -message Jwt { - // The compact encoding of a JWS, which is always three base64 encoded strings - // joined by periods. For details, see: - // https://tools.ietf.org/html/rfc7515.html#section-3.1 - string compact_jwt = 1; -} - -// Occurrence that represents a single "attestation". The authenticity of an -// attestation can be verified using the attached signature. If the verifier -// trusts the public key of the signer, then verifying the signature is -// sufficient to establish trust. In this circumstance, the authority to which -// this attestation is attached is primarily useful for lookup (how to find -// this attestation if you already know the authority and artifact to be -// verified) and intent (for which authority this attestation was intended to -// sign. -message AttestationOccurrence { - // Required. The serialized payload that is verified by one or more - // `signatures`. - bytes serialized_payload = 1; - // One or more signatures over `serialized_payload`. Verifier implementations - // should consider this attestation message verified if at least one - // `signature` verifies `serialized_payload`. See `Signature` in common.proto - // for more details on signature structure and verification. - repeated Signature signatures = 2; - // One or more JWTs encoding a self-contained attestation. - // Each JWT encodes the payload that it verifies within the JWT itself. - // Verifier implementation SHOULD ignore the `serialized_payload` field - // when verifying these JWTs. - // If only JWTs are present on this AttestationOccurrence, then the - // `serialized_payload` SHOULD be left empty. - // Each JWT SHOULD encode a claim specific to the `resource_uri` of this - // Occurrence, but this is not validated by Grafeas metadata API - // implementations. The JWT itself is opaque to Grafeas. - repeated Jwt jwts = 3; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto deleted file mode 100644 index 172637fd4596..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/build.proto +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "grafeas/v1/intoto_provenance.proto"; -import "grafeas/v1/intoto_statement.proto"; -import "grafeas/v1/provenance.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Note holding the version of the provider's builder and the signature of the -// provenance message in the build details occurrence. -message BuildNote { - // Required. Immutable. Version of the builder which produced this build. - string builder_version = 1; -} - -// Details of a build occurrence. -message BuildOccurrence { - // The actual provenance for the build. - grafeas.v1.BuildProvenance provenance = 1; - - // Serialized JSON representation of the provenance, used in generating the - // build signature in the corresponding build note. After verifying the - // signature, `provenance_bytes` can be unmarshalled and compared to the - // provenance to confirm that it is unchanged. A base64-encoded string - // representation of the provenance bytes is used for the signature in order - // to interoperate with openssl which expects this format for signature - // verification. - // - // The serialized form is captured both to avoid ambiguity in how the - // provenance is marshalled to json as well to prevent incompatibilities with - // future changes. - string provenance_bytes = 2; - - // Deprecated. See InTotoStatement for the replacement. - // In-toto Provenance representation as defined in spec. - InTotoProvenance intoto_provenance = 3; - - // In-toto Statement representation as defined in spec. - // The intoto_statement can contain any type of provenance. The serialized - // payload of the statement can be stored and signed in the Occurrence's - // envelope. - InTotoStatement intoto_statement = 4; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto deleted file mode 100644 index 1464ecc9be2d..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/common.proto +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Kind represents the kinds of notes supported. -enum NoteKind { - // Default value. This value is unused. - NOTE_KIND_UNSPECIFIED = 0; - // The note and occurrence represent a package vulnerability. - VULNERABILITY = 1; - // The note and occurrence assert build provenance. - BUILD = 2; - // This represents an image basis relationship. - IMAGE = 3; - // This represents a package installed via a package manager. - PACKAGE = 4; - // The note and occurrence track deployment events. - DEPLOYMENT = 5; - // The note and occurrence track the initial discovery status of a resource. - DISCOVERY = 6; - // This represents a logical "role" that can attest to artifacts. - ATTESTATION = 7; - // This represents an available package upgrade. - UPGRADE = 8; - // This represents a Compliance Note - COMPLIANCE = 9; - // This represents a DSSE attestation Note - DSSE_ATTESTATION = 10; - // This represents a Vulnerability Assessment. - VULNERABILITY_ASSESSMENT = 11; -} - -// Metadata for any related URL information. -message RelatedUrl { - // Specific URL associated with the resource. - string url = 1; - // Label to describe usage of the URL. - string label = 2; -} - -// Verifiers (e.g. Kritis implementations) MUST verify signatures -// with respect to the trust anchors defined in policy (e.g. a Kritis policy). -// Typically this means that the verifier has been configured with a map from -// `public_key_id` to public key material (and any required parameters, e.g. -// signing algorithm). -// -// In particular, verification implementations MUST NOT treat the signature -// `public_key_id` as anything more than a key lookup hint. The `public_key_id` -// DOES NOT validate or authenticate a public key; it only provides a mechanism -// for quickly selecting a public key ALREADY CONFIGURED on the verifier through -// a trusted channel. Verification implementations MUST reject signatures in any -// of the following circumstances: -// * The `public_key_id` is not recognized by the verifier. -// * The public key that `public_key_id` refers to does not verify the -// signature with respect to the payload. -// -// The `signature` contents SHOULD NOT be "attached" (where the payload is -// included with the serialized `signature` bytes). Verifiers MUST ignore any -// "attached" payload and only verify signatures with respect to explicitly -// provided payload (e.g. a `payload` field on the proto message that holds -// this Signature, or the canonical serialization of the proto message that -// holds this signature). -message Signature { - // The content of the signature, an opaque bytestring. - // The payload that this signature verifies MUST be unambiguously provided - // with the Signature during verification. A wrapper message might provide - // the payload explicitly. Alternatively, a message might have a canonical - // serialization that can always be unambiguously computed to derive the - // payload. - bytes signature = 1; - - // The identifier for the public key that verifies this signature. - // * The `public_key_id` is required. - // * The `public_key_id` SHOULD be an RFC3986 conformant URI. - // * When possible, the `public_key_id` SHOULD be an immutable reference, - // such as a cryptographic digest. - // - // Examples of valid `public_key_id`s: - // - // OpenPGP V4 public key fingerprint: - // * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" - // See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more - // details on this scheme. - // - // RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER - // serialization): - // * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" - // * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" - string public_key_id = 2; -} - -// MUST match -// https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An -// authenticated message of arbitrary type. -message Envelope { - bytes payload = 1; - string payload_type = 2; - repeated EnvelopeSignature signatures = 3; -} - -message EnvelopeSignature { - bytes sig = 1; - string keyid = 2; -} - -// Indicates the location at which a package was found. -message FileLocation { - // For jars that are contained inside .war files, this filepath - // can indicate the path to war file combined with the path to jar file. - string file_path = 1; -} - -// License information. -message License { - // Often a single license can be used to represent the licensing terms. - // Sometimes it is necessary to include a choice of one or more licenses - // or some combination of license identifiers. - // Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", - // "GPL-2.0-or-later WITH Bison-exception-2.2". - string expression = 1; - - // Comments - string comments = 2; -} - -// Digest information. -message Digest { - // `SHA1`, `SHA512` etc. - string algo = 1; - - // Value of the digest. - bytes digest_bytes = 2; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto deleted file mode 100644 index 688fa82596b1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/compliance.proto +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2021 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "grafeas/v1/severity.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -message ComplianceNote { - // The title that identifies this compliance check. - string title = 1; - // A description about this compliance check. - string description = 2; - // The OS and config versions the benchmark applies to. - repeated grafeas.v1.ComplianceVersion version = 3; - // A rationale for the existence of this compliance check. - string rationale = 4; - // A description of remediation steps if the compliance check fails. - string remediation = 5; - // A compliance check that is a CIS benchmark. - message CisBenchmark { - int32 profile_level = 1; - grafeas.v1.Severity severity = 2; - } - oneof compliance_type { - CisBenchmark cis_benchmark = 6; - } - // Serialized scan instructions with a predefined format. - bytes scan_instructions = 7; -} - -// Describes the CIS benchmark version that is applicable to a given OS and -// os version. -message ComplianceVersion { - // The CPE URI (https://cpe.mitre.org/specification/) this benchmark is - // applicable to. - string cpe_uri = 1; - // The name of the document that defines this benchmark, e.g. "CIS - // Container-Optimized OS". - string benchmark_document = 3; - // The version of the benchmark. This is set to the version of the OS-specific - // CIS document the benchmark is defined in. - string version = 2; -} - -// An indication that the compliance checks in the associated ComplianceNote -// were not satisfied for particular resources or a specified reason. -message ComplianceOccurrence { - repeated NonCompliantFile non_compliant_files = 2; - string non_compliance_reason = 3; -} - -// Details about files that caused a compliance check to fail. -message NonCompliantFile { - // display_command is a single command that can be used to display a list of - // non compliant files. When there is no such command, we can also iterate a - // list of non compliant file using 'path'. - - // Empty if `display_command` is set. - string path = 1; - // Command to display the non-compliant files. - string display_command = 2; - // Explains why a file is non compliant for a CIS check. - string reason = 3; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto deleted file mode 100644 index 181ec052fe42..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/cvss.proto +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; -option java_outer_classname = "CVSSProto"; - -// Common Vulnerability Scoring System version 3. -// For details, see https://www.first.org/cvss/specification-document -message CVSSv3 { - // The base score is a function of the base metric scores. - float base_score = 1; - - float exploitability_score = 2; - - float impact_score = 3; - - // Base Metrics - // Represents the intrinsic characteristics of a vulnerability that are - // constant over time and across user environments. - AttackVector attack_vector = 5; - AttackComplexity attack_complexity = 6; - PrivilegesRequired privileges_required = 7; - UserInteraction user_interaction = 8; - Scope scope = 9; - Impact confidentiality_impact = 10; - Impact integrity_impact = 11; - Impact availability_impact = 12; - - enum AttackVector { - ATTACK_VECTOR_UNSPECIFIED = 0; - ATTACK_VECTOR_NETWORK = 1; - ATTACK_VECTOR_ADJACENT = 2; - ATTACK_VECTOR_LOCAL = 3; - ATTACK_VECTOR_PHYSICAL = 4; - } - - enum AttackComplexity { - ATTACK_COMPLEXITY_UNSPECIFIED = 0; - ATTACK_COMPLEXITY_LOW = 1; - ATTACK_COMPLEXITY_HIGH = 2; - } - - enum PrivilegesRequired { - PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - PRIVILEGES_REQUIRED_NONE = 1; - PRIVILEGES_REQUIRED_LOW = 2; - PRIVILEGES_REQUIRED_HIGH = 3; - } - - enum UserInteraction { - USER_INTERACTION_UNSPECIFIED = 0; - USER_INTERACTION_NONE = 1; - USER_INTERACTION_REQUIRED = 2; - } - - enum Scope { - SCOPE_UNSPECIFIED = 0; - SCOPE_UNCHANGED = 1; - SCOPE_CHANGED = 2; - } - - enum Impact { - IMPACT_UNSPECIFIED = 0; - IMPACT_HIGH = 1; - IMPACT_LOW = 2; - IMPACT_NONE = 3; - } -} - -// Common Vulnerability Scoring System. -// For details, see https://www.first.org/cvss/specification-document -// This is a message we will try to use for storing various versions of CVSS -// rather than making a separate proto for storing a specific version. -message CVSS { - // The base score is a function of the base metric scores. - float base_score = 1; - - float exploitability_score = 2; - - float impact_score = 3; - - // Base Metrics - // Represents the intrinsic characteristics of a vulnerability that are - // constant over time and across user environments. - AttackVector attack_vector = 4; - AttackComplexity attack_complexity = 5; - Authentication authentication = 6; - PrivilegesRequired privileges_required = 7; - UserInteraction user_interaction = 8; - Scope scope = 9; - Impact confidentiality_impact = 10; - Impact integrity_impact = 11; - Impact availability_impact = 12; - - enum AttackVector { - ATTACK_VECTOR_UNSPECIFIED = 0; - ATTACK_VECTOR_NETWORK = 1; - ATTACK_VECTOR_ADJACENT = 2; - ATTACK_VECTOR_LOCAL = 3; - ATTACK_VECTOR_PHYSICAL = 4; - } - - enum AttackComplexity { - ATTACK_COMPLEXITY_UNSPECIFIED = 0; - ATTACK_COMPLEXITY_LOW = 1; - ATTACK_COMPLEXITY_HIGH = 2; - } - - enum Authentication { - AUTHENTICATION_UNSPECIFIED = 0; - AUTHENTICATION_MULTIPLE = 1; - AUTHENTICATION_SINGLE = 2; - AUTHENTICATION_NONE = 3; - } - - enum PrivilegesRequired { - PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - PRIVILEGES_REQUIRED_NONE = 1; - PRIVILEGES_REQUIRED_LOW = 2; - PRIVILEGES_REQUIRED_HIGH = 3; - } - - enum UserInteraction { - USER_INTERACTION_UNSPECIFIED = 0; - USER_INTERACTION_NONE = 1; - USER_INTERACTION_REQUIRED = 2; - } - - enum Scope { - SCOPE_UNSPECIFIED = 0; - SCOPE_UNCHANGED = 1; - SCOPE_CHANGED = 2; - } - - enum Impact { - IMPACT_UNSPECIFIED = 0; - IMPACT_HIGH = 1; - IMPACT_LOW = 2; - IMPACT_NONE = 3; - } -} - -// CVSS Version. -enum CVSSVersion { - CVSS_VERSION_UNSPECIFIED = 0; - CVSS_VERSION_2 = 1; - CVSS_VERSION_3 = 2; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto deleted file mode 100644 index 5204004fd646..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/deployment.proto +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// An artifact that can be deployed in some runtime. -message DeploymentNote { - // Required. Resource URI for the artifact being deployed. - repeated string resource_uri = 1; -} - -// The period during which some deployable was active in a runtime. -message DeploymentOccurrence { - // Identity of the user that triggered this deployment. - string user_email = 1; - - // Required. Beginning of the lifetime of this deployment. - google.protobuf.Timestamp deploy_time = 2; - - // End of the lifetime of this deployment. - google.protobuf.Timestamp undeploy_time = 3; - - // Configuration used to create this deployment. - string config = 4; - - // Address of the runtime element hosting this deployment. - string address = 5; - - // Output only. Resource URI for the artifact being deployed taken from - // the deployable field with the same name. - repeated string resource_uri = 6; - - // Types of platforms. - enum Platform { - // Unknown. - PLATFORM_UNSPECIFIED = 0; - // Google Container Engine. - GKE = 1; - // Google App Engine: Flexible Environment. - FLEX = 2; - // Custom user-defined platform. - CUSTOM = 3; - } - // Platform hosting this deployment. - Platform platform = 7; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto deleted file mode 100644 index bfb94e4a3474..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/discovery.proto +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; -import "grafeas/v1/common.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// A note that indicates a type of analysis a provider would perform. This note -// exists in a provider's project. A `Discovery` occurrence is created in a -// consumer's project at the start of analysis. -message DiscoveryNote { - // Required. Immutable. The kind of analysis that is handled by this - // discovery. - grafeas.v1.NoteKind analysis_kind = 1; -} - -// Provides information about the analysis status of a discovered resource. -message DiscoveryOccurrence { - // Whether the resource is continuously analyzed. - enum ContinuousAnalysis { - // Unknown. - CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; - // The resource is continuously analyzed. - ACTIVE = 1; - // The resource is ignored for continuous analysis. - INACTIVE = 2; - } - - // Whether the resource is continuously analyzed. - ContinuousAnalysis continuous_analysis = 1; - - // Analysis status for a resource. Currently for initial analysis only (not - // updated in continuous analysis). - enum AnalysisStatus { - option allow_alias = true; - - // Unknown. - ANALYSIS_STATUS_UNSPECIFIED = 0; - // Resource is known but no action has been taken yet. - PENDING = 1; - // Resource is being analyzed. - SCANNING = 2; - // Analysis has finished successfully. - FINISHED_SUCCESS = 3; - // Analysis has completed. - COMPLETE = 3; - // Analysis has finished unsuccessfully, the analysis itself is in a bad - // state. - FINISHED_FAILED = 4; - // The resource is known not to be supported. - FINISHED_UNSUPPORTED = 5; - } - - // The status of discovery for the resource. - AnalysisStatus analysis_status = 2; - - // Indicates which analysis completed successfully. Multiple types of - // analysis can be performed on a single resource. - message AnalysisCompleted { - repeated string analysis_type = 1; - } - - AnalysisCompleted analysis_completed = 7; - - // Indicates any errors encountered during analysis of a resource. There - // could be 0 or more of these errors. - repeated google.rpc.Status analysis_error = 8; - - // When an error is encountered this will contain a LocalizedMessage under - // details to show to the user. The LocalizedMessage is output only and - // populated by the API. - google.rpc.Status analysis_status_error = 3; - - // The CPE of the resource being scanned. - string cpe = 4; - - // The last time this resource was scanned. - google.protobuf.Timestamp last_scan_time = 5; - - // The time occurrences related to this discovery occurrence were archived. - google.protobuf.Timestamp archive_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto deleted file mode 100644 index 34ba3df9f9be..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/dsse_attestation.proto +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2021 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -syntax = "proto3"; - -package grafeas.v1; - -import "grafeas/v1/common.proto"; -import "grafeas/v1/intoto_statement.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -message DSSEAttestationNote { - // This submessage provides human-readable hints about the purpose of the - // authority. Because the name of a note acts as its resource reference, it is - // important to disambiguate the canonical name of the Note (which might be a - // UUID for security purposes) from "readable" names more suitable for debug - // output. Note that these hints should not be used to look up authorities in - // security sensitive contexts, such as when looking up attestations to - // verify. - message DSSEHint { - // Required. The human readable name of this attestation authority, for - // example "cloudbuild-prod". - string human_readable_name = 1; - } - // DSSEHint hints at the purpose of the attestation authority. - DSSEHint hint = 1; -} - -// Deprecated. Prefer to use a regular Occurrence, and populate the -// Envelope at the top level of the Occurrence. -message DSSEAttestationOccurrence { - // If doing something security critical, make sure to verify the signatures in - // this metadata. - Envelope envelope = 1; - oneof decoded_payload { - InTotoStatement statement = 2; - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto deleted file mode 100644 index 5ec930e6ef3d..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/grafeas.proto +++ /dev/null @@ -1,547 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "grafeas/v1/attestation.proto"; -import "grafeas/v1/build.proto"; -import "grafeas/v1/common.proto"; -import "grafeas/v1/compliance.proto"; -import "grafeas/v1/deployment.proto"; -import "grafeas/v1/discovery.proto"; -import "grafeas/v1/dsse_attestation.proto"; -import "grafeas/v1/image.proto"; -import "grafeas/v1/package.proto"; -import "grafeas/v1/upgrade.proto"; -import "grafeas/v1/vex.proto"; -import "grafeas/v1/vulnerability.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; -option (google.api.resource_definition) = { - type: "grafeas.io/Project" - pattern: "projects/{project}" -}; - -// [Grafeas](https://grafeas.io) API. -// -// Retrieves analysis results of Cloud components such as Docker container -// images. -// -// Analysis results are stored as a series of occurrences. An `Occurrence` -// contains information about a specific analysis instance on a resource. An -// occurrence refers to a `Note`. A note contains details describing the -// analysis and is generally stored in a separate project, called a `Provider`. -// Multiple occurrences can refer to the same note. -// -// For example, an SSL vulnerability could affect multiple images. In this case, -// there would be one note for the vulnerability and an occurrence for each -// image with the vulnerability referring to that note. -service Grafeas { - option (google.api.default_host) = "containeranalysis.googleapis.com"; - - // Gets the specified occurrence. - rpc GetOccurrence(GetOccurrenceRequest) returns (Occurrence) { - option (google.api.http) = { - get: "/v1/{name=projects/*/occurrences/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists occurrences for the specified project. - rpc ListOccurrences(ListOccurrencesRequest) - returns (ListOccurrencesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*}/occurrences" - }; - option (google.api.method_signature) = "parent,filter"; - } - - // Deletes the specified occurrence. For example, use this method to delete an - // occurrence when the occurrence is no longer applicable for the given - // resource. - rpc DeleteOccurrence(DeleteOccurrenceRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/occurrences/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new occurrence. - rpc CreateOccurrence(CreateOccurrenceRequest) returns (Occurrence) { - option (google.api.http) = { - post: "/v1/{parent=projects/*}/occurrences" - body: "occurrence" - }; - option (google.api.method_signature) = "parent,occurrence"; - } - - // Creates new occurrences in batch. - rpc BatchCreateOccurrences(BatchCreateOccurrencesRequest) - returns (BatchCreateOccurrencesResponse) { - option (google.api.http) = { - post: "/v1/{parent=projects/*}/occurrences:batchCreate" - body: "*" - }; - option (google.api.method_signature) = "parent,occurrences"; - } - - // Updates the specified occurrence. - rpc UpdateOccurrence(UpdateOccurrenceRequest) returns (Occurrence) { - option (google.api.http) = { - patch: "/v1/{name=projects/*/occurrences/*}" - body: "occurrence" - }; - option (google.api.method_signature) = "name,occurrence,update_mask"; - } - - // Gets the note attached to the specified occurrence. Consumer projects can - // use this method to get a note that belongs to a provider project. - rpc GetOccurrenceNote(GetOccurrenceNoteRequest) returns (Note) { - option (google.api.http) = { - get: "/v1/{name=projects/*/occurrences/*}/notes" - }; - option (google.api.method_signature) = "name"; - } - - // Gets the specified note. - rpc GetNote(GetNoteRequest) returns (Note) { - option (google.api.http) = { - get: "/v1/{name=projects/*/notes/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists notes for the specified project. - rpc ListNotes(ListNotesRequest) returns (ListNotesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*}/notes" - }; - option (google.api.method_signature) = "parent,filter"; - } - - // Deletes the specified note. - rpc DeleteNote(DeleteNoteRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/notes/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new note. - rpc CreateNote(CreateNoteRequest) returns (Note) { - option (google.api.http) = { - post: "/v1/{parent=projects/*}/notes" - body: "note" - }; - option (google.api.method_signature) = "parent,note_id,note"; - } - - // Creates new notes in batch. - rpc BatchCreateNotes(BatchCreateNotesRequest) - returns (BatchCreateNotesResponse) { - option (google.api.http) = { - post: "/v1/{parent=projects/*}/notes:batchCreate" - body: "*" - }; - option (google.api.method_signature) = "parent,notes"; - } - - // Updates the specified note. - rpc UpdateNote(UpdateNoteRequest) returns (Note) { - option (google.api.http) = { - patch: "/v1/{name=projects/*/notes/*}" - body: "note" - }; - option (google.api.method_signature) = "name,note,update_mask"; - } - - // Lists occurrences referencing the specified note. Provider projects can use - // this method to get all occurrences across consumer projects referencing the - // specified note. - rpc ListNoteOccurrences(ListNoteOccurrencesRequest) - returns (ListNoteOccurrencesResponse) { - option (google.api.http) = { - get: "/v1/{name=projects/*/notes/*}/occurrences" - }; - option (google.api.method_signature) = "name,filter"; - } -} - -// An instance of an analysis type that has been found on a resource. -message Occurrence { - option (google.api.resource) = { - type: "grafeas.io/Occurrence" - pattern: "projects/{project}/occurrences/{occurrence}" - }; - - // Output only. The name of the occurrence in the form of - // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1; - - // Required. Immutable. A URI that represents the resource for which the - // occurrence applies. For example, - // `https://gcr.io/project/image@sha256:123abc` for a Docker image. - string resource_uri = 2; - - // Required. Immutable. The analysis note associated with this occurrence, in - // the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be - // used as a filter in list requests. - string note_name = 3; - - // Output only. This explicitly denotes which of the occurrence details are - // specified. This field can be used as a filter in list requests. - grafeas.v1.NoteKind kind = 4; - - // A description of actions that can be taken to remedy the note. - string remediation = 5; - - // Output only. The time this occurrence was created. - google.protobuf.Timestamp create_time = 6; - - // Output only. The time this occurrence was last updated. - google.protobuf.Timestamp update_time = 7; - - // Required. Immutable. Describes the details of the note kind found on this - // resource. - oneof details { - // Describes a security vulnerability. - grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - // Describes a verifiable build. - grafeas.v1.BuildOccurrence build = 9; - // Describes how this resource derives from the basis in the associated - // note. - grafeas.v1.ImageOccurrence image = 10; - // Describes the installation of a package on the linked resource. - grafeas.v1.PackageOccurrence package = 11; - // Describes the deployment of an artifact on a runtime. - grafeas.v1.DeploymentOccurrence deployment = 12; - // Describes when a resource was discovered. - grafeas.v1.DiscoveryOccurrence discovery = 13; - // Describes an attestation of an artifact. - grafeas.v1.AttestationOccurrence attestation = 14; - // Describes an available package upgrade on the linked resource. - grafeas.v1.UpgradeOccurrence upgrade = 15; - // Describes a compliance violation on a linked resource. - grafeas.v1.ComplianceOccurrence compliance = 16; - // Describes an attestation of an artifact using dsse. - grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - } - - // https://github.com/secure-systems-lab/dsse - grafeas.v1.Envelope envelope = 18; -} - -// A type of analysis that can be done for a resource. -message Note { - option (google.api.resource) = { - type: "grafeas.io/Note" - pattern: "projects/{project}/notes/{note}" - }; - - // Output only. The name of the note in the form of - // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1; - - // A one sentence description of this note. - string short_description = 2; - - // A detailed description of this note. - string long_description = 3; - - // Output only. The type of analysis. This field can be used as a filter in - // list requests. - grafeas.v1.NoteKind kind = 4; - - // URLs associated with this note. - repeated grafeas.v1.RelatedUrl related_url = 5; - - // Time of expiration for this note. Empty if note does not expire. - google.protobuf.Timestamp expiration_time = 6; - - // Output only. The time this note was created. This field can be used as a - // filter in list requests. - google.protobuf.Timestamp create_time = 7; - - // Output only. The time this note was last updated. This field can be used as - // a filter in list requests. - google.protobuf.Timestamp update_time = 8; - - // Other notes related to this note. - repeated string related_note_names = 9; - - // Required. Immutable. The type of analysis this note represents. - oneof type { - // A note describing a package vulnerability. - grafeas.v1.VulnerabilityNote vulnerability = 10; - // A note describing build provenance for a verifiable build. - grafeas.v1.BuildNote build = 11; - // A note describing a base image. - grafeas.v1.ImageNote image = 12; - // A note describing a package hosted by various package managers. - grafeas.v1.PackageNote package = 13; - // A note describing something that can be deployed. - grafeas.v1.DeploymentNote deployment = 14; - // A note describing the initial analysis of a resource. - grafeas.v1.DiscoveryNote discovery = 15; - // A note describing an attestation role. - grafeas.v1.AttestationNote attestation = 16; - // A note describing available package upgrades. - grafeas.v1.UpgradeNote upgrade = 17; - // A note describing a compliance check. - grafeas.v1.ComplianceNote compliance = 18; - // A note describing a dsse attestation note. - grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - // A note describing a vulnerability assessment. - grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - } -} - -// Request to get an occurrence. -message GetOccurrenceRequest { - // The name of the occurrence in the form of - // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Occurrence" - ]; -} - -// Request to list occurrences. -message ListOccurrencesRequest { - // The name of the project to list occurrences for in the form of - // `projects/[PROJECT_ID]`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - - // The filter expression. - string filter = 2; - - // Number of occurrences to return in the list. Must be positive. Max allowed - // page size is 1000. If not specified, page size defaults to 20. - int32 page_size = 3; - - // Token to provide to skip to a particular spot in the list. - string page_token = 4; -} - -// Response for listing occurrences. -message ListOccurrencesResponse { - // The occurrences requested. - repeated Occurrence occurrences = 1; - // The next pagination token in the list response. It should be used as - // `page_token` for the following request. An empty value means no more - // results. - string next_page_token = 2; -} - -// Request to delete an occurrence. -message DeleteOccurrenceRequest { - // The name of the occurrence in the form of - // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Occurrence" - ]; -} - -// Request to create a new occurrence. -message CreateOccurrenceRequest { - // The name of the project in the form of `projects/[PROJECT_ID]`, under which - // the occurrence is to be created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - // The occurrence to create. - Occurrence occurrence = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request to update an occurrence. -message UpdateOccurrenceRequest { - // The name of the occurrence in the form of - // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Occurrence" - ]; - // The updated occurrence. - Occurrence occurrence = 2 [(google.api.field_behavior) = REQUIRED]; - // The fields to update. - google.protobuf.FieldMask update_mask = 3; -} - -// Request to get a note. -message GetNoteRequest { - // The name of the note in the form of - // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Note" - ]; -} - -// Request to get the note to which the specified occurrence is attached. -message GetOccurrenceNoteRequest { - // The name of the occurrence in the form of - // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Occurrence" - ]; -} - -// Request to list notes. -message ListNotesRequest { - // The name of the project to list notes for in the form of - // `projects/[PROJECT_ID]`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - - // The filter expression. - string filter = 2; - - // Number of notes to return in the list. Must be positive. Max allowed page - // size is 1000. If not specified, page size defaults to 20. - int32 page_size = 3; - - // Token to provide to skip to a particular spot in the list. - string page_token = 4; -} - -// Response for listing notes. -message ListNotesResponse { - // The notes requested. - repeated Note notes = 1; - // The next pagination token in the list response. It should be used as - // `page_token` for the following request. An empty value means no more - // results. - string next_page_token = 2; -} - -// Request to delete a note. -message DeleteNoteRequest { - // The name of the note in the form of - // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Note" - ]; -} - -// Request to create a new note. -message CreateNoteRequest { - // The name of the project in the form of `projects/[PROJECT_ID]`, under which - // the note is to be created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - // The ID to use for this note. - string note_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The note to create. - Note note = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request to update a note. -message UpdateNoteRequest { - // The name of the note in the form of - // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Note" - ]; - // The updated note. - Note note = 2 [(google.api.field_behavior) = REQUIRED]; - // The fields to update. - google.protobuf.FieldMask update_mask = 3; -} - -// Request to list occurrences for a note. -message ListNoteOccurrencesRequest { - // The name of the note to list occurrences for in the form of - // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Note" - ]; - // The filter expression. - string filter = 2; - // Number of occurrences to return in the list. - int32 page_size = 3; - // Token to provide to skip to a particular spot in the list. - string page_token = 4; -} - -// Response for listing occurrences for a note. -message ListNoteOccurrencesResponse { - // The occurrences attached to the specified note. - repeated Occurrence occurrences = 1; - // Token to provide to skip to a particular spot in the list. - string next_page_token = 2; -} - -// Request to create notes in batch. -message BatchCreateNotesRequest { - // The name of the project in the form of `projects/[PROJECT_ID]`, under which - // the notes are to be created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - - // The notes to create. Max allowed length is 1000. - map notes = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Response for creating notes in batch. -message BatchCreateNotesResponse { - // The notes that were created. - repeated Note notes = 1; -} - -// Request to create occurrences in batch. -message BatchCreateOccurrencesRequest { - // The name of the project in the form of `projects/[PROJECT_ID]`, under which - // the occurrences are to be created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - - // The occurrences to create. Max allowed length is 1000. - repeated Occurrence occurrences = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Response for creating occurrences in batch. -message BatchCreateOccurrencesResponse { - // The occurrences that were created. - repeated Occurrence occurrences = 1; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto deleted file mode 100644 index 9ac162cec22f..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/image.proto +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Layer holds metadata specific to a layer of a Docker image. -message Layer { - // Required. The recovered Dockerfile directive used to construct this layer. - // See https://docs.docker.com/engine/reference/builder/ for more information. - string directive = 1; - - // The recovered arguments to the Dockerfile directive. - string arguments = 2; -} - -// A set of properties that uniquely identify a given Docker image. -message Fingerprint { - // Required. The layer ID of the final layer in the Docker image's v1 - // representation. - string v1_name = 1; - - // Required. The ordered list of v2 blobs that represent a given image. - repeated string v2_blob = 2; - - // Output only. The name of the image's v2 blobs computed via: - // [bottom] := v2_blob[bottom] - // [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) - // Only the name of the final blob is kept. - string v2_name = 3; -} - -// Basis describes the base image portion (Note) of the DockerImage -// relationship. Linked occurrences are derived from this or an equivalent image -// via: -// FROM -// Or an equivalent reference, e.g., a tag of the resource_url. -message ImageNote { - // Required. Immutable. The resource_url for the resource representing the - // basis of associated occurrence images. - string resource_url = 1; - - // Required. Immutable. The fingerprint of the base image. - Fingerprint fingerprint = 2; -} - -// Details of the derived image portion of the DockerImage relationship. This -// image would be produced from a Dockerfile with FROM . -message ImageOccurrence { - // Required. The fingerprint of the derived image. - Fingerprint fingerprint = 1; - - // Output only. The number of layers by which this image differs from the - // associated image basis. - int32 distance = 2; - - // This contains layer-specific metadata, if populated it has length - // "distance" and is ordered with [distance] being the layer immediately - // following the base image and [1] being the final layer. - repeated Layer layer_info = 3; - - // Output only. This contains the base image URL for the derived image - // occurrence. - string base_resource_url = 4; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto deleted file mode 100644 index 78886b66e487..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_provenance.proto +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2021 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; -option java_outer_classname = "InTotoProvenanceProto"; - -// Spec defined at -// https://github.com/in-toto/attestation/blob/main/spec/predicates/provenance.md - -// Steps taken to build the artifact. -// For a TaskRun, typically each container corresponds to one step in the -// recipe. -message Recipe { - // URI indicating what type of recipe was performed. It determines the meaning - // of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. - string type = 1; - // Index in materials containing the recipe steps that are not implied by - // recipe.type. For example, if the recipe type were "make", then this would - // point to the source containing the Makefile, not the make program itself. - // Set to -1 if the recipe doesn't come from a material, as zero is default - // unset value for int64. - int64 defined_in_material = 2; - // String identifying the entry point into the build. - // This is often a path to a configuration file and/or a target label within - // that file. The syntax and meaning are defined by recipe.type. For example, - // if the recipe type were "make", then this would reference the directory in - // which to run make as well as which target to use. - string entry_point = 3; - // Collection of all external inputs that influenced the build on top of - // recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe - // type were "make", then this might be the flags passed to make aside from - // the target, which is captured in recipe.entryPoint. Since the arguments - // field can greatly vary in structure, depending on the builder and recipe - // type, this is of form "Any". - repeated google.protobuf.Any arguments = 4; - // Any other builder-controlled inputs necessary for correctly evaluating the - // recipe. Usually only needed for reproducing the build but not evaluated as - // part of policy. Since the environment field can greatly vary in structure, - // depending on the builder and recipe type, this is of form "Any". - repeated google.protobuf.Any environment = 5; -} - -// Indicates that the builder claims certain fields in this message to be -// complete. -message Completeness { - // If true, the builder claims that recipe.arguments is complete, meaning that - // all external inputs are properly captured in the recipe. - bool arguments = 1; - // If true, the builder claims that recipe.environment is claimed to be - // complete. - bool environment = 2; - // If true, the builder claims that materials are complete, usually through - // some controls to prevent network access. Sometimes called "hermetic". - bool materials = 3; -} - -// Other properties of the build. -message Metadata { - // Identifies the particular build invocation, which can be useful for finding - // associated logs or other ad-hoc analysis. The value SHOULD be globally - // unique, per in-toto Provenance spec. - string build_invocation_id = 1; - // The timestamp of when the build started. - google.protobuf.Timestamp build_started_on = 2; - // The timestamp of when the build completed. - google.protobuf.Timestamp build_finished_on = 3; - // Indicates that the builder claims certain fields in this message to be - // complete. - Completeness completeness = 4; - // If true, the builder claims that running the recipe on materials will - // produce bit-for-bit identical output. - bool reproducible = 5; -} - -message BuilderConfig { - string id = 1; -} - -message InTotoProvenance { - BuilderConfig builder_config = 1; // required - // Identifies the configuration used for the build. - // When combined with materials, this SHOULD fully describe the build, - // such that re-running this recipe results in bit-for-bit identical output - // (if the build is reproducible). - Recipe recipe = 2; // required - Metadata metadata = 3; - // The collection of artifacts that influenced the build including sources, - // dependencies, build tools, base images, and so on. This is considered to be - // incomplete unless metadata.completeness.materials is true. Unset or null is - // equivalent to empty. - repeated string materials = 4; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto deleted file mode 100644 index 1f798d0d65f1..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/intoto_statement.proto +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2021 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "grafeas/v1/intoto_provenance.proto"; -import "grafeas/v1/slsa_provenance.proto"; -import "grafeas/v1/slsa_provenance_zero_two.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; -option java_outer_classname = "InTotoStatementProto"; - -// Spec defined at -// https://github.com/in-toto/attestation/tree/main/spec#statement The -// serialized InTotoStatement will be stored as Envelope.payload. -// Envelope.payloadType is always "application/vnd.in-toto+json". -message InTotoStatement { - // Always `https://in-toto.io/Statement/v0.1`. - string type = 1 [json_name = "_type"]; - repeated Subject subject = 2; - // `https://slsa.dev/provenance/v0.1` for SlsaProvenance. - string predicate_type = 3; - oneof predicate { - InTotoProvenance provenance = 4; - SlsaProvenance slsa_provenance = 5; - SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - } -} -message Subject { - string name = 1; - // `"": ""` - // Algorithms can be e.g. sha256, sha512 - // See - // https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet - map digest = 2; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto deleted file mode 100644 index 61b21dbf0323..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/package.proto +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/api/field_behavior.proto"; -import "grafeas/v1/common.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Instruction set architectures supported by various package managers. -enum Architecture { - // Unknown architecture. - ARCHITECTURE_UNSPECIFIED = 0; - // X86 architecture. - X86 = 1; - // X64 architecture. - X64 = 2; -} - -// This represents a particular channel of distribution for a given package. -// E.g., Debian's jessie-backports dpkg mirror. -message Distribution { - // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - // denoting the package manager version distributing a package. - string cpe_uri = 1 [(google.api.field_behavior) = REQUIRED]; - - // The CPU architecture for which packages in this distribution channel were - // built. - Architecture architecture = 2; - - // The latest available version of this package in this distribution channel. - Version latest_version = 3; - - // A freeform string denoting the maintainer of this package. - string maintainer = 4; - - // The distribution channel-specific homepage for this package. - string url = 5; - - // The distribution channel-specific description of this package. - string description = 6; -} - -// An occurrence of a particular package installation found within a system's -// filesystem. E.g., glibc was found in `/var/lib/dpkg/status`. -message Location { - // Deprecated. - // The CPE URI in [CPE format](https://cpe.mitre.org/specification/) - string cpe_uri = 1; - - // Deprecated. - // The version installed at this location. - Version version = 2; - - // The path from which we gathered that this package/version is installed. - string path = 3; -} - -// PackageNote represents a particular package version. -message PackageNote { - // The name of the package. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Deprecated. - // The various channels by which a package is distributed. - repeated Distribution distribution = 10; - - // The type of package; whether native or non native (e.g., ruby gems, - // node.js packages, etc.). - string package_type = 11; - - // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - // denoting the package manager version distributing a package. - // The cpe_uri will be blank for language packages. - string cpe_uri = 12; - - // The CPU architecture for which packages in this distribution channel were - // built. Architecture will be blank for language packages. - Architecture architecture = 13; - - // The version of the package. - Version version = 14; - - // A freeform text denoting the maintainer of this package. - string maintainer = 15; - - // The homepage for this package. - string url = 16; - - // The description of this package. - string description = 17; - - // Licenses that have been declared by the authors of the package. - License license = 18; - - // Hash value, typically a file digest, that allows unique - // identification a specific package. - repeated Digest digest = 19; -} - -// Details on how a particular software package was installed on a system. -message PackageOccurrence { - // The name of the installed package. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // All of the places within the filesystem versions of this package - // have been found. - repeated Location location = 2; - - // The type of package; whether native or non native (e.g., ruby gems, - // node.js packages, etc.). - string package_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - // denoting the package manager version distributing a package. - // The cpe_uri will be blank for language packages. - string cpe_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The CPU architecture for which packages in this distribution channel were - // built. Architecture will be blank for language packages. - Architecture architecture = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Licenses that have been declared by the authors of the package. - License license = 6; - - // The version of the package. - Version version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Version contains structured information about the version of a package. -message Version { - // Used to correct mistakes in the version numbering scheme. - int32 epoch = 1; - - // Required only when version kind is NORMAL. The main part of the version - // name. - string name = 2; - - // The iteration of the package build from the above version. - string revision = 3; - - // Whether this version is specifying part of an inclusive range. Grafeas - // does not have the capability to specify version ranges; instead we have - // fields that specify start version and end versions. At times this is - // insufficient - we also need to specify whether the version is included in - // the range or is excluded from the range. This boolean is expected to be set - // to true when the version is included in a range. - bool inclusive = 6; - - // Whether this is an ordinary package version or a sentinel MIN/MAX version. - enum VersionKind { - // Unknown. - VERSION_KIND_UNSPECIFIED = 0; - // A standard package version. - NORMAL = 1; - // A special version representing negative infinity. - MINIMUM = 2; - // A special version representing positive infinity. - MAXIMUM = 3; - } - - // Required. Distinguishes between sentinel MIN/MAX versions and normal - // versions. - VersionKind kind = 4; - - // Human readable version string. This string is of the form - // :- and is only set when kind is NORMAL. - string full_name = 5; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto deleted file mode 100644 index 06b109785f8a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/provenance.proto +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Provenance of a build. Contains all information needed to verify the full -// details about the build from source to completion. -message BuildProvenance { - // Required. Unique identifier of the build. - string id = 1; - - // ID of the project. - string project_id = 2; - - // Commands requested by the build. - repeated Command commands = 3; - - // Output of the build. - repeated Artifact built_artifacts = 4; - - // Time at which the build was created. - google.protobuf.Timestamp create_time = 5; - - // Time at which execution of the build was started. - google.protobuf.Timestamp start_time = 6; - - // Time at which execution of the build was finished. - google.protobuf.Timestamp end_time = 7; - - // E-mail address of the user who initiated this build. Note that this was the - // user's e-mail address at the time the build was initiated; this address may - // not represent the same end-user for all time. - string creator = 8; - - // URI where any logs for this provenance were written. - string logs_uri = 9; - - // Details of the Source input to the build. - Source source_provenance = 10; - - // Trigger identifier if the build was triggered automatically; empty if not. - string trigger_id = 11; - - // Special options applied to this build. This is a catch-all field where - // build providers can enter any desired additional details. - map build_options = 12; - - // Version string of the builder at the time this build was executed. - string builder_version = 13; -} - -// Source describes the location of the source used for the build. -message Source { - // If provided, the input binary artifacts for the build came from this - // location. - string artifact_storage_source_uri = 1; - - // Hash(es) of the build source, which can be used to verify that the original - // source integrity was maintained in the build. - // - // The keys to this map are file paths used as build source and the values - // contain the hash values for those files. - // - // If the build source came in a single package such as a gzipped tarfile - // (.tar.gz), the FileHash will be for the single path to that file. - map file_hashes = 2; - - // If provided, the source code used for the build came from this location. - SourceContext context = 3; - - // If provided, some of the source code used for the build may be found in - // these locations, in the case where the source repository had multiple - // remotes or submodules. This list will not include the context specified in - // the context field. - repeated SourceContext additional_contexts = 4; -} - -// Container message for hashes of byte content of files, used in source -// messages to verify integrity of source input to the build. -message FileHashes { - // Required. Collection of file hashes. - repeated Hash file_hash = 1; -} - -// Container message for hash values. -message Hash { - // Required. The type of hash that was performed, e.g. "SHA-256". - string type = 1; - // Required. The hash value. - bytes value = 2; -} - -// Command describes a step performed as part of the build pipeline. -message Command { - // Required. Name of the command, as presented on the command line, or if the - // command is packaged as a Docker container, as presented to `docker pull`. - string name = 1; - - // Environment variables set before running this command. - repeated string env = 2; - - // Command-line arguments used when executing this command. - repeated string args = 3; - - // Working directory (relative to project source root) used when running this - // command. - string dir = 4; - - // Optional unique identifier for this command, used in wait_for to reference - // this command as a dependency. - string id = 5; - - // The ID(s) of the command(s) that this command depends on. - repeated string wait_for = 6; -} - -// Artifact describes a build product. -message Artifact { - // Hash or checksum value of a binary, or Docker Registry 2.0 digest of a - // container. - string checksum = 1; - - // Artifact ID, if any; for container images, this will be a URL by digest - // like `gcr.io/projectID/imagename@sha256:123456`. - string id = 2; - - // Related artifact names. This may be the path to a binary or jar file, or in - // the case of a container build, the name used to push the container image to - // Google Container Registry, as presented to `docker push`. Note that a - // single Artifact ID can have multiple names, for example if two tags are - // applied to one image. - repeated string names = 3; -} - -// A SourceContext is a reference to a tree of files. A SourceContext together -// with a path point to a unique revision of a single file or directory. -message SourceContext { - // A SourceContext can refer any one of the following types of repositories. - oneof context { - // A SourceContext referring to a revision in a Google Cloud Source Repo. - CloudRepoSourceContext cloud_repo = 1; - - // A SourceContext referring to a Gerrit project. - GerritSourceContext gerrit = 2; - - // A SourceContext referring to any third party Git repo (e.g., GitHub). - GitSourceContext git = 3; - } - - // Labels with user defined metadata. - map labels = 4; -} - -// An alias to a repo revision. -message AliasContext { - // The type of an alias. - enum Kind { - // Unknown. - KIND_UNSPECIFIED = 0; - // Git tag. - FIXED = 1; - // Git branch. - MOVABLE = 2; - // Used to specify non-standard aliases. For example, if a Git repo has a - // ref named "refs/foo/bar". - OTHER = 4; - } - - // The alias kind. - Kind kind = 1; - - // The alias name. - string name = 2; -} - -// A CloudRepoSourceContext denotes a particular revision in a Google Cloud -// Source Repo. -message CloudRepoSourceContext { - // The ID of the repo. - RepoId repo_id = 1; - - // A revision in a Cloud Repo can be identified by either its revision ID or - // its alias. - oneof revision { - // A revision ID. - string revision_id = 2; - - // An alias, which may be a branch or tag. - AliasContext alias_context = 3; - } -} - -// A SourceContext referring to a Gerrit project. -message GerritSourceContext { - // The URI of a running Gerrit instance. - string host_uri = 1; - - // The full project name within the host. Projects may be nested, so - // "project/subproject" is a valid project name. The "repo name" is the - // hostURI/project. - string gerrit_project = 2; - - // A revision in a Gerrit project can be identified by either its revision ID - // or its alias. - oneof revision { - // A revision (commit) ID. - string revision_id = 3; - - // An alias, which may be a branch or tag. - AliasContext alias_context = 4; - } -} - -// A GitSourceContext denotes a particular revision in a third party Git -// repository (e.g., GitHub). -message GitSourceContext { - // Git repository URL. - string url = 1; - - // Git commit hash. - string revision_id = 2; -} - -// A unique identifier for a Cloud Repo. -message RepoId { - // A cloud repo can be identified by either its project ID and repository name - // combination, or its globally unique identifier. - oneof id { - // A combination of a project ID and a repo name. - ProjectRepoId project_repo_id = 1; - - // A server-assigned, globally unique identifier. - string uid = 2; - } -} - -// Selects a repo using a Google Cloud Platform project ID (e.g., -// winged-cargo-31) and a repo name within that project. -message ProjectRepoId { - // The ID of the project. - string project_id = 1; - - // The name of the repo. Leave empty for the default repo. - string repo_name = 2; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto deleted file mode 100644 index cc9cc384535a..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/severity.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Note provider assigned severity/impact ranking. -enum Severity { - // Unknown. - SEVERITY_UNSPECIFIED = 0; - // Minimal severity. - MINIMAL = 1; - // Low severity. - LOW = 2; - // Medium severity. - MEDIUM = 3; - // High severity. - HIGH = 4; - // Critical severity. - CRITICAL = 5; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto deleted file mode 100644 index c038af064e0e..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance.proto +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2021 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; -option java_outer_classname = "SlsaProvenanceProto"; - -message SlsaProvenance { - // Steps taken to build the artifact. - // For a TaskRun, typically each container corresponds to one step in the - // recipe. - message SlsaRecipe { - // URI indicating what type of recipe was performed. It determines the - // meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and - // materials. - string type = 1; - // Index in materials containing the recipe steps that are not implied by - // recipe.type. For example, if the recipe type were "make", then this would - // point to the source containing the Makefile, not the make program itself. - // Set to -1 if the recipe doesn't come from a material, as zero is default - // unset value for int64. - int64 defined_in_material = 2; - // String identifying the entry point into the build. - // This is often a path to a configuration file and/or a target label within - // that file. The syntax and meaning are defined by recipe.type. For - // example, if the recipe type were "make", then this would reference the - // directory in which to run make as well as which target to use. - string entry_point = 3; - // Collection of all external inputs that influenced the build on top of - // recipe.definedInMaterial and recipe.entryPoint. For example, if the - // recipe type were "make", then this might be the flags passed to make - // aside from the target, which is captured in recipe.entryPoint. Depending - // on the recipe Type, the structure may be different. - google.protobuf.Any arguments = 4; - // Any other builder-controlled inputs necessary for correctly evaluating - // the recipe. Usually only needed for reproducing the build but not - // evaluated as part of policy. Depending on the recipe Type, the structure - // may be different. - google.protobuf.Any environment = 5; - } - - // Indicates that the builder claims certain fields in this message to be - // complete. - message SlsaCompleteness { - // If true, the builder claims that recipe.arguments is complete, meaning - // that all external inputs are properly captured in the recipe. - bool arguments = 1; - // If true, the builder claims that recipe.environment is claimed to be - // complete. - bool environment = 2; - // If true, the builder claims that materials are complete, usually through - // some controls to prevent network access. Sometimes called "hermetic". - bool materials = 3; - } - - // Other properties of the build. - message SlsaMetadata { - // Identifies the particular build invocation, which can be useful for - // finding associated logs or other ad-hoc analysis. The value SHOULD be - // globally unique, per in-toto Provenance spec. - string build_invocation_id = 1; - // The timestamp of when the build started. - google.protobuf.Timestamp build_started_on = 2; - // The timestamp of when the build completed. - google.protobuf.Timestamp build_finished_on = 3; - // Indicates that the builder claims certain fields in this message to be - // complete. - SlsaCompleteness completeness = 4; - // If true, the builder claims that running the recipe on materials will - // produce bit-for-bit identical output. - bool reproducible = 5; - } - - message SlsaBuilder { - string id = 1; - } - - message Material { - string uri = 1; - map digest = 2; - } - - SlsaBuilder builder = 1; // required - // Identifies the configuration used for the build. - // When combined with materials, this SHOULD fully describe the build, - // such that re-running this recipe results in bit-for-bit identical output - // (if the build is reproducible). - SlsaRecipe recipe = 2; // required - SlsaMetadata metadata = 3; - // The collection of artifacts that influenced the build including sources, - // dependencies, build tools, base images, and so on. This is considered to be - // incomplete unless metadata.completeness.materials is true. Unset or null is - // equivalent to empty. - repeated Material materials = 4; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto deleted file mode 100644 index 11cdd1c0ba59..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2021 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; -option java_outer_classname = "SlsaProvenanceZeroTwoProto"; - -message SlsaProvenanceZeroTwo { - // See full explanation of fields at slsa.dev/provenance/v0.2. - - // Identifies the entity that executed the recipe, which is trusted to have - // correctly performed the operation and populated this provenance. - message SlsaBuilder { - string id = 1; - } - - // The collection of artifacts that influenced the build including sources, - // dependencies, build tools, base images, and so on. - message SlsaMaterial { - string uri = 1; - map digest = 2; - } - - // Identifies the event that kicked off the build. - message SlsaInvocation { - SlsaConfigSource config_source = 1; - google.protobuf.Struct parameters = 2; - google.protobuf.Struct environment = 3; - } - - // Describes where the config file that kicked off the build came from. - // This is effectively a pointer to the source where buildConfig came from. - message SlsaConfigSource { - string uri = 1; - map digest = 2; - string entry_point = 3; - } - - // Other properties of the build. - message SlsaMetadata { - string build_invocation_id = 1; - google.protobuf.Timestamp build_started_on = 2; - google.protobuf.Timestamp build_finished_on = 3; - SlsaCompleteness completeness = 4; - bool reproducible = 5; - } - - // Indicates that the builder claims certain fields in this message to be - // complete. - message SlsaCompleteness { - bool parameters = 1; - bool environment = 2; - bool materials = 3; - } - - SlsaBuilder builder = 1; - string build_type = 2; - SlsaInvocation invocation = 3; - google.protobuf.Struct build_config = 4; - SlsaMetadata metadata = 5; - repeated SlsaMaterial materials = 6; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto deleted file mode 100644 index 89d389299199..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/upgrade.proto +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/timestamp.proto"; -import "grafeas/v1/package.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// An Upgrade Note represents a potential upgrade of a package to a given -// version. For each package version combination (i.e. bash 4.0, bash 4.1, -// bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field -// represents the information related to the update. -message UpgradeNote { - // Required for non-Windows OS. The package this Upgrade is for. - string package = 1; - // Required for non-Windows OS. The version of the package in machine + human - // readable form. - grafeas.v1.Version version = 2; - // Metadata about the upgrade for each specific operating system. - repeated UpgradeDistribution distributions = 3; - // Required for Windows OS. Represents the metadata about the Windows update. - WindowsUpdate windows_update = 4; -} - -// The Upgrade Distribution represents metadata about the Upgrade for each -// operating system (CPE). Some distributions have additional metadata around -// updates, classifying them into various categories and severities. -message UpgradeDistribution { - // Required - The specific operating system this metadata applies to. See - // https://cpe.mitre.org/specification/. - string cpe_uri = 1; - // The operating system classification of this Upgrade, as specified by the - // upstream operating system upgrade feed. For Windows the classification is - // one of the category_ids listed at - // https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) - string classification = 2; - // The severity as specified by the upstream operating system. - string severity = 3; - // The cve tied to this Upgrade. - repeated string cve = 4; -} - -// Windows Update represents the metadata about the update for the Windows -// operating system. The fields in this message come from the Windows Update API -// documented at -// https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate. -message WindowsUpdate { - // The unique identifier of the update. - message Identity { - // The revision independent identifier of the update. - string update_id = 1; - // The revision number of the update. - int32 revision = 2; - } - // Required - The unique identifier for the update. - Identity identity = 1; - // The localized title of the update. - string title = 2; - // The localized description of the update. - string description = 3; - // The category to which the update belongs. - message Category { - // The identifier of the category. - string category_id = 1; - // The localized name of the category. - string name = 2; - } - // The list of categories to which the update belongs. - repeated Category categories = 4; - // The Microsoft Knowledge Base article IDs that are associated with the - // update. - repeated string kb_article_ids = 5; - // The hyperlink to the support information for the update. - string support_url = 6; - // The last published timestamp of the update. - google.protobuf.Timestamp last_published_timestamp = 7; -} - -// An Upgrade Occurrence represents that a specific resource_url could install a -// specific upgrade. This presence is supplied via local sources (i.e. it is -// present in the mirror and the running system has noticed its availability). -// For Windows, both distribution and windows_update contain information for the -// Windows update. -message UpgradeOccurrence { - // Required for non-Windows OS. The package this Upgrade is for. - string package = 1; - // Required for non-Windows OS. The version of the package in a machine + - // human readable form. - grafeas.v1.Version parsed_version = 3; - // Metadata about the upgrade for available for the specific operating system - // for the resource_url. This allows efficient filtering, as well as - // making it easier to use the occurrence. - UpgradeDistribution distribution = 4; - // Required for Windows OS. Represents the metadata about the Windows update. - WindowsUpdate windows_update = 5; -} diff --git a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto b/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto deleted file mode 100644 index 3b316eb8dd37..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/main/proto/grafeas/v1/vulnerability.proto +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; -import "grafeas/v1/common.proto"; -import "grafeas/v1/cvss.proto"; -import "grafeas/v1/package.proto"; -import "grafeas/v1/severity.proto"; -import "grafeas/v1/vex.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// A security vulnerability that can be found in resources. -message VulnerabilityNote { - // The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 - // where 0 indicates low severity and 10 indicates high severity. - float cvss_score = 1; - - // The note provider assigned severity of this vulnerability. - grafeas.v1.Severity severity = 2; - - // Details of all known distros and packages affected by this vulnerability. - repeated Detail details = 3; - - // A detail for a distro and package affected by this vulnerability and its - // associated fix (if one is available). - message Detail { - // The distro assigned severity of this vulnerability. - string severity_name = 1; - - // A vendor-specific description of this vulnerability. - string description = 2; - - // The type of package; whether native or non native (e.g., ruby gems, - // node.js packages, etc.). - string package_type = 3; - - // Required. The [CPE URI](https://cpe.mitre.org/specification/) this - // vulnerability affects. - string affected_cpe_uri = 4; - - // Required. The package this vulnerability affects. - string affected_package = 5; - - // The version number at the start of an interval in which this - // vulnerability exists. A vulnerability can affect a package between - // version numbers that are disjoint sets of intervals (example: - // [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be - // represented in its own Detail. If a specific affected version is provided - // by a vulnerability database, affected_version_start and - // affected_version_end will be the same in that Detail. - grafeas.v1.Version affected_version_start = 6; - - // The version number at the end of an interval in which this vulnerability - // exists. A vulnerability can affect a package between version numbers - // that are disjoint sets of intervals (example: [1.0.0-1.1.0], - // [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its - // own Detail. If a specific affected version is provided by a vulnerability - // database, affected_version_start and affected_version_end will be the - // same in that Detail. - grafeas.v1.Version affected_version_end = 7; - - // The distro recommended [CPE URI](https://cpe.mitre.org/specification/) - // to update to that contains a fix for this vulnerability. It is possible - // for this to be different from the affected_cpe_uri. - string fixed_cpe_uri = 8; - - // The distro recommended package to update to that contains a fix for this - // vulnerability. It is possible for this to be different from the - // affected_package. - string fixed_package = 9; - - // The distro recommended version to update to that contains a - // fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no - // such version is yet available. - grafeas.v1.Version fixed_version = 10; - - // Whether this detail is obsolete. Occurrences are expected not to point to - // obsolete details. - bool is_obsolete = 11; - - // The time this information was last changed at the source. This is an - // upstream timestamp from the underlying information source - e.g. Ubuntu - // security tracker. - google.protobuf.Timestamp source_update_time = 12; - - // The source from which the information in this Detail was obtained. - string source = 13; - - // The name of the vendor of the product. - string vendor = 14; - } - - // The full description of the CVSSv3 for this vulnerability. - CVSSv3 cvss_v3 = 4; - - // Windows details get their own format because the information format and - // model don't match a normal detail. Specifically Windows updates are done as - // patches, thus Windows vulnerabilities really are a missing package, rather - // than a package being at an incorrect version. - repeated WindowsDetail windows_details = 5; - - message WindowsDetail { - // Required. The [CPE URI](https://cpe.mitre.org/specification/) this - // vulnerability affects. - string cpe_uri = 1; - - // Required. The name of this vulnerability. - string name = 2; - - // The description of this vulnerability. - string description = 3; - - // Required. The names of the KBs which have hotfixes to mitigate this - // vulnerability. Note that there may be multiple hotfixes (and thus - // multiple KBs) that mitigate a given vulnerability. Currently any listed - // KBs presence is considered a fix. - repeated KnowledgeBase fixing_kbs = 4; - - message KnowledgeBase { - // The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). - string name = 1; - // A link to the KB in the [Windows update catalog] - // (https://www.catalog.update.microsoft.com/). - string url = 2; - } - } - - // The time this information was last changed at the source. This is an - // upstream timestamp from the underlying information source - e.g. Ubuntu - // security tracker. - google.protobuf.Timestamp source_update_time = 6; - - // CVSS version used to populate cvss_score and severity. - grafeas.v1.CVSSVersion cvss_version = 7; - - // The full description of the v2 CVSS for this vulnerability. - CVSS cvss_v2 = 8; - - // Next free ID is 9. -} - -// An occurrence of a severity vulnerability on a resource. -message VulnerabilityOccurrence { - // The type of package; whether native or non native (e.g., ruby gems, node.js - // packages, etc.). - string type = 1; - - // Output only. The note provider assigned severity of this vulnerability. - grafeas.v1.Severity severity = 2; - - // Output only. The CVSS score of this vulnerability. CVSS score is on a - // scale of 0 - 10 where 0 indicates low severity and 10 indicates high - // severity. - float cvss_score = 3; - - // The cvss v3 score for the vulnerability. - CVSS cvssv3 = 10; - - // Required. The set of affected locations and their fixes (if available) - // within the associated resource. - repeated PackageIssue package_issue = 4; - - // A detail for a distro and package this vulnerability occurrence was found - // in and its associated fix (if one is available). - message PackageIssue { - // Required. The [CPE URI](https://cpe.mitre.org/specification/) this - // vulnerability was found in. - string affected_cpe_uri = 1; - - // Required. The package this vulnerability was found in. - string affected_package = 2; - - // Required. The version of the package that is installed on the resource - // affected by this vulnerability. - grafeas.v1.Version affected_version = 3; - - // The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability - // was fixed in. It is possible for this to be different from the - // affected_cpe_uri. - string fixed_cpe_uri = 4; - - // The package this vulnerability was fixed in. It is possible for this to - // be different from the affected_package. - string fixed_package = 5; - - // Required. The version of the package this vulnerability was fixed in. - // Setting this to VersionKind.MAXIMUM means no fix is yet available. - grafeas.v1.Version fixed_version = 6; - - // Output only. Whether a fix is available for this package. - bool fix_available = 7; - - // The type of package (e.g. OS, MAVEN, GO). - string package_type = 8; - - // The distro or language system assigned severity for this vulnerability - // when that is available and note provider assigned severity when it is not - // available. - grafeas.v1.Severity effective_severity = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The location at which this package was found. - repeated FileLocation file_location = 10; - } - - // Output only. A one sentence description of this vulnerability. - string short_description = 5; - - // Output only. A detailed description of this vulnerability. - string long_description = 6; - - // Output only. URLs related to this vulnerability. - repeated grafeas.v1.RelatedUrl related_urls = 7; - - // The distro assigned severity for this vulnerability when it is available, - // otherwise this is the note provider assigned severity. - // - // When there are multiple PackageIssues for this vulnerability, they can have - // different effective severities because some might be provided by the distro - // while others are provided by the language ecosystem for a language pack. - // For this reason, it is advised to use the effective severity on the - // PackageIssue level. In the case where multiple PackageIssues have differing - // effective severities, this field should be the highest severity for any of - // the PackageIssues. - grafeas.v1.Severity effective_severity = 8; - - // Output only. Whether at least one of the affected packages has a fix - // available. - bool fix_available = 9; - - // Output only. CVSS version used to populate cvss_score and severity. - grafeas.v1.CVSSVersion cvss_version = 11; - - // The cvss v2 score for the vulnerability. - CVSS cvss_v2 = 12; - - // VexAssessment provides all publisher provided Vex information that is - // related to this vulnerability. - message VexAssessment { - // Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) - // tracking number for the vulnerability. - string cve = 1; - - // Holds a list of references associated with this vulnerability item and - // assessment. - repeated grafeas.v1.RelatedUrl related_uris = 2; - - // The VulnerabilityAssessment note from which this VexAssessment was - // generated. - // This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`. - // (-- api-linter: core::0122::name-suffix=disabled - // aip.dev/not-precedent: The suffix is kept for consistency. --) - string note_name = 3; - - // Provides the state of this Vulnerability assessment. - grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; - - // Contains information about the impact of this vulnerability, - // this will change with time. - repeated string impacts = 5; - - // Specifies details on how to handle (and presumably, fix) a vulnerability. - repeated grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation - remediations = 6; - - // Justification provides the justification when the state of the - // assessment if NOT_AFFECTED. - grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification - justification = 7; - - // Next ID: 8 - } - - VexAssessment vex_assessment = 13; - - // Next free ID is 14. -} diff --git a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java deleted file mode 100644 index e13560330bca..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/GrafeasClientTest.java +++ /dev/null @@ -1,1350 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import static io.grafeas.v1.GrafeasClient.ListNoteOccurrencesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListNotesPagedResponse; -import static io.grafeas.v1.GrafeasClient.ListOccurrencesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.common.collect.Lists; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class GrafeasClientTest { - private static MockGrafeas mockGrafeas; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private GrafeasClient client; - - @BeforeClass - public static void startStaticServer() { - mockGrafeas = new MockGrafeas(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockGrafeas)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - GrafeasSettings settings = - GrafeasSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = GrafeasClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void getOccurrenceTest() throws Exception { - Occurrence expectedResponse = - Occurrence.newBuilder() - .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) - .setResourceUri("resourceUri1234527870") - .setNoteName("noteName1580946845") - .setKind(NoteKind.forNumber(0)) - .setRemediation("remediation779381797") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEnvelope(Envelope.newBuilder().build()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - - Occurrence actualResponse = client.getOccurrence(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetOccurrenceRequest actualRequest = ((GetOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getOccurrenceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - client.getOccurrence(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getOccurrenceTest2() throws Exception { - Occurrence expectedResponse = - Occurrence.newBuilder() - .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) - .setResourceUri("resourceUri1234527870") - .setNoteName("noteName1580946845") - .setKind(NoteKind.forNumber(0)) - .setRemediation("remediation779381797") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEnvelope(Envelope.newBuilder().build()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - - Occurrence actualResponse = client.getOccurrence(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetOccurrenceRequest actualRequest = ((GetOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getOccurrenceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - client.getOccurrence(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listOccurrencesTest() throws Exception { - Occurrence responsesElement = Occurrence.newBuilder().build(); - ListOccurrencesResponse expectedResponse = - ListOccurrencesResponse.newBuilder() - .setNextPageToken("") - .addAllOccurrences(Arrays.asList(responsesElement)) - .build(); - mockGrafeas.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - String filter = "filter-1274492040"; - - ListOccurrencesPagedResponse pagedListResponse = client.listOccurrences(parent, filter); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListOccurrencesRequest actualRequest = ((ListOccurrencesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(filter, actualRequest.getFilter()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listOccurrencesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - String filter = "filter-1274492040"; - client.listOccurrences(parent, filter); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listOccurrencesTest2() throws Exception { - Occurrence responsesElement = Occurrence.newBuilder().build(); - ListOccurrencesResponse expectedResponse = - ListOccurrencesResponse.newBuilder() - .setNextPageToken("") - .addAllOccurrences(Arrays.asList(responsesElement)) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String parent = "parent-995424086"; - String filter = "filter-1274492040"; - - ListOccurrencesPagedResponse pagedListResponse = client.listOccurrences(parent, filter); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListOccurrencesRequest actualRequest = ((ListOccurrencesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(filter, actualRequest.getFilter()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listOccurrencesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String parent = "parent-995424086"; - String filter = "filter-1274492040"; - client.listOccurrences(parent, filter); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteOccurrenceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockGrafeas.addResponse(expectedResponse); - - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - - client.deleteOccurrence(name); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteOccurrenceRequest actualRequest = ((DeleteOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteOccurrenceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - client.deleteOccurrence(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteOccurrenceTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteOccurrence(name); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteOccurrenceRequest actualRequest = ((DeleteOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteOccurrenceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - client.deleteOccurrence(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createOccurrenceTest() throws Exception { - Occurrence expectedResponse = - Occurrence.newBuilder() - .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) - .setResourceUri("resourceUri1234527870") - .setNoteName("noteName1580946845") - .setKind(NoteKind.forNumber(0)) - .setRemediation("remediation779381797") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEnvelope(Envelope.newBuilder().build()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - Occurrence occurrence = Occurrence.newBuilder().build(); - - Occurrence actualResponse = client.createOccurrence(parent, occurrence); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateOccurrenceRequest actualRequest = ((CreateOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(occurrence, actualRequest.getOccurrence()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createOccurrenceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - Occurrence occurrence = Occurrence.newBuilder().build(); - client.createOccurrence(parent, occurrence); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createOccurrenceTest2() throws Exception { - Occurrence expectedResponse = - Occurrence.newBuilder() - .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) - .setResourceUri("resourceUri1234527870") - .setNoteName("noteName1580946845") - .setKind(NoteKind.forNumber(0)) - .setRemediation("remediation779381797") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEnvelope(Envelope.newBuilder().build()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String parent = "parent-995424086"; - Occurrence occurrence = Occurrence.newBuilder().build(); - - Occurrence actualResponse = client.createOccurrence(parent, occurrence); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateOccurrenceRequest actualRequest = ((CreateOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(occurrence, actualRequest.getOccurrence()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createOccurrenceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String parent = "parent-995424086"; - Occurrence occurrence = Occurrence.newBuilder().build(); - client.createOccurrence(parent, occurrence); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchCreateOccurrencesTest() throws Exception { - BatchCreateOccurrencesResponse expectedResponse = - BatchCreateOccurrencesResponse.newBuilder() - .addAllOccurrences(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - List occurrences = new ArrayList<>(); - - BatchCreateOccurrencesResponse actualResponse = - client.batchCreateOccurrences(parent, occurrences); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchCreateOccurrencesRequest actualRequest = - ((BatchCreateOccurrencesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(occurrences, actualRequest.getOccurrencesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchCreateOccurrencesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - List occurrences = new ArrayList<>(); - client.batchCreateOccurrences(parent, occurrences); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchCreateOccurrencesTest2() throws Exception { - BatchCreateOccurrencesResponse expectedResponse = - BatchCreateOccurrencesResponse.newBuilder() - .addAllOccurrences(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String parent = "parent-995424086"; - List occurrences = new ArrayList<>(); - - BatchCreateOccurrencesResponse actualResponse = - client.batchCreateOccurrences(parent, occurrences); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchCreateOccurrencesRequest actualRequest = - ((BatchCreateOccurrencesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(occurrences, actualRequest.getOccurrencesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchCreateOccurrencesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String parent = "parent-995424086"; - List occurrences = new ArrayList<>(); - client.batchCreateOccurrences(parent, occurrences); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateOccurrenceTest() throws Exception { - Occurrence expectedResponse = - Occurrence.newBuilder() - .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) - .setResourceUri("resourceUri1234527870") - .setNoteName("noteName1580946845") - .setKind(NoteKind.forNumber(0)) - .setRemediation("remediation779381797") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEnvelope(Envelope.newBuilder().build()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - Occurrence occurrence = Occurrence.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Occurrence actualResponse = client.updateOccurrence(name, occurrence, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateOccurrenceRequest actualRequest = ((UpdateOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(occurrence, actualRequest.getOccurrence()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateOccurrenceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - Occurrence occurrence = Occurrence.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateOccurrence(name, occurrence, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateOccurrenceTest2() throws Exception { - Occurrence expectedResponse = - Occurrence.newBuilder() - .setName(OccurrenceName.of("[PROJECT]", "[OCCURRENCE]").toString()) - .setResourceUri("resourceUri1234527870") - .setNoteName("noteName1580946845") - .setKind(NoteKind.forNumber(0)) - .setRemediation("remediation779381797") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEnvelope(Envelope.newBuilder().build()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - Occurrence occurrence = Occurrence.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Occurrence actualResponse = client.updateOccurrence(name, occurrence, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateOccurrenceRequest actualRequest = ((UpdateOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(occurrence, actualRequest.getOccurrence()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateOccurrenceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - Occurrence occurrence = Occurrence.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateOccurrence(name, occurrence, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getOccurrenceNoteTest() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - - Note actualResponse = client.getOccurrenceNote(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetOccurrenceNoteRequest actualRequest = ((GetOccurrenceNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getOccurrenceNoteExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); - client.getOccurrenceNote(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getOccurrenceNoteTest2() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - - Note actualResponse = client.getOccurrenceNote(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetOccurrenceNoteRequest actualRequest = ((GetOccurrenceNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getOccurrenceNoteExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - client.getOccurrenceNote(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getNoteTest() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - - Note actualResponse = client.getNote(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetNoteRequest actualRequest = ((GetNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getNoteExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - client.getNote(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getNoteTest2() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - - Note actualResponse = client.getNote(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetNoteRequest actualRequest = ((GetNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getNoteExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - client.getNote(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNotesTest() throws Exception { - Note responsesElement = Note.newBuilder().build(); - ListNotesResponse expectedResponse = - ListNotesResponse.newBuilder() - .setNextPageToken("") - .addAllNotes(Arrays.asList(responsesElement)) - .build(); - mockGrafeas.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - String filter = "filter-1274492040"; - - ListNotesPagedResponse pagedListResponse = client.listNotes(parent, filter); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getNotesList().get(0), resources.get(0)); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListNotesRequest actualRequest = ((ListNotesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(filter, actualRequest.getFilter()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listNotesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - String filter = "filter-1274492040"; - client.listNotes(parent, filter); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNotesTest2() throws Exception { - Note responsesElement = Note.newBuilder().build(); - ListNotesResponse expectedResponse = - ListNotesResponse.newBuilder() - .setNextPageToken("") - .addAllNotes(Arrays.asList(responsesElement)) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String parent = "parent-995424086"; - String filter = "filter-1274492040"; - - ListNotesPagedResponse pagedListResponse = client.listNotes(parent, filter); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getNotesList().get(0), resources.get(0)); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListNotesRequest actualRequest = ((ListNotesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(filter, actualRequest.getFilter()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listNotesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String parent = "parent-995424086"; - String filter = "filter-1274492040"; - client.listNotes(parent, filter); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteNoteTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockGrafeas.addResponse(expectedResponse); - - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - - client.deleteNote(name); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteNoteRequest actualRequest = ((DeleteNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteNoteExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - client.deleteNote(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteNoteTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteNote(name); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteNoteRequest actualRequest = ((DeleteNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteNoteExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - client.deleteNote(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNoteTest() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - String noteId = "noteId-1039694675"; - Note note = Note.newBuilder().build(); - - Note actualResponse = client.createNote(parent, noteId, note); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateNoteRequest actualRequest = ((CreateNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(noteId, actualRequest.getNoteId()); - Assert.assertEquals(note, actualRequest.getNote()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createNoteExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - String noteId = "noteId-1039694675"; - Note note = Note.newBuilder().build(); - client.createNote(parent, noteId, note); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNoteTest2() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String parent = "parent-995424086"; - String noteId = "noteId-1039694675"; - Note note = Note.newBuilder().build(); - - Note actualResponse = client.createNote(parent, noteId, note); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateNoteRequest actualRequest = ((CreateNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(noteId, actualRequest.getNoteId()); - Assert.assertEquals(note, actualRequest.getNote()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createNoteExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String parent = "parent-995424086"; - String noteId = "noteId-1039694675"; - Note note = Note.newBuilder().build(); - client.createNote(parent, noteId, note); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchCreateNotesTest() throws Exception { - BatchCreateNotesResponse expectedResponse = - BatchCreateNotesResponse.newBuilder().addAllNotes(new ArrayList()).build(); - mockGrafeas.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - Map notes = new HashMap<>(); - - BatchCreateNotesResponse actualResponse = client.batchCreateNotes(parent, notes); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchCreateNotesRequest actualRequest = ((BatchCreateNotesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(notes, actualRequest.getNotesMap()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchCreateNotesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - Map notes = new HashMap<>(); - client.batchCreateNotes(parent, notes); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchCreateNotesTest2() throws Exception { - BatchCreateNotesResponse expectedResponse = - BatchCreateNotesResponse.newBuilder().addAllNotes(new ArrayList()).build(); - mockGrafeas.addResponse(expectedResponse); - - String parent = "parent-995424086"; - Map notes = new HashMap<>(); - - BatchCreateNotesResponse actualResponse = client.batchCreateNotes(parent, notes); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchCreateNotesRequest actualRequest = ((BatchCreateNotesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(notes, actualRequest.getNotesMap()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchCreateNotesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String parent = "parent-995424086"; - Map notes = new HashMap<>(); - client.batchCreateNotes(parent, notes); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateNoteTest() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - Note note = Note.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Note actualResponse = client.updateNote(name, note, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateNoteRequest actualRequest = ((UpdateNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(note, actualRequest.getNote()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateNoteExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - Note note = Note.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateNote(name, note, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateNoteTest2() throws Exception { - Note expectedResponse = - Note.newBuilder() - .setName(NoteName.of("[PROJECT]", "[NOTE]").toString()) - .setShortDescription("shortDescription1951089120") - .setLongDescription("longDescription1763753952") - .setKind(NoteKind.forNumber(0)) - .addAllRelatedUrl(new ArrayList()) - .setExpirationTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .addAllRelatedNoteNames(new ArrayList()) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - Note note = Note.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Note actualResponse = client.updateNote(name, note, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateNoteRequest actualRequest = ((UpdateNoteRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(note, actualRequest.getNote()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateNoteExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - Note note = Note.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateNote(name, note, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNoteOccurrencesTest() throws Exception { - Occurrence responsesElement = Occurrence.newBuilder().build(); - ListNoteOccurrencesResponse expectedResponse = - ListNoteOccurrencesResponse.newBuilder() - .setNextPageToken("") - .addAllOccurrences(Arrays.asList(responsesElement)) - .build(); - mockGrafeas.addResponse(expectedResponse); - - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - String filter = "filter-1274492040"; - - ListNoteOccurrencesPagedResponse pagedListResponse = client.listNoteOccurrences(name, filter); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListNoteOccurrencesRequest actualRequest = ((ListNoteOccurrencesRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(filter, actualRequest.getFilter()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listNoteOccurrencesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); - String filter = "filter-1274492040"; - client.listNoteOccurrences(name, filter); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNoteOccurrencesTest2() throws Exception { - Occurrence responsesElement = Occurrence.newBuilder().build(); - ListNoteOccurrencesResponse expectedResponse = - ListNoteOccurrencesResponse.newBuilder() - .setNextPageToken("") - .addAllOccurrences(Arrays.asList(responsesElement)) - .build(); - mockGrafeas.addResponse(expectedResponse); - - String name = "name3373707"; - String filter = "filter-1274492040"; - - ListNoteOccurrencesPagedResponse pagedListResponse = client.listNoteOccurrences(name, filter); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getOccurrencesList().get(0), resources.get(0)); - - List actualRequests = mockGrafeas.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListNoteOccurrencesRequest actualRequest = ((ListNoteOccurrencesRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(filter, actualRequest.getFilter()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listNoteOccurrencesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockGrafeas.addException(exception); - - try { - String name = "name3373707"; - String filter = "filter-1274492040"; - client.listNoteOccurrences(name, filter); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java deleted file mode 100644 index bf0f38182e4c..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeas.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockGrafeas implements MockGrpcService { - private final MockGrafeasImpl serviceImpl; - - public MockGrafeas() { - serviceImpl = new MockGrafeasImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java b/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java deleted file mode 100644 index 66cfa3460def..000000000000 --- a/owl-bot-staging/java-grafeas/v1/src/test/java/io/grafeas/v1/MockGrafeasImpl.java +++ /dev/null @@ -1,353 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.grafeas.v1; - -import com.google.api.core.BetaApi; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -import io.grafeas.v1.GrafeasGrpc.GrafeasImplBase; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockGrafeasImpl extends GrafeasImplBase { - private List requests; - private Queue responses; - - public MockGrafeasImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void getOccurrence( - GetOccurrenceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Occurrence) { - requests.add(request); - responseObserver.onNext(((Occurrence) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetOccurrence, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Occurrence.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listOccurrences( - ListOccurrencesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListOccurrencesResponse) { - requests.add(request); - responseObserver.onNext(((ListOccurrencesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListOccurrences, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListOccurrencesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteOccurrence( - DeleteOccurrenceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteOccurrence, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createOccurrence( - CreateOccurrenceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Occurrence) { - requests.add(request); - responseObserver.onNext(((Occurrence) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateOccurrence, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Occurrence.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void batchCreateOccurrences( - BatchCreateOccurrencesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchCreateOccurrencesResponse) { - requests.add(request); - responseObserver.onNext(((BatchCreateOccurrencesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchCreateOccurrences, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchCreateOccurrencesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateOccurrence( - UpdateOccurrenceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Occurrence) { - requests.add(request); - responseObserver.onNext(((Occurrence) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateOccurrence, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Occurrence.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getOccurrenceNote( - GetOccurrenceNoteRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Note) { - requests.add(request); - responseObserver.onNext(((Note) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetOccurrenceNote, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Note.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getNote(GetNoteRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Note) { - requests.add(request); - responseObserver.onNext(((Note) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetNote, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Note.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listNotes( - ListNotesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListNotesResponse) { - requests.add(request); - responseObserver.onNext(((ListNotesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListNotes, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListNotesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteNote(DeleteNoteRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteNote, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createNote(CreateNoteRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Note) { - requests.add(request); - responseObserver.onNext(((Note) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateNote, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Note.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void batchCreateNotes( - BatchCreateNotesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchCreateNotesResponse) { - requests.add(request); - responseObserver.onNext(((BatchCreateNotesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchCreateNotes, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchCreateNotesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateNote(UpdateNoteRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Note) { - requests.add(request); - responseObserver.onNext(((Note) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateNote, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Note.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listNoteOccurrences( - ListNoteOccurrencesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListNoteOccurrencesResponse) { - requests.add(request); - responseObserver.onNext(((ListNoteOccurrencesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListNoteOccurrences, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListNoteOccurrencesResponse.class.getName(), - Exception.class.getName()))); - } - } -}